/* Layout: one centred column over the board; panels are slightly see-through so Mars shows behind them.
   Single dark theme on purpose: the page is space, like the area around the game board. */
:root {
  --bg: #07080d;
  --surface: rgb(54 42 37 / 0.8);
  --surface-2: rgb(72 56 48 / 0.88);
  --surface-solid: #1e1715;
  --fg: #f1e5df;
  --muted: #a9958d;
  --line: rgb(255 235 225 / 0.12);
  --rust: #e8683a;
  --rust-soft: rgb(232 104 58 / 0.18);
  --ocean: #5ab8dd;
  --ocean-soft: rgb(42 111 153 / 0.35);
  --greenery: #86c977;
  --greenery-soft: rgb(78 125 51 / 0.3);
  --gold: #e6b845;
  --gold-soft: rgb(230 184 69 / 0.18);
  --on-accent: #1a0d08;
  --tag-plant: #5aa83f;
  --tag-earth: #3c8fd0;
  --tag-space: #8a7cc4;
  --tag-building: #9b6634;
  --tag-jovian: #d8903f;

  /* Board */
  --board-opacity: 0.92;
  /* Tiles sit quieter than the planet so content over them stays readable. */
  --tile-opacity: 0.8;
  /* Backing for text that would otherwise sit straight on the board. */
  --scrim: rgb(7 8 13 / 0.72);
  --star: #e9ecf5;
  --mars-light: #d6743f;
  --mars-mid: #b0532c;
  --mars-dark: #6a2c16;
  /* Mars nearly fills the screen: space shows only in the corners. */
  --mars-diameter: calc(hypot(100vw, 100vh) * 0.83);
  --ground: rgb(255 210 180 / 0.07);
  --ground-line: rgb(255 214 190 / 0.22);
  --forest: #4e7d33;
  --forest-rim: #22391a;
  --canopy-0: #355e25;
  --canopy-1: #6b9640;
  --canopy-2: #426f2c;
  --ocean-tile: #285f86;
  --ocean-rim: #173a54;
  --ocean-deep: #1f4d6f;
  --ocean-ripple: #8fbcd6;
  --city: #8e918d;
  --city-rim: #4a4d49;
  --city-road: #6c6f6b;
  --city-dome: #c4c7c3;
  --city-glint: #f2f2f2;

  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 10px;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-right: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--body);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }
p { margin: 0; }

button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }

.num, .vp, .place, .data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.92rem; max-width: 65ch; }
/* Text that sits straight on the board stays readable over tiles. */
.brand, .tabs, .content section > h2, .content section > h3, .content .stack > .hint, .content .eyebrow { text-shadow: 0 1px 3px rgb(0 0 0 / 0.95), 0 0 8px rgb(0 0 0 / 0.6); }
.center { text-align: center; padding-block: 3rem; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); }

/* Masthead */
.masthead {
  background: var(--scrim);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--rust);
  padding-top: env(safe-area-inset-top, 0px);
}
.masthead-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-block: 1rem 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter-right);
  display: grid;
  gap: 0.9rem;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand h1 { font-size: clamp(1.25rem, 4vw, 1.7rem); letter-spacing: 0.01em; }
.reconnecting {
  font-size: 0.78rem;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.reconnecting::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); }

/* Board behind the page: one forest per score entered, one city per finished table */
.board { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: var(--board-opacity); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars circle { fill: var(--star); }
.mars-board {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mars-diameter);
  height: var(--mars-diameter);
  transform: translate(-50%, -50%);
  max-width: none;
}
.mars-limb-light { stop-color: var(--mars-light); }
.mars-limb-mid { stop-color: var(--mars-mid); }
.mars-limb-dark { stop-color: var(--mars-dark); }
.tiles { opacity: var(--tile-opacity); }
.ground { fill: var(--ground); stroke: var(--ground-line); stroke-width: 1; vector-effect: non-scaling-stroke; }

.tile-forest .tile-rim { fill: var(--forest-rim); }
.tile-forest .tile-face { fill: var(--forest); }
.canopy-0 { fill: var(--canopy-0); }
.canopy-1 { fill: var(--canopy-1); }
.canopy-2 { fill: var(--canopy-2); }
.tile-ocean .tile-rim { fill: var(--ocean-rim); }
.tile-ocean .tile-face { fill: var(--ocean-tile); }
.water-deep { fill: var(--ocean-deep); opacity: 0.7; }
.water-ripple { fill: none; stroke: var(--ocean-ripple); stroke-width: 1.2; stroke-linecap: round; opacity: 0.8; }
.tile-city .tile-rim { fill: var(--city-rim); }
.tile-city .tile-face { fill: var(--city); }
.city-road { stroke: var(--city-road); stroke-width: 2; stroke-linecap: round; }
.city-dome { fill: var(--city-dome); stroke: var(--city-rim); stroke-width: 0.8; }
.city-glint { fill: none; stroke: var(--city-glint); stroke-width: 1.2; stroke-linecap: round; }

