/* Movie Night — OmniShip Labs.
   Elevated Cinema Web Experience: Dark theme, red and gold as the two identity colors,
   responsive desktop theater layout, interactive living-room floorplan,
   and mobile-first touch optimization. */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  /* Red and gold are the site's two identity colors — not one accent plus a
     spare. Red carries primary actions; gold trims/highlights. Team reveal
     later just narrows a viewer's accent down to one of these two. */
  --accent: #DC2626;
  --accent-glow: rgba(220, 38, 38, 0.4);
  --accent-subtle: rgba(220, 38, 38, 0.12);
  --accent-press: #B91C1C;
  --page: #0B1220;
  --page-deep: #070C15;
  --card: #141F33;
  --card-hover: #1A2842;
  --card-glass: rgba(20, 31, 51, 0.75);
  --sunken: #0B1322;
  --line: #24344D;
  --line-soft: #1A263B;
  --field-line: #334466;
  --ink: #F4F1EA;
  --ink-dim: rgba(244, 241, 234, 0.68);
  --ink-muted: rgba(244, 241, 234, 0.42);
  --paper: #F7F4EE;
  --gold: #D4A017;
  --gold-glow: rgba(212, 160, 23, 0.4);
  --gold-subtle: rgba(212, 160, 23, 0.12);
  --gold-press: #A87D12;
  /* Team colors — distinct from the site's base red/gold branding. */
  --teal: #2DD4BF;
  --teal-glow: rgba(45, 212, 191, 0.4);
  --teal-subtle: rgba(45, 212, 191, 0.12);
  --teal-press: #1FA898;
  --violet: #C084FC;
  --violet-glow: rgba(192, 132, 252, 0.4);
  --violet-subtle: rgba(192, 132, 252, 0.12);
  --violet-press: #9D5CE0;
  --green: #10B981;
  --cyan: #38BDF8;

  --font-display: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  --font-sans: 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;
  --ease: cubic-bezier(.2, .8, .28, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--page-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* ── Container Shell ─────────────────────────────────────────────────── */
.phone {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--page);
  display: flex;
  flex-direction: column;
  position: relative;
}

