/* Cashblaster on the web: its colours,
   laid out for phones first and widening on bigger screens. */
:root {
  --bg: #e9edf2; --surface: #ffffff; --sunken: #f6f8fa; --border: #ccd4de;
  --header: #101c2e; --header-muted: #9fb0c6; --text: #18212d; --muted: #566276;
  --accent: #1f6feb; --accent-dark: #1658c4; --green: #1a8f47; --green-soft: #e3f4e9;
  --red: #c8322b; --red-soft: #fbe7e5; --chip: #e1e7ef; --orange: #c2560c;
  --orange-soft: #fdebd9; --tabs: #1658c4; --tabs-text: #dbe7fd;
  --tint-post: #f0f2f5; --tint-in: #fdf2f1; --tint-soon: #fff8e8;
  --edge-in: #f2c9c4; --edge-soon: #f2dfb0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Inter, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 11px; }
.red { color: var(--red); } .green { color: var(--green); } .faint { color: #a7b0bc; }
.error { color: var(--red); font-weight: 600; } .warn { color: var(--orange); }
.center { text-align: center; }
main { padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); max-width: 1500px; margin: 0 auto; }
main.wide { max-width: 2400px; }

/* header: a back button in the left corner, the brand, the tools on the right
   (under the rest on a phone) */
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--header); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
.brand { color: #fff; white-space: nowrap; font-weight: 800; letter-spacing: .04em; text-decoration: none; font-size: 17px; }
.top-row { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.subtitle { color: var(--header-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 9px 16px; border-radius: 10px; border: 1px solid #3d84f2; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 4px rgba(0,0,0,.25); }
.back-btn:hover, .back-btn:active { background: var(--accent-dark); }
.tools { display: flex; gap: 8px; }
.tools:not(:has(*)) { display: none; }
.tool-btn { display: inline-block; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap;
  text-decoration: none; color: #fff; background: #22344f; border: 1px solid #3a5070; }
a.tool-btn:hover { background: #2c4366; }
.tool-btn.on { background: var(--accent); border-color: var(--accent); }
.tool-btn.off { color: #6f7f95; background: #172539; border-color: #24344a; cursor: not-allowed; }
@media (max-width: 760px) {
  .tools { flex-wrap: wrap; }
  .subtitle { font-size: 12px; }
  .top-row { width: 100%; gap: 8px; }
  .back-btn { font-size: 15px; padding: 8px 12px; }
  .tools { order: 10; width: 100%; }
  .tools { gap: 6px; }
  .tool-btn { flex: 1 1 auto; text-align: center; padding: 8px 6px; font-size: 13px; }
  .tool-btn.small { flex: 0 0 auto; padding: 8px 10px; }
}
@media (max-width: 480px) {
  .tool-sport { display: none; }
  .tool-btn { font-size: 12px; padding: 8px 4px; }
  .tool-btn.small { padding: 8px 8px; }
}

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 12px 0; }
button, .button { font: inherit; }
button.accent { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; }

/* sign in */
.login { max-width: 360px; margin: 40px auto; display: grid; gap: 12px; }
.login label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.login input { font: inherit; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }

/* sport picker */
.picker { text-align: center; padding-top: 24px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 20px; }
.tile { width: min(42vw, 240px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; background: var(--surface); border: 2px solid var(--border);
  border-radius: 24px; text-decoration: none; color: var(--text); padding: 12px; }
a.tile:hover, a.tile:active { border-color: var(--accent); background: var(--chip); }
.tile-icon svg { width: 62%; height: auto; max-width: 150px; }
.tile-icon { display: flex; justify-content: center; width: 100%; }
.tile-name { font-size: 26px; font-weight: 800; }
.tile-sub { color: var(--muted); font-size: 12px; }
.tile.soon { background: #eef1f4; color: var(--muted); }
.tile.soon svg { filter: grayscale(1) opacity(.45); }

/* loading */
.spinner { width: 34px; height: 34px; margin: 6px auto 12px; border-radius: 50%;
  border: 4px solid var(--chip); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the week: one column on a phone (each group's heading above its games),
   every group side by side across the screen on anything wider */
.week { text-align: center; margin: 6px 0 14px; }
.week h1 { font-size: clamp(26px, 3.2vw + 12px, 46px); line-height: 1.1; }
.week .dates { font-size: clamp(15px, 1vw + 10px, 22px); margin: 4px 0 0; }
.groups { display: flex; flex-direction: column; gap: 18px; }
.group h2 { text-align: center; font-size: clamp(17px, .6vw + 13px, 21px); }
.group > p { text-align: center; margin: 0 0 8px; }
.cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) {
  .groups { flex-direction: row; align-items: flex-start; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
  .group { flex: 1 1 0; min-width: 215px; }
  .group.wide { flex-grow: 2; min-width: 442px; }
  .group.wide .cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .group > p { font-size: 12px; }
}
/* too narrow for the whole week across (app.js adds .stacked): one column,
   as on a phone, centred */
.groups.stacked { flex-direction: column; align-items: stretch; overflow: visible; max-width: 640px; margin: 0 auto; gap: 18px; }
.groups.stacked .group { flex: none; min-width: 0; }
.groups.stacked .group.wide .cards { grid-template-columns: minmax(0, 1fr); }
.groups.stacked .group > p { font-size: inherit; }
.game { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 12px 8px; color: var(--text); text-decoration: none; }
a.game:hover { border-color: var(--accent); }
.game.post { background: var(--tint-post); }
.game.in { background: var(--tint-in); border-color: var(--edge-in); }
.game.soon { background: var(--tint-soon); border-color: var(--edge-soon); }
.sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.side { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.side .badge { width: 60px; height: 50px; }
.side b { font-size: 16px; }
.mid { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.at { font-size: 26px; font-weight: 800; color: var(--muted); line-height: 1.1; }
.score { font-size: 24px; font-weight: 800; } .score.lost { color: var(--muted); }
.chance { font-size: 17px; font-weight: 800; color: var(--muted); } .chance.pick { color: var(--green); }
.live { background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.final { color: var(--muted); font-weight: 700; }
.foot { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 6px; text-align: center; font-size: 12px; color: var(--muted); }
.foot.rough { color: var(--red); }

/* a game */
.matchup { text-align: center; }
.matchup h1 { font-size: clamp(20px, 1.4vw + 14px, 30px); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.chip { background: var(--chip); border-radius: 10px; padding: 3px 9px; font-size: 12px; }
.chip.warn { background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.chip.fresh { color: var(--muted); }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; position: sticky; top: 44px; background: var(--bg); z-index: 4; }
.cats::-webkit-scrollbar { display: none; }
.cats a:first-child { margin-left: auto; } .cats a:last-child { margin-right: auto; }
.cats a { flex: none; padding: 7px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.cats a.on { background: var(--tabs); color: #fff; border-color: var(--tabs); }
.filters summary { font-weight: 700; cursor: pointer; }
.filters form { display: grid; gap: 10px; margin-top: 10px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.filters legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.filters label { font-size: 14px; }
.odds-note { margin: 4px 2px 8px; }
.lineset h2, .propset h2 { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 8px; }
.propset h2 { justify-content: flex-start; border-bottom: 2px solid #46556c; padding-bottom: 4px; }
.lineset h2 .badge { width: 54px; height: 44px; }
.pair, .grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } .grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } }
.pcard { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px; color: var(--text); cursor: pointer; }
.pcard:active, .pcard.on { border-color: var(--accent); }
.pc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pc-who { display: flex; flex-direction: column; }
.proj { color: var(--accent); font-size: 12px; font-weight: 700; }
.fav { flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--chip); color: var(--muted); }
.fav.favorable { background: var(--green-soft); color: var(--green); }
.fav.unfavorable { background: var(--red-soft); color: var(--red); }
table.lines { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
table.lines th { text-align: left; color: var(--muted); font-weight: 600; padding: 1px 4px 1px 0; white-space: nowrap; }
table.lines td { text-align: center; padding: 1px 2px; white-space: nowrap; }

/* why sheet */
.sheet { position: fixed; inset: 0; background: rgba(16, 28, 46, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-box { background: var(--surface); width: 100%; max-width: 640px; max-height: 85vh; border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-box { border-radius: 18px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sheet-head .close { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); }
.sheet-body { overflow-y: auto; padding: 12px 16px 20px; }
.why-doc { white-space: pre-wrap; font-size: 14px; }
.why-doc .name { font-size: 19px; font-weight: 800; }
.why-doc .meta { color: var(--muted); font-size: 13px; }
.why-doc .section { display: block; margin: 14px 0 2px; color: var(--accent); font-weight: 800; font-size: 11px; letter-spacing: .05em; }
.why-doc .key { color: var(--muted); font-size: 13px; }
.why-doc .val { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.why-doc .big { color: var(--accent); font-weight: 800; font-size: 17px; }
.why-doc .pos { color: var(--green); font-weight: 700; }
.why-doc .neg { color: var(--red); font-weight: 700; }
.why-doc .flat { color: var(--muted); font-weight: 700; }
.why-doc .bullet { color: var(--accent); }
.why-doc .sub { color: var(--muted); font-size: 13px; }

/* the Parlay generator and the Parlay Builder */
.keep-lines { white-space: pre-line; }
.button { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-weight: 700; }
.button.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
button.accent:disabled { opacity: .6; }
.accent-text { color: var(--accent); }
.tool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.tool-head h1 { font-size: clamp(22px, 1.6vw + 14px, 32px); margin: 0; }
.tool-head .go { font-size: 17px; padding: 12px 22px; }
.tool-note { margin: 6px 0 10px; }
.tool { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .tool { grid-template-columns: minmax(330px, 380px) 1fr; } }
.tool-side .panel { margin-top: 0; }
.tool-main > .panel:first-child { margin-top: 0; }
.pfilters summary { font-weight: 800; font-size: 16px; cursor: pointer; }
.pform { margin-top: 10px; }
.sec-tabs { display: none; }
.pform.tabbed .sec-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.sec-tab { flex: 1; min-width: 70px; padding: 8px 6px; border: 1px solid var(--border); background: var(--sunken); border-radius: 9px;
  font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.sec-tab.on { background: var(--tabs); color: #fff; border-color: var(--tabs); }
.sec { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.sec legend { font-weight: 800; font-size: 15px; padding: 0; margin-bottom: 6px; }
.pform.tabbed .sec legend { display: none; }
.sec h3 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; }
.check.big { font-size: 16px; font-weight: 600; padding: 6px 0; }
.check input { width: 18px; height: 18px; }
.legs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: block; text-align: center; padding: 9px 4px; border: 1px solid var(--border); border-radius: 10px; font-weight: 700; background: var(--sunken); }
.pill input:checked + span { background: var(--tabs); color: #fff; border-color: var(--tabs); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); }
.pill.any { grid-column: 1 / -1; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.field { display: grid; gap: 4px; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field input { font: inherit; padding: 9px; border: 1px solid var(--border); border-radius: 9px; width: 100%; }
.field input.bad { border-color: var(--red); background: var(--red-soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick { display: flex; gap: 6px; margin: 4px 0; }
.small-btn { font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--sunken); cursor: pointer; }
.link-btn { font: inherit; font-size: 11px; border: 0; background: none; color: var(--accent); cursor: pointer; text-transform: none; padding: 0 3px; }
.gtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.gtile { display: flex; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--sunken); font-weight: 700; font-size: 14px; }
.gtile:has(input:checked) { border-color: var(--accent); background: #e8f0fd; }
.ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 10px; }
.parlays { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.parlay { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.parlay.best { border: 3px solid var(--green); }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.p-title { font-size: 20px; font-weight: 800; }
.p-stats { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 700; }
.edge { padding: 0 5px; border-radius: 5px; margin-top: 1px; }
.edge.good { background: var(--green-soft); color: var(--green); } .edge.bad { background: var(--red-soft); color: var(--red); }
.p-legs { background: var(--sunken); border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.p-leg + .p-leg { margin-top: 5px; }
.p-leg .row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.p-leg .price { white-space: nowrap; }
.best-tag { display: inline-block; margin-top: 6px; background: var(--green); color: #fff; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 6px; }
.p-notes { margin-top: 6px; }
.pager { display: flex; justify-content: space-between; margin: 12px 0; }
.slip-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 8px; }
.slip-legs { background: var(--sunken); border-radius: 8px; padding: 2px 8px; margin-top: 8px; }
.blists { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
/* the Builder's lists: three across when they fit beside the filters, else
   one column of drop-downs beside them (and below everything on a phone) */
@media (min-width: 1400px) { .blists { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blist { margin: 0; }
.b-row { display: grid; grid-template-columns: 2fr 3fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--chip); align-items: start; }
.b-row:last-child { border-bottom: 0; }
.b-who, .b-bet { display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
/* a leg's name opens its last 5 games */
.b-who, .p-leg-who { font: inherit; font-size: 14px; color: inherit; text-align: left; background: none; border: 0;
  padding: 0; cursor: pointer; align-items: flex-start; }
.b-who b, .p-leg-who b { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.b-who:hover b, .p-leg-who:hover b, .b-who.on b, .p-leg-who.on b { color: var(--accent); }
.p-leg-who { flex: 1; min-width: 0; }
/* the Builder's and Whiteboard's lists: a prop, then its lines */
.b-prop { padding: 8px 0 6px; border-bottom: 1px solid var(--chip); }
.b-prop:last-child { border-bottom: 0; }
.b-prop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 3px; }
.b-prop-title { color: var(--muted); font-weight: 700; white-space: nowrap; padding-top: 2px; }
.b-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 4px 0 4px 10px; border-left: 3px solid var(--chip); font-size: 14px; }
.b-opt + .b-opt { margin-top: 2px; }
.b-opt-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-opt .b-act { flex-direction: row; align-items: center; gap: 8px; }
.b-price { font-weight: 800; }
.b-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.after { color: var(--green); font-weight: 800; white-space: nowrap; }
.add-btn { font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--green); border: 0; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.x { font: inherit; font-size: 18px; font-weight: 800; color: var(--red); background: none; border: 0; cursor: pointer; padding: 0 4px; }

/* the Builder on a wide screen: the filters and the parlay each take half
   the left column, the lists the right; each scrolls on its own (app.js
   sizes .tool.fit to the window) */
@media (min-width: 900px) {
  .tool.fit { min-height: 360px; }
  .tool.fit > * { height: 100%; overflow: auto; }
  .tool.fit .tool-side { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; overflow: hidden; }
  .tool.fit .tool-side > * { overflow: auto; margin: 0; min-height: 0; }
  .tool.fit .sec-tabs { position: sticky; top: -12px; background: var(--surface); padding: 8px 0 6px; margin-top: -8px; z-index: 1; }
  .pfilters > summary { pointer-events: none; list-style: none; }
  .pfilters > summary::-webkit-details-marker { display: none; }
}
@media (min-width: 1400px) {
  .blist > summary { pointer-events: none; list-style: none; }
  .blist > summary::-webkit-details-marker { display: none; }
}
.blist > summary { cursor: pointer; }
.blist > summary h2 { display: inline; }
.blist > summary .tiny { display: block; margin: 2px 0 6px; }

/* Users (admins) */
.users { max-width: 640px; margin: 0 auto; }
.users h1 { margin: 6px 0 10px; }
.users h2 { font-size: 17px; margin: 0 0 10px; }
.panel.ok { background: var(--green-soft); color: var(--green); font-weight: 700; }
.user-form { display: grid; gap: 6px; }
.user-form .accent { justify-self: start; padding: 10px 22px; font-size: 16px; }
.user-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--chip); }
.user-row:last-child { border-bottom: 0; }
.user-row .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags { display: inline-flex; gap: 4px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--accent); color: #fff; }
.tag.plain { background: var(--chip); color: var(--muted); }
.user-actions { width: 100%; }
.user-actions summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 14px; }
.user-actions[open] { background: var(--sunken); border-radius: 10px; padding: 10px; }
.user-buttons { display: flex; gap: 8px; margin-top: 10px; }
.small-btn.danger { color: var(--red); border-color: var(--red); }

/* "Copy legs & open DraftKings": phones and tablets only (a touch screen) */
.dk { display: none; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
@media (hover: none) and (pointer: coarse) { .dk { display: flex; } }
.dk-btn { display: block; width: 100%; text-align: center; font: inherit; font-weight: 800; font-size: 15px;
  padding: 11px 12px; border-radius: 10px; border: 0; color: #fff; background: #53a318; text-decoration: none; }
.dk-btn.plain { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.dk-btn.copied::after { content: "  \2713 Copied"; }
.dk-debug { width: 100%; font-size: 11px; color: var(--muted); }
.dk-debug code { display: block; word-break: break-all; margin-top: 4px; }

/* a finished game's stat sheet */
.final-score { font-size: clamp(20px, 1.2vw + 14px, 28px); font-weight: 800; margin: 4px 0; }
.statsheet { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .statsheet { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1500px) { .statsheet { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ss-range { margin: 0; }
.ss-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 4px; }
.ss-head h2 { font-size: 17px; margin: 0; }
.record { font-size: 17px; white-space: nowrap; }
.ss-row { display: grid; grid-template-columns: 22px 1.2fr 1.6fr auto; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 8px; margin-top: 3px; }
.ss-row.hit { background: var(--green-soft); }
.ss-row.miss { background: var(--red-soft); }
.ss-row.push { background: var(--sunken); }
.ss-row .n { color: var(--muted); font-weight: 700; font-size: 13px; }
.ss-row .who, .ss-row .bet { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.ss-row .res { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.tag-out { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 6px; color: #fff; }
.tag-out.hit { background: var(--green); } .tag-out.miss { background: var(--red); } .tag-out.push { background: var(--muted); }

/* the Whiteboard: each role's colour */
.role-safe { --role: #e3f4e9; --role-line: #8fcfa6; }
.role-wild { --role: #fbe7e5; --role-line: #ec9f98; }
.role-research { --role: #efe7fb; --role-line: #b9a0e6; }
.role-traditional { --role: #fdf6d8; --role-line: #e6cf6e; }
.role-word.safe { color: #1a8f47; } .role-word.wild { color: #c8322b; }
.role-word.research { color: #6b45b8; } .role-word.traditional { color: #9a7a06; }
.wb-legs { display: grid; gap: 8px; margin-top: 8px; }
.wb-leg { background: var(--role); border-left: 4px solid var(--role-line); border-radius: 8px; padding: 6px 10px; }
.wb-leg.empty { opacity: .75; }
.wb-leg .b-row { border-bottom: 0; padding: 4px 0 0; }
.wb-by { font-size: 12px; color: var(--muted); }
.wb-by b { color: var(--text); }
.wb-list { margin: 0; }
.wb-list h2 { border-left: 6px solid var(--role-line); padding-left: 8px; }
.wb-prompt { background: var(--sunken); border-radius: 10px; padding: 10px; margin: 8px 0; }
.wb-prompt summary { font-weight: 800; cursor: pointer; }
.wb-text { width: 100%; font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin: 6px 0; }
.wb-buttons { display: flex; gap: 8px; margin-bottom: 8px; }
.wb-buttons a.small-btn { text-decoration: none; color: var(--text); }

/* Config */
.config { max-width: 1400px; margin: 0 auto; }
.config .users { max-width: none; margin: 0; display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.config .users .panel { margin: 0; }
.cfg-h { margin: 22px 0 8px; font-size: 22px; }
.cfg-h3 { margin: 10px 0 6px; font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cfg-groups { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .cfg-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .cfg-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cfg-group { margin: 0; }
.cfg-group h3 { margin: 0; font-size: 16px; }
.cfg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; border-bottom: 1px solid var(--chip); }
.cfg-row.indent { padding-left: 12px; }
.cfg-sub { font-weight: 700; font-size: 14px; margin: 8px 0 2px; }
.cfg-in { width: 90px; flex: none; font: inherit; font-size: 14px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; text-align: right; }
.cfg-in.changed { border-color: var(--accent); background: #e8f0fd; }
.cfg-in.bad { border-color: var(--red); background: var(--red-soft); }
.cfg-table-wrap { overflow-x: auto; }
.cfg-table { border-collapse: collapse; font-size: 13px; }
.cfg-table th { text-align: left; padding: 3px 6px; color: var(--muted); font-weight: 700; }
.cfg-table td { padding: 2px 3px; }
.cfg-table .cfg-in { width: 64px; }
.cfg-tabs { display: flex; gap: 6px; margin: 22px 0 10px; }
.cfg-tabs a, .cfg-tabs .off { padding: 7px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px; }
.cfg-tabs a.on { background: var(--tabs); color: #fff; border-color: var(--tabs); }
.cfg-tabs .off { color: var(--muted); opacity: .6; }
.cfg-save { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.cfg-save .accent { padding: 12px 26px; font-size: 16px; }

/* a prop's last 5 games (recent.html) */
.recent { margin-bottom: 8px; }
.rc-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.rc-head b { font-size: 18px; }
.rc-caption { margin: 10px 0 4px; font-size: 14px; }
.rc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rc-table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 6px; border-bottom: 1px solid var(--border); }
.rc-table td { padding: 6px; border-bottom: 1px solid var(--chip); vertical-align: top; }
.rc-table .rc-val { font-weight: 800; font-size: 15px; white-space: nowrap; }
.rc-table .rc-line { color: var(--muted); }
.rc-table td:first-child { white-space: nowrap; }
.rc-table tr.hit .rc-val, .rc-table tr.hit .rc-mark { color: var(--green); }
.rc-table tr.miss .rc-val, .rc-table tr.miss .rc-mark { color: var(--red); }
.rc-mark { font-weight: 800; text-align: right; }
.rc-sum { font-weight: 700; margin: 6px 0 4px; font-size: 14px; }
.recent + .why-doc { border-top: 2px solid var(--border); padding-top: 6px; }

/* the Whiteboard for everyone else (whiteboard_view.html) */
.wb-view { max-width: 640px; margin: 0 auto; }
.wb-view h1 { margin: 6px 0 2px; }
.wb-wait { padding: 48px 16px; }
.wb-chef { font-size: 20px; font-weight: 800; margin: 0; }
.gpt-tag { background: var(--chip); color: var(--muted); border-radius: 6px; padding: 1px 6px; font-weight: 700; }

/* a prop shows its best line; pressed, all its lines (app.js) */
.b-prop.can-open { cursor: pointer; }
.b-prop .b-lines { display: none; }
.b-prop.open .b-lines { display: block; }
.b-prop.open .best-line { display: none; }
.b-prop.open { background: var(--sunken); border-radius: 8px; margin: 2px -6px; padding-left: 6px; padding-right: 6px; }
.b-more { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; }
.b-more .chev { display: inline-block; transition: transform .15s; }
.b-prop.open .b-more .chev { transform: rotate(180deg); }
.b-opt.is-best { border-left-color: var(--accent); }
.out-tag { display: block; color: var(--muted); font-weight: 600; font-size: 11px; line-height: 1.1; }
.b-opt.out > :not(.b-act) { opacity: .6; }
.b-group { margin: 12px 0 0; padding-bottom: 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); border-bottom: 2px solid var(--border); }
.b-group:first-of-type { margin-top: 4px; }

/* the test site (CASHBLASTER_DEV_SITE=1): an orange DEV badge and line */
.dev-badge { flex: none; align-self: center; background: #f08c1a; color: #101c2e; font-weight: 900; font-size: 12px;
  letter-spacing: .08em; border-radius: 6px; padding: 2px 7px; margin-left: 8px; }
body.dev header.top { border-bottom: 4px solid #f08c1a; }

/* Model Stats (web/model_stats.py) */
.ms-big { font-size: 40px; margin: 8px 0 4px; }
.ms-weeks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 6px; }
.ms-weeks a { padding: 7px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px; }
.ms-weeks a.on { background: var(--tabs); color: #fff; border-color: var(--tabs); }
.ms-sheet { max-width: 1240px; margin: 0 auto; }
.ms-head h1 { margin: 4px 0 2px; }
.ms-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 10px 0 12px; }
.ms-tabs a { padding: 9px 18px; font-weight: 800; text-decoration: none; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ms-tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.ms-empty { padding: 36px 16px; }
.ms-legend { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 12px; }
.ms-legend p { flex-basis: 100%; margin: 4px 0 0; }
.ms-key { padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.ms-cols { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 900px) { .ms-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ms-col { min-width: 0; }
.ms-team { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ms-team svg { width: 54px; height: 54px; flex: none; }
.ms-team div { display: flex; flex-direction: column; font-size: 18px; }
.ms-line, .ms-prop { display: grid; gap: 4px 12px; align-items: baseline; padding: 8px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 6px; font-size: 14px; }
.ms-line { grid-template-columns: 92px repeat(3, minmax(0, auto)); justify-content: start; }
.ms-line-title, .ms-prop-title { font-weight: 800; }
.ms-players { margin-top: 18px; }
.ms-team-small { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 4px; }
.ms-team-small svg { width: 34px; height: 34px; }
.ms-group { margin: 14px 0 6px; padding-bottom: 3px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); border-bottom: 2px solid var(--border); }
.ms-player { margin-bottom: 10px; }
.ms-player-name { margin: 4px 0 3px; }
.ms-prop { grid-template-columns: minmax(110px, 1.2fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); margin-bottom: 4px; padding: 6px 10px; }
@media (max-width: 640px) {
  .ms-line { grid-template-columns: 1fr 1fr; }
  .ms-line-title { grid-column: 1 / -1; }
  .ms-prop { grid-template-columns: 1fr 1fr; }
  .ms-prop-title { grid-column: 1 / -1; }
  .ms-big { font-size: 32px; }
}
.solid-green { background: var(--green) !important; border-color: var(--green) !important; color: #fff; }
.pale-green { background: var(--green-soft) !important; border-color: #b9e2c6 !important; }
.pale-red { background: var(--red-soft) !important; border-color: #f3c3bf !important; }
.solid-red { background: var(--red) !important; border-color: var(--red) !important; color: #fff; }
.solid-green .muted, .solid-red .muted { color: rgba(255, 255, 255, .82); }
.ms-range { margin-bottom: 10px; padding: 0; }
.ms-range summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.ms-range summary::-webkit-details-marker { display: none; }
.ms-range-title { font-weight: 800; font-size: 17px; }
.ms-range .chev { margin-left: auto; color: var(--accent); transition: transform .15s; }
.ms-range[open] .chev { transform: rotate(180deg); }
.ms-range[open] summary { border-bottom: 1px solid var(--border); }
.ms-range > .b-row, .ms-range > p { margin: 0 14px; }
.ms-record { font-weight: 800; background: var(--chip); border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.ms-pick.hit { background: var(--green-soft); }
.ms-pick.miss { background: var(--red-soft); }
.ms-got .ok { color: var(--green); font-weight: 800; }
.ms-got .bad { color: var(--red); font-weight: 800; }

/* Config: the odds key's requests */
.cfg-odds .cfg-h { margin-top: 0; }
.cfg-odds-row { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.cfg-odds-row div { display: flex; flex-direction: column; }
.cfg-big { font-size: 26px; font-weight: 800; }
.cfg-big.cfg-date { font-size: 18px; padding-top: 6px; }
