:root {
  --sky-top: #7cc8ef;
  --sky-mid: #b4e2f7;
  --sky-bot: #eaf8ff;
  --sea: #5fa8d3;
  --sea-deep: #3f86b8;
  --sun: #ffe58a;
  --cloud: #ffffff;
  --cloud-shade: #d7ecf7;

  --text: #1d2340;
  --muted: #5d6690;
  --line: #1d2340;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --chip: #eef4fb;

  --pink: #ff7eb6;
  --pink-deep: #e2589b;
  --teal: #37b3a9;
  --teal-deep: #24877f;
  --good: #3fbf7f;
  --bad: #ff6464;
  --empty: #d7deea;

  --title-font: 'Press Start 2P', monospace;
  --label-font: 'Silkscreen', monospace;
  --body-font: 'Space Mono', ui-monospace, monospace;
  --px: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --sky-top: #0b1030;
    --sky-mid: #1b2257;
    --sky-bot: #3a3477;
    --sea: #232a63;
    --sea-deep: #171c49;
    --sun: #f4f1d0;
    --cloud: #4a4f8c;
    --cloud-shade: #383d78;
    --text: #f1f3ff;
    --muted: #a8b0de;
    --line: #05081c;
    --panel: rgba(24, 28, 66, 0.88);
    --panel-solid: #1a1f4a;
    --chip: #262c63;
    --empty: #3a4180;
  }
}
:root[data-theme='dark'] {
  --sky-top: #0b1030;
  --sky-mid: #1b2257;
  --sky-bot: #3a3477;
  --sea: #232a63;
  --sea-deep: #171c49;
  --sun: #f4f1d0;
  --cloud: #4a4f8c;
  --cloud-shade: #383d78;
  --text: #f1f3ff;
  --muted: #a8b0de;
  --line: #05081c;
  --panel: rgba(24, 28, 66, 0.88);
  --panel-solid: #1a1f4a;
  --chip: #262c63;
  --empty: #3a4180;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--body-font);
  color: var(--text);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-bot) 78%, var(--sea) 78%, var(--sea-deep) 100%) fixed;
  background-color: var(--sky-mid);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* CRT scanlines over everything, purely decorative */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 4px);
  z-index: 50;
}