.app-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Topbar / Marquee Header ─────────────────────────────────────────── */
.topbar {
  flex: none;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px 24px;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-badge {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-badge.large {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin-bottom: 8px;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.venue-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.venue-name {
  margin: 0;
  font: 700 13px/1 var(--font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.venue-tag {
  font: 600 9px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: var(--r-pill);
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.addr {
  margin: 0;
  font: 400 11.5px/1 var(--font-mono);
  letter-spacing: .04em;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── User Chip in Header ─────────────────────────────────────────────── */
.whoami {
  display: flex;
  align-items: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--line);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.user-avatar-fallback {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #FF7A45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 12px/1 var(--font-mono);
}

.user-name {
  font: 500 12.5px/1 var(--font-sans);
  color: var(--ink);
}

.signout-btn {
  margin-left: 4px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .14s var(--ease);
}

.signout-btn:hover {
  color: var(--accent);
  border-color: var(--accent-glow);
  background: var(--accent-subtle);
}

/* ── Scroll Area / Main Layout ───────────────────────────────────────── */
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

/* guess.html keeps a fixed bottom action bar — reserve clearance for it */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

@media (min-width: 960px) {
  .main-layout {
    display: grid;
    /* Matches the ticket stub's own max-width exactly (480px) — a flexible
       1.15fr track let the column grow far wider than that on big screens,
       leaving a dead gap between the card and the seat map. */
    grid-template-columns: minmax(0, 480px) minmax(430px, 480px);
    justify-content: center;
    gap: 36px;
    align-items: start;
    max-width: 996px;
    margin: 0 auto;
  }
}

.col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Hero Event Card ─────────────────────────────────────────────────── */
.hero-card {
  padding: 24px 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, rgba(20, 31, 51, 0.9), rgba(11, 19, 34, 0.95));
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.25;
  pointer-events: none;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.genre-tag {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-subtle);
  padding: 4px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold);
}

.greet {
  margin: 0;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

h1.screen {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.08;
  color: #fff;
}

@media (min-width: 768px) {
  h1.screen { font-size: 38px; }
}

.event-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.meta-label {
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  width: 68px;
  flex: none;
}

.meta-val {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-dim);
}

/* ── Carried Guess Card ──────────────────────────────────────────────── */
.guesscard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--sunken);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.guesscard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guesscard-edit {
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.guesscard-edit:hover {
  text-decoration: underline;
}

.guesscard .pick {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #fff;
}

.guesscard .backup {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 10px;
  align-items: center;
}

.guesscard .backup p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-dim);
}

.fine {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.label {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Toast Notifications ─────────────────────────────────────────────── */
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  animation: toastIn .22s var(--ease);
}

.toast .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex: none;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.toast p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}

/* ── Ticket & Digital Pass Section ───────────────────────────────────── */
.ticket-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── The Authentic Cinema Ticket Stub ────────────────────────────────── */
.stub {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  color: #0E1726;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  max-width: 480px;
  width: 100%;
}

.stub .top {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stub .top.facts-wrap {
  padding-top: 18px;
}

.stub-hero {
  display: block;
  width: 100%;
  /* Matches the source image's own aspect ratio exactly (1125x432) — a
     fixed height here doesn't match, and object-fit:cover was silently
     cropping ~40% of the image's height to force it into that box. */
  aspect-ratio: 1125 / 432;
  object-fit: cover;
}

.stub .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.stub .venue {
  margin: 0;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #5B6B84;
}

.stub .film {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: #0E1726;
}

.stub .reveal {
  margin: 6px 0 0;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-press);
}

.stub .mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #0E1726;
  color: var(--paper);
  font: 700 16px/1 var(--font-mono);
  letter-spacing: .04em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.stub-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stub .facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
  margin: 0;
}

.stub .facts dt {
  margin: 0;
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5B6B84;
}

.stub .facts dd {
  margin: 6px 0 0;
  font: 700 16px/1.1 var(--font-mono);
  color: #0E1726;
}

.stub .perf {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}

.stub .perf .notch {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--page);
}

.stub .perf .notch.l { left: -11px; }
.stub .perf .notch.r { right: -11px; }
.stub .perf .dash {
  flex: 1;
  margin: 0 16px;
  border-top: 2px dashed #D8D2C6;
}

.stub .bottom {
  padding: 8px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.stub .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 52px;
}

.stub .bars i {
  display: block;
  background: #0E1726;
  border-radius: 1px;
}

.stub .code {
  margin: 0;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: .22em;
  color: #5B6B84;
}

.stub-qr {
  display: block;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

/* ── Digital Pass Download Hub (lives inside the stub, same card) ────── */
.wallet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 22px 22px;
}

.wallet-caption {
  margin: 0 0 4px;
  color: #5B6B84;
}

.pass-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--accent);
  background: linear-gradient(145deg, var(--accent-subtle), rgba(20, 31, 51, 0.8));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  max-width: 480px;
  width: 100%;
}

.pass-header .eyebrow {
  margin: 0;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.pass-header .body {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}

.wallet-buttons-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 14px;
  flex: 1 1 0;
  min-width: 160px;
}

.apple-btn {
  background: transparent;
  border: none;
  padding: 8px;
}

.apple-badge-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 220px;
}

.google-btn {
  background: transparent;
  border: none;
  padding: 8px;
}

.gwallet-badge-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 240px;
}


.cal-row {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.cal-link {
  font: 500 12.5px/1 var(--font-sans);
  color: var(--ink-dim);
  text-decoration: none;
  transition: color .14s var(--ease);
}

.cal-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Desktop QR Code Transfer Box ────────────────────────────────────── */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-md);
  background: rgba(14, 23, 38, 0.05);
  border: 1px solid #E0DACB;
  margin-top: 4px;
}

.qr-box {
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  flex: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  display: block;
}

/* ── RIGHT COLUMN: Interactive Theater Screen & Seat Map ─────────────── */
.theater-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 960px) {
  .theater-col {
    position: sticky;
    top: 88px;
  }
}

.theater-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--sunken);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.theater-screen-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.screenbar {
  width: 85%;
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, rgba(244, 241, 234, 0.05), rgba(244, 241, 234, 0.7), rgba(244, 241, 234, 0.05));
  box-shadow: 0 0 16px rgba(244, 241, 234, 0.4);
}

.screen-glow {
  width: 75%;
  height: 20px;
  margin-top: -4px;
  background: radial-gradient(ellipse at top, rgba(244, 241, 234, 0.15) 0%, transparent 75%);
  pointer-events: none;
}

.screenlabel {
  margin: 0;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.theater-stage {
  padding: 8px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, minmax(52px, auto));
  gap: 9px;
}

@media (min-width: 960px) {
  .grid {
    grid-template-rows: repeat(5, minmax(58px, auto));
    gap: 11px;
  }
}

.unit {
  display: flex;
  gap: 5px;
}

