/* ═══════════════════════════════════════════════════════════════════════════
   Classic Solo "Calm Neon" look (November 2026), and the tap-pieces answer
   builder used by the Double & Half topic.

   The look switches on with body.cn-on, which showScreen() in game.js sets only
   while a Classic SOLO game or its results are on screen. Two-player Classic and
   every other screen keep their own look. The builder (.pb) works in both: its
   plain styles are first, the neon versions under body.cn-on.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Piece builder (any Classic game) ─────────────────────────────────────── */
.pb { margin-top:16px; }
.pb[hidden] { display:none; }
.pb-box { position:relative; border:2px dashed rgba(128,128,140,.35); border-radius:18px; padding:12px 12px 36px; }
.pb-tray { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; align-items:center; min-height:72px; }
.pb-empty { color:var(--sub); font-weight:700; font-size:.9rem; text-align:center; }
.pb-bit { background:none; border:none; padding:2px; color:#c8deff; cursor:pointer; line-height:0; border-radius:10px; }
.pb-bit:active { transform:scale(.9); }
.pb-submit { position:absolute; left:50%; bottom:-25px; transform:translateX(-50%); display:flex; align-items:center; gap:10px; height:50px; padding:0 22px;
  border:none; border-radius:99px; background:var(--accent); color:#fff; font:inherit; font-weight:900; font-size:.95rem; letter-spacing:.05em; white-space:nowrap; cursor:pointer; }
.pb-total { font-size:1.35rem; letter-spacing:0; font-variant-numeric:tabular-nums; }
.pb-pieces { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:42px; }
.pb-piece { display:grid; justify-items:center; align-content:center; gap:4px; min-width:68px; min-height:72px; padding:8px 12px; border:none; border-radius:16px;
  background:var(--card); color:#c8deff; font:inherit; font-weight:900; font-size:.95rem; cursor:pointer; }
.pb-piece:active { transform:scale(.94); }
.pb.locked { pointer-events:none; opacity:.55; }
.cn-ask, .cn-result { display:none; }

/* ── Calm Neon: Classic Solo ──────────────────────────────────────────────── */
/* Named --cn-t on purpose: @property applies to the whole page, and the logos already use --t for their size. */
@property --cn-t { syntax:'<number>'; inherits:true; initial-value:1; }
body.cn-on { background:linear-gradient(180deg, #17142e 0%, #241543 55%, #3a1a4f 100%) fixed; }
body.cn-on #game-screen .cg-quit,
body.cn-on #game-screen #solo-pause-btn { background:transparent; border:1.5px solid rgba(255,255,255,.16); color:#c9c3ee; }
body.cn-on #game-screen .cg-segs { display:flex; justify-content:center; gap:9px; }
body.cn-on #game-screen .cg-segs i { width:11px; height:11px; flex:0 0 auto; border-radius:50%; background:transparent; border:1.5px solid rgba(125,211,252,.45); }
body.cn-on #game-screen .cg-segs i.ok { background:#f472b6; border-color:#f472b6; box-shadow:0 0 10px #f472b6; }
body.cn-on #game-screen .cg-segs i.ok:nth-child(even) { background:#fde047; border-color:#fde047; box-shadow:0 0 10px #fde047; }
body.cn-on #game-screen .cg-segs i.no { background:#64748b; border-color:#64748b; }
body.cn-on #game-screen .cg-segs i.now { border-color:#7dd3fc; box-shadow:0 0 8px #7dd3fc; }
body.cn-on #game-screen .juice-pill { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); color:#f1f0ff; }
body.cn-on .cn-ask { display:block; margin:10px 0 16px; text-align:center; color:#d8d3f5; font-weight:900; font-size:.82rem; letter-spacing:.16em; text-transform:uppercase; }
body.cn-on .cn-ask:empty { display:none; }

/* The question: a glowing card, or a circle for short questions. The circle's
   edge is the timer (--cn-t goes from 1 to 0, set by renderTimer). */
body.cn-on #game-screen .cg-card { overflow:visible; background:rgba(16,12,36,.55); color:#d8d3f5; border:2px solid #7dd3fc; border-radius:22px;
  box-shadow:0 0 26px rgba(125,211,252,.22), inset 0 0 20px rgba(125,211,252,.12); padding:22px 16px 24px; transition:--cn-t 1s linear; }
body.cn-on #game-screen .cg-card .cg-qlabel { display:none; }
body.cn-on #game-screen .cg-card #question-text { color:#fff; font-weight:800; letter-spacing:.5px; }
body.cn-on #game-screen .cg-tbar { bottom:-2px; left:8%; height:3px; border-radius:99px; max-width:84%; box-shadow:0 0 10px currentColor; }
body.cn-on #game-screen .cg-card.cn-circle { width:min(176px, 52vw); aspect-ratio:1; margin:0 auto; padding:12px; border:none; border-radius:50%; display:grid; place-items:center;
  background:radial-gradient(closest-side, #1b1636 calc(100% - 4px), transparent calc(100% - 3px)),
             conic-gradient(var(--tc, #7dd3fc) calc(var(--cn-t) * 360deg), rgba(255,255,255,.1) 0);
  box-shadow:0 0 30px rgba(125,211,252,.25); }
body.cn-on #game-screen .cg-card.cn-circle .cg-tbar { display:none; }
body.cn-on #game-screen .cg-card.cn-circle #question-text { font-size:2.3rem; line-height:1.1; text-align:center; }
body.cn-on #game-screen .cg-card.cn-circle.cn-long #question-text { font-size:1.35rem; letter-spacing:0; }
body.cn-on #game-screen .cg-card.cn-circle.cn-xl #question-text { font-size:1.2rem; letter-spacing:0; }
body.cn-on #game-screen .cg-card.cn-circle.cn-two #question-text { font-size:1.65rem; line-height:1.2; letter-spacing:0; white-space:pre-line; }
body.cn-on #game-screen .cg-card #question-text { transition:opacity .15s; }
body.cn-on #game-screen .cg-card.cn-hit #question-text { opacity:0; }
body.cn-on #game-screen .q-card.correct { box-shadow:0 0 0 2px #a855f7, 0 0 30px rgba(168,85,247,.45); }
body.cn-on #game-screen .q-card.wrong { box-shadow:0 0 0 2px #f43f5e, 0 0 26px rgba(244,63,94,.35); }

/* Answers */
body.cn-on #game-screen #answer-input { margin-top:22px; background:transparent; border:none; border-bottom:2px solid #7dd3fc; border-radius:0; color:#fff; box-shadow:none; }
body.cn-on #game-screen #answer-input::placeholder { color:rgba(216,211,245,.35); }
body.cn-on #game-screen #submit-btn { margin-top:18px; height:52px; background:#1f1a3d; border:2px solid #7dd3fc; color:#fff; border-radius:99px; letter-spacing:.06em; box-shadow:0 0 18px rgba(125,211,252,.2); }
body.cn-on #game-screen .choice-btn { background:transparent; color:#fff; border:1.5px solid rgba(125,211,252,.45); box-shadow:none; }
body.cn-on #game-screen .choice-btn:hover { background:rgba(125,211,252,.08); }
body.cn-on #game-screen .choice-btn.right { background:rgba(34,197,94,.18); border-color:#22c55e; color:#fff; box-shadow:0 0 16px rgba(34,197,94,.4); }
body.cn-on #game-screen .choice-btn.wrong { background:rgba(244,63,94,.18); border-color:#f43f5e; color:#fff; box-shadow:0 0 16px rgba(244,63,94,.35); }
body.cn-on #game-screen #feedback.fb-correct { color:#d8b4fe; }
body.cn-on #game-screen #combo-line { color:#fde047; }
body.cn-on #game-screen .pu-solo button { background:transparent; border:1.5px solid rgba(255,255,255,.2); color:#fff; }
body.cn-on .pb-box { border:1.5px solid rgba(125,211,252,.4); }
body.cn-on .pb-bit, body.cn-on .pb-piece { color:#7dd3fc; }
body.cn-on .pb-empty { color:rgba(216,211,245,.6); }
body.cn-on .pb-submit { background:#1f1a3d; border:2px solid #7dd3fc; box-shadow:0 0 18px rgba(125,211,252,.25); }
body.cn-on .pb-piece { background:rgba(26,21,48,.85); border:1px solid rgba(255,255,255,.08); }

/* Right answer: a glowing check with sparks flying out */
.cn-check { position:absolute; left:50%; top:50%; width:150px; height:120px; margin:-60px 0 0 -75px; pointer-events:none; z-index:5; }
.cn-check svg { width:100%; height:100%; animation:cnPop .5s cubic-bezier(.34,1.56,.64,1) both; filter:drop-shadow(0 0 8px #a855f7); }
.cn-check i { position:absolute; left:50%; top:50%; width:11px; height:11px; margin:-5px; border-radius:50%; animation:cnFly .8s ease-out forwards; }
@keyframes cnPop { 0% { transform:scale(.3); opacity:0; } 60% { transform:scale(1.12); opacity:1; } 100% { transform:scale(1); opacity:1; } }
@keyframes cnFly { to { transform:translate(var(--dx), var(--dy)) scale(.4); opacity:0; } }

/* ── Calm Neon: results ───────────────────────────────────────────────────── */
body.cn-on #solo-result > h1, body.cn-on #final-score, body.cn-on #final-acc { display:none !important; }
body.cn-on .cn-result { display:flex; flex-direction:column; align-items:center; gap:10px; padding-top:18px; }
.cn-ring { position:relative; width:180px; height:180px; display:grid; place-items:center; }
.cn-ring svg { position:absolute; inset:0; }
.cn-ring svg .arc { transition:stroke-dasharray 1s ease-out; filter:drop-shadow(0 0 6px #fbbf24); }
.cn-ring small { position:absolute; top:34px; color:#fbbf24; font-size:.66rem; font-weight:900; letter-spacing:.16em; }
.cn-ring b { position:relative; font-size:2.6rem; font-weight:900; color:#fff; font-variant-numeric:tabular-nums; }
.cn-stars { display:flex; gap:6px; margin-top:-26px; font-size:2rem; position:relative; }
.cn-stars span { animation:cnPop .45s cubic-bezier(.34,1.56,.64,1) both; }
.cn-stars span.off { filter:grayscale(1) brightness(1.4) opacity(.45); }
body.cn-on #cs-stars { display:none; }   /* the stars sit under the ring instead */
.cn-rows { width:100%; max-width:420px; margin-top:8px; }
.cn-row { display:flex; align-items:center; gap:10px; padding:12px 4px; border-top:1px solid rgba(255,255,255,.1); font-weight:800; color:#f1f0ff; }
.cn-row .v { margin-left:auto; font-weight:900; font-variant-numeric:tabular-nums; }
.cn-dots { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; padding:4px 0 2px; }
.cn-dots i { width:12px; height:12px; border-radius:50%; display:block; background:#22c55e; }
.cn-dots i.no { background:#f43f5e; }
body.cn-on #solo-again-btn { background:#7dd3fc; color:#0b1a2e; box-shadow:0 0 18px rgba(125,211,252,.35); }
@media (prefers-reduced-motion:reduce) {
  .cn-check svg, .cn-check i, .cn-stars span { animation:none; }
  body.cn-on #game-screen .cg-card, .cn-ring svg .arc { transition:none; }
}
