/* Rook & Roll — concert-poster look.
   VOICE: loud, friendly, a gig poster for chess.
   IDEA: the site is a rock show — Rocco the rook headlines, the board is the stage floor.
   PICTURE: Rocco on a spotlit stage whose floor is a chessboard.
   COLOUR: stage ink + hot red bands, electric yellow sticker accents.
   TYPE: Bungee for shouting, Rubik for talking. */

:root {
  --ink: #0e0c12;
  --bg: #16131b;
  --panel: #201c27;
  --panel2: #2a2533;
  --line: #3a3346;
  --text: #f7f2e9;
  --muted: #aba3b8;
  --yellow: #ffd23f;
  --yellow2: #ffe27a;
  --red: #ff4d5e;
  --red-deep: #d92f45;
  --good: #3ddc84;
  --bad: #ff5c6c;
  --blue: #59c3ff;
  --radius: 16px;
  --display: 'Bungee', 'Arial Black', Impact, sans-serif;
  --body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* board & pieces (overridden by Customize) */
  --sq-light: #ecdcc0;
  --sq-dark: #a97c56;
  --pw: #fbfaf6;
  --pws: #2a2a2a;
  --pb: #23211f;
  --pbs: #23211f;
  --pscale: 1;
  --sq-last: rgba(255, 210, 63, 0.5);
  --sq-sel: rgba(61, 220, 132, 0.55);
}

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  min-height: 100vh;
  overflow-x: clip;
}
a { color: var(--yellow); text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 0.4em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.3px; }
h1 { font-size: clamp(30px, 4.2vw, 50px); }
h2 { font-size: clamp(20px, 2.2vw, 26px); }
h3 { font-size: 18px; font-weight: 800; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(3vw, 16px);
  background: rgba(14, 12, 18, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #000;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand .logo { width: 44px; height: 50px; flex: none; transition: transform 0.2s; }
.brand:hover .logo { transform: rotate(-8deg) scale(1.05); }
.brand .word { font-family: var(--display); font-size: 21px; line-height: 1; white-space: nowrap; }
.brand .word i { font-style: normal; color: var(--red); }
.brand small { display: block; font-family: var(--body); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { padding: 9px 13px; border-radius: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--ink); background: var(--yellow); }
.top-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  min-width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--panel); cursor: pointer; display: grid; place-items: center; font-size: 18px; padding: 0 8px;
}
.icon-btn:hover { border-color: var(--yellow); }

main { max-width: 1240px; margin: 0 auto; padding: 26px max(3vw, 16px) 80px; }

/* ---------- Buttons & basics ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--panel2);
  cursor: pointer; font-weight: 700; white-space: nowrap;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s, border-color 0.15s;
}
.btn:hover { border-color: #5a5068; background: #322c3d; }
.btn:active { transform: translate(2px, 2px); }
.btn.primary {
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--red);
}
.btn.primary:hover { background: var(--yellow2); box-shadow: 5px 5px 0 var(--red); }
.btn.primary:active { box-shadow: 1px 1px 0 var(--red); }
.btn.hot { background: var(--red); color: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn.hot:hover { background: #ff6573; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.gold { color: var(--ink); background: var(--yellow); border-color: var(--ink); }
.pill.green { color: #a9f5c8; border-color: rgba(61, 220, 132, 0.5); background: rgba(61, 220, 132, 0.12); }
.pill.red { color: #fff; background: var(--red); border-color: var(--ink); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 38px 0 16px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.page-head { margin: 4px 0 22px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); max-width: 640px; }

/* ---------- Rocco ---------- */
.rocco { display: block; width: 100%; height: 100%; overflow: visible; }
.rocco .glint { animation: glint 4s ease-in-out infinite; }
@keyframes glint { 0%, 70%, 100% { opacity: 0; } 80% { opacity: 1; } }
.talking .rocco { animation: bop 0.32s ease-in-out 4 alternate; transform-origin: 50% 100%; }
@keyframes bop { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-3px); } }

.coach { display: flex; gap: 12px; align-items: flex-start; }
.coach .avatar { flex: none; width: 52px; height: 60px; }
.coach .bubble {
  position: relative; background: var(--panel2); border: 2px solid var(--line);
  border-radius: 4px 16px 16px 16px; padding: 12px 14px; flex: 1;
}
.coach .bubble .who { font-family: var(--display); font-size: 12px; color: var(--yellow); display: block; margin-bottom: 2px; }
.read-aloud { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 0 0; }
.read-aloud:hover { color: var(--yellow); }

