:root{
  --bg:#0b0c10;
  --bg-soft:#101218;
  --surface:#17191f;
  --surface-2:#1e2129;
  --surface-3:#272b35;
  --text:#f7f8fb;
  --muted:#979eae;
  --muted-2:#676e7c;
  --lime:#b9ff57;
  --lime-soft:#d7ff9d;
  --violet:#7c5cff;
  --violet-soft:#a694ff;
  --amber:#ffbc4d;
  --red:#ff6878;
  --green:#54e3a1;
  --blue:#65b9ff;
  --shadow:0 22px 70px rgba(0,0,0,.28);
  --nav-h:78px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-top:env(safe-area-inset-top,0px);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior:none}
body{min-width:320px}
button,input,textarea,select{font:inherit}
button{border:0;cursor:pointer;color:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid rgba(185,255,87,.32);outline-offset:2px}
.hidden{display:none!important}
.app-shell{position:relative;width:min(100%,560px);min-height:100vh;margin:0 auto;background:var(--bg);overflow-x:hidden}
.app-shell:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 15% -5%,rgba(124,92,255,.18),transparent 34%),radial-gradient(circle at 100% 22%,rgba(185,255,87,.08),transparent 28%);z-index:0}
.splash{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--bg);transition:opacity .35s ease,visibility .35s ease}
.splash.out{opacity:0;visibility:hidden}
.brand-emblem{width:82px;height:82px;filter:drop-shadow(0 18px 34px rgba(124,92,255,.25));animation:floaty 2.6s ease-in-out infinite}
.brand-emblem svg{width:100%;height:100%}
.splash-word{font-size:28px;font-weight:850;letter-spacing:-.045em;margin-top:18px}
.splash-caption{font-size:12px;color:var(--muted);margin-top:8px}
.splash-progress{width:132px;height:4px;border-radius:99px;background:var(--surface-2);overflow:hidden;margin-top:22px}
.splash-progress span{display:block;height:100%;width:45%;border-radius:inherit;background:linear-gradient(90deg,var(--lime),var(--violet));animation:load 1.25s ease-in-out infinite}
@keyframes load{0%{transform:translateX(-110%)}100%{transform:translateX(330%)}}
@keyframes floaty{50%{transform:translateY(-7px) rotate(2deg)}}
.offline-banner{position:sticky;top:0;z-index:50;padding:8px 16px;text-align:center;font-size:11px;font-weight:700;background:var(--amber);color:#231900}
.topbar{position:sticky;top:0;z-index:35;display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:calc(10px + var(--safe-top)) 18px 10px;background:linear-gradient(180deg,rgba(11,12,16,.96),rgba(11,12,16,.72),transparent);backdrop-filter:blur(18px)}
.profile-mini{display:flex;align-items:center;gap:11px;min-width:0;background:transparent;padding:0;text-align:left}
.avatar{width:39px;height:39px;border-radius:14px;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,var(--violet),#4a32c8);font-weight:900;color:white;flex:0 0 auto}
.avatar img{width:100%;height:100%;object-fit:cover}
.profile-copy{min-width:0}.profile-copy small{display:block;color:var(--muted);font-size:9px;letter-spacing:.08em;text-transform:uppercase;font-weight:750}.profile-copy strong{display:block;margin-top:3px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:185px}
.header-actions{display:flex;align-items:center;gap:8px}.header-pill{height:39px;display:flex;align-items:center;gap:7px;padding:0 12px;border-radius:14px;background:var(--surface);font-size:12px;font-weight:850}.header-pill svg{width:18px;height:18px}.header-icon{width:39px;height:39px;border-radius:14px;background:var(--surface);display:grid;place-items:center;position:relative}.header-icon svg{width:20px;height:20px}.notice-dot{position:absolute;right:8px;top:7px;width:7px;height:7px;border-radius:50%;background:var(--red);box-shadow:0 0 0 3px var(--surface)}
.screen-root{position:relative;z-index:1;padding:8px 18px calc(var(--nav-h) + 34px + var(--safe-bottom));min-height:calc(100vh - 68px)}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:8px 0 18px}.page-head h1{margin:0;font-size:30px;line-height:1;letter-spacing:-.055em}.page-head p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.eyebrow{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:800}
.hero{position:relative;min-height:252px;border-radius:30px;padding:22px;overflow:hidden;background:linear-gradient(145deg,#7c5cff 0%,#6548e8 48%,#4f35ca 100%);box-shadow:0 24px 65px rgba(66,44,176,.3)}
.hero:before{content:"";position:absolute;width:250px;height:250px;border-radius:50%;right:-110px;top:-105px;background:rgba(255,255,255,.09)}
.hero:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-36px;bottom:-118px;background:rgba(185,255,87,.14)}
.hero-top,.hero-actions{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:10px}.hero-kicker{font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.72)}
.streak-chip{height:30px;padding:0 10px;border-radius:11px;background:rgba(14,10,40,.26);display:flex;align-items:center;gap:5px;font-size:10px;font-weight:800}.streak-chip svg{width:15px;height:15px;color:var(--amber)}
.hero h2{position:relative;z-index:2;max-width:270px;margin:26px 0 10px;font-size:29px;line-height:1.02;letter-spacing:-.055em}.hero p{position:relative;z-index:2;max-width:285px;margin:0;color:rgba(255,255,255,.75);font-size:12px;line-height:1.52}
.hero-actions{margin-top:24px;justify-content:flex-start}.btn-primary,.btn-secondary,.btn-ghost{min-height:47px;border-radius:16px;padding:0 17px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:850;font-size:12px}.btn-primary{background:var(--lime);color:#162006;box-shadow:0 12px 30px rgba(185,255,87,.2)}.btn-primary.on-violet{background:white;color:#4229ba}.btn-secondary{background:var(--surface-2);color:var(--text)}.btn-ghost{background:rgba(255,255,255,.11);color:white}.btn-primary svg,.btn-secondary svg,.btn-ghost svg{width:18px;height:18px}.btn-wide{width:100%}
.hero-art{position:absolute;right:-6px;bottom:10px;width:158px;height:158px;z-index:1;opacity:.96;pointer-events:none}.tile-letter{filter:drop-shadow(0 13px 15px rgba(22,9,75,.18))}
.balance-panel{margin-top:12px;border-radius:24px;background:var(--surface);padding:16px;display:grid;grid-template-columns:1.4fr .8fr;gap:12px;align-items:center}.balance-main small{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.09em;font-weight:800}.balance-main strong{display:flex;align-items:center;gap:8px;margin-top:5px;font-size:25px;letter-spacing:-.04em}.balance-main strong svg{width:23px;height:23px;color:var(--amber)}.balance-meta{display:flex;justify-content:flex-end;gap:7px}.mini-stat{min-width:62px;padding:10px 8px;border-radius:15px;background:var(--surface-2);text-align:center}.mini-stat strong{display:block;font-size:12px}.mini-stat span{display:block;margin-top:3px;color:var(--muted);font-size:8px}
.section-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 2px 12px}.section-row h2{margin:0;font-size:18px;letter-spacing:-.035em}.section-link{background:transparent;color:var(--lime);font-size:10px;font-weight:800;padding:7px}
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mode-card{position:relative;min-height:157px;padding:16px;border-radius:23px;background:var(--surface);text-align:left;overflow:hidden}.mode-card.wide{grid-column:1/-1;min-height:128px;display:grid;grid-template-columns:1fr 120px;align-items:center;background:linear-gradient(135deg,#1c2530,#15171d)}.mode-card h3{margin:18px 0 5px;font-size:15px;letter-spacing:-.03em}.mode-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}.mode-icon{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:var(--surface-3);color:var(--lime)}.mode-icon.violet{color:var(--violet-soft);background:rgba(124,92,255,.14)}.mode-icon.amber{color:var(--amber);background:rgba(255,188,77,.13)}.mode-icon.blue{color:var(--blue);background:rgba(101,185,255,.12)}.mode-icon svg{width:23px;height:23px}.mode-tag{position:absolute;right:12px;top:12px;padding:6px 8px;border-radius:9px;background:var(--surface-2);font-size:8px;font-weight:800;color:var(--muted)}.wide-art{width:108px;height:108px;justify-self:end}
.mission-list,.list-stack{display:grid;gap:9px}.mission-card,.list-card{border-radius:20px;background:var(--surface);padding:14px;display:flex;align-items:center;gap:12px}.mission-icon,.list-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:var(--surface-2);color:var(--lime);flex:0 0 auto}.mission-icon svg,.list-icon svg{width:21px;height:21px}.mission-copy,.list-copy{min-width:0;flex:1}.mission-copy strong,.list-copy strong{font-size:12px;display:block}.mission-copy span,.list-copy span{font-size:9px;color:var(--muted);display:block;margin-top:4px;line-height:1.4}.mission-reward{font-size:10px;font-weight:850;color:var(--amber)}.progress-track{height:5px;border-radius:99px;background:var(--surface-3);overflow:hidden;margin-top:9px}.progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--lime),var(--violet));width:60%}
.daily-claim{border-radius:24px;padding:18px;background:linear-gradient(135deg,rgba(185,255,87,.14),rgba(124,92,255,.15));display:flex;align-items:center;gap:14px}.daily-orb{width:56px;height:56px;border-radius:19px;display:grid;place-items:center;background:var(--lime);color:#142000;flex:0 0 auto}.daily-orb svg{width:29px;height:29px}.daily-claim h3{margin:0;font-size:15px}.daily-claim p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.4}.daily-claim button{margin-left:auto;min-width:72px}
.tournament-hero{border-radius:28px;padding:20px;background:linear-gradient(145deg,#20242d,#171920);overflow:hidden;position:relative}.tournament-hero:after{content:"";position:absolute;right:-40px;top:-50px;width:160px;height:160px;border-radius:50%;background:radial-gradient(circle,rgba(255,188,77,.28),transparent 70%)}.tournament-badge{display:inline-flex;align-items:center;gap:6px;height:29px;padding:0 10px;border-radius:10px;background:rgba(255,188,77,.13);color:var(--amber);font-size:9px;font-weight:850}.tournament-hero h2{margin:18px 0 7px;font-size:24px;letter-spacing:-.045em}.tournament-hero p{max-width:310px;color:var(--muted);font-size:10px;line-height:1.5}.tournament-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:17px 0}.tournament-stat{padding:11px 8px;border-radius:15px;background:var(--surface-2);text-align:center}.tournament-stat strong{display:block;font-size:12px}.tournament-stat span{display:block;color:var(--muted);font-size:8px;margin-top:3px}
.tabs{display:flex;gap:6px;padding:5px;border-radius:16px;background:var(--surface);margin-bottom:12px}.tab-btn{flex:1;height:39px;border-radius:12px;background:transparent;color:var(--muted);font-size:10px;font-weight:800}.tab-btn.active{background:var(--surface-3);color:var(--text)}
.rank-list{display:grid;gap:7px}.rank-row{display:grid;grid-template-columns:28px 42px 1fr auto;align-items:center;gap:10px;padding:11px 12px;border-radius:18px;background:var(--surface)}.rank-row.me{background:linear-gradient(135deg,rgba(185,255,87,.12),rgba(124,92,255,.12))}.rank-pos{font-size:11px;font-weight:900;text-align:center;color:var(--muted)}.rank-pos.top{color:var(--amber)}.rank-avatar{width:39px;height:39px;border-radius:13px;background:var(--surface-3);display:grid;place-items:center;font-size:10px;font-weight:900;overflow:hidden}.rank-avatar img{width:100%;height:100%;object-fit:cover}.rank-name{min-width:0}.rank-name strong{font-size:11px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rank-name span{font-size:8px;color:var(--muted);display:block;margin-top:3px}.rank-score{text-align:right}.rank-score strong{font-size:11px;display:block}.rank-score span{font-size:8px;color:var(--muted)}
.ref-hero{border-radius:30px;padding:22px;background:linear-gradient(145deg,#b9ff57,#8edb35);color:#152008;position:relative;overflow:hidden}.ref-hero:after{content:"";position:absolute;right:-60px;top:-65px;width:210px;height:210px;border-radius:50%;background:rgba(255,255,255,.22)}.ref-hero .eyebrow{color:rgba(21,32,8,.55)}.ref-hero h2{position:relative;z-index:1;margin:12px 0 8px;font-size:29px;line-height:1;letter-spacing:-.05em;max-width:290px}.ref-hero p{position:relative;z-index:1;margin:0;max-width:300px;font-size:11px;line-height:1.5;color:rgba(21,32,8,.72)}.ref-actions{position:relative;z-index:2;display:flex;gap:8px;margin-top:19px}.ref-actions .btn-primary{background:#10150a;color:white;box-shadow:none}.ref-actions .btn-ghost{background:rgba(17,25,8,.09);color:#152008}.ref-code{margin-top:14px;padding:12px 13px;border-radius:15px;background:rgba(17,25,8,.08);font-size:10px;font-weight:800;word-break:break-all;position:relative;z-index:2}
.ref-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:11px}.ref-metric{border-radius:19px;background:var(--surface);padding:14px 10px;text-align:center}.ref-metric strong{display:block;font-size:18px;letter-spacing:-.03em}.ref-metric span{display:block;color:var(--muted);font-size:8px;margin-top:4px}.milestone-list{display:grid;gap:9px}.milestone{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:13px;border-radius:20px;background:var(--surface)}.milestone-orb{width:44px;height:44px;border-radius:15px;background:var(--surface-2);display:grid;place-items:center;font-weight:900;color:var(--lime)}.milestone.done .milestone-orb{background:var(--lime);color:#142000}.milestone-copy strong{font-size:11px;display:block}.milestone-copy span{font-size:8px;color:var(--muted);display:block;margin-top:4px}.milestone-reward{font-size:9px;font-weight:850;color:var(--amber);text-align:right}
.friend-list{display:grid;gap:8px}.friend-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:11px;padding:11px 12px;border-radius:18px;background:var(--surface)}.friend-status{font-size:8px;padding:6px 8px;border-radius:9px;background:var(--surface-2);color:var(--muted);font-weight:800}.friend-status.active{background:rgba(84,227,161,.12);color:var(--green)}.friend-status.qualified{background:rgba(255,188,77,.12);color:var(--amber)}
.profile-hero{border-radius:29px;background:var(--surface);padding:20px;text-align:center}.profile-avatar{width:78px;height:78px;border-radius:25px;margin:0 auto;display:grid;place-items:center;background:linear-gradient(145deg,var(--violet),#4a32c8);font-size:22px;font-weight:900;overflow:hidden}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-hero h1{font-size:24px;margin:13px 0 4px;letter-spacing:-.045em}.profile-hero p{margin:0;color:var(--muted);font-size:10px}.level-line{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px}.level-chip{height:28px;padding:0 10px;border-radius:10px;background:var(--surface-2);font-size:9px;font-weight:850;display:flex;align-items:center}.premium-chip{background:rgba(185,255,87,.12);color:var(--lime)}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:11px}.profile-stat{border-radius:18px;background:var(--surface);padding:14px 8px;text-align:center}.profile-stat strong{display:block;font-size:16px}.profile-stat span{display:block;color:var(--muted);font-size:8px;margin-top:4px}.settings-list{display:grid;gap:7px}.settings-row{min-height:59px;border-radius:19px;background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 14px;text-align:left}.settings-row .list-icon{width:38px;height:38px;border-radius:13px}.settings-row strong{font-size:11px;flex:1}.settings-row span{font-size:9px;color:var(--muted)}
.game-shell{min-height:calc(100vh - 20px);padding-bottom:24px}.game-top{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:10px;margin-bottom:18px}.round-btn{width:42px;height:42px;border-radius:14px;background:var(--surface);display:grid;place-items:center}.round-btn svg{width:20px;height:20px}.game-title{text-align:center}.game-title strong{display:block;font-size:13px}.game-title span{display:block;margin-top:3px;color:var(--muted);font-size:8px}.game-status{border-radius:24px;background:var(--surface);padding:16px;display:flex;align-items:center;justify-content:space-between;gap:10px}.game-status strong{font-size:13px}.game-status span{font-size:9px;color:var(--muted);display:block;margin-top:4px}.timer{height:36px;padding:0 11px;border-radius:13px;background:var(--surface-2);display:flex;align-items:center;gap:6px;font-size:11px;font-weight:850}.timer svg{width:17px;height:17px;color:var(--amber)}
.word-board{display:grid;gap:7px;margin:24px auto 18px;width:min(100%,330px)}.word-row{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.word-cell{aspect-ratio:1;border-radius:13px;background:var(--surface);display:grid;place-items:center;font-size:20px;font-weight:900;text-transform:uppercase;transition:transform .2s,background .2s}.word-cell.filled{background:var(--surface-3)}.word-cell.correct{background:#3fbd7b;color:white}.word-cell.present{background:#d5a334;color:white}.word-cell.absent{background:#363b46;color:#adb4c0}.word-cell.pop{animation:pop .16s ease}.word-cell.flip{animation:flip .45s ease}@keyframes pop{50%{transform:scale(1.08)}}@keyframes flip{50%{transform:rotateX(90deg)}}
.keyboard{display:grid;gap:6px}.key-row{display:flex;justify-content:center;gap:5px}.key{height:48px;min-width:27px;flex:1;max-width:42px;border-radius:11px;background:var(--surface-2);font-size:11px;font-weight:850}.key.wide{min-width:52px;max-width:62px;font-size:9px}.key.correct{background:#3fbd7b}.key.present{background:#d5a334}.key.absent{background:#343944;color:#858d9c}
.anagram-display{min-height:70px;border-radius:22px;background:var(--surface);display:flex;align-items:center;justify-content:center;gap:7px;padding:12px;margin:18px 0}.selected-letter{width:39px;height:45px;border-radius:12px;background:var(--surface-3);display:grid;place-items:center;font-size:18px;font-weight:900}.placeholder{color:var(--muted);font-size:11px}.letter-wheel{position:relative;width:270px;height:270px;margin:10px auto}.letter-btn{position:absolute;width:60px;height:60px;border-radius:21px;background:var(--surface-2);display:grid;place-items:center;font-size:22px;font-weight:900;box-shadow:0 14px 30px rgba(0,0,0,.16);transition:.18s}.letter-btn.used{opacity:.3;transform:scale(.88)!important}.letter-center{position:absolute;left:50%;top:50%;width:64px;height:64px;border-radius:22px;background:linear-gradient(145deg,var(--lime),#8edb35);color:#142000;transform:translate(-50%,-50%);display:grid;place-items:center}.letter-center svg{width:28px;height:28px}.game-actions{display:grid;grid-template-columns:52px 1fr 52px;gap:9px;margin-top:9px}.game-actions .round-btn{width:52px;height:50px}.game-submit{height:50px;border-radius:16px;background:var(--lime);color:#152008;font-size:12px;font-weight:900}.found-words{display:flex;flex-wrap:wrap;gap:7px;margin-top:16px}.found-word{padding:8px 10px;border-radius:10px;background:var(--surface);font-size:9px;font-weight:800}
.chain-entry{display:grid;grid-template-columns:1fr auto;gap:9px;margin:18px 0}.chain-entry input{min-width:0;height:52px;border:0;border-radius:17px;background:var(--surface);color:var(--text);padding:0 16px;font-size:14px;font-weight:800;text-transform:uppercase}.chain-entry input::placeholder{color:var(--muted);text-transform:none;font-weight:650}.chain-entry .btn-primary{min-width:112px}.chain-letter{width:132px;height:132px;border-radius:38px;margin:18px auto 6px;background:linear-gradient(145deg,var(--violet),#4f35ca);display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 22px 55px rgba(79,53,202,.28)}.chain-letter span{font-size:48px;font-weight:950;line-height:1}.chain-letter small{max-width:100px;margin-top:9px;color:rgba(255,255,255,.72);font-size:8px;text-align:center;line-height:1.3}
.bottom-nav{position:fixed;z-index:40;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,560px);padding:7px 12px calc(7px + var(--safe-bottom));background:linear-gradient(180deg,transparent,rgba(11,12,16,.96) 24%)}.nav-inner{height:68px;border-radius:23px;background:rgba(23,25,31,.96);backdrop-filter:blur(24px);display:grid;grid-template-columns:repeat(5,1fr);padding:5px;box-shadow:0 -10px 40px rgba(0,0,0,.22)}.nav-btn{position:relative;border-radius:18px;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0}.nav-btn svg{width:21px;height:21px}.nav-btn span{font-size:7px;font-weight:800;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.nav-btn.active{color:var(--lime);background:rgba(185,255,87,.08)}.nav-btn.center svg{width:24px;height:24px}.nav-badge{position:absolute;top:7px;right:20%;min-width:14px;height:14px;padding:0 4px;border-radius:7px;background:var(--red);color:white;font-size:7px;font-weight:900;display:grid;place-items:center}
.modal-layer{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-end;justify-content:center;visibility:hidden;opacity:0;transition:.22s}.modal-layer.open{visibility:visible;opacity:1}.modal-backdrop{position:absolute;inset:0;background:rgba(3,4,7,.6);backdrop-filter:blur(8px)}.bottom-sheet{position:relative;width:min(100%,560px);max-height:89vh;overflow:auto;border-radius:30px 30px 0 0;background:var(--bg-soft);padding:10px 18px calc(22px + var(--safe-bottom));transform:translateY(35px);transition:.25s;box-shadow:0 -25px 80px rgba(0,0,0,.42)}.modal-layer.open .bottom-sheet{transform:translateY(0)}.sheet-handle{width:39px;height:4px;border-radius:99px;background:var(--surface-3);margin:1px auto 20px}.sheet-head h2{margin:0;font-size:25px;letter-spacing:-.045em}.sheet-head p{margin:7px 0 0;color:var(--muted);font-size:10px;line-height:1.5}.product-list{display:grid;gap:9px;margin-top:18px}.product-card{display:grid;grid-template-columns:46px 1fr auto;gap:12px;align-items:center;border-radius:21px;background:var(--surface);padding:13px;text-align:left}.product-icon{width:46px;height:46px;border-radius:15px;background:var(--surface-2);display:grid;place-items:center;color:var(--amber)}.product-icon svg{width:24px;height:24px}.product-copy strong{font-size:11px;display:block}.product-copy span{font-size:8px;color:var(--muted);display:block;margin-top:4px;line-height:1.4}.star-price{height:34px;padding:0 10px;border-radius:11px;background:var(--surface-2);display:flex;align-items:center;gap:5px;font-size:10px;font-weight:900}.star-price svg{width:16px;height:16px;color:var(--amber)}.plan-card{border-radius:25px;padding:18px;background:linear-gradient(145deg,rgba(124,92,255,.2),rgba(185,255,87,.1));margin-top:14px}.plan-card.featured{background:linear-gradient(145deg,var(--violet),#4e35c7)}.plan-head{display:flex;justify-content:space-between;gap:12px}.plan-head h3{margin:0;font-size:17px}.plan-head p{margin:5px 0 0;font-size:9px;color:var(--muted)}.featured .plan-head p{color:rgba(255,255,255,.7)}.plan-price{font-size:18px;font-weight:900}.feature-list{display:grid;gap:8px;margin:15px 0}.feature{display:flex;align-items:center;gap:8px;font-size:9px;color:var(--muted)}.featured .feature{color:rgba(255,255,255,.82)}.feature svg{width:15px;height:15px;color:var(--lime)}
.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + 20px + var(--safe-bottom));z-index:100;max-width:calc(100% - 34px);padding:11px 15px;border-radius:14px;background:rgba(35,38,47,.96);color:white;font-size:10px;font-weight:750;text-align:center;box-shadow:var(--shadow);transform:translate(-50%,18px);opacity:0;visibility:hidden;transition:.22s}.toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.empty-state{padding:28px 18px;border-radius:24px;background:var(--surface);text-align:center}.empty-icon{width:54px;height:54px;border-radius:18px;background:var(--surface-2);display:grid;place-items:center;margin:0 auto;color:var(--muted)}.empty-icon svg{width:28px;height:28px}.empty-state h3{margin:13px 0 6px;font-size:14px}.empty-state p{margin:0;color:var(--muted);font-size:9px;line-height:1.5}
.skeleton{position:relative;overflow:hidden;background:var(--surface);border-radius:18px}.skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.05),transparent);animation:shimmer 1.2s infinite}@keyframes shimmer{100%{transform:translateX(100%)}}
@media(max-width:360px){.chain-entry{grid-template-columns:1fr}.chain-entry .btn-primary{width:100%}.topbar{padding-left:14px;padding-right:14px}.screen-root{padding-left:14px;padding-right:14px}.hero{padding:19px;min-height:250px}.hero h2{font-size:26px;max-width:235px}.hero-art{width:136px;height:136px;right:-13px}.mode-card{padding:14px;min-height:150px}.mode-card.wide{grid-template-columns:1fr 94px}.wide-art{width:88px;height:88px}.profile-copy strong{max-width:140px}.header-pill{padding:0 9px}.header-pill span{display:none}.ref-actions{flex-direction:column}.ref-actions button{width:100%}.key-row{gap:4px}.key{height:45px;min-width:24px}.letter-wheel{transform:scale(.9);margin-top:-4px;margin-bottom:-10px}.nav-btn span{font-size:6.5px}.nav-inner{padding:4px}.bottom-nav{padding-left:8px;padding-right:8px}}
@media(min-width:500px){.screen-root{padding-left:24px;padding-right:24px}.topbar{padding-left:24px;padding-right:24px}.hero{min-height:266px}.mode-card{min-height:166px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
html[data-theme="light"]{--bg:#f3f4f7;--bg-soft:#ffffff;--surface:#ffffff;--surface-2:#eef0f4;--surface-3:#e3e6ec;--text:#14161b;--muted:#747b89;--muted-2:#a0a6b1;--shadow:0 22px 70px rgba(33,38,50,.12)}
html[data-theme="light"] .app-shell:before{background:radial-gradient(circle at 15% -5%,rgba(124,92,255,.12),transparent 34%),radial-gradient(circle at 100% 22%,rgba(126,199,40,.08),transparent 28%)}
html[data-theme="light"] .topbar{background:linear-gradient(180deg,rgba(243,244,247,.96),rgba(243,244,247,.72),transparent)}
html[data-theme="light"] .bottom-nav{background:linear-gradient(180deg,transparent,rgba(243,244,247,.96) 24%)}
html[data-theme="light"] .nav-inner{background:rgba(255,255,255,.96)}
html[data-theme="light"] .modal-backdrop{background:rgba(25,28,35,.38)}

/* =========================================================
   Words Buster 2.1 — Telegram viewport and game-stage polish
   ========================================================= */
:root{
  --tg-stable-height:100svh;
  --tg-viewport-height:100svh;
  --tg-safe-top:0px;
  --tg-safe-right:0px;
  --tg-safe-bottom:0px;
  --tg-safe-left:0px;
  --tg-content-safe-top:0px;
  --tg-content-safe-right:0px;
  --tg-content-safe-bottom:0px;
  --tg-content-safe-left:0px;
  --content-max:524px;
}
html{
  width:100%;
  min-height:100%;
  overflow-x:hidden;
  scroll-behavior:auto;
  background:var(--bg);
}
body{
  width:100%;
  min-height:var(--tg-stable-height,100svh);
  overflow-x:hidden;
  overscroll-behavior-x:none;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
  -webkit-text-size-adjust:100%;
}
.app-shell{
  width:min(100%,560px);
  min-height:var(--tg-stable-height,100svh);
  isolation:isolate;
}
.topbar{
  min-height:64px;
  padding-top:max(10px,calc(8px + var(--tg-content-safe-top)));
  padding-left:max(18px,calc(14px + var(--tg-content-safe-left)));
  padding-right:max(18px,calc(14px + var(--tg-content-safe-right)));
}
.screen-root{
  width:100%;
  max-width:560px;
  min-height:calc(var(--tg-stable-height,100svh) - 64px);
  margin:0 auto;
  padding-left:max(18px,calc(14px + var(--tg-content-safe-left)));
  padding-right:max(18px,calc(14px + var(--tg-content-safe-right)));
  padding-bottom:calc(var(--nav-h) + 30px + max(var(--safe-bottom),var(--tg-content-safe-bottom)));
  overflow-x:clip;
}
.bottom-nav{
  padding-left:max(12px,calc(8px + var(--tg-content-safe-left)));
  padding-right:max(12px,calc(8px + var(--tg-content-safe-right)));
  padding-bottom:calc(7px + max(var(--safe-bottom),var(--tg-content-safe-bottom)));
}
.nav-inner{
  width:100%;
  max-width:536px;
  margin:0 auto;
}
button,a,[role="button"]{-webkit-tap-highlight-color:transparent}
button:disabled{cursor:not-allowed;opacity:.58}

/* Game mode intentionally occupies the whole Telegram viewport. */
.screen-root.game-active{
  min-height:var(--tg-stable-height,100svh);
  height:auto;
  padding:
    max(12px,calc(8px + var(--tg-content-safe-top)))
    max(14px,calc(10px + var(--tg-content-safe-right)))
    max(18px,calc(12px + var(--tg-content-safe-bottom)))
    max(14px,calc(10px + var(--tg-content-safe-left)));
  overflow-x:hidden;
  background:
    radial-gradient(circle at 5% 8%,rgba(124,92,255,.13),transparent 32%),
    radial-gradient(circle at 100% 34%,rgba(185,255,87,.06),transparent 30%),
    var(--bg);
}
.screen-root.game-active + .bottom-nav{display:none!important}
.game-shell{
  width:100%;
  max-width:500px;
  min-height:calc(var(--tg-stable-height,100svh) - max(30px,var(--tg-content-safe-top)) - max(26px,var(--tg-content-safe-bottom)));
  margin:0 auto;
  padding:0 0 8px;
  display:flex;
  flex-direction:column;
  overflow:visible;
}
.game-top{
  position:relative;
  z-index:2;
  grid-template-columns:44px minmax(0,1fr) 44px;
  gap:10px;
  width:100%;
  margin:0 0 12px;
}
.round-btn{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:15px;
  background:var(--surface);
  transition:transform .16s ease,background .16s ease;
}
.round-btn:active{transform:scale(.95)}
.game-title{min-width:0;padding-top:2px}
.game-title strong{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
  line-height:1.2;
}
.game-title span{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}
.game-status{
  width:100%;
  min-height:72px;
  padding:14px 16px;
  border-radius:22px;
}
.game-status>div:first-child{min-width:0}
.game-status strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:13px;
  line-height:1.25;
}
.game-status span{line-height:1.35}
.timer{flex:0 0 auto;min-width:70px;justify-content:center}
.duel-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:46px;
  margin:0 0 9px;
  padding:0 14px;
  border-radius:16px;
  background:linear-gradient(135deg,rgba(124,92,255,.19),rgba(185,255,87,.08));
  font-size:10px;
}
.duel-strip span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
.duel-strip b{flex:0 0 auto;font-size:10px;color:var(--lime)}

/* Daily word: consistent cells and keyboard at every Telegram width. */
.word-board{
  --board-size:min(82vw,320px,calc((var(--tg-stable-height,100svh) - 300px) * .64));
  width:clamp(230px,var(--board-size),320px);
  margin:clamp(14px,2.8vh,24px) auto clamp(12px,2vh,18px);
  gap:clamp(5px,1.4vw,7px);
}
.word-row{gap:clamp(5px,1.4vw,7px)}
.word-cell{
  aspect-ratio:1;
  min-width:0;
  border-radius:clamp(10px,3.1vw,14px);
  font-size:clamp(17px,5.1vw,23px);
  line-height:1;
}
.keyboard{
  width:100%;
  max-width:500px;
  margin:auto auto 0;
  gap:6px;
  padding-top:2px;
}
.key-row{
  width:100%;
  gap:clamp(3px,1vw,6px);
}
.key{
  min-width:0;
  max-width:none;
  height:clamp(42px,6.3vh,50px);
  padding:0;
  border-radius:clamp(9px,2.6vw,12px);
  font-size:clamp(10px,3vw,13px);
  line-height:1;
}
.key.wide{
  flex:1.52;
  min-width:0;
  max-width:none;
  padding:0 3px;
  font-size:clamp(8px,2.4vw,10px);
}

/* Anagram/blitz/duel: true centered wheel using percentage coordinates. */
.anagram-display{
  width:100%;
  min-height:clamp(58px,8.5vh,72px);
  margin:clamp(10px,1.8vh,16px) 0 4px;
  padding:10px 12px;
  border-radius:20px;
  overflow-x:auto;
  scrollbar-width:none;
}
.anagram-display::-webkit-scrollbar{display:none}
.selected-letter{
  width:clamp(34px,9vw,42px);
  height:clamp(40px,10vw,48px);
  flex:0 0 auto;
  font-size:clamp(16px,4.8vw,20px);
}
.letter-wheel{
  width:min(72vw,276px,calc((var(--tg-stable-height,100svh) - 350px) * .9));
  min-width:220px;
  max-width:276px;
  height:auto;
  aspect-ratio:1;
  margin:clamp(2px,1vh,10px) auto clamp(4px,1vh,9px);
  transform:none!important;
}
.letter-btn{
  left:var(--x);
  top:var(--y);
  width:clamp(50px,15.5vw,64px);
  height:clamp(50px,15.5vw,64px);
  border-radius:clamp(17px,5vw,22px);
  transform:translate(-50%,-50%);
  font-size:clamp(19px,5.8vw,25px);
  box-shadow:0 13px 28px rgba(0,0,0,.18);
}
.letter-btn:active{transform:translate(-50%,-50%) scale(.94)}
.letter-btn.used{opacity:.24;transform:translate(-50%,-50%) scale(.86)!important}
.letter-center{
  width:clamp(58px,17vw,68px);
  height:clamp(58px,17vw,68px);
  border-radius:clamp(19px,5.5vw,23px);
  box-shadow:0 14px 34px rgba(185,255,87,.17);
}
.game-actions{
  width:100%;
  grid-template-columns:50px minmax(0,1fr) 50px;
  gap:9px;
  margin:5px 0 0;
}
.game-actions .round-btn{width:50px;height:50px;min-width:50px}
.game-submit{min-width:0;height:50px;border-radius:16px;font-size:12px}
.section-row.compact{margin:17px 2px 10px}
.found-words{
  min-height:28px;
  max-height:112px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-bottom:4px;
}
.found-word{font-size:10px}

/* Chain mode */
.chain-entry{margin:14px 0}
.chain-letter{width:clamp(112px,34vw,142px);height:clamp(112px,34vw,142px);margin:14px auto 4px}

/* Result screen */
.game-shell .profile-hero{margin-top:clamp(12px,6vh,46px)!important}

/* Bottom sheets stay inside the current Telegram safe area. */
.bottom-sheet{
  max-height:calc(var(--tg-stable-height,100svh) - max(12px,var(--tg-content-safe-top)));
  padding-left:max(18px,calc(14px + var(--tg-content-safe-left)));
  padding-right:max(18px,calc(14px + var(--tg-content-safe-right)));
  padding-bottom:calc(22px + max(var(--safe-bottom),var(--tg-content-safe-bottom)));
  overscroll-behavior:contain;
}
.toast{
  bottom:calc(var(--nav-h) + 18px + max(var(--safe-bottom),var(--tg-content-safe-bottom)));
}
.game-active~.toast,.screen-root.game-active~.toast{bottom:calc(16px + max(var(--safe-bottom),var(--tg-content-safe-bottom)))}

@media(max-width:360px){
  .screen-root.game-active{padding-left:12px;padding-right:12px}
  .game-status{min-height:66px;padding:12px 13px}
  .word-board{--board-size:min(86vw,294px,calc((var(--tg-stable-height,100svh) - 286px) * .64))}
  .key-row{gap:3px}
  .key{height:43px;font-size:10px}
  .letter-wheel{width:min(75vw,246px,calc((var(--tg-stable-height,100svh) - 330px) * .88));min-width:210px}
  .letter-btn{width:52px;height:52px;border-radius:18px}
  .letter-center{width:58px;height:58px}
  .anagram-display{min-height:56px}
}

@media(max-height:720px){
  .game-top{margin-bottom:8px}
  .game-status{min-height:62px;padding:10px 13px}
  .word-board{margin:10px auto 10px;width:min(70vw,260px)}
  .keyboard{gap:4px}
  .key{height:40px}
  .letter-wheel{width:min(61vw,224px);min-width:200px;margin:-2px auto 0}
  .letter-btn{width:48px;height:48px;border-radius:17px;font-size:19px}
  .letter-center{width:54px;height:54px}
  .anagram-display{min-height:52px;margin:8px 0 2px}
  .game-actions,.game-actions .round-btn,.game-submit{height:46px}
  .game-actions .round-btn{width:48px;min-width:48px}
  .section-row.compact{margin-top:11px}
}

@media(min-width:500px){
  .screen-root.game-active{padding-left:24px;padding-right:24px}
}

html[data-theme="light"] .screen-root.game-active{
  background:
    radial-gradient(circle at 5% 8%,rgba(124,92,255,.1),transparent 32%),
    radial-gradient(circle at 100% 34%,rgba(126,199,40,.07),transparent 30%),
    var(--bg);
}

body.in-game{
  height:var(--tg-stable-height,100svh);
  overflow:hidden;
  overscroll-behavior:none;
  touch-action:manipulation;
}
body.in-game .app-shell{height:var(--tg-stable-height,100svh);overflow:hidden}
body.in-game .screen-root.game-active{height:var(--tg-stable-height,100svh);overflow-y:auto;overscroll-behavior:none;scrollbar-width:none}
body.in-game .screen-root.game-active::-webkit-scrollbar{display:none}
