/* BroPro Math Sprint — premium, fast, thumb-friendly */
:root {
    --ms-bg: #070a14; --ms-bg2: #111733; --ms-panel: rgba(255, 255, 255, .06); --ms-line: rgba(255, 255, 255, .11);
    --ms-text: #f6f4ef; --ms-muted: #a5abc4; --ms-gold: #f3d98b; --ms-gold2: #d4a640;
    --ms-volt: #8b5cf6; --ms-volt2: #22d3ee; --ms-good: #22c55e; --ms-bad: #f43f5e;
    --ms-safe-top: env(safe-area-inset-top, 0px); --ms-safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body.ms {
    min-height: 100dvh; font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ms-text);
    background: var(--ms-bg); overscroll-behavior: none; -webkit-user-select: none; user-select: none; overflow-x: hidden;
}
body.ms::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(800px 480px at 15% -10%, rgba(139, 92, 246, .28), transparent 60%),
        radial-gradient(700px 500px at 100% 0%, rgba(34, 211, 238, .14), transparent 60%),
        radial-gradient(600px 500px at 50% 110%, rgba(243, 217, 139, .1), transparent 60%),
        linear-gradient(180deg, var(--ms-bg2), var(--ms-bg) 70%);
}
button { font: inherit; color: inherit; }
.ms-hidden { display: none !important; }

/* Top bar */
.ms-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--ms-safe-top)) 14px 10px;
    background: linear-gradient(180deg, rgba(7, 10, 20, .9), rgba(7, 10, 20, .6)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--ms-line); }
.ms-icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--ms-line); background: var(--ms-panel); display: grid; place-items: center; cursor: pointer; font-size: 17px; text-decoration: none; color: var(--ms-text); flex: none; }
.ms-icon:active { transform: scale(.94); }
.ms-lang { width: auto; padding: 0 12px; font-weight: 700; font-size: .85rem; }
.ms-title { font-weight: 900; font-size: 1.15rem; letter-spacing: .2px; display: flex; align-items: center; gap: 6px; }
.ms-bolt { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, var(--ms-volt), var(--ms-volt2)); font-size: 15px; box-shadow: 0 6px 16px rgba(139, 92, 246, .4); }
.ms-top-right { margin-left: auto; display: flex; gap: 8px; }

/* Screens */
.ms-screen { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(28px + var(--ms-safe-bottom)); animation: ms-in .3s ease; }
@keyframes ms-in { from { opacity: 0; transform: translateY(6px); } }
.ms-h2 { margin: 6px 0 4px; font-size: 1.5rem; font-weight: 900; }
.ms-sub { margin: 0 0 14px; color: var(--ms-muted); }
.ms-label { margin: 0 0 10px; font-size: .74rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ms-muted); }
.ms-note { margin: 18px 4px 0; color: var(--ms-muted); font-size: .84rem; text-align: center; line-height: 1.45; }
.ms-sync { margin: 14px 4px 0; color: var(--ms-muted); font-size: .84rem; text-align: center; }
.ms-link { background: none; border: 0; color: var(--ms-gold); font-weight: 800; cursor: pointer; padding: 0; text-decoration: underline; }