/* Floating coach dock */
.dock-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 66px; height: 66px; border-radius: 50%; padding: 6px 8px 2px;
  background: var(--red); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; transition: transform 0.15s;
}
.dock-btn:hover { transform: translateY(-3px) rotate(-4deg); }
.dock-btn .dot { position: absolute; top: -3px; right: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); display: none; }
.dock-btn.unread .dot { display: block; }
.dock-pop {
  position: fixed; right: 96px; bottom: 30px; z-index: 89; max-width: min(300px, calc(100vw - 120px));
  background: var(--text); color: var(--ink); font-weight: 600; padding: 11px 14px; border-radius: 16px 16px 4px 16px;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: pop 0.25s cubic-bezier(.3, 1.6, .5, 1);
  cursor: pointer;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.dock {
  position: fixed; right: 18px; bottom: 96px; z-index: 95; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 130px));
  background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--red);
  display: flex; flex-direction: column; overflow: hidden; animation: pop 0.2s ease-out;
}
.dock.hidden { display: none; }
.dock-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--red); color: #fff; border-bottom: 3px solid var(--ink); }
.dock-head .avatar { width: 40px; height: 46px; flex: none; }
.dock-head b { font-family: var(--display); font-weight: 400; font-size: 18px; display: block; line-height: 1; }
.dock-head small { opacity: 0.9; }
.dock-head .sp { flex: 1; }
.dock-head button { background: rgba(0, 0, 0, 0.22); border: 0; color: #fff; border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 17px; }
.dock-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.msg.r { background: var(--panel2); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
.msg.u { background: var(--yellow); color: var(--ink); font-weight: 600; border-top-right-radius: 4px; align-self: flex-end; }
.dock-chips { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; flex: none; scrollbar-width: none; }
.dock-chips button { flex: none; padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); }
.dock-chips button:hover { border-color: var(--yellow); }
.dock-form { display: flex; gap: 8px; padding: 10px 12px 12px; flex: none; }
.dock-form input { flex: 1; padding: 11px 13px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--body); }
.dock-form input:focus { border-color: var(--yellow); outline: none; }

