/* ============================================================================
   arcade.css — The Arcade hub + The Rope Drop game.
   Loads on top of site.css (uses its Nightfall tokens). A pixel font is used
   only for arcade marquees; gameplay text stays in the site faces for clarity.
   ========================================================================== */

:root {
  --pixel: "Press Start 2P", var(--display);
  --rd-correct: oklch(66% 0.16 150);
  --rd-present:  oklch(84% 0.130 86);   /* brand gold = "in the word" */
  --rd-absent:   oklch(40% 0.028 280);
  --rd-edge:     oklch(50% 0.045 281);
  --rd-edge-soft:oklch(40% 0.05 278);
}

/* ---------------------------------------------------------------- Arcade hub */
.arc { text-align: center; padding: clamp(10px, 4vw, 28px) 0 8px; }
.arc-marquee {
  font-family: var(--pixel); font-weight: 400; line-height: 1.15;
  font-size: clamp(22px, 6vw, 44px); color: var(--gold);
  text-shadow: 0 0 14px oklch(84% 0.13 86 / 0.55), 0 0 40px oklch(84% 0.13 86 / 0.25);
  letter-spacing: 0.02em; margin: 8px 0 0;
}
.arc-coin { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.3em; font-size: 12px; color: var(--red); }
.arc-coin .blink { animation: arc-blink 1.1s steps(1) infinite; }
@keyframes arc-blink { 50% { opacity: 0; } }
.arc-sub { color: var(--ink-soft); font-size: clamp(15px, 1.6vw, 17px); max-width: 52ch; margin: 14px auto 0; line-height: 1.5; }

.arc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 860px; margin: clamp(26px, 5vw, 44px) auto 12px; text-align: left; }
.arc-cab {
  display: flex; flex-direction: column; background: var(--paper-2); border: 1px solid var(--rd-edge);
  border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.arc-cab:hover { transform: translateY(-4px); box-shadow: 0 22px 50px oklch(8% 0.03 280 / 0.55); border-color: oklch(84% 0.13 86 / 0.5); text-decoration: none; }
.arc-screen { aspect-ratio: 16 / 10; position: relative; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, oklch(40% 0.10 300 / 0.45), transparent 60%),
    repeating-linear-gradient(0deg, oklch(18% 0.04 280) 0 2px, oklch(20% 0.045 281) 2px 4px);
  border-bottom: 1px solid var(--rd-edge); }
.arc-screen .mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.arc-screen .mini i { width: clamp(18px, 4vw, 26px); aspect-ratio: 1; border-radius: 4px; background: oklch(30% 0.05 279); border: 1px solid var(--rd-edge); }
.arc-screen .mini i.g { background: var(--rd-correct); border-color: transparent; }
.arc-screen .mini i.y { background: var(--rd-present); border-color: transparent; }
.arc-cab-b { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.arc-cab-b h2 { font-family: var(--pixel); font-size: 14px; line-height: 1.4; color: var(--ink); margin: 2px 0 4px; }
.arc-cab-b p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.45; }
.arc-tag { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 700; color: var(--gold); }
.arc-play { margin-top: auto; padding-top: 10px; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 13px; color: var(--gold); }
.arc-cab.soon { opacity: 0.62; border-style: dashed; pointer-events: none; }
.arc-cab.soon .arc-screen { filter: grayscale(0.5); }
/* Lightning Round cabinet mini-screen: two wait "bars" facing off, with a bolt */
.arc-screen-lr { background:
    radial-gradient(120% 90% at 50% 0%, oklch(40% 0.10 86 / 0.35), transparent 60%),
    repeating-linear-gradient(0deg, oklch(18% 0.04 280) 0 2px, oklch(20% 0.045 281) 2px 4px); }
.arc-screen-lr .lrmini { display: flex; align-items: flex-end; gap: 12px; position: relative; }
.arc-screen-lr .bar { width: clamp(22px, 5vw, 30px); border-radius: 5px 5px 0 0; border: 1px solid var(--rd-edge); background: oklch(40% 0.05 279); }
.arc-screen-lr .bar.b1 { height: clamp(28px, 7vw, 40px); }
.arc-screen-lr .bar.b2 { height: clamp(46px, 11vw, 64px); background: var(--rd-present); border-color: transparent; }
.arc-screen-lr .lrbolt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); font-size: clamp(20px, 5vw, 28px); filter: drop-shadow(0 0 8px oklch(84% 0.13 86 / 0.6)); }

