/* Brick Breaker's page, from p05 (kiln-sketches#30): the board keeps its own colours in both themes; only the chrome
   around it follows the theme. System fonts only: the sketch loads nothing from outside game/. */
:root {
  --bg: #eceee9; --surface: #ffffff; --ink: #1a201c; --muted: #5d665f; --line: #d5dad3;
  --accent: #2f6b4a; --on-accent: #ffffff; --good: #2b7a4b; --bad: #b0382c; --warn: #9a6410;
  --board: #4d6a3c;
  --display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121512; --surface: #1a1f1b; --ink: #e3e8e2; --muted: #96a197; --line: #2b322c;
    --accent: #6fbf8e; --on-accent: #0c140f; --good: #5cc28a; --bad: #ec7b6e; --warn: #e0a54a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121512; --surface: #1a1f1b; --ink: #e3e8e2; --muted: #96a197; --line: #2b322c;
  --accent: #6fbf8e; --on-accent: #0c140f; --good: #5cc28a; --bad: #ec7b6e; --warn: #e0a54a; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; overflow-x: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 8px 48px; }
header.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; padding-block-end: 6px; border-bottom: 1px solid var(--line); margin-block-end: 8px; }
.mark { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 5.5vw, 36px); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.day { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.modes { margin-block-end: 6px; }
.modes button { padding: 5px 12px; font-size: 13px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 900px) { .grid { grid-template-columns: auto minmax(320px, 1fr); gap: 28px; align-items: start; } }
.play { min-width: 0; margin-inline: auto; width: var(--stage-w, 320px); max-width: 100%; }
.scorebar { min-height: 1.5em; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; font-size: 13px; color: var(--muted); margin-block-end: 5px; font-variant-numeric: tabular-nums; }
.scorebar b { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); }
.scorebar .rel { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.stage { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border-radius: 6px; overflow: hidden; background: var(--board); width: 320px; height: 512px; cursor: crosshair; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.banner { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%); pointer-events: none; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; background: rgba(12, 16, 14, .58); color: #f2f4ee; padding: 3px 11px; border-radius: 999px; width: max-content; max-width: calc(100% - 16px); text-align: center; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.banner.big { bottom: 44%; font-family: var(--display); font-size: 21px; font-weight: 600; padding: 5px 16px; border-radius: 10px; }
.over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .3); }
.over[hidden] { display: none; }
.over .box { background: var(--surface); color: var(--ink); border-radius: 10px; padding: 14px 16px; width: 100%; max-width: 300px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.over h3 { font-family: var(--display); font-size: 21px; margin: 0 0 4px; }
.over p { margin: 0 0 8px; font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); margin: 8px 0 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chip { display: inline-block; width: 12px; height: 8px; border-radius: 2px; }
.chip.round { width: 9px; height: 9px; border-radius: 50%; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.panel { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 0 0 8px; }
.ctl { display: flex; flex-direction: column; gap: 4px; margin-block-end: 10px; }
.ctl:last-child { margin-block-end: 0; }
.lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: fit-content; max-width: 100%; }
.seg button { border: 0; border-radius: 0; border-inline-end: 1px solid var(--line); padding: 7px 12px; }
.seg button:last-child { border-inline-end: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
button { font: inherit; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.quiet { font-size: 13px; padding: 5px 11px; font-weight: 600; color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.tog { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; margin-inline-end: 12px; }
.small { font-size: 13px; color: var(--muted); margin: 0; }
details { font-size: 13.5px; color: var(--muted); }
details summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details ul { margin: 6px 0 0; padding-inline-start: 18px; }
table.sc { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.sc th, table.sc td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.sc th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
table.sc td.n { font-family: var(--mono); }
table.sc td.w { color: var(--muted); font-size: 13px; }
table.sc tr.cur td { background: var(--bg); }
table.sc tr.tot td { font-weight: 700; border-bottom: 2px solid var(--line); }
</style>
.over .box .small:empty { display: none; }
.scorebar b.prac { color: var(--warn); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
