/* Holiday Block Party booth app: the counter's shade card.
 * One white sheet, black print, coral for action and the chosen pan, deep purple
 * only for "you are here". No cream or beige, no card boxes, no drop shadows. */
:root {
  --coral: #ff7062; --coral-press: #f25a4b; --coral-wash: rgba(255, 112, 98, .14);
  --plum: #3b2a55;
  --ink: #111111; --ink-soft: #46464b; --ink-faint: #6b6b72;
  --paper: #ffffff; --mist: #f4f4f5; --hairline: #e4e4e7; --field: #8a8a91; --rule: #111111;
  --warn: #fff3c4; --warn-ink: #5b4a00; --danger: #b3261e;
  --display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --ui: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --col: 720px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scrollbar-color: #c8c8cd var(--paper); }
body { margin: 0; background: #ffffff; color: var(--ink); font: 400 17px/1.5 var(--ui); -webkit-text-size-adjust: 100%; caret-color: var(--coral); }
::selection { background: var(--coral-wash); color: var(--ink); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
/* Step headings receive focus in code (tabindex="-1") so screen readers announce
 * each new screen. They are not controls, so they never show a focus ring. */
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }
img { max-width: 100%; }

/* ---------- practice warning ---------- */
.practice-banner { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: center;
  background: var(--warn); color: var(--warn-ink); padding: 8px 16px; font-size: 13px; line-height: 1.35; text-align: center; border-bottom: 1px solid #e6d58a; }
.practice-banner strong { letter-spacing: .08em; }

/* ---------- shell ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--hairline); }
.bar, .steps { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo { height: 34px; width: auto; display: block; }
.event-name { font: 600 clamp(16px, 2.6vw, 20px)/1.15 var(--display); text-align: right; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: clamp(14px, 4vw, 32px); margin: 0 auto; }
.steps li { position: relative; padding: 10px 0 12px; font: 600 14px/1 var(--ui); color: var(--ink-faint); white-space: nowrap; }
.steps li.past { color: var(--ink); }
.steps li.current { color: var(--plum); font-weight: 800; }
.steps li.current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; background: var(--plum); }

.sheet { max-width: var(--col); margin: 0 auto; padding: clamp(24px, 5vw, 44px) var(--gutter) 72px; }
.fatal { padding: 20px 0; font-weight: 600; }

/* ---------- the counter edge: real Powder pans, edge to edge (details step) ---------- */
.counter { display: flex; justify-content: center; gap: clamp(6px, 1.2vw, 14px); padding: clamp(18px, 3vw, 28px) var(--gutter) 0; overflow: hidden; background: #fff; }
.counter img { flex: 1 1 0; min-width: 0; max-width: 88px; height: auto; aspect-ratio: 1; display: block; }
.counter[hidden] { display: none; }

/* ---------- type ---------- */
#step-details h1 { font-size: clamp(34px, 7vw, 50px); line-height: 1.06; }
h1 { font: 500 clamp(36px, 8vw, 76px)/1.02 var(--display); letter-spacing: -.01em; margin: 0 0 14px; outline: none; text-wrap: balance; }
.dot { color: var(--coral); }
.sub { font: 600 24px/1.2 var(--display); margin: 40px 0 6px; }
.lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 28px; max-width: 58ch; }
.lead strong { color: var(--ink); }
.hint { font-size: 14px; color: var(--ink-faint); margin: 6px 0 0; }
.error { color: var(--danger); font-size: 15px; font-weight: 600; margin: 8px 0 0; }
.error:empty { display: none; }

/* ---------- details form ---------- */
.details-form { max-width: 560px; }
.field { margin-bottom: 20px; }
label { font: 700 15px/1.3 var(--ui); display: block; }
input[type=text], input[type=email] { display: block; width: 100%; margin-top: 8px; padding: 0 16px; height: 56px; font: 500 18px var(--ui);
  color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 6px; appearance: none; }
input[type=text]:focus-visible, input[type=email]:focus-visible { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(59, 42, 85, .22); }
input[aria-invalid="true"] { border-color: var(--danger); }
.notice { font-size: 15px; color: var(--ink-soft); margin: 4px 0 28px; max-width: 60ch; }

.alist { margin: 0 0 28px; padding: 20px 0 0; border: 0; border-top: 1px solid var(--hairline); }
.alist legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font: 600 20px/1.2 var(--display); }
.check { display: flex; gap: 14px; align-items: flex-start; font-weight: 400; cursor: pointer; clear: both; position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 28px; height: 28px; margin-top: 1px; border: 1.5px solid var(--field); border-radius: 5px; display: grid; place-items: center; color: transparent; background: #fff; transition: background .18s var(--ease), border-color .18s var(--ease); }
.check input:checked + .box { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.check input:focus-visible + .box { outline: 3px solid var(--plum); outline-offset: 3px; }
.check strong { display: block; font-size: 17px; }
.check small { display: block; font-size: 14px; line-height: 1.45; color: var(--ink-soft); margin-top: 4px; max-width: 56ch; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 28px; }
.btn { font: 700 17px/1 var(--ui); border-radius: 6px; padding: 0 26px; min-height: 56px; cursor: pointer; border: 0; }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: var(--coral-press); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .55; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); padding: 0 4px; min-height: 48px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.btn-quiet:hover { color: var(--plum); }
.btn.small { min-height: 40px; font-size: 14px; }

/* ---------- matching: the shade strips ---------- */
.products { display: grid; gap: 34px; }
.product-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--rule); margin-bottom: 14px; }
.product-title { font: 600 24px/1.15 var(--display); margin: 0; }
.product-title .price { font: 500 15px var(--ui); color: var(--ink-faint); margin-left: 8px; }
.product-state { display: flex; align-items: center; gap: 12px; font: 600 15px var(--ui); color: var(--ink-faint); }
.product-state.on { color: var(--ink); }
.product-state .code { font: 800 20px/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.product-state button { font: 600 14px var(--ui); color: var(--ink); background: none; border: 0; padding: 6px 2px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 36px; }

.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 0; }
.pan { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0 0 2px; background: #fff; border: 0; cursor: pointer; font: inherit; color: var(--ink); }
.pan .swatch { display: block; aspect-ratio: 1; overflow: hidden; background: #fff; margin: 6px 4px 0; border-radius: 4px; transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.pan img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Swatch shapes come from tools/build-swatches.py: whole round pans, level sticks, colour bands. */
.pan.is-pan .swatch { border-radius: 50%; padding: 4px; }
.pan.is-stick .swatch { aspect-ratio: 180 / 223; }
.pan.is-band img { object-fit: cover; }
.pan.is-photo img { object-fit: cover; transform: scale(1.45); }
.pan .code { display: block; margin: 7px 3px 4px; padding: 5px 0; font: 800 16px/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .01em; text-align: center; border-radius: 4px; }
.pan:hover .swatch { transform: translateY(-2px); }
.pan[aria-checked="true"] .swatch { transform: translateY(-6px); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--coral); }
.pan[aria-checked="true"] .code { background: var(--ink); color: #fff; }
/* Unchosen pans keep their true colour: staff compare shades by eye. */
.pan[aria-checked="true"] { z-index: 1; }
.pan:focus-visible { outline: none; }
.pan:focus-visible .swatch { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--plum); }
/* Hydrating photos are a tall bottle on white: crop to the shade-filled body. */

.retired { font-size: 14px; color: var(--ink-faint); margin: 10px 0 0; }

/* ---------- review: the shade card ---------- */
.card-sheet { border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); padding: 18px 0 8px; margin-top: 8px; }
.who { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0 0 12px; }
.who dt { color: var(--ink-faint); font-size: 15px; }
.who dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.matched { list-style: none; padding: 0; margin: 0; }
.matched li { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.matched .thumb { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.matched .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.matched .thumb.is-band img { object-fit: cover; }
.matched .thumb.is-photo img { object-fit: cover; transform: scale(1.45); }
.matched .name { font: 600 19px/1.2 var(--display); }
.matched .price { display: block; font: 400 14px var(--ui); color: var(--ink-faint); margin-top: 2px; }
.matched .code { font: 800 30px/1 var(--ui); font-variant-numeric: tabular-nums; }
.consent-line { font-size: 15px; margin: 10px 0 8px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.preview { display: block; width: 100%; height: 680px; overflow: hidden; border: 1px solid var(--hairline); border-radius: 6px; background: #fff; margin-top: 12px; }

/* ---------- done ---------- */
.receipt { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--rule); }
.receipt li { padding: 12px 0; border-bottom: 1px solid var(--hairline); font-weight: 600; }
.receipt li span { display: block; font-weight: 400; font-size: 14px; color: var(--ink-faint); }

/* ---------- practice records: deliberately quiet ---------- */
.records { margin-top: 64px; padding-top: 14px; border-top: 1px solid var(--hairline); color: var(--ink-faint); font-size: 14px; }
.records summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; gap: 8px; }
.count { font: 700 12px var(--ui); background: var(--mist); color: var(--ink-soft); border-radius: 999px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.records-list { padding-left: 18px; margin: 10px 0; }

/* ---------- phone ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar { min-height: 60px; }
  .logo { height: 28px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .steps li { font-size: 13px; text-align: center; }
  .strip { grid-template-columns: repeat(4, 1fr); }
  .btn-primary { width: 100%; }
  .sticky-actions { margin-top: 18px; position: sticky; bottom: 0; background: #fff; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); z-index: 5; }
  .who { grid-template-columns: 1fr; gap: 0; }
  .who dd { margin-bottom: 8px; }
  .matched li { grid-template-columns: 60px 1fr auto; gap: 12px; }
  .matched .thumb { width: 60px; height: 60px; }
  .matched .code { font-size: 24px; }
}
/* ---------- wide screens: laptop and landscape tablet ---------- */
@media (min-width: 1100px) {
  :root { --col: 1080px; }
  #step-details:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); grid-template-rows: auto 1fr; column-gap: 64px; align-items: start; }
  #step-details h1 { grid-column: 1; grid-row: 1; margin-top: 4px; font-size: clamp(40px, 3.4vw, 50px); line-height: 1.06; }
  #step-details .lead { grid-column: 1; grid-row: 2; }
  #step-details .details-form { grid-column: 2; grid-row: 1 / span 2; max-width: none; }
  #step-match .lead { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .pan[aria-checked="true"] .swatch { transform: none; }
}