/* ---------------------------------------------------------------- The Rope Drop */
.rd-app { max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100svh - 220px); }
.rd-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 4px 4px; border-bottom: 1px solid var(--hair); }
.rd-back { justify-self: start; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.rd-back:hover { color: var(--gold); }
.rd-title { font-family: var(--pixel); font-size: clamp(13px, 3.4vw, 18px); color: var(--gold); text-align: center; text-shadow: 0 0 12px oklch(84% 0.13 86 / 0.4); white-space: nowrap; }
.rd-actions { justify-self: end; display: flex; gap: 6px; }
.rd-actions button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rd-edge); background: var(--paper-2); color: var(--ink); font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.rd-actions button:hover { border-color: var(--gold); color: var(--gold); }
.rd-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.rd-board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; padding: 14px 0; width: min(330px, 84vw); margin: 0 auto; flex: 0 0 auto; }
.rd-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rd-tile {
  aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--rd-edge-soft);
  border-radius: 6px; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 7vw, 30px);
  text-transform: uppercase; color: var(--ink); background: transparent; user-select: none;
}
.rd-tile.rd-filled { border-color: var(--rd-edge); animation: rd-pop 0.1s ease; }
.rd-tile.rd-correct { background: var(--rd-correct); border-color: transparent; color: oklch(20% 0.03 150); }
.rd-tile.rd-present { background: var(--rd-present); border-color: transparent; color: oklch(24% 0.045 78); }
.rd-tile.rd-absent  { background: var(--rd-absent); border-color: transparent; color: oklch(90% 0.02 84); }
.rd-tile.rd-reveal { animation: rd-flip 0.5s ease; }
@keyframes rd-pop { from { transform: scale(0.9); } to { transform: scale(1); } }
@keyframes rd-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.rd-row.rd-shake { animation: rd-shake 0.5s; }
@keyframes rd-shake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-7px); } 40%,60% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .rd-tile.rd-reveal, .rd-tile.rd-filled, .rd-row.rd-shake { animation: none; } }

.rd-toast {
  position: sticky; top: 70px; z-index: 30; align-self: center; margin: 0 auto;
  background: var(--ink); color: var(--paper); font-family: var(--label); font-weight: 700;
  letter-spacing: 0.04em; font-size: 13px; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px oklch(8% 0.03 280 / 0.5);
}
.rd-toast[hidden] { display: none; }

.rd-keyboard { margin-top: auto; padding: 10px 0 16px; display: flex; flex-direction: column; gap: 7px; width: 100%; }
.rd-krow { display: flex; justify-content: center; gap: 5px; }
.rd-key {
  flex: 1 1 0; max-width: 44px; min-height: 52px; border: 0; border-radius: 7px; cursor: pointer;
  background: var(--rd-edge); color: var(--ink); font-family: var(--label); font-weight: 700; font-size: 15px;
  text-transform: uppercase; transition: background .12s, transform .05s; touch-action: manipulation;
}
.rd-key:active { transform: scale(0.94); }
.rd-key-wide { flex: 1.5 1 0; max-width: 62px; font-size: 12px; }
.rd-key.rd-correct { background: var(--rd-correct); color: oklch(20% 0.03 150); }
.rd-key.rd-present { background: var(--rd-present); color: oklch(24% 0.045 78); }
.rd-key.rd-absent  { background: var(--rd-absent); color: oklch(78% 0.02 84); }
.rd-key:disabled, .rd-key.rd-dead { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------------------- Modals */
/* High z-index + overlay scroll so the sheet always sits on top of all page chrome
   (header, Wire ticker, almanac, tip jar) and is fully reachable on short screens.
   The game scripts also lift these modals to <body> to escape any stacking context. */
.rd-modal { position: fixed; inset: 0; z-index: 1000; display: grid; overflow-y: auto; padding: 18px;
  background: oklch(10% 0.03 280 / 0.7); backdrop-filter: blur(3px); -webkit-overflow-scrolling: touch; }
.rd-modal[hidden] { display: none; }
/* margin:auto centers the sheet when it fits and keeps the top reachable when it doesn't */
.rd-sheet { position: relative; width: min(440px, 100%); margin: auto;
  background: var(--paper-2); border: 1px solid var(--rd-edge); border-radius: 16px; padding: 26px 24px 24px;
  box-shadow: 0 30px 70px oklch(6% 0.03 280 / 0.6); }
.rd-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--ink-soft); font-size: 22px; cursor: pointer; line-height: 1; }
.rd-close:hover { color: var(--gold); }
.rd-sheet h2 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 4px; }
.rd-sheet h3 { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; color: var(--muted); margin: 20px 0 10px; }
.rd-sheet p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 0 0 10px; }
.rd-leg { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 4px; }
.rd-leg-row { display: flex; align-items: center; gap: 12px; }
.rd-ex { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; font-family: var(--display); font-weight: 800; font-size: 18px; flex: none; }
.rd-ex.g { background: var(--rd-correct); color: oklch(20% 0.03 150); }
.rd-ex.y { background: var(--rd-present); color: oklch(24% 0.045 78); }
.rd-ex.b { background: var(--rd-absent); color: oklch(90% 0.02 84); }
.rd-leg-row span { font-size: 13.5px; color: var(--ink-soft); }
.rd-leg-row b { color: var(--ink); }

