:root {
  color-scheme: dark;
  --bg: #0e0d0c;
  --surface: #181614;
  --surface-2: #221f1c;
  --line: #2f2b27;
  --text: #f3efe8;
  --muted: #a69d92;
  --accent: #f2b544;
  --accent-ink: #1a1306;
  --low: #ff9d4d;
  --sold: #6f665c;
  --ok: #7ccf9a;
  --radius: 14px;
  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 20px 60px rgb(0 0 0 / 0.45);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f7f4ef;
    --surface: #ffffff;
    --surface-2: #f0ebe3;
    --line: #e2dbd0;
    --text: #1b1815;
    --muted: #6d655b;
    --accent: #b97500;
    --accent-ink: #ffffff;
    --low: #c25400;
    --sold: #a59c90;
    --ok: #217a45;
    --shadow: 0 20px 60px rgb(40 30 10 / 0.18);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Masthead */
.masthead { padding: 20px 0 8px; }
.masthead-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand {
  margin: 0;
  font: 600 28px/1.05 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand span { color: var(--accent); }
.venue { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.unofficial {
  flex: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}

/* Sticky controls */
.controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
}
.dates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
  padding: 4px 0 10px;
  margin: 0 -16px;
  padding-inline: 16px;
}
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: none;
  scroll-snap-align: start;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  line-height: 1.15;
}
.date .dow { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.date .day { display: block; font: 600 20px/1.2 var(--display); }
.date .count { display: block; font-size: 11px; color: var(--muted); }
.date[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.date[aria-pressed='true'] .dow,
.date[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
.date:disabled { opacity: 0.45; cursor: default; }

.toolbar { display: flex; gap: 10px; align-items: center; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex: none; }
.segmented button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.segmented button[aria-pressed='true'] { background: var(--surface-2); color: var(--text); }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted); min-width: 0; }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; padding: 8px 0; outline: none; }
.search:focus-within { border-color: var(--accent); }

.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none;
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.filter[aria-pressed='true'] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }

