/*! supertwentyplus licence: (c) 2026 Supertwentyplus Pte. Ltd. All rights reserved. Proprietary, not open source.
   Use only as provided on supertwentyplus.com (free or by subscription, under its Terms). Copying, reuse or hosting elsewhere,
   in whole or in part, needs a written licence: supertwentyplus@gmail.com. See LICENSE.txt at the site root. */
/* Codebreaker */
.cb-app { gap: 18px; }
.cb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.cb-rules { font-size: 15px; color: var(--ink-2); }
.cb-play { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 760px) { .cb-play { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; } }

.cb-board { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius); }
.cb-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--btn-radius); }
.cb-row.is-current { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.cb-row.is-done { background: var(--surface); }
.cb-num { font: 700 13px var(--font-mono); color: var(--ink-3); text-align: right; }
.cb-balls { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-ball { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: #FFFFFF; font: 800 15px/1 var(--font-mono); text-shadow: 0 1px 2px rgba(0,0,0,.45); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.2); }
.cb-ball.is-small { width: 30px; height: 30px; font-size: 12px; }
.cb-ball.is-empty { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.cb-feedback { display: grid; grid-template-columns: repeat(var(--n, 2), 12px); gap: 4px; }
.cb-peg { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.cb-peg.is-exact { background: var(--ink); box-shadow: none; }
.cb-peg.is-close { background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--ink); }
.cb-peg.is-blank { opacity: .6; }

.cb-side { display: flex; flex-direction: column; gap: 14px; }
.cb-label { font-weight: 700; }
.cb-current { display: flex; flex-direction: column; gap: 8px; }
.cb-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.cb-slot { width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.cb-slot .cb-ball { width: 48px; height: 48px; font-size: 17px; }
.cb-slot.is-empty { box-shadow: inset 0 0 0 2px var(--ink-3); background: var(--bg); cursor: default; }
.cb-palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cb-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--btn-radius); cursor: pointer; }
.cb-pick:hover:not(:disabled) { border-color: var(--ink); }
.cb-pick:disabled { opacity: .35; cursor: default; }
.cb-pick-name { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cb-actions .btn { flex: 1; }
.cb-key { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.cb-key > span { display: flex; align-items: center; gap: 8px; }
.cb-new { align-self: flex-start; }
.cb-stats { font-size: 14px; color: var(--ink-3); }
.cb-stats:empty { display: none; }
.cb-end { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border-radius: var(--card-radius); }
.cb-end[hidden] { display: none; }
.cb-end.is-won { background: #E3F3EC; border: 1px solid #A7D8C3; color: #0A5A43; }
.cb-end.is-lost { background: var(--bg); border: 1px solid var(--line); }
.cb-end h3 { font-size: 22px; }
@media (max-width: 420px) { .cb-ball.is-small { width: 26px; height: 26px; font-size: 12px; } .cb-row { gap: 8px; padding: 6px; } }
.cb-actions .btn { white-space: nowrap; padding: 0 16px; }
.cb-ball.is-light { color: #1B1B1B; text-shadow: none; }
/* v2100: room kept for the top bar while the game draws (no layout shift) */
.cb-top{min-height:111px}
@media (max-width:699px){.cb-top{min-height:134px}}
@media (max-width:400px){.cb-top{min-height:157px}}
.cb-board{min-height:476px}
@media (min-width:440px){.cb-board{min-height:496px}}