.unit.col { flex-direction: column; }
.unit.row { flex-direction: row; }

.unit.framed {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(244, 241, 234, 0.03);
  border-radius: 8px;
}

.unit.framed.sofa {
  border-radius: 12px;
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.03);
}

.unit.framed.bed {
  border-radius: 10px;
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.03);
}

.unit.framed.stairs {
  border-radius: 6px;
  border-color: rgba(148, 163, 184, 0.25);
  background: repeating-linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.05) 0px, rgba(148, 163, 184, 0.05) 2px,
    transparent 2px, transparent 34px
  );
}

/* ── Individual Seats ───────────────────────────────────────────────── */
.seat {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  font-family: inherit;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--field-line);
  cursor: pointer;
  transition: all .16s var(--ease);
  position: relative;
  outline: none;
}

.seat.cushion {
  border-radius: var(--r-pill);
}

.seat.sofa {
  border-radius: 8px;
}

.unit.stairs {
  gap: 6px;
}

.seat.stairs {
  /* Equal flexible share, not a fixed percentage — a rigid basis (0 0 18%)
     doesn't account for the gaps between seats at all, so 5 of them at 18%
     plus their gaps genuinely overflowed the unit's own frame. */
  flex: 1 1 0;
  min-width: 0;
  border-radius: 4px;
}

.seat:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.seat:active:not(:disabled) {
  transform: scale(.96);
}

.seat .avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.seat .id {
  font: 700 12px/1 var(--font-mono);
}

.seat .who {
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: .04em;
  opacity: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.seat.taken .who,
.seat.mine .who,
.seat.current .who,
.seat.held .who {
  opacity: .95;
}

.seat.taken {
  background: #141B2B;
  color: var(--ink-muted);
  border-color: #1A2438;
  /* Not "not-allowed" — hovering still does something useful (the name
     tooltip), it's not a blocked action. */
  cursor: default;
  opacity: 0.75;
}

.seat.held {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border: 1px dashed var(--gold);
  cursor: default;
  animation: heldPulse 2s infinite ease-in-out;
}

.seat.mine {
  background: var(--accent);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.03);
}

.seat.mine .id {
  color: #fff;
}

.seat.current {
  background: var(--accent-glow);
  border: 1.5px solid var(--accent);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.seat.current .id {
  color: var(--accent);
}

.seat.current .who {
  color: var(--accent);
}

/* ── Theater Room Footer & Legend ────────────────────────────────────── */
.room-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.room-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 11px/1 var(--font-sans);
  color: var(--ink-dim);
}

.legend-chip {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.legend-chip.open {
  background: var(--card);
  border: 1px solid var(--field-line);
}

.legend-chip.mine {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.legend-chip.held {
  background: rgba(245, 158, 11, 0.3);
  border: 1px dashed var(--gold);
}

.legend-chip.taken {
  background: #141B2B;
  border: 1px solid #1A2438;
}

.room-stats {
  text-align: center;
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: .08em;
  color: var(--ink-muted);
}

.room-change-btn {
  width: 100%;
  padding: 11px;
  font-size: 13.5px;
}

/* ── Seat Map Actions (local to the room card) ───────────────────────── */
.room-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.actionbar-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 8px var(--accent);
}

.room-actions p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.held-note {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-muted);
}

#cta {
  width: 100%;
}

/* ── Standard Button Styles ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all .16s var(--ease);
  text-align: center;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--accent-press);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent);
}

.btn:active:not(:disabled) {
  transform: scale(.98);
}

.btn:disabled {
  background: #1A2439;
  color: rgba(244, 241, 234, 0.3);
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--field-line);
  color: var(--ink-dim);
}

.btn.ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: #5A6D92;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.btn.quiet {
  background: transparent;
  color: var(--ink-dim);
  font-size: 13.5px;
  padding: 10px 16px;
}

.btn.quiet:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.row {
  display: flex;
  gap: 12px;
}

.row .btn {
  flex: 1;
}

/* ── Guess Flow / Mystery Envelope ──────────────────────────────────── */
.guess-flow-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.envelope {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(20, 31, 51, 0.9), rgba(11, 19, 34, 0.95));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  transition: all .24s var(--ease);
}

.envelope-art {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent-subtle));
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.envelope .glyph {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--accent);
}

.envelope.small {
  padding: 14px 18px;
}