/* Starting soon rail */
.soon { margin: 18px 0 4px; }
.section-label { font: 500 12px/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 10px; }
.soon-rail { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.soon-rail::-webkit-scrollbar { display: none; }
.soon-card {
  flex: none;
  width: 220px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
}
.soon-card img { width: 44px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.soon-card .when { font: 600 16px/1.1 var(--display); }
.soon-card .rel { color: var(--accent); font-size: 12px; font-weight: 600; }
.soon-card .title { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Film list */
.films { display: grid; gap: 14px; margin: 18px 0 32px; }
@media (min-width: 900px) { .films { grid-template-columns: 1fr 1fr; } }
.film {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
@media (min-width: 600px) { .film { grid-template-columns: 120px 1fr; } }
.poster-btn { padding: 0; border: 0; background: none; cursor: pointer; align-self: start; border-radius: 8px; }
.poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.film-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.film-title {
  margin: 0;
  font: 600 18px/1.15 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.film-title button { all: unset; cursor: pointer; }
.film-title button:hover { color: var(--accent); }
.film-title button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meta { color: var(--muted); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.event { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.synopsis { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.time {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  background: none;
  cursor: pointer;
  line-height: 1.1;
}
.time:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.time .clock { font: 600 16px/1.1 var(--display); letter-spacing: 0.02em; }
.time .note { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.time.low { border-color: var(--low); }
.time.low .note { color: var(--low); }
.time.soldout { border-color: var(--line); color: var(--sold); }
.time.soldout .clock { text-decoration: line-through; }
.time.current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* By-time view */
.timeline { margin: 18px 0 32px; }
.hour { margin-bottom: 18px; }
.hour h2 { position: sticky; top: var(--controls-h, 150px); font: 500 12px/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; padding: 6px 0; background: var(--bg); z-index: 1; }
.slot {
  width: 100%;
  display: grid;
  grid-template-columns: 74px 40px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 8px 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.slot:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.slot .clock { font: 600 18px/1 var(--display); }
.slot img { width: 40px; height: 60px; object-fit: cover; border-radius: 5px; background: var(--surface-2); }
.slot .title { font: 600 14px/1.2 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot .sub { font-size: 12px; color: var(--muted); }
.slot.soldout { opacity: 0.6; }
.pill { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; color: var(--muted); }
.pill.low { color: var(--low); }
.pill.soldout { color: var(--sold); }

/* Empty / loading / error */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { color: var(--text); font: 600 20px/1.2 var(--display); text-transform: uppercase; margin: 0 0 8px; }
.empty .jump { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 9px 14px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 190px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.footer { color: var(--muted); font-size: 12px; padding-bottom: 40px; }
.footer p { margin: 4px 0; }

/* Sheet */
.sheet {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  background: var(--surface);
  color: var(--text);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow);
}
@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 20px; max-height: 86dvh; }
}
.sheet::backdrop { background: rgb(0 0 0 / 0.55); backdrop-filter: blur(2px); }
.sheet[open] { animation: rise 0.22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-inner { position: relative; overflow-y: auto; max-height: inherit; padding-bottom: env(safe-area-inset-bottom); }
.sheet-close {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px 10px 0 0;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sheet-hero { height: 180px; background: var(--surface-2) center / cover no-repeat; margin-top: -46px; position: relative; }
.sheet-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--surface)); }
.sheet-content { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.sheet-head img { width: 72px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; }
.sheet h2 { margin: 0 0 4px; font: 600 22px/1.1 var(--display); text-transform: uppercase; padding-right: 36px; }
.when-big { font: 600 26px/1.1 var(--display); margin: 0; }
.when-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.meter { display: grid; gap: 6px; }
.meter-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; background: var(--ok); border-radius: inherit; }
.meter.low .meter-fill { background: var(--low); }
.meter-text { font-size: 13px; color: var(--muted); }
.meter.low .meter-text strong { color: var(--low); }
.prices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.prices li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; }
.prices li + li { border-top: 1px solid var(--line); }
.prices .amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.prices .tag { font-size: 11px; color: var(--muted); margin-left: 6px; }
.fine { font-size: 12px; color: var(--muted); margin: -8px 0 0; }
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 16px;
  border: 0;
}
.cta small { font-weight: 400; font-size: 12px; opacity: 0.8; }
.cta:hover { filter: brightness(1.06); }
.cta[aria-disabled='true'] { background: var(--surface-2); color: var(--muted); pointer-events: none; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sub-head { font: 500 12px/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; }
.credits { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--accent); font-style: italic; }
blockquote cite { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 4px; }
.day-group + .day-group { margin-top: 12px; }
.day-group h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* Account connection and ticket review share the existing native sheet. */
.account-nav { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.account-form { display:grid; gap:20px; }
.account-form label { display:grid; gap:8px; font-size:.9rem; }
.account-form input:not([type=checkbox]), .account-form select { width:100%; font:inherit; color:var(--text); background:var(--surface, transparent); border:1px solid var(--line, #8886); border-radius:10px; padding:13px; min-height:46px; }
.account-form input[type=checkbox] { width:20px; height:20px; margin:1px 0 0; flex-shrink:0; accent-color:#d99544; }
.account-form .check-row { display:flex; align-items:flex-start; gap:10px; font-size:.8rem; line-height:1.6; }
.form-error { color:#c34d43; font-size:.9rem; line-height:1.5; }
.form-error:empty { display:none; }
.eyebrow { text-transform:uppercase; font-size:.72rem; letter-spacing:.14em; opacity:.65; }
.ticket-tiers { display:grid; gap:12px; }
.account-form .ticket-tier { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ticket-tier small { display:block; opacity:.65; margin-top:4px; }
.ticket-tier select { max-width:80px; }
.order-total { font-size:1.15rem; border-top:1px solid #8885; padding-top:16px; }
.account-sheet .cta { width:100%; text-align:center; font:inherit; cursor:pointer; border:0; }
.account-sheet button:disabled { opacity:.5; cursor:wait; }
.account-sheet a { text-underline-offset:3px; }
.purchase-list { list-style:none; padding:0; display:grid; gap:18px; }
.purchase-list li { display:grid; gap:6px; padding-bottom:16px; border-bottom:1px solid #8884; }
.legal { max-width:760px; padding-top:48px; padding-bottom:80px; line-height:1.8; }
.legal h1 { line-height:1.2; margin:24px 0; }
.legal h2 { font-size:1.25rem; margin-top:32px; }
.legal a { color:inherit; text-underline-offset:3px; }

.ticket-qr { display:block; width:min(100%,320px); height:auto; margin:24px auto; padding:16px; background:#fff; }
