:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --col: #eceef2;
  --text: #1c2230;
  --muted: #6a7385;
  --line: #d8dce4;
  --accent: #2f6fde;
  --accent-text: #ffffff;
  --danger: #c33d3d;
  --new: #fff4cc;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  color-scheme: light;
}
/* Dark follows the computer's setting unless someone picks Light or Dark in the top bar. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171d;
    --panel: #1e232c;
    --col: #191d24;
    --text: #e4e8ef;
    --muted: #8c95a6;
    --line: #2e3542;
    --accent: #5b8ff0;
    --accent-text: #0d1117;
    --danger: #e26a6a;
    --new: #3a3420;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171d;
  --panel: #1e232c;
  --col: #191d24;
  --text: #e4e8ef;
  --muted: #8c95a6;
  --line: #2e3542;
  --accent: #5b8ff0;
  --accent-text: #0d1117;
  --danger: #e26a6a;
  --new: #3a3420;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
a.button { display: inline-block; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 6px 12px; color: inherit; text-decoration: none; }
a.button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.danger { color: var(--danger); }
button.icon { border: none; background: none; padding: 4px 8px; }
input, select, textarea {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 6px 8px;
  width: 100%;
}
.muted { color: var(--muted); }

/* Header and games stay put; everything below scrolls under them. */
.frozen { position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25); }
@media (max-width: 900px) {
  .frozen { position: static; box-shadow: none; }
  .top { position: sticky; top: 0; z-index: 5; }
}

