/* AvaX visual system: shared by public pages, workbenches and games. */
@font-face{font-family:Vazirmatn;src:url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Vazirmatn;src:url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');font-weight:700 900;font-display:swap}
:root,:root[data-theme="light"]{color-scheme:light;--primary:#8649cd;--primary-light:#c4a1ed;--primary-dark:#66309e;--primary-deep:#3b174e;--bg:#fcf7f3;--surface:#fffdfb;--surface-2:#f4ebe9;--text:#341b3b;--text-muted:#826e85;--border:#eadfe6;--nav-bg:#fffaf5ed;--nav-border:#eadfe6;--accent-soft:#ead7fc;--shadow:0 8px 32px #53204c09;--surface-soft:var(--surface-2);--input:var(--surface);--text-soft:var(--text-muted)}
:root[data-theme="dark"]{color-scheme:dark;--primary:#c6a0f3;--primary-light:#dec1ff;--primary-dark:#a877e2;--primary-deep:#efddff;--bg:#17131c;--surface:#231d2a;--surface-2:#2e2535;--text:#f6eaf8;--text-muted:#b9a6bf;--border:#403448;--nav-bg:#231d2aee;--nav-border:#49394e;--accent-soft:#4b3264;--shadow:0 8px 32px #0002}
html{scroll-padding-bottom:100px}html,body{max-width:100%;overflow-x:clip}body{margin:0;background:radial-gradient(ellipse at 95% 0,color-mix(in srgb,var(--accent-soft) 48%,transparent),transparent 420px),var(--bg);color:var(--text);font-family:Vazirmatn,Tahoma,sans-serif}*,*::before,*::after{box-sizing:border-box}button,input,textarea,select{font-family:inherit}a{color:var(--primary)}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid var(--primary);outline-offset:4px}[hidden]{display:none}
body :is(.page,.profile-page,.friends-page){width:100%;max-width:800px;margin-inline:auto;padding:24px 20px 104px}body :is(h1,.home-title,.discovery-title){color:var(--text);font-size:clamp(24px,4vw,32px);letter-spacing:-.8px;line-height:1.6}body :is(.section-title,.panel-title){color:var(--text);font-size:18px}body :is(.home-subtitle,.muted,.profile-header-subtitle){color:var(--text-muted)}
.avx-masthead{width:min(800px,100%);margin:auto;padding:18px 20px 8px;display:flex;align-items:center;justify-content:space-between;gap:14px}.avx-wordmark{font-size:29px;letter-spacing:-1.5px;font-weight:900;text-decoration:none;color:var(--text);direction:ltr}.avx-wordmark b{color:var(--primary)}.avx-tools{display:flex;gap:8px}.avx-tool{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--text);text-decoration:none;cursor:pointer}.avx-tool .icon,.avx-tool svg{width:19px;height:19px}
body :is(.post-card,.create-box,.discovery-panel,.profile-card,.friends-card,.friend-card,.room,.settings-item,.wallet-card,.help-card,.panel,.quiz-card,.leaderboard-card){background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow)}body .home-section{padding:22px 0;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none}
body .home-section + .home-section{border-top:1px solid color-mix(in srgb,var(--text) 9%,transparent)}
body .home-section .text-tabs{gap:20px;justify-content:flex-start;padding:0;background:transparent;border:0;border-radius:0;flex-wrap:wrap}
body .home-section .text-tab{flex:0 1 auto;padding:8px 0 10px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--text-muted);box-shadow:none}
body .home-section .text-tab.active{background:transparent;color:var(--primary);border-bottom-color:color-mix(in srgb,var(--primary) 60%,transparent)}
body .post-card{padding:20px;margin-bottom:16px}body .post-image{border-radius:18px;max-width:100%;height:auto}body :is(.post-content,.comment-text){color:var(--text);line-height:1.95}body .post-actions{border-color:var(--border)}body .create-box{padding:20px}body :is(.text-tabs,.profile-tabs,.friends-tabs,.mode-switch){display:flex;gap:6px;padding:5px;background:var(--surface-2);border:0;border-radius:18px;max-width:100%;flex-wrap:wrap}body :is(.text-tab,.profile-tab,.friends-tab,.mode-btn){border:0;border-radius:13px;color:var(--text-muted);background:transparent;padding:10px 13px;min-height:42px}body :is(.text-tab,.profile-tab,.friends-tab,.mode-btn).active{background:var(--accent-soft);color:var(--primary-deep);box-shadow:none}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),textarea,select){background:var(--input);color:var(--text);border-color:var(--border);border-radius:14px}body :is(.btn-primary,.save-button,.post-btn,.game-start-button){background:var(--primary);color:var(--bg);border-radius:14px;border:0}body :is(.settings-item,.account-item,.username-editor){background:var(--surface-2);border-color:var(--border)}body .profile-card{padding:22px}.profile-avatar{box-shadow:0 0 0 5px var(--surface),0 0 0 7px var(--primary-light)}body .profile-completion{background:var(--surface-2);border-color:var(--border)}
body .users-slider{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px 2px 12px;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}body .users-slider::-webkit-scrollbar{display:none}body .users-slider>.user-card{display:grid;flex:0 0 142px;width:142px;min-width:0;align-content:start;scroll-snap-align:start;background:var(--surface-2);border:0;border-radius:18px;padding:14px 8px}body .user-avatar{border-color:var(--primary-light)}body .user-display-name{color:var(--text);overflow-wrap:anywhere}body .groups-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body .group-card{background:var(--surface-2);border-color:var(--border);border-radius:17px}body .room{padding:18px;margin-bottom:10px}body :is(.bubble-icon,.group-card-icon){background:var(--accent-soft);color:var(--primary);border-radius:16px}body .room p{color:var(--text-muted)}body .room h2{color:var(--text)}
.avx-hero{position:relative;isolation:isolate;overflow:hidden;min-height:270px;margin:0 0 18px;padding:32px;border-radius:28px;background:linear-gradient(125deg,#372044,#6f3b91);color:#fff;display:flex;align-items:center}.avx-hero::after{content:'';position:absolute;z-index:-1;width:310px;height:310px;border:48px solid #f5c5f344;border-radius:50%;left:-90px;top:-90px;box-shadow:0 0 0 36px #e0beff15,0 0 0 90px #ecceff0b}.avx-hero h2{font-size:clamp(28px,5vw,42px);line-height:1.6;margin:8px 0 18px;max-width:480px}.avx-hero p{color:#e5ceef;margin:0;font-size:12px}.avx-cta{display:inline-flex;align-items:center;gap:12px;padding:12px 20px;background:#ecd7ff;color:#48205b;border-radius:30px;text-decoration:none;font-weight:700;font-size:13px}.avx-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:28px}.avx-shortcut{padding:20px 10px;border-radius:22px;text-align:center;text-decoration:none;color:var(--text);background:var(--accent-soft);display:grid;justify-items:center;gap:12px;font-size:13px;font-weight:700}.avx-shortcut:nth-child(2){background:color-mix(in srgb,#f19c8b 28%,var(--surface))}.avx-shortcut:nth-child(3){background:color-mix(in srgb,#63c8b4 25%,var(--surface))}.avx-shortcut .icon,.avx-shortcut svg{width:30px;height:30px}
.avx-conversation-tabs{display:flex;gap:6px;max-width:760px;margin:12px auto 0;padding:6px;background:var(--surface-2);border-radius:18px}.avx-conversation-tabs a{flex:1;min-width:0;padding:10px 5px;text-align:center;text-decoration:none;font-size:12px;border-radius:13px;color:var(--text-muted)}.avx-conversation-tabs a[aria-current]{background:var(--accent-soft);color:var(--primary-deep);font-weight:700}
/* The navigation remains compact and reachable on phones. */
body .app-bottom-nav{height:70px;max-width:760px;border-radius:24px;background:var(--nav-bg);border-color:var(--nav-border);box-shadow:0 8px 35px #38163c16;padding:6px}.app-nav-link,.app-nav-trigger{height:54px;border-radius:17px}.app-nav-link.active,.app-nav-trigger.active{background:var(--accent-soft);color:var(--primary)}.app-nav-popup{background:var(--surface);color:var(--text);border-color:var(--border)}.app-nav-popup a{min-height:44px}
:root{--room-surface:var(--surface);--room-surface-soft:var(--bg);--room-text:var(--text);--room-muted:var(--text-muted);--room-line:var(--border);--room-icon-bg:var(--accent-soft);--room-icon:var(--primary);--room-input-border:var(--border);--room-message:color-mix(in srgb,var(--surface) 80%,transparent);--room-message-mine:color-mix(in srgb,var(--accent-soft) 72%,transparent)}
body .game-card{border-radius:24px;border:1px solid var(--border);box-shadow:var(--shadow);background:linear-gradient(145deg,var(--surface),var(--accent-soft));color:var(--text)}body .game-card:nth-child(3n+2){background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#f1ad96 24%,var(--surface)))}body .game-card:nth-child(3n){background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#69c5b2 24%,var(--surface)))}
@media(min-width:1000px){.avx-masthead{padding-top:26px}.avx-hero{min-height:310px}}
@media(max-width:480px){body :is(.page,.profile-page,.friends-page){padding:18px 14px 100px}.avx-masthead{padding:16px 16px 4px}.avx-hero{padding:24px;min-height:240px}.avx-shortcuts{gap:8px}.avx-shortcut{font-size:11px;padding:16px 6px}body .users-slider{gap:10px}body .users-slider>.user-card{flex-basis:122px;width:122px;padding:12px 7px}body .user-card .user-avatar{width:58px;height:58px;margin-bottom:8px}body .groups-list{display:flex;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:2px 1px 10px;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}body .groups-list::-webkit-scrollbar{display:none}body .groups-list>.group-card{flex:0 0 min(84vw,320px);min-width:0;scroll-snap-align:start}.avx-conversation-tabs{margin-inline:14px}}
@media(prefers-reduced-motion:no-preference){.avx-shortcut,.avx-cta,.app-nav-link{transition:background .18s ease,transform .18s ease}.avx-shortcut:hover,.avx-cta:hover{transform:translateY(-2px)}}

/* Compact group rows with live gender presence counts on the home screen. */
body .groups-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
body .groups-list>.group-card{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 12px;flex:initial;scroll-snap-align:none}
body .group-card-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:13px;font-weight:700;text-decoration:none}
body .group-card-title:hover{color:var(--primary)}
body .group-presence-counts{display:flex;align-items:center;gap:8px;flex-shrink:0}
body .group-presence-count{min-width:40px;text-align:center;padding:3px 7px;border-radius:999px;font-size:11px;font-weight:700;direction:ltr;font-variant-numeric:tabular-nums}
body .group-presence-count--women{color:#c33e83;background:color-mix(in srgb,#ed77b4 16%,var(--surface))}
body .group-presence-count--men{color:#3678c9;background:color-mix(in srgb,#69aaf1 17%,var(--surface))}

/* Homepage header, shortcuts, and editorial section rhythm. */
body .avx-brand-side{display:flex;align-items:center;gap:12px}
body .avx-tool{position:relative}
body .avx-shortcuts .avx-shortcut:nth-child(n){min-height:86px;padding:13px 8px;border:1px solid var(--border);border-radius:20px;background:var(--surface);box-shadow:var(--shadow);gap:8px}
body .avx-shortcuts .avx-shortcut .icon,body .avx-shortcuts .avx-shortcut svg{width:25px;height:25px;color:var(--primary)}
body .home-section .section-title{font-size:18px;font-weight:800;letter-spacing:-.25px}
@media(max-width:480px){body .avx-shortcuts .avx-shortcut:nth-child(n){min-height:78px;padding:10px 5px;font-size:11px}}

/* Expressive, soft-pastel home and games treatment inspired by the reference. */
body .avx-masthead{direction:ltr;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:72px;padding:12px 20px}
body .avx-header-left{grid-column:1;justify-self:start;display:flex;align-items:center;gap:10px}
body .avx-masthead>.avx-wordmark{grid-column:2;font-size:32px;letter-spacing:-1.8px}
body .avx-masthead>.avx-tools{grid-column:3;justify-self:end}
body .avx-profile-avatar{position:relative;display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;overflow:hidden;border:2px solid var(--surface);border-radius:50%;background:linear-gradient(145deg,var(--accent-soft),var(--surface));box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 30%,transparent);color:var(--primary);text-decoration:none}
body .avx-profile-avatar::after{content:"";position:absolute;right:0;bottom:0;width:12px;height:12px;border:2px solid var(--surface);border-radius:50%;background:#2eb875}
body .avx-profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
body .avx-header-left .avx-tool,body .avx-masthead>.avx-tools .avx-tool{width:42px;height:42px;border:0;background:var(--surface);box-shadow:0 3px 15px color-mix(in srgb,var(--text) 8%,transparent)}
body .avx-notification-tool .notification-badge{top:-3px;left:-4px;min-width:16px;min-height:16px;padding:1px 4px;border:2px solid var(--bg);background:#ef5364;color:#fff;font-size:9px}
body .avx-shortcuts .avx-shortcut:nth-child(1){background:color-mix(in srgb,#68d7c6 26%,var(--surface))}
body .avx-shortcuts .avx-shortcut:nth-child(2){background:color-mix(in srgb,#ff9c83 27%,var(--surface))}
body .avx-shortcuts .avx-shortcut:nth-child(3){background:color-mix(in srgb,#bd8af4 25%,var(--surface))}
body .avx-shortcuts .avx-shortcut{border-color:color-mix(in srgb,var(--border) 65%,transparent);box-shadow:0 8px 20px color-mix(in srgb,var(--text) 7%,transparent)}
body .users-slider>.user-card{background:color-mix(in srgb,var(--accent-soft) 36%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 12%,transparent);border-radius:22px;box-shadow:0 6px 18px color-mix(in srgb,var(--text) 6%,transparent)}
body .users-slider>.user-card:nth-child(4n+2){background:color-mix(in srgb,#9ee5d8 29%,var(--surface))}
body .users-slider>.user-card:nth-child(4n+3){background:color-mix(in srgb,#ffd0a3 30%,var(--surface))}
body .users-slider>.user-card:nth-child(4n){background:color-mix(in srgb,#f4b8d8 28%,var(--surface))}
body .group-card{border:1px solid color-mix(in srgb,var(--primary) 12%,var(--border));box-shadow:0 4px 14px color-mix(in srgb,var(--text) 5%,transparent)}
body .post-card{border:1px solid color-mix(in srgb,var(--primary) 12%,var(--border));box-shadow:0 8px 24px color-mix(in srgb,var(--text) 6%,transparent)}
body .game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body .game-card{min-height:154px;border:1px solid color-mix(in srgb,var(--primary) 11%,var(--border));box-shadow:0 10px 24px color-mix(in srgb,var(--text) 8%,transparent);transition:transform .2s ease,box-shadow .2s ease}
body .game-card:nth-child(4n+1){background:linear-gradient(145deg,color-mix(in srgb,#79dbc9 35%,var(--surface)),var(--surface))}
body .game-card:nth-child(4n+2){background:linear-gradient(145deg,color-mix(in srgb,#c499f4 36%,var(--surface)),var(--surface))}
body .game-card:nth-child(4n+3){background:linear-gradient(145deg,color-mix(in srgb,#ffb6a0 35%,var(--surface)),var(--surface))}
body .game-card:nth-child(4n){background:linear-gradient(145deg,color-mix(in srgb,#ffdc8e 36%,var(--surface)),var(--surface))}
body .game-card .game-icon{width:62px;height:62px;font-size:38px;border-radius:22px;background:color-mix(in srgb,var(--surface) 64%,transparent);box-shadow:inset 0 2px 5px #fff8,0 7px 15px color-mix(in srgb,var(--text) 10%,transparent)}
body{background:radial-gradient(ellipse at 8% -6%,color-mix(in srgb,#f4c9e9 30%,transparent),transparent 240px),radial-gradient(ellipse at 94% 4%,color-mix(in srgb,#c9b2fa 28%,transparent),transparent 300px),var(--bg)}
@media(hover:hover){body .game-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px color-mix(in srgb,var(--text) 12%,transparent)}}
@media(max-width:480px){body .avx-masthead{min-height:64px;padding:10px 16px 6px}body .avx-profile-avatar{width:44px;height:44px;flex-basis:44px}body .avx-masthead>.avx-wordmark{font-size:29px}body .avx-header-left .avx-tool,body .avx-masthead>.avx-tools .avx-tool{width:38px;height:38px}body .avx-shortcuts{margin-bottom:18px}body .game-grid{gap:10px}body .game-card{min-height:136px;padding:14px 8px}body .game-card .game-icon{width:54px;height:54px;font-size:32px}}
@media(prefers-reduced-motion:reduce){body .game-card{transition:none}}

.avx-timelines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}.avx-timeline-person{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px;border-radius:16px;background:var(--surface-2);text-decoration:none;color:var(--text);min-width:0}.avx-timeline-person strong{font-size:12px;overflow-wrap:anywhere}.avx-timeline-person small{white-space:nowrap;color:var(--text-muted);font-size:10px}
body :is(.games-page,.wallet-page){max-width:800px;margin-inline:auto;padding-bottom:110px}body .game-grid{gap:14px}body .game-card{min-height:126px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px 12px}body .game-icon{width:54px;height:54px;font-size:30px;border-radius:18px}body .game-copy h3{font-size:14px;color:var(--text)}body .game-copy p{color:var(--text-muted)}body .room-list{gap:12px}body :is(.dialog,.dialog-head,.status,.prefs,.permission-option){background:var(--surface);color:var(--text);border-color:var(--border)}body :is(.settings-title,.account-value,.friends-title,.panel-title,.profile-username){color:var(--text)}
@media(max-width:380px){.avx-timelines{grid-template-columns:1fr}.app-nav-link,.app-nav-trigger{font-size:9px}}