.tile-new { animation: tile-drop 700ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both; transform-box: fill-box; transform-origin: center; }
@keyframes tile-drop {
  from { transform: translateY(-10px) scale(1.25); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}


/* Stage track, drawn like a global-parameter track */
.track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.track li {
  font-family: var(--display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0.35rem 0.25rem;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track li:first-child { border-radius: 6px 0 0 6px; }
.track li:last-child { border-radius: 0 6px 6px 0; }
.track li[data-step='done'] { background: var(--rust-soft); color: var(--rust); }
.track li[data-step='current'] { background: var(--rust); color: var(--on-accent); font-weight: 700; }

.tabs { display: flex; gap: 0.25rem; }
.tabs a {
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.tabs a[aria-current='true'] { color: var(--fg); border-bottom-color: var(--fg); }

/* Content */
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding-block: 1.5rem 4rem;
  padding-left: var(--gutter);
  padding-right: var(--gutter-right);
}
.stack { display: grid; gap: 0.9rem; align-content: start; min-width: 0; }
.stack-lg { display: grid; gap: 2.5rem; }
.narrow { max-width: 28rem; }
.split { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }

.content .stack > .hint {
  justify-self: start;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--scrim);
  backdrop-filter: blur(6px);
}
/* Game picker and seat search share a row; matches drop down over the tables below. */
.round-bar {
  position: relative;
  justify-self: start;
  width: min(34rem, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.seat-search { flex: 1 1 10rem; display: flex; }
.seat-search input {
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  padding-inline: 1.1rem;
  font-family: var(--display);
  font-weight: 600;
}
.seat-search input::placeholder { color: var(--muted); opacity: 1; }
.search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  display: grid;
  gap: 0.3rem;
  border-radius: 14px;
  background: var(--scrim);
  backdrop-filter: blur(6px);
}
.search-results:empty { display: none; }
.search-hit {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background: var(--surface);
}
.search-hit:hover { border-color: var(--ocean); }
.search-where { color: var(--ocean); font-family: var(--display); font-size: 0.9rem; }
.no-match { color: var(--muted); font-size: 0.92rem; padding: 0.25rem 0.5rem; }
select, input {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  width: 100%;
}

.banner {
  background: var(--ocean-soft);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.banner > p { flex: 1; min-width: 0; padding-block: 0.4rem; }
p.banner { padding: 0.75rem 1rem; }
.not-me { font-size: 0.85rem; flex: none; padding-inline: 0.6rem; }
.banner strong { color: var(--ocean); }
.banner-final { background: var(--gold-soft); }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; justify-self: start; }
.segmented button {
  border: 0;
  background: transparent;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}
.segmented button[aria-selected='true'] { background: var(--surface-solid); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.4); }

/* Table cards */
.table-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-card[data-mine] { border-color: var(--ocean); box-shadow: 0 0 0 2px var(--ocean); }
.tag-heading { display: flex; align-items: center; gap: 0.5rem; }
.table-title { display: grid; gap: 0.1rem; min-width: 0; }
.table-title .room { font-size: 0.8rem; color: var(--muted); padding-left: 1.25rem; }
.table-card[data-final] .table-title .room { color: inherit; opacity: 0.85; }
.tag-heading[data-tag]::before {
  content: '';
  flex: none;
  width: 0.8em;
  height: 0.92em;
  background: var(--dot, var(--line));
  clip-path: var(--hex);
}
.tag-heading[data-tag='plant'] { --dot: var(--tag-plant); }
.tag-heading[data-tag='earth'] { --dot: var(--tag-earth); }
.tag-heading[data-tag='space'] { --dot: var(--tag-space); }
.tag-heading[data-tag='building'] { --dot: var(--tag-building); }
.tag-heading[data-tag='jovian'] { --dot: var(--tag-jovian); }

.table-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.table-card[data-final] header { background: var(--rust); color: var(--on-accent); border-bottom-color: var(--rust); }
.table-card[data-final] .chip { background: rgb(255 255 255 / 0.2); color: inherit; }

.chip { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.chip-finished { background: var(--greenery-soft); color: var(--greenery); display: inline-flex; align-items: center; gap: 0.35rem; }
.chip-finished::before { content: ''; width: 0.7em; height: 0.8em; background: var(--canopy-0); clip-path: var(--hex); }

/*
 * Player cards: the top of a green project card, laid out in the units of a printed card 751 wide.
 * Each card covers the frame bottom of the one above, like a played stack.
 */
.card-stack {
  list-style: none;
  margin: 0;
  padding: 0.9rem 0.8rem 1rem;
  display: grid;
  container-type: inline-size;
  --u: calc(100cqw / 751);
}
.card-stack li + li { margin-top: calc(-44 * var(--u)); }

.project-card {
  position: relative;
  display: block;
  width: 100%;
  height: calc(310 * var(--u));
  padding: 0;
  border: 0;
  border-radius: calc(28 * var(--u));
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  box-shadow: 0 -2px 6px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.5);
  transition: transform 120ms ease;
}
.project-card:hover, .project-card:focus-visible { transform: translateY(-3px); }
.project-card[data-highlighted] { outline: 3px solid var(--ocean); outline-offset: 2px; }
.project-card > * { position: absolute; }

.card-frame {
  left: calc(26 * var(--u));
  top: calc(38 * var(--u));
  width: calc(700 * var(--u));
  height: calc(258 * var(--u));
  border-radius: calc(8 * var(--u)) calc(50 * var(--u)) calc(24 * var(--u)) calc(24 * var(--u));
  background: linear-gradient(100deg, #2f9a4a 0%, #50a555 35%, #a3c62c 68%, #cfd70b 88%, #c4d21a 100%);
}
.card-inner {
  position: absolute;
  inset: calc(6 * var(--u)) calc(16 * var(--u)) calc(10 * var(--u)) calc(9 * var(--u));
  border-radius: calc(3 * var(--u)) calc(36 * var(--u)) calc(18 * var(--u)) calc(18 * var(--u));
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 0 0 calc(2 * var(--u)) #000000;
}
.card-inner > * { position: absolute; }

.card-requirements {
  z-index: 2;
  left: 0;
  top: 0;
  width: calc(326 * var(--u));
  height: calc(81 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding-left: calc(108 * var(--u));
  border-top-right-radius: calc(9 * var(--u)) 50%;
  border-bottom-right-radius: calc(9 * var(--u)) 50%;
  background: linear-gradient(100deg, #adadad 0%, #c6c6c6 35%, #dcdcdc 70%, #d6d6d6 100%);
  box-shadow:
    calc(2 * var(--u)) 0 0 #000000,
    calc(8 * var(--u)) 0 0 #aee320,
    calc(10 * var(--u)) 0 0 #000000,
    inset 0 calc(3 * var(--u)) 0 rgb(255 255 255 / 0.45),
    inset 0 calc(-4 * var(--u)) 0 rgb(255 255 255 / 0.65);
}
.card-requirement {
  height: calc(60 * var(--u));
  display: grid;
  place-items: center;
  padding: 0 calc(16 * var(--u));
  border: calc(3 * var(--u)) solid #000000;
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#f9a03a, #ef7a1c);
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(38 * var(--u));
  line-height: 1;
  color: #000000;
}
.card-requirement[data-warning] { background: linear-gradient(#ea5a3a, #c3271c); }
.card-tag-panel {
  z-index: 1;
  left: calc(320 * var(--u));
  right: 0;
  top: 0;
  height: calc(81 * var(--u));
  background: linear-gradient(100deg, #dadada 0%, #c3c3c3 40%, #9f9f9f 75%, #7c7c7c 100%);
  box-shadow:
    inset 0 calc(3 * var(--u)) 0 rgb(255 255 255 / 0.45),
    inset 0 calc(-4 * var(--u)) 0 rgb(255 255 255 / 0.55);
}
.card-banner {
  left: 0;
  right: 0;
  top: calc(81 * var(--u));
  height: calc(95 * var(--u));
  background: var(--card-banner-art) 0 0 / 100% 100%;
  box-shadow: 0 calc(-2.5 * var(--u)) 0 #000000;
}
.card-title {
  position: absolute;
  left: calc(60 * var(--u));
  right: calc(60 * var(--u));
  top: calc(15 * var(--u));
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(46 * var(--u));
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}
.card-edge {
  left: 0;
  right: 0;
  top: calc(140 * var(--u));
  height: calc(40 * var(--u));
  background: var(--card-edge-art) 0 0 / 100% 100%;
}
.card-body {
  left: 0;
  right: 0;
  top: calc(180 * var(--u));
  bottom: 0;
  padding: calc(4 * var(--u)) calc(40 * var(--u)) 0;
  background: #ffffff;
  font-family: 'TeX Gyre Pagella', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-size: calc(32 * var(--u));
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111111;
}

.card-cost {
  z-index: 3;
  left: calc(22 * var(--u));
  top: calc(30 * var(--u));
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  display: grid;
  place-items: center;
  background: var(--card-cost-art) 0 0 / 100% 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(50 * var(--u));
  line-height: 1;
  color: #000000;
  font-variant-numeric: tabular-nums;
}
/* Printed costs never pass two digits; scores can. */
.card-cost[data-long] { font-size: calc(39 * var(--u)); letter-spacing: -0.04em; }
.card-tag {
  z-index: 3;
  left: calc(599 * var(--u));
  top: calc(30 * var(--u));
  width: calc(110 * var(--u));
  height: calc(110 * var(--u));
}
.project-card:not([data-filled]) .card-cost { filter: saturate(0.25); color: #4a4a4a; }

.place { font-size: 0.72rem; color: var(--muted); text-align: center; }
.place:not(:empty) {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.4rem;
  clip-path: var(--hex);
  background: var(--surface-2);
  font-weight: 600;
}
.place[data-place='1'] { background: var(--gold); color: var(--on-accent); font-weight: 700; }
.tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.4rem; border-radius: 4px; }
.tag-leaving { background: var(--rust-soft); color: var(--rust); }

.roster { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.roster li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.75rem; }
.roster-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.roster-edit li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; border-radius: 8px; padding: 0.2rem 0.3rem 0.2rem 0.75rem; }

/* Standings */
.mini-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.mini-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; display: grid; gap: 0.4rem; align-content: start; }
.mini-table[data-final] { border-color: var(--rust); box-shadow: inset 0 3px 0 var(--rust); }
.mini-table ol { margin: 0; padding-left: 1.3rem; }
.placings { list-style: none; padding: 0 !important; display: grid; gap: 0.2rem; }
.placings li { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }

.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.data th, .data td { padding: 0.55rem 0.8rem; text-align: left; white-space: nowrap; }
.data th { font-family: var(--display); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.data tbody tr + tr td { border-top: 1px solid var(--line); }
.data td.num, .data th[data-numeric] { text-align: right; }
.data td[data-final] { color: var(--rust); font-weight: 600; }

.top-scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.top-scores li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: baseline; gap: 0.5rem; }
.top-scores .big { font-size: 1.4rem; color: var(--rust); }
.top-scores small { color: var(--muted); }

.champion {
  background: var(--rust);
  color: var(--on-accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.champion-text { display: grid; gap: 0.35rem; min-width: 0; flex: 1 1 14rem; }
.best-city { width: 96px; height: 96px; flex: none; }
.mc {
  display: inline-block;
  min-width: 1.7rem;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--gold);
  text-align: center;
  font-weight: 600;
}
.champion .eyebrow { color: inherit; opacity: 0.8; }
.champion h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); }

/* Forms and buttons */
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.inline-form > input, .inline-form > select { flex: 1 1 12rem; width: auto; }
.field { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); flex: 1 1 8rem; }
.field input { color: var(--fg); font-size: 1rem; }
.field-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

button {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  cursor: pointer;
  font-weight: 600;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--rust); border-color: var(--rust); color: var(--on-accent); }
button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
button.danger { border-color: var(--rust); color: var(--rust); background: transparent; }
button.danger[data-armed='true'] { background: var(--rust); color: var(--on-accent); }
button.danger.quiet { border-color: transparent; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.checklist label { display: flex; align-items: center; gap: 0.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.75rem; min-height: 44px; cursor: pointer; }
.checklist input { width: 1.2rem; height: 1.2rem; min-height: 0; accent-color: var(--rust); }
.checklist label:has(input:checked) { border-color: var(--rust); background: var(--rust-soft); }

.organizer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius); padding: 0.5rem 0.5rem 0.5rem 1rem; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* Score dialog */
.score-dialog {
  width: min(26rem, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--fg);
  padding: 1.25rem;
}
.score-dialog::backdrop { background: rgb(20 10 6 / 0.55); }
.dialog-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; padding-top: 0.25rem; }
.spacer { flex: 1; }

.toast {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 0;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  background: var(--fg);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  z-index: 10;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
