:root {
  --bg: #14112e;
  --bg2: #1d1842;
  --card: rgba(255, 255, 255, .065);
  --card2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .1);
  --text: #f5f2ff;
  --muted: #aba5d3;
  --saffron: #ffa62b;
  --teal: #2ec4b6;
  --rose: #ff5d73;
  --green: #34d399;
  --gold: #ffcf4a;
  --grad: linear-gradient(135deg, #ffc23d, #ff7a1a);
  --tgrad: linear-gradient(135deg, #3ee0cf, #179b9f);
  --font: "Baloo 2", "Baloo Da 2", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", "Noto Sans Devanagari", sans-serif;
  font-family: var(--font);
  color: var(--text);
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
}
:lang(bn) { --font: "Baloo Da 2", "Baloo 2", system-ui, "Noto Sans Bengali", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
body {
  font-family: var(--font);
  background:
    radial-gradient(800px 520px at 0% -8%, rgba(255, 166, 43, .2), transparent 60%),
    radial-gradient(700px 600px at 110% 20%, rgba(46, 196, 182, .16), transparent 60%),
    radial-gradient(700px 500px at 40% 120%, rgba(124, 92, 255, .28), transparent 60%),
    var(--bg);
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select { font: inherit; }
a { color: var(--teal); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h2, h3 { margin: 0; line-height: 1.15; }
h3 { font-size: 15px; color: var(--muted); font-weight: 700; margin: 14px 0 8px; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* screens */
.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .22s, transform .22s, visibility .22s;
}
.screen.active { opacity: 1; visibility: visible; transform: none; }
.screen.center { justify-content: center; align-items: center; }

/* brand */
.brand-mark { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.brand-mark .coach { width: 150px; height: 150px; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .35)); animation: bob 3.2s ease-in-out infinite; }
.brand-mark.small .coach { width: 96px; height: 96px; }
.wordmark { font-weight: 800; font-size: 54px; line-height: .9; text-align: center; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.01em; }
.wordmark small { display: block; font-size: 17px; letter-spacing: .1em; color: var(--muted); -webkit-text-fill-color: var(--muted); font-weight: 700; margin-top: 6px; font-family: "Baloo Da 2", "Baloo 2", sans-serif; }
.brand-mark.small .wordmark { font-size: 38px; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--card2); border-top-color: var(--saffron); animation: spin .8s linear infinite; margin-top: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* cards & buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; backdrop-filter: blur(8px); }
.signup { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.signup h2 { text-align: center; font-size: 22px; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 46px; padding: 8px 16px; border-radius: 16px; font-weight: 700; font-size: 16px; line-height: 1.15;
  background: var(--card2); border: 1px solid var(--line); text-align: center;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn small { font-weight: 600; font-size: 12px; opacity: .8; }
.btn.primary { background: var(--grad); color: #2b1300; border: 0; box-shadow: 0 6px 20px rgba(255, 140, 30, .35), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn.teal { background: var(--tgrad); color: #00211f; border: 0; box-shadow: 0 6px 18px rgba(46, 196, 182, .3), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn.big { min-height: 58px; font-size: 19px; border-radius: 18px; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; border-radius: 12px; }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 93, 115, .16); color: #ffb3bf; border-color: rgba(255, 93, 115, .35); }
.btn.gp-btn { background: linear-gradient(135deg, #1fa463, #0f7a45); color: #fff; border: 0; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.poor { filter: grayscale(.6); opacity: .75; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.actions { display: flex; gap: 10px; margin-top: 12px; }
.actions > * { flex: 1; }
.actions.col { flex-direction: column; }
.icon { width: 42px; height: 42px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 19px; display: grid; place-items: center; flex: none; }
.icon-spacer { width: 42px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.chip.on { background: var(--grad); color: #2b1300; border-color: transparent; }
.chip:disabled { opacity: .45; }
input:not([type]), input[type="text"] {
  width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--text); font-size: 17px; outline: none;
}
input::placeholder { color: rgba(255, 255, 255, .4); }
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.langs button { padding: 10px 4px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 17px; }
.langs button.on { border-color: var(--saffron); background: rgba(255, 166, 43, .14); }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.avb { font-size: 22px; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; }
.avb.on { background: rgba(255, 166, 43, .22); box-shadow: 0 0 0 2px var(--saffron) inset; }
.dot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px var(--bg); }

/* main screen with tabs */
.screen.main { padding-bottom: 0; gap: 8px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.me .av { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--card2); border-radius: 50%; }
.me .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.lv { font-style: normal; font-size: 11px; font-weight: 800; background: var(--tgrad); color: #00211f; border-radius: 8px; padding: 1px 6px; }
.top-icons { display: flex; gap: 6px; align-items: center; }
.gold-pill, .streak-pill { position: relative; display: flex; align-items: center; gap: 4px; padding: 7px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 800; }
.streak-pill.cold span { filter: grayscale(1); opacity: .6; }
.tabs-body { flex: 1; min-height: 0; position: relative; }
.tab { position: absolute; inset: 0; overflow-y: auto; padding: 4px 2px 96px; display: none; scrollbar-width: none; }
.tab::-webkit-scrollbar { display: none; }
.tab.on { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.bottom-nav {
  position: absolute; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: rgba(24, 20, 56, .86); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0; border-radius: 18px; color: var(--muted); }
.bottom-nav button span { font-size: 21px; line-height: 1.1; }
.bottom-nav button b { font-size: 12px; font-weight: 700; }
.bottom-nav button.on { background: rgba(255, 166, 43, .16); color: var(--text); }
.bottom-nav .dot { top: 4px; right: 22%; }

/* home */
.hero { display: flex; align-items: flex-end; gap: 6px; margin: 4px 0 12px; }
.hero .coach { width: 104px; height: 104px; flex: none; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .35)); }
.speech { position: relative; background: #fff; color: #23204a; border-radius: 20px 20px 20px 6px; padding: 12px 14px; font-weight: 600; font-size: 16px; line-height: 1.3; margin-bottom: 34px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.speech b { color: #c2410c; }
.big-card { position: relative; overflow: hidden; border-radius: 24px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--card); display: block; width: 100%; text-align: left; }
.big-card.learn { background: linear-gradient(135deg, rgba(255, 166, 43, .28), rgba(255, 93, 115, .18)); border-color: rgba(255, 166, 43, .35); }
.big-card .kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--saffron); }
.big-card h2 { font-size: 22px; margin: 2px 0 6px; }
.big-card .meta { display: flex; align-items: center; gap: 10px; }
.pbar-line { flex: 1; height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.pbar-line i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }
.lesson-ico { position: absolute; right: 12px; top: 10px; font-size: 44px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.lesson-ico .ico, .bub .ico, .ui .ico { width: 1.25em; height: 1.25em; display: block; }
.daily-card { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.mini { width: 112px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; pointer-events: none; }
.mini .board { border-radius: 8px; box-shadow: none; }
.mini .b-pcs .pc svg { padding: 0; filter: none; }
.big-coach { width: 110px; height: 110px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: left; min-height: 94px; position: relative; }
.tile .e { font-size: 28px; }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-weight: 600; font-size: 12px; line-height: 1.2; }
.tile.accent { background: linear-gradient(135deg, rgba(46, 196, 182, .25), rgba(46, 196, 182, .06)); border-color: rgba(46, 196, 182, .35); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; }
.section-title h3 { margin: 0; }

/* learn: the course path */
.unit { margin-bottom: 18px; }
.unit-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: linear-gradient(135deg, var(--uc, #ffa62b), color-mix(in srgb, var(--uc, #ffa62b) 55%, #000)); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--uc, #ffa62b) 30%, transparent); }
.unit-head .ui { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); border-radius: 14px; }
.unit-head small { display: block; font-weight: 700; opacity: .85; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.unit-head b { font-size: 19px; }
.unit-head .uc { margin-left: auto; font-weight: 800; background: rgba(0, 0, 0, .2); padding: 3px 10px; border-radius: 99px; font-size: 13px; }
.path { position: relative; padding: 12px 0 4px; }
.node { position: relative; display: flex; align-items: center; gap: 12px; margin: 10px 0; width: fit-content; }
.node:nth-child(4n+2) { margin-left: 22%; }
.node:nth-child(4n+3) { margin-left: 40%; }
.node:nth-child(4n+4) { margin-left: 22%; }
.bub { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--card2); border: 3px solid var(--line); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25); flex: none; }
.node.done .bub { background: linear-gradient(135deg, var(--uc), color-mix(in srgb, var(--uc) 60%, #000)); border-color: rgba(255, 255, 255, .35); }
.node.next .bub { background: var(--grad); border-color: #fff3; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25), 0 0 0 0 rgba(255, 166, 43, .55); } 50% { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25), 0 0 0 12px rgba(255, 166, 43, 0); } }
.node .nl { display: flex; flex-direction: column; }
.node .nl b { font-size: 15px; line-height: 1.15; max-width: 150px; }
.node .stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; }
.node .stars i { font-style: normal; opacity: .25; }

/* lesson & puzzle players */
.l-top { display: flex; align-items: center; gap: 10px; }
.l-top h2 { flex: 1; text-align: center; font-size: 19px; }
.progress { flex: 1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--tgrad); border-radius: 99px; transition: width .35s; }
.l-count { font-weight: 800; color: var(--muted); min-width: 42px; text-align: right; }
.p-title { flex: 1; font-weight: 800; font-size: 17px; text-align: center; }
.p-rating { font-weight: 800; color: var(--gold); min-width: 42px; text-align: right; }
.coach-row { display: flex; align-items: flex-end; gap: 6px; min-height: 92px; }
.coach-row .coach { width: 84px; height: 84px; flex: none; }
.coach-row .bubble { position: relative; flex: 1; background: #fff; color: #23204a; border-radius: 20px 20px 20px 6px; padding: 12px 14px; font-size: 17px; font-weight: 600; line-height: 1.32; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.bubble b { color: #c2410c; }
.bubble.pop { animation: bubblepop .3s; }
@keyframes bubblepop { from { transform: scale(.96); opacity: .4; } }
.board-area { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.l-bottom { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 132px; }
.feedback { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; font-weight: 700; font-size: 16px; animation: slideup .25s; }
.feedback.good { background: rgba(52, 211, 153, .18); border: 1px solid rgba(52, 211, 153, .45); color: #b7f7dc; }
.feedback.bad { background: rgba(255, 93, 115, .16); border: 1px solid rgba(255, 93, 115, .4); color: #ffc2cb; }
.feedback .fe { font-size: 26px; }
@keyframes slideup { from { transform: translateY(10px); opacity: 0; } }
.quiz { display: grid; gap: 8px; }
.quiz button { padding: 13px 14px; border-radius: 16px; background: var(--card2); border: 2px solid var(--line); font-weight: 700; font-size: 16px; text-align: left; }
.quiz button.right { border-color: var(--green); background: rgba(52, 211, 153, .18); }
.quiz button.wrong { border-color: var(--rose); background: rgba(255, 93, 115, .14); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.done-card { text-align: center; padding: 8px 0 4px; }
.done-card .big-stars { font-size: 46px; letter-spacing: 6px; color: var(--gold); text-shadow: 0 6px 20px rgba(255, 207, 74, .4); }
.done-card .big-stars i { font-style: normal; opacity: .2; }
.done-card .big-stars b { display: inline-block; animation: starin .5s backwards; }
@keyframes starin { from { transform: scale(0) rotate(-60deg); } }
.rewards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.rewards span { background: var(--card2); border-radius: 99px; padding: 5px 12px; font-weight: 800; }
.rewards .up { color: var(--green); } .rewards .down { color: var(--rose); }

/* the board */
.board { position: relative; width: min(100%, var(--bs, 100%)); aspect-ratio: 1; border-radius: 12px; overflow: hidden; touch-action: none; user-select: none; box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 0 4px rgba(255, 255, 255, .06); --l: #eeeed2; --d: #769656; --pat: none; }
.b-sqs { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.b-sqs i { background: var(--l); }
.b-sqs i.d { background-color: var(--d); background-image: var(--pat); background-size: 100% 100%; }
.b-coords b { position: absolute; font-size: 10px; font-weight: 800; pointer-events: none; z-index: 1; line-height: 1; }
.b-coords .cf { bottom: 2px; width: 12.5%; text-align: right; padding-right: 3px; }
.b-coords .cr { left: 3px; margin-top: 3px; }
.b-coords .od { color: var(--l); } .b-coords .ol { color: var(--d); }
.board.nocoords .b-coords { display: none; }
.b-marks i, .b-pcs .pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; }
.b-marks i { pointer-events: none; }
.m-last { background: rgba(255, 214, 70, .42); }
.m-sel { background: rgba(255, 214, 70, .62); }
.m-dot { background: radial-gradient(circle, rgba(20, 20, 40, .28) 0 16%, transparent 17%); }
.board.nodots .m-dot, .board.nodots .m-cap { background: none; }
.m-cap { background: radial-gradient(circle, transparent 0 62%, rgba(20, 20, 40, .3) 63% 80%, transparent 81%); }
.m-check { background: radial-gradient(circle, rgba(255, 40, 60, .9) 0 22%, rgba(255, 40, 60, .45) 45%, transparent 72%); }
.m-hint { background: rgba(59, 130, 246, .45); box-shadow: inset 0 0 0 4px rgba(59, 130, 246, .9); }
.m-good { background: rgba(34, 197, 94, .5); }
.m-bad { background: rgba(239, 68, 68, .5); }
.m-target { box-shadow: inset 0 0 0 4px rgba(255, 166, 43, .95); animation: blink 1s infinite; }
@keyframes blink { 50% { box-shadow: inset 0 0 0 4px rgba(255, 166, 43, .3); } }
.m-star { display: grid; place-items: center; }
.m-star span { font-size: 220%; color: #ffcf33; text-shadow: 0 2px 0 #b8860b, 0 4px 10px rgba(0, 0, 0, .35); animation: twinkle 1.4s ease-in-out infinite; line-height: 1; }
@keyframes twinkle { 50% { transform: scale(1.12) rotate(8deg); } }
.b-pcs .pc { z-index: 2; will-change: transform; }
.b-pcs .pc svg { display: block; width: 100%; height: 100%; padding: 3%; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .22)); }
.b-pcs .pc.anim { transition: transform .19s cubic-bezier(.2, .8, .25, 1); }
.b-pcs .pc.drag { z-index: 6; }
.b-pcs .pc.drag svg { transform: scale(1.22); filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); }
.b-pcs .pc.gone { opacity: 0; transition: opacity .2s, transform .19s; }
.b-pcs .pc.born svg { animation: born .3s; }
@keyframes born { from { transform: scale(.3); opacity: 0; } }
.b-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.b-promo { position: absolute; inset: 0; background: rgba(10, 8, 30, .5); z-index: 8; }
.pp { position: absolute; top: 0; width: 12.5%; display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); overflow: hidden; }
.pp button { aspect-ratio: 1; display: grid; place-items: center; }
.pp button:active { background: #ffe8c2; }
.pp svg { width: 92%; height: 92%; }

/* game */
.g-top { display: flex; align-items: center; gap: 8px; }
.g-info { flex: 1; text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; }
.pbar { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pbar .av { font-size: 24px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); flex: none; position: relative; }
.pbar .av.off::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #888; box-shadow: 0 0 0 2px var(--bg); }
.pbar .who { flex: 1; min-width: 0; }
.pbar .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .who small { color: var(--muted); font-weight: 600; font-size: 12px; display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.capt { display: inline-flex; align-items: center; }
.capt svg { width: 16px; height: 16px; margin-right: -5px; }
.capt em { font-style: normal; margin-left: 8px; font-weight: 800; color: var(--text); }
.clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; padding: 4px 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); min-width: 76px; text-align: center; }
.clock.run { background: #f5f2ff; color: #1d1842; }
.clock.low { background: var(--rose); color: #fff; }
.pbar.turn { border-color: rgba(255, 166, 43, .7); box-shadow: 0 0 0 1px rgba(255, 166, 43, .4), 0 0 18px rgba(255, 166, 43, .18); }
.moves { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; padding: 2px 2px 4px; scrollbar-width: none; min-height: 30px; font-weight: 700; font-size: 14px; }
.moves::-webkit-scrollbar { display: none; }
.moves span { padding: 3px 7px; border-radius: 8px; background: var(--card); }
.moves span.n { background: none; color: var(--muted); padding: 3px 2px; }
.moves span.last { background: rgba(255, 166, 43, .25); }
.g-actions { display: flex; flex-direction: column; gap: 8px; }
.g-btns { display: flex; gap: 8px; }
.g-btns .btn { flex: 1; min-height: 44px; font-size: 14px; padding: 6px 4px; }
.g-actions .btn span { font-size: 18px; }
#g-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8); pointer-events: none; opacity: 0; z-index: 9; padding: 12px 22px; border-radius: 18px; font-weight: 800; font-size: 22px; background: rgba(20, 17, 46, .92); border: 1px solid var(--line); white-space: nowrap; }
#g-banner.show { animation: banner 1.6s; }
@keyframes banner { 15%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 166, 43, .14); border: 1px solid rgba(255, 166, 43, .35); font-weight: 700; }
.notice .btn { flex: none; }
#g-emotes { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px; border-radius: 20px; background: rgba(24, 20, 56, .95); border: 1px solid var(--line); z-index: 20; }
#g-emotes button { font-size: 26px; padding: 4px; }
.emote-pop { position: absolute; right: 8px; top: -10px; font-size: 30px; animation: emote 2.4s forwards; pointer-events: none; }
@keyframes emote { 10% { transform: scale(1.3); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

/* lobby */
.code-card { text-align: center; padding: 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.code { font-size: 54px; font-weight: 800; letter-spacing: .14em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 2px 0 12px; }
.waiting { display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.waiting .coach { width: 120px; height: 120px; }

/* play tab */
.bots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.botc { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 2px 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.botc .e { font-size: 32px; line-height: 1.1; }
.botc b { font-size: 13px; line-height: 1.1; }
.botc small { color: var(--muted); font-size: 11px; font-weight: 700; }
.botc .beat { font-size: 11px; color: var(--green); }

/* modals */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 6, 24, .62); backdrop-filter: blur(4px); animation: fade .18s; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 20px 18px max(18px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: linear-gradient(180deg, #241e52, #1a163d); border: 1px solid var(--line); border-bottom: 0; animation: sheet .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet { from { transform: translateY(40px); opacity: .5; } }
.sheet h2 { font-size: 22px; margin-bottom: 6px; }
.over-title { text-align: center; font-size: 28px !important; }
.over-sub { text-align: center; color: var(--muted); font-weight: 700; }
.tabs { display: flex; gap: 6px; margin: 10px 0; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; padding: 8px 9px; border-radius: 12px; background: var(--card); font-weight: 700; white-space: nowrap; }
.tabs button.on { background: var(--grad); color: #2b1300; }
.lb, .fl, .hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lb li, .fl li, .hist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--card); }
.lb li.mine { background: rgba(255, 166, 43, .18); }
.lb .pos { width: 28px; text-align: center; font-weight: 800; }
.lb .av, .fl .av, .hist .av { font-size: 22px; }
.lb .nm, .fl .nm, .hist .nm { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl .nm small, .hist .nm small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.res { font-weight: 800; padding: 2px 8px; border-radius: 8px; font-size: 13px; }
.res.w { background: rgba(52, 211, 153, .2); color: #8ef0c4; } .res.l { background: rgba(255, 93, 115, .18); color: #ffadba; } .res.d { background: var(--card2); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.tiles div { text-align: center; padding: 10px 4px; border-radius: 16px; background: var(--card); }
.tiles b { display: block; font-size: 20px; }
.tiles small { color: var(--muted); font-weight: 700; font-size: 12px; }
.xpbar { height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .3); overflow: hidden; margin-top: 6px; }
.xpbar i { display: block; height: 100%; background: var(--tgrad); }
.field { display: block; font-weight: 700; color: var(--muted); font-size: 14px; }
.field input { margin-top: 6px; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.tg { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--card); font-weight: 700; }
.tg input { width: 20px; height: 20px; accent-color: var(--saffron); }
.links { text-align: center; font-size: 13px; }
.linkbtn { color: var(--teal); text-decoration: underline; }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item { padding: 10px; border-radius: 18px; background: var(--card); border: 2px solid transparent; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.item.on { border-color: var(--saffron); }
.swatch { width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.swatch i { background: var(--l); } .swatch i:nth-child(odd) { background: var(--d); background-image: var(--pat); }
.swatch.pcs { display: flex; justify-content: center; align-items: center; background: #ece7da; }
.swatch.pcs svg { width: 40%; height: 90%; }
.item b { font-size: 15px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { position: relative; padding: 14px 6px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pack span { font-size: 28px; } .pack b { font-size: 18px; } .pack small { color: var(--muted); font-weight: 700; }
.pack em { position: absolute; top: -8px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--rose); color: #fff; padding: 1px 8px; border-radius: 99px; }
.free-gold, .premium { padding: 14px; border-radius: 18px; background: var(--card); margin-bottom: 10px; }
.free-gold { display: flex; align-items: center; gap: 10px; }
.free-gold > span { font-size: 30px; } .free-gold div { flex: 1; } .free-gold small { display: block; color: var(--muted); font-weight: 600; }
.premium { background: linear-gradient(135deg, rgba(255, 207, 74, .2), rgba(255, 122, 26, .12)); border: 1px solid rgba(255, 207, 74, .35); }
.perks { padding-left: 4px; list-style: none; display: grid; gap: 6px; font-weight: 600; }
.sup { font-style: normal; margin-left: 4px; }
.news { padding-left: 20px; display: grid; gap: 8px; }
.searching { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; }
.searching b { font-size: 28px; font-variant-numeric: tabular-nums; }
.searching .coach { width: 110px; height: 110px; animation: bob 2s ease-in-out infinite; }

/* toasts & net */
#toasts { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 100; pointer-events: none; }
.toast { max-width: 90%; padding: 10px 16px; border-radius: 16px; background: rgba(36, 30, 82, .96); border: 1px solid var(--line); font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: slideup .25s; transition: opacity .4s, transform .4s; }
.toast.bad { border-color: rgba(255, 93, 115, .6); }
.toast.out { opacity: 0; transform: translateY(-8px); }
#net { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: var(--rose); color: #fff; font-weight: 800; z-index: 90; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-height: 860px) { .coach-row .bubble { font-size: 18px; } }
