/* ==========================================================================
   Concrete RSVP — styles
   Mobile first. One question per screen. Everything comes from the Concrete
   mark: three greys that darken row by row, and four blue dots.
   The screens walk the same ramp — paper, stone, cement, grey — then blue,
   then charcoal, and back to paper for the pass.
   ========================================================================== */

/* ---------- fonts (self-hosted, SIL Open Font License) ---------- */
/* Barlow: a DIN-like grotesk, the closest open match to the Concrete lettering */
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-ext-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/barlow-latin-ext-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- tokens ---------- */
:root {
  /* the Concrete mark */
  --c1: #babcbb;            /* row 1 — C O N */
  --c2: #7c8081;            /* row 2 — C R E */
  --c3: #525355;            /* row 3 — T E   */
  --blue: #5585d9;          /* the four dots */
  --blue-deep: #3f69bc;     /* the dots' blue, deep enough for white text (5.3:1) */

  /* surfaces, light to dark */
  --paper: #efeeea;
  --stone: #e2e1dd;
  --cement: #cdcecb;
  --charcoal: #46474a;
  --ink: #1f2021;

  /* the host */
  --teal: #84cfc9;          /* nozipcode */

  --alert: #d4472f;

  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(20px, 6vw, 34px);
  --col: 560px;
  --vh: 100vh;              /* app.js keeps this equal to the visible height (keyboard aware) */
  --vtop: 0px;
  --radius: 10px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

/* each screen carries its own colours so text never flickers mid-transition */
[data-theme] {
  --fg: var(--ink); --muted: rgba(31, 32, 33, .62);
  --btn: var(--ink); --btn-fg: #fff;
  --card: rgba(255, 255, 255, .55); --card-fg: var(--ink); --card-on: var(--ink); --card-on-fg: #fff;
  --line: rgba(31, 32, 33, .18); --accent: var(--blue); --dot: var(--blue);
}
[data-theme="paper"]    { --bg: var(--paper); }
[data-theme="stone"]    { --bg: var(--stone); }
[data-theme="cement"]   { --bg: var(--cement); --card: rgba(255, 255, 255, .5); }
[data-theme="grey"]     { --bg: var(--c1); --card: rgba(255, 255, 255, .45); --accent: var(--ink); --dot: var(--blue-deep); --line: rgba(31, 32, 33, .24); }
[data-theme="blue"]     {
  --bg: var(--blue-deep); --fg: #fff; --muted: rgba(255, 255, 255, .76);
  --btn: #fff; --btn-fg: var(--ink);
  --card: rgba(255, 255, 255, .1); --card-fg: #fff; --card-on: #fff; --card-on-fg: var(--ink);
  --line: rgba(255, 255, 255, .34); --accent: #fff; --dot: #fff;
}
[data-theme="charcoal"] {
  --bg: var(--charcoal); --fg: #fff; --muted: rgba(255, 255, 255, .72);
  --btn: #fff; --btn-fg: var(--ink);
  --card: rgba(255, 255, 255, .08); --card-fg: #fff; --card-on: #fff; --card-on-fg: var(--ink);
  --line: rgba(255, 255, 255, .26); --accent: var(--blue); --dot: var(--blue);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button, input, select { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }

.stage {
  position: fixed;
  left: 0; right: 0;
  top: var(--vtop);
  height: var(--vh);
  overflow: hidden;
  isolation: isolate;
  color: var(--fg);
}
.bg, .flood, .grain { position: absolute; inset: 0; z-index: 0; }
.bg { background: var(--paper); }
.flood { clip-path: circle(0px at 50% 50%); will-change: clip-path; pointer-events: none; }
/* cast-concrete texture over every colour: fine grain + a few pores (two tile sizes, so no visible repeat) */
.grain {
  z-index: 1; pointer-events: none;
  background-image: url('/assets/pores.png'), url('/assets/grain.png');
  background-size: 460px 460px, 160px 160px;
}

/* nothing flashes before app.js has set the scene */
html:not(.ready) .welcome { visibility: hidden; }

/* ---------- top bar ---------- */
.bar {
  position: absolute; z-index: 6; left: 0; right: 0; top: 0;
  height: calc(60px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  display: flex; align-items: center; gap: 16px;
  color: var(--fg);
  transition: opacity .3s ease, transform .5s var(--ease-out), color .25s ease .2s;
}
.bar.is-off { opacity: 0; transform: translateY(-14px); pointer-events: none; }
.back {
  flex: none; width: 40px; height: 40px; margin-left: -6px;
  border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .3s var(--spring), color .25s ease .2s, box-shadow .25s ease;
}
.back:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.back:active { transform: scale(.86); }
.back:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* progress: one dot per question — done, current (the brand blue), still to come */
.dots { display: flex; align-items: center; gap: 7px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; opacity: .22; transform: scale(.8);
  transition: transform .5s var(--spring), opacity .3s ease, background-color .3s ease;
}
.dot.on { opacity: 1; transform: scale(1); }
.dot.now { background: var(--dot); opacity: 1; transform: scale(1.35); }
.count { margin-left: auto; font: 600 12px/1 var(--font); letter-spacing: .16em; font-variant-numeric: tabular-nums; }

/* ---------- screens ---------- */
.screens { position: absolute; inset: 0; z-index: 2; }
.screen {
  position: absolute; inset: 0;
  visibility: hidden; pointer-events: none;
  color: var(--fg);
}
.screen.is-active { visibility: visible; pointer-events: auto; }
.screen.is-leaving { visibility: visible; pointer-events: none; }

.scroll {
  position: absolute; inset: 0; z-index: 2;
  overflow: hidden auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(78px + env(safe-area-inset-top, 0px)) var(--pad) calc(22px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;            /* empty space lets you grab the dots underneath */
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.screen.is-active .scroll > * { pointer-events: auto; }

.q { width: 100%; max-width: var(--col); margin: 0 auto; padding-top: clamp(4px, calc(var(--vh) * .035), 44px); }

.kicker {
  margin: 0 0 14px;
  font: 600 12px/1.25 var(--font);
  letter-spacing: .2em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.kicker .num {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px;
  border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor;
  letter-spacing: .08em; font-variant-numeric: tabular-nums;
}

.h {
  margin: 0 0 clamp(18px, calc(var(--vh) * .034), 32px);
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(36px, 10.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -.022em;
  text-wrap: balance;
  outline: none;
}
.h .w { display: inline-block; white-space: pre; will-change: transform; }

/* ---------- text fields ---------- */
.field {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 2px;
}
.field::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .5s var(--ease-out);
}
.field:focus-within::after { transform: scaleX(1); }
.input {
  flex: 1; min-width: 0; width: 100%;
  border: 0; outline: 0; border-radius: 0; background: transparent;
  padding: 8px 0 8px; margin: 0;
  font: 500 clamp(26px, 7.6vw, 38px)/1.2 var(--font);
  letter-spacing: -.01em;
  color: var(--fg); caret-color: var(--accent);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--fg); opacity: .32; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--fg); transition: background-color 9999s ease-out 0s; }
.prefix { flex: none; font: 400 clamp(30px, 8.6vw, 42px)/1 var(--font); opacity: .55; transform-origin: 50% 70%; }

.cc {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 12px 0 14px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font: 600 18px/1 var(--font); letter-spacing: .02em; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.cc:focus-within { outline: 2px solid var(--fg); outline-offset: 3px; }
.cc__select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; color: #1f2021; }

.err {
  display: inline-flex; align-items: center; gap: 9px; margin: 14px 0 0;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--btn); color: var(--btn-fg);
  font: 600 14px/1.25 var(--font);
  transform-origin: 0 50%;
}
.err::before {
  content: '!'; flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--alert); color: #fff; font: 600 13px/1 var(--font);
}
.err:empty { display: none; }

.actions { display: flex; align-items: center; gap: 16px; margin-top: clamp(18px, calc(var(--vh) * .032), 30px); }
.hint { display: none; font: 500 13px/1 var(--font); letter-spacing: .02em; color: var(--muted); }
.hint b { font-weight: 600; color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .hint { display: inline; } }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; margin: 0;
  border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--btn); color: var(--btn-fg);
  font: 600 15px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  transition: transform .28s var(--spring), opacity .2s ease, background-color .2s ease;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.btn svg { flex: none; }
.btn--xl { width: 100%; height: 62px; font-size: 16px; letter-spacing: .22em; }
.btn--light { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn--send { width: 100%; max-width: 440px; height: 60px; }

/* send button: label swaps for four bouncing dots while saving (the mark's dots) */
.btn__dots { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 7px; }
.btn__dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: bob .8s ease-in-out infinite; }
.btn__dots i:nth-child(2) { animation-delay: .1s; }
.btn__dots i:nth-child(3) { animation-delay: .2s; }
.btn__dots i:nth-child(4) { animation-delay: .3s; background: var(--blue); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn__label, .btn.is-busy .btn__icon { visibility: hidden; }
.btn.is-busy .btn__dots { display: flex; }
.status { min-height: 20px; margin: 14px 0 0; font: 500 15px/1.4 var(--font); }
.status:empty { display: none; }

.link { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; cursor: pointer; }
.link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.tiny { margin: 14px 0 0; font: 500 12px/1.3 var(--font); letter-spacing: .16em; text-transform: uppercase; text-align: center; color: var(--muted); }

/* spam trap — off-screen, not display:none (bots skip those) */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- day cards (only when the event has more than one day) ---------- */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; max-width: 440px; margin-bottom: 14px; }
.day {
  position: relative; display: grid; justify-items: center; gap: 4px;
  width: 100%; padding: 14px 8px 12px; margin: 0;
  border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--card); color: var(--card-fg);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .4s var(--spring), background-color .2s ease, color .2s ease;
}
.day__num { font: 500 44px/1 var(--font); letter-spacing: -.02em; }
.day__label { font: 600 11px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; }
.day .tick { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; transform: scale(0); transition: transform .4s var(--spring); }
.day .tick svg { width: 14px; height: 14px; }
.day:active { transform: scale(.96); }
.day[aria-checked="true"] { background: var(--card-on); color: var(--card-on-fg); box-shadow: none; }
.day[aria-checked="true"] .tick { transform: scale(1); }
.day:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- sitting cards ---------- */
.slots { display: grid; gap: 10px; max-width: 440px; }
.slot {
  position: relative; display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 76px; padding: 12px 18px 12px 14px; margin: 0;
  border: 0; border-radius: var(--radius); cursor: pointer; text-align: left;
  background: var(--card); color: var(--card-fg);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .35s var(--spring), background-color .2s ease, color .2s ease, opacity .25s ease, box-shadow .2s ease;
  touch-action: manipulation;
}
.slot__text { flex: 1; display: grid; gap: 6px; min-width: 0; }
.slot__head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.slot__name { font: 600 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.slot__time { font: 500 clamp(21px, 6vw, 25px)/1.1 var(--font); letter-spacing: -.01em; }
.slot__full {
  display: none; flex: none; padding: 4px 8px; border-radius: 999px;
  font: 600 10px/1 var(--font); letter-spacing: .16em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.slot:active { transform: scale(.985); }
.slot[aria-checked="true"] { background: var(--card-on); color: var(--card-on-fg); box-shadow: none; transform: scale(1.015); }
.slot[aria-disabled="true"] { cursor: not-allowed; opacity: .55; transform: none; }
.slot[aria-disabled="true"] .slot__time { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.slot[aria-disabled="true"] .slot__full { display: inline-block; }
.slot[aria-disabled="true"] .key { visibility: hidden; }
.slot:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* the A / B key that turns into a tick (sittings and +1 / +2) */
.key {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px currentColor;
  font: 600 13px/1 var(--font); letter-spacing: .04em;
  transition: background-color .2s ease, color .2s ease, transform .4s var(--spring), box-shadow .2s ease;
}
.key svg { display: none; width: 16px; height: 16px; }
[aria-checked="true"] > .key { background: var(--blue); color: #fff; box-shadow: none; transform: scale(1.06); }
[aria-checked="true"] > .key b { display: none; }
[aria-checked="true"] > .key svg { display: block; }

/* ---------- +1 / +2 ---------- */
.choices { display: grid; gap: 10px; max-width: 440px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 72px; padding: 10px 18px 10px 14px; margin: 0;
  border: 0; border-radius: var(--radius); cursor: pointer; text-align: left;
  background: var(--card); color: var(--card-fg);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .35s var(--spring), background-color .2s ease, color .2s ease, opacity .25s ease, box-shadow .2s ease;
  touch-action: manipulation;
}
.choice__text { flex: 1; display: grid; gap: 6px; min-width: 0; }
.choice .label { font: 500 clamp(24px, 7vw, 28px)/1 var(--font); letter-spacing: -.02em; }
.choice .note { font: 600 11px/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.choice .note:empty { display: none; }
.choice .seats { display: flex; gap: 5px; }
.choice .seats i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; opacity: .5; transition: transform .4s var(--spring), opacity .2s ease; }
.choice .seats i:first-child { background: var(--blue); opacity: 1; }
.choice:active { transform: scale(.985); }
.choice[aria-checked="true"] { background: var(--card-on); color: var(--card-on-fg); box-shadow: none; transform: scale(1.015); }
.choice[aria-checked="true"] .seats i { opacity: 1; transform: scale(1.12); }
.choice:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- dots & art (draggable, they spring back) ---------- */
.deco { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.sticker {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: var(--w, 30%);
  transform: translate(-50%, -50%);
  z-index: var(--z, 1);
  pointer-events: auto; touch-action: none; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.sticker.is-held { cursor: grabbing; z-index: 30; }
.sticker__slap { opacity: 0; will-change: transform, opacity; }
.sticker__float { position: relative; animation: float var(--fd, 7s) ease-in-out var(--fl, 0s) infinite; }
.screen:not(.is-active):not(.is-leaving) .sticker__float { animation-play-state: paused; }
.dotart { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--dot); transition: background-color .3s ease; }
.sticker svg { display: block; width: 100%; height: auto; overflow: visible; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(var(--fx, 0px), var(--fy, -6px), 0); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.seal__ring { transform-box: view-box; transform-origin: 50px 50px; animation: spin 28s linear infinite; }

/* question screens: the mark's four dots gather in the corner, one more per question */
.s-q { --g: min(13vw, 66px, calc(var(--vh) * .085)); --w: var(--g); --a: calc(var(--g) * 1.25); --b: calc(var(--a) + var(--g) * 1.96); }
.s-q1 { --x: calc(100% - var(--b)); --y: calc(100% - var(--b)); --fd: 7.4s; }
.s-q2 { --x: calc(100% - var(--a)); --y: calc(100% - var(--b)); --fd: 6.6s; --fl: -1.4s; }
.s-q3 { --x: calc(100% - var(--b)); --y: calc(100% - var(--a)); --fd: 8s; --fl: -2.6s; }
.s-q4 { --x: calc(100% - var(--a)); --y: calc(100% - var(--a)); --fd: 7s; --fl: -3.8s; }

/* the table: you (blue) and your +1 / +2 take their seats around it */
.s-table { --w: min(44vw, 210px, calc(var(--vh) * .26)); --x: calc(100% - var(--w) * .6); --y: calc(100% - var(--w) * .66); --fy: -4px; --fd: 8s; }
.table .top { fill: var(--c1); }
.table .rim { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.table .seat { transform-box: view-box; transform-origin: 100px 100px; transition: transform .7s var(--spring); }
.table .seat circle { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .5s var(--spring); fill: var(--paper); }
.table .seat--you circle { fill: var(--blue); }
.table .seat.is-off circle { transform: scale(0); }

/* ---------- welcome ---------- */
.screen--welcome .scroll { padding-top: calc(18px + env(safe-area-inset-top, 0px)); display: flex; }
.welcome { width: 100%; max-width: var(--col); margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }

.host { flex: none; display: flex; align-items: center; gap: 12px; margin: 0; font: 600 12px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; }
.host__chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--teal); }
.host__chip img { display: block; width: 104px; height: auto; }

/* the mark: three rows of letters + the four dots (which can be flicked) */
.mark { position: relative; flex: 1 1 auto; min-height: clamp(170px, calc(var(--vh) * .3), 520px); display: grid; place-items: center; padding: clamp(10px, calc(var(--vh) * .03), 34px) 0; container-type: size; }
.mark__box { position: relative; height: 32vh; aspect-ratio: 1123 / 1635; }
@supports (width: 1cqh) { .mark__box { height: min(100cqh, 120cqw); } }
.mark__row { position: absolute; left: 0; width: 100%; display: block; overflow: visible; }
.s-ld { --w: 8.1%; --z: 2; --fy: -3px; }
.s-ld1 { --x: 79.79%; --y: 79.47%; --fd: 6.2s; }
.s-ld2 { --x: 95.70%; --y: 79.47%; --fd: 7.1s; --fl: -2s; }
.s-ld3 { --x: 79.79%; --y: 97.16%; --fd: 6.6s; --fl: -3.1s; }
.s-ld4 { --x: 95.70%; --y: 97.16%; --fd: 7.6s; --fl: -1.2s; }
.s-ld .dotart { background: var(--blue); }
/* a bigger invisible handle so the small dots are easy to grab */
.s-ld::before { content: ''; position: absolute; inset: -60%; }

.welcome__copy { flex: none; padding-top: 4px; }
.h--welcome { font-size: clamp(38px, 11vw, 60px); margin-bottom: 16px; }
.facts { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 14px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(31, 32, 33, .08);
  font: 500 15px/1 var(--font); white-space: nowrap;
}
.pip { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.soldout { margin: 0; padding: 18px 20px; border-radius: var(--radius); background: var(--ink); color: #fff; font: 500 20px/1.25 var(--font); }

/* ---------- done / pass ---------- */
.q--done { padding-bottom: 8px; }
.screen--done .scroll { padding-top: calc(30px + env(safe-area-inset-top, 0px)); }
.screen--done .h { margin-bottom: clamp(20px, calc(var(--vh) * .032), 30px); }
.pass-wrap { position: relative; width: min(100%, 400px); margin: 0 0 clamp(20px, calc(var(--vh) * .03), 28px); filter: drop-shadow(0 18px 28px rgba(31, 32, 33, .14)) drop-shadow(0 2px 3px rgba(31, 32, 33, .1)); }
.pass {
  --cut: 78px;                     /* height of the stub below the perforation */
  --foot: 40px;                    /* the "hosted by" strip */
  position: relative; background: #fff; color: var(--ink);
  border-radius: 14px; padding: 18px 20px 0; overflow: hidden;
  transform-origin: 30% 60%;
  -webkit-mask:
    radial-gradient(circle 10px at 0 calc(100% - var(--cut) - var(--foot)), #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 10px at 100% calc(100% - var(--cut) - var(--foot)), #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 10px at 0 calc(100% - var(--cut) - var(--foot)), #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 10px at 100% calc(100% - var(--cut) - var(--foot)), #0000 97%, #000) right / 51% 100% no-repeat;
}
.pass__head { display: flex; align-items: center; gap: 14px; padding-right: 74px; margin-bottom: 18px; }
.pass__logo { display: block; flex: none; width: 40px; height: auto; }
.pass__event { display: grid; gap: 5px; }
.pass__title { margin: 0; font: 600 13px/1.15 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.pass__venue { margin: 0; font: 500 12px/1.2 var(--font); letter-spacing: .06em; color: rgba(31, 32, 33, .6); }
.pass dl { margin: 0; }
.pass dt { margin: 0 0 4px; font: 600 10px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: rgba(31, 32, 33, .5); }
.pass dd { margin: 0; font: 500 17px/1.2 var(--font); overflow-wrap: anywhere; }
.pass__main { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px 14px; padding-bottom: 18px; }
.pass__name { grid-column: 1 / -1; }
.pass__name dd {
  font: 500 clamp(28px, 8.2vw, 36px)/1.05 var(--font); letter-spacing: -.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding-bottom: 2px;
}
.pass__stub { height: var(--cut); display: grid; grid-template-columns: .85fr 1.5fr auto; gap: 12px; align-items: center; border-top: 2px dashed rgba(31, 32, 33, .2); }
.pass__stub dd { font-size: 15px; }
.pass__stub .mono { font-variant-numeric: tabular-nums; letter-spacing: .1em; font-weight: 600; }
.pass__host {
  height: var(--foot); margin: 0 -20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--teal); color: var(--ink);
  font: 600 10px/1 var(--font); letter-spacing: .2em; text-transform: uppercase;
}
.pass__host img { display: block; width: 92px; height: auto; }
.stamp { position: absolute; right: 12px; top: -22px; width: 78px; height: 78px; z-index: 3; }
.stamp .sticker { --x: 50%; --y: 50%; --w: 100%; }
.stamp .sticker__float { animation: none; }

/* "Add to calendar" + "Map" share one row as wide as the pass */
.done__actions { display: flex; flex-wrap: wrap; gap: 10px; width: min(100%, 400px); }
.done__actions .btn { flex: 1 1 auto; padding: 0 18px; gap: 9px; font-size: 13px; letter-spacing: .14em; }
.tiny--done { text-align: left; margin-top: 18px; text-transform: none; letter-spacing: .01em; font-size: 14px; }

.confetti { position: absolute; inset: 0; z-index: 8; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; left: 0; top: 0; display: block; will-change: transform; }

.noscript { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 32px; text-align: center; background: var(--paper); color: var(--ink); font: 500 18px/1.4 var(--font); }

/* ---------- keyboard open: tighten everything ---------- */
.stage.kb .scroll { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
.stage.kb .q { padding-top: 0; }
.stage.kb .h { font-size: clamp(30px, 9vw, 52px); margin-bottom: 12px; }
.stage.kb .kicker { margin-bottom: 10px; }
.stage.kb .actions { margin-top: 14px; }
.stage.kb .deco { opacity: 0; transition: opacity .2s ease; }

/* ---------- short phones ---------- */
/* short phones: the question and its three answers need the room — the table steps aside */
@media (max-height: 720px) {
  .s-table { display: none; }
}

@media (max-height: 640px) {
  .h { font-size: clamp(32px, 9.4vw, 52px); }
  .h--welcome { font-size: clamp(34px, 10vw, 52px); margin-bottom: 12px; }
  .facts { margin-bottom: 14px; }
  .facts li { height: 32px; font-size: 14px; }
  .btn--xl { height: 56px; }
  .slot { min-height: 66px; }
  .choice { min-height: 62px; }
  .s-table { --w: min(36vw, 150px, calc(var(--vh) * .24)); }
}

/* ---------- tablet / desktop ---------- */
@media (min-width: 760px) {
  .scroll { display: flex; padding-left: 6vw; padding-right: 6vw; }
  .q { margin: auto; padding: 0 0 6vh; max-width: var(--col); }
  .kicker { font-size: 13px; }
  .s-q { --g: min(5vw, 74px, calc(var(--vh) * .085)); --a: calc(var(--g) * 1.7); }
  .s-table { --w: min(25vw, 320px, calc(var(--vh) * .4)); --x: calc(100% - var(--w) * .72); --y: calc(100% - var(--w) * .72); }
  .screen--done .scroll { padding-top: 40px; }
  .q--done { padding-bottom: 0; }
}

/* wide screens: the mark on the left, the invitation on the right */
@media (min-width: 900px) {
  .screen--welcome .scroll { padding-top: 32px; }
  .welcome {
    max-width: 1080px; margin: auto; min-height: 0; height: min(100%, 760px);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: 1fr auto auto 1fr;
    column-gap: 7vw; align-items: center;
  }
  .host { grid-column: 2; grid-row: 2; margin-bottom: 28px; }
  .mark { grid-column: 1; grid-row: 1 / -1; height: 100%; min-height: 0; }
  .welcome__copy { grid-column: 2; grid-row: 3; max-width: 540px; }
  .h--welcome { font-size: clamp(48px, 5.4vw, 72px); }
  .welcome__cta { max-width: 420px; }
  .tiny { text-align: left; }
}

/* ---------- reduced motion: keep the colour, drop the bounce ---------- */
@media (prefers-reduced-motion: reduce) {
  .sticker__float, .btn__dots i, .seal__ring { animation: none !important; }
  * { transition-duration: .01ms !important; }
}
