:root{
  --blue:#176380;
  --deep:#0c536e;
  --cyan:#83c7d6;
  --cream:#fef4d6;
  --orange:#fc8138;
  --graphite:#2c3139;
  --night:#121622;
  --danger:#e76868;
  --success:#58b98b;
  --warning:#d99b45;
  --radius-xs: 8px;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --font-ui:"Manrope",sans-serif;
  --font-display:"Unbounded",sans-serif;
  --safe-top:max(12px,env(safe-area-inset-top));
  --safe-bottom:max(12px,env(safe-area-inset-bottom));
  --nav-height:78px;
}
html[data-theme="dark"]{
  --bg:#090f18;
  --bg-2:#0f1621;
  --surface:#151d29;
  --surface-2:#1c2634;
  --surface-3:#233040;
  --soft:rgba(255,255,255,.06);
  --soft-strong:rgba(255,255,255,.1);
  --text:#fffaf1;
  --muted:#91a0b2;
  --muted-2:#657286;
  --glass:rgba(11,17,27,.92);
  --line:rgba(255,255,255,.06);
  --modal:rgba(4,8,13,.72);
}
html[data-theme="light"]{
  --bg:#f7f3e8;
  --bg-2:#fffaf0;
  --surface:#fffdf7;
  --surface-2:#f1ede3;
  --surface-3:#e6e1d5;
  --soft:rgba(23,99,128,.07);
  --soft-strong:rgba(23,99,128,.11);
  --text:#17252e;
  --muted:#6b7881;
  --muted-2:#919ca2;
  --glass:rgba(255,252,244,.94);
  --line:rgba(23,99,128,.07);
  --modal:rgba(12,25,33,.45);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font:14px/1.45 var(--font-ui);overscroll-behavior:none}
body{min-height:100dvh;background:radial-gradient(circle at 0 0,rgba(131,199,214,.18),transparent 34%),radial-gradient(circle at 100% 100%,rgba(12,83,110,.14),transparent 36%),var(--bg)}
button,input,select,textarea{font:inherit;color:inherit;border:0;outline:0}
button{cursor:pointer;background:transparent}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,p{margin:0}
img{display:block;max-width:100%}
.hidden{display:none!important}
.no-scroll{overflow:hidden!important}
html.scroll-locked{overflow:hidden!important;overscroll-behavior:none}
body.scroll-locked{
  position:fixed!important;
  left:0;
  right:0;
  width:100%;
  overflow:hidden!important;
  overscroll-behavior:none
}

.loading-screen{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:radial-gradient(circle at 25% 10%,rgba(131,199,214,.26),transparent 34%),linear-gradient(145deg,#07131d,#0f1a28 58%,#111823);color:#fff;transition:opacity .35s ease,visibility .35s ease}
.loading-screen.done{opacity:0;visibility:hidden}
.loading-card{display:grid;justify-items:center;gap:16px}
.loading-logo,.outside-logo,.welcome-mark{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--cyan),var(--blue) 55%,var(--deep));font:800 1em var(--font-display)}
.loading-logo{width:108px;height:108px;border-radius:8px;font-size:52px;animation:float 1.8s ease-in-out infinite}
.loading-card strong{font:800 25px var(--font-display)}
.loading-line{width:190px;height:5px;border-radius:8px;overflow:hidden;background:rgba(255,255,255,.12)}
.loading-line i{display:block;width:42%;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--deep));animation:load 1.1s ease-in-out infinite alternate}
@keyframes float{50%{transform:translateY(-5px)}}
@keyframes load{to{transform:translateX(110px)}}

.outside{min-height:100dvh;display:grid;place-items:center;padding:24px}
.outside-card{width:min(100%,420px);padding:28px;border-radius:8px;background:var(--surface);text-align:center}
.outside-logo{width:88px;height:88px;border-radius:8px;margin:0 auto 20px;font-size:42px}
.outside-card h1{font:800 30px var(--font-display)}
.outside-card p{margin:10px 0 22px;color:var(--muted)}

.app-shell{width:min(100%,560px);min-height:100dvh;margin:0 auto;padding-bottom:calc(var(--nav-height) + var(--safe-bottom) + 8px);position:relative}
.topbar{position:sticky;top:0;z-index:30;padding:var(--safe-top) 14px 10px;background:linear-gradient(to bottom,var(--bg) 72%,transparent);display:flex;align-items:center;justify-content:space-between;gap:10px}
.profile-compact{min-width:0;display:grid;grid-template-columns:44px minmax(0,1fr);gap:10px;align-items:center;text-align:left}
.profile-compact-copy{min-width:0}
.profile-compact-copy b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.profile-compact-copy small{display:flex;align-items:center;gap:4px;margin-top:3px;color:var(--muted);font-size:9px;white-space:nowrap}
.mini-progress{width:58px;height:4px;border-radius:8px;background:var(--soft);overflow:hidden;margin-left:3px}
.mini-progress u{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--cyan),var(--deep));text-decoration:none}
.topbar-actions{display:flex;align-items:center;gap:8px}
.coin-button,.icon-button{height:44px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);color:var(--text)}
.coin-button{padding:0 13px;gap:7px;min-width:78px}
.coin-button i{color:var(--orange)}
.icon-button{width:44px;flex:0 0 44px}
.notification-button{position:relative}
.notification-badge{position:absolute;right:4px;top:4px;min-width:17px;height:17px;padding:0 4px;border-radius:8px;display:grid;place-items:center;background:var(--orange);color:#fff;font-size:8px;font-weight:800}

.view{padding:2px 14px 18px}
.page{animation:page-in .22s ease}
@keyframes page-in{from{opacity:.35;transform:translateY(6px)}to{opacity:1;transform:none}}
.page-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:5px 0 16px}
.page-heading h1{font:800 25px/1.1 var(--font-display);letter-spacing:-.8px}
.page-heading p{margin-top:6px;color:var(--muted);font-size:11px}
.page-heading.centered{display:block;text-align:center}

.hero{min-height:250px;border-radius:8px;padding:23px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;color:#fff;background:radial-gradient(circle at 90% 8%,rgba(254,244,214,.27),transparent 27%),linear-gradient(140deg,#0a3145,var(--blue) 52%,var(--deep))}
.hero:after{content:"Q";position:absolute;right:12px;top:26px;color:rgba(255,255,255,.09);font:800 118px/1 var(--font-display);transform:rotate(-7deg)}
.hero-content,.hero-actions{position:relative;z-index:1}
.eyebrow,.pill{width:max-content;max-width:100%;display:inline-flex;align-items:center;gap:7px;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:800;letter-spacing:.2px}
.eyebrow{background:rgba(255,255,255,.12)}
.hero h1{max-width:370px;margin:14px 0 8px;font:800 clamp(27px,7vw,34px)/1.08 var(--font-display);letter-spacing:-1px}
.hero p{max-width:360px;color:rgba(255,255,255,.74);font-size:12px;line-height:1.55}
.hero-actions{display:grid;grid-template-columns:1fr 50px;gap:9px;margin-top:20px}
.hero-actions .icon-button{height:50px;width:50px;background:rgba(255,255,255,.13);color:#fff}

.button{min-height:46px;padding:11px 15px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:800;font-size:12px;transition:transform .15s ease,opacity .15s ease}
.button:active{transform:scale(.98)}
.button:disabled{opacity:.45;cursor:not-allowed}
.button-wide{width:100%}
.button-primary{color:#fff;background:linear-gradient(110deg,var(--cyan),var(--blue) 46%,var(--deep))}
.button-cream{color:#1c2b35;background:var(--cream)}
.button-orange{color:#fff;background:var(--orange)}
.button-soft{background:var(--soft);color:var(--text)}
.button-danger{background:rgba(231,104,104,.13);color:var(--danger)}
.button-success{background:rgba(88,185,139,.14);color:var(--success)}
.button-small{min-height:36px;padding:8px 11px;font-size:10px}
.text-button{padding:0;color:var(--muted);font-size:10px;font-weight:700}
.text-button.accent{color:var(--cyan)}

.section{margin-top:20px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.section-head h2{font:700 16px/1.2 var(--font-display);letter-spacing:-.35px}
.section-head span,.section-head button{color:var(--muted);font-size:10px}
.card{background:var(--surface);border-radius:8px;padding:15px}
.card-soft{background:var(--surface-2)}
.card-blue{color:#fff;background:linear-gradient(145deg,var(--blue),var(--deep))}
.card-cream{color:#21303a;background:var(--cream)}
.card-orange{color:#fff;background:var(--orange)}
.card + .card{margin-top:8px}

.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stat-card{min-height:82px;padding:12px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;text-align:center}
.stat-card strong{font:700 18px var(--font-display)}
.stat-card span{margin-top:5px;color:var(--muted);font-size:8px}

.mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mode-card{min-height:172px;padding:15px;border-radius:8px;background:var(--surface);display:flex;flex-direction:column;justify-content:space-between;text-align:left;overflow:hidden;position:relative}
.mode-card.mode-wide{grid-column:1/-1;min-height:145px;display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center}
.mode-card.mode-blue{color:#fff;background:linear-gradient(145deg,var(--blue),var(--deep))}
.mode-card.mode-orange{color:#fff;background:var(--orange)}
.mode-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mode-icon,.list-icon,.setting-icon{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan);flex:0 0 auto}
.mode-blue .mode-icon,.mode-orange .mode-icon{background:rgba(255,255,255,.13);color:#fff}
.mode-label{padding:5px 7px;border-radius:8px;background:var(--soft);color:var(--muted);font-size:7px;font-weight:800;white-space:nowrap}
.mode-blue .mode-label,.mode-orange .mode-label{background:rgba(255,255,255,.13);color:#fff}
.mode-card h3{margin:12px 0 5px;font-size:14px}
.mode-card p{color:var(--muted);font-size:9px;line-height:1.5}
.mode-blue p,.mode-orange p{color:rgba(255,255,255,.72)}
.mode-meta{display:flex;align-items:center;gap:7px;margin-top:10px;font-size:9px;font-weight:800}
.mode-meta i{color:var(--orange)}
.mode-blue .mode-meta i,.mode-orange .mode-meta i{color:#fff}
.mode-arrow{color:var(--muted);font-size:17px;text-align:center}
.mode-blue .mode-arrow,.mode-orange .mode-arrow{color:#fff}

.horizontal{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(220px,78%);gap:9px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory}
.horizontal::-webkit-scrollbar,.tabs::-webkit-scrollbar{display:none}
.horizontal>.card{scroll-snap-align:start;margin:0;min-height:150px}
.live-card{display:flex;flex-direction:column}
.live-card h3{margin:12px 0 5px;font-size:13px}
.live-card-footer{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:auto;padding-top:12px}
.status{display:inline-flex;align-items:center;gap:6px;color:var(--success);font-size:8px;font-weight:800}
.status:before{content:"";width:6px;height:6px;border-radius:8px;background:currentColor}
.price{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:800}
.price i{color:var(--orange)}
.meta-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:8px}
.avatar-stack{display:flex}
.avatar-stack .avatar{margin-left:-7px;outline:3px solid var(--surface)}
.avatar-stack .avatar:first-child{margin-left:0}

.avatar{display:grid;place-items:center;overflow:hidden;background:linear-gradient(135deg,var(--cyan),var(--blue) 58%,var(--deep));color:#fff;font-weight:800;flex:0 0 auto}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar-30{width:30px;height:30px;border-radius:8px;font-size:8px}
.avatar-38{width:38px;height:38px;border-radius:8px;font-size:10px}
.avatar-44{width:44px;height:44px;border-radius:8px;font-size:12px}
.avatar-56{width:56px;height:56px;border-radius:8px;font-size:15px}
.avatar-78{width:78px;height:78px;border-radius:8px;font-size:22px}

.tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin-bottom:13px}
.tab{flex:0 0 auto;min-height:36px;padding:8px 12px;border-radius:8px;background:var(--surface);color:var(--muted);font-size:9px;font-weight:800}
.tab.active{color:#fff;background:linear-gradient(110deg,var(--cyan),var(--blue),var(--deep))}

.list{display:grid;gap:7px}
.list-item{min-height:62px;padding:10px 12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}
.list-copy{min-width:0}
.list-copy b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-copy small{display:block;margin-top:3px;color:var(--muted);font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-value{text-align:right;font-size:9px;font-weight:800}
.list-value small{display:block;color:var(--muted);font-size:7px;margin-top:2px}

.leader-list{display:grid;gap:7px}
.leader-row{min-height:61px;padding:10px 12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:27px 38px minmax(0,1fr) auto;gap:9px;align-items:center}
.leader-row.me{background:linear-gradient(135deg,rgba(131,199,214,.14),rgba(12,83,110,.08)),var(--surface)}
.rank{font-weight:800;color:var(--muted);text-align:center}
.rank.top{color:var(--orange)}
.leader-row h4{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.leader-row p{margin-top:2px;color:var(--muted);font-size:8px}
.leader-score{font-weight:800;font-size:10px}
.podium{display:grid;grid-template-columns:1fr 1.08fr 1fr;gap:7px;align-items:end;margin:20px 0}
.podium-card{min-height:145px;padding:14px 7px;border-radius:8px;background:var(--surface);display:grid;justify-items:center;align-content:center;text-align:center;position:relative}
.podium-card.first{min-height:172px;background:linear-gradient(145deg,var(--cream),rgba(131,199,214,.8));color:#1d2d37}
html[data-theme="dark"] .podium-card.first{background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff}
.podium-place{position:absolute;top:-8px;min-width:26px;height:26px;padding:0 7px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);font-size:9px;font-weight:800}
.podium-card strong{margin-top:8px;font-size:9px}
.podium-card small{margin-top:3px;color:var(--muted);font-size:7px}

.quiz-search{display:grid;grid-template-columns:1fr 44px;gap:8px;margin-bottom:12px}
.search-field{min-height:44px;padding:0 12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:24px 1fr;align-items:center;color:var(--muted)}
.search-field input{width:100%;background:transparent;color:var(--text)}
.quiz-grid{display:grid;gap:9px}
.quiz-card{padding:15px;border-radius:8px;background:var(--surface)}
.quiz-head{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:11px;align-items:start}
.quiz-category{width:46px;height:46px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan);font-size:17px}
.quiz-card h3{font-size:12px}
.quiz-card p{margin-top:4px;color:var(--muted);font-size:8px;line-height:1.45}
.quiz-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}

.profile-card{padding:20px;border-radius:8px;background:linear-gradient(145deg,rgba(131,199,214,.12),rgba(12,83,110,.08)),var(--surface)}
.profile-main{display:grid;grid-template-columns:78px minmax(0,1fr);gap:14px;align-items:center}
.profile-main h1{font:700 18px var(--font-display);letter-spacing:-.5px}
.profile-main p{margin-top:5px;color:var(--muted);font-size:9px}
.profile-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pill{background:var(--soft);color:var(--muted)}
.pill-light{background:rgba(255,255,255,.14);color:#fff}
.pill-orange{background:var(--orange);color:#fff}
.progress{height:6px;border-radius:8px;overflow:hidden;background:var(--soft)}
.progress i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--deep))}
.profile-progress{margin-top:17px}
.profile-progress-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;color:var(--muted);font-size:8px}
.profile-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:9px}
.profile-action{min-height:68px;padding:8px 3px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;gap:6px;color:var(--muted);font-size:7px}
.profile-action i{color:var(--cyan);font-size:16px}
.knowledge-map{min-height:250px;border-radius:8px;background:var(--surface);display:grid;place-items:center;overflow:hidden;position:relative}
.radar{width:190px;height:190px;position:relative}
.radar-ring{position:absolute;inset:50%;transform:translate(-50%,-50%);border-radius:8px;background:var(--surface-2)}
.radar-ring.r1{width:190px;height:190px;opacity:.45}.radar-ring.r2{width:140px;height:140px;opacity:.75}.radar-ring.r3{width:90px;height:90px}
.radar-shape{position:absolute;inset:22px;background:var(--blue);clip-path:polygon(50% 0,88% 20%,100% 61%,69% 100%,25% 84%,0 47%,18% 15%);opacity:.72}
.radar-core{position:absolute;inset:72px;border-radius:8px;background:var(--orange)}

.clan-hero{min-height:205px;padding:20px;border-radius:8px;color:#fff;background:linear-gradient(145deg,var(--blue),var(--deep));display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:14px;align-items:center}
.clan-hero h1{font:800 25px var(--font-display);letter-spacing:-.8px;margin:9px 0 5px}
.clan-hero p{color:rgba(255,255,255,.72);font-size:9px}
.clan-emblem{width:86px;height:86px;border-radius:8px;display:grid;place-items:center;background:var(--cream);color:#18303e;font:800 24px var(--font-display)}
.boss-card{padding:16px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;align-items:center}
.boss-icon{width:56px;height:56px;border-radius:8px;display:grid;place-items:center;background:var(--orange);color:#fff;font-size:22px}
.boss-card h3{font-size:12px}
.boss-card p{margin:4px 0 9px;color:var(--muted);font-size:8px}
.war-card{padding:15px;border-radius:8px;background:var(--surface)}
.war-clans{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;text-align:center}
.war-clans b{font-size:10px}
.war-clans strong{color:var(--orange);font:700 17px var(--font-display)}

.form{display:grid;gap:12px}
.form-group{display:grid;gap:6px}
.form-group label{color:var(--muted);font-size:9px;font-weight:800}
.input,.select,.textarea{width:100%;padding:13px;border-radius:8px;background:var(--soft);color:var(--text)}
.textarea{min-height:90px;resize:vertical}
.range-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.range-row output{min-width:58px;text-align:right;font-weight:800;color:var(--orange)}
input[type="range"]{width:100%;accent-color:var(--blue)}
.switch{width:44px;height:26px;border-radius:8px;background:var(--surface-3);padding:3px;display:flex;align-items:center}
.switch i{width:20px;height:20px;border-radius:8px;background:var(--muted);transition:.2s}
.switch.on{background:var(--blue)}.switch.on i{transform:translateX(18px);background:#fff}
.check-row,.consent-row{display:grid;grid-template-columns:22px minmax(0,1fr);gap:11px;align-items:start;color:var(--muted);font-size:9px;line-height:1.5}
.check-row input,.consent-row input{appearance:none;width:22px;height:22px;margin:0;border-radius:8px;background:var(--soft);display:grid;place-items:center;flex:0 0 auto}
.check-row input:checked,.consent-row input:checked{background:var(--blue)}
.check-row input:checked:after,.consent-row input:checked:after{content:"\f00c";display:block;color:#fff;font:900 10px "Font Awesome 6 Free"}

.overlay{position:fixed;inset:0;z-index:100;background:var(--bg);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.overlay-header{position:sticky;top:0;z-index:5;min-height:66px;padding:var(--safe-top) 14px 10px;display:grid;grid-template-columns:44px 1fr 44px;gap:8px;align-items:center;background:linear-gradient(to bottom,var(--bg) 78%,transparent)}
.overlay-header h2{text-align:center;font:700 14px var(--font-display)}
.overlay-content{width:min(100%,560px);margin:0 auto;padding:3px 14px calc(24px + var(--safe-bottom))}
.modal-layer{position:fixed;inset:0;z-index:500;display:flex;align-items:flex-end;justify-content:center;padding:14px;background:var(--modal);backdrop-filter:blur(8px);overscroll-behavior:none;touch-action:none}
.modal-sheet{width:min(100%,520px);max-height:88dvh;overflow-y:auto;padding:20px;border-radius:8px;background:var(--surface-2);overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.compact-sheet{text-align:left}
.modal-handle{width:40px;height:4px;border-radius:8px;background:var(--soft-strong);margin:-6px auto 16px}
.modal-sheet h3{font:700 17px var(--font-display)}
.modal-sheet p{margin:8px 0 18px;color:var(--muted);font-size:10px;line-height:1.55}
.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.welcome-sheet{
  color:#fff;
  text-align:center;
  padding:24px 22px 22px;
  background:
    radial-gradient(circle at 88% 0,rgba(254,244,214,.24),transparent 30%),
    linear-gradient(145deg,#0a3145,var(--blue) 55%,var(--deep))
}
.welcome-brand{display:flex;justify-content:center;margin-bottom:20px}
.welcome-mark{
  width:88px;
  height:88px;
  margin:0;
  border-radius:8px;
  font-size:40px;
  background:rgba(255,255,255,.14)
}
.welcome-sheet h2{
  margin:0;
  font:800 clamp(23px,6vw,28px) var(--font-display);
  line-height:1.16;
  letter-spacing:-.8px
}
.welcome-message{
  max-width:390px;
  margin:13px auto 0!important;
  color:rgba(255,255,255,.76)!important;
  font-size:11px!important;
  line-height:1.65!important
}
.welcome-divider{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:10px;
  align-items:center;
  width:min(100%,330px);
  margin:19px auto 18px;
  color:rgba(254,244,214,.72);
  font-size:10px
}
.welcome-divider span{height:1px;background:rgba(255,255,255,.16)}
.welcome-consent{
  width:min(100%,410px);
  margin:0 auto!important;
  color:rgba(255,255,255,.86)!important;
  text-align:left
}
.welcome-sheet .consent-row input{
  background:rgba(255,255,255,.16);
  margin-top:0
}
.welcome-sheet .consent-row input:checked{background:var(--cream)}
.welcome-sheet .consent-row input:checked:after{color:#143346}
.consent-copy{
  min-height:22px;
  display:flex;
  align-items:center;
  align-content:center;
  flex-wrap:wrap;
  gap:1px 4px;
  padding-top:1px;
  font-size:10px;
  line-height:1.5
}
.consent-copy label{cursor:pointer}
.legal-link{
  display:inline;
  padding:0;
  background:transparent;
  color:var(--cream);
  font:inherit;
  font-weight:800;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  cursor:pointer
}
.legal-link:active{opacity:.72}
.welcome-error{
  width:min(100%,410px);
  margin:14px auto 0;
  padding:11px 12px;
  border-radius:8px;
  background:#d9565f;
  color:#fff;
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  gap:8px;
  align-items:center;
  text-align:left;
  font-size:9px;
  font-weight:700;
  line-height:1.45
}
.welcome-error i{font-size:14px}
.welcome-sheet .button{margin-top:18px}
.legal-sheet{padding:0;overflow:hidden;background:var(--surface-2);display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.legal-header{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:12px;align-items:center;padding:18px 18px 14px;background:var(--surface-2)}
.legal-kicker{display:block;margin-bottom:4px;color:var(--cyan);font-size:8px;font-weight:800;letter-spacing:1px;text-transform:uppercase}
.legal-header h3{margin:0;font:700 16px var(--font-display)}
.legal-close{width:40px;height:40px;border-radius:8px;background:var(--soft);color:var(--text);display:grid;place-items:center;font-size:15px}
.legal-body{padding:0 18px 6px;overflow-y:auto;color:var(--text)}
.legal-body section{padding:14px 0;}
.legal-body section:last-child{}
.legal-body h4{margin:0 0 7px;font-size:11px}
.legal-body p{margin:0;color:var(--muted);font-size:9px;line-height:1.65}
.legal-done{width:calc(100% - 36px);margin:10px 18px 18px}

.toast{position:fixed;z-index:1000;left:50%;bottom:calc(96px + var(--safe-bottom));width:min(calc(100% - 28px),440px);padding:12px 13px;border-radius:8px;background:var(--glass);backdrop-filter:blur(16px);transform:translate(-50%,18px);opacity:0;visibility:hidden;transition:.22s;display:flex;align-items:center;gap:8px;font-size:10px}
.toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.toast i{color:var(--cyan)}
.toast.error{background:#d9565f;color:#fff}
.toast.error i{color:#fff}

.bottom-nav{position:fixed;z-index:50;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,560px);min-height:calc(var(--nav-height) + var(--safe-bottom));padding:8px 9px var(--safe-bottom);display:grid;grid-template-columns:repeat(5,1fr);align-items:end;background:linear-gradient(to top,var(--glass) 84%,transparent);backdrop-filter:blur(22px)}
.nav-button{min-width:0;min-height:56px;border-radius:8px;display:grid;place-items:center;align-content:center;gap:5px;color:var(--muted);font-size:8px;font-weight:700}
.nav-button i{font-size:17px}
.nav-button.active:not(.nav-q){color:var(--text);background:var(--soft)}
.nav-q{transform:translateY(-9px);background:transparent!important}
.nav-q span{width:58px;height:58px;border-radius:8px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--cyan),var(--blue) 55%,var(--deep));font:800 27px var(--font-display)}
.nav-q.active span{transform:scale(1.04)}

.game-shell{height:100dvh;display:grid;grid-template-rows:auto auto 1fr auto;gap:10px;padding:var(--safe-top) 12px var(--safe-bottom)}
.game-head{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center}
.game-title{text-align:center}.game-title b{display:block;font:700 12px var(--font-display)}.game-title small{color:var(--muted);font-size:8px}
.player-strip{min-height:56px;padding:8px 10px;border-radius:8px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:8px}
.player-scroll{display:flex;min-width:0;overflow:hidden}.player-scroll .avatar{margin-left:-7px;outline:3px solid var(--surface)}.player-scroll .avatar:first-child{margin-left:0}
.game-score{text-align:right}.game-score b{display:block;color:var(--orange);font-size:10px}.game-score small{color:var(--muted);font-size:7px}
.question-card{min-height:0;padding:15px;border-radius:8px;background:var(--surface);display:grid;grid-template-rows:auto 1fr auto;overflow:auto}
.question-timer{height:6px;border-radius:8px;overflow:hidden;background:var(--soft)}
.question-timer i{display:block;width:100%;height:100%;background:linear-gradient(90deg,var(--cyan),var(--deep));transition:width .1s linear}
.question-copy{display:grid;place-items:center;align-content:center;text-align:center;padding:16px 2px}
.question-copy .pill{margin-bottom:14px}.question-copy h2{font:700 clamp(19px,5.5vw,25px)/1.32 var(--font-display);letter-spacing:-.45px;overflow-wrap:anywhere}
.answers{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.answer{min-height:76px;padding:11px;border-radius:8px;background:var(--soft);display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;text-align:left;font-size:10px;font-weight:700}
.answer-code{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);font-size:8px}
.answer.correct{background:rgba(88,185,139,.14);color:var(--success)}
.answer.wrong{background:rgba(231,104,104,.13);color:var(--danger)}
.answer.locked{pointer-events:none}
.boosters-row{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.booster{min-height:58px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;gap:4px;position:relative;color:var(--muted);font-size:7px}
.booster i{color:var(--cyan);font-size:15px}.booster b{position:absolute;right:4px;top:4px;min-width:17px;height:17px;padding:0 4px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--text);font-size:7px}

.wheel-wrap{display:grid;place-items:center;padding:18px 0}
.wheel-pointer{width:32px;height:22px;background:var(--text);clip-path:polygon(0 0,100% 0,50% 100%);margin-bottom:-7px;z-index:2}
.wheel{width:min(82vw,350px);aspect-ratio:1;border-radius:8px;position:relative;background:conic-gradient(var(--deep) 0 45deg,var(--cyan) 45deg 90deg,var(--blue) 90deg 135deg,var(--cream) 135deg 180deg,var(--deep) 180deg 225deg,var(--cyan) 225deg 270deg,var(--blue) 270deg 315deg,var(--cream) 315deg);transition:transform 3.5s cubic-bezier(.12,.8,.12,1)}
.wheel:after{content:"Q";position:absolute;inset:37%;border-radius:8px;display:grid;place-items:center;background:var(--deep);color:#fff;font:800 30px var(--font-display)}
.avatar-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.avatar-option{aspect-ratio:1;border-radius:8px;overflow:hidden;position:relative;background:var(--surface);display:grid;place-items:center}
.avatar-option img{width:100%;height:100%;object-fit:cover}.avatar-option.locked{filter:grayscale(1);opacity:.55}.avatar-option.selected:after{content:"\f00c";position:absolute;right:4px;bottom:4px;width:20px;height:20px;border-radius:8px;display:grid;place-items:center;background:var(--orange);color:#fff;font:900 8px "Font Awesome 6 Free"}
.avatar-lock{position:absolute;right:4px;bottom:4px;width:20px;height:20px;border-radius:8px;display:grid;place-items:center;background:rgba(9,15,24,.75);color:#fff;font-size:7px}

.empty-state{min-height:240px;padding:25px;display:grid;place-items:center;align-content:center;text-align:center;border-radius:8px;background:var(--surface)}
.empty-icon{width:60px;height:60px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan);font-size:22px;margin-bottom:13px}
.empty-state h3{font:700 15px var(--font-display)}
.empty-state p{max-width:300px;margin:7px auto 15px;color:var(--muted);font-size:9px}

@media(max-width:390px){
  .view,.topbar,.overlay-content{padding-left:11px;padding-right:11px}
  .hero{padding:20px;min-height:245px}.hero h1{font-size:26px}
  .mode-grid{gap:7px}.mode-card{padding:13px;min-height:164px}.mode-label{font-size:6px;max-width:76px;overflow:hidden;text-overflow:ellipsis}
  .stats-grid{gap:6px}.stat-card{padding:8px}
  .answers{grid-template-columns:1fr}.answer{min-height:58px}
  .question-card{padding:12px}.question-copy{padding:10px 2px}
  .profile-actions{gap:5px}.profile-action{font-size:6px}
}
@media(min-width:760px){
  body{padding:20px 0}.app-shell{min-height:calc(100dvh - 40px);border-radius:8px;overflow:hidden}.bottom-nav{bottom:20px;border-radius:8px}.overlay{inset:20px auto 20px 50%;transform:translateX(-50%);width:min(calc(100% - 40px),560px);border-radius:8px}.game-shell{height:calc(100dvh - 40px)}
}
.chat-messages{min-height:calc(100dvh - 190px);display:flex;flex-direction:column;justify-content:flex-end;gap:7px;padding:8px 0 12px}
.chat-message{max-width:82%;align-self:flex-start;padding:10px 12px;border-radius:8px;background:var(--surface);font-size:9px;line-height:1.5}
.chat-message.mine{align-self:flex-end;border-radius:8px;color:#fff;background:var(--deep)}
.chat-message small{display:block;margin-top:4px;color:var(--muted);font-size:6px}.chat-message.mine small{color:rgba(255,255,255,.55)}

@media(max-width:390px){.welcome-sheet{padding:20px 18px 18px}.welcome-mark{width:76px;height:76px;font-size:35px}.welcome-brand{margin-bottom:17px}.welcome-message{font-size:10px!important}.welcome-divider{margin:16px auto}.consent-copy{font-size:9px}.legal-header{padding:16px 15px 13px}.legal-body{padding-left:15px;padding-right:15px}.legal-done{width:calc(100% - 30px);margin-left:15px;margin-right:15px}}


/* QuizTop quality pass 1.1 */
.between-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.inline-actions{display:flex;gap:4px}.wrap-copy{white-space:normal!important}.chat-form,.friend-search-results{margin-top:10px}.war-meta{justify-content:center;margin-top:10px}.task-reward{justify-content:space-between;margin-top:9px}
.spin-promo{display:grid;grid-template-columns:1fr 74px;gap:12px;align-items:center}.spin-promo h3{font:700 15px var(--font-display)}.spin-promo p{margin:6px 0 13px;color:#53636d;font-size:9px}.spin-promo-icon{width:72px;height:72px;border-radius:8px;display:grid;place-items:center;background:var(--orange);color:#fff;font-size:27px}
.mode-grid{align-items:stretch;grid-auto-rows:1fr}.mode-card{height:100%;min-width:0}.mode-card>div:last-of-type{min-width:0}.mode-card h3,.mode-card p{overflow-wrap:anywhere}.mode-card.mode-wide{grid-template-columns:minmax(0,1fr) 34px;min-height:150px}.mode-card.mode-wide .mode-top{grid-column:1/-1}.mode-card.mode-wide>div:nth-child(2){min-width:0}.mode-arrow{align-self:center}
.category-strip{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(145px,44%);gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-bottom:13px}.category-strip::-webkit-scrollbar{display:none}.category-card{min-height:70px;padding:11px;border-radius:8px;background:var(--surface);display:flex;align-items:center;gap:9px;text-align:left;scroll-snap-align:start}.category-card b{font-size:9px;line-height:1.3}.category-card.active{background:var(--soft-strong)}
.quiz-card{min-width:0}.quiz-head>div{min-width:0}.quiz-card h3,.quiz-card p{overflow-wrap:anywhere}.quiz-meta{margin-top:12px}.quiz-footer .pill{text-transform:none}
.tournament-card{min-height:176px}.tournament-state{color:var(--muted);font-size:8px}.status-scheduled{color:var(--warning)}.status-finished{color:var(--muted)}
.empty-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.clan-tabs{margin-top:14px}.clan-price{padding:14px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:1fr auto;gap:5px 10px;align-items:center}.clan-price span{font-size:9px;color:var(--muted)}.clan-price b{color:var(--orange);font-size:13px}.clan-price small{grid-column:1/-1;color:var(--muted);font-size:8px}
.coin-summary{min-height:175px;padding:23px;border-radius:8px;color:#fff;background:linear-gradient(145deg,var(--blue),var(--deep));display:flex;flex-direction:column;justify-content:space-between}.coin-summary strong{font:800 44px var(--font-display)}.list-item.is-disabled{opacity:.55}
.knowledge-map{min-height:0;padding:16px;display:block;overflow:visible}.knowledge-summary{display:grid;grid-template-columns:130px minmax(0,1fr);gap:16px;align-items:center}.mastery-ring{--mastery:0;width:126px;height:126px;border-radius:8px;display:grid;place-items:center;background:conic-gradient(var(--cyan) calc(var(--mastery)*1%),var(--surface-2) 0);position:relative}.mastery-ring:before{content:"";position:absolute;inset:13px;border-radius:8px;background:var(--surface)}.mastery-ring>div{position:relative;text-align:center}.mastery-ring strong{display:block;font:800 26px var(--font-display)}.mastery-ring span{color:var(--muted);font-size:8px}.knowledge-summary-copy{display:grid;gap:4px}.knowledge-summary-copy b{font:800 24px var(--font-display)}.knowledge-summary-copy span{font-size:10px}.knowledge-summary-copy small{color:var(--muted);font-size:8px}.knowledge-list{display:grid;gap:9px;margin-top:17px}.knowledge-row{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center}.knowledge-icon{width:38px;height:38px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}.knowledge-row-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:6px}.knowledge-row-head b,.knowledge-row-head span{font-size:9px}.knowledge-progress{height:6px;border-radius:8px;background:var(--surface-2);overflow:hidden}.knowledge-progress i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--deep))}.knowledge-row small{display:block;margin-top:4px;color:var(--muted);font-size:7px}.knowledge-empty .empty-state{min-height:210px;padding:12px;background:transparent}
.settings-stack{display:grid;gap:12px}.settings-section{padding:14px;border-radius:8px;background:var(--surface)}.settings-section h3{margin:0 0 10px;font:700 11px var(--font-display)}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.segmented-two{grid-template-columns:repeat(2,1fr)}.segmented button{min-height:42px;padding:7px;border-radius:8px;background:var(--soft);color:var(--muted);font-size:8px;font-weight:800}.segmented button.active{color:#fff;background:linear-gradient(110deg,var(--cyan),var(--blue),var(--deep))}.setting-row{width:100%;min-height:62px;padding:9px 0;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;}.setting-row:first-of-type{}.setting-copy b{display:block;font-size:10px}.setting-copy small{display:block;margin-top:3px;color:var(--muted);font-size:7px}
.achievement-grid{display:grid;gap:9px}.achievement-card{padding:14px;border-radius:8px;background:var(--surface)}.achievement-top{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:start}.achievement-icon{width:44px;height:44px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}.achievement-top h3{font-size:11px}.achievement-top p{margin-top:4px;color:var(--muted);font-size:8px;line-height:1.45}.rarity{padding:6px 7px;border-radius:8px;background:var(--soft);color:var(--muted);font-size:7px;font-weight:800}.achievement-card .progress{margin-top:11px}.achievement-meta{display:flex;justify-content:space-between;gap:8px;margin-top:7px;color:var(--muted);font-size:7px}.achievement-card.unlocked .achievement-icon{background:var(--orange);color:#fff}
.avatar-grid{grid-template-columns:repeat(3,1fr);gap:9px}.avatar-option{aspect-ratio:auto;min-height:132px;padding:8px;display:grid;grid-template-rows:1fr auto;gap:7px}.avatar-option img{border-radius:8px;aspect-ratio:1}.avatar-name{font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar-option.selected{}
.screen-loader{min-height:220px;display:grid;place-items:center;align-content:center;gap:10px;color:var(--muted);font-size:9px}.screen-loader i{font-size:24px;color:var(--cyan)}.error-panel{min-height:220px;padding:22px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;gap:12px;text-align:center}.error-panel>i{font-size:28px;color:var(--danger)}.error-panel b{max-width:320px;font-size:10px;line-height:1.5}
.toast{top:calc(var(--safe-top) + 14px);bottom:auto;min-height:58px;padding:15px 16px;border-radius:8px;background:var(--surface-2);box-shadow:0 16px 38px rgba(0,0,0,.3);font-size:11px;font-weight:700;transform:translate(-50%,-18px)}.toast.show{transform:translate(-50%,0)}.toast.info{background:var(--deep);color:#fff}.toast.info i{color:var(--cyan)}
.game-shell{grid-template-rows:auto auto minmax(0,1fr) auto}.question-card.compact-question{align-content:start;overflow-y:auto}.compact-question .question-copy{min-height:130px;padding:14px 5px}.compact-question .question-copy .pill{margin-bottom:10px}.compact-question .answers{margin-top:4px}.answer{min-height:62px}.boosters-row{padding-bottom:8px}
.result-hero{padding:22px;border-radius:8px;color:#fff;text-align:center;background:linear-gradient(145deg,var(--blue),var(--deep))}.result-trophy{width:78px;height:78px;border-radius:8px;display:grid;place-items:center;margin:0 auto 12px;background:var(--orange);font-size:28px}.result-hero>span{color:rgba(255,255,255,.7);font-size:9px}.result-hero h2{font:800 48px var(--font-display);margin:3px 0}.result-hero p{color:rgba(255,255,255,.74);font-size:11px}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:16px}.result-stats>div{padding:11px 5px;border-radius:8px;background:rgba(255,255,255,.11)}.result-stats strong{display:block;font-size:13px}.result-stats span{display:block;margin-top:4px;color:rgba(255,255,255,.65);font-size:7px}.result-actions{display:grid;gap:8px;margin-top:12px}
@media(max-width:390px){.knowledge-summary{grid-template-columns:108px 1fr}.mastery-ring{width:104px;height:104px}.mode-card.mode-wide{min-height:142px}.achievement-top{grid-template-columns:40px minmax(0,1fr)}.achievement-top .rarity{grid-column:2;justify-self:start}.compact-question .question-copy{min-height:108px}.answer{min-height:56px}.avatar-option{min-height:112px}}


/* QuizTop full repair 1.2 */
.toast{top:calc(var(--safe-top) + 78px)!important;bottom:auto!important;min-height:64px!important;padding:16px 18px!important;border-radius:8px!important;font-size:12px!important;line-height:1.45!important;box-shadow:0 18px 48px rgba(0,0,0,.38)!important}
.toast i{font-size:17px;flex:0 0 auto}.toast.error{background:#d9565f!important}.toast.info{background:var(--blue)!important}
.game-shell{height:100dvh;grid-template-rows:auto auto auto auto!important;align-content:start;overflow-y:auto;overscroll-behavior:contain;padding-bottom:calc(14px + var(--safe-bottom))}
.question-card.compact-question{min-height:0!important;overflow:visible!important}.compact-question .question-copy{min-height:92px!important;padding:12px 5px!important}.compact-question .question-copy h2{font-size:clamp(18px,5.2vw,23px)!important;line-height:1.25!important}.compact-question .answers{margin-top:2px!important}.answer{min-height:58px!important}
.mode-grid{grid-auto-rows:minmax(165px,auto)!important}.mode-card{min-height:165px!important}.mode-card.mode-wide{min-height:145px!important;height:auto!important}.mode-card.mode-wide>div:nth-child(2){padding-right:8px}.mode-card.mode-wide p{max-width:92%}
.knowledge-map{border-radius:8px!important;overflow:hidden!important;background:linear-gradient(145deg,var(--surface),var(--surface-2))!important}.mastery-ring{}.mastery-ring:before{inset:15px!important}.knowledge-progress{height:8px!important}.knowledge-progress i{background:linear-gradient(90deg,var(--cyan),var(--blue),var(--deep))!important}
.avatar-option img{background:var(--soft);content-visibility:auto}.avatar-grid{content-visibility:auto;contain-intrinsic-size:320px}
.list-item[disabled],.list-item.is-disabled{pointer-events:none;filter:saturate(.65);opacity:.62}
@media(max-width:390px){.toast{top:calc(var(--safe-top) + 70px)!important}.game-shell{padding-left:10px;padding-right:10px}.compact-question .question-copy{min-height:78px!important}.mode-grid{grid-auto-rows:minmax(155px,auto)!important}.mode-card{min-height:155px!important}}

/* QuizTop product pass 1.3.0 */
:root{--desktop-max:1180px;--overlay-max:1180px}
html,body{width:100%;min-height:100%;overflow-x:hidden}
body{background:var(--bg)}
.app-shell{isolation:isolate}
.topbar{
  background:var(--bg)!important;
  
  box-shadow:0 10px 28px color-mix(in srgb,var(--bg) 84%,transparent);
  padding-bottom:12px!important
}
.overlay{
  background:var(--bg)!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch
}
.overlay-header{
  position:sticky!important;
  top:0;
  z-index:20;
  background:var(--bg)!important;
  
  box-shadow:0 10px 28px color-mix(in srgb,var(--bg) 86%,transparent)
}
.overlay-header h2{font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.overlay-action{visibility:visible!important;opacity:1!important}
.overlay-content{min-height:calc(100dvh - 70px);padding-bottom:calc(24px + var(--safe-bottom))}
.bottom-nav{
  background:var(--glass)!important;
  
  box-shadow:0 -12px 34px color-mix(in srgb,var(--bg) 78%,transparent);
  backdrop-filter:blur(24px)
}
.nav-q span{box-shadow:none!important;outline:0!important;border:0!important}

/* Home and equal cards */
.hero{min-height:258px}
.hero-actions .hero-share{background:rgba(255,255,255,.15)!important}
.stats-grid{align-items:stretch}
.stat-card{height:100%;min-height:90px}
.mode-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:minmax(174px,auto)!important;
  gap:10px!important;
  align-items:stretch
}
.mode-card{
  width:100%;height:100%!important;min-height:174px!important;
  padding:17px!important;border-radius:8px!important;
  display:flex!important;flex-direction:column!important;justify-content:space-between!important;
  gap:18px!important;overflow:hidden;text-align:left
}
.mode-card.mode-wide{
  grid-column:1/-1!important;min-height:154px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) 42px!important;
  align-items:end!important
}
.mode-card.mode-wide .mode-top{grid-column:1/-1}
.mode-card.mode-wide>div:last-of-type{align-self:end;min-width:0;padding-right:0!important}
.mode-card.mode-wide .mode-arrow{align-self:end;justify-self:end}
.mode-card h3{font-size:16px!important;line-height:1.2!important;margin:0 0 7px!important}
.mode-card p{max-width:100%!important;font-size:10px!important;line-height:1.5!important;display:block!important;overflow:visible!important}
.mode-label{max-width:108px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spin-promo{width:100%;border:0;text-align:left}

/* Profile */
.profile-card{overflow:hidden}
.profile-main{min-width:0}.profile-main>div{min-width:0}.profile-main h1{overflow-wrap:anywhere}
.profile-reward-grid{display:grid;gap:9px}
.profile-reward-card{
  width:100%;min-height:72px;padding:12px 14px;border-radius:8px;
  display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;
  background:var(--surface);text-align:left
}
.profile-reward-card>span:first-child{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}
.profile-reward-card>div{min-width:0}.profile-reward-card b{display:block;font-size:11px}.profile-reward-card small{display:block;margin-top:3px;color:var(--muted);font-size:8px;line-height:1.4}
.profile-reward-card>strong{font-size:9px;color:var(--cyan)}
.profile-reward-card.claimed{opacity:.62}.profile-reward-card:disabled{cursor:default}

.knowledge-tech{
  position:relative;padding:18px;border-radius:8px;background:var(--surface);
  display:grid;grid-template-columns:minmax(160px,.72fr) minmax(120px,.45fr);gap:16px;align-items:center;
  overflow:hidden
}
.knowledge-tech:before{content:"";position:absolute;width:210px;height:210px;border-radius:8px;right:-100px;top:-110px;background:rgba(131,199,214,.055);pointer-events:none}
.knowledge-core{position:relative;width:min(46vw,190px);aspect-ratio:1;margin:auto;display:grid;place-items:center}
.knowledge-core>svg{width:100%;height:100%;transform:rotate(-90deg);overflow:visible}
.knowledge-track,.knowledge-orbit-line{fill:none;stroke:var(--soft-strong);stroke-width:13}
.knowledge-orbit-line{stroke-width:1.5;stroke-dasharray:4 7;opacity:.7}
.knowledge-value{fill:none;stroke:var(--cyan);stroke-width:13;stroke-linecap:round;transition:stroke-dasharray .7s ease}
.knowledge-core-copy{position:absolute;display:grid;place-items:center;text-align:center}
.knowledge-core-copy strong{font:800 30px var(--font-display)}
.knowledge-core-copy span{margin-top:3px;color:var(--muted);font-size:8px}
.knowledge-node{position:absolute;width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);color:var(--cyan);box-shadow:0 8px 18px rgba(0,0,0,.12);font-size:12px}
.knowledge-node.node-1{top:5%;left:50%;transform:translateX(-50%)}
.knowledge-node.node-2{right:2%;top:50%;transform:translateY(-50%)}
.knowledge-node.node-3{bottom:5%;left:50%;transform:translateX(-50%)}
.knowledge-node.node-4{left:2%;top:50%;transform:translateY(-50%)}
.knowledge-insight{min-width:0;text-align:left}.knowledge-insight strong{display:block;font:800 28px var(--font-display)}.knowledge-insight span{display:block;margin-top:3px;font-size:10px}.knowledge-insight small{display:block;margin-top:6px;color:var(--muted);font-size:8px}
.knowledge-list{grid-column:1/-1;display:grid;gap:10px;margin-top:2px}
.knowledge-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center}
.knowledge-icon{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}
.knowledge-row>div{min-width:0}.knowledge-row-head{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:9px}.knowledge-row-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.knowledge-row-head span{color:var(--muted)}
.knowledge-progress{height:7px;margin-top:6px;border-radius:8px;background:var(--soft);overflow:hidden}.knowledge-progress i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--deep))!important}
.knowledge-row small{display:block;margin-top:3px;color:var(--muted);font-size:7px}
.knowledge-empty{display:block}

.referral-card{padding:17px;border-radius:8px;background:var(--surface);overflow:hidden}
.referral-card-head{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:center}.referral-icon{width:48px;height:48px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan);font-size:17px}.referral-card h3{font:700 15px var(--font-display)}.referral-card p{margin-top:5px;color:var(--muted);font-size:9px;line-height:1.5}
.referral-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:15px 0}.referral-stats>div{min-width:0;padding:11px 6px;border-radius:8px;background:var(--soft);text-align:center}.referral-stats strong{display:block;font-size:14px}.referral-stats span{display:block;margin-top:3px;color:var(--muted);font-size:7px;overflow-wrap:anywhere}
.referral-link{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px;align-items:center;margin-bottom:9px}.referral-link code{height:42px;padding:0 12px;border-radius:8px;display:flex;align-items:center;background:var(--soft);font:8px var(--font-ui);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.referral-rule{font-size:8px!important}.referral-people{display:grid;gap:7px;margin-top:13px}.referral-person{display:grid;grid-template-columns:36px minmax(0,1fr) 22px;gap:9px;align-items:center;padding:8px;border-radius:8px;background:var(--soft)}.referral-person b{display:block;font-size:9px}.referral-person small{display:block;margin-top:2px;color:var(--muted);font-size:7px}.referral-person>span:last-child{color:var(--muted)}.referral-person>span.active{color:var(--success)}

/* Friends */
.friend-tabs{scroll-snap-type:x proximity}.friend-tabs .tab{scroll-snap-align:start}
.friend-grid{display:grid;gap:9px}
.friend-card{padding:12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:44px minmax(0,1fr);gap:11px;align-items:center}
.friend-card-copy{min-width:0}.friend-card-copy b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-card-copy small{display:block;margin-top:3px;color:var(--muted);font-size:8px}
.friend-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.friend-actions .button{min-height:36px;padding:7px 6px;font-size:8px}

/* Wheel */
.spin-screen{max-width:780px;margin:0 auto}
.spin-head{text-align:center;margin:4px 0 12px}.spin-head h1{font:800 clamp(23px,6vw,31px) var(--font-display)}.spin-head p{margin-top:6px;color:var(--muted);font-size:10px}
.wheel-wrap{padding:8px 0 18px!important;overflow:visible}
.wheel-pointer{width:28px!important;height:20px!important}
.wheel{
  width:min(78vw,380px)!important;
  background:var(--wheel-gradient)!important;
  box-shadow:0 0 0 8px var(--surface),0 16px 42px rgba(0,0,0,.2);
  will-change:transform
}
.wheel:after{inset:37%!important;box-shadow:0 0 0 7px color-mix(in srgb,var(--surface) 45%,transparent)}
.wheel-label{position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px;display:grid;place-items:center;color:#fff;font-size:14px;transform-origin:15px 15px;transform:rotate(calc((var(--i) + .5)*1turn/var(--count))) translateY(calc(min(39vw,190px)*-.70)) rotate(calc((var(--i) + .5)*-1turn/var(--count)));pointer-events:none;text-shadow:0 1px 5px rgba(0,0,0,.35)}
.spin-result{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;margin-top:10px;padding:12px 14px;border-radius:8px;background:var(--surface)}.spin-result>span{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--orange)}.spin-result small{display:block;color:var(--muted);font-size:7px}.spin-result b{display:block;margin-top:3px;font-size:11px}
.spin-prize-section{margin-top:15px}.spin-prize-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.spin-prize{min-height:65px;padding:10px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:36px minmax(0,1fr);gap:9px;align-items:center}.spin-prize>span{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}.spin-prize b{display:block;font-size:9px;line-height:1.3}.spin-prize small{display:block;margin-top:3px;color:var(--muted);font-size:7px}.spin-prize:last-child{}.spin-prize:last-child>span{color:var(--orange)}
#spinButton:disabled{opacity:1;background:var(--surface-2);color:var(--muted);filter:none}

/* Avatars */
.avatar-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;content-visibility:auto;contain-intrinsic-size:780px}
.avatar-option{min-height:0!important;aspect-ratio:.83!important;border-radius:8px!important;background:var(--surface)!important;content-visibility:auto;contain:layout paint style;isolation:isolate}
.avatar-option img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--soft);transition:opacity .2s ease}
.avatar-option.locked{filter:none!important;opacity:1!important}.avatar-option.locked img{filter:grayscale(1);opacity:.43}
.avatar-detail{position:absolute;left:7px;right:7px;bottom:7px;z-index:2;padding:7px 8px;border-radius:8px;background:color-mix(in srgb,var(--surface) 91%,transparent);backdrop-filter:blur(8px);text-align:left}.avatar-detail b{display:block;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar-detail small{display:block;margin-top:2px;color:var(--muted);font-size:6px;line-height:1.3}
.avatar-lock{z-index:3;width:24px!important;height:24px!important;border-radius:8px!important}

/* Compact game */
.game-shell{
  width:min(100%,820px);height:auto!important;min-height:0!important;margin:0 auto;
  display:grid!important;grid-template-rows:auto auto auto auto!important;gap:10px!important;
  padding:2px 0 calc(12px + var(--safe-bottom))!important;overflow:visible!important
}
.game-progress-panel{padding:11px 12px;border-radius:8px;background:var(--surface)}
.game-progress-meta{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;margin-bottom:8px;color:var(--muted);font-size:8px}.game-progress-meta>span:nth-child(2){justify-self:center}.game-progress-meta>span:last-child{justify-self:end}.game-progress-meta b{color:var(--text);font-size:9px}
.question-countdown{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border-radius:8px;background:var(--soft);white-space:nowrap}.question-countdown i{color:var(--orange)}
.compact-player-strip{min-height:48px!important;padding:7px 10px!important}.compact-player-strip .player-scroll{overflow-x:auto;scrollbar-width:none}.compact-player-strip .player-scroll::-webkit-scrollbar{display:none}
.question-card.compact-question{padding:13px!important;border-radius:8px!important;display:grid!important;grid-template-rows:auto auto!important;gap:11px!important;overflow:visible!important}
.compact-question .question-copy{min-height:0!important;padding:6px 5px 8px!important;display:grid!important;place-items:center!important;align-content:center!important}
.compact-question .question-copy .pill{margin-bottom:9px!important}.compact-question .question-copy h2{font-size:clamp(18px,5.4vw,27px)!important;line-height:1.24!important;max-width:680px;margin:0 auto}
.answers{gap:8px!important}.answer{min-height:62px!important;padding:10px 11px!important;border-radius:8px!important}.answer-code{width:31px!important;height:31px!important}
.boosters-row{gap:7px!important;padding:0!important}.booster{min-height:60px!important}
.booster.active{color:var(--text)}
.result-hero{max-width:820px;margin:0 auto}.result-actions{max-width:820px;margin-left:auto;margin-right:auto}

/* Better notices */
.toast{left:50%!important;top:calc(var(--safe-top) + 70px)!important;width:min(calc(100% - 28px),520px)!important;z-index:1600!important}
.toast:not(.error){background:var(--blue)!important;color:#fff!important}.toast:not(.error) i{color:var(--cream)!important}

/* Desktop / Telegram fullsize */
@media(min-width:800px){
  body{padding:0!important}
  .app-shell{width:min(100%,var(--desktop-max))!important;max-width:var(--desktop-max)!important;min-height:100dvh!important;margin:0 auto!important;border-radius:8px!important;overflow:visible!important}
  .topbar,.view{padding-left:24px!important;padding-right:24px!important}
  .view{padding-bottom:32px!important}
  .bottom-nav{width:min(100%,var(--desktop-max))!important;bottom:0!important;border-radius:8px!important;padding-left:20px!important;padding-right:20px!important}
  .overlay{inset:0 auto 0 50%!important;transform:translateX(-50%)!important;width:min(100%,var(--overlay-max))!important;max-width:var(--overlay-max)!important;border-radius:8px!important}
  .overlay-header,.overlay-content{padding-left:24px!important;padding-right:24px!important}
  .mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mode-card.mode-wide{grid-column:span 2!important}
  .quiz-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .knowledge-tech{grid-template-columns:230px minmax(160px,.5fr) minmax(300px,1.5fr)}.knowledge-list{grid-column:3;grid-row:1/3}.knowledge-core{width:210px}.knowledge-insight{align-self:center}
  .profile-reward-grid{grid-template-columns:repeat(3,1fr)}
  .spin-prize-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .friend-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .avatar-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}

@media(max-width:520px){
  .knowledge-tech{grid-template-columns:minmax(135px,.8fr) minmax(90px,.55fr);padding:14px;gap:10px}.knowledge-core{width:min(43vw,170px)}.knowledge-list{gap:9px}.knowledge-insight strong{font-size:23px}
  .spin-prize-grid{grid-template-columns:1fr 1fr}.wheel-label{transform:rotate(calc((var(--i) + .5)*1turn/var(--count))) translateY(calc(min(39vw,190px)*-.66)) rotate(calc((var(--i) + .5)*-1turn/var(--count)))}
}
@media(max-width:390px){
  .mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mode-card{min-height:160px!important;padding:14px!important}.mode-card.mode-wide{min-height:145px!important}
  .profile-actions{grid-template-columns:repeat(4,1fr)}
  .knowledge-tech{grid-template-columns:1fr}.knowledge-core{width:164px}.knowledge-insight{text-align:center}.knowledge-list{grid-column:1}
  .spin-prize-grid{grid-template-columns:1fr}
  .avatar-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .game-progress-meta{grid-template-columns:1fr 1fr}.game-progress-meta>span:nth-child(2){grid-column:1/-1;grid-row:1;justify-self:center}.game-progress-meta>span:first-child{grid-row:2}.game-progress-meta>span:last-child{grid-row:2}
  .answers{grid-template-columns:1fr!important}.answer{min-height:54px!important}
}
.friend-actions-single{grid-template-columns:1fr}.friend-actions-single .button{width:100%}


/* QuizTop 1.3.1 */
.svg-sprite{position:absolute!important;width:0!important;height:0!important;overflow:hidden!important}
.svg-icon{width:1.15em;height:1.15em;display:inline-block;vertical-align:-.18em;fill:currentColor;flex:0 0 auto}
.icon-spin{animation:svg-spin .8s linear infinite}@keyframes svg-spin{to{transform:rotate(360deg)}}
.topbar{padding-top:calc(var(--app-top-inset,0px) + 14px)!important;background:var(--bg)!important;}
.overlay-header{grid-template-columns:minmax(0,1fr) 44px!important;padding-top:calc(var(--app-top-inset,0px) + 14px)!important;background:var(--bg)!important;}
.overlay-header h2{text-align:center!important;padding-left:44px}
.overlay-action{grid-column:2}
.coin-button .svg-icon{color:var(--orange)}
.quiz-create-button.plus-locked{color:var(--muted)}.quiz-create-button.plus-active{color:var(--cyan)}
.leader-row.player-open,.podium-card{width:100%;color:inherit;text-align:left;border:0;cursor:pointer}.leader-row.player-open:active,.podium-card:active{transform:scale(.992)}
.public-profile{display:grid;gap:16px}.public-profile-head{display:grid;grid-template-columns:78px minmax(0,1fr);gap:15px;align-items:center;padding:18px;border-radius:8px;background:var(--surface)}.public-profile-head h2{font:700 19px var(--font-display)}.public-profile-head p{margin:5px 0 9px;color:var(--muted)}.player-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.plus-card{padding:24px;border-radius:8px;text-align:center;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff}.plus-card>span{width:72px;height:72px;margin:0 auto 14px;border-radius:8px;display:grid;place-items:center;background:var(--cream);color:var(--orange);font-size:30px}.plus-card h2{font:700 23px var(--font-display)}.plus-card p{margin:10px auto;color:rgba(255,255,255,.75);max-width:360px}.plus-card ul{display:grid;gap:8px;margin:18px 0;padding:0;list-style:none}.plus-card li{padding:9px 12px;border-radius:8px;background:rgba(255,255,255,.1)}.plus-card-active>span{color:var(--success)}
.quiz-builder{gap:12px}.builder-intro{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:center;padding:15px;border-radius:8px;background:var(--surface)}.builder-intro>span{width:48px;height:48px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan);font-size:20px}.builder-intro h3,.builder-step h3{font:700 13px var(--font-display)}.builder-intro p{margin-top:4px;color:var(--muted);font-size:9px}
.builder-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:15px;border-radius:8px;background:var(--surface)}.step-number{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:var(--deep);color:#fff;font-weight:800}.step-content{display:grid;gap:10px}.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.choice-card input{position:absolute;opacity:0}.choice-card>span{min-height:72px;padding:12px;border-radius:8px;display:grid;place-items:center;gap:6px;background:var(--soft);color:var(--muted)}.choice-card input:checked+span{background:var(--blue);color:#fff}.builder-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.builder-controls label{display:grid;gap:5px}.builder-controls label>span{font-size:8px;color:var(--muted)}.category-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.category-check input{position:absolute;opacity:0}.category-check>span{min-height:49px;padding:9px;border-radius:8px;background:var(--soft);display:flex;align-items:center;gap:8px;font-size:9px}.category-check input:checked+span{background:rgba(23,99,128,.18);color:var(--text)}.creation-cost{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border-radius:8px;background:var(--cream);color:#23343e}.creation-cost b{display:flex;align-items:center;gap:6px}.form-note{text-align:center;color:var(--muted);font-size:9px}.error-note{color:var(--danger)}
.wheel-wrap{position:relative}.wheel-svg{width:min(82vw,400px);height:auto;display:block;filter:drop-shadow(0 16px 28px rgba(0,0,0,.18));transform-origin:50% 50%;will-change:transform;transition:transform 4s cubic-bezier(.12,.82,.12,1)}.wheel-pointer{position:relative;z-index:3;margin-bottom:-12px}.wheel{display:none!important}
.game-shell{gap:8px!important}.compact-player-strip{margin:0!important}.question-card.compact-question{padding:14px!important}.compact-question .question-copy{padding:4px 5px 10px!important}.compact-question .question-copy h2{font-size:clamp(18px,5vw,25px)!important}.game-progress-panel{position:sticky;top:0;z-index:2}.answers{grid-template-columns:repeat(2,minmax(0,1fr))}.answer{min-height:58px!important}
.avatar-option.selected:after{content:"✓"!important;font-family:var(--font-ui)!important}
@media(max-width:520px){.topbar,.overlay-header{padding-top:calc(var(--app-top-inset,0px) + 18px)!important}.builder-controls,.category-check-grid{grid-template-columns:1fr}.player-profile-actions{grid-template-columns:1fr}.wheel-svg{width:min(88vw,390px)}}
@media(min-width:800px){.topbar,.overlay-header{padding-top:14px!important}.overlay-header{grid-template-columns:minmax(0,1fr) 44px!important}.game-shell{max-width:820px}.wheel-svg{width:390px}}


/* QuizTop 1.3.2 — stable SVG icons, native Telegram navigation and responsive polish */
:root{--mobile-native-top:0px}
.svg-sprite{display:none!important}
.svg-icon{width:20px!important;height:20px!important;display:block!important;overflow:visible!important;fill:currentColor;stroke:none;--icon-cut:var(--surface)}
.button .svg-icon,.text-button .svg-icon{width:18px!important;height:18px!important}
.mode-icon .svg-icon,.list-icon .svg-icon,.setting-icon .svg-icon,.profile-action .svg-icon,.knowledge-icon .svg-icon{width:24px!important;height:24px!important}
.bottom-nav .svg-icon{width:23px!important;height:23px!important}
html[data-theme="dark"] .svg-icon{--icon-cut:#151d29}html[data-theme="light"] .svg-icon{--icon-cut:#fffdf7}
.mode-blue .svg-icon,.mode-orange .svg-icon,.button-primary .svg-icon,.card-blue .svg-icon,.hero .svg-icon{--icon-cut:#fff}
.button-cream .svg-icon{--icon-cut:#fef4d6}

/* Never depend on an icon font for checkmarks. */
.consent-row input,.check input{position:relative;appearance:none;-webkit-appearance:none}
.consent-row input:checked::after,.check input:checked::after{content:""!important;position:absolute!important;inset:3px!important;width:auto!important;height:auto!important;border:0!important;transform:none!important;background:center/14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%23173443' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}
.welcome-sheet .consent-row input:checked::after{color:#173443!important}

/* Telegram provides the only Back button. */
.overlay-header{grid-template-columns:1fr!important;min-height:64px!important;padding-left:18px!important;padding-right:18px!important}
.overlay-header h2{padding:0!important;text-align:center!important;grid-column:1!important;max-width:100%!important}
.overlay-action,[data-overlay-close]{display:none!important}

/* Keep all content below Telegram native controls on phones. */
.telegram-mobile .topbar,.telegram-mobile .overlay-header{padding-top:calc(var(--app-top-inset,64px) + 10px)!important}
.topbar{background:var(--bg)!important;box-shadow:0 1px 0 var(--line)!important}
.overlay-header{background:var(--bg)!important;box-shadow:0 1px 0 var(--line)!important}
@media(min-width:800px){.telegram-mobile .topbar,.telegram-mobile .overlay-header,.topbar,.overlay-header{padding-top:14px!important}}

/* Profile rebuild: consistent grid, no overlaps, clear hierarchy. */
.profile-card{padding:18px!important;border-radius:8px!important;background:var(--surface)!important;overflow:hidden!important}
.profile-main{display:grid!important;grid-template-columns:78px minmax(0,1fr)!important;align-items:center!important;gap:14px!important}
.profile-main>div{min-width:0}.profile-main h1{font-size:clamp(18px,5vw,24px)!important;white-space:normal!important;overflow-wrap:anywhere!important}.profile-main p{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.profile-progress{margin-top:16px!important}.profile-actions{margin-top:10px!important;gap:8px!important}.profile-action{min-height:78px!important;padding:10px 6px!important;border-radius:8px!important;display:grid!important;place-items:center!important;align-content:center!important;gap:7px!important;background:var(--surface)!important;color:var(--muted)!important}.profile-action span{font-size:9px!important}.profile-action .svg-icon{color:var(--cyan)!important}
.profile-reward-grid{gap:9px!important}.profile-reward-card{min-height:76px!important;border-radius:8px!important;padding:13px!important;grid-template-columns:46px minmax(0,1fr) auto!important}.profile-reward-card>span:first-child{width:46px!important;height:46px!important;border-radius:8px!important;display:grid!important;place-items:center!important;background:var(--soft)!important;color:var(--cyan)!important}
.knowledge-tech{overflow:hidden!important;border-radius:8px!important;padding:18px!important;background:var(--surface)!important;isolation:isolate!important}.knowledge-tech:before{z-index:-1!important}.knowledge-core{max-width:178px!important}.knowledge-node{width:38px!important;height:38px!important;border-radius:8px!important}.knowledge-node .svg-icon{width:19px!important;height:19px!important}.knowledge-list{min-width:0!important}.knowledge-row{min-width:0!important}.knowledge-row-head b{max-width:70%!important}.knowledge-progress{height:7px!important}

/* Game screen: no question/avatar artwork, no duplicated controls, compact layout. */
.game-shell{max-width:760px!important;margin:0 auto!important;gap:10px!important;padding-bottom:18px!important}
.game-shell .question-card img,.game-shell .question-card .avatar,.game-shell .question-media,.game-shell .question-image,.game-shell [data-question-image],[data-no-question-media]>.question-media{display:none!important}
.game-progress-panel{position:relative!important;top:auto!important;border-radius:8px!important;padding:12px 14px!important;background:var(--surface)!important}
.compact-player-strip{max-height:58px!important;overflow:hidden!important}
.question-card.compact-question{min-height:0!important;padding:14px!important;border-radius:8px!important;background:var(--surface)!important;overflow:hidden!important}
.compact-question .question-copy{min-height:0!important;padding:8px 6px 14px!important}.compact-question .question-copy h2{font-size:clamp(19px,5vw,28px)!important;line-height:1.18!important;max-width:650px!important}
.answers{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.answer{min-height:66px!important;padding:12px!important;border-radius:8px!important;gap:10px!important}.answer>span:last-child{font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere!important}.answer-code{flex:0 0 34px!important;width:34px!important;height:34px!important}
.boosters-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}.booster{min-width:0!important;min-height:68px!important;border-radius:8px!important}.booster span{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
@media(max-width:430px){.answers{grid-template-columns:1fr!important}.answer{min-height:56px!important}.profile-main{grid-template-columns:68px minmax(0,1fr)!important}.profile-main .avatar-78{width:68px!important;height:68px!important}.profile-actions{grid-template-columns:repeat(2,1fr)!important}.profile-action{min-height:68px!important}.knowledge-tech{grid-template-columns:1fr!important}.knowledge-core{max-width:155px!important}.knowledge-insight{text-align:center!important}.boosters-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}.booster{padding:7px 3px!important}}

/* Welcome controls */
.welcome-consent input{flex:0 0 24px!important;width:24px!important;height:24px!important;border-radius:8px!important}.consent-copy{min-width:0!important;align-items:center!important}

/* Notifications stay visible but never cover native Telegram controls. */
.toast{top:calc(var(--app-top-inset,64px) + 74px)!important;bottom:auto!important;min-height:58px!important;padding:14px 16px!important;border-radius:8px!important;font-size:11px!important;box-shadow:0 15px 35px rgba(0,0,0,.22)!important}
@media(min-width:800px){.toast{top:78px!important}}

/* QuizTop 1.3.2 final visual pass */
.toast-symbol{width:24px;height:24px;display:grid;place-items:center;flex:0 0 24px}.toast-symbol .svg-icon{width:22px!important;height:22px!important}.price{display:inline-flex;align-items:center;gap:5px}.price .svg-icon{width:16px!important;height:16px!important;color:var(--orange)}
.telegram-mobile .topbar,.telegram-mobile .overlay-header{padding-top:calc(var(--app-top-inset,78px) + 8px)!important}.topbar{min-height:calc(64px + var(--app-top-inset,0px));align-items:flex-end!important}.overlay-header{min-height:calc(58px + var(--app-top-inset,0px))!important;align-items:flex-end!important;padding-bottom:14px!important}
.profile-action .svg-icon{width:27px!important;height:27px!important}.bottom-nav .svg-icon{width:25px!important;height:25px!important}.mode-icon .svg-icon,.list-icon .svg-icon,.setting-icon .svg-icon{width:26px!important;height:26px!important}.icon-button .svg-icon{width:22px!important;height:22px!important}
.profile-card{background:linear-gradient(145deg,rgba(131,199,214,.13),rgba(12,83,110,.06)),var(--surface)!important}.profile-main .avatar{align-self:start}.profile-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.profile-progress-head{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:9px;margin-bottom:7px}.profile-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}.profile-action{}
.knowledge-core .knowledge-node .svg-icon{width:20px!important;height:20px!important;transform:none!important}.knowledge-core .knowledge-node{overflow:hidden!important}.knowledge-tech{grid-template-columns:minmax(150px,.8fr) minmax(90px,.5fr)!important}.knowledge-list{grid-column:1/-1!important}.knowledge-insight{align-self:center!important}.knowledge-row .svg-icon{width:21px!important;height:21px!important}
.question-card.compact-question{max-width:760px!important}.game-shell .player-strip{display:none!important}.question-copy .pill .svg-icon{width:17px!important;height:17px!important}.game-progress-meta{gap:8px!important}.question-countdown{white-space:nowrap!important}.answer.locked{pointer-events:none}.answer.correct{background:rgba(88,185,139,.16)!important;}.answer.wrong{background:rgba(231,104,104,.14)!important;}
@media(max-width:520px){.telegram-mobile .topbar,.telegram-mobile .overlay-header{padding-top:calc(var(--app-top-inset,78px) + 8px)!important}.profile-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.knowledge-tech{grid-template-columns:1fr!important}.knowledge-core{width:160px!important}.knowledge-insight{text-align:center!important}.game-progress-meta{grid-template-columns:1fr auto 1fr!important}.game-progress-meta>span:last-child{text-align:right}.boosters-row{position:sticky;bottom:calc(var(--safe-bottom) + 6px);z-index:4;padding:7px;border-radius:8px;background:var(--glass);backdrop-filter:blur(12px)}}
@media(min-width:800px){.telegram-mobile .topbar,.telegram-mobile .overlay-header,.topbar,.overlay-header{padding-top:14px!important;min-height:64px!important}.app-shell{width:min(100%,1180px)!important}.view{padding-left:24px!important;padding-right:24px!important}.profile-actions{grid-template-columns:repeat(4,1fr)!important}.knowledge-tech{grid-template-columns:220px 150px minmax(0,1fr)!important}.knowledge-list{grid-column:3!important;grid-row:1/3!important}}
\n\n/* Coin shop */\n.shop-screen{display:grid;gap:16px;max-width:760px;margin:0 auto;padding-bottom:24px}\n.shop-balance-card{min-height:156px;padding:24px;border-radius:8px;display:flex;align-items:center;justify-content:space-between;overflow:hidden;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff;position:relative}\n.shop-balance-card:after{content:"";position:absolute;width:190px;height:190px;border-radius:8px;right:-62px;top:-78px;background:rgba(131,199,214,.16)}\n.shop-balance-card>div{display:grid;position:relative;z-index:1}.shop-balance-card small{font-size:10px;color:rgba(255,255,255,.7)}.shop-balance-card strong{font:800 clamp(42px,12vw,68px) var(--font-display);line-height:1;margin-top:10px}.shop-balance-card>div>span{margin-top:7px;color:rgba(255,255,255,.75);font-size:10px}\n.shop-balance-icon{width:76px;height:76px;border-radius:8px;display:grid;place-items:center;background:rgba(255,255,255,.13);position:relative;z-index:1}.shop-balance-icon .svg-icon{width:38px!important;height:38px!important;color:var(--cream)}\n.shop-heading h3,.shop-history h3{font:700 15px var(--font-display)}\n.shop-offers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}\n.shop-offer{min-height:220px;padding:16px;border-radius:8px;background:var(--surface);display:grid;align-content:space-between;gap:10px;overflow:hidden;position:relative}\n.shop-offer.featured{}\n.shop-offer-top{display:flex;align-items:center;justify-content:space-between;min-height:40px}.shop-offer-icon{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--soft);color:var(--cyan)}.shop-offer-icon .svg-icon{width:24px!important;height:24px!important}\n.shop-badge{padding:6px 8px;border-radius:8px;background:var(--soft);color:var(--muted);font-size:7px;font-weight:800;text-transform:uppercase;letter-spacing:.35px}.shop-badge.featured{background:var(--orange);color:#fff}\n.shop-offer-amount{display:flex;align-items:flex-end;gap:6px}.shop-offer-amount strong{font:800 clamp(27px,8vw,42px) var(--font-display);line-height:1}.shop-offer-amount span{color:var(--muted);font-size:9px;padding-bottom:4px}\n.shop-offer-bonus{min-height:17px;color:var(--success);font-size:9px;font-weight:700}.shop-offer-bonus.muted{color:transparent}\n.shop-offer .button .svg-icon{color:#f5c75b;fill:currentColor}\n.shop-history{display:grid;gap:10px}.shop-history-list{display:grid;gap:8px}.shop-history-item{min-height:64px;padding:11px 13px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:center}.shop-history-item>span{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:rgba(88,185,139,.12);color:var(--success)}.shop-history-item b,.shop-history-item small{display:block}.shop-history-item b{font-size:10px}.shop-history-item small{margin-top:3px;color:var(--muted);font-size:8px}.shop-history-item>strong{font-size:9px;color:var(--muted)}\n.shop-history-empty{min-height:88px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;gap:7px;color:var(--muted);font-size:9px}.shop-history-empty .svg-icon{width:24px!important;height:24px!important}\n@media(max-width:370px){.shop-offers{grid-template-columns:1fr}.shop-offer{min-height:190px}}\n@media(min-width:800px){.shop-offers{grid-template-columns:repeat(4,minmax(0,1fr))}.shop-offer{min-height:230px}}\n
/* Friends center 1.4 */
.friend-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.friend-summary>div{min-height:78px;padding:13px 8px;border-radius:8px;background:var(--surface);display:grid;place-items:center;align-content:center;text-align:center}.friend-summary strong{font:800 20px var(--font-display)}.friend-summary span{margin-top:4px;color:var(--muted);font-size:8px}.friend-tabs{display:flex;gap:7px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.friend-tabs::-webkit-scrollbar{display:none}.friend-tabs .tab{flex:0 0 auto;white-space:nowrap}.friend-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.friend-tools label{display:grid;gap:6px}.friend-tools label>span{padding-left:3px;color:var(--muted);font-size:8px;font-weight:700}.friend-grid,.friend-search-grid{display:grid;gap:9px}.friend-card{position:relative;min-height:82px;padding:12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:11px;align-items:center;text-align:left}.friend-card.favorite{background:linear-gradient(135deg,color-mix(in srgb,var(--cream) 38%,var(--surface)),var(--surface))}.friend-card[data-player-profile]{cursor:pointer}.friend-avatar-wrap{position:relative}.online-dot{position:absolute;right:-1px;bottom:2px;width:11px;height:11px;border-radius:8px;background:#44c983}.friend-card-copy{min-width:0;display:grid;gap:3px}.friend-card-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.friend-card-copy small{color:var(--muted);font-size:8px}.friend-card-copy span{color:var(--muted);font-size:8px}.friend-card-copy em{color:var(--orange);font-style:normal;font-weight:800}.friend-name-line{display:flex;align-items:center;gap:6px;min-width:0}.friend-star{width:13px!important;height:13px!important;color:var(--orange);flex:0 0 auto}.friend-actions{display:flex;gap:5px}.friend-actions .icon-button{width:38px;height:38px;border-radius:8px}.suggestion-card,.search-card{grid-template-columns:auto minmax(0,1fr) auto}.suggestion-card .button,.search-card .button{min-width:94px}.request-sections{display:grid;gap:18px}.request-sections section{display:grid;gap:9px}.request-sections h3{margin:0;font:750 12px var(--font-display)}.request-item{cursor:pointer}.friend-search{margin:12px 0}.friend-search-results{margin-top:10px}.chat-profile{position:sticky;top:0;z-index:2;min-height:64px;padding:9px 10px;margin:-4px -2px 10px;border-radius:8px;background:var(--surface-2);display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.chat-profile b{display:block;font-size:11px}.chat-profile small{color:var(--muted);font-size:8px}.chat-messages{min-height:220px;max-height:min(55dvh,520px);overflow:auto;overscroll-behavior:contain;padding:10px;border-radius:8px;background:color-mix(in srgb,var(--soft) 42%,transparent);display:flex;flex-direction:column;gap:7px}.chat-message{max-width:82%;padding:10px 12px;border-radius:8px;background:var(--surface);align-self:flex-start}.chat-message.mine{align-self:flex-end;border-radius:8px;background:var(--blue);color:#fff}.chat-message span{display:block;white-space:pre-wrap;word-break:break-word;font-size:10px;line-height:1.45}.chat-message small{display:block;margin-top:4px;opacity:.65;font-size:7px;text-align:right}.quick-message-row{display:flex;gap:6px;overflow-x:auto;margin:9px 0;padding-bottom:2px;scrollbar-width:none}.quick-message-row::-webkit-scrollbar{display:none}.quick-message-row button{flex:0 0 auto;min-height:34px;padding:0 11px;border:0;border-radius:8px;background:var(--soft);color:var(--text);font:700 8px var(--font-body)}.chat-composer{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center}.chat-composer .input{min-height:48px}.profile-actions-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.friend-nickname-form{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;gap:7px}.friend-nickname-form .input{min-width:0}.player-shared-stat{margin:12px 0;padding:12px;border-radius:8px;background:var(--soft);display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center}.player-shared-stat .svg-icon{color:var(--cyan)}
@media(max-width:390px){.friend-summary>div{min-height:70px}.friend-tools{grid-template-columns:1fr}.friend-card{grid-template-columns:auto minmax(0,1fr);padding:11px}.friend-actions{grid-column:1/-1;justify-content:flex-end}.suggestion-card,.search-card{grid-template-columns:auto minmax(0,1fr)}.suggestion-card .button,.search-card .button{grid-column:1/-1;width:100%}.profile-actions-grid{grid-template-columns:1fr}.friend-nickname-form{grid-template-columns:1fr}.chat-messages{max-height:48dvh}}


/* QuizTop unified interface rebuild — friends, chat, shop, home, profile, battles */
:root{--panel:var(--surface);--panel-raised:var(--surface-2);--panel-muted:var(--soft);--wheel-divider:rgba(255,255,255,.72)}
html[data-theme="light"]{--panel:#fffdf8;--panel-raised:#fff;--panel-muted:#edf1ed;--wheel-divider:#fffdf8}
html[data-theme="dark"]{--panel:#151e2d;--panel-raised:#1a2434;--panel-muted:#202b3c;--wheel-divider:#111a28}
.section-head>div>p,.page-heading p{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.45}
.hero-rebuilt{min-height:310px;padding:25px;border-radius:8px}.hero-kickers{display:flex;flex-wrap:wrap;gap:7px}.hero-live-dot{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.1);font-size:8px;font-weight:800}.hero-live-dot .svg-icon{width:7px!important;height:7px!important;color:#56d497}.hero-season{margin-top:18px;max-width:300px;display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center}.hero-season span,.hero-season b{font-size:9px}.hero-season .progress{grid-column:1/-1;background:rgba(255,255,255,.13)}
.home-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0}.home-metrics article{min-height:86px;padding:14px;border-radius:8px;background:var(--panel);display:flex;align-items:center;gap:10px}.home-metrics article>span{width:36px;height:36px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.home-metrics strong,.home-metrics small{display:block}.home-metrics strong{font:800 18px var(--font-display)}.home-metrics small{margin-top:4px;color:var(--muted);font-size:8px}
.quick-battle-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.quick-battle-card{min-height:92px;padding:13px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;text-align:left}.quick-battle-card>span{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--panel-muted);color:var(--cyan)}.quick-battle-card b,.quick-battle-card small{display:block}.quick-battle-card b{font-size:11px}.quick-battle-card small{margin-top:4px;color:var(--muted);font-size:8px}.quick-battle-card em{font-style:normal;color:var(--orange);font-size:8px;font-weight:800}.quick-battle-card.duel{background:var(--orange);color:#fff}.quick-battle-card.duel>span{background:rgba(255,255,255,.16);color:#fff}.quick-battle-card.duel small,.quick-battle-card.duel em{color:rgba(255,255,255,.78)}.quick-battle-card.friends{grid-column:1/-1}
.mode-grid-rebuilt .mode-card{border-radius:8px;}.home-bottom-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.home-feature-card{min-height:88px;padding:13px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;text-align:left}.home-feature-card>span{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--panel-muted);color:var(--cyan)}.home-feature-card b,.home-feature-card small{display:block}.home-feature-card small{margin-top:4px;color:var(--muted);font-size:8px}.room-carousel .live-card,.tournament-carousel .live-card{min-width:268px}
.profile-hero-card{padding:20px;border-radius:8px;background:linear-gradient(145deg,color-mix(in srgb,var(--cyan) 12%,var(--panel)),var(--panel));}.profile-identity{display:grid;grid-template-columns:88px minmax(0,1fr);gap:16px;align-items:center}.profile-identity h1{margin:5px 0 4px;font:800 clamp(20px,6vw,27px) var(--font-display);letter-spacing:-.7px}.profile-identity p{color:var(--muted);font-size:9px}.profile-online-label{display:inline-flex;align-items:center;gap:5px;color:var(--cyan);font-size:7px;font-weight:800;text-transform:uppercase}.profile-online-label .svg-icon{width:7px!important;height:7px!important}.profile-level-block,.profile-league-block{margin-top:16px}.profile-level-block>div:first-child,.profile-league-block>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:7px;color:var(--muted);font-size:9px}.profile-level-block b,.profile-league-block b{color:var(--text)}.rating-progress i{background:var(--orange)!important}.profile-primary-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.profile-primary-actions button{min-height:95px;padding:11px 7px;border-radius:8px;background:var(--panel);display:grid;place-items:center;align-content:center;text-align:center}.profile-primary-actions button>span{width:38px;height:38px;border-radius:8px;display:grid;place-items:center;background:var(--panel-muted);color:var(--cyan)}.profile-primary-actions b{margin-top:7px;font-size:9px}.profile-primary-actions small{margin-top:3px;color:var(--muted);font-size:7px}.profile-battle-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.profile-battle-stats article{min-height:102px;padding:12px 6px;border-radius:8px;background:var(--panel);display:grid;place-items:center;align-content:center;text-align:center}.profile-battle-stats article>span{color:var(--cyan)}.profile-battle-stats strong{margin-top:7px;font:800 20px var(--font-display)}.profile-battle-stats small{margin-top:4px;color:var(--muted);font-size:8px}.profile-hub{margin-top:18px}.profile-hub-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.profile-hub-card{min-height:82px;padding:12px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;text-align:left}.profile-hub-card>span{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;background:var(--panel-muted);color:var(--cyan)}.profile-hub-card b,.profile-hub-card small{display:block}.profile-hub-card small{margin-top:4px;color:var(--muted);font-size:8px}.profile-hub-card em{font-style:normal;color:var(--cyan);font-size:8px;font-weight:800}.profile-hub-card.claimed{opacity:.6}.knowledge-dashboard{padding:18px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:210px 1fr;gap:14px;align-items:center}.knowledge-radar svg{width:100%;overflow:visible}.radar-track{fill:none;stroke:var(--panel-muted);stroke-width:18}.radar-dash{fill:none;stroke:var(--cyan);stroke-width:7;stroke-dasharray:10 8}.radar-core{fill:var(--panel-raised);stroke:var(--line)}.knowledge-radar text{fill:var(--text);font:800 30px var(--font-display)}.knowledge-radar .radar-label{font:600 9px var(--font-body);fill:var(--muted)}.radar-node{fill:var(--panel-raised);stroke:var(--cyan);stroke-width:2}.radar-node-text{font:800 9px var(--font-body)!important;fill:var(--cyan)!important}.knowledge-summary-copy strong,.knowledge-summary-copy span,.knowledge-summary-copy small{display:block}.knowledge-summary-copy strong{font:800 38px var(--font-display)}.knowledge-summary-copy span{margin-top:3px}.knowledge-summary-copy small{margin-top:5px;color:var(--muted);font-size:9px}.knowledge-topic-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.knowledge-topic-grid article{min-height:70px;padding:10px;border-radius:8px;background:var(--panel-muted);display:grid;grid-template-columns:38px 1fr auto;gap:9px;align-items:center}.knowledge-topic-icon{width:38px;height:38px;border-radius:8px;background:var(--panel-raised);display:grid;place-items:center;color:var(--cyan)}.knowledge-topic-grid b,.knowledge-topic-grid small{display:block}.knowledge-topic-grid b{font-size:9px}.knowledge-topic-grid small{margin-top:3px;color:var(--muted);font-size:7px}.knowledge-topic-grid>article>strong{font-size:9px}.knowledge-progress{height:5px;margin-top:6px;border-radius:8px;background:var(--panel-raised);overflow:hidden}.knowledge-progress i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--blue))}
.friends-screen{display:grid;gap:14px;max-width:760px;margin:0 auto}.friends-hero{min-height:100px;padding:17px;border-radius:8px;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff;display:flex;align-items:center;justify-content:space-between}.friends-hero>div{display:flex;align-items:center;gap:12px}.friends-hero>div>span{width:50px;height:50px;border-radius:8px;background:rgba(255,255,255,.13);display:grid;place-items:center}.friends-hero h2{font:800 18px var(--font-display)}.friends-hero p{margin-top:4px;color:rgba(255,255,255,.68);font-size:9px}.friends-hero .icon-button{background:rgba(255,255,255,.13);color:#fff}.friend-summary{grid-template-columns:repeat(4,1fr)!important}.friend-summary article{min-height:90px;padding:12px 5px;border-radius:8px;background:var(--panel);display:grid;place-items:center;align-content:center;text-align:center}.friend-summary article>span{color:var(--cyan)}.friend-summary strong{margin-top:5px}.friend-summary small{margin-top:3px;color:var(--muted);font-size:7px}.friend-tabs{padding:4px;border-radius:8px;background:var(--panel-muted)}.friend-tabs .tab{min-height:42px;border-radius:8px;background:transparent}.friend-tabs .tab.active{background:var(--panel-raised);box-shadow:0 5px 18px rgba(8,20,32,.08)}.friend-tabs .tab i{margin-left:4px;padding:2px 5px;border-radius:8px;background:var(--orange);color:#fff;font-style:normal}.friend-panel{min-height:260px}.friend-controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:10px}.friend-controls label{display:grid;gap:6px}.friend-controls label>span{color:var(--muted);font-size:8px}.friend-grid-v2{display:grid;gap:9px}.friend-card-v2{min-height:98px;padding:13px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:12px;align-items:center}.friend-card-v2.favorite{}.friend-card-avatar{position:relative}.friend-card-avatar>i{position:absolute;right:0;bottom:2px;width:13px;height:13px;border-radius:8px;background:#4fd08b}.friend-card-title{display:flex;align-items:center;gap:5px}.friend-card-title b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-card-title .svg-icon{width:13px!important;height:13px!important;color:var(--orange)}.friend-card-main p{margin-top:4px;color:var(--muted);font-size:8px}.friend-card-stats{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.friend-card-stats span,.friend-card-stats strong{padding:4px 6px;border-radius:8px;background:var(--panel-muted);font-size:7px}.friend-card-stats strong{color:var(--orange)}.friend-card-actions{display:flex;gap:5px}.friend-card-actions button{width:38px;height:38px;border-radius:8px;background:var(--panel-muted);color:var(--text);display:grid;place-items:center}.friend-card-actions button.accent{background:var(--orange);color:#fff}.friend-suggestion-card,.friend-request-card,.friend-block-card{min-height:82px;padding:12px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:52px 1fr auto;gap:11px;align-items:center}.friend-suggestion-card b,.friend-request-card b,.friend-block-card b{font-size:11px}.friend-suggestion-card p,.friend-request-card p,.friend-block-card p,.friend-suggestion-card small{margin-top:3px;color:var(--muted);font-size:8px}.friend-request-card>div:last-child{display:flex;gap:5px}.friend-request-card>div:last-child button{width:38px;height:38px;border-radius:8px;display:grid;place-items:center}.friend-request-card .accept{background:var(--success);color:#fff}.friend-request-card .decline{background:var(--danger);color:#fff}.friend-request-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.friend-request-columns section{display:grid;align-content:start;gap:8px}.friend-section-title{display:flex;justify-content:space-between;align-items:center}.friend-section-title h3{font:700 12px var(--font-display)}.friend-section-title span{padding:4px 7px;border-radius:8px;background:var(--panel-muted);font-size:8px}.friend-search-section>p{margin:7px 2px 12px;color:var(--muted);font-size:8px}
.chat-screen{height:min(740px,calc(100dvh - var(--app-top-inset,0px) - 100px));display:grid;grid-template-rows:auto auto 1fr auto auto;gap:8px}.chat-profile-v2{min-height:68px;padding:9px 10px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center}.chat-profile-v2 b{font-size:12px}.chat-profile-v2 small{display:block;margin-top:4px;color:var(--muted);font-size:8px}.chat-profile-v2>div:last-child{display:flex;gap:5px}.chat-day-label{text-align:center;color:var(--muted);font-size:8px}.chat-messages-v2{overflow-y:auto;overscroll-behavior:contain;padding:12px;border-radius:8px;background:var(--panel-muted);display:flex;flex-direction:column;gap:8px}.chat-bubble{max-width:82%;padding:11px 13px;border-radius:8px;background:var(--panel-raised);box-shadow:0 4px 14px rgba(8,20,32,.05);align-self:flex-start}.chat-bubble.mine{align-self:flex-end;border-radius:8px;background:var(--blue);color:#fff}.chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.48}.chat-bubble time{display:block;margin-top:5px;text-align:right;color:var(--muted);font-size:9px}.chat-bubble.mine time{color:rgba(255,255,255,.6)}.quick-message-row-v2{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.quick-message-row-v2 button{flex:0 0 auto;padding:8px 11px;border-radius:8px;background:var(--panel-muted);color:var(--text);font:700 9px var(--font-body)}.chat-composer-v2{padding:7px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:38px 1fr 42px;gap:6px;align-items:center}.chat-composer-v2 .input{height:44px;border:0!important;background:transparent!important;padding:0 5px!important;font-size:12px!important}.chat-add-button,.chat-send-button{width:38px;height:38px;border-radius:8px;display:grid;place-items:center}.chat-add-button{background:var(--panel-muted);color:var(--muted)}.chat-send-button{background:var(--blue);color:#fff}
.shop-rebuilt{max-width:860px}.shop-hero{min-height:190px;padding:22px;border-radius:8px;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff;display:grid;grid-template-columns:1fr 160px;gap:14px;align-items:center}.shop-hero>div>span{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.11);font-size:8px}.shop-hero h2{margin-top:14px;font:800 58px var(--font-display)}.shop-hero p{color:rgba(255,255,255,.7);font-size:10px}.shop-plus-tile{min-height:130px;padding:15px;border-radius:8px;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;align-content:center;text-align:center}.shop-plus-tile>span{width:43px;height:43px;border-radius:8px;background:var(--orange);display:grid;place-items:center}.shop-plus-tile b{margin-top:10px}.shop-plus-tile small{margin-top:5px;color:rgba(255,255,255,.68);font-size:8px}.shop-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:5px;border-radius:8px;background:var(--panel-muted)}.shop-nav button{min-height:43px;border-radius:8px;color:var(--muted);font-weight:800}.shop-nav button.active{background:var(--panel-raised);color:var(--text);box-shadow:0 5px 15px rgba(8,20,32,.06)}.shop-products{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.shop-product{min-height:250px;padding:16px;border-radius:8px;background:var(--panel);display:grid;align-content:space-between;gap:12px}.shop-product.featured{}.shop-product-top{display:flex;justify-content:space-between;align-items:center}.shop-product-icon{width:48px;height:48px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.shop-product-badge{padding:6px 8px;border-radius:8px;background:var(--orange);color:#fff;font-size:7px;font-weight:800}.shop-product-badge.neutral{background:var(--panel-muted);color:var(--muted)}.shop-product-copy strong{font:800 38px var(--font-display)}.shop-product-copy>span{margin-left:5px;color:var(--muted);font-size:9px}.shop-product-copy small{display:block;margin-top:6px;color:var(--success);font-size:8px}.shop-value-row{display:flex;justify-content:space-between;padding:8px 9px;border-radius:8px;background:var(--panel-muted);font-size:8px}.shop-history-item{background:var(--panel)!important;}
.spin-rebuilt{max-width:760px;margin:0 auto}.spin-status-card{padding:15px;border-radius:8px;background:var(--panel);}.spin-status-card>div:first-child{display:flex;justify-content:space-between;align-items:center}.spin-status-card span,.spin-status-card small{color:var(--muted);font-size:9px}.spin-status-card strong{font:800 22px var(--font-display)}.spin-used-progress{height:7px;margin:10px 0 7px;border-radius:8px;background:var(--panel-muted);overflow:hidden}.spin-used-progress i{display:block;height:100%;background:var(--orange)}.wheel-stage{position:relative;width:min(100%,560px);margin:12px auto}.wheel-stage .wheel-svg{width:100%;filter:drop-shadow(0 18px 32px rgba(8,20,32,.12))}.wheel-pointer{position:absolute;z-index:3;left:50%;top:-5px;transform:translateX(-50%);width:46px;height:52px}.wheel-pointer i{display:block;width:38px;height:24px;background:var(--orange);clip-path:polygon(0 0,100% 0,50% 100%)}.spin-main-button{min-height:55px}.spin-prize-grid{grid-template-columns:repeat(2,1fr)!important}.spin-prize{background:var(--panel)!important;}.spin-prize>span{background:color-mix(in srgb,var(--reward-color) 22%,var(--panel-muted))!important}
.battle-game-shell{max-width:800px;margin:0 auto}.battle-scoreboard{min-height:78px;padding:10px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:1fr 74px 1fr;gap:8px;align-items:center}.battle-player{display:flex;align-items:center;gap:8px;min-width:0}.battle-player.opponent{justify-content:flex-end;text-align:right}.battle-player>div{min-width:0}.battle-player b,.battle-player span{display:block}.battle-player b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px}.battle-player span{margin-top:3px;color:var(--orange);font:800 13px var(--font-display)}.battle-round-center{height:58px;border-radius:8px;background:var(--panel-muted);display:grid;place-items:center;align-content:center}.battle-round-center small{color:var(--muted);font-size:7px}.battle-round-center strong{margin-top:3px;font:800 16px var(--font-display)}.battle-placeholder{width:38px;height:38px;border-radius:8px;background:var(--panel-muted);display:grid;place-items:center}.battle-question{margin-top:10px!important}.battle-question .question-copy{min-height:118px!important;padding:18px!important}.battle-question .question-copy h2{font-size:clamp(19px,5.6vw,28px)!important}.battle-question .answers{gap:8px!important}.battle-question .answer{min-height:64px!important}
.quiz-results-summary{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;margin-bottom:9px;border-radius:8px;background:var(--panel-muted);color:var(--muted);font-size:8px}.quiz-results-summary b{color:var(--text);font-size:11px}.quiz-load-more{margin-top:10px}
@media(max-width:520px){.hero-rebuilt{min-height:290px;padding:21px}.home-metrics article{display:grid;place-items:center;text-align:center;gap:4px}.home-metrics article>span{width:32px;height:32px}.quick-battle-grid{grid-template-columns:1fr}.quick-battle-card.friends{grid-column:auto}.profile-primary-actions{grid-template-columns:repeat(2,1fr)}.profile-battle-stats{grid-template-columns:repeat(2,1fr)}.profile-hub-grid{grid-template-columns:1fr}.knowledge-dashboard{grid-template-columns:145px 1fr;padding:13px}.knowledge-topic-grid{grid-template-columns:1fr}.friend-summary{grid-template-columns:repeat(2,1fr)!important}.friend-controls{grid-template-columns:1fr}.friend-card-v2{grid-template-columns:52px minmax(0,1fr)}.friend-card-actions{grid-column:1/-1;justify-content:flex-end}.friend-request-columns{grid-template-columns:1fr}.shop-hero{grid-template-columns:1fr 110px;min-height:170px;padding:18px}.shop-plus-tile{min-height:110px}.shop-products{grid-template-columns:1fr 1fr}.shop-product{min-height:225px;padding:13px}.battle-scoreboard{grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr)}.battle-player .avatar{width:34px!important;height:34px!important}.chat-screen{height:calc(100dvh - var(--app-top-inset,0px) - 76px)}}
@media(max-width:370px){.home-metrics{grid-template-columns:1fr 1fr}.home-metrics article:last-child{grid-column:1/-1}.shop-products{grid-template-columns:1fr}.profile-identity{grid-template-columns:70px 1fr}.profile-identity .avatar{width:70px!important;height:70px!important}.knowledge-dashboard{grid-template-columns:1fr}.knowledge-radar{max-width:170px;margin:auto}.knowledge-summary-copy{text-align:center}.friend-tabs{border-radius:8px}.chat-bubble p{font-size:12px}}
@media(min-width:900px){.home-page,.profile-page-rebuilt{max-width:1120px;margin:0 auto}.quick-battle-grid{grid-template-columns:repeat(3,1fr)}.quick-battle-card.friends{grid-column:auto}.mode-grid-rebuilt{grid-template-columns:repeat(3,1fr)}.mode-grid-rebuilt .mode-wide{grid-column:auto!important;display:flex!important}.profile-primary-actions{grid-template-columns:repeat(6,1fr)}.profile-battle-stats{grid-template-columns:repeat(4,1fr)}.profile-hub-grid{grid-template-columns:repeat(4,1fr)}.knowledge-dashboard{grid-template-columns:250px 150px 1fr}.knowledge-topic-grid{grid-column:3;grid-row:1/3;grid-template-columns:1fr}.shop-products{grid-template-columns:repeat(4,1fr)}.friend-grid-v2{grid-template-columns:repeat(2,1fr)}}

/* Final visual alignment for the unified light and dark themes */
.hero-rebuilt,.home-metrics article,.quick-battle-card,.mode-grid-rebuilt .mode-card,.home-feature-card,
.profile-hero-card,.profile-primary-actions button,.profile-battle-stats article,.profile-hub-card,.knowledge-dashboard,
.friend-summary article,.friend-card-v2,.friend-suggestion-card,.friend-request-card,.friend-block-card,
.chat-profile-v2,.chat-composer-v2,.shop-product,.shop-history-item,.spin-status-card,.spin-prize,
.battle-scoreboard,.result-round-summary{box-shadow:none!important;border:0!important}
html[data-theme="light"] .hero-rebuilt,html[data-theme="light"] .friends-hero,html[data-theme="light"] .shop-hero{color:#fff}
html[data-theme="light"] .friend-tabs,html[data-theme="light"] .shop-nav{background:#e9eeeb}
html[data-theme="dark"] .friend-tabs,html[data-theme="dark"] .shop-nav{background:#111a28}
.chat-bubble p{font-size:14px!important;line-height:1.55!important}
.chat-composer-v2 .input{font-size:14px!important}
.friend-card-v2,.friend-suggestion-card,.friend-request-card,.friend-block-card{overflow:hidden}
.friend-card-main,.friend-card-main>*{min-width:0}
.result-round-summary{width:min(100%,330px);margin:13px auto 0;padding:10px 13px;border-radius:8px;background:rgba(255,255,255,.12);display:grid;grid-template-columns:25px 1fr auto;gap:8px;align-items:center;text-align:left}
.result-round-summary .svg-icon{width:20px!important;height:20px!important}.result-round-summary span{font-size:9px!important}.result-round-summary strong{font:800 14px var(--font-display)}
@media(max-width:370px){.home-metrics{grid-template-columns:1fr}.home-metrics article{min-height:64px;display:grid;grid-template-columns:34px 1fr;justify-items:start;text-align:left}.profile-battle-stats{grid-template-columns:1fr 1fr}.shop-products{grid-template-columns:1fr}.battle-scoreboard{grid-template-columns:1fr 52px 1fr}.battle-player b{font-size:8px}.friend-summary{grid-template-columns:1fr 1fr!important}}
@media(min-width:900px){.page,.overlay-content{max-width:1180px;margin-left:auto;margin-right:auto}.home-page{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}.home-page>.hero{grid-column:1/9}.home-page>.home-metrics{grid-column:9/13;margin:0;grid-template-columns:1fr}.home-page>.section{grid-column:1/-1}.friends-screen{max-width:980px}.shop-rebuilt{max-width:1040px}.shop-products{grid-template-columns:repeat(4,1fr)}.profile-page{max-width:1050px;margin:auto}}


/* Unified shop and social interface rebuild */
.shop-unified,.friends-v3{width:min(100%,980px);margin:0 auto;padding:2px 0 28px;display:grid;gap:16px}
.shop-hero-v3{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:14px;align-items:stretch;padding:20px;border-radius:8px;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff;overflow:hidden}
.shop-balance-v3{min-height:132px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:4px 8px}
.shop-eyebrow{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.12);font-size:9px;font-weight:800}
.shop-balance-v3 strong{margin-top:13px;font:800 clamp(38px,8vw,60px)/1 var(--font-display)}
.shop-balance-v3 small{margin-top:6px;color:rgba(255,255,255,.68);font-size:10px}
.shop-plus-summary{min-height:132px;padding:15px 16px;border-radius:8px;background:rgba(255,255,255,.12);color:#fff;display:grid;grid-template-columns:46px minmax(0,1fr) 18px;gap:11px;align-items:center;text-align:left}
.shop-plus-summary>span{width:46px;height:46px;border-radius:8px;background:var(--orange);display:grid;place-items:center}.shop-plus-summary b,.shop-plus-summary small{display:block}.shop-plus-summary b{font-size:13px}.shop-plus-summary small{margin-top:4px;color:rgba(255,255,255,.7);font-size:9px}.shop-plus-summary.active>span{background:var(--success)}
.shop-tabs-v3{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:5px;border-radius:8px;background:var(--panel-muted);}
.shop-tabs-v3 button{min-height:46px;border-radius:8px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:8px;font:800 10px var(--font-body)}
.shop-tabs-v3 button.active{background:var(--panel-raised);color:var(--text);box-shadow:0 5px 16px rgba(12,30,42,.08)}
.shop-tabs-v3 .svg-icon{width:18px!important;height:18px!important}.shop-panel-v3{display:grid;gap:16px;min-height:260px}
.shop-section-v3{display:grid;gap:12px}.shop-section-head-v3{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.shop-section-head-v3 h2{font:750 16px var(--font-display)}.shop-section-head-v3 p{margin-top:4px;color:var(--muted);font-size:10px}.shop-section-head-v3>span{padding:7px 10px;border-radius:8px;background:var(--panel-muted);color:var(--text);font-size:9px;font-weight:800}
.shop-products-v3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-product-v3{min-height:238px;padding:16px;border-radius:8px;background:var(--panel);display:flex;flex-direction:column;gap:11px}.shop-product-v3.featured{}
.shop-product-top-v3{display:flex;align-items:center;justify-content:space-between}.shop-product-top-v3>span{width:44px;height:44px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.shop-product-top-v3 em{padding:6px 8px;border-radius:8px;background:var(--orange);color:#fff;font:800 7px var(--font-body);font-style:normal;text-transform:uppercase}.shop-product-top-v3 em.neutral{background:var(--panel-muted);color:var(--muted)}
.shop-product-value-v3{display:flex;align-items:flex-end;gap:6px;margin-top:2px}.shop-product-value-v3 strong{font:800 clamp(28px,7vw,42px)/1 var(--font-display)}.shop-product-value-v3 span{padding-bottom:4px;color:var(--muted);font-size:9px}.shop-product-v3>p{min-height:18px;color:var(--success);font-size:9px;font-weight:750}.shop-rate-v3{display:flex;justify-content:space-between;gap:10px;margin-top:auto;padding:9px 10px;border-radius:8px;background:var(--panel-muted);font-size:8px}.shop-rate-v3 span{color:var(--muted)}
.shop-history-v3{display:grid;gap:8px}.shop-history-v3 article{min-height:64px;padding:11px 13px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:center}.shop-history-v3 article>span{width:40px;height:40px;border-radius:8px;background:color-mix(in srgb,var(--success) 14%,transparent);color:var(--success);display:grid;place-items:center}.shop-history-v3 b,.shop-history-v3 small{display:block}.shop-history-v3 b{font-size:11px}.shop-history-v3 small{margin-top:3px;color:var(--muted);font-size:8px}.shop-history-v3 article>strong{font-size:9px;color:var(--muted)}.shop-empty-v3{min-height:110px;border-radius:8px;background:var(--panel);display:grid;place-items:center;align-content:center;gap:8px;color:var(--muted);font-size:10px}
.shop-plus-panel-v3{padding:20px;border-radius:8px;background:var(--panel);display:grid;gap:16px}.shop-plus-panel-v3.is-active{}.shop-plus-head-v3{display:flex;align-items:center;gap:13px}.shop-plus-head-v3>span{width:54px;height:54px;border-radius:8px;background:var(--orange);color:#fff;display:grid;place-items:center}.shop-plus-head-v3 small{color:var(--muted);font-size:9px}.shop-plus-head-v3 h2{margin-top:3px;font:750 19px var(--font-display)}.shop-benefits-v3{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.shop-benefits-v3>div{min-height:54px;padding:11px 12px;border-radius:8px;background:var(--panel-muted);display:flex;align-items:center;gap:9px;font-size:10px}.shop-benefits-v3 .svg-icon{color:var(--success);flex:none}.shop-active-status-v3{padding:13px;border-radius:8px;background:color-mix(in srgb,var(--success) 12%,var(--panel));display:flex;gap:10px;align-items:center;color:var(--success)}.shop-active-status-v3 b,.shop-active-status-v3 small{display:block}.shop-active-status-v3 small{margin-top:3px;color:var(--muted);font-size:9px}.shop-buy-main{min-height:50px}
.shop-boosters-v3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-booster-card-v3{min-height:185px;padding:15px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:50px minmax(0,1fr);grid-template-rows:1fr auto;gap:12px}.shop-booster-icon-v3{width:50px;height:50px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.shop-booster-copy-v3>div{display:flex;justify-content:space-between;gap:8px}.shop-booster-copy-v3 h3{font:750 13px var(--font-display)}.shop-booster-copy-v3>div span{padding:4px 7px;border-radius:8px;background:var(--panel-muted);font-size:8px;font-weight:800}.shop-booster-copy-v3 p{margin-top:7px;color:var(--muted);font-size:9px;line-height:1.5}.shop-booster-bottom-v3{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px}.shop-booster-bottom-v3 b{display:flex;align-items:center;gap:6px;font-size:10px}
.friends-head-v3{min-height:112px;padding:18px;border-radius:8px;background:linear-gradient(145deg,var(--blue),var(--deep));color:#fff;display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:13px;align-items:center}.friends-head-icon-v3{width:54px;height:54px;border-radius:8px;background:rgba(255,255,255,.13);display:grid;place-items:center}.friends-head-v3 h2{font:800 19px var(--font-display)}.friends-head-v3 p{margin-top:5px;color:rgba(255,255,255,.7);font-size:10px}.friends-add-v3{min-height:42px;padding:0 13px;border-radius:8px;background:#fff;color:var(--deep);display:flex;align-items:center;gap:7px;font:800 9px var(--font-body)}
.friends-stats-v3{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.friends-stats-v3 article{min-height:78px;padding:11px;border-radius:8px;background:var(--panel);display:flex;align-items:center;gap:10px}.friends-stats-v3 article>span{width:34px;height:34px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.friends-stats-v3 strong,.friends-stats-v3 small{display:block}.friends-stats-v3 strong{font:800 17px var(--font-display)}.friends-stats-v3 small{margin-top:2px;color:var(--muted);font-size:7px}
.friends-tabs-v3{display:flex;gap:6px;padding:5px;border-radius:8px;background:var(--panel-muted);overflow-x:auto;scrollbar-width:none}.friends-tabs-v3 button{position:relative;flex:1 0 auto;min-height:44px;padding:0 12px;border-radius:8px;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:7px;font:800 9px var(--font-body)}.friends-tabs-v3 button.active{background:var(--panel-raised);color:var(--text);box-shadow:0 5px 15px rgba(12,30,42,.07)}.friends-tabs-v3 button i{position:absolute;right:4px;top:4px;min-width:17px;height:17px;padding:0 4px;border-radius:8px;background:var(--orange);color:#fff;display:grid;place-items:center;font:800 7px var(--font-body);font-style:normal}.friend-panel-v3{min-height:280px}.friends-list-section-v3,.friend-search-v3{display:grid;gap:11px}.friend-controls-v3{display:grid;grid-template-columns:1fr 1fr;gap:9px}.friend-controls-v3 label{display:grid;gap:6px}.friend-controls-v3 label>span{color:var(--muted);font-size:8px;font-weight:700}.select-wrap-v3{position:relative}.select-wrap-v3 .select{width:100%;appearance:none;padding-right:38px;background:var(--panel)!important;color:var(--text)!important}.select-wrap-v3>.svg-icon{position:absolute;right:13px;top:50%;transform:translateY(-50%);width:13px!important;height:13px!important;color:var(--muted);pointer-events:none}
.friends-list-v3,.friend-suggestions-v3,.friend-blocked-v3{display:grid;gap:9px}.friend-card-v3{min-height:104px;padding:13px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:60px minmax(0,1fr) auto;gap:12px;align-items:center;overflow:hidden}.friend-card-v3.favorite{}.friend-avatar-v3{position:relative}.friend-avatar-v3>i{position:absolute;right:0;bottom:1px;width:14px;height:14px;border-radius:8px;background:var(--success)}.friend-name-v3{display:flex;align-items:center;gap:6px;min-width:0}.friend-name-v3 b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.friend-name-v3 .svg-icon{width:13px!important;height:13px!important;color:var(--orange)}.friend-copy-v3>p{margin-top:4px;color:var(--muted);font-size:8px}.friend-meta-v3{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.friend-meta-v3 span,.friend-meta-v3 strong{padding:5px 7px;border-radius:8px;background:var(--panel-muted);font-size:7px}.friend-meta-v3 strong{color:var(--orange)}.friend-actions-v3{display:flex;gap:5px}.friend-actions-v3 button{min-width:38px;height:38px;padding:0 10px;border-radius:8px;background:var(--panel-muted);color:var(--text);display:flex;align-items:center;justify-content:center;gap:6px;font-size:8px}.friend-actions-v3 button.primary{background:var(--blue);color:#fff}.friend-actions-v3 button:not(.primary) span{display:none}
.friend-section-heading-v3{display:flex;align-items:center;justify-content:space-between;gap:12px}.friend-section-heading-v3 h3{font:750 13px var(--font-display)}.friend-section-heading-v3 p{margin-top:4px;color:var(--muted);font-size:9px}.friend-section-heading-v3>span{padding:5px 8px;border-radius:8px;background:var(--panel-muted);font-size:8px;font-weight:800}.friend-suggestion-v3,.friend-request-v3,.friend-block-v3{min-height:84px;padding:12px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:11px;align-items:center}.friend-suggestion-v3 b,.friend-request-v3 b,.friend-block-v3 b{font-size:11px}.friend-suggestion-v3 p,.friend-suggestion-v3 small,.friend-request-v3 p,.friend-block-v3 p{display:block;margin-top:3px;color:var(--muted);font-size:8px}.friend-requests-v3{display:grid;grid-template-columns:1fr 1fr;gap:14px}.friend-requests-v3>section{display:grid;align-content:start;gap:9px}.friend-request-actions-v3{display:flex;gap:5px}.friend-request-actions-v3 button{min-height:38px;padding:0 11px;border-radius:8px;display:flex;align-items:center;gap:6px;font-size:8px;font-weight:800}.friend-request-actions-v3 .accept{background:var(--success);color:#fff}.friend-request-actions-v3 .decline{width:38px;padding:0;justify-content:center;background:color-mix(in srgb,var(--danger) 13%,var(--panel));color:var(--danger)}
.friend-search-title-v3{display:flex;align-items:center;gap:11px;padding:14px;border-radius:8px;background:var(--panel);}.friend-search-title-v3>span{width:42px;height:42px;border-radius:8px;background:var(--panel-muted);color:var(--cyan);display:grid;place-items:center}.friend-search-title-v3 h3{font:750 13px var(--font-display)}.friend-search-title-v3 p{margin-top:4px;color:var(--muted);font-size:9px}.friend-search-field-v3{height:50px;padding:0 14px;border-radius:8px;background:var(--panel);display:flex;align-items:center;gap:10px}.friend-search-field-v3 input{width:100%;height:100%;border:0;background:transparent;color:var(--text);font-size:12px}.friend-search-results-v3{display:grid;gap:8px}
.chat-v3{height:min(760px,calc(100dvh - var(--app-top-inset,0px) - 88px));display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:9px}.chat-head-v3{min-height:72px;padding:9px 10px;border-radius:8px;background:var(--panel);display:flex;align-items:center;justify-content:space-between;gap:12px}.chat-person-v3{display:flex;align-items:center;gap:11px;min-width:0}.chat-person-v3 b,.chat-person-v3 small{display:block}.chat-person-v3 b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-person-v3 small{margin-top:4px;color:var(--muted);font-size:9px}.chat-head-actions-v3{display:flex;gap:6px}.chat-head-actions-v3 button{height:40px;padding:0 11px;border-radius:8px;background:var(--panel-muted);color:var(--text);display:flex;align-items:center;gap:6px;font-size:8px;font-weight:800}.chat-head-actions-v3 button:first-child{background:var(--blue);color:#fff}.chat-messages-v3{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px;border-radius:8px;background:var(--panel-muted);display:flex;flex-direction:column;gap:9px}.chat-message-v3{max-width:80%;padding:11px 13px;border-radius:8px;background:var(--panel-raised);box-shadow:0 4px 14px rgba(10,30,42,.05);align-self:flex-start}.chat-message-v3.mine{align-self:flex-end;border-radius:8px;background:var(--blue);color:#fff}.chat-message-v3 p{font-size:14px;line-height:1.52;white-space:pre-wrap;overflow-wrap:anywhere}.chat-message-v3 time{display:block;margin-top:5px;text-align:right;color:var(--muted);font-size:9px}.chat-message-v3.mine time{color:rgba(255,255,255,.65)}.chat-quick-v3{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.chat-quick-v3 button{flex:none;padding:8px 11px;border-radius:8px;background:var(--panel-muted);color:var(--text);font-size:9px;font-weight:750}.chat-compose-v3{padding:7px;border-radius:8px;background:var(--panel);display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px}.chat-compose-v3 input{height:42px;padding:0 9px;border:0;background:transparent;color:var(--text);font-size:13px}.chat-compose-v3 button{width:42px;height:42px;border-radius:8px;background:var(--blue);color:#fff;display:grid;place-items:center}
html[data-theme="light"] .shop-tabs-v3,html[data-theme="light"] .friends-tabs-v3{background:#e8efed}html[data-theme="light"] .shop-product-v3,html[data-theme="light"] .shop-plus-panel-v3,html[data-theme="light"] .shop-booster-card-v3,html[data-theme="light"] .shop-history-v3 article,html[data-theme="light"] .friends-stats-v3 article,html[data-theme="light"] .friend-card-v3,html[data-theme="light"] .friend-suggestion-v3,html[data-theme="light"] .friend-request-v3,html[data-theme="light"] .friend-block-v3,html[data-theme="light"] .friend-search-title-v3,html[data-theme="light"] .friend-search-field-v3,html[data-theme="light"] .chat-head-v3,html[data-theme="light"] .chat-compose-v3{background:#fff;}html[data-theme="light"] .chat-messages-v3{background:#edf3f1}html[data-theme="light"] .chat-message-v3:not(.mine){background:#fff}html[data-theme="dark"] .shop-tabs-v3,html[data-theme="dark"] .friends-tabs-v3{background:#111a28}
@media(max-width:620px){.shop-hero-v3{grid-template-columns:1fr}.shop-plus-summary{min-height:86px}.shop-products-v3,.shop-boosters-v3{grid-template-columns:1fr 1fr}.shop-benefits-v3{grid-template-columns:1fr}.friends-stats-v3{grid-template-columns:repeat(2,1fr)}.friends-head-v3{grid-template-columns:48px 1fr}.friends-add-v3{grid-column:1/-1;justify-content:center}.friend-card-v3{grid-template-columns:54px minmax(0,1fr)}.friend-actions-v3{grid-column:1/-1}.friend-actions-v3 button{flex:1}.friend-actions-v3 button:not(.primary) span{display:inline}.friend-requests-v3{grid-template-columns:1fr}.chat-head-actions-v3 button span{display:none}.chat-head-actions-v3 button{width:40px;padding:0;justify-content:center}}
@media(max-width:390px){.shop-products-v3,.shop-boosters-v3{grid-template-columns:1fr}.shop-tabs-v3 button{padding:0 5px;font-size:8px}.friends-tabs-v3 button{padding:0 10px}.friends-tabs-v3 button span{font-size:8px}.friend-suggestion-v3,.friend-request-v3,.friend-block-v3{grid-template-columns:48px minmax(0,1fr)}.friend-suggestion-v3>.button,.friend-request-v3>.button,.friend-block-v3>.button{grid-column:1/-1;width:100%}.chat-message-v3{max-width:88%}.chat-message-v3 p{font-size:13px}}
@media(min-width:900px){.shop-products-v3{grid-template-columns:repeat(4,1fr)}.shop-boosters-v3{grid-template-columns:repeat(4,1fr)}.friends-list-v3,.friend-suggestions-v3,.friend-blocked-v3{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* QuizTop 1.6.0 — alignment, daily focus and responsive polish */
:root{
  --content-width:1180px;
  --section-gap:18px;
  --card-radius-lg:22px;
  --card-radius-md:17px;
}
.view{
  width:min(var(--content-width),calc(100% - 24px));
  margin-inline:auto;
}
.page{
  display:grid;
  gap:var(--section-gap);
  padding-bottom:18px;
}
.section{
  margin:0;
}
.section-head{
  min-height:34px;
  margin:0 0 11px;
  align-items:flex-end;
}
.section-head h2{
  font-size:15px;
  line-height:1.2;
}
.section-head p{
  max-width:520px;
  margin-top:4px;
  font-size:9px;
  line-height:1.45;
}
.hero-rebuilt,
.profile-hero-card,
.daily-focus-card,
.smart-start-card,
.quick-battle-card,
.mode-card,
.home-feature-card,
.profile-primary-actions>button,
.profile-battle-stats>article,
.profile-hub-card,
.profile-snapshot-grid>article{
  border-radius:8px;
}
.home-metrics,
.profile-battle-stats,
.profile-snapshot-grid{
  gap:9px;
}
.home-metrics article,
.profile-battle-stats article,
.profile-snapshot-grid article{
  min-height:86px;
  padding:13px;
  align-items:center;
}
.mode-grid-rebuilt{
  align-items:stretch;
}
.mode-grid-rebuilt .mode-card{
  min-height:174px;
  height:100%;
}
.quick-battle-grid{
  align-items:stretch;
}
.quick-battle-card{
  min-height:84px;
}
.home-bottom-grid{
  gap:10px;
}
.home-feature-card{
  min-height:80px;
}
.button{
  min-height:42px;
}
.icon-button{
  flex:0 0 auto;
}
.page-heading{
  align-items:flex-end;
}
.page-heading h1{
  line-height:1.12;
}
.page-heading p{
  line-height:1.5;
}
.section-kicker{
  display:block;
  margin-bottom:5px;
  color:var(--cyan);
  font-size:8px;
  font-weight:850;
  letter-spacing:.7px;
  text-transform:uppercase;
}

/* Daily focus */
.daily-focus-section{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);
  gap:11px;
  align-items:stretch;
}
.daily-focus-card,
.smart-start-card{
  background:var(--panel);
  
}
.daily-focus-card{
  padding:17px;
}
.daily-focus-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.daily-focus-head h2{
  margin:0;
  font:800 17px var(--font-display);
}
.daily-focus-head p{
  margin-top:5px;
  color:var(--muted);
  font-size:9px;
  line-height:1.45;
}
.daily-focus-ring{
  --p:calc(var(--focus-progress) * 1%);
  width:72px;
  height:72px;
  flex:0 0 72px;
  border-radius:8px;
  display:grid;
  place-items:center;
  align-content:center;
  background:
    radial-gradient(circle at center,var(--panel) 58%,transparent 60%),
    conic-gradient(var(--cyan) var(--p),var(--panel-muted) 0);
}
.daily-focus-ring strong{
  font:850 14px var(--font-display);
}
.daily-focus-ring small{
  margin-top:2px;
  color:var(--muted);
  font-size:6px;
  text-transform:uppercase;
}
.daily-focus-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:15px;
}
.daily-focus-item{
  min-height:74px;
  padding:10px;
  border-radius:8px;
  background:var(--panel-muted);
  color:var(--text);
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 16px;
  gap:8px;
  align-items:center;
  text-align:left;
}
.daily-focus-item:hover{
  background:var(--panel-raised);
}
.daily-focus-item:disabled{
  opacity:1;
  cursor:default;
}
.daily-focus-item.done{
  background:color-mix(in srgb,var(--success) 10%,var(--panel));
  
}
.daily-focus-icon{
  width:34px;
  height:34px;
  border-radius:8px;
  background:var(--panel);
  color:var(--cyan);
  display:grid;
  place-items:center;
}
.daily-focus-item.done .daily-focus-icon{
  background:var(--success);
  color:#fff;
}
.daily-focus-copy{
  min-width:0;
}
.daily-focus-copy b{
  display:block;
  font-size:9px;
  line-height:1.3;
}
.daily-focus-copy small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:7px;
}
.daily-focus-item>.svg-icon{
  width:12px!important;
  height:12px!important;
  color:var(--muted);
}
.smart-start-card{
  padding:17px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
}
.smart-start-top{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--cyan);
}
.smart-start-top>span{
  width:34px;
  height:34px;
  border-radius:8px;
  background:var(--panel-muted);
  display:grid;
  place-items:center;
}
.smart-start-top small{
  font-size:8px;
  font-weight:850;
  letter-spacing:.6px;
  text-transform:uppercase;
}
.smart-start-mode{
  display:flex;
  align-items:center;
  gap:12px;
}
.smart-start-mode>span{
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:8px;
  background:var(--blue);
  color:#fff;
  display:grid;
  place-items:center;
}
.smart-start-mode h3{
  font:800 14px var(--font-display);
}
.smart-start-mode p{
  margin-top:5px;
  color:var(--muted);
  font-size:9px;
  line-height:1.45;
}

/* Profile summary */
.profile-snapshot-section{
  display:grid;
  gap:10px;
}
.profile-snapshot-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.profile-snapshot-grid article{
  background:var(--panel);
  
  display:flex;
  gap:11px;
}
.profile-snapshot-grid article>span{
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:8px;
  background:var(--panel-muted);
  color:var(--cyan);
  display:grid;
  place-items:center;
}
.profile-snapshot-grid strong,
.profile-snapshot-grid small{
  display:block;
}
.profile-snapshot-grid strong{
  font:850 16px var(--font-display);
}
.profile-snapshot-grid small{
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
}

/* Friends/chat/shop refinements */
.shop-screen-v3,
.friends-screen,
.chat-v3{
  width:100%;
}
.shop-tabs-v3,
.friends-tabs-v3{
  position:sticky;
  top:0;
  z-index:3;
  backdrop-filter:blur(16px);
}
.friend-panel-v3{
  padding-bottom:8px;
}
.friend-card-v3,
.friend-suggestion-v3,
.friend-request-v3,
.friend-block-v3{
  transition:transform .15s ease,box-shadow .15s ease;
}
.friend-card-v3:active,
.friend-suggestion-v3:active{
  transform:scale(.995);
}
.chat-messages-v3{
  
}
.chat-message-v3 p{
  font-weight:520;
}
.shop-product-v3,
.shop-booster-card-v3{
  min-width:0;
  overflow:hidden;
}
.shop-product-v3 h3,
.shop-booster-card-v3 h3{
  overflow-wrap:anywhere;
}
.shop-product-v3 .button,
.shop-booster-card-v3 .button{
  width:100%;
  margin-top:auto;
}

/* Explicit theme parity */
html[data-theme="light"] .daily-focus-card,
html[data-theme="light"] .smart-start-card,
html[data-theme="light"] .profile-snapshot-grid article{
  background:#fff;
  
}
html[data-theme="light"] .daily-focus-ring{
  background:
    radial-gradient(circle at center,#fff 58%,transparent 60%),
    conic-gradient(var(--cyan) var(--p),#e8efed 0);
}
html[data-theme="light"] .daily-focus-item{
  background:#edf3f1;
}
html[data-theme="light"] .daily-focus-item:hover{
  background:#e5efec;
}
html[data-theme="dark"] .daily-focus-card,
html[data-theme="dark"] .smart-start-card,
html[data-theme="dark"] .profile-snapshot-grid article{
  background:#111a28;
}
html[data-theme="dark"] .daily-focus-item{
  background:#172334;
}

@media(max-width:760px){
  .daily-focus-section{
    grid-template-columns:1fr;
  }
  .smart-start-card{
    min-height:180px;
  }
  .daily-focus-list{
    grid-template-columns:1fr;
  }
  .daily-focus-item{
    min-height:62px;
  }
  .profile-snapshot-grid{
    grid-template-columns:repeat(3,1fr);
  }
}
@media(max-width:520px){
  .view{
    width:calc(100% - 18px);
  }
  .page{
    gap:14px;
  }
  .daily-focus-card,
  .smart-start-card{
    padding:14px;
  }
  .daily-focus-head{
    align-items:flex-start;
  }
  .daily-focus-ring{
    width:64px;
    height:64px;
    flex-basis:64px;
  }
  .profile-snapshot-grid{
    grid-template-columns:1fr;
  }
  .profile-snapshot-grid article{
    min-height:68px;
  }
  .home-metrics{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .home-metrics article{
    padding:10px 8px;
  }
  .home-metrics strong{
    font-size:14px;
  }
}
@media(min-width:1000px){
  .view{
    width:min(var(--content-width),calc(100% - 48px));
  }
  .daily-focus-card,
  .smart-start-card{
    min-height:228px;
  }
}


/* QuizTop 1.7.0 — fully responsive, borderless themes and battle mechanics */
:root{
  --layout-max:1280px;
  --page-pad:clamp(10px,2.4vw,28px);
  --section-space:clamp(13px,2vw,20px);
}
html[data-theme="dark"]{
  --bg:#07111d;
  --bg-2:#0b1724;
  --surface:#111e2c;
  --surface-2:#172738;
  --surface-3:#20354a;
  --soft:#1a2b3d;
  --soft-strong:#22384e;
  --panel:#111e2c;
  --panel-raised:#172738;
  --panel-muted:#1b2c3e;
  --text:#f7fbff;
  --muted:#96a7b9;
  --muted-2:#687b8f;
  --glass:rgba(7,17,29,.98);
}
html[data-theme="light"]{
  --bg:#f2f7f5;
  --bg-2:#eaf2ef;
  --surface:#ffffff;
  --surface-2:#e9f1ee;
  --surface-3:#dce9e5;
  --soft:#e9f1ee;
  --soft-strong:#dfeae6;
  --panel:#ffffff;
  --panel-raised:#f5f9f7;
  --panel-muted:#e8f1ed;
  --text:#132831;
  --muted:#627780;
  --muted-2:#8a9a9f;
  --glass:rgba(242,247,245,.98);
}
html,body{width:100%;max-width:100%;overflow-x:clip!important}
body{padding:0!important;background:var(--bg)!important}
.app-shell{width:100%!important;max-width:var(--layout-max)!important;min-width:0!important;margin:0 auto!important;border-radius:8px!important;overflow:visible!important}
.view{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:4px var(--page-pad) 20px!important}
.page,.home-page,.profile-page,.profile-page-rebuilt,.shop-unified,.friends-v3,.friends-screen,.shop-screen-v3,.chat-v3,.overlay-content{width:100%!important;max-width:100%!important;min-width:0!important}
.page>* ,.home-page>* ,.section>* ,article,button,div,span,label{min-width:0}
img,svg,canvas,video{max-width:100%;height:auto}
button,input,select,textarea{max-width:100%;min-width:0}

/* No outlines or faux borders */
:where(.topbar,.bottom-nav,.card,.stat-card,.mode-card,.quick-battle-card,.home-feature-card,.daily-focus-card,.smart-start-card,.profile-hero-card,.profile-primary-actions>button,.profile-battle-stats>article,.profile-hub-card,.profile-snapshot-grid>article,.knowledge-dashboard,.shop-tabs-v3,.shop-product-v3,.shop-plus-panel-v3,.shop-booster-card-v3,.shop-history-v3 article,.shop-empty-v3,.friends-stats-v3 article,.friends-tabs-v3,.friend-card-v3,.friend-suggestion-v3,.friend-request-v3,.friend-block-v3,.friend-search-title-v3,.friend-search-field-v3,.chat-head-v3,.chat-messages-v3,.chat-message-v3,.chat-compose-v3,.battle-scoreboard,.game-progress-panel,.game-momentum,.question-card,.answer,.booster,.result-performance article,.input,.select,textarea){border:0!important;outline:0!important;box-shadow:none!important}
.topbar{background:var(--bg)!important;border:0!important;box-shadow:none!important}
.bottom-nav{background:var(--glass)!important;border:0!important;box-shadow:none!important}
html[data-theme="dark"] :where(.card,.stat-card,.mode-card:not(.mode-blue):not(.mode-orange),.quick-battle-card:not(.duel),.home-feature-card,.daily-focus-card,.smart-start-card,.profile-hero-card,.profile-primary-actions>button,.profile-battle-stats>article,.profile-hub-card,.profile-snapshot-grid>article,.knowledge-dashboard,.shop-product-v3,.shop-plus-panel-v3,.shop-booster-card-v3,.shop-history-v3 article,.friends-stats-v3 article,.friend-card-v3,.friend-suggestion-v3,.friend-request-v3,.friend-block-v3,.friend-search-title-v3,.friend-search-field-v3,.chat-head-v3,.chat-compose-v3,.battle-scoreboard,.game-progress-panel,.game-momentum,.question-card,.booster){background:var(--surface)!important}
html[data-theme="light"] :where(.card,.stat-card,.mode-card:not(.mode-blue):not(.mode-orange),.quick-battle-card:not(.duel),.home-feature-card,.daily-focus-card,.smart-start-card,.profile-hero-card,.profile-primary-actions>button,.profile-battle-stats>article,.profile-hub-card,.profile-snapshot-grid>article,.knowledge-dashboard,.shop-product-v3,.shop-plus-panel-v3,.shop-booster-card-v3,.shop-history-v3 article,.friends-stats-v3 article,.friend-card-v3,.friend-suggestion-v3,.friend-request-v3,.friend-block-v3,.friend-search-title-v3,.friend-search-field-v3,.chat-head-v3,.chat-compose-v3,.battle-scoreboard,.game-progress-panel,.game-momentum,.question-card,.booster){background:#fff!important}

/* Global layout */
.home-page{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:var(--section-space)!important}
.home-page>.hero,.home-page>.home-metrics,.home-page>.section{grid-column:1!important;width:100%!important;margin:0!important}
.hero-rebuilt{min-height:clamp(230px,38vw,320px)!important;width:100%!important;padding:clamp(18px,3vw,30px)!important}
.hero-content,.hero-actions{max-width:100%!important}
.hero-kickers{display:flex!important;flex-wrap:wrap!important;gap:7px!important}
.hero h1{font-size:clamp(24px,6.3vw,42px)!important;max-width:min(100%,650px)!important;overflow-wrap:anywhere}
.hero p{max-width:min(100%,580px)!important}
.hero-actions{grid-template-columns:minmax(0,1fr) 50px!important;width:min(100%,430px)!important}
.home-metrics{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(112px,1fr))!important;gap:8px!important}
.home-metrics article{width:100%!important;min-height:76px!important;padding:11px!important}
.daily-focus-section{grid-template-columns:minmax(0,1fr)!important;width:100%!important}
.daily-focus-head{align-items:flex-start!important}
.daily-focus-list{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important}
.daily-focus-item{width:100%!important}
.quick-battle-grid,.home-bottom-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;gap:9px!important}
.quick-battle-card,.home-feature-card{width:100%!important}
.quick-battle-card.friends{grid-column:auto!important}
.mode-grid-rebuilt{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))!important;grid-auto-rows:auto!important;gap:9px!important}
.mode-grid-rebuilt .mode-card,.mode-grid-rebuilt .mode-card.mode-wide{grid-column:auto!important;width:100%!important;height:auto!important;min-height:168px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important}
.mode-grid-rebuilt .mode-arrow{display:none!important}
.horizontal{width:100%!important;max-width:100%!important;grid-auto-columns:minmax(min(82vw,280px),min(88vw,330px))!important;padding-bottom:3px!important}
.room-carousel .live-card,.tournament-carousel .live-card{min-width:0!important;width:100%!important}
.section-head{align-items:flex-start!important;flex-wrap:wrap!important}
.section-head>div{min-width:0;max-width:100%}
.section-head h2,.section-head p{overflow-wrap:anywhere}

/* Responsive profile/shop/friends */
.profile-primary-actions,.profile-battle-stats,.profile-hub-grid,.profile-snapshot-grid,.friends-stats-v3,.shop-products-v3,.shop-boosters-v3,.shop-benefits-v3{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))!important}
.knowledge-dashboard{grid-template-columns:minmax(0,190px) minmax(0,1fr)!important}
.knowledge-topic-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))!important}
.shop-hero-v3{grid-template-columns:minmax(0,1fr)!important}
.shop-tabs-v3{grid-template-columns:repeat(3,minmax(0,1fr))!important;background:var(--surface-2)!important}
.shop-tabs-v3 button{min-width:0!important;padding-inline:6px!important}
.friends-tabs-v3{background:var(--surface-2)!important}
.friend-controls-v3{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))!important}
.select-wrap-v3 .select,.input,textarea{background:var(--surface-2)!important;color:var(--text)!important;border:0!important;box-shadow:none!important}
.friend-card-v3{grid-template-columns:56px minmax(0,1fr) auto!important}
.chat-messages-v3{background:var(--surface-2)!important;border:0!important}
html[data-theme="light"] .chat-message-v3:not(.mine){background:#fff!important}
html[data-theme="dark"] .chat-message-v3:not(.mine){background:#1a2a3c!important}

/* Battle mechanics */
.overlay{width:100%!important;max-width:100%!important;inset:0!important;transform:none!important;border-radius:8px!important;background:var(--bg)!important}
.overlay-content{padding-inline:var(--page-pad)!important}
.battle-game-shell{width:min(100%,860px)!important;max-width:860px!important;height:auto!important;min-height:calc(100dvh - var(--app-top-inset,0px) - 72px)!important;margin:0 auto!important;padding:8px 0 calc(18px + var(--safe-bottom))!important;display:grid!important;grid-template-rows:auto auto auto auto auto auto!important;gap:9px!important;overflow:visible!important}
.battle-scoreboard{width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr)!important;gap:8px!important;padding:10px!important;border-radius:8px!important}
.battle-player{min-width:0!important;display:flex!important;align-items:center!important;gap:9px!important}
.battle-player.opponent{justify-content:flex-end!important;text-align:right!important}
.battle-player>div{min-width:0!important}
.battle-player b{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:10px!important}
.battle-player span{font-size:9px!important}
.battle-monogram{width:38px!important;height:38px!important;flex:0 0 38px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important;display:grid!important;place-items:center!important;font:800 10px var(--font-display)!important}
.opponent-mark{background:var(--orange)!important;color:#fff!important}
.battle-round-center{display:grid!important;place-items:center!important;align-content:center!important;text-align:center!important}
.battle-round-center small{font-size:7px!important;color:var(--muted)!important}
.battle-round-center strong{font:800 15px var(--font-display)!important}
.game-progress-panel{padding:11px 12px!important;border-radius:8px!important;transition:background .2s ease!important}
.game-progress-panel.urgent{background:color-mix(in srgb,var(--danger) 13%,var(--surface))!important}
.game-progress-meta{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.game-progress-meta>span{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:center!important;font-size:8px!important}
.question-timer{height:7px!important;margin-top:9px!important;background:var(--surface-2)!important;border-radius:8px!important;overflow:hidden!important}
.question-timer i{background:linear-gradient(90deg,var(--cyan),var(--blue))!important;transition:width .1s linear!important}
.game-progress-panel.urgent .question-timer i{background:var(--danger)!important}
.round-progress-line{margin-top:9px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;color:var(--muted)!important;font-size:7px!important}
.round-progress-line>div{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:1fr!important;gap:4px!important}
.round-progress-line i{height:5px!important;border-radius:8px!important;background:var(--surface-2)!important}
.round-progress-line i.passed{background:var(--success)!important}.round-progress-line i.current{background:var(--orange)!important}
.game-momentum{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr)) auto!important;gap:8px!important;align-items:center!important;padding:9px 10px!important;border-radius:8px!important}
.game-momentum>div{display:grid!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:7px!important;align-items:center!important}
.game-momentum>div>span{width:28px!important;height:28px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important;display:grid!important;place-items:center!important}
.game-momentum small{color:var(--muted)!important;font-size:7px!important}.game-momentum strong{font:800 11px var(--font-display)!important}.game-keyboard-hint{text-align:right!important}
.game-feedback{min-height:50px!important;padding:9px 11px!important;border-radius:8px!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;gap:9px!important;align-items:center!important;background:var(--surface)!important}
.game-feedback.hidden{visibility:hidden!important;display:grid!important;opacity:0!important}
.game-feedback>span{width:34px!important;height:34px!important;border-radius:8px!important;display:grid!important;place-items:center!important}.game-feedback.success>span{background:var(--success)!important;color:#fff!important}.game-feedback.danger>span{background:var(--danger)!important;color:#fff!important}
.game-feedback b,.game-feedback small{display:block!important}.game-feedback b{font-size:10px!important}.game-feedback small{margin-top:3px!important;color:var(--muted)!important;font-size:7px!important}.game-feedback>strong{font:800 15px var(--font-display)!important}
.question-card.compact-question{width:100%!important;max-width:none!important;padding:clamp(12px,2.4vw,20px)!important;border-radius:8px!important;overflow:visible!important}
.compact-question .question-copy{min-height:0!important;padding:2px 2px 13px!important}
.compact-question .question-copy h2{font-size:clamp(17px,4.5vw,27px)!important;line-height:1.28!important;overflow-wrap:anywhere!important}
.answers{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.answer{width:100%!important;min-height:64px!important;padding:10px!important;background:var(--surface-2)!important;color:var(--text)!important;transition:transform .12s ease,background .18s ease!important}
.answer:active,.answer.selected-answer{transform:scale(.985)!important}
.answer.correct{background:color-mix(in srgb,var(--success) 18%,var(--surface))!important;color:var(--success)!important}
.answer.wrong{background:color-mix(in srgb,var(--danger) 16%,var(--surface))!important;color:var(--danger)!important}
.answer-code{background:var(--surface)!important}
.boosters-row{width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:0!important}
.booster{width:100%!important;min-height:58px!important;border-radius:8px!important;background:var(--surface)!important}
.result-performance{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}
.result-performance article{min-height:70px!important;padding:11px!important;border-radius:8px!important;background:var(--surface)!important;display:flex!important;align-items:center!important;gap:10px!important}
.result-performance article>span{width:38px!important;height:38px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important;display:grid!important;place-items:center!important}.result-performance small,.result-performance strong{display:block!important}.result-performance small{color:var(--muted)!important;font-size:8px!important}.result-performance strong{margin-top:3px!important;font:800 12px var(--font-display)!important}

@media(max-width:700px){
  .view{padding-inline:10px!important}
  .topbar{padding-inline:10px!important}
  .hero-rebuilt{min-height:245px!important}
  .daily-focus-list{grid-template-columns:1fr!important}
  .knowledge-dashboard{grid-template-columns:1fr!important;text-align:center!important}
  .knowledge-radar{width:min(190px,70vw)!important;margin-inline:auto!important}
  .friend-card-v3{grid-template-columns:52px minmax(0,1fr)!important}
  .friend-actions-v3{grid-column:1/-1!important;width:100%!important}
  .friend-actions-v3 button{flex:1!important}
  .friend-actions-v3 button span{display:inline!important}
  .game-keyboard-hint{display:none!important}
  .game-momentum{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
  .home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .home-metrics article:last-child:nth-child(odd){grid-column:1/-1!important}
  .daily-focus-head{display:grid!important;grid-template-columns:minmax(0,1fr) 64px!important;gap:10px!important}
  .smart-start-card{min-height:0!important}
  .shop-products-v3,.shop-boosters-v3,.profile-primary-actions,.profile-battle-stats,.profile-hub-grid,.profile-snapshot-grid,.friends-stats-v3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .answers{grid-template-columns:1fr!important}
  .answer{min-height:55px!important}
  .battle-scoreboard{grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr)!important;padding:8px!important}
  .battle-monogram{width:32px!important;height:32px!important;flex-basis:32px!important;border-radius:8px!important;font-size:8px!important}
  .battle-player{gap:6px!important}.battle-player b{font-size:8px!important}.battle-player span{font-size:8px!important}
  .game-progress-meta{grid-template-columns:repeat(3,minmax(0,1fr))!important}.game-progress-meta>span{font-size:7px!important}
  .game-momentum{padding:8px!important}.game-momentum>div{grid-template-columns:24px minmax(0,1fr) auto!important}.game-momentum>div>span{width:24px!important;height:24px!important}.game-momentum small{font-size:6px!important}
  .boosters-row{gap:5px!important}.booster{min-height:54px!important;padding-inline:2px!important}.booster span{font-size:6px!important}
}
@media(max-width:360px){
  .view{padding-inline:8px!important}
  .topbar{padding-inline:8px!important;gap:6px!important}
  .profile-compact{grid-template-columns:38px minmax(0,1fr)!important;gap:7px!important}.profile-compact .avatar-44{width:38px!important;height:38px!important}.coin-button{min-width:66px!important;padding-inline:9px!important}.icon-button{width:40px!important;flex-basis:40px!important}
  .hero-rebuilt{padding:17px!important}.hero h1{font-size:23px!important}
  .home-metrics{grid-template-columns:1fr!important}.home-metrics article:last-child:nth-child(odd){grid-column:auto!important}
  .shop-products-v3,.shop-boosters-v3,.profile-primary-actions,.profile-battle-stats,.profile-hub-grid,.profile-snapshot-grid,.friends-stats-v3{grid-template-columns:1fr!important}
  .shop-tabs-v3 button{font-size:7px!important;gap:4px!important}.shop-tabs-v3 .svg-icon{width:14px!important;height:14px!important}
  .battle-scoreboard{grid-template-columns:minmax(0,1fr) 46px minmax(0,1fr)!important}.battle-monogram{display:none!important}.battle-player.opponent{justify-content:flex-end!important}.battle-player b{max-width:90px!important}
  .round-progress-line>span{display:none!important}.round-progress-line{grid-template-columns:minmax(0,1fr) auto!important}
  .game-feedback{grid-template-columns:30px minmax(0,1fr) auto!important}.game-feedback>span{width:30px!important;height:30px!important}
}
@media(min-width:760px){
  .app-shell{min-height:100dvh!important}
  .overlay{width:100%!important;max-width:var(--layout-max)!important;margin:0 auto!important}
}
@media(min-width:960px){
  .view{padding-inline:28px!important}
  .home-page{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:16px!important}
  .home-page>.hero{grid-column:1/9!important}.home-page>.home-metrics{grid-column:9/13!important;grid-template-columns:1fr!important;align-content:stretch!important}.home-page>.home-metrics article{min-height:0!important;height:100%!important}.home-page>.section{grid-column:1/-1!important}
  .daily-focus-section{grid-template-columns:minmax(0,1.45fr) minmax(250px,.75fr)!important}
  .mode-grid-rebuilt{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .quick-battle-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .shop-hero-v3{grid-template-columns:minmax(0,1fr) minmax(240px,310px)!important}
  .shop-products-v3,.shop-boosters-v3{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}


/* QuizTop 1.8.0 — final UX rebuild */
:root{
  --ux-max:1120px;
  --ux-pad:clamp(12px,3.8vw,22px);
  --ux-gap:clamp(10px,2.6vw,16px);
  --ux-radius:18px;
  --ux-radius-lg:24px;
  --spin-divider:#071522;
  --spin-core:#0b6680;
  --spin-core-2:#0a526b;
}
html[data-theme="dark"]{
  --bg:#07131f;--surface:#101f2f;--surface-2:#172a3d;--surface-3:#1d3348;
  --soft:#15283a;--text:#f7fbff;--muted:#91a4b7;--line:transparent;
}
html[data-theme="light"]{
  --bg:#f4f1e7;--surface:#ffffff;--surface-2:#edf3f0;--surface-3:#e3ece8;
  --soft:#edf3f0;--text:#102231;--muted:#687a85;--line:transparent;
  --spin-divider:#f4f1e7;--spin-core:#0b6c86;--spin-core-2:#0a5870;
}
*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
button,input,textarea,select{font:inherit}
button{touch-action:manipulation}
.view,.overlay-content{width:min(100%,var(--ux-max))!important;max-width:var(--ux-max)!important;padding-inline:var(--ux-pad)!important}
.page{gap:var(--ux-gap)!important}
.topbar,.bottom-nav{background:var(--bg)!important}
.overlay-header{background:var(--bg)!important;box-shadow:none!important;border:0!important}
:where(.card,.mode-card,.stat-card,.profile-command-card,.profile-action-grid>button,.profile-reward-grid>button,.knowledge-matrix,.quiz-catalog-hero,.quiz-toolbar,.quiz-catalog-card,.shop-wallet,.shop-nav,.shop-plus-modern,.shop-section-modern,.coin-offer,.booster-shop-item,.spin-summary,.spin-prizes-modern article,.friend-chat-head,.friend-chat-messages,.friend-chat-compose,.game-match-score,.game-hud,.game-question-stage,.game-booster-bar){border:0!important;outline:0!important;box-shadow:none!important}

/* Fast loader */
.loading-screen{background:var(--bg)!important}
.loading-card{background:transparent!important;box-shadow:none!important}
.loading-logo{animation:none!important}
.loading-line{height:3px!important;opacity:.8}
.loading-screen.done{opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease}

/* Game */
.game-overlay .overlay-header{display:none!important}
.game-overlay .overlay-content{
  min-height:var(--tg-viewport-stable-height,100dvh)!important;
  padding-top:calc(var(--app-top-inset,74px) + 6px)!important;
  padding-bottom:calc(var(--safe-bottom,0px) + 8px)!important;
  overflow:hidden!important;
}
.game-match{
  width:min(100%,760px);height:calc(var(--tg-viewport-stable-height,100dvh) - var(--app-top-inset,74px) - var(--safe-bottom,0px) - 14px);
  min-height:460px;margin:0 auto;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;
}
.game-match-score{
  display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);align-items:center;gap:8px;
  min-height:62px;padding:9px 11px;border-radius:8px;background:var(--surface);
}
.game-player{min-width:0;display:flex;align-items:center;gap:8px}
.game-player.opponent{justify-content:flex-end;text-align:right}
.game-player>span{width:38px;height:38px;flex:0 0 38px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);color:var(--cyan);font-size:10px;font-weight:900}
.game-player.opponent>span{background:var(--orange);color:#fff}
.game-player div{min-width:0}
.game-player b,.game-player small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-player b{font-size:10px}.game-player small{margin-top:2px;color:var(--muted);font-size:8px}
.game-round-badge{height:48px;border-radius:8px;background:var(--surface-2);display:grid;place-items:center;align-content:center}
.game-round-badge small{color:var(--muted);font-size:6px}.game-round-badge strong{font:800 14px var(--font-display)}
.game-hud{padding:9px 11px;border-radius:8px;background:var(--surface)}
.game-hud-meta{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;color:var(--muted);font-size:7px}
.game-hud-meta>span:last-child{text-align:right}
.game-hud-meta b{color:var(--text);font-size:9px}
.game-timer-chip{height:30px;padding:0 10px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;gap:6px;color:var(--text)!important}
.game-timer-chip .svg-icon{width:14px;height:14px;color:var(--cyan)}
.game-timer-track{height:5px;margin-top:8px;border-radius:8px;background:var(--surface-2);overflow:hidden}
.game-timer-track i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#7ad6df,#087792);transition:width .1s linear}
.game-hud.urgent .game-timer-track i{background:var(--danger)}
.game-round-track{margin-top:7px;display:flex;align-items:center;gap:8px}
.game-round-track>div{flex:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.game-round-track i{height:4px;border-radius:8px;background:var(--surface-2)}
.game-round-track i.current{background:var(--orange)}
.game-round-track i.passed,.game-round-track i.correct{background:var(--success)}
.game-round-track i.wrong{background:var(--danger)}
.game-round-track span{color:var(--muted);font-size:7px;font-weight:800}
.game-question-stage{
  min-height:0;padding:clamp(12px,2.2vh,18px);border-radius:8px;background:var(--surface);
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;align-content:center;gap:12px;position:relative;overflow:hidden;
}
.game-question-copy{display:grid;align-content:end;justify-items:center;text-align:center;gap:9px;min-height:0}
.game-question-copy>span{height:28px;padding:0 11px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;gap:7px;color:var(--muted);font-size:8px;font-weight:750}
.game-question-copy>span .svg-icon{width:14px;height:14px;color:var(--cyan)}
.game-question-copy h2{max-width:680px;font:800 clamp(18px,4.5vw,28px)/1.2 var(--font-display);overflow-wrap:anywhere}
.game-answer-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(64px,1fr);gap:9px;min-height:0}
.game-answer{
  width:100%;min-width:0;min-height:64px;padding:12px;border-radius:8px;background:var(--surface-2);color:var(--text);
  display:grid;place-items:center;text-align:center;font-size:clamp(10px,2.8vw,13px);font-weight:750;line-height:1.3;overflow-wrap:anywhere;
  transition:transform .12s ease,background .16s ease,color .16s ease,opacity .16s ease;
}
.game-answer:active{transform:scale(.98)}
.game-answer.locked{pointer-events:none}
.game-answer.hidden-by-booster{opacity:.12;pointer-events:none}
.game-answer.correct{background:color-mix(in srgb,var(--success) 26%,var(--surface-2));color:var(--success)}
.game-answer.wrong{background:color-mix(in srgb,var(--danger) 24%,var(--surface-2));color:var(--danger)}
.game-feedback-modern{
  position:absolute;z-index:3;top:10px;left:50%;transform:translateX(-50%);min-width:min(90%,360px);padding:9px 12px;border-radius:8px;
  display:flex;align-items:center;gap:9px;background:var(--surface-3);color:var(--text)
}
.game-feedback-modern.hidden{display:none}
.game-feedback-modern.success{background:color-mix(in srgb,var(--success) 20%,var(--surface))}
.game-feedback-modern.danger{background:color-mix(in srgb,var(--danger) 20%,var(--surface))}
.game-feedback-modern.round{background:color-mix(in srgb,var(--cyan) 20%,var(--surface))}
.game-feedback-modern>.svg-icon{width:20px;height:20px}.game-feedback-modern div{min-width:0}.game-feedback-modern b,.game-feedback-modern small{display:block}.game-feedback-modern b{font-size:10px}.game-feedback-modern small{margin-top:2px;color:var(--muted);font-size:7px}
.game-combo-chip{position:absolute;right:10px;bottom:10px;height:28px;padding:0 9px;border-radius:8px;background:var(--surface-3);display:none;align-items:center;gap:6px}
.game-combo-chip.visible{display:flex}.game-combo-chip span{color:var(--muted);font-size:6px}.game-combo-chip b{font-size:9px}
.game-booster-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:7px;border-radius:8px;background:var(--surface)}
.game-booster{min-width:0;height:52px;padding:5px 3px;border-radius:8px;background:var(--surface-2);color:var(--text);display:grid;grid-template-columns:1fr auto;grid-template-rows:1fr auto;align-items:center}
.game-booster>span{grid-row:1/3;width:30px;height:30px;justify-self:center;border-radius:8px;background:var(--surface);color:var(--cyan);display:grid;place-items:center}
.game-booster small{font-size:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-booster b{font-size:7px;color:var(--muted)}
.game-booster.disabled{opacity:.38}
.game-booster.active{background:color-mix(in srgb,var(--cyan) 20%,var(--surface-2))}
.game-keyboard-hint,.game-momentum,.battle-scoreboard,.game-progress-panel,.boosters-row,.question-card.battle-question{display:none!important}

/* Profile */
.profile-page-modern{width:100%;display:grid;gap:14px}
.profile-command-card{padding:16px;border-radius:8px;background:var(--surface)}
.profile-command-main{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;align-items:center}
.profile-avatar-frame{width:88px;height:88px;position:relative}
.profile-avatar-frame .avatar{width:88px!important;height:88px!important;border-radius:8px!important;overflow:hidden;background:var(--surface-2)!important}
.profile-avatar-frame .avatar img{width:100%;height:100%;object-fit:cover;display:block}
.profile-avatar-frame>i{position:absolute;right:-4px;bottom:-4px;padding:4px 7px;border-radius:8px;background:var(--orange);color:#fff;font-size:6px;font-style:normal;font-weight:900}
.profile-command-copy{min-width:0}.profile-status-dot{display:flex;align-items:center;gap:5px;color:var(--cyan);font-size:7px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}
.profile-status-dot .svg-icon{width:6px;height:6px}.profile-command-copy h1{margin-top:5px;font:800 clamp(22px,6vw,34px)/1.05 var(--font-display);overflow-wrap:anywhere}.profile-command-copy p{margin-top:5px;color:var(--muted);font-size:9px}
.profile-tags{margin-top:9px;display:flex;flex-wrap:wrap;gap:6px}.profile-tags span{padding:6px 9px;border-radius:8px;background:var(--surface-2);font-size:7px;font-weight:800}
.profile-progress-stack{margin-top:16px;display:grid;gap:12px}
.profile-progress-line>div:first-child{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:8px}.profile-progress-line b{color:var(--text)}
.profile-progress-line>div:last-child{height:6px;margin-top:7px;border-radius:8px;background:var(--surface-2);overflow:hidden}.profile-progress-line i{display:block;height:100%;background:linear-gradient(90deg,#80d5df,#08758f)}
.profile-stats-inline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.profile-stats-inline article{min-width:0;padding:10px 7px;border-radius:8px;background:var(--surface-2);text-align:center}.profile-stats-inline strong,.profile-stats-inline span{display:block}.profile-stats-inline strong{font:800 14px var(--font-display)}.profile-stats-inline span{margin-top:4px;color:var(--muted);font-size:6px}
.profile-action-grid,.profile-reward-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.profile-action-grid>button,.profile-reward-grid>button{min-width:0;min-height:74px;padding:12px;border-radius:8px;background:var(--surface);color:var(--text);display:grid;grid-template-columns:38px minmax(0,1fr) 16px;gap:10px;align-items:center;text-align:left}
.profile-action-grid>button>.svg-icon:first-child,.profile-reward-grid>button>.svg-icon:first-child{width:38px;height:38px;padding:10px;border-radius:8px;background:var(--surface-2);color:var(--cyan)}
.profile-action-grid b,.profile-action-grid small,.profile-reward-grid b,.profile-reward-grid small{display:block}.profile-action-grid b,.profile-reward-grid b{font-size:10px}.profile-action-grid small,.profile-reward-grid small{margin-top:3px;color:var(--muted);font-size:7px}
.profile-action-grid>button>.svg-icon:last-child,.profile-reward-grid>button>.svg-icon:last-child{width:12px;height:12px;color:var(--muted)}.profile-reward-grid em{font-size:8px;font-style:normal;color:var(--cyan)}
.profile-reward-grid>button.claimed{opacity:.58}
.knowledge-matrix{padding:16px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px;align-items:center}
.knowledge-overview{display:grid;gap:12px;justify-items:center}.knowledge-ring{--p:calc(var(--knowledge)*1%);width:160px;height:160px;border-radius:8px;display:grid;place-items:center;background:conic-gradient(var(--cyan) var(--p),var(--surface-2) 0);position:relative}
.knowledge-ring:before{content:"";position:absolute;inset:14px;border-radius:8px;background:var(--surface)}
.knowledge-ring>div{position:relative;text-align:center}.knowledge-ring strong,.knowledge-ring span{display:block}.knowledge-ring strong{font:800 28px var(--font-display)}.knowledge-ring span{margin-top:3px;color:var(--muted);font-size:8px}
.knowledge-numbers{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.knowledge-numbers article{padding:8px 4px;border-radius:8px;background:var(--surface-2);text-align:center}.knowledge-numbers strong,.knowledge-numbers span{display:block}.knowledge-numbers strong{font-size:11px}.knowledge-numbers span{margin-top:3px;color:var(--muted);font-size:6px}
.knowledge-lanes{display:grid;gap:8px}.knowledge-lane{display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;align-items:center}.knowledge-lane-icon{width:40px;height:40px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.knowledge-lane-icon .svg-icon{width:18px;height:18px}.knowledge-lane>div{min-width:0}.knowledge-lane-title{display:flex;justify-content:space-between;gap:8px}.knowledge-lane-title b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.knowledge-lane-title strong{font-size:8px}.knowledge-lane-bar{height:6px;margin-top:6px;border-radius:8px;background:var(--surface-2);overflow:hidden}.knowledge-lane-bar i{display:block;height:100%;background:linear-gradient(90deg,#7dd4de,#08738d)}.knowledge-lane small{display:block;margin-top:3px;color:var(--muted);font-size:6px}

/* Spin */
.spin-center{width:min(100%,720px);margin:0 auto;display:grid;gap:13px}
.spin-summary{padding:14px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:1fr 1fr;gap:10px}.spin-summary article{padding:8px 10px;border-radius:8px;background:var(--surface-2)}.spin-summary span,.spin-summary strong{display:block}.spin-summary span{color:var(--muted);font-size:7px}.spin-summary strong{margin-top:3px;font:800 17px var(--font-display)}.spin-progress{grid-column:1/-1;height:6px;border-radius:8px;background:var(--surface-2);overflow:hidden}.spin-progress i{display:block;height:100%;background:var(--orange)}
.spin-wheel-shell{position:relative;display:grid;place-items:center;padding:2px 0}.spin-pointer{position:absolute;top:-2px;z-index:3;width:44px;height:44px;color:var(--orange)}.spin-pointer .svg-icon{width:44px;height:44px}
.spin-wheel-svg{width:min(88vw,430px);max-width:100%;transform-origin:50% 50%;will-change:transform}
.spin-action{min-height:50px!important;border-radius:8px!important}.spin-action.loading{pointer-events:none;opacity:.75}.spin-result-modern{padding:12px 14px;border-radius:8px;background:color-mix(in srgb,var(--success) 18%,var(--surface));display:flex;align-items:center;gap:10px}.spin-result-modern.hidden{display:none}.spin-result-modern>.svg-icon{width:26px;height:26px;color:var(--success)}.spin-result-modern b,.spin-result-modern small{display:block}.spin-result-modern b{font-size:11px}.spin-result-modern small{color:var(--muted);font-size:7px}
.spin-prizes-modern>div:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.spin-prizes-modern article{padding:10px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;align-items:center}.spin-prizes-modern article>span{width:38px;height:38px;border-radius:8px;background:color-mix(in srgb,var(--reward) 18%,var(--surface-2));color:var(--reward);display:grid;place-items:center}.spin-prizes-modern b,.spin-prizes-modern small{display:block}.spin-prizes-modern b{font-size:9px}.spin-prizes-modern small{margin-top:3px;color:var(--muted);font-size:7px}

/* Shop */
.shop-center{width:min(100%,860px);margin:0 auto;display:grid;gap:13px}.shop-wallet{padding:16px;border-radius:8px;background:linear-gradient(135deg,#0c607a,#0d7890);color:#fff;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.7fr);gap:12px;align-items:stretch}.shop-wallet>div{display:grid;align-content:center}.shop-wallet>div>span{display:flex;align-items:center;gap:6px;font-size:8px;opacity:.78}.shop-wallet strong{margin-top:6px;font:800 clamp(32px,8vw,48px) var(--font-display)}.shop-wallet small{margin-top:6px;max-width:360px;font-size:8px;line-height:1.45;opacity:.74}.shop-wallet>button{min-width:0;padding:12px;border-radius:8px;background:rgba(255,255,255,.12);color:#fff;display:grid;grid-template-columns:40px minmax(0,1fr) 14px;gap:10px;align-items:center;text-align:left}.shop-wallet>button>.svg-icon:first-child{width:40px;height:40px;padding:10px;border-radius:8px;background:var(--orange)}.shop-wallet>button b,.shop-wallet>button small{display:block}.shop-wallet>button b{font-size:10px}.shop-wallet>button small{margin-top:3px;font-size:7px;opacity:.7}
.shop-nav{padding:5px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:repeat(3,1fr);gap:5px;position:sticky;top:0;z-index:4}.shop-nav button{height:42px;border-radius:8px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:7px;font-size:8px;font-weight:800}.shop-nav button.active{background:var(--surface-2);color:var(--text)}.shop-nav .svg-icon{width:15px;height:15px}
.shop-content,.shop-section-modern{display:grid;gap:12px}.shop-section-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-end}.shop-section-title h2{font:800 16px var(--font-display)}.shop-section-title p{margin-top:4px;color:var(--muted);font-size:8px}
.coin-offer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.coin-offer{min-width:0;padding:14px;border-radius:8px;background:var(--surface);display:flex;flex-direction:column;gap:11px}.coin-offer.featured{background:linear-gradient(160deg,color-mix(in srgb,var(--cyan) 18%,var(--surface)),var(--surface))}.coin-offer-head{display:flex;justify-content:space-between;align-items:center}.coin-offer-head>span{width:40px;height:40px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.coin-offer-head em{padding:5px 8px;border-radius:8px;background:var(--orange);color:#fff;font-size:6px;font-style:normal;font-weight:900}.coin-offer-value strong,.coin-offer-value span{display:block}.coin-offer-value strong{font:800 26px var(--font-display)}.coin-offer-value span{color:var(--muted);font-size:8px}.coin-offer p{min-height:20px;color:var(--muted);font-size:8px}.coin-offer .button{margin-top:auto}
.booster-shop-list{display:grid;gap:8px}.booster-shop-item{padding:12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:11px;align-items:center}.booster-shop-icon{width:46px;height:46px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.booster-shop-copy{min-width:0}.booster-shop-copy>div{display:flex;justify-content:space-between;gap:8px}.booster-shop-copy h3{font-size:11px}.booster-shop-copy em{font-size:8px;font-style:normal;color:var(--muted)}.booster-shop-copy p{margin-top:4px;color:var(--muted);font-size:8px;line-height:1.4}.booster-shop-buy{display:flex;align-items:center;gap:9px}.booster-shop-buy b{display:flex;align-items:center;gap:4px;font-size:9px}.booster-shop-buy .button{min-width:90px}
.shop-plus-modern{padding:17px;border-radius:8px;background:var(--surface);display:grid;gap:15px}.shop-plus-brand{display:flex;align-items:center;gap:12px}.shop-plus-brand>.svg-icon{width:48px;height:48px;padding:13px;border-radius:8px;background:var(--orange);color:#fff}.shop-plus-brand span{color:var(--muted);font-size:8px}.shop-plus-brand h2{margin-top:3px;font:800 19px var(--font-display)}.shop-plus-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shop-plus-benefits article{padding:11px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;gap:8px;font-size:8px}.shop-plus-benefits .svg-icon{width:16px;height:16px;color:var(--success)}.shop-plus-active{padding:12px;border-radius:8px;background:color-mix(in srgb,var(--success) 15%,var(--surface-2));display:flex;align-items:center;gap:10px}.shop-plus-active>.svg-icon{width:22px;height:22px;color:var(--success)}.shop-plus-active b,.shop-plus-active small{display:block}.shop-plus-active b{font-size:10px}.shop-plus-active small{margin-top:3px;color:var(--muted);font-size:7px}
.shop-history-modern{display:grid;gap:7px}.shop-history-modern article{padding:11px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;align-items:center}.shop-history-modern article>.svg-icon{width:20px;height:20px;color:var(--success)}.shop-history-modern b,.shop-history-modern small{display:block}.shop-history-modern b{font-size:9px}.shop-history-modern small{margin-top:3px;color:var(--muted);font-size:7px}.shop-history-modern strong{font-size:8px}.shop-history-empty{padding:22px;border-radius:8px;background:var(--surface);display:grid;place-items:center;gap:8px;color:var(--muted);font-size:8px}.shop-history-empty .svg-icon{width:28px;height:28px}

/* Quiz catalog */
.quiz-catalog-page{width:100%}.quiz-catalog-hero{padding:17px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.quiz-catalog-hero h1{font:800 clamp(22px,6vw,34px)/1.08 var(--font-display)}.quiz-catalog-hero p{margin-top:7px;color:var(--muted);font-size:9px;line-height:1.45}.quiz-create-cta{min-height:48px;padding:0 14px;border-radius:8px;background:var(--surface-2);color:var(--text);display:flex;align-items:center;gap:8px;font-size:8px;font-weight:850}.quiz-create-cta.plus-active{background:var(--blue);color:#fff}.quiz-create-cta .svg-icon{width:16px;height:16px}
.quiz-toolbar{padding:8px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr);gap:8px}.quiz-search-modern{height:44px;padding:0 12px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;gap:8px}.quiz-search-modern .svg-icon{width:16px;height:16px;color:var(--muted)}.quiz-search-modern input{width:100%;min-width:0;background:transparent;color:var(--text);font-size:10px}.quiz-type-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.quiz-type-tabs button{min-width:0;height:44px;padding:0 5px;border-radius:8px;background:transparent;color:var(--muted);font-size:7px;font-weight:850}.quiz-type-tabs button.active{background:var(--surface-2);color:var(--text)}
.quiz-category-section{min-width:0}.quiz-category-strip{display:flex;gap:7px;overflow-x:auto;padding-bottom:3px;scrollbar-width:none}.quiz-category-strip::-webkit-scrollbar{display:none}.quiz-category-chip{flex:0 0 auto;height:42px;padding:0 12px;border-radius:8px;background:var(--surface);color:var(--muted);display:flex;align-items:center;gap:7px;font-size:8px;font-weight:800}.quiz-category-chip.active{background:var(--blue);color:#fff}.quiz-category-chip .svg-icon{width:15px;height:15px}
.quiz-catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quiz-catalog-summary{grid-column:1/-1;padding:10px 12px;border-radius:8px;background:var(--surface);display:flex;justify-content:space-between;color:var(--muted);font-size:8px}.quiz-catalog-summary b{color:var(--text);font-size:10px}
.quiz-catalog-card{min-width:0;padding:14px;border-radius:8px;background:var(--surface);display:flex;flex-direction:column;gap:11px}.quiz-card-top{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center}.quiz-card-icon{width:42px;height:42px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.quiz-card-title{min-width:0}.quiz-card-title small{display:block;color:var(--muted);font-size:6px}.quiz-card-title h3{margin-top:3px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quiz-card-price{height:28px;padding:0 9px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;gap:4px;font-size:7px;font-weight:850}.quiz-card-price.free{color:var(--success)}.quiz-card-price.paid{color:var(--orange)}.quiz-card-description{min-height:32px;color:var(--muted);font-size:8px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.quiz-card-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.quiz-card-metrics>span{padding:8px 5px;border-radius:8px;background:var(--surface-2);display:grid;grid-template-columns:16px 1fr;grid-template-rows:auto auto;align-items:center}.quiz-card-metrics .svg-icon{grid-row:1/3;width:14px;height:14px;color:var(--cyan)}.quiz-card-metrics b{font-size:8px}.quiz-card-metrics small{color:var(--muted);font-size:6px}.quiz-card-actions{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:9px}.quiz-mode-pill{padding:7px 9px;border-radius:8px;background:var(--surface-2);color:var(--muted);font-size:7px;font-weight:800}.quiz-card-actions .button{min-height:38px;padding-inline:14px}

/* Chat */
.friend-chat{width:min(100%,760px);height:calc(var(--tg-viewport-stable-height,100dvh) - var(--app-top-inset,74px) - 76px);min-height:480px;margin:0 auto;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:8px}
.friend-chat-head{padding:9px 10px;border-radius:8px;background:var(--surface);display:flex;justify-content:space-between;align-items:center;gap:10px}.friend-chat-person{min-width:0;display:flex;align-items:center;gap:9px;color:var(--text);text-align:left}.friend-chat-person .avatar{width:44px!important;height:44px!important;flex:0 0 44px!important;border-radius:8px!important;overflow:hidden}.friend-chat-person .avatar img{width:100%;height:100%;object-fit:cover}.friend-chat-person span{min-width:0}.friend-chat-person b,.friend-chat-person small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-chat-person b{font-size:10px}.friend-chat-person small{margin-top:3px;color:var(--muted);font-size:7px}.friend-chat-head>div{display:flex;gap:6px}.friend-chat-head>div button{height:38px;padding:0 10px;border-radius:8px;background:var(--surface-2);color:var(--text);display:flex;align-items:center;gap:6px;font-size:7px;font-weight:800}.friend-chat-head>div .svg-icon{width:15px;height:15px}
.friend-chat-messages{min-height:0;padding:12px;border-radius:8px;background:var(--surface);overflow-y:auto;display:flex;flex-direction:column;gap:7px}.chat-bubble{max-width:78%;padding:10px 12px;border-radius:8px;background:var(--surface-2);align-self:flex-start}.chat-bubble.mine{align-self:flex-end;border-radius:8px;background:var(--blue);color:#fff}.chat-bubble p{font-size:12px;line-height:1.45;overflow-wrap:anywhere}.chat-bubble time{display:block;margin-top:4px;color:var(--muted);font-size:6px;text-align:right}.chat-bubble.mine time{color:rgba(255,255,255,.65)}
.friend-chat-replies{display:grid;gap:5px}.friend-chat-replies>span{color:var(--muted);font-size:6px;text-transform:uppercase;font-weight:850}.friend-chat-replies>div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.friend-chat-replies button{flex:0 0 auto;height:32px;padding:0 10px;border-radius:8px;background:var(--surface);color:var(--text);font-size:7px}
.friend-chat-compose{padding:6px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:6px}.friend-chat-compose input{min-width:0;height:42px;padding:0 10px;background:var(--surface-2);color:var(--text);border-radius:8px;font-size:11px}.friend-chat-compose button{width:42px;height:42px;border-radius:8px;background:var(--blue);color:#fff;display:grid;place-items:center}.friend-chat-compose .svg-icon{width:17px;height:17px}

/* Toast */
.toast{top:calc(var(--app-top-inset,72px) + 8px)!important;left:50%!important;right:auto!important;bottom:auto!important;width:min(calc(100% - 24px),520px)!important;transform:translate(-50%,-12px)!important;min-height:50px!important;padding:10px 12px!important;border-radius:8px!important;font-size:9px!important}
.toast.show{transform:translate(-50%,0)!important}

/* responsive */
@media(max-width:760px){
  .knowledge-matrix{grid-template-columns:1fr}.knowledge-overview{grid-template-columns:150px minmax(0,1fr);align-items:center;justify-items:stretch}.knowledge-ring{width:150px;height:150px}.knowledge-numbers{grid-template-columns:1fr}
  .shop-wallet{grid-template-columns:1fr}.coin-offer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quiz-toolbar{grid-template-columns:1fr}.quiz-catalog-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  :root{--ux-pad:10px;--ux-gap:10px}
  .profile-command-card{padding:13px}.profile-command-main{grid-template-columns:72px minmax(0,1fr);gap:11px}.profile-avatar-frame,.profile-avatar-frame .avatar{width:72px!important;height:72px!important}.profile-command-copy h1{font-size:22px}
  .profile-stats-inline{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-action-grid,.profile-reward-grid{grid-template-columns:1fr}
  .knowledge-overview{grid-template-columns:1fr}.knowledge-ring{width:138px;height:138px}.knowledge-numbers{grid-template-columns:repeat(3,1fr)}
  .spin-wheel-svg{width:min(92vw,390px)}.spin-prizes-modern>div:last-child{grid-template-columns:1fr 1fr}
  .coin-offer-grid{grid-template-columns:1fr}.shop-plus-benefits{grid-template-columns:1fr}.booster-shop-item{grid-template-columns:42px minmax(0,1fr)}.booster-shop-buy{grid-column:1/-1;justify-content:space-between}.booster-shop-buy .button{min-width:120px}
  .quiz-catalog-hero{grid-template-columns:1fr}.quiz-create-cta{width:100%;justify-content:center}.quiz-type-tabs{display:flex;overflow-x:auto}.quiz-type-tabs button{flex:0 0 auto;padding:0 13px}.quiz-card-top{grid-template-columns:40px minmax(0,1fr)}.quiz-card-price{grid-column:2;justify-self:start}
  .game-match{gap:6px}.game-match-score{min-height:54px;grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);padding:7px}.game-player>span{width:32px;height:32px;flex-basis:32px}.game-round-badge{height:42px}.game-hud{padding:8px}.game-question-stage{padding:11px;gap:9px}.game-question-copy h2{font-size:clamp(16px,5.2vw,22px)}.game-answer-grid{gap:7px;grid-auto-rows:minmax(56px,1fr)}.game-answer{min-height:56px;padding:8px;font-size:10px}.game-booster-bar{gap:5px;padding:5px}.game-booster{height:46px}.game-booster>span{width:26px;height:26px}.game-booster small{font-size:5px}
  .friend-chat{height:calc(var(--tg-viewport-stable-height,100dvh) - var(--app-top-inset,74px) - 68px)}.friend-chat-head>div button span{display:none}.friend-chat-head>div button{width:38px;padding:0;justify-content:center}.chat-bubble{max-width:88%}.chat-bubble p{font-size:11px}
}
@media(max-width:350px){
  .game-player>span{display:none}.game-player b{font-size:8px}.game-hud-meta{font-size:6px}.game-hud-meta b{font-size:8px}.game-answer{font-size:9px}.spin-prizes-modern>div:last-child{grid-template-columns:1fr}
  .profile-command-main{grid-template-columns:64px minmax(0,1fr)}.profile-avatar-frame,.profile-avatar-frame .avatar{width:64px!important;height:64px!important}
}
@media(min-width:900px){
  .coin-offer-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .quiz-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-action-grid,.profile-reward-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}


/* QuizTop 1.8.1 — viewport and gameplay diagnostics fixes */
.game-round-track>div{grid-template-columns:repeat(var(--round-size,3),minmax(0,1fr))!important}
.game-question-stage{
  align-self:center!important;
  width:100%!important;
  max-height:min(58vh,470px)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:clamp(10px,1.8vh,16px)!important;
}
.game-question-copy{align-content:center!important;flex:0 0 auto!important}
.game-answer-grid{
  flex:0 0 auto!important;
  grid-template-rows:repeat(2,minmax(60px,84px))!important;
  grid-auto-rows:unset!important;
}
.game-answer{height:100%!important}
.game-feedback-modern small{white-space:normal!important;line-height:1.35!important}
@media(max-width:520px){
  .game-question-stage{max-height:min(56vh,420px)!important}
  .game-answer-grid{grid-template-rows:repeat(2,minmax(56px,74px))!important}
  .game-match-score{min-height:50px!important}
  .game-hud{padding:7px 8px!important}
}
@media(max-height:690px){
  .game-overlay .overlay-content{overflow-y:auto!important}
  .game-match{height:auto!important;min-height:0!important;grid-template-rows:auto auto auto auto!important;padding-bottom:4px!important}
  .game-question-stage{align-self:stretch!important;max-height:none!important}
  .game-answer-grid{grid-template-rows:repeat(2,minmax(52px,66px))!important}
  .game-booster{height:44px!important}
}
@media(max-height:560px) and (orientation:landscape){
  .game-match{grid-template-columns:minmax(240px,.8fr) minmax(360px,1.2fr);grid-template-rows:auto 1fr auto!important;gap:7px!important}
  .game-match-score{grid-column:1;grid-row:1}.game-hud{grid-column:1;grid-row:2}.game-question-stage{grid-column:2;grid-row:1/4}.game-booster-bar{grid-column:1;grid-row:3}
  .game-question-stage{padding:9px!important}.game-question-copy h2{font-size:17px!important}.game-answer-grid{grid-template-rows:repeat(2,minmax(48px,58px))!important}
}


/* QuizTop precision UX repair */
:root{--qt-card:var(--surface);--qt-card-2:var(--surface-2);--qt-accent:#79cbd8;--qt-deep:#0f607a}
html[data-theme="dark"]{--qt-card:#111d2c;--qt-card-2:#18283a;--qt-page:#07131f;--qt-muted:#8294a7}
html[data-theme="light"]{--qt-card:#fff;--qt-card-2:#eef3f1;--qt-page:#f7f3e8;--qt-muted:#6f7e86}
body,.app-shell,.overlay{background:var(--qt-page)!important}
.leader-row.player-open,.podium-card{cursor:pointer;transition:transform .16s ease,background .16s ease}.leader-row.player-open:active,.podium-card:active{transform:scale(.99)}
.leader-row.player-open:hover{background:var(--qt-card-2)}

/* Profile */
.profile-page-v2{gap:14px!important}.profile-hero-v2{padding:18px;border-radius:8px;background:var(--qt-card);display:grid;grid-template-columns:92px minmax(0,1fr);gap:15px;align-items:center}.profile-avatar-v2{position:relative;width:92px;height:92px}.profile-avatar-v2 .avatar{width:92px!important;height:92px!important;border-radius:8px!important;overflow:hidden!important;background:var(--qt-card-2)!important}.profile-avatar-v2 .avatar img{width:100%!important;height:100%!important;object-fit:cover!important}.profile-avatar-v2 em{position:absolute;right:-4px;bottom:-4px;padding:5px 7px;border-radius:8px;background:#ff7e38;color:#fff;font-size:7px;font-style:normal;font-weight:900}.profile-identity-v2{min-width:0}.profile-identity-v2>small{color:var(--qt-accent);font-size:7px;font-weight:900;text-transform:uppercase;letter-spacing:.7px}.profile-identity-v2 h1{margin:5px 0 3px;font:800 clamp(20px,6vw,32px) var(--font-display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-identity-v2 p{color:var(--muted);font-size:9px}.profile-identity-v2>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.profile-identity-v2>div span{padding:6px 9px;border-radius:8px;background:var(--qt-card-2);font-size:7px;font-weight:800}.profile-level-v2{grid-column:1/-1;margin-top:2px}.profile-level-v2>div{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:8px}.profile-level-v2>div b{color:var(--text)}.profile-level-v2>i{display:block;height:7px;margin-top:7px;border-radius:8px;background:var(--qt-card-2);overflow:hidden}.profile-level-v2>i u{display:block;height:100%;background:linear-gradient(90deg,#79cbd8,#0d708b);text-decoration:none;border-radius:8px}.profile-metrics-v2{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.profile-metrics-v2 article{min-width:0;min-height:92px;padding:12px 8px;border-radius:8px;background:var(--qt-card);display:grid;place-items:center;align-content:center;text-align:center}.profile-metrics-v2 article>span{color:var(--qt-accent);height:22px}.profile-metrics-v2 .svg-icon{width:20px;height:20px}.profile-metrics-v2 strong{margin-top:5px;font:800 17px var(--font-display)}.profile-metrics-v2 small{margin-top:4px;color:var(--muted);font-size:7px}.profile-actions-v2,.profile-utility-v2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profile-actions-v2 button,.profile-utility-v2 button{min-width:0;min-height:74px;padding:11px;border-radius:8px;background:var(--qt-card);color:var(--text);display:grid;grid-template-columns:38px minmax(0,1fr) 16px;gap:9px;align-items:center;text-align:left}.profile-actions-v2 button>.svg-icon:first-child,.profile-utility-v2 button>.svg-icon:first-child{width:38px;height:38px;padding:9px;border-radius:8px;background:var(--qt-card-2);color:var(--qt-accent)}.profile-actions-v2 button>span,.profile-utility-v2 button>span{min-width:0}.profile-actions-v2 b,.profile-utility-v2 b{display:block;font-size:10px}.profile-actions-v2 small,.profile-utility-v2 small{display:block;margin-top:3px;color:var(--muted);font-size:7px}.profile-utility-v2 em{font-size:8px;font-style:normal;color:var(--qt-accent);font-weight:900}.profile-utility-v2 button.done{opacity:.72}.knowledge-dashboard-v2{padding:16px;border-radius:8px;background:var(--qt-card);display:grid;grid-template-columns:210px minmax(0,1fr);gap:18px;align-items:center}.knowledge-score-v2{display:grid;gap:11px;justify-items:center}.knowledge-ring-v2{--p:calc(var(--knowledge)*1%);width:148px;height:148px;border-radius:8px;display:grid;place-items:center;background:conic-gradient(var(--qt-accent) var(--p),var(--qt-card-2) 0);position:relative}.knowledge-ring-v2:before{content:"";position:absolute;inset:16px;border-radius:8px;background:var(--qt-card)}.knowledge-ring-v2>div{position:relative;text-align:center}.knowledge-ring-v2 strong{display:block;font:800 28px var(--font-display)}.knowledge-ring-v2 span{display:block;margin-top:3px;color:var(--muted);font-size:8px}.knowledge-summary-v2{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.knowledge-summary-v2 article{padding:8px 4px;border-radius:8px;background:var(--qt-card-2);text-align:center}.knowledge-summary-v2 strong,.knowledge-summary-v2 span{display:block}.knowledge-summary-v2 strong{font-size:11px}.knowledge-summary-v2 span{margin-top:3px;color:var(--muted);font-size:6px}.knowledge-list-v2{display:grid;gap:11px}.knowledge-list-v2 article>div{display:flex;justify-content:space-between;gap:9px}.knowledge-list-v2 b,.knowledge-list-v2 span{font-size:9px}.knowledge-list-v2 i{display:block;height:7px;margin-top:6px;border-radius:8px;background:var(--qt-card-2);overflow:hidden}.knowledge-list-v2 u{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#79cbd8,#0d708b);text-decoration:none}.knowledge-list-v2 small{display:block;margin-top:3px;color:var(--muted);font-size:6px}.channel-card-v2,.wordsbuster-card{padding:15px;border-radius:8px;background:var(--qt-card);display:grid;align-items:center;gap:12px}.channel-card-v2{grid-template-columns:46px minmax(0,1fr) auto}.channel-card-v2>span{width:46px;height:46px;border-radius:8px;background:#229ed9;color:#fff;display:grid;place-items:center}.channel-card-v2 h3{font-size:12px}.channel-card-v2 small{color:var(--qt-accent);font-size:7px;font-weight:900;text-transform:uppercase}.channel-card-v2 p{margin-top:4px;color:var(--muted);font-size:7px;line-height:1.45}.channel-card-v2 button{min-height:40px;padding:0 12px;border-radius:8px;background:var(--blue);color:#fff;font-size:8px;font-weight:850}.channel-card-v2.claimed button{background:var(--success)}.wordsbuster-card{grid-template-columns:76px minmax(0,1fr)}.wordsbuster-card img{width:76px;height:76px;object-fit:contain}.wordsbuster-card small{color:#80cc32;font-size:8px;font-weight:900;text-transform:uppercase}.wordsbuster-card h3{margin:4px 0 9px;font-size:11px;line-height:1.35}.wordsbuster-card a{display:inline-flex;align-items:center;gap:6px;color:var(--qt-accent);font-size:8px;font-weight:900}.wordsbuster-card a .svg-icon{width:13px;height:13px}

/* Spin */
.spin-center{max-width:680px!important;gap:12px!important}.spin-summary{padding:16px!important;border-radius:8px!important;background:var(--qt-card)!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.spin-summary article{background:var(--qt-card-2)!important;border-radius:8px!important;padding:12px!important}.spin-progress-label{grid-column:1/-1;display:flex;justify-content:space-between;color:var(--muted);font-size:8px}.spin-progress-label b{color:var(--text)}.spin-progress{grid-column:1/-1!important;height:8px!important;background:var(--qt-card-2)!important}.spin-wheel-shell{padding:12px 0 2px!important}.spin-wheel-svg{width:min(82vw,390px)!important;filter:drop-shadow(0 18px 28px rgba(0,0,0,.18))}.spin-pointer{top:0!important;color:#ff7e38!important;filter:drop-shadow(0 4px 6px rgba(0,0,0,.25))}.spin-action{min-height:52px!important;border-radius:8px!important}.spin-prizes-modern>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))!important}.spin-prizes-modern article{min-height:66px;padding:11px!important;border-radius:8px!important;background:var(--qt-card)!important}.spin-result-modern{background:var(--qt-card)!important;border-radius:8px!important}

/* Game/result */
.game-question-copy>span{display:none!important}.game-question-stage{gap:11px!important}.game-question-copy h2{margin:0!important}.game-round-track i.passed{background:var(--qt-card-2)!important}.game-round-track i.correct{background:var(--success)!important}.game-round-track i.wrong{background:var(--danger)!important}.result-ranking-info{margin:12px 0;padding:13px;border-radius:8px;background:var(--qt-card);display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px}.result-ranking-info>.svg-icon{width:34px;height:34px;padding:8px;border-radius:8px;background:var(--qt-card-2);color:var(--qt-accent)}.result-ranking-info b{font-size:9px}.result-ranking-info p{margin-top:3px;color:var(--muted);font-size:7px;line-height:1.45}.result-performance{margin:12px 0 18px!important;gap:8px!important}.result-performance article{min-height:72px!important;background:var(--qt-card)!important;border-radius:8px!important}.result-player-section{margin-top:4px!important;padding-top:0!important}.result-player-section .leader-list{display:grid;gap:7px}.result-player-section .leader-row{background:var(--qt-card)!important}.player-shared-stat{min-height:52px;padding:10px 12px;border-radius:8px;background:var(--qt-card-2);display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;align-items:center}.player-shared-stat .svg-icon{width:18px;height:18px;color:var(--qt-accent)}

/* Friends/chat */
.friend-avatar-v3{width:52px!important;height:52px!important;flex:0 0 52px!important;position:relative}.friend-avatar-v3 .avatar{width:52px!important;height:52px!important;border-radius:8px!important;overflow:hidden!important}.friend-avatar-v3 .avatar img{width:100%!important;height:100%!important;object-fit:cover!important}.friend-meta-v3 span{display:inline-flex!important;align-items:center;gap:5px;min-height:26px;padding:0 8px;border-radius:8px;background:var(--qt-card-2);white-space:normal!important;line-height:1.2}.friend-meta-v3 .svg-icon{width:12px!important;height:12px!important}.friend-chat{height:calc(var(--tg-viewport-stable-height,100dvh) - var(--app-top-inset,74px) - 54px - var(--qt-keyboard-height,0px))!important;transition:height .18s ease}.friend-chat-person .avatar{width:46px!important;height:46px!important;flex:0 0 46px!important}.friend-chat-messages{scroll-padding-bottom:20px}.qt-keyboard-open .overlay-content{padding-bottom:calc(var(--qt-keyboard-height,310px) + 16px)!important}.qt-keyboard-open .friend-chat{height:calc(var(--tg-viewport-stable-height,100dvh) - var(--app-top-inset,74px) - var(--qt-keyboard-height,310px) - 20px)!important}.plus-locked-setting em{padding:5px 7px;border-radius:8px;background:#ff7e38;color:#fff;font-size:7px;font-style:normal;font-weight:900}

@media(max-width:700px){.knowledge-dashboard-v2{grid-template-columns:1fr}.knowledge-score-v2{grid-template-columns:140px minmax(0,1fr);align-items:center}.knowledge-summary-v2{grid-template-columns:1fr}.profile-metrics-v2{grid-template-columns:repeat(2,minmax(0,1fr))}.channel-card-v2{grid-template-columns:42px minmax(0,1fr)}.channel-card-v2 button{grid-column:1/-1;width:100%}.spin-wheel-svg{width:min(90vw,390px)!important}}
@media(max-width:390px){.profile-hero-v2{grid-template-columns:72px minmax(0,1fr);padding:14px}.profile-avatar-v2,.profile-avatar-v2 .avatar{width:72px!important;height:72px!important}.profile-actions-v2,.profile-utility-v2{grid-template-columns:1fr}.profile-metrics-v2 article{min-height:78px}.knowledge-score-v2{grid-template-columns:1fr}.knowledge-ring-v2{width:132px;height:132px}.wordsbuster-card{grid-template-columns:60px minmax(0,1fr)}.wordsbuster-card img{width:60px;height:60px}.spin-prizes-modern>div:last-child{grid-template-columns:1fr!important}.game-answer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.game-answer{font-size:9px!important}}

/* Final precision pass: borderless surfaces, stable cards and theme parity */
.profile-hero-v2,.profile-metrics-v2 article,.profile-actions-v2 button,.profile-utility-v2 button,
.knowledge-dashboard-v2,.channel-card-v2,.wordsbuster-card,.spin-summary,.spin-summary article,
.spin-prizes-modern article,.result-ranking-info,.result-performance article,.result-player-section .leader-row,
.friend-card-v3,.friend-suggestion-v3,.friend-request-v3,.friend-block-v3,.friend-chat,
.leader-row.player-open,.podium-card{
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
}
.friend-card-v3,.friend-suggestion-v3,.friend-request-v3,.friend-block-v3{background:var(--qt-card)!important}
.friend-card-v3.favorite{background:color-mix(in srgb,var(--qt-accent) 10%,var(--qt-card))!important}
.friend-meta-v3 span,.friend-meta-v3 strong{background:var(--qt-card-2)!important}
.friend-meta-v3 strong{color:var(--orange)!important}
.result-performance{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:22px!important}
.result-player-section{clear:both!important;margin-top:0!important}
.result-player-section .leader-list{margin-top:0!important}
.spin-pointer{width:46px!important;height:38px!important;display:grid!important;place-items:center!important;left:50%!important;transform:translateX(-50%)!important;z-index:4!important}
.spin-pointer .svg-icon{width:42px!important;height:34px!important;color:#ff7e38!important;filter:drop-shadow(0 4px 5px rgba(0,0,0,.24))}
.spin-wheel-shell{overflow:visible!important}
.spin-wheel-svg{display:block!important;margin-inline:auto!important;max-width:100%!important}
.channel-card-v2 button:disabled{opacity:1!important;cursor:default!important}
.wordsbuster-card img{display:block!important;border-radius:8px!important;background:transparent!important}
html[data-theme="dark"] .leader-row.player-open,
html[data-theme="dark"] .podium-card,
html[data-theme="dark"] .friend-card-v3,
html[data-theme="dark"] .friend-suggestion-v3,
html[data-theme="dark"] .friend-request-v3,
html[data-theme="dark"] .friend-block-v3{background:#111d2c!important}
html[data-theme="light"] .leader-row.player-open,
html[data-theme="light"] .podium-card,
html[data-theme="light"] .friend-card-v3,
html[data-theme="light"] .friend-suggestion-v3,
html[data-theme="light"] .friend-request-v3,
html[data-theme="light"] .friend-block-v3{background:#fff!important}
@media(max-width:520px){
  .profile-page-v2{gap:10px!important}
  .profile-hero-v2{grid-template-columns:76px minmax(0,1fr)!important;gap:12px!important;padding:14px!important}
  .profile-avatar-v2,.profile-avatar-v2 .avatar{width:76px!important;height:76px!important}
  .profile-identity-v2 h1{font-size:20px!important}
  .profile-metrics-v2{gap:6px!important}
  .profile-metrics-v2 article{min-height:76px!important;padding:9px 5px!important}
  .profile-actions-v2 button,.profile-utility-v2 button{min-height:66px!important}
  .knowledge-dashboard-v2{padding:13px!important;gap:13px!important}
  .channel-card-v2,.wordsbuster-card{padding:13px!important}
  .result-performance{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .friend-card-v3{grid-template-columns:52px minmax(0,1fr)!important;padding:11px!important}
  .friend-actions-v3{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr 40px!important}
  .friend-actions-v3 button{width:100%!important}
  .friend-actions-v3 button span{display:inline!important}
}

/* Two-level referral system */
.referral-card-v2{display:grid;gap:14px}
.referral-card-v2 .referral-card-head{margin-bottom:0}
.referral-level-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.referral-level-card{min-width:0;padding:14px;border-radius:8px;background:var(--soft);display:grid;gap:12px;overflow:hidden}
.referral-level-card.level-1{background:color-mix(in srgb,var(--cyan) 12%,var(--surface))}
.referral-level-card.level-2{background:color-mix(in srgb,var(--orange) 10%,var(--surface))}
.referral-level-head{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center}
.referral-level-head>span{width:38px;height:38px;border-radius:8px;display:grid;place-items:center;background:var(--surface);color:var(--cyan);font:800 15px var(--font-display)}
.referral-level-card.level-2 .referral-level-head>span{color:var(--orange)}
.referral-level-head h4{font:750 12px var(--font-display);line-height:1.2}
.referral-level-head p{margin-top:4px!important;font-size:8px!important;line-height:1.4!important;color:var(--muted)}
.referral-level-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.referral-level-stats>div{min-width:0;padding:9px 5px;border-radius:8px;background:color-mix(in srgb,var(--surface) 82%,transparent);text-align:center}
.referral-level-stats strong{display:block;font-size:13px;line-height:1}
.referral-level-stats small{display:block;margin-top:4px;color:var(--muted);font-size:6px;line-height:1.25;overflow-wrap:anywhere}
.referral-reward-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.referral-reward-row>span{min-width:0;padding:8px 5px;border-radius:8px;background:color-mix(in srgb,var(--surface) 68%,transparent);color:var(--muted);font-size:6px;line-height:1.25;text-align:center}
.referral-reward-row b{display:block;margin-bottom:3px;color:var(--text);font-size:10px}
.referral-people-group{display:grid;gap:8px}
.referral-people-title{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center}
.referral-people-title>span{width:28px;height:28px;border-radius:8px;background:var(--soft);color:var(--cyan);display:grid;place-items:center;font-weight:800;font-size:10px}
.referral-people-title b{font-size:10px}
.referral-people-title small{color:var(--muted);font-size:8px}
.referral-card-v2 .referral-person{grid-template-columns:40px minmax(0,1fr) 22px;padding:9px 10px}
.referral-card-v2 .referral-person img,.referral-card-v2 .referral-person .avatar{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;object-fit:cover;border-radius:8px}
html[data-theme="light"] .referral-level-card.level-1{background:#eaf6f8}
html[data-theme="light"] .referral-level-card.level-2{background:#fff1e8}
html[data-theme="light"] .referral-level-stats>div,html[data-theme="light"] .referral-reward-row>span{background:#fff}
html[data-theme="dark"] .referral-level-card.level-1{background:#132737}
html[data-theme="dark"] .referral-level-card.level-2{background:#2b211e}
html[data-theme="dark"] .referral-level-stats>div,html[data-theme="dark"] .referral-reward-row>span{background:#101a28}
@media(max-width:620px){
  .referral-level-grid{grid-template-columns:1fr}
  .referral-level-card{padding:13px}
}
@media(max-width:360px){
  .referral-level-stats,.referral-reward-row{grid-template-columns:1fr 1fr}
  .referral-level-stats>div:last-child,.referral-reward-row>span:last-child{grid-column:1/-1}
}

/* QuizTop 2.0 — profile, live counters, tasks, history and Plus plans */
.profile-page-v3{width:100%;max-width:1180px;margin:0 auto;display:grid;gap:14px;min-width:0}.profile-page-v3>*{min-width:0}.profile-hero-v3{padding:18px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:104px minmax(0,1fr);gap:16px;align-items:center;overflow:hidden}.profile-avatar-v3{position:relative;width:104px;height:104px;align-self:start}.profile-avatar-v3>.avatar,.profile-avatar-v3>.avatar img{width:104px!important;height:104px!important;max-width:104px!important;max-height:104px!important;border-radius:8px!important;object-fit:cover!important;display:block!important}.profile-avatar-v3 em{position:absolute;right:-4px;bottom:-4px;padding:5px 7px;border-radius:8px;background:var(--orange);color:#fff;font-size:6px;font-style:normal;font-weight:900}.profile-main-v3{min-width:0}.profile-kicker-v3{color:var(--cyan);font-size:7px;font-weight:900;letter-spacing:.7px;text-transform:uppercase}.profile-main-v3 h1{margin:6px 0 0;font:800 clamp(21px,5vw,34px)/1.05 var(--font-display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-main-v3 p{margin-top:5px;color:var(--muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-tags-v3{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}.profile-tags-v3 span{padding:7px 9px;border-radius:8px;background:var(--surface-2);font-size:7px;font-weight:850}.profile-level-v3{grid-column:1/-1;display:grid;gap:7px}.profile-level-v3>div{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:8px}.profile-level-v3 b{color:var(--text)}.profile-level-v3>i{height:7px;border-radius:8px;background:var(--surface-2);overflow:hidden}.profile-level-v3>i>u{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--blue));text-decoration:none}.profile-metrics-v3{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.profile-metrics-v3 article{min-height:86px;padding:12px;border-radius:8px;background:var(--surface);display:flex;align-items:center;gap:10px}.profile-metrics-v3 article>span{width:38px;height:38px;flex:0 0 38px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.profile-metrics-v3 strong,.profile-metrics-v3 small{display:block}.profile-metrics-v3 strong{font:800 16px var(--font-display)}.profile-metrics-v3 small{margin-top:3px;color:var(--muted);font-size:7px}.profile-actions-v3,.profile-utility-v3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profile-actions-v3 button,.profile-utility-v3 button{min-width:0;min-height:72px;padding:12px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:38px minmax(0,1fr) 17px;gap:10px;align-items:center;text-align:left}.profile-actions-v3 button>.svg-icon:first-child,.profile-utility-v3 button>.svg-icon:first-child{width:38px!important;height:38px!important;padding:10px;border-radius:8px;background:var(--surface-2);color:var(--cyan)}.profile-actions-v3 button>span,.profile-utility-v3 button>span{min-width:0}.profile-actions-v3 b,.profile-actions-v3 small,.profile-utility-v3 b,.profile-utility-v3 small{display:block}.profile-actions-v3 b,.profile-utility-v3 b{font-size:10px}.profile-actions-v3 small,.profile-utility-v3 small{margin-top:4px;color:var(--muted);font-size:7px}.profile-actions-v3 button>.svg-icon:last-child,.profile-utility-v3 button>.svg-icon:last-child{width:14px!important;height:14px!important;color:var(--muted)}.profile-utility-v3 button>em{justify-self:end;padding:6px 8px;border-radius:8px;background:var(--surface-2);font-size:7px;font-style:normal;font-weight:900}.profile-utility-v3 button.done{background:color-mix(in srgb,var(--success) 10%,var(--surface))}.profile-utility-v3 .status-check{width:30px;height:30px;padding:0!important;border-radius:8px!important;background:var(--success)!important;color:#fff!important;display:grid;place-items:center}.profile-utility-v3 .status-check .svg-icon{width:15px!important;height:15px!important}.knowledge-dashboard-v3{padding:16px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:minmax(230px,.72fr) minmax(0,1.28fr);gap:17px;align-items:center}.knowledge-overview-v3{display:grid;justify-items:center;gap:13px}.knowledge-ring-v3{--p:calc(var(--knowledge)*1%);width:154px;height:154px;border-radius:8px;display:grid;place-items:center;background:radial-gradient(circle,var(--surface) 59%,transparent 61%),conic-gradient(var(--cyan) var(--p),var(--surface-2) 0)}.knowledge-ring-v3>div{text-align:center}.knowledge-ring-v3 strong,.knowledge-ring-v3 span{display:block}.knowledge-ring-v3 strong{font:800 30px var(--font-display)}.knowledge-ring-v3 span{margin-top:3px;color:var(--muted);font-size:7px}.knowledge-overview-copy{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.knowledge-overview-copy article{padding:9px 5px;border-radius:8px;background:var(--surface-2);text-align:center}.knowledge-overview-copy strong,.knowledge-overview-copy span{display:block}.knowledge-overview-copy strong{font-size:12px}.knowledge-overview-copy span{margin-top:3px;color:var(--muted);font-size:6px;line-height:1.25}.knowledge-list-v3{display:grid;gap:8px}.knowledge-list-v3 article{padding:10px 11px;border-radius:8px;background:var(--surface-2)}.knowledge-row-head{display:flex;justify-content:space-between;gap:8px}.knowledge-row-head b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.knowledge-row-head span{font-size:8px;font-weight:900}.knowledge-track{height:6px;margin-top:7px;border-radius:8px;background:color-mix(in srgb,var(--surface) 72%,transparent);overflow:hidden}.knowledge-track i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--cyan),var(--blue))}.knowledge-list-v3 small{display:block;margin-top:4px;color:var(--muted);font-size:6px}.game-history-shell{min-width:0}.game-history-list{display:grid;gap:8px}.game-history-card{padding:12px;border-radius:8px;background:var(--surface);display:grid;gap:10px}.game-history-card.won{background:color-mix(in srgb,var(--success) 8%,var(--surface))}.game-history-main{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center}.game-history-main>span{width:38px;height:38px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center}.game-history-main b,.game-history-main small{display:block}.game-history-main b{font-size:10px}.game-history-main small{margin-top:3px;color:var(--muted);font-size:7px}.game-history-main em{padding:6px 8px;border-radius:8px;background:var(--surface-2);font-size:7px;font-style:normal;font-weight:900}.game-history-card.won .game-history-main em{color:var(--success)}.game-history-details{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.game-history-details span{padding:8px 5px;border-radius:8px;background:var(--surface-2);text-align:center}.game-history-details b,.game-history-details small{display:block}.game-history-details b{font-size:10px}.game-history-details small{margin-top:3px;color:var(--muted);font-size:6px}.history-plus-lock{padding:13px;border-radius:8px;background:var(--surface);display:flex;align-items:center;gap:9px;color:var(--muted);font-size:8px}.history-plus-lock .svg-icon{color:var(--orange)}.plus-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.plus-plan-card{position:relative;min-width:0;min-height:130px;padding:14px;border-radius:8px;background:var(--surface-2);color:var(--text);display:flex;flex-direction:column;align-items:flex-start;text-align:left}.plus-plan-card.featured{background:linear-gradient(155deg,color-mix(in srgb,var(--cyan) 25%,var(--surface-2)),var(--surface-2))}.plus-plan-card span,.plus-plan-card strong,.plus-plan-card small{display:block}.plus-plan-card span{font-size:8px;font-weight:850}.plus-plan-card strong{margin-top:12px;font:800 19px var(--font-display)}.plus-plan-card small{margin-top:4px;color:var(--muted);font-size:7px}.plus-plan-card em{position:absolute;right:9px;top:9px;padding:5px 7px;border-radius:8px;background:var(--orange);color:#fff;font-size:6px;font-style:normal;font-weight:900}.daily-focus-list{grid-template-columns:repeat(5,minmax(0,1fr))}.daily-focus-item.partner-task .daily-focus-icon{padding:4px;overflow:hidden}.daily-focus-item.partner-task .daily-focus-icon img{width:100%;height:100%;object-fit:contain;display:block}.spin-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.spin-summary .spin-progress{grid-column:1/-1}.qt-select-native,.select-wrap-v3 select{appearance:none!important;-webkit-appearance:none!important;background-image:none!important}.select-wrap-v3{position:relative}.select-wrap-v3::after{content:"";position:absolute;right:13px;top:50%;width:10px;height:7px;background:var(--muted);clip-path:polygon(0 0,100% 0,50% 100%);transform:translateY(-50%);pointer-events:none}.select-wrap-v3 .svg-icon,.select-wrap-v3>i{display:none!important}.avatar img{transition:none!important;animation:none!important}.header-avatar img{will-change:auto!important}.screen-loader.compact{min-height:90px}
html[data-theme="dark"] .profile-hero-v3,html[data-theme="dark"] .profile-metrics-v3 article,html[data-theme="dark"] .profile-actions-v3 button,html[data-theme="dark"] .profile-utility-v3 button,html[data-theme="dark"] .knowledge-dashboard-v3,html[data-theme="dark"] .game-history-card,html[data-theme="dark"] .history-plus-lock{background:#111d2c}html[data-theme="dark"] .profile-tags-v3 span,html[data-theme="dark"] .profile-actions-v3 button>.svg-icon:first-child,html[data-theme="dark"] .profile-utility-v3 button>.svg-icon:first-child,html[data-theme="dark"] .knowledge-list-v3 article,html[data-theme="dark"] .knowledge-overview-copy article,html[data-theme="dark"] .game-history-details span,html[data-theme="dark"] .game-history-main>span,html[data-theme="dark"] .game-history-main em{background:#19283a}html[data-theme="light"] .profile-hero-v3,html[data-theme="light"] .profile-metrics-v3 article,html[data-theme="light"] .profile-actions-v3 button,html[data-theme="light"] .profile-utility-v3 button,html[data-theme="light"] .knowledge-dashboard-v3,html[data-theme="light"] .game-history-card,html[data-theme="light"] .history-plus-lock{background:#fff}html[data-theme="light"] .profile-tags-v3 span,html[data-theme="light"] .profile-actions-v3 button>.svg-icon:first-child,html[data-theme="light"] .profile-utility-v3 button>.svg-icon:first-child,html[data-theme="light"] .knowledge-list-v3 article,html[data-theme="light"] .knowledge-overview-copy article,html[data-theme="light"] .game-history-details span,html[data-theme="light"] .game-history-main>span,html[data-theme="light"] .game-history-main em{background:#edf3f1}
@media(max-width:860px){.daily-focus-list{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-focus-item:last-child{grid-column:1/-1}.profile-metrics-v3{grid-template-columns:repeat(2,minmax(0,1fr))}.knowledge-dashboard-v3{grid-template-columns:1fr}.plus-plan-grid{grid-template-columns:1fr}.plus-plan-card{min-height:100px}.spin-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.profile-page-v3{gap:9px}.profile-hero-v3{grid-template-columns:76px minmax(0,1fr);gap:12px;padding:13px;border-radius:8px}.profile-avatar-v3,.profile-avatar-v3>.avatar,.profile-avatar-v3>.avatar img{width:76px!important;height:76px!important;max-width:76px!important;max-height:76px!important;border-radius:8px!important}.profile-main-v3 h1{font-size:20px}.profile-level-v3{margin-top:2px}.profile-metrics-v3,.profile-actions-v3,.profile-utility-v3{gap:6px}.profile-metrics-v3 article{min-height:72px;padding:9px}.profile-metrics-v3 article>span{width:32px;height:32px;flex-basis:32px}.profile-actions-v3,.profile-utility-v3{grid-template-columns:1fr}.profile-actions-v3 button,.profile-utility-v3 button{min-height:62px;padding:10px}.knowledge-dashboard-v3{padding:13px}.knowledge-ring-v3{width:132px;height:132px}.knowledge-overview-copy{grid-template-columns:repeat(3,minmax(0,1fr))}.game-history-details{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-focus-list{grid-template-columns:1fr}.daily-focus-item:last-child{grid-column:auto}.spin-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.spin-summary article{padding:8px 6px}.spin-summary strong{font-size:13px}.spin-summary span{font-size:6px}}
@media(max-width:340px){.profile-hero-v3{grid-template-columns:64px minmax(0,1fr)}.profile-avatar-v3,.profile-avatar-v3>.avatar,.profile-avatar-v3>.avatar img{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important}.profile-metrics-v3{grid-template-columns:1fr}.knowledge-overview-copy{grid-template-columns:1fr}.spin-summary{grid-template-columns:1fr}.spin-summary .spin-progress{grid-column:1}}


/* 2.1.0 — readability, stable chats, history and result identity */
html,body,.app-shell,.overlay,button,a,label,.card,.list-item,.leader-row,.friend-card-v3,.chat-bubble{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
}
input,textarea,[contenteditable="true"]{
  -webkit-user-select:text!important;
  user-select:text!important;
  caret-color:var(--cyan);
}
img{-webkit-user-drag:none!important;user-drag:none!important}
html,body{font-size:16px!important;line-height:1.5!important}
.page-heading p,.section-head p,.hero p,.mode-card p,.quick-battle-card small,.daily-focus-head p,.smart-start-mode p,
.profile-compact-copy small,.profile-main-v3 p,.profile-level-v3,.profile-tags-v3 span,.profile-metrics-v3 small,
.profile-actions-v3 small,.profile-utility-v3 small,.knowledge-ring-v3 span,.knowledge-overview-copy span,.knowledge-list-v3 small,
.friend-copy-v3 p,.friend-meta-v3,.friend-section-heading-v3 p,.friends-head-v3 p,.friend-search-title-v3 p,
.game-history-main small,.game-history-details small,.history-plus-lock small,.result-ranking-info p,.result-performance small,
.clan-chat-message time,.clan-chat-message p,.chat-bubble time,.friend-chat-person small,.friend-chat-replies>span{
  font-size:12px!important;
  line-height:1.45!important;
}
.button{font-size:14px!important;min-height:48px!important}
.button-small{font-size:12px!important;min-height:40px!important}
.tab,.text-button,.pill,.eyebrow,.mode-label,.status,.price,.meta-row{font-size:12px!important}
.section-head h2{font-size:19px!important}
.page-heading h1{font-size:27px!important}
.mode-card h3,.quiz-card h3{font-size:16px!important}
.list-copy b,.friend-copy-v3 b,.friend-section-heading-v3 h3,.game-history-main b,.history-plus-lock b{font-size:14px!important}
.list-copy small,.leader-row p,.leader-score,.leader-row h4{font-size:12px!important}

/* Never show a second decorative arrow around enhanced selects. */
.select-wrap-v3.qt-select-host::after,.select-wrap-v3:has(.qt-select)::after{display:none!important;content:none!important}
.select-wrap-v3.qt-select-host{overflow:visible!important}

/* Friend metadata is a stat, not a malformed action button. */
.friend-meta-v3{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important}
.friend-meta-v3 .shared-battles-chip{display:inline-grid!important;grid-template-columns:16px auto minmax(0,1fr)!important;align-items:center!important;gap:6px!important;min-height:34px!important;padding:7px 10px!important;border-radius:8px!important;background:var(--qt-card-2)!important;color:var(--muted)!important}
.friend-meta-v3 .shared-battles-chip b{font-size:13px!important;color:var(--text)!important}
.friend-meta-v3 .shared-battles-chip em{font-size:11px!important;font-style:normal!important;white-space:normal!important}
.friend-avatar-v3,.friend-avatar-v3 .avatar,.friend-avatar-v3 .avatar img{width:56px!important;height:56px!important;max-width:56px!important;max-height:56px!important;border-radius:8px!important}

/* Game history — separated content, no glued Plus text. */
.game-history-list{gap:12px!important}
.game-history-card{padding:15px!important;gap:12px!important}
.game-history-main{grid-template-columns:44px minmax(0,1fr) auto!important;gap:12px!important}
.game-history-main>span{width:44px!important;height:44px!important;border-radius:8px!important}
.game-history-main em{font-size:11px!important;padding:7px 10px!important}
.game-history-details{gap:8px!important}
.game-history-details span{min-height:58px!important;padding:10px 7px!important;display:grid!important;align-content:center!important}
.game-history-details b{font-size:14px!important}
.history-plus-lock{width:100%!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) 24px!important;gap:12px!important;align-items:center!important;padding:15px!important;text-align:left!important}
.history-plus-lock>.svg-icon:first-child{width:42px!important;height:42px!important;padding:10px!important;border-radius:8px!important;background:var(--surface-2)!important}
.history-plus-copy{min-width:0!important;display:grid!important;gap:4px!important}
.history-plus-copy b,.history-plus-copy small{display:block!important;white-space:normal!important;overflow-wrap:anywhere!important}
.history-plus-arrow{display:grid!important;place-items:center!important}

/* Friend chat fits the current Telegram visual viewport and custom keyboard. */
.friend-chat{
  height:calc(var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh)) - var(--app-top-inset,0px) - 84px - var(--qt-keyboard-height,0px))!important;
  min-height:420px!important;
  max-height:calc(var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh)) - 76px)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto auto!important;
  gap:10px!important;
  overflow:hidden!important;
  padding:0!important;
}
.friend-chat-head{min-height:72px!important;padding:10px!important}
.friend-chat-person .avatar,.friend-chat-person .avatar img{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important;border-radius:8px!important}
.friend-chat-person b{font-size:15px!important}
.friend-chat-messages{min-height:0!important;max-height:none!important;height:auto!important;padding:14px!important;overflow-y:auto!important;overscroll-behavior:contain!important;scroll-padding-bottom:24px!important}
.chat-bubble{max-width:min(82%,520px)!important;padding:12px 14px!important;border-radius:8px!important}
.chat-bubble p{font-size:16px!important;line-height:1.45!important;overflow-wrap:anywhere!important}
.friend-chat-replies{min-width:0!important;padding:0 2px!important}
.friend-chat-replies>div{display:flex!important;gap:7px!important;overflow-x:auto!important;padding-bottom:2px!important}
.friend-chat-replies button{flex:0 0 auto!important;min-height:40px!important;padding:9px 13px!important;font-size:13px!important}
.friend-chat-compose{position:relative!important;bottom:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;gap:8px!important;padding:8px 0 max(8px,env(safe-area-inset-bottom))!important;background:var(--bg)!important}
.friend-chat-compose input{height:52px!important;min-width:0!important;padding:0 16px!important;border-radius:8px!important;background:var(--surface-2)!important;font-size:16px!important}
.friend-chat-compose button{width:52px!important;height:52px!important;border-radius:8px!important}
.qt-keyboard-open .friend-chat{min-height:280px!important;height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - var(--qt-keyboard-height,310px) - 74px)!important}

/* Clan chat gets the same readable, keyboard-safe structure. */
.clan-chat-panel{display:grid!important;grid-template-rows:minmax(260px,1fr) auto!important;gap:10px!important;min-height:calc(var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh)) - var(--app-top-inset,0px) - 170px)!important}
.clan-chat-messages{min-height:260px!important;max-height:60dvh!important;overflow-y:auto!important;display:grid!important;align-content:end!important;gap:8px!important;padding:12px!important;border-radius:8px!important;background:var(--surface)!important}
.clan-chat-message{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:10px!important;padding:10px!important;border-radius:8px!important;background:var(--surface-2)!important}
.clan-chat-message .avatar,.clan-chat-message .avatar img{width:42px!important;height:42px!important;border-radius:8px!important}
.clan-chat-message header{display:flex!important;justify-content:space-between!important;gap:10px!important;align-items:center!important}
.clan-chat-message header b{font-size:14px!important}
.clan-chat-message p{margin-top:5px!important;color:var(--text)!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important}
.clan-chat-compose{display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;gap:8px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
.clan-chat-compose input{height:52px!important;padding:0 16px!important;border-radius:8px!important;background:var(--surface)!important;font-size:16px!important}
.clan-chat-compose button{width:52px!important;height:52px!important;border-radius:8px!important}

/* Wrong answer must not leave a positive progress color. */
.game-hud.answer-wrong .game-timer-track i{background:var(--danger)!important}
.game-hud.answer-correct .game-timer-track i{background:var(--success)!important}

/* Result sections breathe and never visually merge. */
.result-performance{margin:16px 0 24px!important;gap:10px!important}
.result-performance article{min-height:86px!important;padding:14px!important}
.result-performance strong{font-size:18px!important}
.result-player-section{margin-top:8px!important;padding-top:8px!important}
.result-player-section .leader-list{gap:10px!important}
.result-player-section .leader-row{min-height:72px!important;padding:12px!important}

/* Fields should not trigger browser suggestions; custom keyboard owns the mobile interaction. */
.form input,.form textarea,.clan-chat-compose input,.friend-chat-compose input{touch-action:manipulation!important}

@media(max-width:520px){
  html,body{font-size:15px!important}
  .overlay-content{padding-left:12px!important;padding-right:12px!important}
  .friend-chat{min-height:360px!important}
  .game-history-details{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .result-performance{grid-template-columns:1fr 1fr!important}
}
@media(max-width:360px){
  .friend-chat-head{grid-template-columns:minmax(0,1fr) auto!important}
  .friend-chat-head>div button span{display:none!important}
  .chat-bubble p{font-size:15px!important}
  .result-performance{grid-template-columns:1fr!important}
}

/* QuizTop 2.2.0 — unified readable UI, compact catalog and viewport-safe chats */
:root{
  --qt-readable-xs:12px;
  --qt-readable-sm:13px;
  --qt-readable-md:15px;
  --qt-readable-lg:17px;
}

/* Shared typography: secondary text remains compact, but never microscopic. */
.page,.overlay-content{font-size:var(--qt-readable-md)!important}
.page-heading p,.section-head p,.hero p,.daily-focus-head p,.smart-start-mode p,
.mode-copy small,.quick-battle-card small,.quiz-card-title p,.quiz-card-title small,
.profile-main-v3 p,.profile-level-v3,.profile-tags-v3 span,.profile-actions-v4 small,
.profile-utility-v4 small,.knowledge-ring-v3 span,.knowledge-overview-copy span,
.knowledge-list-v3 small,.leader-row p,.friend-chat-person small,.clan-chat-message time,
.notification-card-v4 small,.public-profile-v4 p,.clan-profile-v4 p{
  font-size:var(--qt-readable-sm)!important;
  line-height:1.42!important;
}
.section-kicker,.profile-kicker-v3,.eyebrow{font-size:var(--qt-readable-xs)!important;letter-spacing:.04em!important}
.section-head h2{font-size:21px!important;line-height:1.15!important}
.page-heading h1{font-size:clamp(28px,7vw,40px)!important;line-height:1.08!important}
.tab,.text-button,.pill,.status,.price,.mode-label,.meta-row{font-size:var(--qt-readable-xs)!important}
.button{font-size:15px!important;line-height:1.2!important}
.button-small{font-size:13px!important}

/* Home: all launch cards follow one compact, aligned system. */
.home-page-v4{gap:12px!important}
.home-launch-v4{display:grid!important;gap:11px!important}
.home-topic-strip{
  display:flex!important;gap:8px!important;overflow-x:auto!important;scrollbar-width:none!important;
  padding:1px 1px 4px!important;scroll-snap-type:x proximity!important;
}
.home-topic-strip::-webkit-scrollbar,.quiz-mode-filter-v4::-webkit-scrollbar{display:none!important}
.home-topic-chip{
  flex:0 0 auto!important;min-height:44px!important;padding:0 13px!important;border-radius:8px!important;
  background:var(--surface)!important;color:var(--muted)!important;display:flex!important;align-items:center!important;
  gap:8px!important;font-size:13px!important;font-weight:750!important;scroll-snap-align:start!important;
}
.home-topic-chip .svg-icon{width:17px!important;height:17px!important;color:var(--cyan)!important}
.home-topic-chip.active{background:linear-gradient(135deg,#82d7df,#087b98)!important;color:#fff!important}
.home-topic-chip.active .svg-icon{color:#fff!important}
.quick-battle-grid-v4{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
.quick-battle-grid-v4 .quick-battle-card{
  min-height:86px!important;padding:12px!important;border-radius:8px!important;
  grid-template-columns:42px minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;
}
.quick-battle-grid-v4 .quick-battle-card b{font-size:16px!important;line-height:1.2!important}
.quick-battle-grid-v4 .quick-battle-card small{margin-top:3px!important}
.quick-battle-grid-v4 .quick-battle-card em{font-size:12px!important;white-space:nowrap!important}
.quick-battle-grid-v4 .quick-battle-card.friends{grid-column:auto!important}
.mode-grid-v4{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;gap:9px!important;
}
.mode-grid-v4 .mode-card-v4{
  width:100%!important;height:auto!important;min-height:88px!important;padding:12px!important;border-radius:8px!important;
  display:grid!important;grid-template-columns:42px minmax(0,1fr) auto 15px!important;
  gap:10px!important;align-items:center!important;text-align:left!important;overflow:visible!important;
}
.mode-card-v4 .mode-icon{width:42px!important;height:42px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important;display:grid!important;place-items:center!important}
.mode-card-v4.mode-blue .mode-icon,.mode-card-v4.mode-orange .mode-icon{background:rgba(255,255,255,.16)!important;color:#fff!important}
.mode-card-v4 .mode-copy{min-width:0!important;display:block!important}
.mode-card-v4 .mode-copy b{display:block!important;font-size:16px!important;line-height:1.18!important}
.mode-card-v4 .mode-copy small{display:-webkit-box!important;margin-top:4px!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
.mode-card-v4 .mode-label{max-width:92px!important;padding:7px 9px!important;border-radius:8px!important;background:var(--surface-2)!important;white-space:normal!important;text-align:center!important;line-height:1.2!important}
.mode-card-v4.mode-blue .mode-label,.mode-card-v4.mode-orange .mode-label{background:rgba(255,255,255,.16)!important;color:#fff!important}
.mode-card-v4 .mode-go{display:grid!important;place-items:center!important;color:var(--muted)!important}
.mode-card-v4.mode-blue .mode-go,.mode-card-v4.mode-orange .mode-go{color:#fff!important}

/* Profile: compact two-column controls with full, readable labels. */
.profile-page-v4{gap:12px!important}
.profile-menu-v4{padding:13px!important;border-radius:8px!important;background:var(--surface)!important;display:grid!important;gap:10px!important}
.profile-menu-title-v4 h2{font-size:18px!important;line-height:1.2!important}
.profile-actions-v4,.profile-utility-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.profile-actions-v4 button,.profile-utility-v4 button{
  min-height:68px!important;padding:10px!important;border-radius:8px!important;background:var(--surface-2)!important;
  grid-template-columns:38px minmax(0,1fr) 15px!important;gap:9px!important;overflow:visible!important;
}
.profile-actions-v4 button>.svg-icon:first-child,.profile-utility-v4 button>.svg-icon:first-child{
  width:38px!important;height:38px!important;padding:10px!important;border-radius:8px!important;background:var(--surface)!important;
}
.profile-actions-v4 b,.profile-utility-v4 b{font-size:14px!important;line-height:1.2!important;white-space:normal!important;overflow:visible!important}
.profile-actions-v4 small,.profile-utility-v4 small{margin-top:3px!important;white-space:normal!important;overflow:visible!important}
.profile-metrics-v4{gap:8px!important}
.profile-metrics-v4 article{min-height:76px!important;padding:10px!important}
.profile-metrics-v4 strong{font-size:18px!important}
.profile-history-section{display:grid!important;gap:10px!important}
.game-history-list{display:grid!important;gap:14px!important}
.game-history-card{margin:0!important;padding:14px!important;border-radius:8px!important}
.game-history-card+.game-history-card{margin-top:0!important}
.history-plus-lock{margin-top:2px!important}

/* Quiz catalog: shorter cards, fewer repeated vertical blocks, faster scanning. */
.quiz-catalog-v4{gap:11px!important}
.quiz-catalog-hero-v4{min-height:0!important;padding:16px!important;border-radius:8px!important;grid-template-columns:minmax(0,1fr) auto!important;gap:14px!important}
.quiz-catalog-hero-v4 h1{font-size:clamp(27px,7vw,38px)!important;line-height:1.08!important}
.quiz-catalog-hero-v4 p{margin-top:7px!important;font-size:14px!important;max-width:650px!important}
.quiz-hero-actions-v4{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-content:center!important;justify-content:flex-end!important}
.quiz-hero-actions-v4>*{min-height:44px!important}
.quiz-toolbar-v4{position:static!important;padding:12px!important;border-radius:8px!important;display:grid!important;gap:9px!important}
.quiz-search-modern input{height:48px!important;font-size:15px!important}
.quiz-type-tabs{min-width:0!important;display:flex!important;overflow-x:auto!important;gap:6px!important;scrollbar-width:none!important}
.quiz-type-tabs button{flex:0 0 auto!important;min-height:40px!important;padding:0 12px!important;font-size:13px!important}
.quiz-mode-filter-v4{display:flex!important;gap:6px!important;overflow-x:auto!important;scrollbar-width:none!important}
.quiz-mode-filter-v4 button{flex:0 0 auto!important;min-height:38px!important;padding:0 12px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--muted)!important;font-size:13px!important;font-weight:750!important}
.quiz-mode-filter-v4 button.active{background:linear-gradient(135deg,#83d9e1,#0b7e9b)!important;color:#fff!important}
.quiz-category-section-v4{display:grid!important;gap:8px!important}
.quiz-category-strip{gap:7px!important}
.quiz-category-chip{min-height:43px!important;font-size:13px!important}
.quiz-catalog-grid-v4{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
.quiz-catalog-grid-v4 .quiz-catalog-summary,.quiz-catalog-grid-v4 .quiz-load-more,.quiz-catalog-grid-v4>.empty-state,.quiz-catalog-grid-v4>.error-panel{grid-column:1/-1!important}
.quiz-card-v4{min-height:0!important;padding:14px!important;border-radius:8px!important;gap:10px!important}
.quiz-card-v4 .quiz-card-top{grid-template-columns:44px minmax(0,1fr) auto!important;gap:10px!important}
.quiz-card-v4 .quiz-card-icon{width:44px!important;height:44px!important;border-radius:8px!important}
.quiz-card-v4 .quiz-card-title small{font-size:12px!important}
.quiz-card-v4 .quiz-card-title h3{margin-top:2px!important;font-size:17px!important;line-height:1.18!important;white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:1!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
.quiz-card-v4 .quiz-card-title p{margin-top:4px!important;display:-webkit-box!important;-webkit-line-clamp:1!important;-webkit-box-orient:vertical!important;overflow:hidden!important;color:var(--muted)!important}
.quiz-card-v4 .quiz-card-price{min-height:31px!important;height:auto!important;font-size:12px!important}
.quiz-card-bottom-v4{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important}
.quiz-card-v4 .quiz-card-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
.quiz-card-v4 .quiz-card-metrics>span{min-height:48px!important;padding:7px!important;grid-template-columns:17px minmax(0,1fr)!important}
.quiz-card-v4 .quiz-card-metrics b{font-size:13px!important}
.quiz-card-v4 .quiz-card-metrics small{font-size:11px!important}
.quiz-card-v4 .quiz-card-actions{margin:0!important;display:grid!important;justify-items:end!important;gap:6px!important}
.quiz-card-v4 .quiz-mode-pill{font-size:11px!important;padding:6px 8px!important}
.quiz-card-v4 .quiz-card-actions .button{min-height:42px!important;font-size:14px!important}

/* Clan navigation and profiles: active tab is unmistakable and clan rows are interactive. */
.clan-tabs-v4{display:flex!important;gap:7px!important;overflow-x:auto!important;padding-bottom:3px!important;scrollbar-width:none!important}
.clan-tabs-v4 .tab{flex:0 0 auto!important;min-height:44px!important;padding:0 14px!important;border-radius:8px!important;background:var(--surface)!important;color:var(--muted)!important;font-size:13px!important}
.clan-tabs-v4 .tab.active,.clan-tabs-v4 .tab[aria-current="page"]{background:linear-gradient(135deg,#82d8e0,#087b98)!important;color:#fff!important}
.clan-leader-row-v4{width:100%!important;min-height:76px!important;text-align:left!important;grid-template-columns:32px 46px minmax(0,1fr) auto 14px!important;gap:10px!important}
.clan-leader-row-v4 .leader-open{color:var(--cyan)!important}
.clan-discover-v4{display:grid!important;gap:9px!important}
.clan-discover-card-v4{padding:10px!important;border-radius:8px!important;background:var(--surface)!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important}
.clan-discover-main-v4{min-width:0!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 14px!important;gap:10px!important;align-items:center!important;text-align:left!important;color:var(--text)!important}
.clan-discover-main-v4 b{font-size:15px!important}.clan-discover-main-v4 small{display:block!important;margin-top:3px!important;font-size:12px!important;color:var(--muted)!important}
.clan-mini-emblem-v4{width:44px!important;height:44px!important;border-radius:8px!important;background:linear-gradient(135deg,#8bdce4,#087a97)!important;color:#fff!important;display:grid!important;place-items:center!important;font-weight:900!important}
.clan-profile-v4,.public-profile-v4{display:grid!important;gap:11px!important}
.clan-profile-hero-v4,.public-profile-hero-v4{padding:16px!important;border-radius:8px!important;background:var(--surface)!important}
.clan-profile-hero-v4{display:grid!important;grid-template-columns:minmax(0,1fr) 82px!important;gap:14px!important;align-items:center!important;background:linear-gradient(145deg,color-mix(in srgb,var(--cyan) 24%,var(--surface)),var(--surface))!important}
.clan-profile-hero-v4 h2,.public-profile-hero-v4 h2{font-size:25px!important;line-height:1.08!important}
.clan-profile-hero-v4>div>div,.public-profile-tags-v4{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:10px!important}
.clan-profile-hero-v4>div>div span,.public-profile-tags-v4 span{padding:7px 9px!important;border-radius:8px!important;background:var(--surface-2)!important;font-size:12px!important}
.clan-profile-emblem-v4{width:82px!important;height:82px!important;border-radius:8px!important;background:var(--cream)!important;color:var(--deep)!important;display:grid!important;place-items:center!important;font-size:22px!important;font-weight:900!important}
.clan-profile-stats-v4,.public-stats-v4{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.clan-profile-stats-v4 article,.public-stats-v4 article{min-height:78px!important;padding:10px!important;border-radius:8px!important;background:var(--surface)!important;display:grid!important;place-items:center!important;text-align:center!important}
.clan-profile-stats-v4 strong,.public-stats-v4 strong{font-size:20px!important}.clan-profile-stats-v4 span,.public-stats-v4 span{font-size:12px!important;color:var(--muted)!important}
.clan-profile-members-v4{padding:13px!important;border-radius:8px!important;background:var(--surface)!important}
.clan-profile-members-v4>div:last-child{display:grid!important;gap:7px!important}
.clan-profile-members-v4 button{min-height:58px!important;padding:8px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--text)!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) 14px!important;gap:9px!important;align-items:center!important;text-align:left!important}
.clan-profile-members-v4 button b{font-size:14px!important}.clan-profile-members-v4 button small{display:block!important;margin-top:3px!important;font-size:12px!important;color:var(--muted)!important}
.public-profile-hero-v4{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;gap:14px!important;align-items:center!important}
.player-action-grid-v4{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.player-action-v4{min-height:66px!important;padding:10px!important;border-radius:8px!important;background:var(--surface)!important;color:var(--text)!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:9px!important;align-items:center!important;text-align:left!important}
.player-action-v4>.svg-icon{width:38px!important;height:38px!important;padding:10px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important}
.player-action-v4 b{font-size:14px!important}.player-action-v4 small{display:block!important;margin-top:3px!important;font-size:12px!important;color:var(--muted)!important}
.friend-nickname-v4{padding:11px!important;border-radius:8px!important;background:var(--surface)!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:end!important}
.friend-nickname-v4 label span{display:block!important;margin-bottom:6px!important;font-size:12px!important;color:var(--muted)!important}
.player-danger-v4{min-height:48px!important;padding:0 15px!important;border-radius:8px!important;background:color-mix(in srgb,var(--danger) 14%,var(--surface))!important;color:var(--danger)!important;font-size:14px!important;font-weight:800!important}

/* Notifications: one-line summary first, full text only after tapping. */
.notification-list-v4{display:grid!important;gap:9px!important}
.notification-card-v4{border-radius:8px!important;background:var(--surface)!important;overflow:hidden!important}
.notification-summary-v4{width:100%!important;min-height:76px!important;padding:11px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) auto 14px!important;gap:10px!important;align-items:center!important;text-align:left!important;color:var(--text)!important}
.notification-icon-v4{width:42px!important;height:42px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--cyan)!important;display:grid!important;place-items:center!important}
.notification-summary-v4>span:nth-child(2){min-width:0!important}.notification-summary-v4 b{display:block!important;font-size:15px!important;line-height:1.2!important}.notification-summary-v4 small{display:block!important;margin-top:4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:var(--muted)!important}
.notification-summary-v4 time{font-size:11px!important;color:var(--muted)!important;white-space:nowrap!important}.notification-summary-v4>i{display:grid!important;place-items:center!important;transition:transform .16s ease!important}
.notification-card-v4.expanded .notification-summary-v4>i{transform:rotate(180deg)!important}
.notification-detail-v4{padding:0 13px 13px 65px!important}.notification-detail-v4 p{font-size:14px!important;line-height:1.5!important;color:var(--muted)!important;white-space:pre-wrap!important}
.notification-detail-v4 .button{margin-top:10px!important}

/* Friend and clan chats: layout is fixed to the actual visual viewport and does not jump. */
.overlay-content:has(.friend-chat-v4),.overlay-content:has(.clan-chat-panel-v4){min-height:0!important;overflow:hidden!important;padding-bottom:max(8px,var(--safe-bottom,0px))!important}
.friend-chat-v4{
  width:min(100%,760px)!important;height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 72px - var(--qt-keyboard-height,0px))!important;
  min-height:0!important;max-height:none!important;margin:0 auto!important;padding:0!important;gap:8px!important;
  grid-template-rows:auto minmax(0,1fr) auto auto!important;overflow:hidden!important;transition:none!important;
}
.friend-chat-v4 .friend-chat-head{min-height:66px!important;padding:9px!important}
.friend-chat-v4 .friend-chat-messages{min-height:0!important;height:auto!important;max-height:none!important;padding:12px!important;overscroll-behavior:contain!important;scroll-behavior:auto!important}
.friend-chat-v4 .chat-bubble{max-width:min(84%,540px)!important;padding:11px 13px!important}
.friend-chat-v4 .chat-bubble p{font-size:15px!important;line-height:1.42!important}
.friend-chat-v4 .chat-bubble time{font-size:11px!important}
.friend-chat-v4 .friend-chat-replies{min-height:0!important}
.friend-chat-v4 .friend-chat-compose{padding:7px!important;border-radius:8px!important;background:var(--surface)!important;grid-template-columns:minmax(0,1fr) 50px!important}
.friend-chat-v4 .friend-chat-compose input{height:50px!important;font-size:16px!important;background:var(--surface-2)!important}
.friend-chat-v4 .friend-chat-compose button{width:50px!important;height:50px!important}
.qt-keyboard-open .overlay-content:has(.friend-chat-v4),.qt-keyboard-open .overlay-content:has(.clan-chat-panel-v4){padding-bottom:0!important}
.qt-keyboard-open .friend-chat-v4{
  height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 60px - var(--qt-keyboard-height,0px))!important;
  min-height:0!important;
}
.clan-chat-panel-v4{
  height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 250px - var(--qt-keyboard-height,0px))!important;
  min-height:360px!important;max-height:none!important;grid-template-rows:minmax(0,1fr) auto!important;overflow:hidden!important;
}
.clan-chat-panel-v4 .clan-chat-messages{min-height:0!important;height:auto!important;max-height:none!important;align-content:start!important;scroll-behavior:auto!important}
.clan-chat-panel-v4 .clan-chat-message p{font-size:15px!important;line-height:1.42!important}
.qt-keyboard-open .clan-chat-panel-v4{height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 190px - var(--qt-keyboard-height,0px))!important;min-height:220px!important}

/* Game: use the center space for content instead of leaving a large empty gap. */
.game-overlay .overlay-content{
  width:100%!important;max-width:820px!important;height:var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh))!important;
  min-height:0!important;padding-top:calc(var(--app-top-inset,0px) + 6px)!important;
  padding-bottom:max(7px,var(--safe-bottom,0px))!important;overflow:hidden!important;
}
.game-match{
  width:100%!important;height:calc(var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh)) - var(--app-top-inset,0px) - var(--safe-bottom,0px) - 13px)!important;
  min-height:0!important;margin:0 auto!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;
  gap:8px!important;overflow:hidden!important;
}
.game-match-score{min-height:58px!important;padding:8px 10px!important}
.game-player b{font-size:13px!important}.game-player small{font-size:12px!important}
.game-round-badge small{font-size:10px!important}.game-round-badge strong{font-size:17px!important}
.game-hud{padding:9px 10px!important}.game-hud-meta{font-size:11px!important}.game-hud-meta b{font-size:13px!important}.game-round-track span{font-size:11px!important}
.game-question-stage-v4{
  align-self:stretch!important;width:100%!important;max-height:none!important;min-height:0!important;padding:13px!important;
  display:grid!important;grid-template-rows:auto auto minmax(64px,auto) minmax(0,1fr) auto!important;
  align-content:center!important;gap:9px!important;overflow:auto!important;
}
.game-question-context-v4{display:flex!important;justify-content:center!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important}
.game-question-context-v4 span{min-height:28px!important;padding:0 10px!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--muted)!important;display:flex!important;align-items:center!important;gap:6px!important;font-size:12px!important;font-weight:750!important}
.game-question-context-v4 .svg-icon{width:14px!important;height:14px!important;color:var(--cyan)!important}
.game-question-copy{align-content:center!important;justify-items:center!important}
.game-question-copy h2{font-size:clamp(21px,5.6vw,32px)!important;line-height:1.18!important}
.game-answer-grid{min-height:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(58px,1fr))!important;grid-auto-rows:unset!important;gap:8px!important}
.game-answer{min-height:58px!important;height:auto!important;padding:10px!important;font-size:clamp(14px,3.7vw,17px)!important;line-height:1.3!important}
.game-booster-bar{position:static!important;min-height:57px!important;padding:6px!important;gap:6px!important}
.game-booster{height:47px!important}.game-booster small{font-size:10px!important}.game-booster b{font-size:11px!important}

@media(min-width:720px){
  .quiz-catalog-grid-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .quiz-catalog-grid-v4 .quiz-catalog-summary{grid-column:1/-1!important}
}
@media(min-width:980px){
  .mode-grid-v4{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:520px){
  .quick-battle-grid-v4,.mode-grid-v4{grid-template-columns:1fr!important}
  .quick-battle-grid-v4 .quick-battle-card,.mode-grid-v4 .mode-card-v4{min-height:78px!important}
  .profile-metrics-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .profile-actions-v4,.profile-utility-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .profile-actions-v4 button,.profile-utility-v4 button{min-height:72px!important;grid-template-columns:36px minmax(0,1fr)!important}
  .profile-actions-v4 button>.svg-icon:last-child,.profile-utility-v4 button>.svg-icon:last-child{display:none!important}
  .quiz-catalog-hero-v4{grid-template-columns:1fr!important}
  .quiz-hero-actions-v4{justify-content:flex-start!important}
  .quiz-card-bottom-v4{grid-template-columns:1fr!important}
  .quiz-card-v4 .quiz-card-actions{grid-template-columns:auto 1fr!important;align-items:center!important;justify-items:stretch!important}
  .quiz-card-v4 .quiz-card-actions .button{justify-content:center!important}
  .clan-profile-stats-v4,.public-stats-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .public-profile-hero-v4{grid-template-columns:76px minmax(0,1fr)!important}
  .public-profile-hero-v4 .avatar,.public-profile-hero-v4 .avatar img{width:76px!important;height:76px!important}
  .player-action-grid-v4{grid-template-columns:1fr!important}
  .friend-nickname-v4{grid-template-columns:1fr!important}
  .notification-summary-v4{grid-template-columns:42px minmax(0,1fr) 14px!important}
  .notification-summary-v4 time{grid-column:2!important;margin-top:-3px!important}
  .notification-summary-v4>i{grid-column:3!important;grid-row:1/3!important}
  .notification-detail-v4{padding-left:13px!important}
  .clan-chat-panel-v4{height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 236px - var(--qt-keyboard-height,0px))!important;min-height:330px!important}
  .game-question-stage-v4{padding:10px!important;gap:7px!important}
  .game-question-copy h2{font-size:clamp(19px,6vw,26px)!important}
  .game-answer{font-size:15px!important}
}
@media(max-width:370px){
  .profile-actions-v4,.profile-utility-v4{grid-template-columns:1fr!important}
  .clan-profile-hero-v4{grid-template-columns:minmax(0,1fr) 64px!important}.clan-profile-emblem-v4{width:64px!important;height:64px!important;border-radius:8px!important}
}
@media(max-height:720px){
  .game-match{gap:6px!important}
  .game-match-score{min-height:50px!important;padding:6px 8px!important}
  .game-player>span{width:32px!important;height:32px!important;flex-basis:32px!important}
  .game-round-badge{height:42px!important}
  .game-hud{padding:6px 8px!important}.game-round-track{margin-top:5px!important}
  .game-question-stage-v4{padding:8px!important;gap:6px!important;overflow:auto!important}
  .game-question-copy h2{font-size:18px!important}
  .game-answer-grid{grid-template-rows:repeat(2,minmax(48px,62px))!important}
  .game-answer{min-height:48px!important;font-size:14px!important}
  .game-booster-bar{min-height:49px!important;padding:4px!important}.game-booster{height:41px!important}
}

/* ===== QuizTop professional UI audit: readable type, contrast, chats, duel flow ===== */
:root{
  --qt-body:16px;
  --qt-small:13px;
  --qt-label:14px;
  --qt-control:16px;
}
html,body{font-size:var(--qt-body)!important;line-height:1.45!important}
.profile-compact-copy b{font-size:15px!important}.profile-compact-copy small{font-size:12px!important}
.page-heading p,.section-head p,.mode-copy small,.list-copy small,.profile-actions-v4 small,.profile-utility-v4 small,.daily-focus-item small,.quiz-card-v4 p,.quiz-card-v4 small,.setting-copy small,.form-group label{font-size:var(--qt-small)!important;line-height:1.4!important}
.input,.select,.textarea,input,select,textarea{font-size:16px!important}
.tab,.pill,.status,.price,.mode-label,.meta-row,.eyebrow{font-size:13px!important}
.overlay-title{font-size:21px!important}.section-head h2{font-size:22px!important}.form-group label{font-weight:800!important;color:var(--text)!important}

/* No pale-on-pale or white-on-white states in the light theme. */
html[data-theme="light"]{
  --surface:#ffffff;
  --surface-2:#edf2f1;
  --surface-3:#dfe9e7;
  --line:rgba(19,63,78,.14);
  --muted:#65747b;
  --muted-2:#7c898f;
}
html[data-theme="light"] .button-soft,html[data-theme="light"] .tab,html[data-theme="light"] .pill,html[data-theme="light"] .mode-label,html[data-theme="light"] .profile-tags-v3 span{color:#334750!important;}
html[data-theme="light"] .clan-hero-v4 .pill,html[data-theme="light"] .clan-hero-v4 .eyebrow,html[data-theme="light"] .clan-hero-v4 .clan-tags span{background:rgba(255,255,255,.19)!important;color:#fff!important;}
html[data-theme="dark"] .button-soft,html[data-theme="dark"] .tab,html[data-theme="dark"] .pill{color:#d9e6ed!important}

/* Avatar shape is consistent everywhere except the avatar shop tiles themselves. */
.avatar,.avatar img,.leader-avatar,.leader-avatar img,.profile-compact>.avatar,.profile-compact>.avatar img,.clan-member-avatar,.clan-member-avatar img{border-radius:8px!important;object-fit:cover!important;overflow:hidden!important}
.avatar-option .avatar-image,.avatar-option .avatar-image img{border-radius:8px!important}

/* Profile utility cards: labels and counters never split into 0 / 6. */
.profile-actions-v4 button,.profile-utility-v4 button{min-width:0!important}
.profile-actions-v4 button span,.profile-utility-v4 button span{min-width:0!important}
.profile-utility-v4 button small{display:flex!important;align-items:center!important;gap:3px!important;white-space:nowrap!important;line-height:1.2!important}
.profile-utility-v4 button small b{font-size:13px!important;white-space:nowrap!important}
.profile-actions-v4 b,.profile-utility-v4 b{font-size:15px!important}
.profile-actions-v4 small,.profile-utility-v4 small{font-size:13px!important}

/* History cards and Plus teaser remain clearly separated. */
.game-history-list{gap:14px!important}
.game-history-card{margin:0!important}
.history-plus-lock{margin-top:14px!important;padding:15px!important;min-height:84px!important}
.history-plus-lock b{font-size:15px!important}.history-plus-lock small{font-size:13px!important;line-height:1.45!important}

/* Daily focus is a readable task list, not microcopy. */
.daily-focus-card{padding:17px!important}
.daily-focus-head h2{font-size:27px!important}.daily-focus-head p{font-size:15px!important;line-height:1.45!important}
.daily-focus-item{min-height:78px!important;padding:12px!important;gap:11px!important}
.daily-focus-item b{font-size:15px!important;line-height:1.25!important}
.daily-focus-item small{font-size:13px!important;line-height:1.35!important}
.daily-focus-item>span:first-child,.daily-focus-item>.partner-logo{width:48px!important;height:48px!important;flex-basis:48px!important}

/* Compact catalog cards with readable information. */
.quiz-card-v4 .quiz-card-title h3{font-size:18px!important;-webkit-line-clamp:2!important}
.quiz-card-v4 .quiz-card-title p{font-size:14px!important;-webkit-line-clamp:2!important}
.quiz-card-v4 .quiz-card-metrics b{font-size:15px!important}.quiz-card-v4 .quiz-card-metrics small{font-size:12px!important}
.quiz-card-v4 .quiz-card-actions .button{font-size:16px!important}

/* Game stage hugs its content and stays centered instead of creating a huge empty white panel. */
.game-match{grid-template-rows:auto auto minmax(0,1fr) auto!important}
.game-question-stage-v4{
  align-self:center!important;
  height:auto!important;
  min-height:min(430px,100%)!important;
  max-height:100%!important;
  grid-template-rows:auto auto auto auto auto!important;
  align-content:center!important;
  overflow:auto!important;
}
.game-question-copy h2{font-size:clamp(22px,5.7vw,34px)!important}
.game-answer-grid{grid-template-rows:repeat(2,minmax(72px,auto))!important}
.game-answer{font-size:clamp(16px,4vw,19px)!important;min-height:72px!important}
.game-hud-meta{font-size:13px!important}.game-hud-meta b{font-size:15px!important}
.game-player b{font-size:15px!important}.game-player small{font-size:13px!important}
.game-booster small{font-size:12px!important}.game-booster b{font-size:13px!important}

/* Asynchronous friend duel: 6 distinct topic rounds, 5 questions each. */
.friend-duel-turn{display:grid;gap:13px;padding-bottom:12px}
.friend-duel-head,.friend-duel-versus,.friend-duel-categories,.friend-duel-wait,.friend-duel-history{background:var(--surface);border-radius:8px}
.friend-duel-head{padding:17px;display:grid;grid-template-columns:76px minmax(0,1fr);gap:14px;align-items:center}
.friend-duel-round{width:76px;height:76px;border-radius:8px;display:grid;place-content:center;text-align:center;background:linear-gradient(135deg,var(--cyan),var(--deep));color:#fff}
.friend-duel-round small{font-size:12px}.friend-duel-round strong{font-size:24px}
.friend-duel-head>div:last-child>span{font-size:13px;color:var(--cyan);font-weight:800}.friend-duel-head h2{margin-top:4px;font-size:22px;line-height:1.18}.friend-duel-head p{margin-top:7px;color:var(--muted);font-size:14px;line-height:1.45}
.friend-duel-versus{padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:8px;align-items:center}
.friend-duel-versus article{display:flex;align-items:center;gap:9px;min-width:0}.friend-duel-versus article:last-child{flex-direction:row-reverse;text-align:right}.friend-duel-versus>span{display:grid;place-items:center;color:var(--cyan)}
.friend-duel-versus b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-duel-versus small{display:block;margin-top:3px;color:var(--muted);font-size:12px}
.friend-duel-categories{padding:14px}.friend-duel-categories>.section-head{margin-bottom:10px}.friend-duel-categories>.section-head h2{font-size:20px!important}
.friend-duel-categories>div:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.friend-duel-categories button{min-height:68px;padding:10px;border-radius:8px;background:var(--surface-2);color:var(--text);display:grid;grid-template-columns:40px minmax(0,1fr) 14px;gap:9px;align-items:center;text-align:left}
.friend-duel-categories button>span{width:40px;height:40px;border-radius:8px;background:var(--surface);color:var(--cyan);display:grid;place-items:center}.friend-duel-categories button b{display:block;font-size:14px}.friend-duel-categories button small{display:block;margin-top:2px;color:var(--muted);font-size:12px}
.friend-duel-wait{min-height:210px;padding:24px;display:grid;place-items:center;align-content:center;text-align:center}.duel-wait-pulse{width:70px;height:70px;border-radius:8px;background:var(--surface-2);color:var(--cyan);display:grid;place-items:center;animation:duelPulse 1.6s ease-in-out infinite}.friend-duel-wait h3{margin-top:13px;font-size:20px}.friend-duel-wait p{margin-top:7px;max-width:430px;color:var(--muted);font-size:14px}
@keyframes duelPulse{50%{transform:scale(1.05);opacity:.78}}
.friend-duel-history{padding:14px}.friend-duel-history>.section-head{margin-bottom:9px}.friend-duel-history>div:last-child{display:grid;gap:7px}.friend-duel-history article{min-height:56px;padding:8px;border-radius:8px;background:var(--surface-2);display:grid;grid-template-columns:32px minmax(0,1fr) 28px;gap:9px;align-items:center}.friend-duel-history article>span{width:32px;height:32px;border-radius:8px;background:var(--surface);display:grid;place-items:center;font-weight:900}.friend-duel-history b{font-size:14px}.friend-duel-history small{display:block;margin-top:2px;color:var(--muted);font-size:12px}.friend-duel-history em{color:var(--cyan)}

/* User question submission form. */
.question-suggest-form{display:grid;gap:13px}.question-suggest-intro{padding:14px;border-radius:8px;background:var(--surface);display:grid;grid-template-columns:44px minmax(0,1fr);gap:11px}.question-suggest-intro>.svg-icon{width:44px;height:44px;padding:12px;border-radius:8px;background:var(--surface-2);color:var(--cyan)}.question-suggest-intro h3{font-size:18px}.question-suggest-intro p{margin-top:5px;color:var(--muted);font-size:14px;line-height:1.45}.answer-correct-input{}.question-answer-pair-grid{display:grid;gap:10px}

/* Chat composer is pinned directly above the custom keyboard. */
.qt-keyboard-open .friend-chat-v4 .friend-chat-compose,.qt-keyboard-open .clan-chat-panel-v4 .clan-chat-compose{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:var(--qt-keyboard-height,0px)!important;
  transform:translateX(-50%)!important;
  width:min(calc(100% - 24px),536px)!important;
  z-index:260!important;
  margin:0!important;
  background:var(--surface)!important;
  box-shadow:0 -10px 30px rgba(0,0,0,.12)!important;
}
.qt-keyboard-open .friend-chat-v4 .friend-chat-messages,.qt-keyboard-open .clan-chat-panel-v4 .clan-chat-messages{padding-bottom:76px!important}
.clan-chat-panel-v4{min-height:300px!important;height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 220px - var(--qt-keyboard-height,0px))!important}
.clan-chat-panel-v4 .clan-chat-compose{position:sticky;bottom:0;background:var(--bg);padding:8px!important}
.clan-chat-message .avatar,.clan-chat-message .avatar img{border-radius:8px!important}

@media(max-width:520px){
  .friend-duel-head{grid-template-columns:62px minmax(0,1fr);padding:13px}.friend-duel-round{width:62px;height:62px;border-radius:8px}.friend-duel-head h2{font-size:19px}
  .friend-duel-categories>div:last-child{grid-template-columns:1fr}
  .game-question-stage-v4{min-height:0!important;padding:11px!important}
  .game-answer-grid{grid-template-rows:repeat(2,minmax(64px,auto))!important}.game-answer{min-height:64px!important;font-size:16px!important}
}
@media(max-height:720px){
  .game-question-stage-v4{min-height:0!important;align-self:stretch!important}
  .game-answer-grid{grid-template-rows:repeat(2,minmax(50px,auto))!important}.game-answer{min-height:50px!important}
}

/* QuizTop 2.3.0 — final cross-page readability and light-theme contrast pass. */
.profile-actions-v4 button:last-child:nth-child(odd){grid-column:1/-1!important}

/* Shop and Plus */
.shop-wallet>div>span,.shop-wallet>div>small,.shop-wallet button small{font-size:13px!important;line-height:1.4!important}
.shop-wallet>div>strong{font-size:clamp(38px,10vw,58px)!important;line-height:1!important}
.shop-wallet button b,.shop-nav button,.shop-section-title p,.coin-offer p,.shop-plus-benefits span,.shop-plus-active small{font-size:14px!important;line-height:1.4!important}
.shop-section-title h2,.shop-plus-brand h2{font-size:22px!important;line-height:1.18!important}
.coin-offer-value strong{font-size:38px!important}.coin-offer-value span,.coin-offer-head em{font-size:13px!important}
.coin-offer .button,.plus-plan-card strong{font-size:17px!important}
.booster-shop-copy h3{font-size:17px!important}.booster-shop-copy p,.booster-shop-buy b{font-size:14px!important;line-height:1.4!important}

/* Avatar catalog */
.avatar-tabs .tab{font-size:14px!important;min-height:44px!important}
.avatar-detail{padding:11px 12px!important;min-height:58px!important}
.avatar-detail b{font-size:14px!important;line-height:1.22!important}.avatar-detail small{font-size:12px!important;line-height:1.3!important;margin-top:3px!important}

/* Settings and generic modal forms */
.settings-section h3{font-size:19px!important;line-height:1.2!important;margin-bottom:12px!important}
.segmented button{font-size:14px!important;min-height:48px!important}
.setting-row{min-height:76px!important}.setting-copy b{font-size:15px!important;line-height:1.25!important}.setting-copy small{font-size:13px!important;line-height:1.4!important}
.form-group>label,.form label>span{font-size:14px!important;font-weight:800!important}.input,.textarea,.select{font-size:16px!important;line-height:1.35!important}
.overlay-title{font-size:20px!important}

/* Notifications */
.notification-summary-v4 b{font-size:16px!important;line-height:1.25!important}.notification-summary-v4 small,.notification-summary-v4 time{font-size:13px!important;line-height:1.4!important}.notification-detail-v4 p{font-size:15px!important;line-height:1.55!important}

/* Clan and friend surfaces */
.clan-tab,.clan-tabs button{font-size:14px!important;min-height:46px!important}
.clan-tab.active,.clan-tabs button.active{box-shadow:0 8px 20px rgba(13,121,151,.2)!important}
.clan-chat-message b,.friend-chat-person b{font-size:15px!important}.clan-chat-message p,.chat-bubble p{font-size:16px!important;line-height:1.45!important}
.clan-chat-message time,.chat-bubble time{font-size:12px!important}
.clan-chat-compose .input,.friend-chat-compose .input{font-size:16px!important;min-height:54px!important}

/* Light theme must never wash out interactive controls. */
html[data-theme="light"] .game-booster-bar{background:rgba(255,255,255,.98)!important;box-shadow:0 12px 30px rgba(22,67,80,.12)!important}
html[data-theme="light"] .game-booster{background:#e8f0ef!important;color:#163746!important;}
html[data-theme="light"] .game-booster>span{background:#fff!important;color:#177f9b!important}
html[data-theme="light"] .game-booster small,html[data-theme="light"] .game-booster b{color:#264955!important}
html[data-theme="light"] .game-booster.disabled{opacity:.54!important}
html[data-theme="light"] .game-answer{background:#eaf0ef!important;color:#102d3b!important;}
html[data-theme="light"] .game-hud,html[data-theme="light"] .game-match-score{background:#fff!important;}
html[data-theme="light"] .quiz-card-v4,html[data-theme="light"] .settings-section,html[data-theme="light"] .notification-card-v4,html[data-theme="light"] .friend-duel-head,html[data-theme="light"] .friend-duel-versus,html[data-theme="light"] .friend-duel-categories,html[data-theme="light"] .friend-duel-wait,html[data-theme="light"] .friend-duel-history{box-shadow:0 8px 24px rgba(30,70,82,.07)!important}
html[data-theme="light"] .muted,html[data-theme="light"] .page-heading p,html[data-theme="light"] .section-head p{color:#62757d!important}

/* Short screens: preserve the question, answers and booster bar without a blank central field. */
@media(max-height:820px){
  .game-match{gap:8px!important}.game-match-score,.game-hud{padding:9px 11px!important}.game-question-stage-v4{align-content:start!important;overflow-y:auto!important}.game-question-copy h2{font-size:clamp(20px,5vw,29px)!important}.game-booster-bar{padding:7px!important}
}
@media(max-width:390px){
  .shop-nav button span{font-size:13px!important}.avatar-grid{gap:9px!important}.avatar-detail{padding:9px!important}.avatar-detail b{font-size:13px!important}
  .profile-actions-v4,.profile-utility-v4{grid-template-columns:1fr!important}.profile-actions-v4 button:last-child:nth-child(odd){grid-column:auto!important}
}

/* QuizTop 2.3.2 — unified readable typography on every active screen. */
body{font-size:16px!important;line-height:1.45!important}
.page-heading h1{font-size:clamp(28px,7vw,42px)!important;line-height:1.08!important}
.page-heading p,.section-head p{font-size:15px!important;line-height:1.45!important}
.section-head h2{font-size:clamp(22px,5.6vw,31px)!important;line-height:1.15!important}
.section-head span,.section-head button,.text-button{font-size:14px!important}
.eyebrow,.pill,.mode-label,.status,.price,.meta-row{font-size:12px!important;line-height:1.3!important}
.button-small{font-size:13px!important;min-height:40px!important}
.tab{font-size:14px!important;min-height:44px!important;padding:10px 14px!important}
.empty-state h3{font-size:18px!important}.empty-state p{font-size:14px!important;line-height:1.5!important}
.screen-loader,.error-panel b,.toast{font-size:14px!important;line-height:1.45!important}

/* Header and bottom navigation. */
.profile-compact-copy b{font-size:15px!important}.profile-compact-copy small{font-size:13px!important}
.nav-button{font-size:12px!important;gap:6px!important}.nav-button .svg-icon{width:23px!important;height:23px!important}
.notification-badge{font-size:11px!important;min-width:20px!important;height:20px!important}

/* Home, daily focus and mode cards. */
.hero-v4 p,.hero-season span,.home-metrics-v4 small{font-size:14px!important;line-height:1.45!important}
.hero-v4 h1{font-size:clamp(34px,8vw,52px)!important;line-height:1.04!important}
.home-metrics-v4 strong{font-size:20px!important}
.daily-focus-head h2{font-size:clamp(27px,6vw,37px)!important}.daily-focus-head p{font-size:15px!important;line-height:1.45!important}
.daily-focus-ring strong{font-size:18px!important}.daily-focus-ring small{font-size:11px!important}
.daily-focus-copy b{font-size:15px!important;line-height:1.25!important}.daily-focus-copy small{font-size:13px!important;line-height:1.4!important}
.daily-focus-item{min-height:72px!important;padding:12px!important}
.smart-start-card h3{font-size:21px!important}.smart-start-card p,.smart-start-top small{font-size:14px!important;line-height:1.45!important}
.quick-battle-card b{font-size:16px!important}.quick-battle-card small{font-size:13px!important;line-height:1.35!important}.quick-battle-card em{font-size:12px!important}
.mode-card-v4 .mode-copy b{font-size:17px!important;line-height:1.2!important}.mode-card-v4 .mode-copy small,.mode-card-v4 p{font-size:14px!important;line-height:1.42!important}
.home-topic-chip,.quiz-category-chip{font-size:13px!important}

/* Current profile: compact two-column actions with readable text. */
.profile-kicker-v3{font-size:12px!important}.profile-main-v3 h1{font-size:clamp(25px,6vw,35px)!important}.profile-main-v3 p{font-size:14px!important}
.profile-tags-v3 span{font-size:12px!important}.profile-level-v3>div{font-size:13px!important}
.profile-metrics-v3 article{min-height:92px!important}.profile-metrics-v3 strong{font-size:20px!important}.profile-metrics-v3 small{font-size:12px!important;line-height:1.3!important}
.profile-menu-title-v4{font-size:22px!important;line-height:1.2!important}
.profile-actions-v3,.profile-utility-v3,.profile-actions-v4,.profile-utility-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
.profile-actions-v3 button,.profile-utility-v3 button{min-height:82px!important;padding:12px!important}
.profile-actions-v3 b,.profile-utility-v3 b{font-size:15px!important;line-height:1.25!important}.profile-actions-v3 small,.profile-utility-v3 small{font-size:13px!important;line-height:1.35!important}
.profile-utility-v3 button>em,.profile-utility-v4 button>em{font-size:12px!important;white-space:nowrap!important;word-break:keep-all!important;line-height:1!important}
.profile-actions-v4 button:last-child:nth-child(odd),.profile-utility-v4 button:last-child:nth-child(odd){grid-column:1/-1!important}
.knowledge-ring-v3 span,.knowledge-overview-copy span,.knowledge-list-v3 small{font-size:13px!important;line-height:1.4!important}
.knowledge-overview-copy strong{font-size:18px!important}.knowledge-row-head b,.knowledge-row-head span{font-size:14px!important}.knowledge-list-v3 small{margin-top:5px!important}
.game-history-main b,.game-history-details b{font-size:16px!important}.game-history-main small,.game-history-details small{font-size:13px!important;line-height:1.4!important}
.history-plus-lock{font-size:14px!important;line-height:1.45!important;margin-top:10px!important;margin-bottom:16px!important;padding:15px!important}
.spin-progress-label,.spin-summary span{font-size:13px!important}

/* Catalog and quiz cards. */
.quiz-create-cta,.quiz-search-modern input{font-size:15px!important}.quiz-type-tabs button{font-size:13px!important}
.quiz-catalog-summary,.quiz-catalog-summary b{font-size:14px!important}
.quiz-card-title small{font-size:12px!important}.quiz-card-title h3{font-size:18px!important;line-height:1.25!important}
.quiz-card-description{font-size:14px!important;line-height:1.45!important;min-height:40px!important}
.quiz-card-price,.quiz-mode-pill{font-size:12px!important}.quiz-card-metrics b{font-size:15px!important}.quiz-card-metrics small{font-size:12px!important}
.quiz-card-v4{padding:15px!important;gap:12px!important}.quiz-card-v4 .button{font-size:17px!important}

/* Leaderboards, clan and player surfaces. */
.list-copy b,.leader-row h4,.clan-leader-row-v4 h4{font-size:16px!important}.list-copy small,.leader-row p,.clan-leader-row-v4 p{font-size:13px!important;line-height:1.4!important}
.list-value,.leader-score{font-size:15px!important}.list-value small{font-size:12px!important}.podium-card strong{font-size:14px!important}.podium-card small{font-size:12px!important}
.clan-hero p,.boss-card p,.tournament-state,.clan-price span,.clan-price small{font-size:14px!important;line-height:1.45!important}
.war-clans b{font-size:15px!important}.clan-tabs-v4{gap:8px!important}.clan-tabs-v4 .tab{font-size:14px!important}
.clan-chat-message b,.friend-chat-person b{font-size:16px!important}.friend-chat-person small{font-size:13px!important}
.clan-chat-message p,.chat-bubble p{font-size:16px!important;line-height:1.5!important}.clan-chat-message time,.chat-bubble time{font-size:12px!important}
.friend-chat-head>div button{font-size:12px!important}.friend-chat-replies>span{font-size:12px!important}.friend-chat-replies button{font-size:14px!important;min-height:40px!important}
.friend-chat-compose input,.clan-chat-compose input{font-size:16px!important;min-height:54px!important}

/* Game screens: use the available height without a dead central field. */
.game-match{height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 18px)!important;min-height:0!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;gap:9px!important}
.game-player b{font-size:15px!important}.game-player small{font-size:13px!important}.game-round-badge small{font-size:11px!important}.game-round-badge strong{font-size:22px!important}
.game-hud-meta,.game-round-track span{font-size:13px!important}.game-hud-meta b{font-size:15px!important}
.game-question-stage-v4{min-height:0!important;height:100%!important;align-content:center!important;padding:14px!important;overflow-y:auto!important}
.game-question-context-v4{font-size:13px!important}.game-question-copy h2{font-size:clamp(23px,6vw,36px)!important;line-height:1.12!important}
.game-answer{min-height:72px!important;font-size:17px!important;line-height:1.3!important;padding:12px!important}
.game-booster small{font-size:12px!important}.game-booster b{font-size:13px!important}.game-feedback-modern b{font-size:15px!important}.game-feedback-modern small{font-size:13px!important}

/* Avatar shop, settings, notifications, legal and generic forms. */
.avatar-name{font-size:13px!important}.avatar-lock{font-size:11px!important;width:24px!important;height:24px!important}
.achievement-top h3{font-size:17px!important}.achievement-top p{font-size:14px!important;line-height:1.45!important}.rarity,.achievement-meta{font-size:12px!important}
.form-group label,.check-row,.consent-row,.modal-sheet p{font-size:14px!important;line-height:1.5!important}
.legal-kicker{font-size:12px!important}.legal-body h4{font-size:18px!important}.legal-body p{font-size:14px!important;line-height:1.65!important}
.welcome-message{font-size:15px!important}.welcome-divider,.consent-copy,.welcome-error{font-size:13px!important}
.referral-level-head h4,.referral-people-title b{font-size:15px!important}.referral-level-head p,.referral-level-stats small,.referral-reward-row>span,.referral-people-title small{font-size:12px!important;line-height:1.4!important}.referral-reward-row b{font-size:14px!important}

/* Strong semantic contrast in both themes. */
html[data-theme="light"]{--muted:#60737b!important;--surface-2:#e9f0ef!important;--soft:#edf3f2!important}
html[data-theme="light"] :is(.tab,.mode-card,.profile-actions-v3 button,.profile-utility-v3 button,.daily-focus-item,.quiz-category-chip,.home-topic-chip,.setting-row){color:#102f3e!important}
html[data-theme="light"] :is(.tab,.mode-card,.daily-focus-item,.quiz-category-chip,.home-topic-chip,.setting-row) small{color:#5c7078!important}
html[data-theme="dark"]{--muted:#9baebe!important;--surface-2:#17283b!important;--soft:#142537!important}
html[data-theme="dark"] :is(.tab,.mode-card,.profile-actions-v3 button,.profile-utility-v3 button,.daily-focus-item,.quiz-card-v4,.setting-row){color:#f7fafc!important}

@media(max-width:390px){
  .profile-actions-v4,.profile-utility-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .profile-actions-v3 button,.profile-utility-v3 button{grid-template-columns:36px minmax(0,1fr) 14px!important;padding:10px!important;gap:8px!important}
  .profile-actions-v3 b,.profile-utility-v3 b{font-size:14px!important}.profile-actions-v3 small,.profile-utility-v3 small{font-size:12px!important}
  .game-answer{min-height:64px!important;font-size:16px!important}.game-question-copy h2{font-size:clamp(21px,5.7vw,29px)!important}
}
@media(max-height:720px){
  .game-match{gap:6px!important}.game-question-stage-v4{align-content:start!important;padding:10px!important}.game-answer{min-height:54px!important}.game-booster-bar{min-height:66px!important}
}

/* Keep the game card close to its real content; unused height stays outside the card. */
.game-match{height:calc(var(--qt-visual-height,var(--tg-viewport-stable-height,100dvh)) - var(--app-top-inset,0px) - var(--safe-bottom,0px) - 13px)!important}
.game-question-stage-v4{height:auto!important;min-height:0!important;max-height:100%!important;align-self:center!important;align-content:center!important}
.profile-utility-v4 button small{white-space:nowrap!important}.profile-utility-v4 button small b{display:inline!important;font-size:inherit!important}

/* Every user avatar size emitted by the UI has an explicit circular box. */
.avatar-38{width:38px!important;height:38px!important}
.avatar-40{width:40px!important;height:40px!important}
.avatar-42{width:42px!important;height:42px!important}
.avatar-44{width:44px!important;height:44px!important}
.avatar-48{width:48px!important;height:48px!important}
.avatar-54{width:54px!important;height:54px!important}
.avatar-58{width:58px!important;height:58px!important}
.avatar-60{width:60px!important;height:60px!important}
.avatar-92{width:92px!important;height:92px!important}
.avatar-104{width:104px!important;height:104px!important}
.avatar[class*="avatar-"],.avatar[class*="avatar-"] img{border-radius:8px!important;object-fit:cover!important}

/* Small descriptive text stays readable in both themes. */
.eyebrow,.pill,.mode-label,.status,.price,.meta-row,.quiz-card-title small,.quiz-card-price,.quiz-mode-pill,
.avatar-detail small,.achievement-meta,.rarity,.friend-chat-replies>span{font-size:13px!important;line-height:1.35!important}
.avatar-detail b{font-size:15px!important}.avatar-detail small{margin-top:3px!important}

/* QuizTop 2.3.2 — final visual audit: compact games, catalog, chats and theme contrast. */

/* The play surface follows its content instead of stretching into a tall blank card. */
.game-overlay .overlay-content{overflow-y:auto!important;overscroll-behavior:contain!important}
.game-match{
  height:auto!important;
  min-height:0!important;
  grid-template-rows:auto auto auto auto!important;
  align-content:start!important;
  overflow:visible!important;
  padding-bottom:max(8px,var(--safe-bottom,0px))!important;
}
.game-question-stage-v4{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  align-self:stretch!important;
  align-content:start!important;
  overflow:visible!important;
  padding:14px!important;
}
.game-question-copy{padding-block:2px 8px!important}
.game-answer-grid{grid-template-rows:repeat(2,minmax(68px,auto))!important}
.game-booster-bar{position:relative!important;bottom:auto!important;margin-top:0!important}

/* Wheel counter stays on one readable line: 0/6, never three stacked rows. */
.profile-utility-v4 .spin-inline{
  display:inline-flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:0!important;
  width:max-content!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
.profile-utility-v4 .spin-inline b,.profile-utility-v4 .spin-inline span{display:inline!important;flex:0 0 auto!important;font-size:inherit!important;line-height:1!important}
.profile-actions-v4 button>span,.profile-utility-v4 button>span{min-width:0!important}

/* The catalog is shorter and easier to scan without hiding useful information. */
.quiz-catalog-grid-v4{gap:10px!important}
.quiz-card-v4{padding:12px!important;gap:10px!important;border-radius:8px!important}
.quiz-card-v4 .quiz-card-top{grid-template-columns:46px minmax(0,1fr) auto!important;gap:10px!important;align-items:start!important}
.quiz-card-v4 .quiz-card-icon{width:46px!important;height:46px!important;border-radius:8px!important}
.quiz-card-v4 .quiz-card-title{min-width:0!important}
.quiz-card-v4 .quiz-card-title h3{font-size:18px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.quiz-card-v4 .quiz-card-title small{font-size:13px!important;line-height:1.3!important}
.quiz-card-description{
  margin-top:4px!important;
  min-height:0!important;
  font-size:14px!important;
  line-height:1.4!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}
.quiz-card-bottom-v4{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important}
.quiz-card-metrics{display:flex!important;gap:7px!important;min-width:0!important}
.quiz-card-metrics>span{min-height:50px!important;padding:7px 9px!important;min-width:0!important;flex:1 1 0!important}
.quiz-card-metrics b{font-size:15px!important}.quiz-card-metrics small{font-size:12px!important;line-height:1.2!important}
.quiz-card-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important}
.quiz-card-actions .button{min-height:48px!important;padding:0 18px!important;font-size:16px!important;white-space:nowrap!important}
.quiz-mode-pill{white-space:nowrap!important}

/* Friend and clan composer sits exactly above the custom keyboard. */
.friend-chat-v4,.clan-chat-panel-v4{transition:none!important}
.clan-chat-panel-v4{min-height:280px!important;height:min(620px,calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - 210px))!important}
.clan-chat-panel-v4 .clan-chat-messages{min-height:0!important;max-height:none!important;overflow-y:auto!important;padding-bottom:12px!important}
.friend-chat-compose,.clan-chat-compose{z-index:40!important}
.qt-keyboard-open .friend-chat-v4 .friend-chat-compose,
.qt-keyboard-open .clan-chat-panel-v4 .clan-chat-compose{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(var(--qt-keyboard-height,310px) + 6px)!important;
  transform:translateX(-50%)!important;
  width:min(calc(100% - 20px),760px)!important;
  min-height:64px!important;
  padding:6px!important;
  border-radius:8px!important;
  z-index:3102!important;
  background:var(--surface)!important;
  box-shadow:0 -8px 24px rgba(5,24,35,.16)!important;
}
.qt-keyboard-open .friend-chat-v4,
.qt-keyboard-open .clan-chat-panel-v4{
  height:calc(var(--qt-visual-height,100dvh) - var(--app-top-inset,0px) - var(--qt-keyboard-height,310px) - 72px)!important;
  min-height:150px!important;
  padding-bottom:68px!important;
}
.qt-keyboard-open .friend-chat-v4 .friend-chat-messages,
.qt-keyboard-open .clan-chat-panel-v4 .clan-chat-messages{padding-bottom:18px!important}
.qt-keyboard-open .clan-page-v4{padding-bottom:calc(var(--qt-keyboard-height,310px) + 86px)!important}

/* Avatars and their labels remain large enough to read on phones. */
.avatar-grid{gap:12px!important}
.avatar-option{border-radius:8px!important;overflow:hidden!important}
.avatar-detail{min-height:64px!important;padding:11px 12px!important}
.avatar-detail b{font-size:15px!important;line-height:1.2!important}.avatar-detail small{font-size:13px!important;line-height:1.3!important}

/* Stronger semantic colours on both themes, including disabled and secondary text. */
html[data-theme="light"]{
  --text:#102d3b!important;
  --muted:#5d7078!important;
  --surface:#ffffff!important;
  --surface-2:#e9f0ef!important;
  --soft:#edf3f2!important;
}
html[data-theme="light"] :is(.quiz-card-price,.quiz-mode-pill,.pill,.tab,.setting-row,.daily-focus-item,.profile-actions-v4 button,.profile-utility-v4 button){}
html[data-theme="light"] :is(.quiz-card-description,.setting-copy small,.daily-focus-copy small,.profile-actions-v4 small,.profile-utility-v4 small,.avatar-detail small){color:#5d7078!important}
html[data-theme="light"] button:disabled{color:#52666e!important;opacity:.72!important}
html[data-theme="dark"]{
  --text:#f7fafc!important;
  --muted:#a7b6c3!important;
  --surface:#112235!important;
  --surface-2:#192d43!important;
  --soft:#15283c!important;
}
html[data-theme="dark"] :is(.quiz-card-description,.setting-copy small,.daily-focus-copy small,.profile-actions-v4 small,.profile-utility-v4 small,.avatar-detail small){color:#a7b6c3!important}

@media(max-width:520px){
  .quiz-card-bottom-v4{grid-template-columns:1fr!important}
  .quiz-card-actions{justify-content:space-between!important}
  .avatar-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .game-question-copy h2{font-size:clamp(22px,6vw,31px)!important}
}
@media(max-width:390px){
  .quiz-card-metrics>span{padding-inline:6px!important}
  .quiz-card-actions .button{padding-inline:15px!important}
  .avatar-detail b{font-size:14px!important}.avatar-detail small{font-size:12px!important}
}

/* Raw profile images in rankings, clan members and chats must never fall back to square corners. */
:is(.leader-row,.list-item,.clan-chat-message,.clan-profile-members-v4 button,.friend-card) > img,
:is(.leader-row,.list-item,.clan-chat-message,.clan-profile-members-v4 button,.friend-card) .avatar > img{border-radius:8px!important;aspect-ratio:1!important;object-fit:cover!important}

/* QuizTop 2.3.2 — final production audit for store, clan tags and residual tiny copy. */
#view :where(p,small,label),#overlayContent :where(p,small,label){font-size:max(13px,.8125rem)!important}
#view :where(button,input,textarea,select),#overlayContent :where(button,input,textarea,select){font-size:max(14px,.875rem)}

/* Store typography uses the same readable scale as the rest of the application. */
.shop-wallet>div>span,.shop-wallet>div>small,.shop-wallet>button small{font-size:14px!important;line-height:1.45!important}
.shop-wallet>button b{font-size:16px!important;line-height:1.25!important}
.shop-nav button{min-height:52px!important;height:auto!important;font-size:15px!important;line-height:1.25!important}
.shop-nav button span{font-size:15px!important}
.shop-section-title h2,.shop-plus-brand h2{font-size:24px!important;line-height:1.15!important}
.shop-section-title p{font-size:14px!important;line-height:1.45!important}
.coin-offer-head em{font-size:12px!important;line-height:1!important}
.coin-offer-value strong{font-size:40px!important;line-height:1!important}
.coin-offer-value span,.coin-offer p{font-size:14px!important;line-height:1.4!important}
.coin-offer .button{font-size:17px!important;min-height:50px!important}
.booster-shop-copy h3{font-size:17px!important;line-height:1.25!important}
.booster-shop-copy em,.booster-shop-buy b{font-size:13px!important;line-height:1.3!important}
.booster-shop-copy p{font-size:14px!important;line-height:1.45!important}
.shop-plus-brand span{font-size:13px!important;line-height:1.3!important}
.shop-plus-benefits article,.shop-plus-benefits span{font-size:14px!important;line-height:1.4!important}
.shop-plus-active b{font-size:16px!important}.shop-plus-active small{font-size:13px!important;line-height:1.4!important}
.plus-plan-card span,.plus-plan-card small{font-size:14px!important;line-height:1.35!important}.plus-plan-card strong{font-size:19px!important}.plus-plan-card em{font-size:11px!important}
.shop-history-modern b,.shop-history-modern strong{font-size:14px!important;line-height:1.3!important}.shop-history-modern small,.shop-history-empty{font-size:13px!important;line-height:1.4!important}

/* Coloured clan headers keep every tag visible in both themes. */
.clan-hero .pill-light{
  background:rgba(4,38,52,.46)!important;
  color:#fff!important;
  
  text-shadow:0 1px 2px rgba(0,0,0,.18)!important;
}
html[data-theme="light"] .clan-hero .pill-light,html[data-theme="dark"] .clan-hero .pill-light{color:#fff!important}
.clan-profile-hero-v4>div>div>span{font-size:13px!important;line-height:1.3!important;}

/* Avatar images are circular everywhere they represent a player, including clan rankings. */
.clan-leader-row-v4 .avatar,.clan-leader-row-v4 .avatar img,.clan-profile-members-v4 .avatar,.clan-profile-members-v4 .avatar img,.clan-chat-message .avatar,.clan-chat-message .avatar img{border-radius:8px!important;overflow:hidden!important;object-fit:cover!important}


/* === 2.3.3 precision patch: one geometry system, stable gameplay === */
html body *,html body *::before,html body *::after{border-radius:8px!important}
.avatar,.avatar img,.avatar-fallback,.leader-avatar,.leader-avatar img,.profile-avatar-v3 .avatar,.profile-avatar-v3 img,
.clan-member-avatar,.clan-member-avatar img,.clan-chat-message .avatar,.clan-chat-message .avatar img,
.avatar[class*="avatar-"],.avatar[class*="avatar-"] img{border-radius:8px!important;overflow:hidden!important;object-fit:cover!important}

/* Descriptive filler is removed; labels, values and statuses remain. */
.page-heading>div>p,.section-head>div>p,.mode-copy small,.quiz-card-description,.profile-actions-v4 small,
.smart-start-mode p,.question-suggest-intro p,.setting-copy small{display:none!important}

.daily-focus-list{display:grid!important;gap:10px!important}
.daily-focus-item{display:grid!important;grid-template-columns:56px minmax(0,1fr) 20px!important;column-gap:14px!important;align-items:center!important;min-height:76px!important;padding:10px 12px!important;text-align:left!important}
.daily-focus-item>.daily-focus-icon{width:56px!important;height:56px!important;min-width:56px!important;display:grid!important;place-items:center!important;margin:0!important}
.daily-focus-item>.daily-focus-copy{display:block!important;min-width:0!important;margin:0!important;padding:0!important}
.daily-focus-item>.daily-focus-copy b{display:block!important;font-size:16px!important;line-height:1.25!important;margin:0!important}
.daily-focus-item>.daily-focus-copy small{display:block!important;font-size:14px!important;line-height:1.35!important;margin-top:4px!important;color:var(--muted)!important}
.daily-focus-head{align-items:start!important;gap:12px!important}.daily-focus-head p{display:none!important}

.game-match-clean{display:grid!important;grid-template-rows:auto auto auto!important;align-content:start!important;gap:10px!important;min-height:0!important;height:auto!important}
.game-hud-clean{padding:12px 14px!important;min-height:0!important}
.game-hud-meta{font-size:14px!important}.game-hud-meta b{font-size:16px!important}
.game-question-stage-v5{position:relative!important;display:grid!important;grid-template-rows:32px 50px auto auto!important;align-content:start!important;gap:10px!important;height:auto!important;min-height:0!important;max-height:none!important;padding:14px!important;overflow:visible!important}
.game-category-chip{justify-self:center!important;display:inline-flex!important;align-items:center!important;gap:7px!important;height:32px!important;padding:0 11px!important;background:var(--surface-2)!important;color:var(--muted)!important;font-size:13px!important;font-weight:800!important}
.game-feedback-modern{min-height:50px!important;height:50px!important;padding:8px 12px!important;visibility:hidden!important;opacity:0!important;margin:0!important;overflow:hidden!important}
.game-feedback-modern.success,.game-feedback-modern.danger,.game-feedback-modern.round{visibility:visible!important;opacity:1!important}
.game-feedback-modern b{font-size:14px!important}.game-feedback-modern small{font-size:12px!important}
.game-question-copy{display:grid!important;place-items:center!important;min-height:112px!important;margin:0!important;padding:0 4px!important}
.game-question-copy h2{font-size:clamp(23px,6vw,34px)!important;line-height:1.08!important;margin:0!important;max-width:760px!important;text-align:center!important}
.game-answer-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0!important}
.game-answer{min-height:72px!important;padding:12px 14px!important;font-size:17px!important;line-height:1.25!important;transform:none!important;transition:background .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease!important}
.game-answer:active{transform:none!important}
.game-booster-bar-clean{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;padding:8px!important;min-height:64px!important;background:var(--surface)!important;box-shadow:none!important}
.game-booster-bar-clean .game-booster{height:48px!important;min-width:0!important;padding:0 9px!important;display:grid!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:7px!important;align-items:center!important;background:var(--surface-2)!important;color:var(--text)!important}
.game-booster-bar-clean .game-booster>span{width:28px!important;height:28px!important;display:grid!important;place-items:center!important;background:var(--surface)!important;color:var(--cyan)!important}
.game-booster-bar-clean .game-booster>b{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:13px!important;text-align:left!important}
.game-booster-bar-clean .game-booster>em{min-width:22px!important;height:22px!important;display:grid!important;place-items:center!important;background:var(--surface)!important;color:var(--text)!important;font-size:12px!important;font-style:normal!important;font-weight:900!important}
.game-booster-bar-clean .game-booster.disabled{opacity:.42!important}
.game-match-score,.game-question-context-v4{display:none!important}

.profile-actions-v4 button{min-height:64px!important}.profile-actions-v4 button>span b{font-size:16px!important;line-height:1.25!important}
.notification-detail-v4 .button{position:relative!important;z-index:2!important;pointer-events:auto!important}
.qt-keyboard-open .question-suggest-form{padding-bottom:12px!important}

html[data-theme="light"] .game-category-chip,html[data-theme="light"] .game-booster-bar-clean .game-booster,
html[data-theme="light"] .daily-focus-item{background:#eef3f2!important;color:#102f3e!important;}
html[data-theme="light"] .game-booster-bar-clean,html[data-theme="light"] .game-question-stage-v5,html[data-theme="light"] .game-hud-clean{background:#fff!important;color:#102f3e!important;}
html[data-theme="dark"] .game-question-stage-v5,html[data-theme="dark"] .game-hud-clean,html[data-theme="dark"] .game-booster-bar-clean{background:var(--surface)!important;color:#f7fafc!important}

@media(max-width:560px){
  .game-question-stage-v5{grid-template-rows:30px 48px auto auto!important;padding:10px!important;gap:8px!important}
  .game-question-copy{min-height:94px!important}.game-question-copy h2{font-size:clamp(21px,6.6vw,29px)!important}
  .game-answer{min-height:62px!important;font-size:16px!important;padding:10px!important}
  .game-booster-bar-clean{gap:5px!important;padding:6px!important}
  .game-booster-bar-clean .game-booster{grid-template-columns:26px 1fr!important;padding:0 6px!important}
  .game-booster-bar-clean .game-booster>em{position:absolute!important;right:4px!important;top:4px!important;width:18px!important;height:18px!important;min-width:18px!important;font-size:10px!important}
  .game-booster-bar-clean .game-booster{position:relative!important}.game-booster-bar-clean .game-booster>b{font-size:11px!important}
}


/* === QuizTop 2.3.5 final interface pass === */
:root{--radius-xs:8px;--radius-sm:8px;--radius-md:8px;--radius-lg:8px;--radius-xl:8px}
html body *,html body *::before,html body *::after{border-radius:8px!important}

/* Player pictures are always a clean 8px square, never circular or masked. */
.avatar,.avatar-fallback,.avatar img,.header-avatar,.header-avatar img,
.profile-avatar-v3,.profile-avatar-v3>.avatar,.profile-avatar-v3>.avatar img,
.friend-avatar-v3,.friend-avatar-v3 img,.leader-avatar,.leader-avatar img,
.podium-card .avatar,.podium-card .avatar img,.leader-row .avatar,.leader-row .avatar img,
.clan-leader-row-v4 .avatar,.clan-leader-row-v4 .avatar img,
.clan-profile-members-v4 .avatar,.clan-profile-members-v4 .avatar img,
.clan-chat-message .avatar,.clan-chat-message .avatar img,
.friend-card .avatar,.friend-card .avatar img,.result-players-v5 .avatar,.result-players-v5 .avatar img{
  border-radius:8px!important;clip-path:none!important;mask:none!important;-webkit-mask:none!important;
  overflow:hidden!important;object-fit:cover!important;
}
.avatar img{inset:0!important;width:100%!important;height:100%!important;display:block!important}

/* Daily focus: no ring/square behind progress, balanced icons and copy. */
.daily-focus-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:14px!important}
.daily-focus-progress{display:grid!important;justify-items:end!important;align-content:start!important;min-width:54px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
.daily-focus-progress::before,.daily-focus-progress::after{display:none!important;content:none!important}
.daily-focus-progress strong{font:850 22px/1 var(--font-display)!important;color:var(--text)!important}
.daily-focus-progress small{margin-top:6px!important;font-size:12px!important;line-height:1!important;color:var(--muted)!important;text-transform:uppercase!important}
.daily-focus-list{gap:10px!important;margin-top:16px!important}
.daily-focus-item{grid-template-columns:50px minmax(0,1fr) 24px!important;gap:12px!important;min-height:78px!important;padding:12px!important;align-items:center!important}
.daily-focus-item>.daily-focus-icon{width:50px!important;height:50px!important;min-width:50px!important;padding:0!important;display:grid!important;place-items:center!important;background:var(--surface-2)!important;color:var(--cyan)!important}
.daily-focus-item>.daily-focus-icon .svg-icon{width:22px!important;height:22px!important}
.daily-focus-item.partner-task>.daily-focus-icon{background:var(--surface-2)!important;padding:6px!important}
.daily-focus-item.partner-task>.daily-focus-icon img{width:38px!important;height:38px!important;max-width:38px!important;max-height:38px!important;object-fit:contain!important;object-position:center!important;margin:auto!important}
.daily-focus-copy{min-width:0!important;padding:0!important;margin:0!important}
.daily-focus-copy b{font-size:16px!important;line-height:1.25!important;margin:0!important}
.daily-focus-copy small{display:block!important;font-size:14px!important;line-height:1.35!important;margin-top:4px!important;color:var(--muted)!important}
.daily-focus-state{width:24px!important;height:24px!important;display:grid!important;place-items:center!important;background:transparent!important;color:var(--muted)!important}
.daily-focus-item.done .daily-focus-state{color:var(--success)!important}
.daily-focus-item.done>.daily-focus-icon{background:color-mix(in srgb,var(--success) 13%,var(--surface-2))!important;color:var(--success)!important}

/* Player profile actions, especially the destructive action. */
.player-danger-v4{width:100%!important;min-height:58px!important;padding:10px 14px!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;text-align:left!important;background:color-mix(in srgb,var(--danger) 12%,var(--surface))!important;color:var(--danger)!important;}
.player-danger-v4>span{width:38px!important;height:38px!important;display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--danger) 12%,var(--surface-2))!important}
.player-danger-v4>span .svg-icon{width:18px!important;height:18px!important}
.player-danger-v4>b{font-size:16px!important;line-height:1.2!important}

/* Only the category rows remain in the knowledge map. */
.knowledge-dashboard-list-only{display:block!important;padding:14px!important;background:var(--surface)!important}
.knowledge-dashboard-list-only .knowledge-list-v3{width:100%!important;gap:10px!important}
.knowledge-dashboard-list-only .knowledge-list-v3 article{padding:14px!important;min-height:82px!important}
.knowledge-dashboard-list-only .knowledge-row-head b,.knowledge-dashboard-list-only .knowledge-row-head span{font-size:16px!important}
.knowledge-dashboard-list-only .knowledge-list-v3 small{font-size:14px!important}
.knowledge-overview-v3,.knowledge-ring-v3,.knowledge-overview-copy{display:none!important}

/* Friend duel state never slips under Telegram chrome. */
.friend-duel-overlay .overlay-header{display:none!important}
.friend-duel-overlay .overlay-content{padding-top:calc(var(--app-top-inset,74px) + 8px)!important;overflow-y:auto!important}
.friend-duel-turn{display:grid!important;gap:12px!important;padding-bottom:max(18px,var(--safe-bottom))!important}
.friend-duel-head,.friend-duel-versus,.friend-duel-categories,.friend-duel-wait,.friend-duel-history{background:var(--surface)!important;padding:14px!important}
.friend-duel-categories>div:last-child{display:grid!important;gap:8px!important}
.friend-duel-categories button{min-height:74px!important;padding:12px!important;display:grid!important;grid-template-columns:46px minmax(0,1fr) 18px!important;gap:12px!important;align-items:center!important;text-align:left!important;background:var(--surface-2)!important}

/* Stable game screen: natural document flow, no overlap between question and answers. */
.game-overlay .overlay-header{display:none!important}
.game-overlay .overlay-content{height:auto!important;min-height:0!important;overflow-y:auto!important;padding-top:calc(var(--app-top-inset,74px) + 8px)!important;padding-bottom:max(14px,var(--safe-bottom))!important}
.game-match-clean{width:100%!important;height:auto!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto auto!important;gap:10px!important;align-content:start!important;overflow:visible!important}
.game-hud-clean{position:relative!important;min-height:0!important;padding:12px!important;background:var(--surface)!important;}
.game-hud-meta{display:grid!important;grid-template-columns:1fr auto 1fr!important;gap:10px!important;align-items:center!important;font-size:14px!important}
.game-hud-meta>span:last-child{text-align:right!important}.game-hud-meta b{font-size:16px!important}
.game-timer-chip{min-width:76px!important;justify-content:center!important;padding:8px 10px!important;background:var(--surface-2)!important}
.game-timer-track{height:7px!important;margin-top:12px!important;background:var(--surface-2)!important;overflow:hidden!important}.game-timer-track i{display:block!important;height:100%!important;background:linear-gradient(90deg,var(--cyan),var(--blue))!important}
.game-round-track{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;margin-top:9px!important}.game-round-track>div{display:grid!important;grid-template-columns:repeat(var(--round-size),minmax(0,1fr))!important;gap:6px!important}.game-round-track i{height:6px!important;background:var(--surface-2)!important}.game-round-track i.current{background:var(--orange)!important}.game-round-track i.correct{background:var(--success)!important}.game-round-track i.wrong{background:var(--danger)!important}
.game-question-stage-v6{position:relative!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;padding:14px!important;background:var(--surface)!important;overflow:visible!important}
.game-category-chip{align-self:center!important;height:auto!important;min-height:36px!important;padding:8px 12px!important;background:var(--surface-2)!important;color:var(--muted)!important;font-size:14px!important}
.game-question-copy{position:static!important;display:block!important;width:100%!important;min-height:0!important;height:auto!important;padding:6px 8px!important;margin:0!important;overflow:visible!important}
.game-question-copy h2{position:static!important;width:100%!important;max-width:760px!important;max-height:none!important;min-height:0!important;margin:0 auto!important;padding:0!important;overflow:visible!important;text-align:center!important;font:800 clamp(25px,6vw,38px)/1.12 var(--font-display)!important;word-break:normal!important;overflow-wrap:anywhere!important}
.game-question-stage-v6.question-medium .game-question-copy h2{font-size:clamp(23px,5.6vw,34px)!important}
.game-question-stage-v6.question-long .game-question-copy h2{font-size:clamp(21px,5vw,30px)!important}
.game-question-stage-v6.question-xl .game-question-copy h2{font-size:clamp(19px,4.5vw,27px)!important;line-height:1.18!important}
.game-answer-grid{position:static!important;width:100%!important;height:auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(72px,auto)!important;gap:10px!important;margin:0!important;overflow:visible!important}
.game-answer-grid.stacked{grid-template-columns:1fr!important;grid-auto-rows:minmax(58px,auto)!important}
.game-answer{position:relative!important;width:100%!important;height:auto!important;min-height:72px!important;padding:14px!important;display:grid!important;place-items:center!important;background:var(--surface-2)!important;color:var(--text)!important;font-size:18px!important;line-height:1.25!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important;transform:none!important}
.game-answer.correct{background:color-mix(in srgb,var(--success) 18%,var(--surface-2))!important;color:var(--success)!important;}.game-answer.wrong{background:color-mix(in srgb,var(--danger) 15%,var(--surface-2))!important;color:var(--danger)!important;}
.game-feedback-modern{position:static!important;transform:none!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:none!important;grid-template-columns:34px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;visibility:visible!important;opacity:1!important;overflow:visible!important}
.game-feedback-modern.success,.game-feedback-modern.danger{display:grid!important;padding:10px 12px!important}.game-feedback-modern b{font-size:15px!important}.game-feedback-modern small{display:block!important;margin-top:3px!important;font-size:13px!important;color:var(--muted)!important}
.game-booster-bar-clean{position:static!important;width:100%!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;padding:8px!important;background:var(--surface)!important;}
.game-booster-bar-clean .game-booster{position:relative!important;min-width:0!important;min-height:58px!important;height:auto!important;padding:8px!important;display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:7px!important;align-items:center!important;background:var(--surface-2)!important}.game-booster-bar-clean .game-booster>span{width:30px!important;height:30px!important;display:grid!important;place-items:center!important;background:var(--surface)!important}.game-booster-bar-clean .game-booster>b{font-size:12px!important;line-height:1.15!important;white-space:normal!important;text-align:left!important}.game-booster-bar-clean .game-booster>em{position:absolute!important;right:5px!important;top:5px!important;min-width:19px!important;height:19px!important;padding:0 4px!important;display:grid!important;place-items:center!important;background:var(--surface)!important;font-size:10px!important;font-style:normal!important}

/* Result page follows the same hierarchy and typography as the app. */
.result-screen-v5{display:grid!important;gap:12px!important;padding-bottom:max(14px,var(--safe-bottom))!important}
.result-summary-v5{padding:16px!important;background:linear-gradient(145deg,var(--blue),var(--deep))!important;color:#fff!important;display:grid!important;gap:14px!important}
.result-place-v5{display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:13px!important;align-items:center!important;text-align:left!important}.result-place-v5>span{grid-row:1/3;width:56px!important;height:56px!important;display:grid!important;place-items:center!important;background:var(--orange)!important}.result-place-v5 small{font-size:14px!important;color:rgba(255,255,255,.72)!important}.result-place-v5 strong{font:850 44px/1 var(--font-display)!important}
.result-primary-stats-v5{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}.result-primary-stats-v5 article{min-height:86px!important;padding:12px 8px!important;display:grid!important;align-content:center!important;text-align:center!important;background:rgba(255,255,255,.10)!important}.result-primary-stats-v5 strong{font:800 22px/1.1 var(--font-display)!important}.result-primary-stats-v5 span{margin-top:7px!important;font-size:13px!important;color:rgba(255,255,255,.72)!important}
.result-rewards-v5{display:flex!important;flex-wrap:wrap!important;gap:8px!important}.result-rewards-v5 span{padding:8px 10px!important;background:rgba(255,255,255,.10)!important;font-size:13px!important;font-weight:800!important}
.result-players-v5{padding:14px!important;background:var(--surface)!important}.result-players-v5 h2{font:800 21px/1.2 var(--font-display)!important;margin:0 0 10px!important}.result-players-v5>div{display:grid!important;gap:8px!important}.result-players-v5 article{display:grid!important;grid-template-columns:28px 42px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;min-height:66px!important;padding:10px!important;background:var(--surface-2)!important}.result-players-v5 article.me{}.result-players-v5 .rank{font-size:16px!important;font-weight:900!important;text-align:center!important}.result-players-v5 b{font-size:16px!important}.result-players-v5 small{display:block!important;margin-top:4px!important;font-size:13px!important;color:var(--muted)!important}
.result-actions-v5{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:0!important}

/* Recent history is compact; details and the full list open in overlays. */
.game-history-list{display:grid!important;gap:10px!important}.game-history-card{width:100%!important;padding:12px!important;display:block!important;text-align:left!important;background:var(--surface)!important;}.game-history-main{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto 16px!important;gap:10px!important;align-items:center!important}.game-history-main>span{width:44px!important;height:44px!important;display:grid!important;place-items:center!important;background:var(--surface-2)!important}.game-history-main b{font-size:16px!important}.game-history-main small{display:block!important;margin-top:3px!important;font-size:13px!important;color:var(--muted)!important}.game-history-main em{padding:7px 9px!important;background:var(--surface-2)!important;font-size:13px!important;font-style:normal!important;font-weight:900!important}.game-history-main>.svg-icon:last-child{width:14px!important;height:14px!important;color:var(--muted)!important}.game-history-details{margin-top:10px!important}
.history-all-button{width:100%!important;min-height:54px!important;margin-top:10px!important;padding:10px 13px!important;display:flex!important;justify-content:space-between!important;align-items:center!important;background:var(--surface)!important;color:var(--text)!important;font-size:15px!important;font-weight:850!important;}
.history-plus-lock{margin-top:10px!important;min-height:68px!important}
.history-detail-v5{display:grid!important;gap:12px!important}.history-detail-summary-v5{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:14px!important;background:var(--surface)!important}.history-detail-summary-v5 b{font-size:18px!important}.history-detail-summary-v5 small{display:block!important;margin-top:4px!important;font-size:13px!important;color:var(--muted)!important}.history-detail-summary-v5>span{font-size:15px!important;font-weight:900!important}.history-answer-list-v5{display:grid!important;gap:10px!important}.history-answer-list-v5 article{padding:13px!important;background:var(--surface)!important;}.history-answer-list-v5 article.correct{}.history-answer-list-v5 header{display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:10px!important}.history-answer-list-v5 header>span{width:30px!important;height:30px!important;display:grid!important;place-items:center!important;background:var(--surface-2)!important;font-weight:900!important}.history-answer-list-v5 header b{font-size:15px!important;line-height:1.35!important}.history-answer-list-v5 header small{display:block!important;margin-top:4px!important;font-size:12px!important;color:var(--muted)!important}.history-answer-row-v5{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:11px!important}.history-answer-row-v5>span{padding:10px!important;background:var(--surface-2)!important}.history-answer-row-v5 small,.history-answer-row-v5 b{display:block!important}.history-answer-row-v5 small{font-size:12px!important;color:var(--muted)!important}.history-answer-row-v5 b{margin-top:4px!important;font-size:14px!important}

/* Ranking list begins after the podium; keep cards aligned. */
.podium-grid .avatar,.podium-grid .avatar img{border-radius:8px!important}.leaderboard-list{display:grid!important;gap:8px!important}.leader-row{grid-template-columns:30px 46px minmax(0,1fr) auto!important;min-height:72px!important;padding:11px 12px!important}.leader-row b{font-size:16px!important}.leader-row small{font-size:13px!important}

@media(max-width:560px){
  .game-overlay .overlay-content{padding-left:10px!important;padding-right:10px!important}
  .game-question-stage-v6{padding:11px!important;gap:10px!important}
  .game-question-copy{padding:2px!important}.game-question-copy h2{font-size:clamp(23px,7.2vw,31px)!important}.game-question-stage-v6.question-long .game-question-copy h2{font-size:clamp(20px,6.2vw,27px)!important}.game-question-stage-v6.question-xl .game-question-copy h2{font-size:clamp(18px,5.5vw,24px)!important}
  .game-answer-grid{grid-auto-rows:minmax(66px,auto)!important;gap:8px!important}.game-answer{min-height:66px!important;padding:11px!important;font-size:17px!important}
  .game-booster-bar-clean{gap:5px!important;padding:6px!important}.game-booster-bar-clean .game-booster{grid-template-columns:1fr!important;justify-items:center!important;min-height:58px!important;padding:7px 4px!important}.game-booster-bar-clean .game-booster>b{font-size:11px!important;text-align:center!important}.game-booster-bar-clean .game-booster>span{width:28px!important;height:28px!important}
  .result-actions-v5{grid-template-columns:1fr!important}.result-primary-stats-v5{gap:6px!important}.result-primary-stats-v5 article{padding-inline:5px!important}.result-primary-stats-v5 strong{font-size:19px!important}.result-primary-stats-v5 span{font-size:12px!important}
  .history-answer-row-v5{grid-template-columns:1fr!important}
  .daily-focus-item{grid-template-columns:48px minmax(0,1fr) 20px!important;gap:10px!important}.daily-focus-item>.daily-focus-icon{width:48px!important;height:48px!important;min-width:48px!important}
}

/* === QuizTop 2.3.7 — full rotation, stable mobile layout and daily clans === */
html,body,#app,.app-shell,.page,.overlay,.overlay-content{max-width:100%;overflow-x:hidden!important;overscroll-behavior-x:none}
html,body{touch-action:pan-y;-webkit-text-size-adjust:100%}
body,#app,.app-shell,.page,.overlay-content{-webkit-user-select:none;user-select:none}
input,textarea,select,[contenteditable="true"]{-webkit-user-select:text!important;user-select:text!important}
img,a{-webkit-user-drag:none}
.page>*,.overlay-content>*,.quiz-catalog-card>*,.clan-page-v4>*,.profile-page-v4>*{min-width:0}
.horizontal,.tabs,.quiz-type-tabs,.quiz-mode-filter-v4,.quiz-category-strip,.home-topic-strip,.clan-tabs,.segmented{overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x!important;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.horizontal::-webkit-scrollbar,.tabs::-webkit-scrollbar,.quiz-type-tabs::-webkit-scrollbar,.quiz-mode-filter-v4::-webkit-scrollbar,.quiz-category-strip::-webkit-scrollbar,.home-topic-strip::-webkit-scrollbar,.clan-tabs::-webkit-scrollbar,.segmented::-webkit-scrollbar{display:none}

/* All interface geometry uses the same 8 px corner system. */
.avatar,.avatar img,.avatar-fallback,.header-avatar,.header-avatar img,.profile-avatar-v3,.profile-avatar-v3 img,.podium-card img,.leader-row img,.clan-member-card-v7 img,.clan-chat-message img,.public-profile img,.friend-card img,.notification-card-v4,.button,button,.card,.modal,.overlay-card,input,textarea,select,.pill,.tab,.mode-card,.quiz-catalog-card,.quiz-category-chip,.spin-status-card,.spin-main-button,.active-duel-banner-v7{border-radius:8px!important}

/* Quiz catalog: no search field, compact cards, stable player grammar. */
.quiz-catalog-v4{display:grid;gap:14px;padding-bottom:calc(var(--nav-height,84px) + 18px)}
.quiz-catalog-hero-v4{padding:17px!important;display:grid!important;gap:14px!important}
.quiz-catalog-hero-v4 h1{font-size:clamp(25px,6vw,38px)!important;line-height:1.02!important}
.quiz-hero-actions-v4{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
.quiz-hero-actions-v4 .quiz-create-cta{grid-column:1/-1!important;min-height:50px!important}
.quiz-toolbar-v4{padding:12px!important;display:grid!important;gap:9px!important}
.quiz-type-tabs,.quiz-mode-filter-v4{display:flex!important;gap:8px!important;padding-bottom:1px!important}
.quiz-type-tabs button,.quiz-mode-filter-v4 button{flex:0 0 auto!important;min-height:42px!important;padding:0 13px!important;white-space:nowrap!important}
.quiz-category-section-v4{display:grid!important;gap:9px!important}
.quiz-category-strip{display:flex!important;gap:8px!important}
.quiz-category-chip{flex:0 0 auto!important;min-height:46px!important;padding:0 13px!important}
.quiz-catalog-grid-v4{display:grid!important;gap:12px!important}
.quiz-card-v4{padding:15px!important;display:grid!important;gap:14px!important;overflow:hidden!important}
.quiz-card-top{display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;gap:11px!important;align-items:start!important}
.quiz-card-icon{width:48px!important;height:48px!important;display:grid!important;place-items:center!important}
.quiz-card-title{min-width:0!important}
.quiz-card-title small{font-size:13px!important;line-height:1.25!important}
.quiz-card-title h3{margin-top:3px!important;font-size:18px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
.quiz-card-price{align-self:start!important;max-width:112px!important;padding:7px 9px!important;font-size:13px!important;white-space:nowrap!important}
.quiz-card-bottom-v4{display:grid!important;gap:10px!important}
.quiz-card-metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
.quiz-card-metrics>span{min-width:0!important;min-height:62px!important;padding:9px!important;display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-content:center!important;column-gap:7px!important}
.quiz-card-metrics>span>.svg-icon{grid-row:1/3!important;align-self:center!important}
.quiz-card-metrics b{font-size:15px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
.quiz-card-metrics small{font-size:12px!important;line-height:1.2!important}
.quiz-card-actions{display:grid!important;grid-template-columns:auto minmax(150px,1fr)!important;gap:9px!important;align-items:center!important}
.quiz-card-actions .button{min-height:50px!important;font-size:17px!important}

/* Profile Plus is a proper badge, not a tiny avatar sticker. */
.profile-kicker-row-v7{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}
.profile-plus-badge-v7{display:inline-flex!important;align-items:center!important;gap:6px!important;min-height:30px!important;padding:6px 9px!important;background:var(--orange)!important;color:#fff!important;font-size:13px!important;font-weight:900!important;box-shadow:0 8px 20px rgba(252,129,56,.2)!important}
.profile-plus-badge-v7 .svg-icon{width:15px!important;height:15px!important}
.profile-avatar-v3 em{display:none!important}

/* Daily clan tasks require a real team and remain readable. */
.clan-task-list-v7{display:grid!important;gap:11px!important}
.clan-task-card-v7{padding:16px!important;display:grid!important;gap:12px!important;background:var(--surface)!important}
.clan-task-card-v7 header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:start!important}
.clan-task-card-v7 h3{font-size:19px!important;line-height:1.18!important}
.clan-task-card-v7 header small,.clan-task-card-v7 footer{font-size:13px!important}
.clan-task-card-v7 footer{display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;gap:8px!important;color:var(--muted)!important}
.clan-task-card-v7.complete{}

/* Clan members and leaderboard. */
.clan-member-list-v7,.clan-leader-list-v4{display:grid!important;gap:10px!important}
.clan-member-card-v7{padding:12px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;gap:11px!important;align-items:center!important;background:var(--surface)!important}
.clan-member-card-v7>.avatar,.clan-member-card-v7>.avatar img{width:48px!important;height:48px!important}
.clan-member-card-v7 .list-copy b{font-size:17px!important;line-height:1.2!important}
.clan-member-card-v7 .list-copy small,.clan-member-card-v7 .list-value small{font-size:12px!important}
.clan-member-card-v7 .list-value{text-align:right!important}
.clan-member-actions-v7{grid-column:2/-1!important;display:flex!important;justify-content:flex-end!important;gap:8px!important}
.clan-member-actions-v7 button{width:42px!important;height:42px!important}
.clan-leader-row-v4{width:100%!important;padding:13px!important;display:grid!important;grid-template-columns:28px 48px minmax(0,1fr) auto 18px!important;gap:10px!important;align-items:center!important;text-align:left!important;background:var(--surface)!important}
.clan-leader-row-v4>.avatar{width:48px!important;height:48px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,var(--cyan),var(--blue))!important}
.clan-leader-row-v4 h4{font-size:17px!important;line-height:1.2!important}
.clan-leader-row-v4 p{margin-top:3px!important;font-size:12px!important;line-height:1.3!important;white-space:normal!important}
.clan-leader-row-v4 .leader-score{font-size:16px!important;white-space:nowrap!important}

/* Knowledge Path and active asynchronous duels. */
.journey-list-v7{display:grid!important;gap:9px!important}
.journey-node-v7{width:100%!important;min-height:76px!important;padding:12px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;gap:11px!important;align-items:center!important;text-align:left!important;background:var(--surface)!important}
.journey-node-v7 .list-icon{width:48px!important;height:48px!important;display:grid!important;place-items:center!important;background:var(--surface-2)!important}
.journey-node-v7 .list-copy b{font-size:17px!important;line-height:1.2!important}
.journey-node-v7 .list-copy small{margin-top:4px!important;font-size:12px!important;line-height:1.25!important}
.journey-node-v7 .list-value{font-size:15px!important;font-weight:900!important;white-space:nowrap!important}
.journey-node-v7.locked{opacity:.62!important}
.active-duel-banner-v7{margin:14px 0!important;padding:14px!important;display:grid!important;grid-template-columns:52px minmax(0,1fr) 18px!important;gap:12px!important;align-items:center!important;background:linear-gradient(135deg,color-mix(in srgb,var(--cyan) 18%,var(--surface)),var(--surface))!important;cursor:pointer!important}
.active-duel-avatar-v7,.active-duel-avatar-v7 img{width:52px!important;height:52px!important;object-fit:cover!important;border-radius:8px!important}
.active-duel-banner-v7 small,.active-duel-banner-v7 b,.active-duel-banner-v7 span{display:block!important}
.active-duel-banner-v7 small{color:var(--cyan)!important;font-size:12px!important;font-weight:850!important}
.active-duel-banner-v7 b{margin-top:3px!important;font-size:18px!important}
.active-duel-banner-v7 span{margin-top:3px!important;color:var(--muted)!important;font-size:13px!important}

/* Reward wheel never exceeds the viewport. */
.spin-rebuilt{width:100%!important;max-width:620px!important;margin:0 auto!important;display:grid!important;gap:14px!important;overflow:hidden!important}
.spin-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.spin-summary>*,.spin-status-card>*{min-width:0!important}
.wheel-stage{position:relative!important;width:min(78vw,420px)!important;max-width:100%!important;aspect-ratio:1!important;margin:18px auto 8px!important}
.wheel-stage .wheel-svg{display:block!important;width:100%!important;height:auto!important;max-width:100%!important}
.wheel-stage .wheel-pointer{position:absolute!important;left:50%!important;top:-10px!important;width:38px!important;height:24px!important;transform:translateX(-50%)!important;background:transparent!important;clip-path:none!important}
.wheel-stage .wheel-pointer i{width:38px!important;height:24px!important;background:var(--orange)!important;clip-path:polygon(0 0,100% 0,50% 100%)!important}
.spin-main-button{width:100%!important;min-height:54px!important}
.spin-prize-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}

/* Detailed history uses a top state marker: side borders are forbidden. */
.history-answer-list-v5 article{}
.history-answer-list-v5 article.correct{}

@media(max-width:620px){
  .quiz-card-top{grid-template-columns:44px minmax(0,1fr)!important}.quiz-card-icon{width:44px!important;height:44px!important}.quiz-card-price{grid-column:2/-1!important;justify-self:start!important;margin-top:3px!important}.quiz-card-actions{grid-template-columns:1fr!important}.quiz-mode-pill{justify-self:start!important}.quiz-card-metrics b{font-size:14px!important}.quiz-card-metrics small{font-size:11px!important}
  .clan-member-card-v7{grid-template-columns:44px minmax(0,1fr) auto!important}.clan-member-card-v7>.avatar,.clan-member-card-v7>.avatar img{width:44px!important;height:44px!important}.clan-member-card-v7 .list-value{grid-column:2!important;text-align:left!important}.clan-member-actions-v7{grid-column:3!important;grid-row:1/3!important;align-self:center!important;flex-direction:column!important}
  .clan-leader-row-v4{grid-template-columns:24px 44px minmax(0,1fr) auto!important}.clan-leader-row-v4>.avatar{width:44px!important;height:44px!important}.clan-leader-row-v4 .leader-open{display:none!important}.clan-leader-row-v4 .leader-score{font-size:15px!important}
  .wheel-stage{width:min(82vw,360px)!important}
}

/* Current wheel markup uses these classes. */
.spin-center{width:100%!important;max-width:620px!important;margin:0 auto!important;display:grid!important;gap:14px!important;overflow:hidden!important}
.spin-wheel-shell{position:relative!important;width:min(78vw,420px)!important;max-width:100%!important;aspect-ratio:1!important;margin:10px auto!important;padding:0!important;display:grid!important;place-items:center!important;overflow:visible!important}
.spin-wheel-svg{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;margin:0 auto!important}
.spin-pointer{position:absolute!important;left:50%!important;top:-13px!important;width:38px!important;height:28px!important;transform:translateX(-50%)!important;display:grid!important;place-items:center!important;z-index:4!important;color:var(--orange)!important}
.spin-pointer .svg-icon{width:34px!important;height:28px!important;color:var(--orange)!important}
.spin-prizes-modern>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
@media(max-width:620px){.spin-wheel-shell{width:min(82vw,360px)!important}.spin-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.spin-summary article{padding:10px!important}.spin-summary strong{font-size:16px!important}.spin-summary span{font-size:12px!important}}

/* === QuizTop 2.3.8: duel identity, instant chat, fixed header and clean profile utilities === */
.app-shell{
  padding-top:calc(var(--app-top-inset,0px) + 66px)!important;
}
.topbar,
.telegram-mobile .topbar{
  position:fixed!important;
  top:0!important;
  left:50%!important;
  right:auto!important;
  width:min(100%,560px)!important;
  min-height:calc(var(--app-top-inset,0px) + 66px)!important;
  padding:calc(var(--app-top-inset,0px) + 10px) 14px 10px!important;
  transform:translateX(-50%)!important;
  align-items:flex-end!important;
  background:var(--bg)!important;
  box-shadow:0 8px 22px color-mix(in srgb,var(--bg) 82%,transparent)!important;
  z-index:70!important;
}

.active-duels-section-v8{margin-top:14px!important}
.active-duels-head-v8{align-items:end!important;margin-bottom:10px!important}
.active-duels-head-v8 .section-kicker{display:block!important;margin-bottom:4px!important;color:var(--cyan)!important;font-size:12px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.04em!important}
.active-duels-head-v8 h2{font:850 27px/1.05 var(--font-display)!important}
.active-duels-head-v8>span{min-width:50px!important;padding:7px 9px!important;text-align:center!important;background:var(--surface-2)!important;color:var(--muted)!important;font-size:13px!important;font-weight:850!important}
.active-duels-list-v8{display:grid!important;gap:9px!important}
.active-duel-banner-v8{width:100%!important;min-height:78px!important;padding:12px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr) 18px!important;gap:12px!important;align-items:center!important;text-align:left!important;background:linear-gradient(135deg,color-mix(in srgb,var(--cyan) 14%,var(--surface)),var(--surface))!important;color:var(--text)!important}
.active-duel-banner-v8.my-turn{background:linear-gradient(135deg,color-mix(in srgb,var(--cyan) 28%,var(--surface)),color-mix(in srgb,var(--blue) 14%,var(--surface)))!important;}
.active-duel-banner-v8>.avatar,.active-duel-banner-v8>.avatar img{width:48px!important;height:48px!important}
.active-duel-copy-v8{min-width:0!important;display:grid!important;gap:2px!important}
.active-duel-copy-v8 small{color:var(--cyan)!important;font-size:12px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.025em!important}
.active-duel-copy-v8 b{font-size:17px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.active-duel-copy-v8 span{color:var(--muted)!important;font-size:13px!important}
.active-duel-banner-v8>em{display:grid!important;place-items:center!important;color:var(--cyan)!important}

.friend-duel-versus article{min-width:0!important}
.friend-duel-versus .avatar,.friend-duel-versus .avatar img{width:54px!important;height:54px!important;flex:0 0 54px!important}
.friend-duel-versus article>div{min-width:0!important}
.friend-duel-versus article b{display:block!important;max-width:100%!important;font-size:16px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.friend-duel-versus article small{display:block!important;margin-top:3px!important;font-size:13px!important;color:var(--muted)!important}

.chat-bubble.sending{opacity:.72!important}
.chat-bubble.sending time{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important}
.chat-bubble.sending time::before{content:"";width:8px;height:8px;animation:qt-chat-spin .7s linear infinite}
.chat-bubble.failed{background:color-mix(in srgb,var(--danger) 28%,var(--surface-2))!important;}
@keyframes qt-chat-spin{to{transform:rotate(360deg)}}

.profile-utility-clean-v8 button{min-height:78px!important;grid-template-columns:48px minmax(0,1fr) 18px!important;align-items:center!important}
.profile-utility-clean-v8 button:disabled{opacity:.5!important;filter:saturate(.45)!important;background:var(--surface-2)!important;color:var(--muted)!important}
.profile-utility-clean-v8 button:disabled>svg:last-child{display:none!important}
.profile-utility-clean-v8 button>span{display:flex!important;align-items:center!important;min-height:100%!important}
.profile-utility-clean-v8 button>span b{font-size:17px!important;line-height:1.22!important}
.profile-utility-clean-v8 button>svg:first-child{width:48px!important;height:48px!important;padding:12px!important;background:var(--surface-2)!important;color:var(--cyan)!important}
.profile-shop-button-v8>svg:first-child{background:var(--surface-2)!important;color:var(--orange)!important;}

@media(max-width:390px){
  .app-shell{padding-top:calc(var(--app-top-inset,0px) + 62px)!important}
  .topbar,.telegram-mobile .topbar{min-height:calc(var(--app-top-inset,0px) + 62px)!important;padding-bottom:8px!important}
  .active-duels-head-v8 h2{font-size:24px!important}
  .active-duel-banner-v8{grid-template-columns:44px minmax(0,1fr) 16px!important;padding:10px!important}
  .active-duel-banner-v8>.avatar,.active-duel-banner-v8>.avatar img{width:44px!important;height:44px!important}
  .profile-utility-clean-v8 button{grid-template-columns:42px minmax(0,1fr) 16px!important}
  .profile-utility-clean-v8 button>svg:first-child{width:42px!important;height:42px!important;padding:10px!important}
}

/* === QuizTop 2.3.9: borderless surfaces, stable XP and compact knowledge map === */
.knowledge-section-v3 .section-head{align-items:center!important}
.knowledge-dashboard-list-only{padding:0!important;background:transparent!important}
.knowledge-list-clean-v9{display:grid!important;gap:9px!important}
.knowledge-list-clean-v9 article{padding:13px 14px!important;background:var(--surface)!important;box-shadow:none!important}
.knowledge-list-clean-v9 article.unplayed{opacity:.62!important}
.knowledge-list-clean-v9 .knowledge-row-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
.knowledge-list-clean-v9 .knowledge-row-head b{font-size:16px!important;line-height:1.25!important}
.knowledge-list-clean-v9 .knowledge-row-head span{font-size:15px!important;font-weight:850!important;color:var(--muted)!important}
.knowledge-list-clean-v9 .knowledge-track{height:7px!important;margin-top:10px!important;background:var(--surface-2)!important;overflow:hidden!important}
.knowledge-list-clean-v9 .knowledge-track i{display:block!important;height:100%!important;background:linear-gradient(90deg,var(--cyan),var(--blue))!important}
.knowledge-modal-v9{display:grid!important;gap:12px!important;padding-bottom:max(20px,var(--safe-bottom))!important}
.knowledge-modal-summary-v9{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:13px 14px!important;background:var(--surface)!important}
.knowledge-modal-summary-v9 b{font-size:17px!important}.knowledge-modal-summary-v9 span{color:var(--muted)!important;font-size:14px!important;font-weight:850!important}
.chat-bubble.sending time::before{width:10px!important;height:10px!important;background:conic-gradient(from 0deg,currentColor 0 70%,transparent 70% 100%)!important;mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0)!important;-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0)!important}

/* QuizTop 2.4.0 — clan avatars and official Telegram Stars glyph */
.telegram-star-icon{width:1em!important;height:1em!important;flex:0 0 1em!important;vertical-align:-.12em!important}
.stars-price{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important}
.clan-avatar{width:var(--clan-avatar-size,48px)!important;height:var(--clan-avatar-size,48px)!important;display:grid!important;place-items:center!important;position:relative!important;overflow:hidden!important;flex:0 0 var(--clan-avatar-size,48px)!important;background:linear-gradient(135deg,var(--cyan),var(--blue))!important;border-radius:8px!important;color:#fff!important}
.clan-avatar>img,.clan-avatar>.clan-avatar-fallback{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}.clan-avatar>img{display:block!important;object-fit:cover!important}.clan-avatar-fallback{display:grid!important;place-items:center!important;padding:4px!important;font-size:clamp(11px,calc(var(--clan-avatar-size,48px) * .27),24px)!important;font-weight:950!important;letter-spacing:.02em!important}
.clan-hero-avatar{display:grid!important;justify-items:center!important;align-content:center!important;gap:8px!important}.clan-avatar-manage{min-height:38px!important;padding:0 11px!important;display:inline-flex!important;align-items:center!important;gap:7px!important;background:color-mix(in srgb,var(--surface) 82%,transparent)!important;color:var(--text)!important;border:0!important;border-radius:8px!important;font-size:12px!important;font-weight:850!important}.clan-avatar-manage .svg-icon{width:16px!important;height:16px!important;color:var(--cyan)!important}
.clan-avatar-store{display:grid!important;gap:14px!important}.clan-avatar-store-head{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:12px!important;padding:14px!important;background:var(--surface)!important;border-radius:8px!important}.clan-avatar-store-head span{display:block!important;color:var(--cyan)!important;font-size:12px!important;font-weight:850!important;text-transform:uppercase!important}.clan-avatar-store-head h2{margin-top:4px!important;font:850 22px/1.1 var(--font-display)!important}.clan-avatar-store-head>strong{white-space:nowrap!important;color:var(--muted)!important;font-size:13px!important}
.clan-avatar-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.clan-avatar-product{min-width:0!important;padding:10px!important;display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:10px!important;align-items:center!important;background:var(--surface)!important;border-radius:8px!important}.clan-avatar-product.selected{background:color-mix(in srgb,var(--cyan) 12%,var(--surface))!important}.clan-avatar-product.not-uploaded{opacity:.58!important}.clan-avatar-preview{grid-row:1/3!important}.clan-avatar-preview .clan-avatar{--clan-avatar-size:74px!important}.clan-avatar-product-copy{min-width:0!important}.clan-avatar-product-copy h3{font-size:15px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.clan-avatar-price{margin-top:6px!important;min-height:24px!important;display:inline-flex!important;align-items:center!important;gap:5px!important;color:var(--muted)!important;font-size:12px!important;font-weight:900!important}.clan-avatar-price.free{color:var(--success)!important}.clan-avatar-price.coins{color:var(--orange)!important}.clan-avatar-price.stars{color:var(--text)!important}.clan-avatar-product>button{grid-column:2!important;min-height:38px!important;padding:0 12px!important;border:0!important;border-radius:8px!important;background:var(--surface-2)!important;color:var(--text)!important;font-size:12px!important;font-weight:900!important}.clan-avatar-product>button:not(:disabled){background:linear-gradient(135deg,var(--cyan),var(--blue))!important;color:#fff!important}.clan-avatar-product>button.selected{background:color-mix(in srgb,var(--success) 18%,var(--surface-2))!important;color:var(--success)!important}
@media(max-width:430px){.clan-avatar-grid{grid-template-columns:1fr!important}.clan-avatar-store-head{align-items:start!important}.clan-avatar-store-head>strong{margin-top:4px!important}.clan-avatar-product{grid-template-columns:66px minmax(0,1fr)!important}.clan-avatar-preview .clan-avatar{--clan-avatar-size:66px!important}}