.rd-stats { display: flex; justify-content: space-around; gap: 8px; margin: 8px 0 4px; }
.rd-stat { text-align: center; }
.rd-stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1; }
.rd-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.rd-dist { display: flex; flex-direction: column; gap: 5px; }
.rd-distrow { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rd-distn { width: 12px; color: var(--ink-soft); font-weight: 700; font-family: var(--display); }
.rd-bar { background: var(--rd-absent); color: oklch(92% 0.02 84); font-weight: 700; font-size: 12px; text-align: right; padding: 3px 8px; border-radius: 4px; min-width: 22px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.rd-bar-hot { background: var(--rd-correct); color: oklch(20% 0.03 150); }
.rd-sharewrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }
.rd-next { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.rd-next span:first-child { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; color: var(--muted); }
.rd-next [data-rd-countdown] { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rd-sharemenu { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.rd-sh { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px; border-radius: 10px; border: 1px solid var(--rd-edge); background: var(--paper); color: var(--ink); font-family: var(--label); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s, transform .05s; }
.rd-sh:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.rd-sh:active { transform: scale(0.97); }
.rd-sh-primary { grid-column: 1 / -1; background: var(--gold); color: oklch(24% 0.045 78); border-color: transparent; font-size: 14.5px; font-weight: 800; padding: 14px; box-shadow: 0 0 22px oklch(70% 0.13 84 / 0.25); }
.rd-sh-primary:hover { background: var(--gold-deep); color: oklch(24% 0.045 78); filter: brightness(1.03); }

/* Platform buttons: copy the emoji text + open the site (X/Reddit pre-filled).
   Each tints to its brand color on hover for a crisp, recognizable touch. */
.rd-social { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.rd-soc { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 6px;
  border-radius: 10px; border: 1px solid var(--rd-edge); background: var(--paper); color: var(--ink-soft);
  font-family: var(--label); font-weight: 700; font-size: 12.5px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .05s; }
.rd-soc svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.rd-soc:active { transform: scale(0.96); }
.rd-soc-rd:hover { border-color: #ff4500; color: #ff8159; background: oklch(40% 0.12 35 / 0.32); }
.rd-soc-x:hover  { border-color: #e9e9ec; color: #f4f4f6; background: oklch(32% 0.02 280); }
@media (max-width: 360px) { .rd-soc { gap: 0; } .rd-soc span { display: none; } }

@media (max-width: 420px) {
  .rd-key { max-width: none; min-height: 48px; font-size: 14px; }
}

/* ============================================================================
   Lightning Round — daily higher/lower wait-times game.
   Reuses the .rd-modal / .rd-sheet / .rd-sh share + modal styling above; only
   the gameplay arena is net-new here.
   ========================================================================== */
.lr-app { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.lr-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 4px 4px; border-bottom: 1px solid var(--hair); }
.lr-back { justify-self: start; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.lr-back:hover { color: var(--gold); }
.lr-title { font-family: var(--pixel); font-size: clamp(12px, 3.1vw, 16px); color: var(--gold); text-align: center; text-shadow: 0 0 12px oklch(84% 0.13 86 / 0.4); white-space: nowrap; }
.lr-actions { justify-self: end; display: flex; gap: 6px; }
.lr-actions button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rd-edge); background: var(--paper-2); color: var(--ink); font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.lr-actions button:hover { border-color: var(--gold); color: var(--gold); }

.lr-scorebar { display: flex; justify-content: center; gap: 30px; margin: 14px 0 2px; }
.lr-score { text-align: center; }
.lr-score b { display: block; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-score span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--label); font-weight: 700; }

.lr-arena { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 16px 0 0; position: relative; }
@media (min-width: 600px) { .lr-arena { grid-template-columns: 1fr 44px 1fr; align-items: stretch; gap: 12px; } }

.lr-card { position: relative; display: flex; flex-direction: column; border: 2px solid var(--rd-edge); border-radius: 16px; overflow: hidden; background: var(--paper-2); transition: border-color .2s ease, box-shadow .2s ease; }
.lr-photo { height: clamp(120px, 24vw, 188px); background-size: cover; background-position: center; position: relative; }
.lr-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, oklch(15% 0.04 280 / 0.05) 40%, oklch(15% 0.04 280 / 0.55)); }
.lr-park { position: absolute; top: 10px; left: 10px; z-index: 1; font-family: var(--label); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); background: oklch(18% 0.04 280 / 0.7); backdrop-filter: blur(3px); padding: 4px 9px; border-radius: 999px; }
.lr-info { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; text-align: center; }
.lr-name { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 2.2vw, 18px); line-height: 1.2; color: var(--ink); }
.lr-wait { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.lr-num { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 8vw, 46px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-num.lr-q { color: var(--gold); }
.lr-unit { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.07em; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.lr-current { border-color: oklch(84% 0.13 86 / 0.45); }
.lr-card.lr-ok { border-color: var(--rd-correct); box-shadow: 0 0 0 1px var(--rd-correct), 0 14px 36px oklch(66% 0.16 150 / 0.22); }
.lr-card.lr-ok .lr-num { color: var(--rd-correct); }
.lr-card.lr-bad { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 14px 36px oklch(67% 0.2 8 / 0.22); }
.lr-card.lr-bad .lr-num { color: var(--red); }

.lr-pivot { display: grid; place-items: center; }
.lr-vs { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--gold); color: var(--gold); font-family: var(--label); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; box-shadow: 0 6px 18px oklch(8% 0.03 280 / 0.5); }
/* On stacked (mobile) layout the pivot is its own row; pull it in to hug the seam. */
@media (max-width: 599px) { .lr-pivot { margin: -9px 0; z-index: 2; } }

@keyframes lr-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .lr-challenger.lr-in { animation: lr-in 0.34s cubic-bezier(.2,.7,.2,1); } }

.lr-ask { text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.45; margin: 16px auto 0; min-height: 20px; max-width: 46ch; }
.lr-ask b { color: var(--gold); }

.lr-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 10px; }
.lr-btn { padding: 16px 14px; border-radius: 14px; border: 1px solid var(--rd-edge); background: var(--paper-2); color: var(--ink); font-family: var(--label); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; transition: border-color .15s, color .15s, transform .05s, background .15s; touch-action: manipulation; }
.lr-btn .lr-ar { font-size: 17px; line-height: 1; }
.lr-up:hover:not(:disabled) { border-color: var(--rd-correct); color: var(--rd-correct); }
.lr-down:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.lr-btn:active:not(:disabled) { transform: scale(0.97); }
.lr-btn:disabled { opacity: 0.45; cursor: default; }

.lr-toast { position: sticky; top: 70px; z-index: 30; align-self: center; margin: 6px auto 0; background: var(--ink); color: var(--paper); font-family: var(--label); font-weight: 700; letter-spacing: 0.03em; font-size: 13px; padding: 9px 16px; border-radius: 8px; box-shadow: 0 8px 24px oklch(8% 0.03 280 / 0.5); }
.lr-toast[hidden] { display: none; }

/* Result modal extras (modal shell reuses .rd-modal / .rd-sheet) */
.lr-mode { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 700; color: var(--gold); text-align: center; }
.lr-finalwrap { text-align: center; margin: 6px 0 2px; }
.lr-final { font-family: var(--display); font-weight: 800; font-size: 86px; line-height: 0.95; color: var(--ink); font-variant-numeric: tabular-nums; }
.lr-final-label { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 800; color: var(--gold); }
.lr-headline { color: var(--ink-soft); font-size: 15px; text-align: center; margin: 8px auto 2px; max-width: 34ch; }
.lr-again { width: 100%; margin-top: 12px; padding: 13px; border-radius: 10px; border: 1px solid var(--rd-edge); background: var(--paper); color: var(--ink); font-family: var(--label); font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.lr-again:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------------------- Park Connections */
:root { --cn-0: oklch(84% 0.130 86); --cn-1: oklch(66% 0.16 150); --cn-2: oklch(70% 0.115 245); --cn-3: oklch(62% 0.17 318); }
.cn-app { max-width: 540px; margin: 0 auto; }
.cn-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 4px 4px; border-bottom: 1px solid var(--hair); }
.cn-back { justify-self: start; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.cn-back:hover { color: var(--gold); }
.cn-title { font-family: var(--pixel); font-size: clamp(12px, 3.1vw, 17px); color: var(--gold); text-align: center; text-shadow: 0 0 12px oklch(84% 0.13 86 / 0.4); white-space: nowrap; }
.cn-actions { justify-self: end; display: flex; gap: 6px; }
.cn-actions button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rd-edge); background: var(--paper-2); color: var(--ink); font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.cn-actions button:hover { border-color: var(--gold); color: var(--gold); }
.cn-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 12px auto 16px; max-width: 44ch; }

.cn-solved { display: flex; flex-direction: column; gap: 8px; }
.cn-solved:not(:empty) { margin-bottom: 8px; }
.cn-band { border-radius: 10px; padding: 10px 12px; text-align: center; color: oklch(22% 0.03 280); }
.cn-band-name { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; font-size: 13px; }
.cn-band-items { font-weight: 600; font-size: 13px; margin-top: 2px; }
.cn-g0 { background: var(--cn-0); } .cn-g1 { background: var(--cn-1); }
.cn-g2 { background: var(--cn-2); color: #fff; } .cn-g3 { background: var(--cn-3); color: #fff; }

.cn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cn-tile { min-height: 64px; display: flex; align-items: center; justify-content: center; text-align: center; border: 0; border-radius: 10px; background: var(--paper-2); color: var(--ink); cursor: pointer; font-family: var(--text); font-weight: 700; font-size: clamp(11px, 2.7vw, 14px); line-height: 1.1; padding: 4px 5px; overflow: hidden; transition: transform 0.06s ease, background 0.12s ease; }
.cn-tile:hover { background: var(--paper); }
.cn-tile.is-sel { background: var(--ink); color: var(--paper); transform: scale(0.95); }
.cn-tile.cn-shake { animation: cn-shake 0.45s; }
@keyframes cn-shake { 10%,90% { transform: translateX(-2px); } 30%,70% { transform: translateX(4px); } 50% { transform: translateX(-6px); } }
@media (prefers-reduced-motion: reduce) { .cn-tile.cn-shake { animation: none; } }

.cn-mistakes-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0; }
.cn-mist-label { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); }
.cn-mistakes { display: inline-flex; gap: 7px; }
.cn-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-soft); transition: background 0.2s, transform 0.2s; }
.cn-dot.used { background: var(--rd-edge-soft); transform: scale(0.78); }

