/* Milo's 16th. An invite-only event page: black, white, one blue, and chrome on the "16" only.
   The sign-up page IS the poster (poster/v3, "club night"): Archivo condensed for the poster's
   type, Space Mono for its small blue labels, Big Shoulders Display for the chrome number,
   Hanken Grotesk for the form and everything else. Spacing sits on an 8px grid. Phones first: the sign-up
   page and the ticket each fit one iPhone screen, measured in svh so Safari's bars never cover
   them, with the safe-area insets clear of the notch, Dynamic Island and home bar. Pages stay
   light because the free server sleeps. */
:root {
  --black: #000;
  --white: #fff;
  --grey: #9a9ea8;
  --line: #2e3036;
  --line-2: #474a52;
  --blue: #2f4bff;
  --blue-deep: #2139e0;
  --amber: #f5a700;
  --green: #008a44;
  --bad: #ff5468;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --poster: 'Archivo', 'Arial Narrow', sans-serif;
  --label: 'Space Mono', ui-monospace, monospace;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  --chrome: linear-gradient(180deg, #ffffff 0%, #eceff5 24%, #aeb5c6 46%, #626979 49.5%, #8d94a6 51%, #d7dce8 58%, #f5f6fa 74%, #b9c2dc 100%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--black); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* The small label: the only uppercase on the site. */
.label, .fact dt, label, .badge, .stat span {
  font-family: var(--body);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---- display type --------------------------------------------------------------------- */

.title { margin: 0; font-family: var(--display); font-weight: 800; line-height: 0.9; letter-spacing: -0.01em; }
.title__who, .title__rest { display: block; }
.title__num { display: flex; align-items: flex-start; }
.title__ord { margin: 0.12em 0 0 0.04em; }

/* The one gradient on the site. */
.chrome {
  display: inline-block;
  padding-right: 0.02em;
  line-height: 0.76;
  background-image: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- sign-up: the poster ---------------------------------------------------------------- */

.poster { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; overflow-x: clip; }

/* Fine print grain over the whole poster, like the shared image. */
.bill {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: var(--safe-top) var(--gutter) 0;
  background: #08080a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bill__head { display: flex; justify-content: space-between; }
.bill__head p { margin: 0; font-family: var(--label); font-weight: 700; font-size: 11px; line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; }

/* The lockup is drawn in the poster's own units (--u, 1080 across), scaled to fit the space the
   form leaves, so the type, the cut-out and the chrome 16 never drift apart. The box is at
   least 1080 x 840; given more height (a phone) it grows to 1080 x 980 and shows more of him,
   like the story poster, with the 16 lockup pinned to the bottom. Founder rule (3 Dec): nothing
   sits on his face. His chin is at 103 + 0.56 x 0.72 x 1080 = 539u; the lockup's top is never
   above 840 - 273 = 567u. */
.bill__stage { position: relative; flex: 1 1 0; min-height: 150px; margin-top: 8px; container-type: size; }
.bill__box {
  --u: calc(100cqw / 1080);
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100cqw, 100cqh * 1080 / 840);
  height: min(100cqh, min(100cqw, 100cqh * 1080 / 840) * 980 / 1080);
  transform: translateX(-50%);
  container-type: inline-size;
}
.bill__who {
  position: absolute;
  left: calc(60 * var(--u));
  top: calc(-48.8 * var(--u));
  margin: 0;
  font-family: var(--poster);
  font-weight: 900;
  font-stretch: 62%;
  font-size: calc(364 * var(--u));
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: #f4f4f0;
}
.bill__cut {
  position: absolute;
  z-index: 1;
  left: 0;
  top: calc(103 * var(--u));
  bottom: 0;
  width: calc(1080 * var(--u));
  overflow: hidden;
  /* Fade the bottom, and the photo's own frame where it cuts his elbows. */
  -webkit-mask-image: linear-gradient(#000 72%, transparent 99%), linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 72%, transparent 99%), linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
.bill__cut img { display: block; width: calc(1067 * var(--u)); height: auto; filter: drop-shadow(calc(13 * var(--u)) calc(8 * var(--u)) 0 var(--blue)); }
.bill__title { position: absolute; left: 0; right: 0; bottom: 0; height: calc(298 * var(--u)); z-index: 2; margin: 0; font-weight: 800; pointer-events: none; }
.bill__num {
  position: absolute;
  left: calc(58 * var(--u));
  top: 0;
  font-family: var(--display);
  font-size: calc(323 * var(--u));
  line-height: 1;
  padding: 0;
}
.bill__ord { position: absolute; left: calc(294 * var(--u)); top: calc(23 * var(--u)); font-family: var(--display); font-size: calc(68 * var(--u)); line-height: 1; text-transform: uppercase; }
.bill__rest { position: absolute; left: calc(298 * var(--u)); top: calc(112 * var(--u)); font-family: var(--poster); font-stretch: 100%; font-size: calc(29 * var(--u)); line-height: 1.235; text-transform: uppercase; }
.bill__rest span { display: block; }

/* Music row: the DJ cut out, a blue label, his name big, the station's own mark. */
.credit { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #3c3e46; }
.credit picture, .credit img { display: block; }
/* The row links to his show on Rinse FM: one tap target, above the poster's layers. */
.credit--link { position: relative; z-index: 3; min-height: 44px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.credit--link .credit__who { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.12em; text-decoration-thickness: 0.06em; transition: text-decoration-color 0.15s, color 0.15s; }
.credit--link:hover .credit__who, .credit--link:focus-visible .credit__who { text-decoration-color: var(--blue); }
.credit--link:active { opacity: 0.7; }
.credit--link:focus-visible { outline-offset: 4px; }
.credit__face img { width: auto; height: 52px; }
.credit__text { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.credit__label { font-family: var(--label); font-weight: 700; font-size: 10px; line-height: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.credit__who { font-family: var(--poster); font-weight: 900; font-stretch: 62%; font-size: 30px; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.credit__station { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--poster); font-weight: 800; font-stretch: 80%; font-size: 13px; line-height: 16px; text-transform: uppercase; white-space: nowrap; }
.credit__mark img { width: 16px; height: 16px; }

/* When and where, in the poster's grid: small blue labels over condensed caps. */
.facts { display: grid; grid-template-columns: auto auto 1fr; gap: 0 16px; margin: 0; padding: 8px 0 12px; }
.fact { min-width: 0; }
.bill .fact dt { font-family: var(--label); font-weight: 700; font-size: 10px; line-height: 14px; letter-spacing: 0.12em; color: var(--blue); }
.fact dd { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill .fact dd { font-family: var(--poster); font-weight: 800; font-stretch: 75%; font-size: 18px; line-height: 22px; text-transform: uppercase; }
.facts .fact--drinks, .when-long { display: none; }
.fact dd .when-short { display: inline; }

.poster__info { padding: 12px var(--gutter) var(--safe-bottom); background: var(--black); }

.request { margin-top: 0; }
.request__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { min-width: 0; }
.field--wide { grid-column: 1 / -1; }
label { display: flex; justify-content: space-between; margin: 0 0 4px; }
label .opt { font: inherit; letter-spacing: inherit; color: #6b6f79; }

input[type='text'], input[type='search'], input[type='password'] {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px; /* 16px or iOS zooms in on focus */
  color: var(--white);
  background: var(--black);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  scroll-margin-bottom: 120px;
  transition: border-color 0.15s;
}
input::placeholder { color: #6b6f79; }
input:focus { outline: none; border-color: var(--white); }
input[aria-invalid='true'] { border-color: var(--bad); }
input:disabled { opacity: 0.5; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grey); pointer-events: none; }
.input-prefix input { padding-left: 28px; }

/* The entry rule, above the form: 60 verified spaces and what that means. */
/* What you are asking for, in one plain line (founder, 4 Dec: a guest did not get it). */
.intro { margin: 0 0 10px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--white); }
.field__help { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--grey); }
.sent__next { margin: 12px 0 0; font-size: 17px; line-height: 24px; color: var(--white); overflow-wrap: anywhere; }
.spaces { margin: 0 0 12px; padding-left: 10px; border-left: 2px solid var(--blue); font-size: 13px; line-height: 18px; color: #c8cbd2; }
.spaces b { color: var(--white); font-weight: 600; }

.fine { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--grey); }
.msg { margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid var(--bad); font-size: 14px; line-height: 20px; }
.msg--ok { border-left-color: var(--blue); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sent { margin-top: 24px; }
.sent__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.01em; }
.sent__title:focus { outline: none; }
.sent .fine { font-size: 14px; line-height: 20px; }

/* Phones: the sign-up page is exactly one screen. No page scroll, no rubber-band bounce, and the
   poster shrinks to whatever the form leaves. dvh tracks Safari's bars (svh/vh as fallbacks).
   While a field has focus (keyboard up), html.is-typing gives scrolling back so fields stay
   reachable. */
@media (max-width: 899px) {
  html.lock-screen, html.lock-screen body { height: 100vh; height: 100svh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
  html.lock-screen .poster { height: 100vh; height: 100svh; height: 100dvh; min-height: 0; }
  html.lock-screen.is-typing, html.lock-screen.is-typing body { height: auto; overflow: auto; }
  html.lock-screen.is-typing .poster { height: auto; min-height: 100svh; }
  .page-signup .fine { font-size: 11px; line-height: 15px; }
}

/* Short screens (iPhone SE with Safari's bars): labels give way to placeholders and the small
   print keeps only the privacy line. */
@media (max-height: 620px) and (max-width: 899px) {
  .page-signup .form-grid label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .page-signup .fine__lead { display: none; }
  .bill__stage { min-height: 120px; }
  .credit__face img { height: 40px; }
  .credit__who { font-size: 24px; }
}

/* ---- buttons -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--sm { min-height: 40px; padding: 0 12px; }
.btn--ok { background: var(--blue); border-color: var(--blue); }
.btn--ok:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--bad { color: var(--bad); border-color: rgba(255, 84, 104, 0.5); }
.btn--bad:hover { border-color: var(--bad); }
.btn--go { width: 100%; height: 52px; margin-top: 16px; font-size: 16px; background: var(--blue); border-color: var(--blue); }
.btn--go:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--white); }
.btn.is-loading { cursor: progress; }
.btn.is-loading:disabled { opacity: 1; }
.btn.is-loading .btn__bar { animation: load 1.2s linear infinite; }
@keyframes load { from { left: 0; width: 0; } 50% { left: 0; width: 100%; } to { left: 100%; width: 0; } }

/* ---- ticket --------------------------------------------------------------------------- */

.desk {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: var(--safe-top) var(--gutter) var(--safe-bottom);
}

.stub__top { position: relative; padding: 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; }
.stub__row { display: flex; justify-content: space-between; }
.title--stub { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: end; margin-top: 8px; }
.title--stub .title__num { grid-column: 1; grid-row: 1 / span 2; margin-left: -0.04em; }
.title--stub .chrome { font-size: clamp(56px, 10svh, 88px); }
.title--stub .title__ord { font-size: clamp(16px, 2.6svh, 22px); }
.title--stub .title__who, .title--stub .title__rest { font-size: clamp(20px, 3.2svh, 26px); line-height: 1; }
.stub-bill { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--grey); }
.stub-bill__station::before { content: ', '; }

.stub__guest { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.stub__name { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.6svh, 40px); line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stub__kind { display: flex; align-items: baseline; gap: 10px; margin: -16px -16px 12px; padding: 10px 16px; border-radius: 8px 8px 0 0; font-size: 13px; line-height: 18px; font-weight: 600; }
.stub__kind b { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.stub__kind--priority { color: var(--white); background: var(--blue); }
.stub__kind--door { color: #111; background: var(--amber); }
.stub__kind span::before { content: '· '; }
.stub__snap { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--grey); }
.stub__snap:empty { display: none; }
.stub__facts { display: grid; grid-template-columns: auto auto 1fr; gap: 8px 16px; margin: 12px 0 0; }
.stub__facts .fact + .fact { margin: 0; padding: 0; border: 0; }
.stub__facts .fact dd { white-space: normal; }
.fact--wide { grid-column: 1 / -1; }

/* Perforation: notches cut from the paper's top corners and a dashed fold line. */
.stub__tear { display: none; }
.stub__bottom {
  position: relative;
  padding: 24px 16px 16px;
  color: var(--black);
  background: var(--white);
  border-radius: 0 0 8px 8px;
  text-align: center;
  -webkit-mask: radial-gradient(circle 10px at 0 0, transparent 96%, #000 100%) top left / 51% 100% no-repeat,
    radial-gradient(circle 10px at 100% 0, transparent 96%, #000 100%) top right / 51% 100% no-repeat;
  mask: radial-gradient(circle 10px at 0 0, transparent 96%, #000 100%) top left / 51% 100% no-repeat,
    radial-gradient(circle 10px at 100% 0, transparent 96%, #000 100%) top right / 51% 100% no-repeat;
}
.stub__bottom::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px dashed #b4b8c1; }

/* Pure black on white with a four-module quiet zone, so any door phone reads it first time. */
.qr { display: inline-block; line-height: 0; background: #fff; }
.qr img, .qr canvas { width: clamp(150px, min(76vw, 100svh - 520px), 300px); height: auto; image-rendering: pixelated; }
.stub__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 8px; }
.stub__meta p { margin: 0; }
.pass__status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.pass__status::before { content: ''; width: 8px; height: 8px; background: currentColor; }
.pass__status:empty { display: none; }
.pass__status--valid::before { background: var(--blue); }
.pass__status--used::before { background: #8a8e98; }
.pass__status--void { color: #c4142b; }
.stub__serial { font-family: var(--mono); font-size: 12px; line-height: 20px; letter-spacing: 0.08em; color: #5b5f69; }
.stub .btn--line { margin-top: 16px; color: var(--black); border-color: #c4c7ce; }
.stub--void .chrome { filter: grayscale(1) brightness(0.6); }
.save { margin: 16px 0 0; font-size: 12px; line-height: 16px; color: var(--grey); text-align: center; }
.empty { padding: 24px 0; color: var(--grey); text-align: center; }

/* Ticket actions: Add to phone (primary) and Save image side by side, so they cost one row of
   the one-screen stub; Apple Wallet, when the certificates exist, spans the row beneath. */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; flex: none; }
.actions .btn { min-height: 48px; }
.actions__wide { grid-column: 1 / -1; }

/* Add-to-phone hint, and the saved-image viewer: bottom sheets drawn over the ticket. */
.sheet, .imgview { position: fixed; inset: 0; z-index: 60; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); opacity: 0; transition: opacity 0.2s; }
.sheet.is-open .sheet__scrim, .imgview.is-open .sheet__scrim { opacity: 1; }
.sheet__card, .imgview__card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px var(--gutter) calc(var(--safe-bottom) + 8px);
  background: #0c0c0e;
  border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.2s ease;
}
.sheet.is-open .sheet__card, .imgview.is-open .imgview__card { transform: translateY(0); }
.sheet__title { margin: 0 0 16px; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; }
.sheet__steps { margin: 0; padding-left: 20px; }
.sheet__steps li { margin: 0 0 12px; font-size: 15px; line-height: 22px; color: #d7d9df; }
.sheet__steps b { color: var(--white); font-weight: 600; }
.sheet__ios { width: 20px; height: 26px; vertical-align: -7px; margin: 0 2px; color: var(--blue); }
.sheet__done { width: 100%; margin-top: 8px; }
/* The instruction under the image: plain to read, not text to select (founder, 4 Dec). */
.imgview__hint { margin: 0 0 16px; padding: 12px 14px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--white); text-align: left; background: rgba(47, 75, 255, 0.16); border-left: 4px solid var(--blue); border-radius: 4px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.imgview__hint b { color: var(--white); font-weight: 800; }
.imgview__img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 8px; margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { .sheet__scrim, .sheet__card, .imgview__card { transition: none; } }

@media (max-height: 620px) and (max-width: 899px) {
  .page-ticket .save, .stub__row, .stub-bill { display: none; }
  .title--stub { margin-top: 0; }
  .stub__guest { margin-top: 12px; padding-top: 8px; }
  .qr img, .qr canvas { width: clamp(150px, 100svh - 428px, 300px); }
}

/* The ticket is exactly one screen on every phone (founder, 4 Dec): no page scroll, no bounce.
   The stub fills the height; the text sizes come off the screen height first, and the QR takes
   whatever is left (its box is a size container), never below what a door phone reads. */
html.lock-ticket, html.lock-ticket body { height: 100vh; height: 100svh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
html.lock-ticket .desk { height: 100vh; height: 100svh; height: 100dvh; min-height: 0; }
html.lock-ticket .stub:not([hidden]) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 860px; }
html.lock-ticket .stub__top { flex: none; }
html.lock-ticket .stub__bottom { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding-top: 16px; }
html.lock-ticket .qr:not([hidden]) { display: block; flex: 1 1 auto; min-height: 120px; width: 100%; container-type: size; background: #fff; }
html.lock-ticket .qr__code { display: flex; align-items: center; justify-content: center; height: 100%; }
html.lock-ticket .qr img, html.lock-ticket .qr canvas { width: min(100cqw, 100cqh, 300px); height: auto; }
html.lock-ticket .stub__meta { flex: none; }
html.lock-ticket .save { flex: none; margin-top: 8px; }
html.lock-ticket .title--stub .chrome { font-size: clamp(44px, 9svh, 88px); }
html.lock-ticket .stub__name { font-size: clamp(22px, 4.2svh, 40px); }
html.lock-ticket .stub__kind { margin-bottom: 8px; padding: 8px 16px; }
@media (max-height: 700px) {
  html.lock-ticket .stub__top { padding: 12px 16px; }
  html.lock-ticket .stub__kind { margin: -12px -16px 6px; }
  html.lock-ticket .stub__kind b { font-size: 20px; }
  html.lock-ticket .stub-bill, html.lock-ticket .stub__row, html.lock-ticket .stub__guest .label { display: none; }
  html.lock-ticket .stub__guest { margin-top: 8px; padding-top: 8px; }
  html.lock-ticket .stub__facts { margin-top: 8px; gap: 4px 12px; }
  html.lock-ticket .stub__facts .fact dd { font-size: 13px; line-height: 18px; }
  html.lock-ticket .actions { margin-top: 8px; }
  html.lock-ticket .actions .btn { min-height: 44px; }
}

/* ---- admin and door ------------------------------------------------------------------- */

.console { max-width: 760px; margin: 0 auto; padding: var(--safe-top) var(--gutter) 48px; }
.console--door { max-width: 520px; }
.console__head { padding: 8px 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.console__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.01em; }
.console__sub { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--grey); }
.gate p { color: var(--grey); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.navlinks { display: flex; flex-wrap: wrap; gap: 0 16px; min-width: 0; }
.bar .navlinks { flex-wrap: nowrap; }
.navlinks a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 6px; white-space: nowrap; }
.navlinks a:hover { text-decoration-color: var(--white); }
.bar .btn { flex: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 8px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stats--four { grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.stats--four + .console__sub { margin: 0 0 24px; }
@media (max-width: 480px) { .stats--four .stat b { font-size: 32px; } .stats--four .stat + .stat { padding-left: 10px; } }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 48px; letter-spacing: -0.01em; }
.stat--full b { color: var(--bad); }

.share { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.linkrow { display: flex; gap: 8px; }
.linkrow input { min-width: 0; height: 44px; font-size: 14px; color: var(--grey); }

.tabs { display: flex; margin: 16px 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 1 auto; min-height: 44px; padding: 0 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--grey); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--white); }
.tab[aria-selected='true'] { color: var(--white); border-bottom-color: var(--blue); }
.tab:focus-visible { outline-offset: -2px; }

.list { list-style: none; margin: 8px 0 0; padding: 0; }
.guest { padding: 16px 0; border-bottom: 1px solid var(--line); }
.guest__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.guest__name { font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.guest__snap { font-size: 14px; line-height: 20px; color: var(--grey); }
.guest__note { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #c8cbd2; overflow-wrap: anywhere; }
.guest__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-left: 16px; white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; background: currentColor; }
.badge--pending { color: var(--white); }
.badge--approved::before, .badge--priority::before { background: var(--blue); }
.badge--door::before { background: var(--amber); }
.btn--door { color: var(--black); background: var(--amber); border-color: var(--amber); }
.btn--door:hover { background: #e09a00; border-color: #e09a00; }
.badge--declined::before { background: var(--bad); }
.badge--in::before { background: #8a8e98; }
.list .empty { padding: 32px 0; text-align: left; }

.danger { margin-top: 48px; border-top: 1px solid var(--line); }
.danger summary { display: flex; align-items: center; min-height: 48px; font-size: 14px; font-weight: 600; color: var(--grey); cursor: pointer; }
.danger__body p { margin: 0 0 16px; font-size: 14px; color: var(--grey); }
.danger__body .btn { margin: 0 8px 8px 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 8px);
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--black);
  background: var(--white);
  border-radius: 4px;
  transform: translateX(-50%);
}

/* Door */
.reader { position: relative; display: grid; place-items: center; min-height: 296px; overflow: hidden; font-size: 14px; color: var(--grey); border: 1px solid var(--line); border-radius: 4px; }
.reader video { width: 100% !important; }
/* Corner marks: where to hold the code. */
#reader-hint {
  display: grid;
  place-items: center;
  width: 184px;
  height: 184px;
  background:
    linear-gradient(var(--white), var(--white)) 0 0 / 24px 1px, linear-gradient(var(--white), var(--white)) 0 0 / 1px 24px,
    linear-gradient(var(--white), var(--white)) 100% 0 / 24px 1px, linear-gradient(var(--white), var(--white)) 100% 0 / 1px 24px,
    linear-gradient(var(--white), var(--white)) 0 100% / 24px 1px, linear-gradient(var(--white), var(--white)) 0 100% / 1px 24px,
    linear-gradient(var(--white), var(--white)) 100% 100% / 24px 1px, linear-gradient(var(--white), var(--white)) 100% 100% / 1px 24px;
  background-repeat: no-repeat;
}
.console--door #start { margin-top: 8px; }
.net { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 8px 0 24px; font-size: 12px; line-height: 16px; color: var(--grey); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--blue); }
.dot--off { background: var(--bad); }
.door { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; padding: 12px 0; border-top: 1px solid var(--line); }
.door__count { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 14px; color: var(--grey); }
.door__count b { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--white); }
.door__btns { display: flex; gap: 8px; flex: none; }
.door__btns .btn { min-height: 48px; }
.result__snap { margin: 8px 0 0; font-size: clamp(18px, 5vw, 28px); font-weight: 600; opacity: 0.85; }
.result__snap:empty { display: none; }
.manual { padding-top: 16px; border-top: 1px solid var(--line); }
.search-results .guest { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.console--door .navlinks { margin-top: 24px; }

/* Scan results fill the screen in flat colours you can read across a hallway. */
.result { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: center; padding: var(--safe-top) 24px var(--safe-bottom); color: var(--white); cursor: pointer; }
.result--valid, .result--priority { background: var(--green); }
.result--door { color: #111; background: var(--amber); }
.result--used { background: #c8102e; }
.result--bad { background: #4f0a14; }
.result__big { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(64px, 22vw, 160px); line-height: 0.9; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.result__name { margin: 16px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(32px, 10vw, 64px); line-height: 1; overflow-wrap: anywhere; }
.result__hint { margin-top: 32px; font-size: 14px; font-weight: 600; opacity: 0.85; }

/* ---- desktop: the poster fills the left, the request sits on the right ------------------ */

@media (min-width: 900px) {
  :root { --gutter: 48px; --safe-top: 32px; --safe-bottom: 48px; }
  .poster { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: 100vh; }
  .bill { position: sticky; top: 0; height: 100vh; padding: 32px 56px 32px; }
  .bill__head p { font-size: 13px; }
  .bill__stage { margin-top: 16px; }
  .credit { gap: 20px; padding-bottom: 16px; margin-top: 8px; }
  .credit__face img { height: clamp(88px, 13vh, 140px); }
  .credit__label { font-size: 12px; line-height: 20px; }
  .credit__who { font-size: clamp(48px, 7vh, 84px); }
  .credit__station { gap: 10px; margin-top: 8px; font-size: 22px; line-height: 28px; }
  .credit__mark img { width: 28px; height: 28px; }
  .facts { grid-template-columns: repeat(4, minmax(0, auto)); justify-content: space-between; gap: 0 24px; padding: 16px 0 0; }
  .bill .fact dd { white-space: normal; overflow: visible; }
  .facts .fact--drinks { display: block; }
  .bill .fact dt { font-size: 12px; line-height: 20px; }
  .bill .fact dd { font-size: clamp(22px, 3vh, 32px); line-height: 1.15; }
  .when-long { display: inline; }
  .when-short, .fact dd .when-short { display: none; }
  .poster__info { display: flex; flex-direction: column; justify-content: center; padding: 48px; border-left: 1px solid var(--line); }
  .request__title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; margin: 0 0 16px; font-family: var(--poster); font-weight: 900; font-stretch: 62%; font-size: 56px; line-height: 1; text-transform: uppercase; white-space: normal; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.result--priority .result__big, .result--door .result__big { text-transform: uppercase; }

/* ---- admin: send tickets on Snapchat in one tap (founder, 4 Dec) ---------------------- */

.tab__count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; font-size: 12px; line-height: 20px; color: var(--black); background: var(--white); }
.tab[data-filter="tosend"] .tab__count:empty, .tab__count:is(:empty) { display: none; }
.sendset { margin: 16px 0 0; border: 1px solid var(--line); border-radius: 4px; }
.sendset summary { padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sendset__body { display: grid; gap: 8px; padding: 0 12px 12px; }
.sendset__body label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.sendset textarea { width: 100%; padding: 10px; font: 16px/1.4 var(--body); color: var(--white); background: #0b0c10; border: 1px solid var(--line); border-radius: 4px; resize: vertical; }
.sendset__row { display: flex; align-items: center; gap: 12px; }
.sendset__saved { font-size: 12px; color: var(--grey); }

.guest--send .guest__head { align-items: center; }
.handle { display: flex; align-items: baseline; gap: 2px; width: 100%; margin: 8px 0 0; padding: 6px 0; font: 800 30px/1.1 var(--display); letter-spacing: 0.01em; text-align: left; color: var(--white); background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; }
.handle__at { color: var(--grey); }
.handle__hint { margin-left: auto; align-self: center; padding: 4px 8px; font: 600 12px/1 var(--body); color: var(--grey); border: 1px solid var(--line); border-radius: 4px; }
.sendrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.btn--snap { margin-top: 0; height: 56px; font-size: 17px; }
.btn--sent { min-height: 56px; min-width: 112px; padding: 0 14px; font-size: 15px; }
.btn--sent.is-on { color: var(--black); background: #9ef0b8; border-color: #9ef0b8; }
.guest--send.is-sent .btn--snap { background: transparent; border-color: var(--line-2); }
.guest--send.is-sent .handle { color: var(--grey); }
.guest__more { margin-top: 8px; }
.guest__more summary { padding: 6px 0; font-size: 13px; color: var(--grey); cursor: pointer; }
.guest__more .guest__actions { margin-top: 8px; }

/* ---- the yellow ticket: door entry, told apart from priority at a glance (founder, 4 Dec) --
   Amber band (already), a thick amber stripe down the left of the whole stub, an amber frame,
   an amber foot under the QR and amber markers. The QR and its white quiet zone stay untouched. */

.stub--door .stub__top { border-color: var(--amber); box-shadow: inset 10px 0 0 var(--amber); padding-left: 24px; }
.stub--door .stub__kind { margin-left: -24px; padding-left: 24px; }
.stub--door .stub__bottom { box-shadow: inset 10px 0 0 var(--amber), inset 0 -10px 0 var(--amber); padding-left: 24px; padding-bottom: 22px; }
.stub--door .stub__bottom::before { left: 24px; border-top-color: #d9a400; }
.stub--door .pass__status--valid::before { background: var(--amber); }
.stub--door .stub__name { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 4px; text-underline-offset: 6px; }
@media (max-height: 700px) {
  html.lock-ticket .stub--door .stub__kind { margin-left: -24px; }
}

@media (max-height: 700px) {
  .page-signup .intro { margin-bottom: 6px; font-size: 14px; line-height: 19px; }
  .page-signup .field__help { margin-top: 2px; font-size: 11px; line-height: 14px; }
}

/* ---- the ticket in poster A's look (founder, 4 Dec): electric blue, grain, Anton, the
   blue-duotone photo strip. Title above his hair, guest below his chin: nothing on his face.
   The white tear-off and the QR are untouched. Priority's band goes deep navy so it still
   reads on the blue; door entry keeps its amber band, frame, stripe and foot. */

.stub--a .stub__top { color: var(--white); background: var(--blue); border-color: var(--blue); padding-top: 12px; padding-bottom: 12px; }
.stub--a .label, .stub--a .fact dt { color: rgba(255, 255, 255, 0.78); }
.stub--a .stub-bill, .stub--a .stub__snap { color: rgba(255, 255, 255, 0.82); }
.stub--a .stub__guest { border-top-color: rgba(255, 255, 255, 0.35); }
.stub--a .stub__kind--priority { color: var(--white); background: #101a7a; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.85); }
.ptitle { margin: 2px 0 0; text-align: center; line-height: 1; }
.ptitle__main { display: block; font-family: 'Anton', 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 400; font-size: clamp(30px, 5svh, 46px); letter-spacing: 0.01em; line-height: 0.95; }
.ptitle__sub { display: block; margin-top: 3px; font-size: clamp(10px, 1.4svh, 12px); font-weight: 800; letter-spacing: 0.24em; }
.stub__art { display: block; margin: 6px -16px 0; line-height: 0; }
.stub__art img { display: block; width: 100%; height: clamp(56px, 9.5svh, 104px); object-fit: cover; object-position: 50% 28%; }
.stub--a .stub-bill { margin-top: 4px; font-size: 12px; line-height: 16px; text-align: center; }
.stub--a .stub__guest { margin-top: 8px; padding-top: 8px; }
.stub--a .stub__guest .label { display: none; }
.stub--a .stub__facts { margin-top: 8px; gap: 4px 14px; }
.stub--a .stub__name { font-family: 'Anton', 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase; }
.stub--a.stub--door .stub__top { border-color: var(--amber); }
.stub--a.stub--door .stub__art { margin-left: -14px; margin-right: -16px; } /* stops at the amber stripe */
.stub--a.stub--void .stub__top { background-color: #39407a; }
@media (max-height: 700px) {
  html.lock-ticket .stub__art img { height: 48px; }
  html.lock-ticket .ptitle__main { font-size: 28px; }
  html.lock-ticket .ptitle__sub { display: none; }
}
/* One screen with a door-readable QR first: on a short screen the photo strip gives way
   (down to nothing), never the QR, which keeps at least 190px. */
html.lock-ticket .stub--a .stub__top { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; overflow: hidden; }
html.lock-ticket .stub--a .stub__top > * { flex: none; }
html.lock-ticket .stub--a .stub__top > .stub__art { flex: 0 1 104px; min-height: 0; overflow: hidden; }
html.lock-ticket .stub--a .stub__art img { height: 100%; min-height: 0; max-height: 104px; }
html.lock-ticket .stub--a .qr:not([hidden]) { min-height: 190px; }