/* Hero: level + streak */
.ms-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.ms-level, .ms-streak { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; border: 1px solid var(--ms-line);
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.ms-badge { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; color: #1b1203;
    background: linear-gradient(145deg, #fff3c4, var(--ms-gold) 40%, var(--ms-gold2)); box-shadow: 0 8px 18px rgba(212, 166, 64, .35), inset 0 1px 0 #fff; }
.ms-lvl-info { flex: 1; min-width: 0; }
.ms-lvl-info b { display: block; font-size: 1rem; }
.ms-lvl-info small { color: var(--ms-muted); font-size: .74rem; }
.ms-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 6px 0 4px; }
.ms-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--ms-volt), var(--ms-volt2)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.ms-bar i[data-tone="good"] { background: linear-gradient(90deg, #16a34a, #4ade80); }
.ms-bar i[data-tone="ok"] { background: linear-gradient(90deg, #d97706, #fbbf24); }
.ms-bar i[data-tone="low"] { background: linear-gradient(90deg, #e11d48, #fb7185); }
.ms-streak .flame { font-size: 30px; filter: grayscale(1) opacity(.5); transition: filter .3s ease; }
.ms-streak.lit .flame { filter: none; animation: ms-flame 1.6s ease-in-out infinite; }
@keyframes ms-flame { 50% { transform: scale(1.12) rotate(-4deg); } }
.ms-streak b { display: block; font-size: 1.4rem; line-height: 1; }
.ms-streak small { display: block; color: var(--ms-muted); font-size: .72rem; }
.ms-streak small.frz { color: #7dd3fc; }

/* Daily */
.ms-daily { width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 16px 18px; border-radius: 22px; cursor: pointer; border: 0;
    background: linear-gradient(120deg, #6d28d9 0%, #7c3aed 35%, #0891b2 100%); color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 16px 40px rgba(109, 40, 217, .35), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .15s ease; }
.ms-daily::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%); transform: translateX(-100%); animation: ms-shine 3.2s ease-in-out infinite; }
@keyframes ms-shine { 60%, 100% { transform: translateX(100%); } }
.ms-daily:active { transform: scale(.985); }
.ms-daily .dl { flex: 1; min-width: 0; }
.ms-daily .tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; background: rgba(0, 0, 0, .22); padding: 4px 10px; border-radius: 999px; margin-bottom: 6px; }
.ms-daily b { display: block; font-size: .98rem; line-height: 1.3; }
.ms-daily .cta { flex: none; background: #fff; color: #4c1d95; font-weight: 900; padding: 10px 14px; border-radius: 14px; font-size: .9rem; box-shadow: 0 6px 14px rgba(0, 0, 0, .2); }
.ms-daily.done { background: linear-gradient(120deg, #166534, #15803d 50%, #0e7490); }
.ms-daily.done::after { animation: none; }
.ms-daily.done .cta { color: #166534; }

/* Class picker */
.ms-block { margin-top: 18px; }
.ms-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ms-tier { padding: 12px 10px; border-radius: 14px; border: 1px solid var(--ms-line); background: rgba(255, 255, 255, .04); cursor: pointer; font-weight: 800; font-size: .9rem; transition: all .15s ease; }
.ms-tier[aria-checked="true"] { background: linear-gradient(180deg, #fff3c4, var(--ms-gold) 50%, var(--ms-gold2)); color: #2a1a00; border-color: var(--ms-gold); box-shadow: 0 8px 18px rgba(212, 166, 64, .25); }

/* Modes */
.ms-modes { display: grid; gap: 10px; margin-top: 18px; }
.ms-mode { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--ms-line); cursor: pointer;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); box-shadow: 0 10px 26px rgba(0, 0, 0, .22); transition: transform .15s ease, border-color .15s ease; }
.ms-mode:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.ms-mode:active { transform: scale(.985); }
.ms-mode .ic { width: 50px; height: 50px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 24px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px rgba(0, 0, 0, .25); }
.m-sprint .ic { background: linear-gradient(135deg, #8b5cf6, #22d3ee); }
.m-tables .ic { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.m-zen .ic { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.m-stats .ic { background: linear-gradient(135deg, #64748b, #334155); }
.ms-mode .tx { flex: 1; min-width: 0; }
.ms-mode .tx b { display: block; font-size: 1.05rem; }
.ms-mode .tx small { color: var(--ms-muted); font-size: .84rem; }
.ms-mode .go { color: var(--ms-gold); font-size: 1.4rem; }

/* Play */
.ms-play { max-width: 520px; margin: 0 auto; min-height: calc(100dvh - 61px - var(--ms-safe-top)); display: flex; flex-direction: column; gap: 12px; padding: 12px 14px calc(14px + var(--ms-safe-bottom)); position: relative; }
.ms-hud { display: flex; align-items: center; gap: 10px; }
.ms-timer { position: relative; width: 54px; height: 54px; flex: none; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; }
.ms-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ms-timer circle { fill: none; stroke-width: 4; }
.ms-timer .bg { stroke: rgba(255, 255, 255, .1); }
.ms-timer .fg { stroke: var(--ms-volt2); stroke-linecap: round; transition: stroke .3s ease; filter: drop-shadow(0 0 4px rgba(34, 211, 238, .6)); }
.ms-timer.low .fg { stroke: var(--ms-bad); filter: drop-shadow(0 0 5px rgba(244, 63, 94, .8)); }
.ms-timer.low span { color: #fda4af; animation: ms-pulse .5s ease-in-out infinite alternate; }
@keyframes ms-pulse { to { transform: scale(1.15); } }
.ms-score { flex: 1; text-align: center; }
.ms-score small { display: block; color: var(--ms-muted); font-size: .7rem; letter-spacing: 1.4px; text-transform: uppercase; }
.ms-score b { font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.ms-combo { min-width: 70px; text-align: center; padding: 6px 10px; border-radius: 14px; border: 1px solid var(--ms-line); background: var(--ms-panel); transition: all .2s ease; }
.ms-combo span { display: block; font-weight: 900; font-size: 1.2rem; }
.ms-combo small { display: block; font-size: .64rem; color: var(--ms-muted); min-height: 1em; }
.ms-combo.hot { border-color: #f97316; background: linear-gradient(160deg, rgba(249, 115, 22, .3), rgba(239, 68, 68, .15)); box-shadow: 0 0 20px rgba(249, 115, 22, .35); }
.ms-combo[data-level="3"], .ms-combo[data-level="4"] { box-shadow: 0 0 28px rgba(249, 115, 22, .55); }
.ms-combo[data-level="5"] { border-color: var(--ms-gold); background: linear-gradient(160deg, rgba(243, 217, 139, .35), rgba(212, 166, 64, .2)); box-shadow: 0 0 32px rgba(243, 217, 139, .6); }
.ms-dots { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.ms-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.ms-dots i.now { background: var(--ms-gold); box-shadow: 0 0 8px var(--ms-gold); }
.ms-dots i.ok { background: var(--ms-good); }
.ms-dots i.no { background: var(--ms-bad); }

.ms-card { position: relative; flex: 1; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-radius: 26px; padding: 18px;
    border: 1px solid var(--ms-line); background: linear-gradient(170deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)); box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); overflow: hidden; }
.ms-q { font-size: clamp(2.2rem, 11vw, 3.6rem); font-weight: 900; letter-spacing: .5px; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ms-q.in { animation: ms-q-in .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes ms-q-in { from { opacity: 0; transform: translateY(12px) scale(.94); } }
.ms-answer { min-width: 140px; min-height: 64px; padding: 6px 20px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 2px;
    font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .3); border: 2px solid rgba(255, 255, 255, .14); }
.ms-answer .caret { width: 3px; height: 1.1em; background: var(--ms-volt2); border-radius: 2px; animation: ms-caret 1s steps(1) infinite; }
@keyframes ms-caret { 50% { opacity: 0; } }
.ms-card.good { animation: ms-good .35s ease; }
.ms-card.good .ms-answer { border-color: var(--ms-good); }
@keyframes ms-good { 40% { box-shadow: 0 0 0 3px var(--ms-good), 0 0 40px rgba(34, 197, 94, .45); } }
.ms-card.bad { animation: ms-bad .4s ease; }
.ms-card.bad .ms-answer { border-color: var(--ms-bad); color: #fda4af; }
@keyframes ms-bad { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 0%, 100% { box-shadow: 0 0 0 3px var(--ms-bad); } }
.ms-reveal { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%) translateY(10px); opacity: 0; transition: all .2s ease; white-space: nowrap;
    background: rgba(34, 197, 94, .15); border: 1px solid rgba(34, 197, 94, .5); color: #bbf7d0; padding: 6px 14px; border-radius: 999px; font-weight: 800; }
.ms-reveal.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ms-float { position: absolute; top: 18%; right: 12%; font-weight: 900; font-size: 1.4rem; color: #86efac; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); pointer-events: none; animation: ms-float .8s ease-out forwards; }
@keyframes ms-float { to { transform: translateY(-40px) scale(1.2); opacity: 0; } }
.ms-combo-pop { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); font-size: 3rem; font-weight: 900; color: #fff; pointer-events: none; z-index: 5;
    text-shadow: 0 0 24px rgba(249, 115, 22, .9), 0 4px 10px rgba(0, 0, 0, .5); animation: ms-pop .9s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes ms-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }

.ms-keypad { display: grid; grid-template-columns: repeat(3, 1fr) 1.1fr; grid-template-rows: repeat(4, 1fr); gap: 8px; }
.ms-key { height: clamp(50px, 8.2dvh, 66px); border-radius: 16px; border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; font-size: 1.6rem; font-weight: 800;
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); box-shadow: 0 4px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
    touch-action: manipulation; transition: transform .06s ease, box-shadow .06s ease, background .1s ease; }
.ms-key:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); background: rgba(255, 255, 255, .18); }
.ms-key.fn { font-size: 1.3rem; color: #fda4af; }
.ms-key.blank { visibility: hidden; }
.ms-key.ok { grid-column: 4; grid-row: 1 / span 4; height: auto; font-size: 2rem; color: #052e16; border: 0;
    background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 5px 0 #14532d, inset 0 1px 0 rgba(255, 255, 255, .4); }
.ms-key.ok:active { box-shadow: 0 1px 0 #14532d; }
.ms-keypad > .ms-key:nth-child(-n+3) { grid-row: 1; }
.ms-finish { padding: 12px; border-radius: 14px; border: 1px solid var(--ms-line); background: var(--ms-panel); cursor: pointer; font-weight: 800; }
.ms-countdown { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(7, 10, 20, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ms-countdown span { font-size: 6rem; font-weight: 900; background: linear-gradient(180deg, #fff, var(--ms-volt2)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: ms-count .6s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes ms-count { from { transform: scale(2.2); opacity: 0; } }

/* Results */
.ms-res-head { text-align: center; padding: 10px 0 6px; }
.ms-res-emoji { font-size: 56px; animation: ms-bounce 1.6s ease-in-out infinite; }
@keyframes ms-bounce { 50% { transform: translateY(-8px); } }
.ms-res-kicker { margin: 4px 0; color: var(--ms-muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .8rem; }
.ms-res-score b { display: block; font-size: 4.2rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff, var(--ms-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ms-res-score small { color: var(--ms-muted); font-weight: 700; }
.ms-pill { display: inline-block; margin: 6px 4px 0; padding: 7px 12px; border-radius: 999px; font-weight: 800; font-size: .86rem; background: var(--ms-panel); border: 1px solid var(--ms-line); }
.ms-pill.gold { background: linear-gradient(180deg, rgba(243, 217, 139, .25), rgba(212, 166, 64, .15)); border-color: var(--ms-gold); color: #fff3c4; }
.ms-pill.xp { background: rgba(139, 92, 246, .2); border-color: rgba(139, 92, 246, .6); color: #ddd6fe; }
.ms-pill.fire { background: rgba(249, 115, 22, .18); border-color: rgba(249, 115, 22, .55); color: #fed7aa; }
.ms-pill.ice { background: rgba(56, 189, 248, .15); border-color: rgba(56, 189, 248, .5); color: #bae6fd; }
.ms-rewards { text-align: center; margin: 12px 0 4px; }
.ms-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.ms-tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 380px) { .ms-tiles { grid-template-columns: repeat(2, 1fr); } }
.ms-tile { padding: 12px 6px; border-radius: 16px; text-align: center; border: 1px solid var(--ms-line); background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); }
.ms-tile b { display: block; font-size: 1.3rem; font-weight: 900; }
.ms-tile small { color: var(--ms-muted); font-size: .72rem; }
.ms-stars { font-size: 3.4rem; letter-spacing: 6px; }
.ms-stars span { color: rgba(255, 255, 255, .15); display: inline-block; }
.ms-stars span.on { color: var(--ms-gold); text-shadow: 0 0 20px rgba(243, 217, 139, .7); animation: ms-star .5s cubic-bezier(.2, .9, .3, 1.6) both; }
@keyframes ms-star { from { transform: scale(0) rotate(-90deg); } }
.ms-review { margin-top: 16px; padding: 14px; border-radius: 18px; border: 1px solid rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .06); }
.ms-review h3 { margin: 0 0 8px; font-size: .9rem; color: #bbf7d0; }
.ms-review .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.ms-review .row:first-of-type { border-top: 0; }
.ms-review b { font-variant-numeric: tabular-nums; }
.ms-review small { color: #fda4af; }
.ms-actions { display: grid; gap: 10px; margin-top: 18px; }
.ms-btn { padding: 15px; border-radius: 15px; border: 0; cursor: pointer; font-weight: 900; font-size: 1.05rem; color: #2a1a00;
    background: linear-gradient(180deg, #fff3c4, var(--ms-gold) 45%, var(--ms-gold2)); box-shadow: 0 5px 0 #8a5e0c, 0 12px 24px rgba(212, 166, 64, .2); }
.ms-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a5e0c; }
.ms-btn.wa { background: linear-gradient(180deg, #4ade80, #16a34a); color: #fff; box-shadow: 0 5px 0 #14532d; }
.ms-btn.ghost { background: rgba(255, 255, 255, .05); color: var(--ms-text); border: 1px solid var(--ms-line); box-shadow: none; margin-top: 4px; }
#scrStats > .ms-btn { width: 100%; margin-top: 16px; }

/* Tables picker */
.ms-table-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 480px) { .ms-table-grid { grid-template-columns: repeat(5, 1fr); } }
.ms-tcell { aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--ms-line); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); transition: transform .12s ease; }
.ms-tcell:active { transform: scale(.95); }
.ms-tcell b { font-size: 1.7rem; font-weight: 900; }
.ms-tcell .st { font-size: .8rem; color: var(--ms-gold); letter-spacing: 1px; }
.ms-tcell.master { border-color: var(--ms-gold); background: linear-gradient(160deg, rgba(243, 217, 139, .2), rgba(212, 166, 64, .06)); box-shadow: 0 0 18px rgba(243, 217, 139, .2); }

/* Progress */
.ms-card2 { margin-top: 14px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--ms-line); background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); }
.ms-card2 h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ms-muted); }
.ms-spark { width: 100%; height: 80px; }
.ms-spark .line { fill: none; stroke: var(--ms-volt2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ms-spark .area { fill: rgba(34, 211, 238, .12); }
.ms-spark .dot { fill: var(--ms-gold); }
.ms-skill { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: auto auto; column-gap: 12px; margin: 8px 0; align-items: center; }
.ms-skill b { font-size: .9rem; }
.ms-skill .ms-bar { margin: 0; grid-row: 1; grid-column: 2; }
.ms-skill small { grid-column: 2; color: var(--ms-muted); font-size: .72rem; }
.ms-focus { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(243, 217, 139, .1); border: 1px solid rgba(243, 217, 139, .35); color: #fff3c4; font-weight: 700; font-size: .9rem; }
.ms-mini-tables { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
@media (max-width: 400px) { .ms-mini-tables { grid-template-columns: repeat(7, 1fr); } }
.ms-mini-tables span { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: rgba(255, 255, 255, .05); color: var(--ms-muted); }
.ms-mini-tables .s1 { background: rgba(243, 217, 139, .15); color: #fde68a; }
.ms-mini-tables .s2 { background: rgba(243, 217, 139, .3); color: #fff3c4; }
.ms-mini-tables .s3 { background: linear-gradient(180deg, var(--ms-gold), var(--ms-gold2)); color: #2a1a00; }
.ms-ach { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 380px) { .ms-ach { grid-template-columns: repeat(3, 1fr); } }
.ms-ach-item { text-align: center; padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--ms-line); opacity: .55; }
.ms-ach-item.got { opacity: 1; border-color: rgba(243, 217, 139, .5); background: rgba(243, 217, 139, .08); }
.ms-ach-item .i { display: block; font-size: 1.6rem; }
.ms-ach-item small { font-size: .66rem; color: var(--ms-muted); line-height: 1.2; display: block; margin-top: 4px; }

/* Floating site widgets must never cover the keypad */
body.ms-playing #bhaiFloatingWidget { display: none !important; }

/* Misc */
.ms-toast { position: fixed; left: 50%; top: calc(76px + var(--ms-safe-top)); transform: translateX(-50%); z-index: 60; background: #111733; border: 1px solid var(--ms-line); padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.ms-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.ms-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: ms-fall linear forwards; }
@keyframes ms-fall { to { transform: translateY(110vh) rotate(720deg); } }
button:focus-visible, a:focus-visible { outline: 3px solid var(--ms-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