/* ---------- Home ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: center;
  padding: clamp(24px, 4vw, 46px); border-radius: 26px; overflow: hidden;
  background: var(--red); color: var(--ink); border: 3px solid var(--ink); box-shadow: 8px 8px 0 #000;
}
.hero::before { /* halftone dots */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.18;
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.6px); background-size: 14px 14px;
  mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
}
.hero > * { position: relative; }
.hero h1 { font-size: clamp(38px, 6vw, 74px); line-height: 0.98; margin: 14px 0 14px; color: var(--ink); }
.hero h1 span { color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.hero p { font-size: 18px; max-width: 520px; color: #2a0b10; font-weight: 500; margin: 0; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn { border-color: var(--ink); }
.hero .btn:not(.primary) { background: var(--ink); color: var(--text); }
.hero .btn.primary { box-shadow: 4px 4px 0 var(--ink); }
.hero .pill { background: var(--ink); color: var(--yellow); border-color: var(--ink); }

.stage { position: relative; height: clamp(300px, 34vw, 420px); }
.stage .beam { position: absolute; top: -60px; width: 46%; height: 140%; background: linear-gradient(180deg, rgba(255, 240, 180, 0.55), rgba(255, 240, 180, 0)); filter: blur(2px); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); mix-blend-mode: screen; }
.stage .beam.l { left: 6%; transform: rotate(14deg); animation: sweep 6s ease-in-out infinite alternate; }
.stage .beam.r { right: 6%; transform: rotate(-14deg); animation: sweep 7s ease-in-out infinite alternate-reverse; }
@keyframes sweep { from { transform: rotate(18deg); } to { transform: rotate(4deg); } }
.stage .floor { position: absolute; left: 50%; bottom: -8%; width: 92%; transform: translateX(-50%) perspective(700px) rotateX(58deg); transform-origin: 50% 100%; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 30px 40px rgba(0, 0, 0, 0.45); }
.stage .floor .mini { border-radius: 4px; }
.stage .star { position: absolute; left: 50%; bottom: 20%; width: clamp(130px, 15vw, 190px); transform: translateX(-50%); filter: drop-shadow(6px 8px 0 rgba(0, 0, 0, 0.35)); animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateX(-50%) translateY(-8px) rotate(-2deg); } }
.stage .shout {
  position: absolute; right: 0; top: 4%; max-width: 230px; background: var(--text); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 700; box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(3deg);
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.stat { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .v { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.stat .v small { font-family: var(--body); font-size: 15px; color: var(--muted); }
.stat .l { color: var(--muted); font-size: 14px; }
.stat .bar { height: 8px; border-radius: 9px; background: var(--panel2); margin-top: 10px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--yellow); border-radius: 9px; }

/* ticket cards */
.tickets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ticket {
  position: relative; cursor: pointer; padding: 20px 18px 18px; border-radius: 16px; color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000; transition: transform 0.12s, box-shadow 0.12s;
  display: flex; flex-direction: column; gap: 6px; min-height: 190px;
}
.ticket:hover { transform: translate(-2px, -3px) rotate(-0.6deg); box-shadow: 8px 9px 0 #000; }
.ticket::after { /* perforation */
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 54px; border-top: 3px dashed rgba(14, 12, 18, 0.35);
}
.ticket .ico { font-size: 34px; line-height: 1; }
.ticket h3 { font-family: var(--display); font-weight: 400; font-size: 20px; margin: 4px 0 0; }
.ticket p { margin: 0; font-size: 14.5px; font-weight: 500; opacity: 0.85; }
.ticket .stub { margin-top: auto; padding-top: 18px; font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; }
.ticket.t1 { background: var(--yellow); }
.ticket.t2 { background: #7ce7c4; }
.ticket.t3 { background: #ff9eb0; }
.ticket.t4 { background: #9fd1ff; }

.duo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.potd { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; }

/* ---------- Lessons (setlist) ---------- */
.setlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.track {
  cursor: pointer; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; transition: transform 0.12s, border-color 0.15s, box-shadow 0.12s;
}
.track:hover { transform: translateX(3px); border-color: var(--yellow); box-shadow: -4px 0 0 var(--yellow); }
.track .ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; background: var(--panel2); border: 2px solid var(--line); }
.track.done .ico { background: var(--good); border-color: var(--ink); color: var(--ink); }
.track .no { font-family: var(--display); font-size: 12px; color: var(--red); }
.track h3 { margin: 0 0 2px; font-size: 17px; }
.track p { margin: 0; color: var(--muted); font-size: 14px; }
.track .len { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; font-weight: 700; text-align: right; }

/* ---------- Trainer layout ---------- */
.trainer { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 26px; align-items: start; }
.board-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.board-frame { width: min(100%, calc(100vh - 150px), 680px); padding: 10px; background: var(--ink); border-radius: 14px; border: 2px solid #000; box-shadow: 6px 6px 0 var(--red); }
.trainer.game .board-frame, .trainer.game .player-bar, .trainer.game .rush-target { width: min(100%, calc(100vh - 270px), 640px); }
.trainer.game .board-col { gap: 8px; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--yellow); }
.steps { display: flex; gap: 5px; }
.steps i { flex: 1; height: 8px; border-radius: 9px; background: var(--panel2); }
.steps i.done { background: var(--good); }
.steps i.cur { background: var(--yellow); }
.lesson-text { font-size: 16px; line-height: 1.6; }
.lesson-text b { color: var(--yellow); }
.feedback { border-radius: 12px; padding: 12px 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; background: var(--panel2); }
.feedback.good { background: rgba(61, 220, 132, 0.15); color: #a9f5c8; }
.feedback.bad { background: rgba(255, 92, 108, 0.15); color: #ffb3bb; }
.feedback.info { background: rgba(89, 195, 255, 0.12); color: #b8e3ff; }
.feedback .side { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #888; flex: none; }
.feedback .side.w { background: #fff; }
.feedback .side.b { background: #111; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.spread { justify-content: space-between; }

/* ---------- Puzzles ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 7px 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--panel); cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.active { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.chip .cnt { font-size: 12px; opacity: 0.7; margin-left: 3px; }
.level-chips .chip { font-size: 15px; min-height: 44px; padding: 8px 16px; }
.puzzle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.pz-card { cursor: pointer; padding: 10px; display: flex; flex-direction: column; gap: 8px; transition: transform 0.12s, border-color 0.15s; }
.pz-card:hover { transform: translateY(-3px) rotate(-0.5deg); border-color: var(--yellow); }
.pz-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.pz-card .t { font-weight: 800; font-size: 14.5px; }
.pz-card.solved .mini { opacity: 0.65; }
.rating-big { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.delta { font-weight: 800; margin-left: 6px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.band-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(20px, 3vw, 32px);
  border-radius: 22px; border: 3px solid var(--ink); box-shadow: 6px 6px 0 #000; color: var(--ink);
}
.band-head h1 { color: var(--ink); margin: 0 0 6px; }
.band-head p { margin: 0 0 16px; font-weight: 500; max-width: 560px; }
.band-head .muted { color: rgba(14, 12, 18, 0.7); }
.band-head.yellow { background: var(--yellow); }
.band-head.mint { background: #7ce7c4; }
.band-head.blue { background: #9fd1ff; }
.band-head.pink { background: #ff9eb0; }
.band-head .btn.primary { box-shadow: 4px 4px 0 var(--ink); background: var(--text); }

/* ---------- Play ---------- */
.setup { max-width: 820px; margin: 0 auto; }
.mode-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.mode { cursor: pointer; text-align: left; padding: 22px; border-radius: var(--radius); border: 3px solid var(--line); background: var(--panel); transition: transform 0.12s; }
.mode:hover { transform: translateY(-2px); }
.mode.active { border-color: var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 5px 5px 0 var(--red); }
.mode.active .muted { color: rgba(14, 12, 18, 0.75); }
.mode .ico { font-size: 34px; }
.mode h3 { margin: 6px 0 4px; font-family: var(--display); font-weight: 400; font-size: 20px; }
.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 14px; color: var(--muted); font-weight: 700; }
.field input, .field select, select.input {
  min-height: 46px; padding: 11px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--body);
}
.field input:focus, .field select:focus { border-color: var(--yellow); outline: none; }
.seg { display: flex; background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--yellow); color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; min-height: 40px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--yellow); flex: none; }
.adaptive-note { background: var(--panel2); border: 2px dashed var(--yellow); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.adaptive-note .avatar { width: 44px; height: 50px; flex: none; }

.player-bar { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; }
.player-bar.active { border-color: var(--yellow); box-shadow: 3px 3px 0 var(--red); }
.player-bar .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #888; flex: none; }
.player-bar .dot.w { background: #fff; }
.player-bar .dot.b { background: #111; }
.player-bar .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .caps { color: var(--muted); font-size: 18px; letter-spacing: -3px; flex: 1; overflow: hidden; white-space: nowrap; }
.player-bar .caps .pc { position: static; font-size: 18px; width: auto; height: auto; display: inline; background: none !important; }
.player-bar .caps b { letter-spacing: 0; font-size: 13px; margin-left: 8px; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; font-family: var(--display); font-size: 19px; padding: 4px 12px; border-radius: 10px; background: var(--bg); min-width: 92px; text-align: center; white-space: nowrap; }
.clock.run { background: var(--yellow); color: var(--ink); }
.clock.low { background: var(--red); color: #fff; }
.status { font-size: 18px; font-weight: 800; }
.moves { max-height: 260px; overflow: auto; background: var(--bg); border-radius: 12px; border: 2px solid var(--line); }
.moves table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.moves td { padding: 5px 10px; }
.moves td.n { color: var(--muted); width: 42px; text-align: right; background: rgba(255, 255, 255, 0.02); }
.moves td.m { cursor: pointer; font-weight: 700; border-radius: 6px; }
.moves td.m:hover { background: var(--panel2); }
.moves td.m.cur { background: var(--yellow); color: var(--ink); }
.moves .empty { padding: 14px; color: var(--muted); text-align: center; }
.grid-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.viewing { font-size: 14px; color: var(--yellow); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.coach-live { display: flex; gap: 12px; align-items: flex-start; background: var(--panel2); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.coach-live .avatar { width: 46px; height: 52px; flex: none; }
.coach-live .say { font-weight: 600; font-size: 15px; min-height: 44px; }
.coach-live .say .tag { display: inline-block; font-family: var(--display); font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-right: 6px; color: var(--ink); background: var(--yellow); }
.coach-live .say .tag.blunder, .coach-live .say .tag.mistake { background: var(--red); color: #fff; }
.coach-live .say .tag.great, .coach-live .say .tag.best { background: var(--good); }

/* ---------- Board ---------- */
.board { position: relative; width: 100%; aspect-ratio: 1; user-select: none; -webkit-user-select: none; touch-action: none; border-radius: 6px; overflow: hidden; container-type: inline-size; }
.board .squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.sq { position: relative; }
.sq.light, .mini .light { background: var(--sq-light); }
.sq.dark, .mini .dark { background: var(--sq-dark); }
.sq.last::before { content: ''; position: absolute; inset: 0; background: var(--sq-last); }
.sq.sel::before { content: ''; position: absolute; inset: 0; background: var(--sq-sel); }
.sq.mark::after { content: ''; position: absolute; inset: 0; background: rgba(89, 160, 255, 0.45); box-shadow: inset 0 0 0 3px rgba(40, 100, 220, 0.6); }
.sq.hint::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 5px rgba(61, 220, 132, 0.95); animation: pulse 0.9s ease-in-out infinite alternate; }
.sq.check { background: radial-gradient(circle, #ff4b4b 0%, #e02a2a 30%, rgba(200, 0, 0, 0.35) 60%, transparent 80%), var(--sq-dark); }
.sq.light.check { background: radial-gradient(circle, #ff4b4b 0%, #e02a2a 30%, rgba(200, 0, 0, 0.35) 60%, transparent 80%), var(--sq-light); }
.sq.dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20, 30, 20, 0.3); z-index: 3; pointer-events: none; }
.sq.cap::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(20, 30, 20, 0.32); z-index: 3; pointer-events: none; }
body.no-dots .sq.dot::after, body.no-dots .sq.cap::after { display: none; }
body.no-last .sq.last::before { display: none; }
.sq.hover { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6); }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 1; } }
.coord { position: absolute; font-size: max(9px, 2.3cqw); font-weight: 800; z-index: 2; pointer-events: none; opacity: 0.85; }
.coord.file { right: 4%; bottom: 1%; }
.coord.rank { left: 4%; top: 2%; }
.sq.light .coord { color: var(--sq-dark); }
.sq.dark .coord { color: var(--sq-light); }

.pc {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', 'DejaVu Sans', 'Arial Unicode MS', serif;
  font-size: calc(10cqw * var(--pscale)); line-height: 1; z-index: 4; pointer-events: none; will-change: transform;
}
.mini .pc { font-size: calc(10.5cqw * var(--pscale)); }
.pc-w { color: var(--pw); -webkit-text-stroke: 0.06em var(--pws); paint-order: stroke fill; text-shadow: 0 0.04em 0.05em rgba(0, 0, 0, 0.45); }
.pc-b { color: var(--pb); -webkit-text-stroke: 0.03em var(--pbs); paint-order: stroke fill; text-shadow: 0 0.03em 0.04em rgba(255, 255, 255, 0.22), 0 0.04em 0.06em rgba(0, 0, 0, 0.4); }
/* piece styles */
body[data-pieces='sticker'] .pc-w { -webkit-text-stroke: 0.1em var(--pws); text-shadow: 0.05em 0.06em 0 rgba(0, 0, 0, 0.55); }
body[data-pieces='sticker'] .pc-b { -webkit-text-stroke: 0.1em var(--pbs); text-shadow: 0.05em 0.06em 0 rgba(0, 0, 0, 0.55); }
body[data-pieces='neon'] .pc-w { -webkit-text-stroke: 0; text-shadow: 0 0 0.05em #fff, 0 0 0.16em var(--pw), 0 0 0.36em var(--pw); }
body[data-pieces='neon'] .pc-b { -webkit-text-stroke: 0; text-shadow: 0 0 0.05em #fff, 0 0 0.16em var(--pb), 0 0 0.36em var(--pb); }
body[data-pieces='flat'] .pc-w, body[data-pieces='flat'] .pc-b { -webkit-text-stroke: 0; text-shadow: none; }
body[data-pieces='flat'] .pc-w { filter: drop-shadow(0 0 0.02em var(--pws)) drop-shadow(0 0 0.02em var(--pws)); }
body[data-pieces='letters'] .pc { font-family: var(--display); font-size: calc(4.6cqw * var(--pscale)); -webkit-text-stroke: 0; text-shadow: none; }
body[data-pieces='letters'] .mini .pc { font-size: calc(4.8cqw * var(--pscale)); }
body[data-pieces='letters'] .pc-w { color: var(--pws); background: radial-gradient(circle, var(--pw) 0 33%, var(--pws) 33.5% 37%, transparent 37.5%); }
body[data-pieces='letters'] .pc-b { color: var(--pw); background: radial-gradient(circle, var(--pb) 0 33%, var(--pbs) 33.5% 37%, transparent 37.5%); }
.pc.ghosted { opacity: 0.3; }
.board.interactive .squares { cursor: pointer; }
.drag-ghost { position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; }
.drag-ghost .pc { transform: scale(1.15); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.board .arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; }
.promo { position: absolute; inset: 0; z-index: 40; background: rgba(10, 10, 12, 0.6); display: grid; place-items: center; }
.promo.hidden { display: none; }
.promo-box { background: var(--panel); padding: 16px; border-radius: 14px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--red); text-align: center; }
.promo-title { font-weight: 800; margin-bottom: 10px; }
.promo-row { display: flex; gap: 8px; }
.promo-btn { position: relative; width: 13cqw; height: 13cqw; border-radius: 10px; border: 2px solid var(--line); background: var(--sq-light); cursor: pointer; }
.promo-btn:hover { background: var(--yellow); }
.mini { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; container-type: inline-size; width: 100%; }
.mini .sq { position: relative; }

/* ---------- Customize ---------- */
.custom { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 26px; align-items: start; }
.custom .preview { position: sticky; top: 90px; }
.opt-group { display: flex; flex-direction: column; gap: 10px; }
.opt-group + .opt-group { border-top: 2px solid var(--line); padding-top: 16px; }
.opt-group h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--yellow); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.swatch { cursor: pointer; border: 2px solid var(--line); border-radius: 12px; padding: 5px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.swatch:hover { border-color: #5a5068; }
.swatch.active { border-color: var(--yellow); color: var(--text); box-shadow: 3px 3px 0 var(--red); }
.swatch .chk { width: 100%; aspect-ratio: 1; border-radius: 7px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.swatch .chk i:nth-child(1), .swatch .chk i:nth-child(4) { background: var(--l); }
.swatch .chk i:nth-child(2), .swatch .chk i:nth-child(3) { background: var(--d); }
.swatch .pcs { width: 100%; aspect-ratio: 1.4; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 2px; background: #8a7b67; font-size: 24px; position: relative; container-type: inline-size; }
.pv { display: inline-grid; place-items: center; font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', 'DejaVu Sans', serif; font-size: 28px; line-height: 1; paint-order: stroke fill; }
.color-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.color-row label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.color-row input[type='color'] { width: 44px; height: 36px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); padding: 2px; cursor: pointer; }
input[type='range'] { width: 100%; accent-color: var(--yellow); }

/* ---------- Mini-games ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.game-card { cursor: pointer; display: flex; gap: 16px; align-items: flex-start; transition: transform 0.12s, border-color 0.15s, box-shadow 0.12s; }
.game-card:hover { transform: translate(-2px, -2px); border-color: var(--yellow); box-shadow: 5px 5px 0 var(--red); }
.game-card .ico { flex: none; width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; font-size: 36px; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--red); }
.game-card h3 { margin: 2px 0 6px; font-family: var(--display); font-weight: 400; font-size: 19px; }
.game-card p { margin: 8px 0; color: var(--muted); font-size: 14.5px; }
.secret-status { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; font-weight: 700; font-size: 14px; }
.secret-status > div { background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.secret-status .pill { font-size: 11.5px; padding: 2px 7px; }
.rules { background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; color: var(--muted); }
.rules summary { cursor: pointer; font-weight: 800; color: var(--text); min-height: 28px; }
.rules ol { margin: 8px 0 0; padding-left: 20px; }
.rules li { margin-bottom: 4px; }
.rush-target { width: min(100%, calc(100vh - 260px), 640px); text-align: center; font-family: var(--display); font-size: 36px; padding: 6px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--red); }
.rush-target b { font-weight: 400; }
.rush-target .muted { color: rgba(14, 12, 18, 0.6); font-size: 22px; }
.sq.flash-good::after { content: ''; position: absolute; inset: 0; background: rgba(61, 220, 132, 0.8); animation: flash 0.45s ease-out forwards; }
.sq.flash-bad::after { content: ''; position: absolute; inset: 0; background: rgba(255, 77, 94, 0.8); animation: flash 0.45s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }

/* ---------- Modal, toast, confetti ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 4, 8, 0.7); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade 0.15s; }
.modal { background: var(--panel); border: 3px solid var(--ink); border-radius: 22px; padding: 26px; max-width: 440px; width: 100%; box-shadow: 8px 8px 0 var(--red); text-align: center; animation: pop 0.25s cubic-bezier(.3, 1.5, .5, 1); }
.modal .big { font-size: 50px; line-height: 1.1; }
.modal .big .avatar { width: 84px; height: 96px; margin: 0 auto; }
.modal h2 { margin: 8px 0; }
.modal .row { justify-content: center; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--ink); border: 3px solid var(--ink); padding: 10px 18px; border-radius: 12px; z-index: 120; box-shadow: 4px 4px 0 var(--red); font-weight: 700; animation: fade 0.2s; max-width: calc(100vw - 40px); }
.confetti { position: fixed; top: -10px; width: 9px; height: 14px; z-index: 130; pointer-events: none; border-radius: 2px; }

footer { text-align: center; color: var(--muted); font-size: 14px; padding: 26px 20px 90px; border-top: 2px solid var(--line); }
footer b { font-family: var(--display); font-weight: 400; color: var(--text); }
footer p { margin: 0 auto 6px; max-width: 760px; }
footer .about { font-size: 13px; opacity: 0.8; }
.seo-intro { max-width: 760px; margin: 20px auto; }
.seo-intro h1 { margin-bottom: 12px; }
.seo-intro h2 { margin-top: 24px; font-size: 20px; }
.seo-intro p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand small { display: none; }
  .nav { margin-left: 6px; }
  .brand .word { font-size: 18px; }
  .nav a { padding: 9px 10px; }
}
@media (max-width: 980px) {
  .trainer, .custom { grid-template-columns: minmax(0, 1fr); }
  .custom .preview { position: static; }
  .board-frame { width: min(100%, 620px); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .stage { height: 300px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main { padding: 16px 12px 60px; }
  .topbar { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 7px 9px; font-size: 14px; }
  .brand .word { font-size: 18px; }
  .hero { padding: 22px; box-shadow: 5px 5px 0 #000; }
  .stage { height: 240px; }
  .stage .shout { font-size: 14px; max-width: 170px; }
  .tickets { grid-template-columns: minmax(0, 1fr); }
  .ticket { min-height: 0; }
  .mode-pick, .form { grid-template-columns: minmax(0, 1fr); }
  .potd { grid-template-columns: 110px minmax(0, 1fr); }
  .panel { padding: 14px; }
  .board-frame { padding: 6px; box-shadow: 4px 4px 0 var(--red); }
  .band-head { grid-template-columns: minmax(0, 1fr); }
  .dock-btn { width: 58px; height: 58px; right: 12px; bottom: 12px; }
  .dock { right: 12px; bottom: 80px; }
  .dock-pop { right: 80px; bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Daily Puzzle, Puzzle Rush, Trophies, Game review ---------- */
.tries { display: flex; gap: 4px; flex-wrap: wrap; min-height: 30px; align-items: center; font-size: 22px; }
.daily-result { text-align: center; background: var(--bg); border: 2px dashed var(--yellow); border-radius: 16px; padding: 16px; }
.big-tries { font-size: 34px; letter-spacing: 2px; line-height: 1.2; }
.share-text { width: 100%; font: 15px/1.5 var(--body); background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 10px; resize: none; }

.prush-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 16px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--red); font-family: var(--display); font-size: 22px; }
.trainer.game .prush-bar { width: min(100%, calc(100vh - 230px), 640px); }
.prush-bar b { font-weight: 400; font-variant-numeric: tabular-nums; }
.prush-bar.low { background: var(--red); color: #fff; animation: pulse 0.6s ease-in-out infinite alternate; }
.prush-bar .strikes { display: flex; gap: 6px; }
.prush-bar .strikes i { font-style: normal; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; background: rgba(14, 12, 18, 0.12); color: rgba(14, 12, 18, 0.3); }
.prush-bar .strikes i.on { background: var(--ink); color: var(--red); }
.rush-score { font-family: var(--display); font-size: 64px; line-height: 1; color: var(--yellow); }
.rush-score small { font-family: var(--body); font-size: 18px; color: var(--muted); margin-left: 6px; }
.rush-results { display: flex; flex-wrap: wrap; gap: 5px; min-height: 18px; }
.rush-results i { width: 18px; height: 18px; border-radius: 5px; }
.rush-results i.ok { background: var(--good); }
.rush-results i.no { background: var(--red); }

.ach-pop { position: fixed; top: 82px; left: 50%; transform: translateX(-50%); z-index: 140; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--red); animation: drop 0.4s cubic-bezier(.3, 1.5, .5, 1); max-width: calc(100vw - 30px); }
.ach-pop.out { opacity: 0; transform: translate(-50%, -20px); transition: 0.35s; }
.ach-pop .i { font-size: 32px; line-height: 1; }
.ach-pop small { display: block; font-weight: 700; font-size: 12px; opacity: 0.75; }
.ach-pop b { font-family: var(--display); font-weight: 400; font-size: 18px; }
@keyframes drop { from { transform: translate(-50%, -40px); opacity: 0; } }

.rank-strip { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 18px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color 0.15s, transform 0.12s; }
.rank-strip:hover { border-color: var(--yellow); transform: translateY(-2px); }
.rank-strip .rk-ico { font-size: 36px; line-height: 1; }
.rank-strip .rk-main { flex: 1; }
.rank-strip .rk-main b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.rank-strip .bar, .xp-bar, .mini-bar { display: block; height: 10px; border-radius: 9px; background: var(--panel2); margin-top: 8px; overflow: hidden; }
.rank-strip .bar i, .xp-bar i, .mini-bar i { display: block; height: 100%; background: var(--yellow); border-radius: 9px; transition: width 0.3s; }
.band-head .xp-bar { background: rgba(14, 12, 18, 0.18); height: 14px; max-width: 520px; border: 2px solid var(--ink); }
.band-head .xp-bar i { background: var(--red); }
.rank-strip .rk-ach { text-align: right; font-weight: 800; }
.rank-strip .rk-ach small { display: block; font-weight: 600; color: var(--muted); font-size: 13px; }
.ranks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.rank { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; opacity: 0.55; }
.rank span { font-size: 28px; }
.rank b { font-size: 13px; }
.rank small { color: var(--muted); font-size: 12px; }
.rank.past { opacity: 0.9; }
.rank.now { opacity: 1; background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--red); }
.rank.now small { color: rgba(14, 12, 18, 0.7); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.ach .ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--panel2); border: 2px solid var(--line); filter: grayscale(1); opacity: 0.6; }
.ach.got { border-color: rgba(255, 210, 63, 0.6); }
.ach.got .ico { filter: none; opacity: 1; background: var(--yellow); border-color: var(--ink); box-shadow: 3px 3px 0 var(--red); }
.ach h3 { margin: 0 0 2px; font-size: 16px; }
.ach p { margin: 0 0 6px; color: var(--muted); font-size: 13.5px; }
.ach .mini-bar { height: 6px; margin: 4px 0 2px; }
.xp-table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.xp-table td { padding: 4px 6px; border-top: 1px solid var(--line); }
.xp-table td:last-child { text-align: right; }

.tag { display: inline-block; font-family: var(--display); font-size: 11px; padding: 2px 7px; border-radius: 6px; color: var(--ink); background: var(--yellow); white-space: nowrap; }
.tag.best { background: var(--good); }
.tag.good { background: #9fd1ff; }
.tag.inaccuracy { background: var(--yellow); }
.tag.mistake { background: #ff9a5c; }
.tag.blunder { background: var(--red); color: #fff; }
.tag b { font-family: var(--body); font-weight: 800; margin-left: 2px; }
.rv-acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rv-acc > div { background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; text-align: center; }
.rv-acc > div.me { border-color: var(--yellow); }
.rv-acc b { display: block; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--yellow); }
.rv-acc small { color: var(--muted); font-weight: 700; font-size: 13px; }
.rv-body { display: flex; flex-direction: column; gap: 12px; }
.rv-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.moments { display: flex; flex-direction: column; gap: 8px; }
.moment { background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.moment.fixed { border-color: var(--good); }
.moment.fixed b::after { content: ' ✓ fixed'; color: var(--good); font-size: 13px; }
.dotk { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: transparent; }
.dotk.inaccuracy { background: var(--yellow); }
.dotk.mistake { background: #ff9a5c; }
.dotk.blunder { background: var(--red); }
.dotk.best { background: var(--good); }
.rv-moves { max-height: 220px; }
#trophyBtn.active, #customBtn.active { border-color: var(--yellow); background: var(--yellow); }

@media (max-width: 980px) {
  .ranks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rank-strip { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .rank-strip .rk-ach { text-align: left; }
  .prush-bar { font-size: 18px; padding: 6px 10px; }
  .prush-bar .strikes i { width: 24px; height: 24px; font-size: 14px; }
  .ach-pop { top: 70px; }
}

/* ---------- Soundcheck (Elo test) & My Plan ---------- */
.sc-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--red); font-family: var(--display); font-size: 18px; margin-bottom: 12px; }
.sc-bar b { font-weight: 400; font-variant-numeric: tabular-nums; }
.sc-bar.low { background: var(--red); color: #fff; }
.sc-time { flex: 1; height: 10px; border-radius: 9px; background: rgba(14, 12, 18, 0.15); overflow: hidden; }
.sc-time i { display: block; height: 100%; background: var(--ink); border-radius: 9px; transition: width 0.25s linear; }
.sc-dots i.now { background: var(--yellow); }
.sc-dots i:not(.ok):not(.no):not(.now) { background: var(--panel2); }
.sc-exp { display: grid; gap: 8px; }
.sc-exp .btn { justify-content: flex-start; text-align: left; }
.sc-exp .btn span { font-size: 20px; margin-right: 4px; }
.sc-know { background: var(--panel2); border-radius: 12px; padding: 10px 14px; }
.sc-know summary { cursor: pointer; font-weight: 700; }
.sc-know-row { display: flex; gap: 8px; margin: 10px 0 8px; flex-wrap: wrap; }
.sc-know-row input, .sc-know-row select { min-height: 38px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--text); padding: 6px 10px; font: inherit; }
.sc-know-row input { width: 110px; }
.sc-result { text-align: center; padding: 8px 0; }
.sc-elo { font-family: var(--display); font-size: 64px; line-height: 1.05; color: var(--yellow); text-shadow: 4px 4px 0 var(--red); }
.sc-result .up { color: var(--good); }
.sc-result .down { color: var(--bad); }
.skills { display: grid; gap: 8px; }
.skill { display: grid; grid-template-columns: 140px minmax(0, 1fr) 76px; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.skill .mini-bar { margin-top: 0; }
.skill.good .mini-bar i { background: var(--good); }
.skill.ok .mini-bar i { background: var(--yellow); }
.skill.weak .mini-bar i { background: var(--red); }
.skill > .muted { text-align: right; font-size: 13px; }
.plan-card { display: flex; align-items: center; gap: 18px; margin-top: 16px; cursor: pointer; border-color: var(--yellow); }
.plan-card:hover { transform: translateY(-2px); }
.plan-card .pc-ico { font-size: 44px; line-height: 1; }
.plan-card .pc-main { flex: 1; }
.plan-card h3 { margin: 8px 0 4px; }
.plan-card .pc-elo { text-align: center; min-width: 92px; padding: 8px 10px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--red); }
.plan-card .pc-elo b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.plan-card .pc-elo small { display: block; font-size: 12px; font-weight: 700; }
.plan-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.plan-how .ico { font-size: 32px; line-height: 1; }
.plan-how h3 { margin: 10px 0 6px; }
.plan-how p { margin: 0; }
.plan-bar { margin: 0 0 14px; height: 12px; }
.plan-bar i { background: var(--good); }
.plan-steps { display: grid; gap: 10px; }
.plan-step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.plan-step.next { border-color: var(--yellow); box-shadow: 4px 4px 0 var(--red); }
.plan-step.done { opacity: 0.72; }
.plan-step .ps-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--panel2); }
.plan-step.done .ps-ico { background: rgba(61, 220, 132, 0.18); color: var(--good); font-weight: 800; }
.plan-step .ps-main { flex: 1; }
.plan-step .ps-t { font-weight: 800; }
.plan-step .ps-d { font-size: 14px; margin-top: 2px; }
.plan-step .ps-prog { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.plan-step .ps-prog .mini-bar { flex: 1; margin-top: 0; max-width: 260px; }
.plan-step .ps-prog .muted { font-size: 13px; font-weight: 700; }
.elo-hist { margin-top: 16px; }
.elo-hist svg { width: 100%; height: 70px; margin-top: 8px; }
@media (max-width: 980px) {
  .plan-how { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .plan-card { flex-wrap: wrap; gap: 12px; }
  .plan-card .pc-main { flex-basis: calc(100% - 120px); }
  .plan-card > .btn { width: 100%; }
  .plan-step { flex-wrap: wrap; }
  .plan-step .ps-main { flex-basis: calc(100% - 60px); }
  .plan-step > .btn { margin-left: 60px; }
  .skill { grid-template-columns: 112px minmax(0, 1fr) 64px; font-size: 13px; }
  .sc-elo { font-size: 52px; }
  .sc-bar { font-size: 15px; padding: 7px 12px; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav a { padding: 7px 8px; }
}