.envelope.small .envelope-art {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.envelope.small .glyph {
  font-size: 20px;
}

.envelope-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.envelope-tag {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.envelope .cap {
  margin: 0;
  font: 500 13px/1.4 var(--font-mono);
  letter-spacing: .06em;
  color: var(--ink-dim);
}

.ask-panel, .locked-panel {
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-dim);
}

/* ── Field / Inputs & TMDB Autocomplete ──────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.input-wrap {
  position: relative;
}

.field-poster {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.field input.has-poster {
  padding-left: 46px;
}

.field input {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--field-line);
  background: var(--sunken);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: all .16s var(--ease);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--card);
}

.field input::placeholder {
  color: var(--ink-muted);
}

.suggest {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}

.suggest .filmrow {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: background .12s var(--ease);
}

.suggest .filmrow:last-child {
  border-bottom: none;
}

.suggest .filmrow:hover {
  background: var(--accent-subtle);
}

.suggest .poster {
  width: 38px;
  height: 56px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sunken);
  display: block;
}

.suggest .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.suggest .poster.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.suggest .meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.suggest .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.suggest .name em {
  font-style: normal;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-left: 8px;
}

.suggest .cast {
  font-size: 12px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warn {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--gold);
}

/* ── Stamped Locked-in Guess ─────────────────────────────────────────── */
.locked {
  position: relative;
  padding: 26px 22px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--sunken);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.locked .stamp {
  position: absolute;
  top: -12px;
  right: 18px;
  transform: rotate(-6deg);
  padding: 6px 14px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--sunken);
  box-shadow: 0 4px 14px var(--accent-glow);
  animation: stampIn .3s var(--ease-bounce);
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pick-poster {
  width: 36px;
  height: 54px;
  border-radius: 5px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.locked .pick {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: #fff;
}

.locked .backup {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.locked .backup .label {
  font-size: 9.5px;
}

.locked .backup p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-dim);
}

.ask p.q {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
}

.ask p.a {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.attribution {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.attribution img {
  flex: none;
  opacity: .8;
}

.attribution p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* ── Loading (before we know sign-in state) ──────────────────────────── */
.loading {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-direction: column;
}

.loading .spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

.loading p {
  margin: 0;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Sign-in Gate ───────────────────────────────────────────────────── */
.gate {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.gate-card {
  max-width: 420px;
  width: 100%;
  padding: 40px 32px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.gate-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
}

.gate-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}

.gate-card .why {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

#gbtn {
  min-height: 44px;
  display: flex;
  justify-content: center;
}

/* ── Utility & Misc ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.slip { animation: slipUp .26s var(--ease); }
.err {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #FF8F70;
}

.offline {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 9px 16px;
  text-align: center;
  background: #7F1D1D;
  font: 600 11.5px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FECACA;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tm-note {
  padding: 16px 24px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-muted);
  text-align: center;
  max-width: 1360px;
  margin: 0 auto;
}

/* ── Keyframe Animations ────────────────────────────────────────────── */
@keyframes heldPulse {
  0%, 100% { border-color: var(--gold); }
  50% { border-color: rgba(245, 158, 11, 0.3); }
}

@keyframes slipUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes stampIn {
  from { opacity: 0; transform: scale(1.5) rotate(-14deg); }
  to { opacity: 1; transform: scale(1) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.host-link {
  margin-left: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition: all .14s var(--ease);
}
.host-link:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

/* ── team reveal — a per-viewer theme switch, not a global one ────────────
   The base site theme is red — a "Team RED" would just be invisible against
   it, so both teams get their own distinct colors instead (teal/violet),
   set via body[data-team] in app.js, driven by me.team, which the server
   only returns after the reveal flag flips. */
body[data-team="teal"] {
  --accent: var(--teal);
  --accent-press: var(--teal-press);
  --accent-glow: var(--teal-glow);
  --accent-subtle: var(--teal-subtle);
}
body[data-team="violet"] {
  --accent: var(--violet);
  --accent-press: var(--violet-press);
  --accent-glow: var(--violet-glow);
  --accent-subtle: var(--violet-subtle);
}

/* A hint of team color on the ticket card itself — not a full repaint,
   just enough that the stub doesn't look identical across teams. */
body[data-team="teal"] .stub { background: #E9F5F3; }
body[data-team="violet"] .stub { background: #F1E9F7; }

.team-badge {
  display: inline-flex; align-self: flex-start;
  margin: 6px 0 0; padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent-subtle);
}

.site-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 4px 0;
}
.site-link-btn {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  background: var(--card);
  font: 600 12.5px/1 var(--font-sans);
  text-decoration: none;
  transition: all .14s var(--ease);
}
.site-link-btn:hover { background: var(--card-hover); color: var(--ink); border-color: var(--line-soft); }
