/* Brain Gym · "Neon arcade": deep violet void, glowing tube colours, Monoton marquee, Chakra Petch UI */
.t-brain {
  --void: #160a2b; --panel: #22113f; --pink: #ff3ea5; --cyan: #2ef2ff; --lime: #b6ff3b; --yellow: #ffe53b; --violet: #9b6bff;
  --bg: var(--void); --surface: #22113f; --surface-2: #2d1752; --text: #f4ecff; --muted: #b9a9d8; --line: rgba(46, 242, 255, .22);
  --primary: var(--cyan); --primary-ink: #0b0418; --accent: var(--pink); --accent-ink: #fff; --good: var(--lime); --bad: #ff5d73;
  --radius: 10px; --radius-sm: 8px; --btn-radius: 8px;
  --font-body: 'Chakra Petch', 'Lexend', system-ui, sans-serif; --font-head: 'Chakra Petch', 'Lexend', sans-serif;
  --card-bg: linear-gradient(160deg, #2a1450, #1a0c33); --card-border: 1px solid rgba(255, 62, 165, .35); --card-shadow: 0 0 0 1px rgba(46, 242, 255, .08), 0 10px 30px rgba(0, 0, 0, .35);
  --top-bg: rgba(22, 10, 43, .9); --top-border: 1px solid rgba(255, 62, 165, .35);
  --stage-bg: radial-gradient(ellipse at 50% -10%, #2c1260, #160a2b 60%); --stage-head-bg: #1b0d36; --input-bg: #1b0d36; --input-border: 1.5px solid rgba(46, 242, 255, .35);
  background: radial-gradient(ellipse at 50% -20%, #3a1580, transparent 55%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px), var(--void);
}
.t-brain .mu-mark { background: transparent; color: var(--pink); border: 1.5px solid var(--pink); box-shadow: 0 0 10px rgba(255, 62, 165, .6); }
.t-brain .btn { font-weight: 700; letter-spacing: .02em; }
.t-brain .btn-primary { background: var(--cyan); color: var(--primary-ink); box-shadow: 0 0 14px rgba(46, 242, 255, .45); }
.t-brain .btn-accent { background: var(--pink); box-shadow: 0 0 14px rgba(255, 62, 165, .45); }
.t-brain .btn-ghost { color: var(--text); border-color: rgba(46, 242, 255, .45); }
.t-brain .seg { background: rgba(0, 0, 0, .3); border-color: var(--line); }
.t-brain .seg-btn { color: var(--muted); }
.t-brain .seg-btn.on { background: var(--pink); color: #fff; box-shadow: 0 0 10px rgba(255, 62, 165, .6); }
.t-brain .mcq-choice { background: #1f0f3b; border-color: rgba(46, 242, 255, .35); color: var(--text); font-family: var(--font-body); }
.t-brain .mcq-choice.good { background: var(--lime); color: #10200a; border-color: var(--lime); }
.t-brain .mcq-choice.bad { background: #ff5d73; }
.t-brain .mcq-bar > i, .t-brain .speed-timebar i { background: linear-gradient(90deg, var(--pink), var(--cyan)); }
.t-brain .panel { background: rgba(34, 17, 63, .85); border-color: var(--line); }
.t-brain .np-key { background: #1f0f3b; border-color: rgba(46, 242, 255, .3); color: var(--text); }
.t-brain .np-enter { background: var(--cyan); color: var(--primary-ink); }
.t-brain .res-stars .on { color: var(--yellow); text-shadow: 0 0 12px rgba(255, 229, 59, .8); }
.t-brain .mu-stage-title { letter-spacing: .03em; }
.t-brain .speed-q { color: var(--cyan); text-shadow: 0 0 18px rgba(46, 242, 255, .55); }

/* hero */
.b-hero { padding-top: 2.6rem; }
.b-hero h1 { font-family: 'Monoton', 'Chakra Petch', sans-serif; font-weight: 400; font-size: clamp(3rem, 11vw, 7.2rem); line-height: 1.02; margin: 0; color: var(--pink); text-shadow: 0 0 6px rgba(255, 62, 165, .9), 0 0 22px rgba(255, 62, 165, .65), 0 0 60px rgba(255, 62, 165, .45); letter-spacing: .04em; animation: flicker 6s infinite; }
@keyframes flicker { 0%, 92%, 96%, 100% { opacity: 1; } 93%, 95% { opacity: .55; } }
.b-lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin: .8rem 0 1.6rem; }
.b-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; }
.daily, .scores { border-radius: 14px; padding: 1.3rem 1.4rem; background: linear-gradient(150deg, #2c1458, #1b0c36); border: 1px solid rgba(46, 242, 255, .35); box-shadow: 0 0 24px rgba(46, 242, 255, .12) inset; }
.daily h2, .scores h2 { margin: 0 0 .5rem; font-size: 1.35rem; color: var(--cyan); text-shadow: 0 0 10px rgba(46, 242, 255, .6); }
.daily .streak { font-size: 2.6rem; font-weight: 700; color: var(--yellow); text-shadow: 0 0 14px rgba(255, 229, 59, .6); line-height: 1; }
.scores ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; max-height: 220px; overflow: auto; }
.scores li { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .5rem; align-items: center; padding: .25rem .4rem; border-bottom: 1px dashed rgba(46, 242, 255, .18); font-variant-numeric: tabular-nums; }
.scores li b { color: var(--lime); }
.scores .empty { color: var(--muted); grid-template-columns: 1fr; }
@media (max-width: 860px) { .b-top { grid-template-columns: 1fr; } }

/* cabinets */
.t-brain .act-section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--cyan); text-shadow: 0 0 12px rgba(46, 242, 255, .5); }
.t-brain .act-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.t-brain .act-card { border-color: color-mix(in srgb, var(--c, var(--pink)) 55%, transparent); padding: 1.2rem; }
.t-brain .act-card:hover { box-shadow: 0 0 0 1px var(--c, var(--pink)), 0 0 26px color-mix(in srgb, var(--c, var(--pink)) 45%, transparent); }
.t-brain .act-icon { font-size: 2.4rem; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c, var(--pink)) 70%, transparent)); }
.t-brain .act-title { color: var(--c, var(--pink)); font-size: 1.25rem; letter-spacing: .02em; }
.t-brain .act-tag { background: var(--yellow); color: #1a1405; }

/* games */
.g-wrap { max-width: 560px; margin: 0 auto; display: grid; gap: .9rem; }
.g-hud { display: flex; gap: .6rem; justify-content: space-between; flex-wrap: wrap; }
.g-hud .box { flex: 1 1 90px; text-align: center; background: #1f0f3b; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .5rem; }
.g-hud small { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .08em; }
.g-hud b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.board2048 { position: relative; width: 100%; aspect-ratio: 1; background: #10061f; border-radius: 14px; padding: 2%; border: 1px solid rgba(255, 62, 165, .4); box-shadow: 0 0 30px rgba(255, 62, 165, .18); touch-action: none; user-select: none; }
.board2048 .cell { position: absolute; width: 22%; height: 22%; border-radius: 10px; background: rgba(155, 107, 255, .1); }
.tile { position: absolute; width: 22%; height: 22%; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: clamp(1.2rem, 6vw, 2.3rem); transition: left .12s ease, top .12s ease; z-index: 2; }
.tile.new { animation: tileIn .18s ease; }
.tile.merged { animation: tilePop .2s ease; z-index: 3; }
@keyframes tileIn { from { transform: scale(0); } }
@keyframes tilePop { 50% { transform: scale(1.15); } }
.cards24 { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .7rem; }
.card24 { aspect-ratio: .78; border-radius: 14px; border: 2px solid rgba(46, 242, 255, .5); background: linear-gradient(160deg, #2c1458, #160a2b); color: var(--text); font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; display: grid; place-items: center; transition: transform .15s; }
.card24.on { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 229, 59, .6); transform: translateY(-6px); }
.card24.used { visibility: hidden; }
.ops24 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.ops24 button { font-size: 1.8rem; padding: .5rem; border-radius: 12px; border: 1px solid var(--line); background: #1f0f3b; color: var(--cyan); font-weight: 700; }
.ops24 button.on { background: var(--cyan); color: var(--primary-ink); }
.target { text-align: center; font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 700; color: var(--yellow); text-shadow: 0 0 18px rgba(255, 229, 59, .5); }
.sud { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; border: 3px solid var(--cyan); border-radius: 8px; overflow: hidden; box-shadow: 0 0 22px rgba(46, 242, 255, .25); }
.sud button { border: 0; border-right: 1px solid rgba(46, 242, 255, .2); border-bottom: 1px solid rgba(46, 242, 255, .2); background: #170b2e; color: var(--text); font-family: var(--font-body); font-size: clamp(1rem, 4.4vw, 1.6rem); font-weight: 600; padding: 0; position: relative; }
.sud button:nth-child(9n+3), .sud button:nth-child(9n+6) { border-right: 2px solid var(--cyan); }
.sud button:nth-child(n+19):nth-child(-n+27), .sud button:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--cyan); }
.sud button.given { color: #fff; background: #23103f; }
.sud button.user { color: var(--cyan); }
.sud button.peer { background: #2a1450; }
.sud button.same { background: #3d1a6e; }
.sud button.sel { background: var(--pink); color: #fff; }
.sud button.err { color: #ff5d73; }
.sud .notes { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); font-size: clamp(.45rem, 1.6vw, .65rem); color: var(--muted); line-height: 1; }
.padrow { display: grid; grid-template-columns: repeat(9, 1fr); gap: .3rem; width: 100%; max-width: 520px; margin: 0 auto; }
.padrow button { padding: .6rem 0; border-radius: 8px; border: 1px solid var(--line); background: #1f0f3b; color: var(--text); font-size: 1.3rem; font-weight: 700; }
.schulte { display: grid; gap: 6px; width: min(100%, 500px); aspect-ratio: 1; margin: 0 auto; }
.schulte button { border-radius: 8px; border: 1px solid rgba(46, 242, 255, .3); background: #1f0f3b; color: var(--text); font-size: clamp(1rem, 5vw, 2rem); font-weight: 700; }
.schulte button.done { opacity: .25; }
.hanoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; height: 280px; }
.peg { position: relative; display: flex; flex-direction: column-reverse; align-items: center; padding-bottom: 12px; border-radius: 10px; border: 1px solid transparent; background: none; color: inherit; }
.peg::before { content: ''; position: absolute; bottom: 12px; top: 20px; width: 8px; border-radius: 4px; background: rgba(155, 107, 255, .6); }
.peg::after { content: ''; position: absolute; bottom: 4px; left: 6%; right: 6%; height: 8px; border-radius: 4px; background: rgba(155, 107, 255, .6); }
.peg.sel { border-color: var(--yellow); }
.disk { position: relative; z-index: 1; height: 24px; border-radius: 12px; margin-top: 3px; box-shadow: 0 0 10px currentColor; transition: transform .15s; }
.disk.lift { transform: translateY(-26px); }
.slide { display: grid; gap: 6px; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; }
.slide button { border-radius: 10px; border: 1px solid rgba(255, 62, 165, .45); background: linear-gradient(160deg, #3a1a6e, #24104a); color: var(--text); font-size: clamp(1.2rem, 6vw, 2.2rem); font-weight: 700; }
.slide button.blank { visibility: hidden; }
.slide button.home { border-color: var(--lime); }
.memnum { text-align: center; font-size: clamp(2rem, 9vw, 4rem); font-weight: 700; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 16px rgba(46, 242, 255, .6); min-height: 1.5em; word-break: break-all; }
.snake-cv { width: 100%; max-width: 640px; display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; background: #0d0520; touch-action: none; }
.dpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 48px); gap: 6px; justify-content: center; }
.dpad button { border-radius: 10px; border: 1px solid var(--line); background: #1f0f3b; color: var(--text); font-size: 1.3rem; }
.match { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; width: 100%; max-width: 560px; margin: 0 auto; perspective: 800px; }
.mcard { aspect-ratio: .9; border: 0; padding: 0; background: none; position: relative; transform-style: preserve-3d; transition: transform .35s; }
.mcard.open { transform: rotateY(180deg); }
.mcard span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; font-weight: 700; font-size: clamp(.95rem, 3.4vw, 1.4rem); }
.mcard .back { background: repeating-linear-gradient(45deg, #3a1a6e 0 10px, #2a1450 10px 20px); border: 1px solid rgba(255, 62, 165, .4); }
.mcard .front { background: #1f0f3b; border: 1px solid var(--cyan); transform: rotateY(180deg); color: var(--text); }
.mcard.done .front { border-color: var(--lime); color: var(--lime); }
.magic { display: grid; gap: 6px; width: 100%; margin: 0 auto; }
.magic button { aspect-ratio: 1; border-radius: 10px; border: 1px dashed rgba(46, 242, 255, .5); background: #1f0f3b; color: var(--text); font-size: clamp(1.4rem, 6vw, 2.4rem); font-weight: 700; }
.magic button.filled { border-style: solid; border-color: var(--pink); }
.magic .sum { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.magic .sum.ok { color: var(--lime); text-shadow: 0 0 8px rgba(182, 255, 59, .7); }
.tray { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.tray button { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--pink); background: #2a1450; color: var(--text); font-size: 1.4rem; font-weight: 700; }
.tray button.on { background: var(--pink); }
.tray button:disabled { opacity: .2; }
