@font-face { font-family: "Big Shoulders Display"; src: url(/assets/fonts/big-shoulders.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/assets/fonts/public-sans.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/assets/fonts/public-sans-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --ink: #060508; --panel: #0d0b10; --raise: #16131b; --line: #ffffff17; --line-2: #ffffff2b;
  --text: #f2ede4; --mute: #a39dab; --dim: #8a8491;
  --pick: #5fe39a; --pick-ink: #06210f; --fabric: #8a1d22; --amber: #ffae5c;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif; --sans: "Public Sans", system-ui, sans-serif;
  --warm: #4a3b2a; --warm-hi: #5e4a33;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; }
html, body { background: var(--ink); color: var(--text); font: 400 15px/1.45 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }

.app { min-height: 100dvh; }
.pane { position: relative; }

/* ---------- films ---------- */
.films { padding: 22px 20px 28px; }
.brand { display: flex; gap: 12px; align-items: center; }
.mark { width: 30px; height: 30px; color: var(--text); flex: none; }
h1 { font: 800 36px/.9 var(--display); letter-spacing: .005em; }
.venue { color: var(--mute); font: 400 12.5px/1.35 var(--sans); margin-top: 5px; }
.lede { margin: 20px 0 18px; font-size: 16.5px; line-height: 1.4; color: var(--mute); max-width: 32ch; }
.lede em { font-style: normal; font-weight: 600; color: var(--text); }

.film-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.film { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; background: linear-gradient(120deg, var(--tint, #ffffff08), transparent 55%); transition: border-color .2s; }
.film.on { border-color: var(--line-2); }
.film-head { display: flex; gap: 12px; align-items: center; }
.thumb { width: 44px; height: 66px; border-radius: 4px; object-fit: cover; flex: none; background: #ffffff10; box-shadow: 0 4px 12px #0008; }
.film h2 { font: 750 25px/.95 var(--display); letter-spacing: .01em; }
.film .meta { color: var(--mute); font: 400 12.5px/1.35 var(--sans); margin-top: 5px; }
.fmt { margin-top: 12px; display: grid; grid-template-columns: minmax(44px, max-content) 1fr; gap: 6px 8px; align-items: start; }
.fmt-name { white-space: nowrap; font: 700 14px/28px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.fmt-name.premium { color: var(--text); }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.time { font: 500 13px/1 var(--sans); padding: 7px 9px; border-radius: 999px; border: 1px solid var(--line-2); min-height: 28px; }
.time:hover { border-color: var(--text); }
.time[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.fine { margin-top: 22px; color: var(--dim); font-size: 12px; line-height: 1.5; display: grid; gap: 8px; }

/* ---------- map ---------- */
.map { padding: 14px 16px 18px; display: flex; flex-direction: column; }
.topbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; }
.topbar-title { text-align: center; min-width: 0; }
.topbar-title h2 { font: 800 26px/1 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { color: var(--mute); font: 400 12.5px/1.4 var(--sans); margin-top: 3px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #ffffff0f; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { background: none; }

.chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.chip { font: 500 13px/1 var(--sans); padding: 8px 11px; border-radius: 999px; background: #ffffff0d; color: var(--mute); display: inline-flex; gap: 6px; align-items: baseline; }
.chip small { font: 700 11.5px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.chip[aria-checked="true"] { background: var(--text); color: var(--ink); }

.screen-arc { position: relative; margin: 10px 4% 0; height: 46px; }
.screen-arc svg { width: 100%; height: 30px; filter: drop-shadow(0 6px 14px #ffffff40); }
.screen-arc span { position: absolute; left: 0; right: 0; top: 30px; text-align: center; font: 700 11px/1 var(--display); letter-spacing: .45em; text-transform: uppercase; color: var(--dim); }

.seat-grid { display: grid; min-width: 0; gap: var(--rowgap, 7px); margin: 8px 0 14px; }
.row { display: grid; align-items: center; column-gap: var(--colgap, 3px); }
.row-l { font: 700 11px/1 var(--display); color: var(--dim); text-align: center; }
.s { aspect-ratio: 1 / .92; border-radius: 3px 3px 4px 4px; background: #3b3641; position: relative; min-width: 0; }
.s.sweet { background: var(--warm); }
.s.taken { background: transparent; box-shadow: inset 0 0 0 1px #ffffff26; cursor: not-allowed; }
.s.pick { background: var(--pick); box-shadow: 0 0 0 3px #5fe39a40; }
.s:not(.taken):hover { background: #6b6474; }
.s.sweet:not(.pick):hover { background: var(--warm-hi); }
.s.pick:hover { background: var(--pick); }

.legend { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; color: var(--mute); font: 400 12px/1 var(--sans); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.k { width: 10px; height: 9px; border-radius: 2px; display: inline-block; }
.k.avail { background: #3b3641; } .k.taken { box-shadow: inset 0 0 0 1px #ffffff40; } .k.sweet { background: var(--warm); } .k.pick { background: var(--pick); }

.actions { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "best best" "sum go"; gap: 10px 12px; align-items: center; }
.actions [data-best] { grid-area: best; }
.pick-summary { grid-area: sum; font: 400 12.5px/1.3 var(--sans); color: var(--mute); }
.pick-summary b { display: block; color: var(--text); font: 800 24px/1 var(--display); letter-spacing: .01em; margin-top: 2px; }
.actions [data-continue] { grid-area: go; }
.btn { min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--text); color: var(--ink); }
.btn.primary:disabled { background: #ffffff12; color: var(--dim); cursor: default; }
.btn.ghost { background: #ffffff0f; border: 1px solid var(--line); }
.btn.light { background: var(--text); color: var(--ink); }

.read { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; color: var(--mute); font-size: 13px; }
.read h3 { font: 700 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.read p b { color: var(--text); font-weight: 600; }

/* ---------- 3D view ---------- */
.view { background: #050407; overflow: hidden; }
.stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.nogl { position: absolute; inset: 40% 10% auto; text-align: center; color: var(--mute); }
.view::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; background: linear-gradient(#000000b0, transparent); z-index: 1; pointer-events: none; }
.topbar.floating { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 2; }
.seat-label { justify-self: center; font: 800 22px/1 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: #f2ede4e6; text-shadow: 0 1px 8px #000; }
.icon-btn.on-dark { background: #00000066; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hint { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font: 400 13px/1 var(--sans); color: var(--mute); pointer-events: none; }

.sheet { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; background: #0f0d12f2; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.verdict { font: 500 13px/1 var(--sans); color: #cfc8d6; display: flex; align-items: center; gap: 8px; }
.verdict::before { content: ""; width: 16px; height: 2px; background: currentColor; }
.sheet h3 { font: 800 34px/.92 var(--display); letter-spacing: .01em; margin-top: 8px; }
.sheet .sub { color: var(--mute); font-size: 13px; margin-top: 4px; }
.mini { width: 58px; height: 43px; flex: none; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0; border-block: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; padding: 11px 0 10px; }
.stats div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.stats dd { font: 700 30px/1 var(--display); order: -1; }
.stats dd small { font: 500 13px/1 var(--sans); color: var(--mute); margin-left: 3px; }
.stats dt { color: var(--mute); font-size: 12px; line-height: 1.25; margin-top: 5px; }
.sheet-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link { font: 500 14.5px/1 var(--sans); color: #cfc8d6; text-decoration: underline; text-decoration-color: #ffffff40; text-underline-offset: 5px; padding: 12px 2px; }
.link:hover { color: var(--text); text-decoration-color: currentColor; }

/* ---------- phone flow ---------- */
@media (max-width: 1099px) {
  .read { display: none; }
  .pane { display: none; }
  body[data-view="films"] .films, body[data-view="map"] .map, body[data-view="view"] .view { display: flex; flex-direction: column; }
  .films { display: block !important; }
  body:not([data-view="films"]) .films { display: none !important; }
  .map { min-height: 100dvh; }
  .view { height: 100dvh; }
}

/* ---------- desktop: everything at once ---------- */
@media (min-width: 1100px) {
  .app { display: grid; grid-template-columns: 372px minmax(430px, 460px) 1fr; height: 100dvh; }
  .pane { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
  .films { border-right: 1px solid var(--line); }
  .map { border-right: 1px solid var(--line); padding: 22px 22px 22px; }
  .topbar [data-back], .topbar.floating [data-back] { visibility: hidden; }
  .actions { grid-template-columns: 1fr auto; }
  .actions [data-continue] { display: none; }
  .actions { grid-template-areas: "sum best"; margin-top: 18px; }
  .sheet { left: 24px; right: auto; bottom: 24px; width: min(460px, calc(100% - 48px)); }
  .hint { bottom: 28px; }
}

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

/* day picker, flags, past times */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 5px; margin: 4px 0 14px; }
.days::-webkit-scrollbar { display: none; }
.day { min-width: 0; padding: 7px 2px 8px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; gap: 3px; justify-items: center; color: var(--mute); }
.day span { font: 600 10px/1 var(--sans); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.day b { font: 800 20px/1 var(--display); color: var(--text); }
.day:hover { border-color: var(--text); }
.day[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.day[aria-pressed="true"] b { color: var(--ink); }
.time .flag { font: 700 10px/1 var(--display); letter-spacing: .06em; margin-left: 5px; opacity: .7; }
.time.past, .chip.past { opacity: .32; cursor: default; text-decoration: line-through; text-decoration-thickness: 1px; }
.time.past:hover { border-color: var(--line-2); }
.thumb.none { background: #ffffff10; }