/* ---------- scenery ---------- */
.scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sun {
  position: absolute; top: 7vh; right: 9vw; width: 88px; height: 88px;
  background: var(--sun);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--sun) 35%, transparent), 0 0 60px 20px color-mix(in srgb, var(--sun) 40%, transparent);
  clip-path: polygon(30% 0, 70% 0, 70% 8%, 85% 8%, 85% 15%, 92% 15%, 92% 30%, 100% 30%, 100% 70%, 92% 70%, 92% 85%, 85% 85%, 85% 92%, 70% 92%, 70% 100%, 30% 100%, 30% 92%, 15% 92%, 15% 85%, 8% 85%, 8% 70%, 0 70%, 0 30%, 8% 30%, 8% 15%, 15% 15%, 15% 8%, 30% 8%);
}
.cloud { position: absolute; image-rendering: pixelated; animation: drift linear infinite; }
.cloud svg { display: block; width: 100%; height: auto; }
.cloud .c1 { fill: var(--cloud); }
.cloud .c2 { fill: var(--cloud-shade); }
.cloud.a { top: 9vh; width: 190px; animation-duration: 90s; animation-delay: -20s; }
.cloud.b { top: 26vh; width: 130px; animation-duration: 120s; animation-delay: -75s; opacity: 0.85; }
.cloud.c { top: 52vh; width: 230px; animation-duration: 150s; animation-delay: -40s; opacity: 0.7; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 260px)); } }
.stars { position: absolute; inset: 0; opacity: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .stars { opacity: 1; } }
:root[data-theme='dark'] .stars { opacity: 1; }
.stars i { position: absolute; width: 3px; height: 3px; background: #fff; animation: twinkle 3s steps(2) infinite; }
@keyframes twinkle { 50% { opacity: 0.2; } }

@media (prefers-reduced-motion: reduce) {
  .cloud, .stars i { animation: none; }
  .cloud.a { left: 5vw; } .cloud.b { left: 60vw; } .cloud.c { left: 20vw; }
}

/* ---------- layout ---------- */
.wrap {
  position: relative; z-index: 1;
  max-width: 600px; margin: 0 auto;
  padding: 28px 16px 48px;
}

header.brand { text-align: center; margin-bottom: 22px; }
.title {
  font-family: var(--title-font);
  font-size: clamp(22px, 6.4vw, 38px);
  line-height: 1.35;
  margin: 0;
  color: var(--pink);
  letter-spacing: 1px;
  text-shadow:
    3px 0 0 var(--line), -3px 0 0 var(--line), 0 3px 0 var(--line), 0 -3px 0 var(--line),
    3px 3px 0 var(--line), -3px -3px 0 var(--line), 3px -3px 0 var(--line), -3px 3px 0 var(--line),
    6px 7px 0 var(--pink-deep);
}
.title a { color: inherit; text-decoration: none; }
.subtitle {
  font-family: var(--label-font);
  color: var(--teal-deep);
  letter-spacing: 0.35em;
  font-size: 13px;
  margin-top: 12px;
  text-transform: uppercase;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .subtitle { color: var(--teal); } }
:root[data-theme='dark'] .subtitle { color: var(--teal); }

/* pixel "notched corner" border */
.px {
  background: var(--panel);
  box-shadow:
    0 calc(var(--px) * -1) 0 var(--line), 0 var(--px) 0 var(--line),
    calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line),
    0 calc(var(--px) * 3) 0 rgba(10, 15, 40, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; margin-bottom: 18px;
  font-family: var(--label-font); font-size: 13px; text-transform: uppercase;
}
.bar .meta { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.bar .num { color: var(--pink-deep); font-weight: 700; }
.bar .timer { color: var(--muted); font-variant-numeric: tabular-nums; }
.icons { display: flex; gap: 6px; flex-shrink: 0; }

.iconbtn {
  font: inherit; cursor: pointer; color: var(--text);
  background: var(--chip); border: 0; width: 36px; height: 36px;
  display: grid; place-items: center;
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
  transition: transform 0.08s;
}
.iconbtn svg { width: 18px; height: 18px; shape-rendering: crispEdges; }
.iconbtn:hover { background: var(--pink); color: #1d2340; }
.iconbtn:active { transform: translateY(2px); }

/* ---------- quote ---------- */
.quote-card { padding: 30px 22px 22px; position: relative; margin-bottom: 22px; }
.quote-card .mark {
  position: absolute; top: -18px; left: 14px;
  font-family: var(--title-font); font-size: 34px; color: var(--teal);
  text-shadow: 3px 0 0 var(--line), -3px 0 0 var(--line), 0 3px 0 var(--line), 0 -3px 0 var(--line);
}
.quote-text {
  font-size: clamp(18px, 4.6vw, 23px); line-height: 1.55; margin: 0;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.quote-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.slots { display: flex; gap: 6px; }
.slot {
  width: 22px; height: 22px; background: var(--empty);
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
.slot.bad { background: var(--bad); }
.slot.good { background: var(--good); animation: pop 0.4s steps(4); }
.slot.cur { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { background: var(--pink); } }
@keyframes pop { 50% { transform: scale(1.35); } }

.left { font-family: var(--label-font); font-size: 12px; color: var(--muted); text-transform: uppercase; }

.hints { display: grid; gap: 10px; margin-bottom: 22px; }
.hint {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 14px; animation: slidein 0.35s steps(5);
}
.hint .tag {
  font-family: var(--label-font); font-size: 11px; text-transform: uppercase;
  background: var(--teal); color: #fff; padding: 3px 7px; flex-shrink: 0;
}
.hint .val { font-size: 15px; overflow-wrap: anywhere; }
.hint.locked { opacity: 0.6; background: transparent; box-shadow: none; outline: 2px dashed var(--muted); outline-offset: -2px; animation: none; }
.hint.locked .tag { background: var(--muted); }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }

/* ---------- guess board (attribute comparison) ---------- */
.board { display: grid; gap: 14px; margin-bottom: 22px; }
.grow { padding: 10px; animation: slidein 0.35s steps(5); }
.grow.right { background: color-mix(in srgb, var(--good) 22%, var(--panel)); }
.gname { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; min-width: 0; }
.gname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gname .av {
  width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--title-font); font-size: 8px; color: #1d2340;
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
.gname .gno { margin-left: auto; font-family: var(--label-font); font-size: 11px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tile {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px;
  min-height: 58px; padding: 6px 4px; text-align: center; color: #10162e;
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
.tile.good { background: var(--good); }
.tile.bad { background: var(--bad); }
.tile.unk { background: var(--empty); }
.tile .tk { font-family: var(--label-font); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
.tile .tv { font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 4px; }
.tile .tt { font-family: var(--label-font); font-size: 10px; text-transform: uppercase; }
.tile.mini { display: inline-flex; flex-direction: row; min-height: 0; padding: 1px 6px; font-size: 12px; font-weight: 700; margin: 4px 4px 0 0; }
.legend { display: block; margin-top: 4px; }
/* pixel arrow */
.arrow { display: inline-block; width: 10px; height: 10px; background: currentColor; flex-shrink: 0; }
.arrow.up { clip-path: polygon(40% 0, 60% 0, 60% 20%, 80% 20%, 80% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%, 0 40%, 20% 40%, 20% 20%, 40% 20%); }
.arrow.down { clip-path: polygon(40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 80% 60%, 80% 80%, 60% 80%, 60% 100%, 40% 100%, 40% 80%, 20% 80%, 20% 60%, 0 60%, 0 40%, 40% 40%); }

/* ---------- guessing ---------- */
.ask {
  font-family: var(--label-font); text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 13px; text-align: center; margin: 0 0 14px; color: var(--text);
}
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }

.person {
  font: inherit; color: var(--text); cursor: pointer; border: 0; text-align: left;
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px;
  transition: transform 0.08s;
}
.person:hover:not(:disabled) { transform: translateY(-2px); background: var(--panel-solid); }
.person:active:not(:disabled) { transform: translateY(2px); }
.person:focus-visible { outline: 3px solid var(--pink); outline-offset: 5px; }
.person .av {
  width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--title-font); font-size: 12px; color: #1d2340;
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
.person .nm { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person.wrong { opacity: 0.45; cursor: not-allowed; }
.person.wrong .nm { text-decoration: line-through 3px var(--bad); }
.person.wrong .av { background: var(--empty) !important; }
.person.right { background: var(--good); color: #0e2a1c; }
.person.shake { animation: shake 0.4s steps(6); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
/* Phones: drop the avatars so a big group fits in three tidy columns */
@media (max-width: 519px) {
  .person { justify-content: center; text-align: center; min-height: 46px; padding: 6px 4px; }
  .person .av { display: none; }
  .person .nm { font-size: 13px; }
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--label-font); font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer; border: 0; color: #fff; background: var(--teal);
  padding: 13px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line), inset 0 -5px 0 var(--teal-deep);
  transition: transform 0.08s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(2px); box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line), inset 0 -2px 0 var(--teal-deep); }
.btn.pink { background: var(--pink); box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line), inset 0 -5px 0 var(--pink-deep); }
.btn.ghost { background: var(--chip); color: var(--text); box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line); }
.btn.small { font-size: 12px; padding: 8px 12px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.wide { width: 100%; }

/* ---------- finished state ---------- */
.done { padding: 22px; text-align: center; margin-bottom: 22px; animation: slidein 0.4s steps(5); }
.done h2 { font-family: var(--title-font); font-size: clamp(16px, 4.5vw, 20px); margin: 0 0 14px; line-height: 1.5; }
.done h2.win { color: var(--good); }
.done h2.lose { color: var(--bad); }
.done .who { font-size: 18px; margin: 0 0 6px; }
.done .who b { color: var(--pink-deep); }
.statrow { display: flex; justify-content: center; gap: 22px; margin: 16px 0 18px; flex-wrap: wrap; }
.stat { min-width: 70px; }
.stat .v { font-family: var(--title-font); font-size: 18px; }
.stat .k { font-family: var(--label-font); font-size: 11px; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.next { margin-top: 16px; font-family: var(--label-font); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.next b { color: var(--text); font-variant-numeric: tabular-nums; }

.dist { display: grid; gap: 6px; margin: 4px auto 0; max-width: 340px; text-align: left; }
.dist .row { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: center; font-family: var(--label-font); font-size: 12px; }
.dist .fill { background: var(--empty); color: #1d2340; padding: 2px 6px; text-align: right; min-width: 22px; width: var(--w); }
.dist .row.me .fill { background: var(--pink); }
.section-label { font-family: var(--label-font); font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); margin: 18px 0 10px; }

.empty-state { padding: 30px 22px; text-align: center; }
.empty-state p { line-height: 1.6; }

/* ---------- dialogs ---------- */
dialog {
  border: 0; padding: 0; color: var(--text); background: var(--panel-solid);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line), 0 12px 0 rgba(0, 0, 0, 0.25);
}
dialog::backdrop { background: rgba(14, 18, 48, 0.55); }
dialog[open] { animation: slidein 0.25s steps(4); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--pink); color: #1d2340; }
.dlg-head h3 { margin: 0; font-family: var(--title-font); font-size: 13px; line-height: 1.4; }
.dlg-head .iconbtn { background: #fff; color: #1d2340; }
.dlg-body { padding: 18px 18px 22px; line-height: 1.6; font-size: 15px; overflow-y: auto; max-height: calc(100dvh - 120px); }
.dlg-body ol { padding-left: 20px; margin: 0; }
.dlg-body li { margin-bottom: 8px; }

.archive-list { display: grid; gap: 8px; }
.archive-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; color: var(--text); text-decoration: none; background: var(--chip);
  font-size: 14px;
}
.archive-list a:hover { background: var(--pink); color: #1d2340; }
.archive-list .badge { font-family: var(--label-font); font-size: 11px; text-transform: uppercase; padding: 2px 6px; background: var(--empty); color: #1d2340; }
.archive-list .badge.won { background: var(--good); }
.archive-list .badge.lost { background: var(--bad); }

/* ---------- leaderboard ---------- */
.linkbtn { font: inherit; color: var(--pink-deep); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-transform: inherit; }
.whoami { font-size: 14px; margin-bottom: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tab {
  font-family: var(--label-font); font-size: 13px; text-transform: uppercase; cursor: pointer;
  border: 0; padding: 9px 6px; background: var(--chip); color: var(--text);
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
.tab.on { background: var(--teal); color: #fff; }
table.lb { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
table.lb th { font-family: var(--label-font); font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 6px; font-weight: 400; }
table.lb td { background: var(--chip); padding: 8px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.lb td.nm { white-space: normal; overflow-wrap: anywhere; font-weight: 700; width: 100%; }
table.lb td.rk { text-align: center; width: 1%; font-size: 16px; }
table.lb tr.me td { background: color-mix(in srgb, var(--pink) 45%, var(--chip)); }
.join { display: grid; gap: 12px; }
.join p { margin: 0; }
.note.center { text-align: center; margin: 10px 0; }
.dlg-body .note { margin: 10px 0 0; }

footer.foot { text-align: center; margin-top: 34px; font-family: var(--label-font); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.15em; }
footer.foot a { color: inherit; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(120px);
  z-index: 60; padding: 10px 16px; font-family: var(--label-font); font-size: 13px; text-transform: uppercase;
  background: var(--text); color: var(--panel-solid); transition: transform 0.25s steps(5);
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 9px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.loading { text-align: center; padding: 40px 0; font-family: var(--label-font); text-transform: uppercase; letter-spacing: 0.2em; }
.loading::after { content: '...'; animation: dots 1.2s steps(4) infinite; display: inline-block; width: 3ch; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes dots { 0% { width: 0; } 100% { width: 3ch; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- admin ---------- */
.card { padding: 20px; margin-bottom: 26px; }
.card h2 { font-family: var(--title-font); font-size: 13px; margin: 0 0 16px; color: var(--pink-deep); line-height: 1.5; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-family: var(--label-font); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .row2 { grid-template-columns: 1fr; } }
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--text); background: var(--panel-solid);
  border: 0; padding: 10px 12px; width: 100%;
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--pink); outline-offset: 3px; }
textarea { min-height: 96px; resize: vertical; }
.wrap.wide { max-width: 860px; }
.note { font-size: 13px; color: var(--muted); margin: -6px 0 14px; line-height: 1.5; }
.actions.start { justify-content: flex-start; align-items: center; }
.dirty { font-family: var(--label-font); font-size: 12px; text-transform: uppercase; color: var(--pink-deep); }
.ptable { display: grid; gap: 10px; margin-bottom: 18px; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; background: var(--chip); align-items: center; }
.prow .name { grid-column: 1 / -1; }
.prow input, .prow select { font-size: 15px; padding: 7px 9px; }
.prow .rm { justify-self: end; grid-column: 1 / -1; }
.phead { display: none; }
@media (min-width: 720px) {
  .prow, .phead { grid-template-columns: 1.4fr 0.9fr 1.3fr 0.9fr 1fr 34px; }
  .prow .name, .prow .rm { grid-column: auto; }
  .phead { display: grid; gap: 8px; padding: 0 10px; font-family: var(--label-font); font-size: 11px; text-transform: uppercase; color: var(--muted); }
}
.rm { border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0 6px; }
.rm:hover { color: var(--bad); }
.import summary { cursor: pointer; font-family: var(--label-font); font-size: 13px; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 12px; }
.import textarea { margin-bottom: 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; background: var(--chip); font-size: 14px; }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 16px; padding: 0 4px; line-height: 1; }
.chip button:hover { color: var(--bad); }
.inline { display: flex; gap: 10px; }
.inline input { flex: 1; min-width: 0; }
.qlist { display: grid; gap: 12px; }
.qitem { padding: 12px 14px; background: var(--chip); display: grid; gap: 6px; }
.qitem .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--label-font); font-size: 12px; text-transform: uppercase; }
.qitem .q { font-size: 14px; overflow-wrap: anywhere; }
.qitem .by { font-size: 13px; color: var(--muted); }
.qitem .btns { display: flex; gap: 8px; }
.pill { padding: 2px 6px; background: var(--empty); color: #1d2340; }
.pill.today { background: var(--pink); }
.pill.future { background: var(--teal); color: #fff; }
.err { white-space: pre-line; color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }
