/* Blackboard Cupping
   Layout: single column, phone first. Reads like a printed cupping sheet: Anton for the big
   labels and cup numbers, IBM Plex Mono for everything written, numbered bowls as the main control.
   Palette (brand, Oct 2026): espresso #1e1b18, cream #f3eee4, sand #d9c5a2, caramel #c3a077,
   rust #a46142, oxblood #7b2e2e, olive #747154. Light on cream by default, espresso in dark mode. */
:root {
  --bg: #f3eee4;
  --surface: #faf7f1;
  --surface-2: #ebe2d1;
  --line: #d9c5a2;
  --line-strong: #c3a077;
  --text: #1e1b18;
  --muted: #6b6257;
  --accent: #a46142;
  --btn-bg: #1e1b18;
  --btn-fg: #f3eee4;
  --btn-hover: #3a332c;
  --bowl-active: #c3a077;
  --bowl-done: #e6d6b9;
  --olive: #747154;
  --olive-text: #5f5d44;
  --oxblood: #7b2e2e;
  --oxblood-text: #7b2e2e;
  --on-result: #f3eee4;
  --wash: #efe2cc;
  --toast-bg: #1e1b18;
  --toast-fg: #f3eee4;
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;

  /* names used by the admin page */
  --taupe: var(--accent);
  --taupe-deep: var(--line-strong);
  --moss: var(--olive-text);
  --cherry: var(--oxblood-text);
  --paper: var(--text);
  --ink: var(--bg);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1b18;
    --surface: #27231f;
    --surface-2: #322c26;
    --line: #4a4137;
    --line-strong: #7d6a52;
    --text: #f3eee4;
    --muted: #b3a58f;
    --accent: #c3a077;
    --btn-bg: #c3a077;
    --btn-fg: #1e1b18;
    --btn-hover: #d9c5a2;
    --bowl-active: #c3a077;
    --bowl-done: #3d342b;
    --olive-text: #b2ae8a;
    --oxblood-text: #d9958a;
    --wash: #2e2720;
    --toast-bg: #f3eee4;
    --toast-fg: #1e1b18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap.wide { max-width: 1120px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { height: 30px; width: auto; display: block; }
.brand .tag { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }
.top-actions { display: flex; gap: 8px; align-items: center; }

main { padding-block: 28px 64px; }

/* Type */
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 400; }
h1 { font-family: var(--display); font-size: 36px; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
h2 { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
.lede { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.divider { height: 0; border: 0; border-top: 1px dashed var(--line); margin: 0; }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
label.field > span.hint, .field > span.hint { font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; width: 100%; min-width: 0;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input[disabled], select[disabled], textarea[disabled] { opacity: .75; }
.code-input { font-size: 30px !important; letter-spacing: .4em; text-align: center; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 13px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }

/* Buttons */
button, .btn {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 8px; padding: 13px 20px; cursor: pointer; border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 10px; min-height: 46px;
}
button:hover, .btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
button.ghost, .btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.ghost:hover, .btn.ghost:hover { border-color: var(--line-strong); background: var(--surface); }
button.link { background: none; border: 0; padding: 4px 0; min-height: 0; color: var(--accent); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover { background: none; }
button.small, .btn.small { padding: 8px 12px; min-height: 36px; font-size: 11px; }
button.danger { background: transparent; color: var(--oxblood-text); border-color: var(--line); }
button.danger:hover { background: transparent; border-color: var(--oxblood-text); }
button.danger.armed { background: var(--oxblood); color: var(--on-result); border-color: var(--oxblood); }
button:disabled { opacity: .45; cursor: not-allowed; }
.full { width: 100%; }
.btn-passkey svg { width: 20px; height: 20px; flex: none; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.open { color: var(--accent); border-color: var(--accent); }
.pill.revealed { color: var(--olive-text); border-color: var(--olive); }
.pill.draft { border-style: dashed; }

/* Event cards */
.event-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text);
  text-transform: none; letter-spacing: 0; font-weight: 400; min-height: 0; }
.event-card:hover { background: var(--surface); border-color: var(--line-strong); }
.event-card h3 { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.event-card .meta { font-size: 12.5px; color: var(--muted); }
.event-card .go { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* Cupping bowls */
.bowls { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.bowl {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%; padding: 0; min-height: 0;
  background: var(--surface); color: var(--text); border: 2px solid var(--line);
  font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: 0; position: relative;
  box-shadow: inset 0 0 0 5px var(--surface);
}
.bowl:hover { background: var(--surface); border-color: var(--line-strong); }
.bowl.done { border-color: var(--line-strong); background: var(--bowl-done); }
.bowl.active { border-color: var(--bowl-active); background: var(--bowl-active); color: #1e1b18; box-shadow: none; }
.bowl.hit::after, .bowl.miss::after { content: ""; position: absolute; right: -2px; top: -2px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--bg); }
.bowl.hit::after { background: var(--olive); }
.bowl.miss::after { background: var(--oxblood); }

.cup-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cup-num { font-family: var(--display); font-size: 64px; line-height: .9; }
.cup-num small { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; font-weight: 600; }
.save-state { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.save-state.err { color: var(--oxblood-text); }

/* Score sliders */
.scores { display: flex; flex-direction: column; gap: 4px; }
.score { display: grid; grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "label val" "range range"; gap: 2px 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.score:last-child { border-bottom: 0; }
.score label { grid-area: label; font-size: 13.5px; font-weight: 500; }
.score output { grid-area: val; text-align: right; font-weight: 600; color: var(--accent); }
.score.unset output { color: var(--muted); font-weight: 400; font-size: 12px; }
.score input[type=range] { grid-area: range; width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }
.score.unset input[type=range] { opacity: .45; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 2px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.total b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; }

/* Results */
.result { border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.result.hit { background: var(--olive); color: var(--on-result); }
.result.miss { background: var(--oxblood); color: var(--on-result); }
.result.none { background: var(--surface-2); }
.result h3 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.result .verdict { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12.5px; }
.facts dt { opacity: .75; }
.facts dd { margin: 0; }
.score-big { font-family: var(--display); font-size: 56px; line-height: 1; }

.notice { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; color: var(--muted); font-size: 13.5px; }
.banner { background: var(--wash); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px; font-size: 13.5px; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg); color: var(--toast-fg); padding: 12px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--oxblood); color: var(--on-result); }

/* Tables (admin) */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px dashed var(--line); vertical-align: top; }
th { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }

.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--line-strong); }
.bar > i.hit { background: var(--olive); }

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

@media (max-width: 420px) {
  h1 { font-size: 30px; }
  .brand .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Label colours */
.sw { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--sw, transparent); box-shadow: inset 0 0 0 1px rgba(30, 27, 24, .18); vertical-align: middle; }
.sw.lg { width: 28px; height: 28px; }
.sw.xl { width: 44px; height: 44px; }
.sw.none { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); }

.picks { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.picks legend { padding: 0; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pick { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:hover { border-color: var(--line-strong); }
.pick.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); background: var(--wash); }
.pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.pick-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pick:has(input:disabled) { cursor: default; }

.bowl.tinted { border-width: 5px; border-color: var(--cup); }

.coffee-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border-radius: 8px; background: var(--surface-2); }
.coffee-card .coffee-name { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.result .sw { box-shadow: 0 0 0 2px var(--on-result); }

/* Intro above the cups */
.intro { display: flex; flex-direction: column; gap: 6px; }
.intro p { max-width: 60ch; }

/* Submit, favourites, feedback, podium */
.submit-box { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--wash); }
.submit-box .count { font-family: var(--display); font-size: 28px; line-height: 1; }
.done-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); background: var(--olive); color: var(--on-result); }
.done-box h3 { font-family: var(--display); font-weight: 400; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.done-box p { font-size: 13px; }
.fav-bowls { display: flex; gap: 10px; flex-wrap: wrap; }
.bowl.fav { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
.bowl.fav::before { content: "\2605"; position: absolute; top: -6px; right: -4px; font-family: var(--mono); font-size: 14px; color: var(--accent); }
.podium { display: flex; flex-direction: column; gap: 10px; }
.podium-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.podium-row.p1 { border-color: var(--line-strong); background: var(--wash); }
.podium-row .place { font-family: var(--display); font-size: 34px; line-height: 1; }
.podium-row .names { font-weight: 600; overflow-wrap: anywhere; }
.podium-row .pts { font-size: 12px; color: var(--muted); white-space: nowrap; }
.me-tag { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }

/* Admin save bar */
.savebar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface); box-shadow: 0 -6px 18px rgba(30, 27, 24, .08); }
.savebar.dirty { border-color: var(--accent); }
.savebar .msg { font-size: 13px; color: var(--muted); }
.savebar.dirty .msg { color: var(--accent); font-weight: 600; }

/* Simple score sheet */
.score.simple { grid-template-areas: "label val" "range range" "ends ends"; }
.score.simple .ends { grid-area: ends; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.score.simple input[type=range] { height: 32px; }

/* Cup picker: centred, even rows, thumb-sized (phone first) */
.cup-picker { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.cup-picker h2 { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .02em; color: var(--text); line-height: 1.1; }
.bowls {
  --size: 52px; --gap: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
  overflow: visible; padding: 10px 4px 4px; margin-inline: auto; width: 100%;
  max-width: calc(var(--cols, 5) * var(--size) + (var(--cols, 5) - 1) * var(--gap) + 8px);
}
.bowls .bowl { width: var(--size); height: var(--size); font-size: 21px; }
.fav-bowls { margin-inline: auto; }
@media (max-width: 360px) { .bowls { --size: 48px; --gap: 10px; } }

/* Coffee pick list: tighter on phones so 10 coffees stay easy to scan */
@media (max-width: 480px) {
  .picks { gap: 6px; }
  .pick { grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 10px 12px; min-height: 48px; }
  .pick .sw.lg { width: 24px; height: 24px; }
  .pick-name { font-size: 14px; line-height: 1.35; }
  .pick-name small { font-size: 11.5px; margin-top: 1px; }
}

/* Keep very dark or very light label colours visible on either background */
.sw { box-shadow: inset 0 0 0 1px rgba(30, 27, 24, .18), 0 0 0 1px var(--line); }
.sw.none { box-shadow: none; }
.bowl.tinted { box-shadow: inset 0 0 0 5px var(--surface), 0 0 0 1px var(--line-strong); }
.bowl.tinted.active { box-shadow: 0 0 0 1px var(--line-strong); }

/* Name or nickname on the podium */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.name-line { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.name-card .pick .sw.none { border-style: solid; }
.name-card .pick.on .sw.none { background: var(--text); border-color: var(--text); box-shadow: inset 0 0 0 4px var(--wash); }

/* Anything marked hidden stays hidden, whatever its layout rule says */
[hidden] { display: none !important; }

/* ---- 21 Oct 2026 (f): simpler tasting flow ---- */

/* Attendee page on phones: no zoom, no sideways drift, only vertical scrolling.
   16px inputs stop iOS zooming in when a field is tapped. */
html.attendee { touch-action: manipulation; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.attendee body { overflow-x: hidden; overflow-x: clip; overscroll-behavior-x: none; width: 100%; }
html.attendee main { overflow-wrap: anywhere; }
html.attendee input[type=text], html.attendee input[type=email], html.attendee input[type=password], html.attendee textarea { font-size: 16px; }
html.attendee input[type=range] { touch-action: pan-y; }

/* Coffee choice: compact rows, folds to the chosen coffee once picked */
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pick { grid-template-columns: 28px minmax(0, 1fr) auto; }
.pick.taken:not(.on) { opacity: .6; }
.taken-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.chosen { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--text); border-radius: 8px; background: var(--wash); }
.dup-warn { color: var(--oxblood-text); font-weight: 600; }
@media (max-width: 480px) {
  .pick { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .chosen { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; }
  .chosen .sw.lg { width: 24px; height: 24px; }
}

/* Same coffee picked for two cups */
.bowl.dup::after { content: "!"; position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--oxblood); color: var(--on-result); font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }

/* Results: tick or cross on each cup */
.bowl.hit::after, .bowl.miss::after { display: none; }
.bowl .mark { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg);
  display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 700; line-height: 1; color: #fff; }
.bowl.hit .mark { background: #5e7a3a; }
.bowl.miss .mark { background: #a3322b; }
.result-line { display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.result-line .score-big { font-size: 44px; }
.result-line .score-big .muted { font-size: 20px; }
.mine { padding-top: 4px; border-top: 1px dashed var(--line); padding-top: 12px; overflow-wrap: anywhere; }

/* Favourites with the attendee's own score under each cup */
.fav-grid { --size: 52px; --gap: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap) var(--gap); margin-inline: auto; width: 100%;
  max-width: calc(var(--cols, 5) * (var(--size) + 12px) + (var(--cols, 5) - 1) * var(--gap)); }
.fav-item { all: unset; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; width: calc(var(--size) + 12px); padding-top: 6px; -webkit-tap-highlight-color: transparent; }
.fav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.fav-item .bowl { width: var(--size); height: var(--size); font-size: 21px; display: grid; place-items: center; pointer-events: none; }
.fav-score { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fav-item.on .fav-score { color: var(--text); }
@media (max-width: 360px) { .fav-grid { --size: 48px; --gap: 8px; } }

/* Answers summary after submitting */
.summary { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.summary li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary li:last-child { border-bottom: 0; }
.sum-name { font-weight: 500; overflow-wrap: anywhere; }
.bowl.sm { width: 36px; height: 36px; font-size: 16px; display: grid; place-items: center; box-shadow: inset 0 0 0 3px var(--surface); }
.bowl.sm.tinted { border-width: 4px; }
.podium-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.podium-row .place { white-space: nowrap; min-width: 48px; }

/* Short event description on the list of cuppings */
.event-card .desc { font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---- 22 Oct 2026: sections, hints, ratings under cups, reveal countdown ---- */

/* Cups grouped by section */
.bowl-group { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.bowl-group + .bowl-group { margin-top: 10px; }
.group-name { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* Rating under each cup while tasting */
.cup-item { display: flex; flex-direction: column; align-items: center; gap: 3px; width: var(--size); }
.cup-rate { font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bowls.rated { row-gap: 8px; }

/* Hint tag: top right of the coffee, styled apart from the name */
.pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: start; max-width: 132px; min-width: 0; }
.hint-tag { display: inline-block; font-size: 11px; font-style: italic; font-weight: 500; line-height: 1.3; letter-spacing: .01em; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 2px 9px; text-align: right; overflow-wrap: anywhere; max-width: 100%; }
.chosen .pick-side { align-self: center; }
.coffee-card { grid-template-columns: 44px minmax(0, 1fr) auto; }
@media (max-width: 360px) { .pick-side { max-width: 104px; } .hint-tag { font-size: 10.5px; padding: 2px 7px; } }

/* "Your answers are in" fades away after a few seconds */
.done-box { transition: opacity .4s ease, transform .4s ease; }
.done-box.leaving { opacity: 0; transform: translateY(-8px); }

/* Answers summary: tier in small under the coffee */
.sum-name small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 1px; }

/* Favourites: up to 5 cups per row, centred */
.fav-grid { max-width: calc(var(--cols, 5) * var(--size) + (var(--cols, 5) - 1) * var(--gap)); }
.fav-item { width: var(--size); }
@media (max-width: 360px) { .fav-grid { --size: 46px; --gap: 9px; } }

/* Reveal countdown */
html.cd-open, html.cd-open body { overflow: hidden; }
.countdown { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); color: var(--text);
  padding: 24px; text-align: center; transition: opacity .45s ease; }
.countdown.done { opacity: 0; pointer-events: none; }
.cd-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cd-title { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); max-width: 30ch; }
.cd-label { font-family: var(--display); font-size: 30px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }
.cd-num { font-family: var(--display); font-weight: 400; font-size: min(52vw, 46vh); line-height: .95; font-variant-numeric: tabular-nums; }
.cd-num.pop { animation: cd-pop .9s ease-out; }
@keyframes cd-pop { from { transform: scale(1.18); opacity: .35; } 30% { opacity: 1; } to { transform: scale(1); } }
.countdown.big .cd-label { font-size: 56px; }
.countdown.big .cd-title { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .cd-num.pop { animation: none; } .done-box, .countdown { transition: none; } }

/* Admin: sections editor and answer key groups */
.section-row { display: grid; grid-template-columns: minmax(0, 2fr) 110px 110px auto; gap: 10px; align-items: end; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.section-row .sec-count { padding-bottom: 12px; white-space: nowrap; }
.sec-count-field { max-width: 220px; }
.key-group { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 560px) {
  .section-row { grid-template-columns: 1fr 1fr; }
  .section-row label:first-child { grid-column: 1 / -1; }
  .section-row .sec-count { grid-column: 1 / -1; padding-bottom: 0; }
}

/* Admin: results screen for the projector */
html.screen-mode .top-actions { display: none; }
.screen { gap: 40px; }
.screen-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; opacity: .75; }
.screen-bar:hover, .screen-bar:focus-within { opacity: 1; }
.screen-head { text-align: center; align-items: center; }
.screen-title { font-size: clamp(40px, 6.5vw, 96px); line-height: 1; }
.screen h2 { font-size: clamp(14px, 1.4vw, 20px); text-align: center; }
.screen-wait { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding-block: 6vh; }
.screen-big { font-family: var(--display); font-size: clamp(56px, 10vw, 160px); line-height: 1; text-transform: uppercase; color: var(--accent); }
.screen-sub { font-size: clamp(16px, 1.8vw, 26px); color: var(--muted); }
.screen-code { font-family: var(--display); font-weight: 400; font-size: 1.6em; letter-spacing: .12em; color: var(--text); margin-left: 8px; }
.screen-podium { display: flex; flex-direction: column; gap: 14px; max-width: 980px; width: 100%; margin-inline: auto; }
.screen-place { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 18px 28px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.screen-place.p1 { background: var(--wash); border-color: var(--line-strong); padding-block: 26px; }
.screen-place .place { font-family: var(--display); font-size: clamp(40px, 5vw, 76px); line-height: 1; min-width: 2.4em; }
.screen-place.p1 .place { color: var(--accent); }
.screen-place .names { font-family: var(--display); font-size: clamp(28px, 3.6vw, 56px); line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.screen-place.p1 .names { font-size: clamp(34px, 4.6vw, 72px); }
.screen-place .pts { font-size: clamp(14px, 1.6vw, 22px); color: var(--muted); white-space: nowrap; }
.screen-place .me-tag { font-family: var(--mono); font-size: clamp(11px, 1vw, 15px); vertical-align: middle; }
.screen-rank { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: 980px; columns: 2 320px; column-gap: 32px; }
.screen-rank li { break-inside: avoid; display: grid; grid-template-columns: 4em minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: clamp(15px, 1.6vw, 22px); }
.screen-rank .place { font-family: var(--display); font-size: 1.3em; }
.screen-rank .names { font-weight: 600; overflow-wrap: anywhere; }
.screen-rank .pts { color: var(--muted); white-space: nowrap; }
.screen-cups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.screen-cup { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: clamp(14px, 1.3vw, 18px); }
.screen-cup .bowl { width: 60px; height: 60px; font-size: 26px; display: grid; place-items: center; cursor: default; }
.screen-cup b { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .screen-place { gap: 14px; padding: 14px 16px; } }
.score { grid-template-columns: minmax(0, 1fr) auto; }
.score output { white-space: nowrap; }
.fav-item:hover, .fav-item:active { background: none; border: 0; }

/* Admin on a phone: let the single column shrink to the screen */
@media (max-width: 860px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } .admin-grid > * { min-width: 0; } }

/* ---- 22 Oct 2026 (b): up to 6 cups a row, hint beside tier · producer ---- */

/* Cup grid: up to 6 a row, cups a little smaller so 6 fit at 360px and stay thumb-sized */
.bowls { --size: 46px; --gap: 12px; }
.bowls .bowl { font-size: 19px; }
@media (max-width: 360px) { .bowls { --size: 44px; --gap: 10px; } }
@media (max-width: 340px) { .bowls { --size: 40px; --gap: 8px; } .bowls .bowl { font-size: 17px; } }

/* Hint: plain italic text, right-aligned on the tier · producer line, no outline. The name gets the full width. */
.pick-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pick-sub small { margin-top: 0; min-width: 0; flex: 1 1 auto; }
.hint-tag { border: 0; border-radius: 0; padding: 0; flex: 0 1 auto; max-width: 55%; margin-left: auto; text-align: right;
  font-size: 12px; font-style: italic; font-weight: 500; color: var(--accent); line-height: 1.35; overflow-wrap: normal; word-break: normal; }
.pick-side { max-width: none; }
.coffee-card { grid-template-columns: 44px minmax(0, 1fr); }
.facts .dd-hint { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
@media (max-width: 480px) { .hint-tag { font-size: 11.5px; } }
@media (max-width: 360px) { .hint-tag { font-size: 11px; padding: 0; } }
.pick:not(:has(.pick-side)) { grid-template-columns: 28px minmax(0, 1fr); }
@media (max-width: 480px) { .pick:not(:has(.pick-side)) { grid-template-columns: 24px minmax(0, 1fr); } }