.cn-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.cn-ctl { padding: 13px 20px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font-family: var(--label); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 14px; cursor: pointer; transition: border-color 0.15s, opacity 0.15s, filter 0.15s; }
.cn-ctl:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.cn-ctl:disabled { opacity: 0.4; cursor: default; }
.cn-submit { background: var(--gold); color: oklch(24% 0.045 78); border-color: transparent; }
.cn-submit:hover:not(:disabled) { filter: brightness(1.05); color: oklch(24% 0.045 78); }
.cn-submit:disabled { background: var(--rd-edge); color: var(--muted); }

.cn-toast { position: sticky; top: 70px; z-index: 30; width: max-content; max-width: 90%; margin: 0 auto; background: var(--ink); color: var(--paper); font-family: var(--label); font-weight: 700; letter-spacing: 0.04em; font-size: 13px; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px oklch(8% 0.03 280 / 0.5); }
.cn-toast[hidden] { display: none; }

.cn-leg { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.cn-chip { padding: 8px 12px; border-radius: 8px; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; font-size: 12px; color: oklch(22% 0.03 280); min-height: 16px; }
.cn-chip.cn-g2, .cn-chip.cn-g3 { color: #fff; }
.cn-grid-preview { display: flex; flex-direction: column; gap: 4px; align-items: center; margin: 8px 0 4px; }
.cn-prow { display: flex; gap: 4px; }
.cn-psq { width: 22px; height: 22px; border-radius: 5px; }

@media (max-width: 380px) { .cn-controls { gap: 6px; } .cn-ctl { padding: 12px 13px; font-size: 12.5px; } .cn-tile { min-height: 58px; } }
.arc-screen-cn { background: radial-gradient(120% 90% at 50% 0%, oklch(40% 0.10 300 / 0.4), transparent 60%), repeating-linear-gradient(0deg, oklch(18% 0.04 280) 0 2px, oklch(20% 0.045 281) 2px 4px); }
.arc-screen-cn .cnmini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.arc-screen-cn .cnmini i { width: clamp(13px, 3.2vw, 20px); aspect-ratio: 1; border-radius: 4px; display: block; }
