/* BroPro Chess — black and gold, mobile first. */
:root {
    --bg: #0b0b0f; --bg2: #101117; --panel: #16171e; --panel2: #1d1f28; --line: rgba(255, 255, 255, .09);
    --text: #f5f1e8; --muted: #a9a49b; --gold: #e2b347; --gold2: #fff3c4; --gold3: #9a6a12;
    --ok: #51cf66; --bad: #ff6b6b; --info: #4dabf7; --radius: 18px;
    --sq-l: #efe4c9; --sq-d: #a57d42; --co-l: #8a6326; --co-d: #fbf1d8; --frame: #0d0d10;
    --font: 'Outfit', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body[data-board="green"] { --sq-l: #eeeed2; --sq-d: #769656; --co-l: #769656; --co-d: #eeeed2; --frame: #312e2b; }
body[data-board="wood"] { --sq-l: #f0d9b5; --sq-d: #b58863; --co-l: #b58863; --co-d: #f0d9b5; --frame: #3b2a1c; }
body[data-board="ocean"] { --sq-l: #dee3e6; --sq-d: #8ca2ad; --co-l: #6b8591; --co-d: #eef2f4; --frame: #1e2a33; }
body[data-board="marble"] { --sq-l: #ececec; --sq-d: #a7a7ad; --co-l: #808088; --co-d: #f6f6f6; --frame: #2a2a2e; }
body[data-board="midnight"] { --sq-l: #7d8aa6; --sq-d: #3c4660; --co-l: #3c4660; --co-d: #c6cee0; --frame: #0f1320; }
body[data-board="champion"] { --sq-l: #fff1c1; --sq-d: #c99a2e; --co-l: #8a5e0c; --co-d: #fff8de; --frame: #1a1206; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
body.cx { min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, rgba(226, 179, 71, .10), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(77, 171, 247, .06), transparent 60%), var(--bg); }
button { font-family: inherit; color: inherit; }
.cx-hidden { display: none !important; }
[hidden] { display: none !important; }
a { color: var(--gold); }

/* ---------- Header ---------- */
.cx-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px max(12px, env(safe-area-inset-left)); padding-top: max(10px, env(safe-area-inset-top)); background: rgba(11, 11, 15, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.cx-title { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: .2px; min-width: 0; }
.cx-title small { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.cx-crown { color: var(--gold); text-shadow: 0 0 18px rgba(226, 179, 71, .6); }
.cx-top-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.cx-icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: inline-grid; place-items: center; font-size: 17px; cursor: pointer; transition: transform .12s, background .2s; }
.cx-icon:hover { background: var(--panel2); }
.cx-icon:active { transform: scale(.94); }
.cx-icon:focus-visible, .cx-btn:focus-visible, .cx-mode:focus-visible, .cx-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cx-lang { font-size: 14px; font-weight: 700; }
.cx-me { font-size: 12px; font-weight: 700; color: var(--gold2); background: rgba(226, 179, 71, .12); border: 1px solid rgba(226, 179, 71, .3); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }

/* ---------- Screens ---------- */
.cx-screen { max-width: 1000px; margin: 0 auto; padding: 18px 16px 60px; }
.cx-label { display: flex; justify-content: space-between; margin: 26px 2px 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; }
.cx-eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--gold); }
.cx-note { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.cx-card { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.cx-card h2, .cx-card h3 { margin: 0 0 10px; }
.cx-card h3 { font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.cx-card h3.mt { margin-top: 16px; }
.cx-row { display: flex; gap: 8px; flex-wrap: wrap; }

.cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 18px; border: 0; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; color: #1b1405; background: linear-gradient(135deg, var(--gold2), var(--gold) 45%, #c48f23); box-shadow: 0 8px 24px rgba(226, 179, 71, .25), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .12s, filter .2s; text-decoration: none; }
.cx-btn:hover { filter: brightness(1.05); }
.cx-btn:active { transform: scale(.98); }
.cx-btn.ghost { background: var(--panel2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.cx-btn.danger { background: linear-gradient(135deg, #ff8787, #e03131); color: #fff; box-shadow: 0 8px 24px rgba(224, 49, 49, .25); }
.cx-btn.small { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
.cx-btn.wa { background: linear-gradient(135deg, #5be584, #25d366); color: #052e14; }
.cx-btn:disabled { opacity: .5; cursor: not-allowed; }
.cx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; }
.cx-pill.on { border-color: var(--gold); background: rgba(226, 179, 71, .14); color: var(--gold2); }
.cx-pill-pc { width: 24px; height: 24px; }
.cx-pill-ic { font-size: 18px; }

/* ---------- Home ---------- */
.cx-hero { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; padding: 8px 0 4px; }
.cx-hero h1 { font-size: clamp(30px, 8vw, 52px); line-height: 1.04; margin: 10px 0 12px; white-space: pre-line; letter-spacing: -.5px; background: linear-gradient(180deg, #fff, #f1dfb2); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.hi .cx-hero h1 { line-height: 1.25; }
.cx-hero p { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0; max-width: 520px; }
.cx-hero-art { display: flex; justify-content: center; }
.cx-hero-board { width: min(64vw, 270px); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }
.cx-hero-board .bpc-board { border-radius: 14px; }
.cx-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cx-chipstat { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
@media (min-width: 760px) { .cx-hero { grid-template-columns: 1.2fr 1fr; padding-top: 24px; } .cx-hero-board { width: 360px; } }

.cx-resume { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid rgba(226, 179, 71, .45); background: linear-gradient(135deg, rgba(226, 179, 71, .16), rgba(226, 179, 71, .04)); cursor: pointer; text-align: left; }
.cx-resume img { border-radius: 50%; border: 2px solid var(--gold); }
.cx-resume .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-resume .tx span { color: var(--muted); font-size: 13px; }
.cx-resume .go { margin-left: auto; font-size: 22px; color: var(--gold); }

.cx-modes { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .cx-modes { grid-template-columns: 1fr 1fr; } }
.cx-modes.three { grid-template-columns: repeat(3, 1fr); }
.cx-mode { display: flex; align-items: center; gap: 14px; padding: 14px; min-height: 76px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); cursor: pointer; text-align: left; transition: transform .15s, border-color .2s; }
.cx-mode:hover { border-color: rgba(226, 179, 71, .5); transform: translateY(-1px); }
.cx-mode .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: rgba(255, 255, 255, .05); flex: none; }
.cx-mode .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-mode .tx b { font-size: 16px; }
.cx-mode .tx span { font-size: 13px; color: var(--muted); }
.cx-mode-av { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; flex: none; }
.cx-mode.m-bot { border-color: rgba(226, 179, 71, .35); background: linear-gradient(160deg, rgba(226, 179, 71, .13), var(--panel)); }
.cx-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px; min-height: 118px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); cursor: pointer; text-align: left; }
.cx-tile .ic { font-size: 26px; margin-bottom: 4px; }
.cx-tile b { font-size: 15px; }
.cx-tile span:last-child { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cx-tile:hover { border-color: rgba(226, 179, 71, .45); }
.cx-tile.t-daily.done { border-color: rgba(81, 207, 102, .5); }

.cx-arena-strip { margin-top: 16px; }
.cx-promise { display: flex; gap: 12px; align-items: center; margin-top: 28px; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.cx-promise img { border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.cx-promise p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.cx-promise b { color: var(--text); }
.cx-impact { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- BhAI setup ---------- */
.cx-bhai-card { display: flex; align-items: center; gap: 14px; }
.cx-bhai-av { border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(226, 179, 71, .12); }
.cx-bhai-card h2 { margin: 0; }
.cx-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cx-level { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; min-height: 78px; }
.cx-level b { font-size: 20px; }
.cx-level span { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.cx-level small { font-size: 11px; color: var(--gold); font-weight: 700; }
.cx-level.on { border-color: var(--gold); background: rgba(226, 179, 71, .14); box-shadow: 0 0 0 1px var(--gold) inset; }
.cx-level-win { position: absolute; top: 4px; right: 6px; font-style: normal; color: var(--ok); font-size: 12px; font-weight: 900; }
#botStart { margin-top: 4px; }

/* ---------- Board ---------- */
.bpc-board { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 0 0 3px var(--frame), 0 18px 40px rgba(0, 0, 0, .5); outline: none; }
.bpc-board:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 18px 40px rgba(0, 0, 0, .5); }
.bpc-squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.bpc-sq { position: relative; }
.bpc-sq.l { background: var(--sq-l); }
.bpc-sq.d { background: var(--sq-d); }
body[data-board="royal"] .bpc-sq.d { background: linear-gradient(135deg, #b48a4c, #96703a); }
body[data-board="royal"] .bpc-sq.l { background: linear-gradient(135deg, #f6ecd2, #e8dab8); }
body[data-board="marble"] .bpc-sq.d { background: linear-gradient(135deg, #b4b4ba, #9a9aa1); }
body[data-board="wood"] .bpc-sq.d { background: linear-gradient(135deg, #bb8e68, #a97b56); }
.bpc-rk, .bpc-fl { position: absolute; font-size: clamp(8px, 2.2cqw, 12px); font-weight: 800; line-height: 1; pointer-events: none; }
.bpc-board { container-type: inline-size; }
.bpc-rk { top: 3px; left: 3px; }
.bpc-fl { bottom: 2px; right: 3px; }
.bpc-sq.l .bpc-rk, .bpc-sq.l .bpc-fl { color: var(--co-l); }
.bpc-sq.d .bpc-rk, .bpc-sq.d .bpc-fl { color: var(--co-d); }
.bpc-marks, .bpc-pieces { position: absolute; inset: 0; pointer-events: none; }
.bpc-mark { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; }
.bpc-mark.last { background: rgba(255, 213, 0, .38); }
.bpc-mark.sel { background: rgba(255, 213, 0, .55); }
.bpc-mark.dot { background: radial-gradient(circle, rgba(20, 20, 20, .28) 17%, transparent 19%); }
.bpc-mark.cap { background: radial-gradient(circle, transparent 60%, rgba(20, 20, 20, .28) 61%, rgba(20, 20, 20, .28) 75%, transparent 76%); }
.bpc-mark.hover { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .75); }
.bpc-mark.check { background: radial-gradient(circle, rgba(255, 30, 30, .95) 0%, rgba(230, 20, 20, .55) 40%, transparent 72%); }
.bpc-mark.focus { box-shadow: inset 0 0 0 3px #4dabf7; }
.bpc-mark.pulse { animation: bpcPulse .9s ease-out; background: rgba(77, 171, 247, .45); }
.bpc-mark.tint-best, .bpc-mark.tint-good { background: rgba(81, 207, 102, .38); }
.bpc-mark.tint-inaccuracy { background: rgba(255, 212, 59, .45); }
.bpc-mark.tint-mistake { background: rgba(255, 146, 43, .5); }
.bpc-mark.tint-blunder { background: rgba(250, 82, 82, .5); }
.bpc-mark.tint-right { background: rgba(81, 207, 102, .5); }
.bpc-mark.tint-wrong { background: rgba(250, 82, 82, .5); }
.bpc-mark.tint-target::after { content: ''; position: absolute; inset: 24%; background: linear-gradient(135deg, #fff3c4, #e2b347 55%, #b07d18); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); animation: bpcTwinkle 1.8s ease-in-out infinite; }
@keyframes bpcTwinkle { 50% { transform: scale(.86) rotate(8deg); } }
@keyframes bpcPulse { from { opacity: 1; } to { opacity: 0; } }
.bpc-pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; display: grid; place-items: center; will-change: transform; }
.bpc-pc.moving { transition: transform .18s cubic-bezier(.3, .8, .35, 1); }
.bpc-pc.dragging { z-index: 20; transition: none; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .45)); }
.bpc-pc.gone { opacity: 0; transition: opacity .18s; }
.bpc-piece { width: 92%; height: 92%; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .38)); pointer-events: none; }
.bpc-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bpc-arrow line { stroke-linecap: round; }
.bpc-arrow.hint line { stroke: rgba(255, 170, 0, .85); } .bpc-arrow.hint polygon { fill: rgba(255, 170, 0, .85); }
.bpc-arrow.best line { stroke: rgba(21, 170, 191, .82); } .bpc-arrow.best polygon { fill: rgba(21, 170, 191, .82); }
.bpc-arrow.lesson line { stroke: rgba(81, 207, 102, .8); } .bpc-arrow.lesson polygon { fill: rgba(81, 207, 102, .8); }
.bpc-promo { position: absolute; width: 12.5%; z-index: 40; display: flex; flex-direction: column; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); overflow: hidden; }
.bpc-promo-btn { aspect-ratio: 1; border: 0; background: #f4f4f4; cursor: pointer; display: grid; place-items: center; padding: 0; }
.bpc-promo-btn:hover, .bpc-promo-btn:focus-visible { background: #ffe8a3; outline: none; }
.bpc-promo-btn .bpc-piece { width: 86%; height: 86%; }
.bpc-promo-x { border: 0; background: #ddd; color: #333; font-size: 14px; padding: 6px 0; cursor: pointer; }
.bpc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Game screen ---------- */
.cx-game { max-width: 1120px; margin: 0 auto; padding: 8px 8px 24px; display: grid; grid-template-columns: 1fr; gap: 10px; }
.cx-table { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-board-zone { position: relative; display: flex; gap: 6px; }
.cx-board-holder { flex: 1; min-width: 0; }
@media (min-width: 900px) {
    .cx-game { grid-template-columns: minmax(0, min(78vh, 680px)) minmax(300px, 380px); justify-content: center; padding: 16px; align-items: start; }
    .cx-side { position: sticky; top: 76px; }
}
.cx-player { min-height: 52px; }
.cx-pl { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.cx-av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; flex: none; }
.cx-av img { width: 100%; height: 100%; object-fit: cover; }
.cx-av.cw { box-shadow: inset 0 -3px 0 #f2ead6; }
.cx-av.cb { box-shadow: inset 0 -3px 0 #2a2a30; }
.cx-pl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-pl-name { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
.cx-pl-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.cx-pl-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cx-fire { font-size: 13px; }
.cx-cap { display: flex; align-items: center; min-height: 18px; flex-wrap: nowrap; overflow: hidden; }
.cx-cap-pc { width: 17px; height: 17px; margin-right: -5px; }
.cx-adv { margin-left: 9px; font-size: 12px; font-weight: 800; color: var(--muted); }
.cx-think { font-size: 12px; color: var(--gold); font-weight: 700; animation: cxBlink 1.2s infinite; }
@keyframes cxBlink { 50% { opacity: .35; } }
.cx-clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; padding: 8px 12px; border-radius: 10px; background: #22232b; color: #9a978f; min-width: 82px; text-align: right; border: 1px solid var(--line); }
.cx-clock.run { background: #f5f1e8; color: #111; }
.cx-clock.low { background: #ff6b6b; color: #fff; animation: cxLow 1s infinite; }
@keyframes cxLow { 50% { filter: brightness(1.25); } }

.cx-evalbar { position: relative; width: 12px; border-radius: 6px; overflow: hidden; background: #f2efe8; flex: none; }
.cx-evalbar i { position: absolute; left: 0; right: 0; top: 0; background: #2b2b31; transition: height .35s ease; }
.cx-evalbar.flip { transform: rotate(180deg); }
.cx-evalbar span { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%) rotate(-90deg); transform-origin: center; font-size: 9px; font-weight: 800; color: #111; white-space: nowrap; }
.cx-evalbar.flip span { transform: translateX(-50%) rotate(90deg); }

.cx-bubble { position: absolute; top: -6px; right: 8px; max-width: min(78%, 320px); z-index: 25; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: #17140f; font-weight: 600; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.cx-bubble.bottom { top: auto; bottom: -6px; }
.cx-bubble.emoji { font-size: 36px; padding: 4px 10px; background: transparent; box-shadow: none; }
.cx-bubble.pop { animation: cxPop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cxPop { from { transform: scale(.6) translateY(-6px); opacity: 0; } }

.cx-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cx-moves { display: flex; gap: 2px; align-items: center; overflow-x: auto; white-space: nowrap; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 44px; scrollbar-width: thin; }
.cx-mn { color: var(--muted); font-size: 12px; padding: 0 2px 0 6px; font-variant-numeric: tabular-nums; }
.cx-mv { border: 0; background: transparent; padding: 5px 7px; border-radius: 7px; font-size: 14px; font-weight: 700; cursor: pointer; }
.cx-mv:hover { background: var(--panel2); }
.cx-mv.on { background: rgba(226, 179, 71, .22); color: var(--gold2); }
.cx-mv.k-inaccuracy::after { content: '?!'; color: #ffd43b; margin-left: 2px; }
.cx-mv.k-mistake::after { content: '?'; color: #ff922b; margin-left: 2px; }
.cx-mv.k-blunder::after { content: '??'; color: #fa5252; margin-left: 2px; }
.cx-mv.k-best::after { content: '★'; color: #51cf66; margin-left: 2px; font-size: 10px; }
@media (min-width: 900px) {
    .cx-moves { display: grid; grid-template-columns: 38px 1fr 1fr; align-content: start; white-space: normal; max-height: 42vh; overflow-y: auto; }
    .cx-mv { text-align: left; }
}
.cx-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cx-nav .cx-icon { width: 100%; height: 38px; }
.cx-status { text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); min-height: 20px; }
.cx-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.cx-act { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 12px; font-weight: 700; }
.cx-act .ic { font-size: 18px; line-height: 1; }
.cx-act:hover { background: var(--panel2); }
.cx-act.primary { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #1b1405; border-color: transparent; }
.cx-act.danger .ic { color: var(--bad); }
.cx-act:disabled { opacity: .4; }
.cx-act.unread::after { content: ''; position: absolute; top: 7px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--panel); }
.cx-badge { position: absolute; top: 4px; right: 6px; font-size: 10px; background: var(--gold); color: #111; border-radius: 999px; padding: 1px 5px; }

/* Review summary */
.cx-review-sum { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.cx-acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-acc { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 12px; }
.cx-acc.w { background: #f2ede0; color: #17140f; }
.cx-acc.b { background: #24252d; }
.cx-acc .n { font-size: 12px; font-weight: 700; opacity: .75; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-acc b { font-size: 24px; }
.cx-acc .l { font-size: 11px; opacity: .7; }
.cx-kinds { display: grid; gap: 3px; margin-top: 10px; }
.cx-kind { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; text-align: center; font-size: 13px; padding: 3px 0; border-radius: 6px; }
.cx-kind .cnt { font-weight: 800; }
.k-best .lb, b.k-best { color: #51cf66; } .k-good .lb, b.k-good { color: #8ce99a; } .k-inaccuracy .lb, b.k-inaccuracy { color: #ffd43b; } .k-mistake .lb, b.k-mistake { color: #ff922b; } .k-blunder .lb, b.k-blunder { color: #fa5252; }
.cx-review-note { margin: 10px 0 0; font-size: 14px; min-height: 20px; color: var(--muted); }
.cx-review-prog p { margin: 0 0 12px; font-weight: 700; text-align: center; }
.cx-progress { height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.cx-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); transition: width .3s; }

/* ---------- Modals, sheets, toast ---------- */
.cx-modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: cxFade .2s; }
@keyframes cxFade { from { opacity: 0; } }
.cx-modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(180deg, #1f2029, #15161c); border: 1px solid rgba(226, 179, 71, .25); border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: cxRise .28s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes cxRise { from { transform: translateY(20px) scale(.97); opacity: 0; } }
.cx-modal-t { margin: 0 0 8px; text-align: center; font-size: 24px; }
.cx-modal-p { margin: 0 0 12px; text-align: center; color: var(--muted); }
.cx-modal-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cx-result-head { display: flex; justify-content: center; margin-bottom: 6px; }
.cx-result-crown { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; background: radial-gradient(circle at 30% 30%, #fff3c4, #e2b347 60%, #9a6a12); box-shadow: 0 0 0 6px rgba(226, 179, 71, .15), 0 12px 40px rgba(226, 179, 71, .35); animation: cxCrown .8s cubic-bezier(.2, 1.6, .4, 1); }
.cx-result-crown.lose { background: radial-gradient(circle at 30% 30%, #6b6b75, #2a2a30); box-shadow: none; }
.cx-result-crown.draw { background: radial-gradient(circle at 30% 30%, #d0ebff, #4dabf7); box-shadow: none; }
@keyframes cxCrown { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.cx-result-body { text-align: center; }
.cx-result-why { margin: 0; color: var(--muted); }
.cx-result-sub { margin: 8px 0 0; font-weight: 700; color: var(--gold2); }
.cx-result-delta { display: inline-block; margin-top: 10px; font-size: 28px; font-weight: 900; padding: 4px 16px; border-radius: 12px; }
.cx-result-delta.up { color: var(--ok); background: rgba(81, 207, 102, .12); }
.cx-result-delta.down { color: var(--bad); background: rgba(255, 107, 107, .12); }

.cx-sheet { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; max-height: 78vh; display: flex; flex-direction: column; background: #17181f; border-top: 1px solid rgba(226, 179, 71, .3); border-radius: 22px 22px 0 0; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); animation: cxSheet .28s cubic-bezier(.2, 1, .4, 1); }
@keyframes cxSheet { from { transform: translateY(100%); } }
@media (min-width: 900px) { .cx-sheet { left: auto; right: 16px; bottom: 16px; width: 380px; border-radius: 22px; border: 1px solid rgba(226, 179, 71, .3); } }
.cx-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cx-chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 140px; max-height: 38vh; padding: 4px 0; }
.cx-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.cx-msg.me { align-self: flex-end; }
.cx-msg-av { border-radius: 50%; flex: none; }
.cx-msg-t { padding: 8px 12px; border-radius: 14px; background: var(--panel2); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.cx-msg.me .cx-msg-t { background: linear-gradient(135deg, #f2d27a, var(--gold)); color: #1b1405; }
.cx-msg.emoji .cx-msg-t { background: transparent; font-size: 30px; padding: 0 4px; }
.cx-msg.typing { color: var(--muted); font-size: 13px; font-style: italic; }
.cx-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.cx-chip { flex: none; border: 1px solid var(--line); background: var(--panel2); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cx-chips.emoji .cx-chip { font-size: 20px; padding: 4px 10px; }
.cx-chat-form { display: flex; gap: 8px; margin-top: 8px; }
.cx-chat-form input { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #0f1015; color: var(--text); padding: 0 12px; font-size: 16px; font-family: inherit; }
.cx-chat-safe { margin: 8px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.cx-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 200; background: #f5f1e8; color: #111; font-weight: 700; padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .3s cubic-bezier(.2, 1.2, .4, 1); max-width: calc(100% - 32px); text-align: center; }
.cx-toast.on { transform: translate(-50%, 0); }
.cx-netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 150; background: var(--bad); color: #fff; text-align: center; font-weight: 700; padding: 6px; font-size: 13px; }

.cx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.cx-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: cxFall 2.6s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes cxFall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .9; } }

/* Customise */
.cx-custom h3 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.cx-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cx-swatch { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 12px; font-weight: 700; }
.cx-swatch.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.cx-swatch.locked { opacity: .55; }
.cx-sw-prev { display: grid; grid-template-columns: 1fr 1fr; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; }
.cx-sw-prev i { display: block; }
.b-royal .cx-sw-prev i.l { background: #f3e8cc; } .b-royal .cx-sw-prev i.d { background: #a57d42; }
.b-green .cx-sw-prev i.l { background: #eeeed2; } .b-green .cx-sw-prev i.d { background: #769656; }
.b-wood .cx-sw-prev i.l { background: #f0d9b5; } .b-wood .cx-sw-prev i.d { background: #b58863; }
.b-ocean .cx-sw-prev i.l { background: #dee3e6; } .b-ocean .cx-sw-prev i.d { background: #8ca2ad; }
.b-marble .cx-sw-prev i.l { background: #ececec; } .b-marble .cx-sw-prev i.d { background: #a7a7ad; }
.b-midnight .cx-sw-prev i.l { background: #7d8aa6; } .b-midnight .cx-sw-prev i.d { background: #3c4660; }
.b-champion .cx-sw-prev i.l { background: #fff1c1; } .b-champion .cx-sw-prev i.d { background: #c99a2e; }
.cx-sw-set { display: flex; height: 56px; align-items: center; }
.cx-sw-set svg { width: 34px; height: 34px; margin: 0 -5px; }
.cx-sw-name { text-align: center; line-height: 1.2; }
.cx-sw-lock { font-size: 10px; color: var(--muted); text-align: center; font-weight: 600; }
.cx-toggles { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cx-toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.cx-toggle input { width: 20px; height: 20px; accent-color: var(--gold); }
.cx-sound-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; }
.cx-sound-row input { flex: 1; accent-color: var(--gold); }

body.hi { --font: 'Noto Sans Devanagari', 'Outfit', system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Training (puzzles, lessons) ---------- */
.cx-train-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-height: 58px; justify-content: center; transition: background .25s, border-color .25s; }
.cx-train-head b { font-size: 16px; }
.cx-train-head span { font-size: 13px; color: var(--muted); }
.cx-train-head.ok { background: rgba(81, 207, 102, .14); border-color: rgba(81, 207, 102, .5); }
.cx-train-head.bad { background: rgba(255, 107, 107, .14); border-color: rgba(255, 107, 107, .5); }
.cx-train-panel { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.cx-train-btns { display: flex; flex-direction: column; gap: 8px; }
.cx-pz-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.cx-pz-rate { display: flex; align-items: baseline; gap: 8px; }
.cx-pz-rate b { font-size: 28px; color: var(--text); }
.cx-pz-rate em { font-style: normal; font-weight: 800; }
.cx-pz-rate em.up { color: var(--ok); } .cx-pz-rate em.down { color: var(--bad); }
.cx-pz-streak { font-weight: 700; }
.cx-pz-id { margin: 0; font-size: 11px; color: var(--muted); text-align: center; }
.cx-sprint { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.cx-sprint-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.cx-sprint-time.low { color: var(--bad); }
.cx-page-head { margin: 8px 0 14px; }
.cx-page-head h1 { margin: 6px 0 4px; font-size: 30px; }
.cx-statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.cx-stat { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cx-stat b { font-size: 22px; }
.cx-stat span { font-size: 12px; color: var(--muted); text-align: center; }
.cx-mode.done { border-color: rgba(81, 207, 102, .5); }
.cx-theme-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-chip.big { padding: 10px 14px; font-size: 14px; }
.cx-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.cx-lesson { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 112px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); cursor: pointer; text-align: left; }
.cx-lesson .ic { font-size: 26px; }
.cx-lesson .n { position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--muted); font-weight: 800; }
.cx-lesson b { font-size: 15px; }
.cx-lesson .st { color: var(--gold); letter-spacing: 2px; margin-top: auto; }
.cx-lesson.done { border-color: rgba(226, 179, 71, .45); }
.cx-lesson-text { margin: 0; font-size: 15px; line-height: 1.5; }
.cx-lesson-count { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.cx-quiz-q { margin: 6px 0 0; font-size: 17px; }
.cx-quiz { display: flex; flex-direction: column; gap: 8px; }
.cx-quiz .wrong { border-color: var(--bad); color: var(--bad); }
.cx-progress.big { height: 12px; border-radius: 6px; }
.cx-note.center { text-align: center; }

/* ---------- Online ---------- */
.cx-signin { text-align: center; }
.cx-signin .cx-btn { margin-top: 12px; }
.cx-myrating { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 14px; margin: 6px 0 14px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(226, 179, 71, .16), rgba(226, 179, 71, .03)); border: 1px solid rgba(226, 179, 71, .35); }
.cx-myrating span { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.cx-myrating b { font-size: 32px; color: var(--gold2); }
.cx-myrating small { color: var(--muted); }
.cx-pools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cx-pool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); cursor: pointer; padding: 10px; }
.cx-pool b { font-size: 26px; font-variant-numeric: tabular-nums; }
.cx-pool span { color: var(--muted); font-weight: 700; font-size: 13px; }
.cx-pool small { color: var(--ok); font-size: 12px; font-weight: 700; min-height: 16px; }
.cx-pool:hover { border-color: rgba(226, 179, 71, .5); }
.cx-seek { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 0; }
.cx-seek h2 { margin: 10px 0 0; }
.cx-seek .cx-btn { max-width: 360px; }
.cx-seek-time { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.cx-seek-long { max-width: 360px; width: 100%; }
.cx-seek-long p { color: var(--muted); }
.cx-radar { position: relative; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 179, 71, .25) 0 6%, transparent 7%), repeating-radial-gradient(circle, transparent 0 22px, rgba(226, 179, 71, .18) 23px 24px); border: 2px solid rgba(226, 179, 71, .4); overflow: hidden; }
.cx-radar::after { content: ''; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(226, 179, 71, .55), transparent 25%); animation: cxSpin 1.6s linear infinite; border-radius: 50%; }
@keyframes cxSpin { to { transform: rotate(360deg); } }
.cx-room { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.cx-code { font-size: 46px; font-weight: 900; letter-spacing: 8px; color: var(--gold2); font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.cx-wait { animation: cxBlink 1.6s infinite; }
.cx-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.cx-join h3 { grid-column: 1 / -1; }
.cx-join .cx-btn { width: auto; }
.cx-input { min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: #0f1015; color: var(--text); padding: 0 14px; font-size: 22px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; font-family: inherit; width: 100%; }
.cx-btn.mt { margin-top: 16px; }
.cx-live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(81, 207, 102, .2); animation: cxBlink 1.2s infinite; flex: none; }

/* Arena */
.cx-arena-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(77, 171, 247, .14), rgba(77, 171, 247, .03)); cursor: pointer; text-align: left; }
.cx-arena-card.live { border-color: rgba(81, 207, 102, .5); background: linear-gradient(135deg, rgba(81, 207, 102, .16), rgba(81, 207, 102, .03)); }
.cx-arena-card .ic { font-size: 28px; }
.cx-arena-card .tx { display: flex; flex-direction: column; gap: 2px; }
.cx-arena-card .tx span { color: var(--muted); font-size: 13px; }
.cx-arena-card .go { margin-left: auto; font-size: 22px; color: var(--gold); }
.cx-arena-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 18px; border-radius: var(--radius); background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line); }
.cx-arena-top.live { border-color: rgba(81, 207, 102, .5); }
.cx-arena-name h1 { margin: 0 0 8px; font-size: 30px; }
.cx-arena-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
.cx-live { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(81, 207, 102, .18); color: var(--ok); }
.cx-arena-clock { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold2); }
.cx-arena-act { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.cx-arena-wait { text-align: center; font-weight: 700; color: var(--gold2); margin: 0; animation: cxBlink 1.6s infinite; min-height: 1px; }
.cx-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.cx-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.cx-pod.p1 { border-color: var(--gold); background: linear-gradient(180deg, rgba(226, 179, 71, .2), var(--panel)); }
.cx-pod .medal { font-size: 30px; }
.cx-pod b { font-size: 14px; overflow-wrap: anywhere; }
.cx-pod span { font-size: 12px; color: var(--muted); }
.cx-standings { margin-top: 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.cx-st-row { display: grid; grid-template-columns: 44px 1fr 70px 56px; align-items: center; gap: 6px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 14px; }
.cx-st-row.head { background: var(--panel2); font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.cx-st-row.me { background: rgba(226, 179, 71, .12); }
.cx-st-row .rk { font-weight: 800; color: var(--muted); }
.cx-st-row .nm { display: flex; flex-direction: column; min-width: 0; }
.cx-st-row .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-st-row .nm small { color: var(--muted); font-size: 11px; }
.cx-st-row .sc { font-weight: 900; color: var(--gold2); }
.cx-st-row .gm { color: var(--muted); }

/* Leaderboard */
.cx-lb { display: flex; flex-direction: column; gap: 6px; }
.cx-lb-row { display: grid; grid-template-columns: 40px 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cx-lb-row.me { border-color: var(--gold); background: rgba(226, 179, 71, .1); }
.cx-lb-row.top1 { background: linear-gradient(90deg, rgba(226, 179, 71, .22), var(--panel)); }
.cx-lb-row .rk { font-weight: 900; text-align: center; font-size: 16px; }
.cx-lb-row .av { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--panel2); font-weight: 800; }
.cx-lb-row .av img { width: 100%; height: 100%; object-fit: cover; }
.cx-lb-row .nm { display: flex; flex-direction: column; min-width: 0; }
.cx-lb-row .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-lb-row .nm small { color: var(--muted); font-size: 12px; }
.cx-lb-row .rt { font-weight: 900; font-size: 18px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.cx-lb-me { margin-top: 14px; font-weight: 700; }

/* Road to Olympiad */
.cx-road-hero { padding: 26px 20px; border-radius: 24px; margin: 6px 0 8px; background: radial-gradient(600px 240px at 90% 0%, rgba(226, 179, 71, .3), transparent 70%), linear-gradient(160deg, #1f1a10, #121217); border: 1px solid rgba(226, 179, 71, .35); }
.cx-road-hero h1 { margin: 8px 0; font-size: clamp(28px, 7vw, 42px); }
.cx-road-hero p { margin: 0; color: var(--muted); line-height: 1.5; }
.cx-milestones { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cx-ms { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.cx-ms .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); color: var(--muted); font-weight: 900; flex: none; }
.cx-ms.got { border-color: rgba(226, 179, 71, .5); }
.cx-ms.got .ic { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #1b1405; }
.cx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-step { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cx-step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: rgba(226, 179, 71, .16); color: var(--gold2); flex: none; }
.cx-step b { font-size: 16px; }
.cx-step p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.cx-road-note { margin-top: 14px; font-size: 13px; }
.cx-road-links { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cx-scholar { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 107, 157, .12), rgba(226, 179, 71, .08)); border: 1px solid rgba(255, 107, 157, .3); }
.cx-scholar img { border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.cx-scholar p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }

/* Share */
.cx-share-prev { display: flex; justify-content: center; }
.cx-share-prev img { width: min(270px, 70vw); height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* Small phones: keep the header on one line, and leave room for the floating BhAI button. */
@media (max-width: 520px) {
    .cx-title small { display: none; }
    .cx-top { gap: 6px; }
    .cx-top-right { gap: 4px; }
    .cx-icon { width: 38px; height: 38px; }
    .cx-me { padding: 5px 8px; font-size: 11px; }
}
.cx-game, .cx-screen { padding-bottom: 110px; }
