/* Box Claim (w042) */
.bc { --p0: #70e1c8; --p1: #ffb86b; --board: min(100%, 60svh, 560px); display: grid; gap: 1rem; }
.bc > *, .bc .kit-card > *, .bc-play > *, .bc-result > * { min-width: 0; }
.bc .bc-p0 { --pc: var(--p0); }
.bc .bc-p1 { --pc: var(--p1); }

/* Setup */
.bc-setup { gap: .85rem; }
.bc-field { display: grid; gap: .3rem; }
.bc-label { color: var(--muted); font-weight: 700; font-size: .95rem; }
.bc-seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: .25rem; padding: .25rem; border: 1px solid var(--border); border-radius: .8rem; background: #0c1220; }
.bc .bc-seg button { min-width: 0; min-height: 44px; padding: .35rem .5rem; border: 0; background: transparent; line-height: 1.2; overflow-wrap: normal; hyphens: auto; }
.bc .bc-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.bc-go { min-height: 56px; padding-inline: 2rem; font-size: 1.15rem; }
.bc-status-slot .kit-status:empty { display: none; }
.bc-more { border: 1px solid var(--border); border-radius: .85rem; background: #0c1220; }
.bc-more summary { display: flex; align-items: center; min-height: 48px; padding: .5rem 1rem; cursor: pointer; font-weight: 700; }
.bc-more-body { display: grid; gap: .6rem; padding: 0 1rem 1rem; }
.bc-more-body p { margin: 0; }
.bc-records { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--border); border-radius: .85rem; }
.bc-records h2 { margin: 0; }
.bc-record-list { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; color: var(--muted); overflow-wrap: anywhere; }
.bc-example { display: grid; gap: .4rem; justify-items: center; margin: 0; text-align: center; color: var(--muted); }
.bc-example-art { width: min(100%, 14rem); height: auto; }
.bc-ex-fill { fill: color-mix(in srgb, var(--p0) 22%, transparent); }
.bc-ex-sym { fill: var(--p0); font-size: 46px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.bc-ex-line { fill: none; stroke: #8a97b3; stroke-width: 8; stroke-linecap: round; }
.bc-ex-new { fill: none; stroke: var(--p0); stroke-width: 11; stroke-linecap: round; }
.bc-ex-open { fill: none; stroke: #3d4a66; stroke-width: 3; stroke-dasharray: 6 10; }
.bc-ex-dot { fill: #f6f8fc; }

/* Playing: hide the lead lines so the board fits on a phone. */
body.bc-playing .kit-lead, body.bc-playing .kit-local { display: none; }
.bc-play { display: grid; gap: .6rem; }
.bc-chips { width: var(--board); margin-inline: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.bc-chip { display: flex; align-items: center; gap: .45rem; min-width: 0; min-height: 48px; padding: .35rem .7rem; border: 2px solid var(--border); border-radius: .8rem; background: var(--card); }
.bc-chip[data-active="true"] { border-color: var(--pc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 35%, transparent); }
.bc-sym { color: var(--pc); font-size: 1.3rem; line-height: 1; }
.bc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bc-pts { font-size: 1.45rem; font-variant-numeric: tabular-nums; color: var(--pc); }
.bc-board { --pc: var(--p0); width: var(--board); margin-inline: auto; border: 3px solid color-mix(in srgb, var(--pc) 55%, transparent); border-radius: 1rem; background: #0c1220; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.bc-board[data-turn="1"] { --pc: var(--p1); }
.bc-board[data-wait="true"] { cursor: progress; border-style: dashed; }
.bc-board:focus { outline: none; }
.bc-board:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.bc-svg { display: block; width: 100%; height: auto; }
.bc .bc-l { stroke-linecap: round; }
.bc .bc-open { stroke: #3d4a66; stroke-width: 3; stroke-dasharray: 6 10; }
.bc .bc-drawn { stroke: var(--pc); stroke-width: 9; }
.bc .bc-last { stroke-width: 12; filter: drop-shadow(0 0 5px #fff); }
.bc .bc-preview { stroke: var(--pc); stroke-width: 9; stroke-linecap: round; opacity: .45; pointer-events: none; }
.bc .bc-cursor { stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 14 9; pointer-events: none; display: none; }
.bc-board:focus-visible .bc-cursor, .bc-board[data-kbd="true"]:focus .bc-cursor { display: inline; }
.bc .bc-board[data-wait="true"] .bc-cursor { display: none; }
.bc .bc-dot { fill: #f6f8fc; pointer-events: none; }
.bc .bc-box rect { fill: transparent; transition: fill .25s; }
.bc .bc-own rect { fill: color-mix(in srgb, var(--pc) 24%, transparent); }
.bc .bc-box-sym { fill: var(--pc); font-size: 48px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.bc-play .kit-status { min-height: 3.1em; margin: 0; text-align: center; color: var(--text); font-weight: 600; }
.bc-play .kit-status[data-kind="error"] { color: var(--danger); }
.bc-play-actions { justify-content: center; }

/* Result */
.bc-result { display: grid; gap: .75rem; justify-items: center; padding: 1.25rem; border: 2px solid var(--accent); border-radius: 1rem; background: #13231f; text-align: center; }
.bc-result[data-winner="1"] { border-color: var(--p1); background: #2a2016; }
.bc-result h2 { margin: 0; font-size: clamp(1.4rem, 6vw, 2rem); }
.bc-result-score { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem; margin: 0; font-size: 1.2rem; font-weight: 800; }
.bc-score { color: var(--pc); overflow-wrap: anywhere; }
.bc-mini { width: min(100%, 15rem); }
.bc-mini .bc-svg { border-radius: .75rem; background: #0c1220; }
.bc-result-record { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.bc-result-record:empty { display: none; }
.bc-result-actions { justify-content: center; }
.bc .bc-quiet { min-height: 44px; border-color: transparent; background: transparent; color: var(--muted); font-weight: 600; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .bc .bc-box rect { transition: none; }
}