.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 18px; letter-spacing: 0.02em; }
.top h1.logo { display: flex; align-items: center; gap: 6px; }
.top h1.logo img { display: block; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.version { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.top #search { max-width: 320px; flex: 1 1 200px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
#saveState { font-size: 12px; margin-left: auto; }

.queue { padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.queue .job {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; font-size: 12px;
}
.queue .job.err { border-color: var(--danger); color: var(--danger); }

.board {
  /* Every column runs as tall as the longest, so all the column names stay pinned while you scroll. */
  display: flex; gap: 12px; align-items: stretch;
  padding: 16px;
}
.column {
  flex: 1 1 0; min-width: 0;
  background: var(--col);
  border-radius: 8px;
  padding: 0 8px 8px;
  display: flex; flex-direction: column;
}
/* Column names stick just under the frozen header so you always know which column you're in. */
.column h3 {
  margin: 0 -8px 8px; padding: 12px 12px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between;
  position: sticky; top: var(--frozen-h, 0px); z-index: 2;
  background: var(--col); border-radius: 8px 8px 0 0;
}
.column .cards { min-height: 40px; display: flex; flex-direction: column; gap: 6px; }
.column.over { outline: 2px dashed var(--accent); outline-offset: -2px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px; box-shadow: var(--shadow); cursor: grab;
}
.card.fresh { background: var(--new); }
.card.dragging { opacity: 0.4; }
.card .row { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.card .key { font-weight: 600; color: var(--accent); }
.card .jira { color: var(--muted); margin-left: auto; }
.card .release-tag {
  margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700;
  background: #2f9e6f; color: #fff;
}
.card .title { margin: 4px 0; }
.card .who { font-size: 12px; color: var(--muted); }
.card .tester { font-size: 11px; font-weight: 700; padding: 0 5px; border: 1px solid currentColor; border-radius: 4px; color: var(--muted); }
.card .tester[data-analyst="Michael"] { color: #2f9e6f; }
.card .tester[data-analyst="Elizabeth"] { color: #b65ad1; }
.card .tester[data-analyst="Wilson"] { color: #e08a2e; }
.card .tester[data-analyst="Matt"] { color: #3478d6; }
.card .note-dot { font-size: 11px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

.games {
  display: flex; flex-wrap: wrap; gap: 12px 16px;
  padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.game-groups { flex: 0 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 12px 16px; align-content: flex-start; }
.game-group { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.game-group h3 {
  align-self: flex-start; margin: 0; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); color: var(--accent-text);
}
.game-group:nth-child(2) h3 { background: #2f9e6f; color: #fff; }
.game-group:nth-child(3) h3 { background: #8a93a6; color: #fff; }

/* Fumble: Minesweeper under the lights, in the Scofti arcade look (deep green, lime glow). Same in light and dark
   mode, and a fixed size so the frozen header never grows. */
.sweeper {
  --lime: #a6f15a; --lime-dim: rgb(166 241 90 / 0.28); --night: #06170f; --turf: #2f8a44; --turf-2: #287a3b;
  flex: 0 0 auto; margin-left: auto; align-self: flex-start; display: flex; flex-direction: column; gap: 6px;
  padding: 7px 8px 8px; border-radius: 10px; color: #e9f5ec;
  background: radial-gradient(120% 140% at 50% -20%, #17432c 0%, #0b2618 55%, var(--night) 100%);
  border: 1px solid #1f4d33; box-shadow: 0 6px 18px rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.06);
}
.sweeper[hidden] { display: none; }
.sw-bar { width: 0; min-width: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.sw-bar h3 {
  margin: 0 4px 0 2px; font: 400 17px/1 "Permanent Marker", cursive; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--lime); text-shadow: 0 0 10px rgb(166 241 90 / 0.45);
}
.sw-left, .sw-clock {
  padding: 2px 8px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgb(0 0 0 / 0.35); border: 1px solid rgb(255 255 255 / 0.08);
}
.sw-clock { min-width: 58px; text-align: center; color: var(--lime); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.sw-face {
  width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 16px; line-height: 26px;
  background: radial-gradient(circle at 35% 30%, #2c6b45, #123522); border: 1px solid #3c7d55; color: inherit;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.35); transition: transform 0.15s;
}
.sw-face:hover { transform: scale(1.08); border-color: var(--lime); }
.sw-level {
  width: auto; padding: 2px 6px; font-size: 11px; border-radius: 999px; cursor: pointer;
  background: rgb(0 0 0 / 0.35); color: #e9f5ec; border: 1px solid rgb(255 255 255 / 0.12);
}
.sw-level option { background: #0b2618; color: #e9f5ec; }
.sw-best { min-width: 0; margin-left: auto; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: rgb(233 245 236 / 0.6); cursor: default; }
.sw-name {
  min-width: 0; flex: 1 1 auto; margin-left: auto; padding: 2px 8px; font-size: 12px; border-radius: 999px;
  background: rgb(0 0 0 / 0.45); color: #ffd34d; border: 1px solid #ffd34d; box-shadow: 0 0 10px rgb(255 211 77 / 0.35);
}
.sw-name::placeholder { color: rgb(255 211 77 / 0.7); }
.sw-best.mine { color: #ffd34d; font-weight: 700; text-shadow: 0 0 8px rgb(255 211 77 / 0.5); }

.sw-pitch {
  position: relative; overflow: hidden; border-radius: 7px;
  background: linear-gradient(180deg, #0a2116, #071a10); box-shadow: inset 0 2px 8px rgb(0 0 0 / 0.6);
}
.sw-reveal {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 400 78px/1 "Permanent Marker", cursive; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--lime-dim); text-shadow: 0 0 18px rgb(166 241 90 / 0.25);
  transition: color 0.7s, text-shadow 0.7s, transform 0.7s;
}
.sweeper.won .sw-reveal { color: var(--lime); text-shadow: 0 0 14px rgb(166 241 90 / 0.8), 0 0 36px rgb(166 241 90 / 0.45); transform: scale(1.05); }
.sweeper.lost .sw-reveal { color: rgb(255 90 90 / 0.25); text-shadow: none; }
.sw-field { position: relative; display: grid; grid-template-columns: repeat(var(--cols), 25px); gap: 2px; padding: 4px; }
.sw-cell {
  width: 25px; height: 25px; padding: 0; border: 0; border-radius: 4px; font-size: 14px; font-weight: 800; line-height: 25px;
  color: #fff; cursor: pointer; user-select: none; -webkit-touch-callout: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--turf) 82%, #fff), var(--turf) 45%, color-mix(in srgb, var(--turf) 80%, #000));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), inset 0 -2px 0 rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.4);
  transition: transform 0.08s, filter 0.08s;
}
/* Mowing stripes: every other band of five yards is a shade darker. */
.sw-cell:nth-child(10n + 6), .sw-cell:nth-child(10n + 7), .sw-cell:nth-child(10n + 8), .sw-cell:nth-child(10n + 9), .sw-cell:nth-child(10n + 10) { --turf: var(--turf-2); }
.sw-cell.line { box-shadow: inset -2px 0 0 rgb(255 255 255 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.25), inset 0 -2px 0 rgb(0 0 0 / 0.25), 0 1px 2px rgb(0 0 0 / 0.4); }
.sw-cell:hover:not(.open) { filter: brightness(1.2); }
.sw-cell:active:not(.open) { transform: translateY(1px); filter: brightness(0.95); }
.sw-cell.flag { font-size: 13px; background: linear-gradient(180deg, #4a9a5a, #2a6e39); }
.sw-cell.open { background: rgb(0 0 0 / 0.18); box-shadow: inset 0 0 0 1px rgb(166 241 90 / 0.07); cursor: default; transform: none; }
.sw-cell.open[data-n] { text-shadow: 0 0 6px currentColor; }
.sw-cell.open[data-n="1"] { color: #6fb6ff; }
.sw-cell.open[data-n="2"] { color: var(--lime); }
.sw-cell.open[data-n="3"] { color: #ff6b6b; }
.sw-cell.open[data-n="4"] { color: #c79bff; }
.sw-cell.open[data-n="5"], .sw-cell.open[data-n="6"], .sw-cell.open[data-n="7"], .sw-cell.open[data-n="8"] { color: #ffb347; }
.sw-cell.hit { background: radial-gradient(circle, #ff5a5a, #8e1d1d); box-shadow: 0 0 12px rgb(255 80 80 / 0.8); }
.sw-cell.wrong { background: #5b6472; }
.sweeper.won { border-color: var(--lime); box-shadow: 0 0 0 1px rgb(166 241 90 / 0.35), 0 0 22px rgb(166 241 90 / 0.25); }
.sweeper.lost { border-color: #7a2a2a; }

/* Scofti Sound in the top bar: the page's own look with a soft purple accent. */
.juke-slot { flex: 0 1 460px; min-width: 0; margin-left: auto; }
.jukebox {
  --juke: #7c4ddb; --juke-2: #d0569e;
  display: flex; flex-direction: column; gap: 3px; padding: 4px 10px 5px; border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--juke) 9%, var(--panel)), var(--panel) 70%);
  border: 1px solid color-mix(in srgb, var(--juke) 30%, var(--line)); border-left: 3px solid var(--juke);
  color: var(--text); transition: box-shadow 0.3s;
}
:root[data-theme="dark"] .jukebox { --juke: #a07cf0; --juke-2: #e879b8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jukebox { --juke: #a07cf0; --juke-2: #e879b8; } }
.juke-head { display: flex; align-items: baseline; gap: 10px; }
.jukebox h3 { margin: 0; font: 400 13px/1.1 "Permanent Marker", cursive; letter-spacing: 0.08em; text-transform: uppercase; color: var(--juke); }
.jukebox.playing { box-shadow: 0 0 0 1px color-mix(in srgb, var(--juke) 45%, transparent), 0 2px 10px color-mix(in srgb, var(--juke) 18%, transparent); }
.juke-pick { flex: 1 1 150px; min-width: 0; padding: 2px 6px; font-size: 12px; }
.juke-pick optgroup { font-style: normal; color: var(--juke); }
.juke-pick option { color: var(--text); }
.juke-controls { display: flex; align-items: center; gap: 5px; }
.juke-btn { flex: none; padding: 2px 7px; font-size: 11px; line-height: 1.2; }
.juke-btn:hover { border-color: var(--juke); }
.juke-play { padding: 2px 10px; background: var(--juke); border-color: var(--juke); color: #fff; }
.juke-bar { flex: 0 1 90px; min-width: 40px; height: 4px; border-radius: 999px; background: var(--col); cursor: pointer; overflow: hidden; }
.juke-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--juke), var(--juke-2)); }
.juke-note { font-size: 10px; font-style: italic; color: var(--muted); }
.juke-time { flex: none; font-size: 10px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3ch; text-align: right; }
.game-list { display: flex; flex-wrap: wrap; gap: 6px; }
.game {
  display: flex; flex-direction: column; gap: 1px; width: 148px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--col);
}
.game-date { font-size: 11px; font-weight: 600; color: var(--accent); }
.game-match { font-weight: 600; min-height: 2lh; }
.game-time { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.next-kick {
  flex: 1 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.next-kick h3 {
  align-self: flex-start; margin: 0; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--text); color: var(--bg);
}
.next-clock {
  font: 700 22px/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums;
}
.next-game { font-size: 13px; color: var(--muted); }
.next-kick[data-phase="today"] .next-clock { color: #d9a400; }
.next-kick[data-phase="soon"] .next-clock { color: #e0702a; }
.game-analyst { margin-top: auto; padding: 2px 4px; font-size: 12px; }
.game.assigned { border-color: var(--accent); }
.game-rosters { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; cursor: pointer; user-select: none; }
.game-rosters input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #2f9e6f; }
.game.rosters-done .game-rosters { color: #2f9e6f; font-weight: 600; }
.game[data-analyst="Michael"] .game-analyst { border-color: #2f9e6f; color: #2f9e6f; }
.game[data-analyst="Elizabeth"] .game-analyst { border-color: #b65ad1; color: #b65ad1; }
.game[data-analyst="Matt"] .game-analyst { border-color: #3478d6; color: #3478d6; }

code { font-size: 12px; }

.installs {
  display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 6px 12px;
  border: 1px solid var(--line); border-left: 4px solid #2f9e6f; border-radius: 10px; background: var(--panel);
}
.installs[hidden] { display: none; }
.installs h3 { margin: 0; flex: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
/* One row: names keep their width, a note squeezes into what's left. */
.installs ol { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: inst; }
.installs li { display: flex; align-items: center; gap: 5px; counter-increment: inst; flex: none; }
.installs li.has-note { flex: 1 1 0; min-width: 160px; }
.installs li::before {
  content: counter(inst); display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none;
  border-radius: 50%; background: #2f9e6f; color: #fff; font-size: 10px; font-weight: 700;
}
.installs li.has-note::before { background: var(--muted); }
.install-name {
  flex: none; padding: 2px 7px; font: 600 11px/1.3 ui-monospace, Consolas, monospace; border-radius: 6px;
  background: var(--col); border: 1px solid var(--line); color: var(--text); white-space: nowrap;
}
.install-name:hover { border-color: #2f9e6f; }
.install-note { min-width: 0; font-size: 10.5px; line-height: 1.2; color: var(--muted); font-style: italic; }
.installs .link { flex: none; margin-left: auto; }
@media (max-width: 1300px) {
  .installs, .installs ol { flex-wrap: wrap; }
}

.intake {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; padding: 0 16px 16px; align-items: stretch;
}
/* Scratchpad and shared files sit above the board. */
.intake.shared { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.files {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.app-setup { grid-column: 1 / -1; }
.app-setup ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.files header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.files h3 {
  margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.files header label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.files header input { width: 140px; padding: 3px 6px; }
.dropzone.small { padding: 12px; border-width: 1.5px; background: var(--col); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.file-list:empty { display: none; }
.file-list li {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px;
  padding: 4px; border-radius: 6px;
}
.file-list li:hover { background: var(--col); }
.file-list .thumb {
  width: 36px; height: 36px; border-radius: 4px; object-fit: cover;
  display: grid; place-items: center; background: var(--col); border: 1px solid var(--line);
  font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; overflow: hidden;
}
.file-list .name { color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.file-list .name:hover { color: var(--accent); }
.file-list .meta { font-size: 11px; color: var(--muted); }
.file-list .tools { display: flex; gap: 2px; }
.file-list .tools a, .file-list .tools button {
  border: none; background: none; padding: 4px 6px; color: var(--muted); text-decoration: none; font-size: 13px;
}
.file-list .tools a:hover { color: var(--accent); }
.file-list .tools button:hover { color: var(--danger); }
.file-list li.pending { opacity: 0.7; }
button.link { border: none; background: none; padding: 2px 0; color: var(--accent); align-self: flex-start; font-size: 12px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; margin: 0; padding: 22px 16px;
  border: 2px dashed var(--line); border-radius: 10px;
  background: var(--panel); text-align: center;
}
.dropzone b { font-size: 15px; }
.dropzone span { font-size: 12px; }
.dropzone > * { pointer-events: none; }
.dropzone:hover { border-color: var(--accent); }
.dropzone.over { border-color: var(--accent); background: rgb(47 111 222 / 0.12); }

dialog {
  border: 1px solid var(--line); border-radius: 10px; padding: 0;
  background: var(--panel); color: var(--text);
  width: min(560px, calc(100vw - 32px));
}
dialog.wide { width: min(720px, calc(100vw - 32px)); }
/* Games dialog: " - Analyst" follows each game line; the right padding leaves room for it. */
.games-edit { position: relative; }
.games-edit textarea, .games-ghost {
  padding: 6px 112px 6px 8px; border: 1px solid var(--line); font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; letter-spacing: normal;
}
.games-edit textarea { field-sizing: content; min-height: 16lh; resize: none; }
.games-ghost { position: absolute; inset: 0; border-color: transparent; color: transparent; pointer-events: none; }
.games-ghost .at { position: relative; }
.games-ghost b { position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--accent); }
.games-ghost b.none { font-weight: 400; color: var(--muted); }
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.dialog-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.dialog-body header, .dialog-body footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-body footer { justify-content: flex-end; }
.dialog-body footer .danger { margin-right: auto; }
.dialog-body h2 { margin: 0; font-size: 16px; }
.dialog-body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.dialog-body .key { font-weight: 600; color: var(--accent); text-decoration: none; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
blockquote {
  margin: 0; padding: 8px 10px; border-left: 3px solid var(--line);
  color: var(--muted); font-size: 13px; white-space: pre-wrap;
}
.history { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--muted); }

.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px;
}

@media (max-width: 600px) {
  .juke-slot { flex: 1 1 100%; margin-left: 0; }
  .board { flex-direction: column; align-items: stretch; }
  .column { flex: none; }
  .intake { grid-template-columns: 1fr; }
  #saveState { margin-left: 0; }
}

.bell { position: relative; font-size: 17px; font-weight: 600; padding: 8px 18px; border-width: 2px; }
.bell:has(.bell-count:not([hidden])) { border-color: var(--danger); animation: bell-pulse 1.6s ease-in-out infinite; }
@keyframes bell-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 25%, transparent); } }
.bell-count {
  position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px;
}
.bell-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bell-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: 6px; background: var(--col); }
.bell-list li.unread { border-left: 3px solid var(--accent); }
.bell-list .meta { font-size: 11px; color: var(--muted); white-space: nowrap; }

.ask-btn { font-size: 17px; font-weight: 600; padding: 8px 18px; border-width: 2px; }

/* Release clock */
.clock {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.clock header { display: flex; align-items: center; justify-content: space-between; }
.clock h3, .clock .label {
  margin: 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.clock-nums { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.clock-nums > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.clock .num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock .num small { font-size: 13px; font-weight: 400; color: var(--muted); }
.clock-nums > .clock-work { padding: 6px 12px; margin: -6px 0; border: 2px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.clock-work .label { color: var(--accent); font-weight: 600; }
.clock-record { margin: 0; font-size: 12px; color: var(--muted); }
.clock-record b { color: var(--text); font-weight: 600; }
.release-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.release-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.release-list li:last-child { border-bottom: none; }
.release-list .row { display: flex; justify-content: space-between; gap: 8px; }
.release-list .tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.release-list .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Ask console: a terminal. Same look in light and dark. */
dialog.ask {
  width: min(860px, calc(100vw - 32px));
  --term-bg: #0d1117; --term-text: #c9d1d9; --term-dim: #7d8590; --term-prompt: #3fb950; --term-accent: #58a6ff; --term-err: #f85149;
  background: var(--term-bg); color: var(--term-text); border: 1px solid #30363d;
  font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
dialog.ask h2 { font: inherit; font-weight: 700; color: var(--term-prompt); }
dialog.ask .icon { color: var(--term-dim); background: transparent; border-color: #30363d; }
dialog.ask .muted { color: var(--term-dim); }
dialog.ask input, dialog.ask textarea {
  font: inherit; background: transparent; color: var(--term-text); border: none; outline: none; padding: 0;
}
dialog.ask input { border-bottom: 1px solid #30363d; }
dialog.ask button.primary { background: #238636; border-color: #238636; color: #fff; font: inherit; }
dialog.ask button.link { color: var(--term-accent); font: inherit; }
.ask-lock, .ask-chat { display: flex; flex-direction: column; gap: 8px; }
.ask-row { display: flex; gap: 8px; align-items: flex-start; }
.ask-row::before { content: "❯"; color: var(--term-prompt); font-weight: 700; }
.ask-lock .ask-row::before { content: "password:"; }
.ask-row textarea, .ask-row input { flex: 1; field-sizing: content; min-height: 1lh; resize: none; }
.ask-err { margin: 0; color: var(--term-err); }
.ask-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ask-log:empty { display: none; }
.ask-log > li { white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-you { color: #fff; }
.ask-you::before { content: "❯ "; color: var(--term-prompt); font-weight: 700; }
.ask-reply, .ask-out { color: var(--term-text); padding-left: 2ch; }
.ask-wait { color: var(--term-dim); padding-left: 2ch; }
.ask-err-line, .ask-log .ask-err { color: var(--term-err); padding-left: 2ch; }
.ask-done { margin: 2px 0 0; padding-left: 3ch; color: var(--term-prompt); white-space: normal; }
.ask-skip { color: var(--term-dim); white-space: normal; }
.ask-reply button.link { padding: 0; }
.ask-reply button.link:disabled { color: var(--term-dim); cursor: default; }

/* Scratchpad */
.scratch {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box;
}
.scratch header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.scratch h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.scratch header span { font-size: 11px; }
.scratch textarea { flex: 1; field-sizing: content; min-height: 8lh; resize: none; font-size: 13px; line-height: 1.45; }

/* Update The Code: the running note for the Construct */
.code-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.code-files:empty, .code-sent:empty { display: none; }
.code-files li {
  display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--col); max-width: 100%;
}
.code-files a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.code-files a:hover { color: var(--accent); }
.code-files .icon { padding: 0 6px; font-size: 11px; border: none; background: none; color: var(--muted); }
.code-files .icon:hover { color: var(--danger); }
.release-pending {
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #2f9e6f; background: rgb(47 158 111 / 0.1); font-size: 12px;
}
.release-pending[hidden] { display: none; }
.release-pending p { margin: 0; overflow-wrap: anywhere; }
.release-pending div { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.code-sent { list-style: none; margin: 0; padding: 6px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.code-sent li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.code-sent .tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); }
.code-sent li.done .tag { background: #2f9e6f; color: #fff; }
.code-sent .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.code-sent .reply { flex-basis: 100%; padding-left: 10px; color: var(--muted); border-left: 2px solid #2f9e6f; }

/* Update The Code box */
.release-box {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px 12px; border: 2px dashed var(--line); border-radius: 10px; background: var(--panel);
}
.release-box.over { border-color: var(--accent); background: rgb(47 111 222 / 0.12); }
.release-box header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.release-box h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.release-box header span { font-size: 12px; }
.release-box textarea { flex: 1; field-sizing: content; min-height: 6lh; resize: none; }
.release-box p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.release-box p:empty { display: none; }
.release-box footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.jira-tile {
  padding: 4px 10px; font-size: 12px; color: var(--muted);
  border: 1.5px dashed var(--line); background: var(--col);
}
.jira-tile:hover, .jira-tile.over { border-color: var(--accent); color: var(--text); }
.release-box button:disabled { opacity: 0.5; cursor: default; }

.theme-pick { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-pick button { border: none; border-radius: 0; padding: 6px 10px; font-size: 13px; background: var(--panel); color: var(--muted); }
.theme-pick button + button { border-left: 1px solid var(--line); }
.theme-pick button.on { background: var(--accent); color: var(--accent-text); }


/* Soft look: pale tinted panels, gentle shadows, rounder corners. Each panel picks a --tint; dark mode mixes the same tint into the dark panel. */
:root {
  --line: #e3e6ec;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06);
  --soft-shadow: 0 10px 28px -18px rgb(40 20 90 / 0.35);
}
.installs, .scratch, .files, .release-box, .clock, .column {
  --tint: #2f6fde;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 5%, var(--panel)), color-mix(in srgb, var(--tint) 12%, var(--panel)));
  border-color: color-mix(in srgb, var(--tint) 28%, var(--line));
  border-radius: 14px;
  box-shadow: 0 10px 28px -18px color-mix(in srgb, var(--tint) 70%, transparent);
}
.installs { --tint: #0f9f5c; }
.scratch { --tint: #d9772f; }
.files { --tint: #2f6fde; }
.release-box { --tint: #a100c2; }
.clock { --tint: #0b9f8a; }
.app-setup { --tint: #6a7385; }
.column { --tint: #6a7385; border: 1px solid color-mix(in srgb, var(--tint) 18%, var(--line)); }
.column h3 { background: color-mix(in srgb, var(--tint) 5%, var(--panel)); border-radius: 14px 14px 0 0; }
.card { border-radius: 10px; border-color: var(--line); box-shadow: var(--shadow); }
button, a.button, input, select, textarea { border-radius: 8px; }
.dropzone, .dropzone.small { border-radius: 12px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
.release-box textarea, .scratch textarea { background: color-mix(in srgb, var(--panel) 85%, transparent); }
/* Games in the same soft look: soft grey until someone is assigned, then the analyst's color. */
.games { background: linear-gradient(180deg, var(--panel), color-mix(in srgb, #2f6fde 4%, var(--panel))); }
.game {
  --tint: #8a93a6;
  border-radius: 12px; border-color: color-mix(in srgb, var(--tint) 30%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 5%, var(--panel)), color-mix(in srgb, var(--tint) 13%, var(--panel)));
  box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--tint) 75%, transparent);
}
.game.assigned { --tint: #2f6fde; border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); }
.game[data-analyst="Michael"] { --tint: #2f9e6f; }
.game[data-analyst="Elizabeth"] { --tint: #b65ad1; }
.game[data-analyst="Matt"] { --tint: #3478d6; }
.game-analyst { background: color-mix(in srgb, var(--panel) 80%, transparent); }
.game-group:nth-child(3) h3 { background: #d9772f; }
.files.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.files.over .dropzone { border-color: var(--accent); }
.clock .late { font-size: 13px; font-weight: 700; color: var(--danger); }
