/* Solflix — single stylesheet.
   Colours come from the PINS_GAS_PALETAS-19 palette: cream #E5D8BD, background #282119,
   orange #C97338, rust #A54D27 and brown #65371F. Type is Barlow, as on the palette card. */
:root {
  --bg: #282119;
  --cream: #E5D8BD;
  --orange: #C97338;
  --rust: #A54D27;
  --brown: #65371F;

  /* Surfaces keep the background's hue, one step lighter each. */
  --surface: #30281F;
  --surface-2: #392F25;
  --surface-3: #43382C;
  --line: rgba(229, 216, 189, .1);
  --line-2: rgba(229, 216, 189, .18);
  --tint: rgba(229, 216, 189, .06);
  --tint-2: rgba(229, 216, 189, .1);

  /* Text colours all clear 4.4:1 on --surface-2. */
  --text: #E5D8BD;
  --text-hi: #F4ECDC;
  --text-2: #BCB09A;
  --muted: #A09582;

  --accent: #C97338;
  --accent-hi: #DA8A52;      /* hover fill, and orange text on dark surfaces */
  --on-accent: #1E1812;
  --accent-soft: rgba(201, 115, 56, .16);
  --accent-line: rgba(201, 115, 56, .6);

  --ok: #A3B97F;
  --warn: #E2AE5C;
  --danger: #E47C63;

  --scrim: rgba(40, 33, 25, .92);
  --glass: rgba(40, 33, 25, .55);
  --shadow: 0 24px 60px rgba(14, 10, 7, .6);
  --shadow-sm: 0 10px 26px rgba(14, 10, 7, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --gutter: clamp(16px, 3.6vw, 56px);
  --header-h: 68px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;
  --card-w: clamp(136px, 12.4vw, 192px);
  --caption-h: 48px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scrollbar-color: var(--surface-3) var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
::selection { background: rgba(201, 115, 56, .4); color: var(--text-hi); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); font: 600 12px/1.5 var(--font); color: var(--text); text-align: center; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -60px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--cream); color: var(--bg); font-weight: 700; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ shimmer */
.shimmer { background: linear-gradient(100deg, var(--surface) 20%, var(--surface-2) 40%, var(--surface) 60%) 0 0 / 300% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.skeleton-line { display: block; height: 14px; border-radius: 6px; margin: 12px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------------ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -.015em; transition: color .15s; }
a.brand:hover .brand-name { color: var(--text-hi); }

/* ------------------------------------------------------------------ header */
.site-header { --head-box: 40px; position: fixed; z-index: 40; inset: 0 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); background: linear-gradient(180deg, rgba(40, 33, 25, .85), rgba(40, 33, 25, 0)); }
.site-header .brand-mark { width: var(--head-box); height: var(--head-box); border-radius: var(--r); }
/* The solid state fades in on its own layer, so the switch from gradient to glass is smooth. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(40, 33, 25, .9); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .25s var(--ease); }
.site-header.is-solid::before { opacity: 1; }
.primary-nav { display: flex; align-items: center; gap: clamp(18px, 1.9vw, 28px); font-size: 15px; font-weight: 500; color: var(--text-2); }
.primary-nav a { position: relative; padding: 8px 0; white-space: nowrap; transition: color .15s; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .22s var(--ease); }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--text-hi); }
.primary-nav a.is-active::after { transform: scaleX(1); }
.primary-nav .nav-search { display: inline-grid; place-items: center; padding: 8px 2px; }
.nav-search svg { width: 19px; height: 19px; }
.icon-btn { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--text-2); transition: background-color .15s, color .15s; }
.icon-btn:hover, .icon-btn.is-active { background: var(--tint-2); color: var(--text-hi); }

/* Right-hand header boxes (CA, X, wallet, profile): one height, one frame, one gap. */
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.head-box, .wallet-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; height: var(--head-box); padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(229, 216, 189, .04); color: var(--text); font: 600 14px/1 var(--font); white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.head-box:hover, .wallet-btn:hover { background: var(--tint-2); border-color: rgba(229, 216, 189, .3); color: var(--text-hi); }
.head-box--icon { width: var(--head-box); padding: 0; }
.head-box--icon svg { width: 17px; height: 17px; }
.ca-btn { padding: 0 12px; font-variant-numeric: tabular-nums; }
.ca-label { padding: 4px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-hi); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.ca-icon { display: inline-flex; color: var(--muted); transition: color .15s; }
.ca-icon svg { width: 15px; height: 15px; }
.ca-btn:hover .ca-icon { color: var(--text-hi); }
.ca-btn.is-copied .ca-icon { color: var(--ok); }
/* Before launch: "CA · Coming soon", not copyable. */
.ca-btn.is-soon { cursor: default; color: var(--text-2); }
.ca-btn.is-soon:hover { background: rgba(229, 216, 189, .04); border-color: var(--line-2); color: var(--text-2); }
.ca-btn.is-soon .ca-icon { display: none; }
.profile-wrap { position: relative; display: flex; }
.profile-btn { position: relative; }
.profile-btn .avatar { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
.profile-btn[aria-expanded="true"] { background: var(--tint-2); border-color: rgba(229, 216, 189, .3); }
/* A connected wallet below the $5 threshold: a dot on the avatar, the reason in the menu. */
.profile-btn.has-alert::after { content: ""; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--bg); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 264px; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); animation: pop .16s var(--ease); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-heading { margin: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.menu-heading strong { color: var(--text); font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--text-2); }
.menu-item:hover { background: var(--tint-2); color: var(--text-hi); }
.menu-label { margin: 8px 10px 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-wallet { padding-bottom: 4px; }
.menu-wallet-row { display: flex; align-items: center; gap: 10px; padding: 0 2px 0 10px; }
.menu-wallet-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-hi); }
.menu-wallet-icon svg { width: 18px; height: 18px; }
.menu-wallet-id { display: grid; gap: 4px; flex: 1; min-width: 0; }
.menu-wallet-id strong { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.menu-wallet-id small { overflow: hidden; font-size: 12.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.menu-wallet-copy { width: 34px; height: 34px; }
.menu-wallet-copy svg { width: 16px; height: 16px; }
.menu-wallet-status { display: flex; align-items: center; gap: 9px; margin: 12px 10px 6px; font-size: 13px; font-weight: 600; }
.menu-wallet-status.is-ok { color: var(--ok); }
.menu-wallet-status.is-warn { color: var(--warn); }
.menu-wallet .btn { width: calc(100% - 8px); margin: 8px 4px 2px; }

/* ------------------------------------------------------------------ $FLIX wallet button + gate */
.wallet-btn svg { width: 18px; height: 18px; }
.wallet-btn--idle, .wallet-btn--idle:hover { color: var(--on-accent); }
.wallet-btn--idle { background: var(--accent); border-color: var(--accent); }
.wallet-btn--idle:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }

/* The unlock window (the ticket) lives in its own section below the dialogs. */
.lock-perks { display: grid; gap: 10px; margin: 0 0 20px; padding: 14px 16px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); text-align: left; }
.lock-perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.lock-perks svg { width: 16px; height: 16px; color: var(--accent-hi); }

/* Member-only page lock screen */
.lock-card { width: 100%; max-width: 440px; padding: 40px 32px 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center; box-shadow: var(--shadow); }
.lock-mark { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px; }
.lock-card h1 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.lock-body { margin: 0 0 22px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.lock-perks { margin-bottom: 24px; }
.lock-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.lock-note strong { color: var(--text); }

/* ------------------------------------------------------------------ avatars */
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: var(--avatar, var(--accent)); color: #FBF6EC; font-weight: 700; font-size: 15px; text-shadow: 0 1px 2px rgba(20, 14, 9, .35); }
.avatar--xs { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; vertical-align: -5px; margin-right: 6px; }
.avatar--sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; }
.avatar--lg { width: 88px; height: 88px; border-radius: 20px; font-size: 36px; }
.avatar--xl { width: 104px; height: 104px; border-radius: 24px; font-size: 44px; }
.avatar--add { background: var(--surface-2); color: var(--muted); border: 2px dashed var(--line-2); text-shadow: none; }
.avatar--add svg { width: 28px; height: 28px; }

/* ------------------------------------------------------------------ app outlet */
.app { min-height: 100vh; outline: none; }
.app.is-entering > * { animation: page-in .35s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.page { max-width: 1760px; margin: 0 auto; padding: calc(var(--header-h) + 36px) var(--gutter) 64px; }
.page--center { min-height: 80vh; display: grid; place-items: center; }
.page-head { margin-bottom: 28px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1, .person-info h1 { margin: 0; font-size: clamp(32px, 4.2vw, 52px); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.page-sub { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hi); }

/* ------------------------------------------------------------------ buttons & controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r); font: 600 15px/1 var(--font); white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn small { font-size: 13px; font-weight: 500; opacity: .75; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hi); }
.btn--glass { background: rgba(229, 216, 189, .12); border-color: rgba(229, 216, 189, .12); color: var(--text-hi); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--glass:hover { background: rgba(229, 216, 189, .2); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: var(--tint); border-color: rgba(229, 216, 189, .3); color: var(--text-hi); }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn--lg svg { width: 20px; height: 20px; }
.btn--sm { min-height: 34px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; }
.btn--icon { width: 44px; padding: 0; }
.btn--icon.btn--lg { width: 50px; }
.btn--block { width: 100%; }
.wl-add, .wl-on { display: inline-flex; }
.wl-on { display: none; }
[data-watchlist][aria-pressed="true"] .wl-add { display: none; }
[data-watchlist][aria-pressed="true"] .wl-on { display: inline-flex; }
.btn[data-watchlist][aria-pressed="true"] { border-color: var(--accent-line); }
.btn[data-watchlist][aria-pressed="true"] svg { color: var(--accent-hi); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.link-btn { padding: 4px 0; border: 0; background: none; color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.link-btn:hover { color: var(--text-hi); text-decoration-color: currentColor; }
.link-btn--danger { color: var(--danger); }
.link-btn--danger:hover { color: #F0A08C; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--tint); color: var(--text-2); font-size: 14px; font-weight: 500; transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--tint-2); color: var(--text-hi); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-hi); }
.chip--provider i { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--chip); color: #fff; font: 700 9px/1 var(--font); font-style: normal; }
.chip--removable { background: var(--tint-2); color: var(--text-hi); }
.chip--removable svg { width: 14px; height: 14px; opacity: .7; }
.pill { display: inline-flex; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(40, 33, 25, .35); font-size: 13px; font-weight: 500; color: var(--text-2); transition: background-color .15s, color .15s; }
a.pill:hover { background: var(--tint-2); color: var(--text-hi); }
.pill--quiet { border-color: var(--line); background: transparent; color: var(--muted); }
.badge { display: inline-flex; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: var(--tint-2); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); vertical-align: 2px; }
.badge--accent { background: var(--accent); color: var(--on-accent); }

.tabs { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tab { position: relative; padding: 6px 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color .15s, background-color .15s; }
.tab:hover { color: var(--text-hi); }
.tab.is-active { background: var(--surface-3); color: var(--text-hi); }
.tabs--pill { gap: 8px; padding: 0; border: 0; background: none; }
.tabs--pill .tab { padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; }
.tabs--pill .tab.is-active { background: var(--cream); border-color: var(--cream); color: var(--bg); }
.tabs--underline { gap: 28px; margin-bottom: 22px; padding: 0; overflow-x: auto; scrollbar-width: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.tabs--underline .tab { padding: 12px 0; border-radius: 0; font-size: 15px; }
.tabs--underline .tab.is-active { background: none; }
.tabs--underline .tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s var(--ease); }
.tabs--underline .tab.is-active::after { transform: scaleX(1); }
.tab b { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--tint-2); font-size: 11px; }
.tab b:empty { display: none; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.segmented button { padding: 8px 16px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; font-weight: 600; transition: background-color .15s, color .15s; }
.segmented button:hover { color: var(--text-hi); }
.segmented button.is-active { background: var(--cream); color: var(--bg); }
.segmented--sm button { padding: 6px 12px; font-size: 13px; }

.select-wrap { position: relative; display: inline-flex; }
select { appearance: none; min-height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A09582' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 16px; color: var(--text); font-size: 14px; font-weight: 500; outline: none; cursor: pointer; }
select:hover { border-color: rgba(229, 216, 189, .3); }
select:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
option { background: var(--surface-2); color: var(--text); }
input[type="search"], input:not([type]), input[type="text"] { outline: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ------------------------------------------------------------------ sections & rails */
.section { position: relative; margin: 0 0 clamp(36px, 4vw, 56px); padding: 0 var(--gutter); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; min-height: 40px; margin-bottom: 12px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: clamp(19px, 1.5vw, 23px); font-weight: 600; letter-spacing: -.01em; color: var(--text-hi); }
.section-title .accent { display: none; }
.section-tools { display: flex; align-items: center; gap: 16px; }
.see-all { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .15s; }
.see-all svg { width: 16px; height: 16px; transition: transform .15s var(--ease); }
.see-all:hover { color: var(--text-hi); }
.see-all:hover svg { transform: translateX(2px); }
.section-note { margin: 6px 0; font-size: 14px; color: var(--muted); }
.section-error { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); font-size: 14px; color: var(--text-2); }
.mini-title { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.mini-head { display: flex; align-items: center; justify-content: space-between; }

.rail-wrap { position: relative; margin: 0 calc(var(--gutter) * -1); }
.rail { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 8px var(--gutter) 12px; scrollbar-width: none; transition: opacity .2s var(--ease); }
.rail::-webkit-scrollbar { display: none; }
.rail.is-busy { opacity: .45; }
.rail > * { scroll-snap-align: start; }
.rail-btn { position: absolute; z-index: 5; top: 0; bottom: 0; display: grid; place-items: center; width: var(--gutter); min-width: 44px; padding: 0; border: 0; background: linear-gradient(90deg, rgba(40, 33, 25, .95), rgba(40, 33, 25, 0)); color: var(--text-hi); opacity: 0; transition: opacity .2s var(--ease); }
.rail-btn svg { width: 28px; height: 28px; }
.rail-btn--prev { left: 0; }
.rail-btn--next { right: 0; background: linear-gradient(270deg, rgba(40, 33, 25, .95), rgba(40, 33, 25, 0)); }
.rail-wrap:hover .rail-btn, .rail-btn:focus-visible { opacity: 1; }
.rail-btn:hover { color: var(--accent-hi); }

/* ------------------------------------------------------------------ cards */
.card { position: relative; flex: 0 0 var(--card-w); width: var(--card-w); transition: transform .25s var(--ease); }
.card-link { display: block; }
.card-poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r); background: var(--surface-2); transition: box-shadow .25s var(--ease); }
.card-poster::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(229, 216, 189, .07); pointer-events: none; transition: box-shadow .25s var(--ease); }
.card-poster img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s var(--ease), transform .4s var(--ease); }
.card-poster img.is-loaded { opacity: 1; }
.card-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: linear-gradient(160deg, var(--surface-3), var(--surface)); text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.card-copy { display: block; height: var(--caption-h); padding: 10px 2px 0; }
.card-copy strong { display: block; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; color: var(--text); transition: color .15s; }
.card-copy small { display: block; overflow: hidden; margin-top: 2px; font-size: 12.5px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.card-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(229, 216, 189, .25); }
.card-progress i { display: block; height: 100%; background: var(--accent); }
.card-action { position: absolute; z-index: 6; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(229, 216, 189, .22); border-radius: 50%; background: rgba(40, 33, 25, .8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text-hi); opacity: 0; transform: scale(.88); transition: opacity .2s var(--ease), transform .2s var(--ease), background-color .15s, border-color .15s, color .15s; }
.card-action svg { width: 16px; height: 16px; stroke-width: 2.2; }
.card-action:hover, .card-action[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.card-action[aria-pressed="true"] { opacity: 1; transform: none; }
.card:hover .card-action, .card:focus-within .card-action { opacity: 1; transform: none; }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); }
  .card:hover .card-poster { box-shadow: 0 18px 36px rgba(14, 10, 7, .55); }
  .card:hover .card-poster::after { box-shadow: inset 0 0 0 1px rgba(229, 216, 189, .3); }
  .card:hover .card-poster img { transform: scale(1.03); }
  .card:hover .card-copy strong { color: var(--text-hi); }
}
@media (hover: none) { .card-action { opacity: 1; transform: none; width: 30px; height: 30px; } }
/* Skeletons draw the caption lines too, so rails keep their height when they fill in. */
.card--skeleton::after { content: ""; display: block; height: calc(var(--caption-h) - 10px); margin-top: 10px; background: linear-gradient(var(--surface) 0 0) 2px 2px / 74% 12px no-repeat, linear-gradient(var(--surface) 0 0) 2px 22px / 44% 10px no-repeat; }

/* Ranked (top 10) cards: a big outlined number tucked behind the poster. */
.section--ranked { --card-w: clamp(176px, 15.4vw, 236px); }
.card--ranked .card-link, .card--ranked.card--skeleton .card-poster, .card--ranked.card--skeleton::after { margin-left: 30%; }
.card--ranked .card-link { position: relative; z-index: 1; }
.card--ranked:nth-child(10) { margin-left: 24px; }
/* The outline runs ~.05em past the box (negative tracking), so this tucks about 4px under the poster. */
.rank-badge { position: absolute; z-index: 0; right: calc(70% + 2px); bottom: var(--caption-h); font: 700 clamp(104px, 9.6vw, 156px)/.8 var(--display); letter-spacing: -.05em; color: var(--bg); -webkit-text-stroke: 2px rgba(229, 216, 189, .42); pointer-events: none; }

/* ------------------------------------------------------------------ pickers */
.picker { position: relative; display: inline-flex; }
.picker-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 0 0 2px; border: 0; border-bottom: 2px solid var(--accent); background: none; font: inherit; color: var(--text-hi); }
.picker-trigger svg { width: 16px; height: 16px; color: var(--accent-hi); stroke-width: 2.4; transition: transform .2s var(--ease); }
.picker-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.picker-menu { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: 250px; max-height: 380px; overflow-y: auto; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; letter-spacing: 0; animation: pop .16s var(--ease); }
.picker-menu.is-left { left: 0; right: auto; }
.picker-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-weight: 500; color: var(--text-2); }
.picker-option:hover, .picker-option:focus-visible { background: var(--tint-2); color: var(--text-hi); }
.picker-option.is-active { color: var(--accent-hi); font-weight: 600; }
.picker-icon { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px; background: var(--chip, var(--surface-2)); font: 700 10px/1 var(--font); font-style: normal; color: #fff; }

/* ------------------------------------------------------------------ hero slider */
.hero { position: relative; height: min(86vh, 820px); min-height: 540px; margin-bottom: clamp(8px, 2vw, 24px); overflow: hidden; background: var(--bg); }
.hero-skeleton { position: absolute; inset: 0; }
.hero-error { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-stage { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s linear .9s; }
.hero-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.06); transition: transform 8s linear; }
.hero-slide.is-active .hero-img { transform: scale(1); }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(40, 33, 25, .96) 0%, rgba(40, 33, 25, .8) 28%, rgba(40, 33, 25, .2) 62%, rgba(40, 33, 25, .05)),
  linear-gradient(0deg, var(--bg) 0%, rgba(40, 33, 25, .6) 16%, transparent 40%),
  linear-gradient(180deg, rgba(40, 33, 25, .55), transparent 24%); }
.hero-copy { position: absolute; left: var(--gutter); bottom: clamp(96px, 17vh, 160px); width: min(580px, calc(100% - var(--gutter) * 2)); }
.hero-slide.is-active .hero-copy > * { animation: rise .8s var(--ease) both; }
.hero-slide.is-active .hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-slide.is-active .hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-slide.is-active .hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-slide.is-active .hero-copy > :nth-child(5) { animation-delay: .24s; }
.hero-logo-wrap { margin: 0; }
.hero-logo { width: auto; max-width: min(440px, 100%); max-height: 140px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 24px rgba(14, 10, 7, .6)); }
.hero-title { margin: 0; font: 700 clamp(40px, 5.6vw, 80px)/.92 var(--display); letter-spacing: -.005em; text-transform: uppercase; text-wrap: balance; color: var(--text-hi); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 19px; margin-top: 16px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.meta-line > span { position: relative; }
.meta-line > span + span::before { content: ""; position: absolute; left: -11px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--muted); }
.meta-line .rating { font-weight: 700; color: var(--warn); }
.meta-line .rating small { font-weight: 500; color: var(--muted); }
.meta-line .cert { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; }
.hero-overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 16px 0 26px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.hero-nav { position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(96px, 17vh, 160px); display: flex; align-items: center; gap: 12px; }
.hero-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--text-hi); transition: background-color .15s, border-color .15s; }
.hero-arrow:hover { background: rgba(229, 216, 189, .16); border-color: rgba(229, 216, 189, .3); }
.hero-dots { display: flex; gap: 6px; }
.hero-dot { position: relative; width: 22px; height: 3px; padding: 0; overflow: hidden; border: 0; border-radius: 3px; background: rgba(229, 216, 189, .28); transition: width .3s var(--ease); }
.hero-dot::before { content: ""; position: absolute; inset: -10px 0; }
.hero-dot.is-active { width: 44px; }
.hero-dot i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.is-active i { animation: dot-fill var(--hero-duration, 7s) linear forwards; }
.hero.is-paused .hero-dot.is-active i { animation-play-state: paused; }
@keyframes dot-fill { to { transform: scaleX(1); } }
.home-rails { position: relative; z-index: 2; margin-top: clamp(-96px, -9vh, -40px); }

/* ------------------------------------------------------------------ grid pages */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 13vw, 184px), 1fr)); gap: 24px clamp(12px, 1.3vw, 20px); }
.grid .card { width: auto; min-width: 0; flex: none; }
.grid-skeleton { display: contents; }
.grid-status { padding: 30px 0 0; }
.grid-end { text-align: center; font-size: 14px; color: var(--muted); }
.sentinel { height: 1px; }

.browse-bar, .library-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.library-bar .link-btn { margin-left: auto; }
.filters-toggle b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; }
.filters { display: grid; gap: 20px; max-height: 0; overflow: hidden; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-lg); background: var(--surface); opacity: 0; transition: max-height .35s var(--ease), opacity .25s var(--ease), padding .35s var(--ease), margin .35s var(--ease), border-color .35s; }
.filters.is-open { max-height: 900px; margin-bottom: 14px; padding: 20px; border-color: var(--line); opacity: 1; }
.filter-group h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; }
.year-range { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 0; margin-bottom: 20px; }
.active-filters:empty { margin: 0; }

/* ------------------------------------------------------------------ search */
.search-hero { display: grid; gap: 16px; margin-bottom: 30px; }
.search-box { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 12px 0 20px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(201, 115, 56, .16); }
.search-box > svg { width: 22px; height: 22px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: clamp(16px, 2vw, 20px); font-weight: 500; }
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { display: none; }
.recent { margin-bottom: 30px; }
[data-idle] .section { padding: 0; }
[data-idle] .rail-wrap { margin: 0 calc(var(--gutter) * -1); }
.people-strip { margin-bottom: 30px; }
.people-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.people-strip.is-grid .people-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); overflow: visible; }
.person-chip { display: flex; align-items: center; gap: 12px; flex: 0 0 250px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: background-color .15s, border-color .15s; }
.person-chip:hover { background: var(--surface-2); border-color: var(--line-2); }
.person-photo { display: grid; place-items: center; flex: 0 0 52px; height: 52px; overflow: hidden; border-radius: 50%; background: var(--surface-3); font-weight: 700; color: var(--muted); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-copy { min-width: 0; }
.person-copy strong { display: block; overflow: hidden; font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.person-copy small { display: block; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }

/* ------------------------------------------------------------------ title page */
.detail-hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; }
.detail-hero.is-loading { background: var(--surface); }
.detail-backdrop { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; animation: backdrop-in 1.2s var(--ease) both; }
@keyframes backdrop-in { from { opacity: 0; transform: scale(1.04); } }
.detail-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(40, 33, 25, .97) 0%, rgba(40, 33, 25, .86) 32%, rgba(40, 33, 25, .28) 70%, rgba(40, 33, 25, .1)),
  linear-gradient(0deg, var(--bg) 0%, rgba(40, 33, 25, .45) 25%, transparent 50%),
  linear-gradient(180deg, rgba(40, 33, 25, .6), transparent 25%); }
.detail-inner { width: min(760px, 100%); padding: calc(var(--header-h) + 60px) var(--gutter) 46px; }
.detail-inner > * { animation: rise .7s var(--ease) both; }
.detail-inner > :nth-child(2) { animation-delay: .05s; }
.detail-inner > :nth-child(3) { animation-delay: .1s; }
.detail-inner > :nth-child(4) { animation-delay: .15s; }
.detail-inner > :nth-child(5) { animation-delay: .2s; }
.detail-inner > :nth-child(n+6) { animation-delay: .25s; }
.detail-logo-wrap { margin: 0; }
.detail-logo { width: auto; max-width: min(480px, 100%); max-height: 170px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 24px rgba(14, 10, 7, .6)); }
.detail-title { margin: 0; font: 700 clamp(40px, 5.8vw, 84px)/.92 var(--display); letter-spacing: -.005em; text-transform: uppercase; text-wrap: balance; color: var(--text-hi); }
.tagline { margin: 14px 0 0; font-size: 16px; font-style: italic; color: var(--text-2); }
.genre-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-inner .actions { margin-top: 26px; }
.resume-bar { width: min(340px, 100%); height: 4px; margin-top: 14px; overflow: hidden; border-radius: 4px; background: rgba(229, 216, 189, .2); }
.resume-bar i { display: block; height: 100%; background: var(--accent); }
.overview { max-width: 640px; margin: 22px 0 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.facts { display: grid; gap: 6px; margin: 20px 0 0; font-size: 14px; }
.facts > div { display: flex; gap: 10px; }
.facts dt { flex: 0 0 108px; font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; color: var(--text); }
.facts a:hover, .details-grid a:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.providers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.providers-label { margin-right: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.provider-logo img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.providers-credit { margin-left: 4px; font-size: 11px; color: var(--muted); }
.section-nav { position: sticky; z-index: 20; top: var(--header-h); display: flex; gap: 28px; margin-bottom: 32px; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--scrim); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.section-nav a { padding: 14px 0; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--muted); transition: color .15s; }
.section-nav a:hover { color: var(--text-hi); }
.detail-body .section { scroll-margin-top: calc(var(--header-h) + 60px); }
.cast-rail { gap: 16px; }
.cast-card { flex: 0 0 120px; scroll-snap-align: start; }
.cast-photo { display: grid; place-items: center; width: 120px; height: 156px; overflow: hidden; border-radius: var(--r); background: var(--surface-2); font: 700 32px var(--font); color: var(--muted); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.cast-photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-card:hover .cast-photo { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.cast-card strong { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.25; }
.cast-card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 13px; color: var(--muted); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 28px; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.details-grid dt { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.details-grid dd { margin: 4px 0 0; font-size: 15px; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.episode-tools { flex-wrap: wrap; }
.mini-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.mini-search:focus-within { border-color: var(--accent-line); }
.mini-search svg { width: 16px; height: 16px; }
.mini-search input { width: 170px; border: 0; background: none; font-size: 14px; }
.mini-search input::placeholder { color: var(--muted); }
.episode-list { display: grid; gap: 10px; }
.episode > a { display: flex; gap: 18px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: background-color .15s, border-color .15s; }
.episode > a:hover { background: var(--surface-2); border-color: var(--line-2); }
.episode.is-current > a { border-color: var(--accent-line); }
.episode.is-upcoming > a { opacity: .55; cursor: default; }
.episode.is-watched .episode-thumb img { filter: grayscale(.5) brightness(.75); }
.episode-thumb { position: relative; flex: 0 0 clamp(140px, 17vw, 230px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: linear-gradient(150deg, var(--surface-3), var(--surface)); }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 16, 12, .4); color: var(--text-hi); opacity: 0; transition: opacity .2s var(--ease); }
.episode-play svg { width: 26px; height: 26px; }
.episode > a:hover .episode-play { opacity: 1; }
.episode-copy { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.episode-top { font-size: 16px; }
.episode-top b { font-weight: 600; color: var(--muted); }
.episode-top strong { font-weight: 600; }
.episode-copy small { font-size: 13px; color: var(--muted); }
.episode-copy em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-style: normal; line-height: 1.5; color: var(--text-2); }
.episode--skeleton { display: flex; gap: 18px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.episode--skeleton .episode-copy { flex: 1; }

/* ------------------------------------------------------------------ person */
.person-head { display: flex; align-items: flex-start; gap: clamp(20px, 4vw, 48px); margin-bottom: 44px; }
.person-portrait { display: grid; place-items: center; flex: 0 0 clamp(150px, 20vw, 270px); aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); font: 700 64px var(--font); color: var(--muted); box-shadow: var(--shadow-sm); }
.person-portrait img { width: 100%; height: 100%; object-fit: cover; }
.person-info { flex: 1; min-width: 0; }
.bio { max-width: 760px; margin-top: 20px; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.bio p { margin: 0 0 12px; }
.bio.is-clamped { max-height: 11em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.person-page .section { padding: 0; }
.person-page .rail-wrap { margin: 0 calc(var(--gutter) * -1); }
.filmography { margin: 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.filmography li { display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) 44px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 15px; }
.filmography li:first-child { border-top: 0; }
.filmography li:hover { background: var(--surface-2); }
.filmography a { font-weight: 600; }
.filmography a:hover { color: var(--accent-hi); }
.film-year { font-variant-numeric: tabular-nums; color: var(--muted); }
.film-role { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.film-type { text-align: right; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ library & profile */
.history-group { margin-bottom: 32px; }
.profile-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 30px; }
.inline-edit { display: flex; align-items: center; gap: 10px; }
.inline-edit input { width: min(320px, 60vw); padding: 2px 0; border: 0; border-bottom: 2px solid var(--line-2); background: none; font-size: clamp(28px, 4vw, 42px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.inline-edit input:focus { border-color: var(--accent); }
.swatches { display: flex; gap: 8px; margin-top: 14px; }
.swatch { width: 26px; height: 26px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 2px var(--bg); transition: transform .15s; }
.swatch:hover { transform: scale(1.12); }
.swatch.is-active { border-color: var(--text-hi); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat b { display: block; font: 600 36px/1.05 var(--display); color: var(--text-hi); }
.stat span { font-size: 13px; font-weight: 500; color: var(--muted); }
.panel { margin-bottom: 18px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.panel h2 { margin: 0 0 16px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.profile-grid { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 14px; }
.profile-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 0; background: none; font-weight: 600; color: var(--text-2); }
.profile-pick .avatar { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.profile-pick:hover .avatar { transform: translateY(-3px); }
.profile-tile.is-active .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.profile-tile.is-active .profile-pick { color: var(--text-hi); }
.profile-add input { width: 120px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; text-align: center; }
.profile-add input:focus { border-color: var(--accent-line); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.panel h2 + .switch-row { padding-top: 0; border-top: 0; }
.switch-row strong { display: block; font-size: 15px; font-weight: 600; }
.switch-row small { display: block; font-size: 13px; color: var(--muted); }
.switch-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; flex: 0 0 44px; height: 26px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-3); transition: background-color .2s var(--ease), border-color .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .2s var(--ease), background-color .2s; }
.switch-row input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked + i::after { transform: translateX(18px); background: var(--text-hi); }
.switch-row input:focus-visible + i { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.file-btn { cursor: pointer; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; margin: 0; }
.shortcuts div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.shortcuts dd { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------------ empty / error / setup */
.empty-state { max-width: 460px; margin: 30px auto; padding: 20px; text-align: center; }
.empty-icon { display: inline-grid; place-items: center; min-width: 64px; height: 64px; margin-bottom: 16px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--accent-hi); }
.empty-icon svg { width: 28px; height: 28px; }
.empty-icon b { font: 700 26px/1 var(--display); letter-spacing: .02em; }
.empty-state--error .empty-icon { color: var(--danger); }
.empty-state h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.empty-state p { margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.empty-state .actions { justify-content: center; }
.setup-card { max-width: 520px; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.setup-card .brand { margin-bottom: 22px; }
.setup-card h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.setup-card p, .setup-card li { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.setup-card code { padding: 2px 6px; border-radius: 5px; background: var(--surface-3); font-size: 13px; }
.setup-card a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ footer, tabbar */
.site-footer { margin-top: 24px; padding: 48px var(--gutter) 36px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-main, .footer-legal { max-width: 1760px; margin: 0 auto; }
.footer-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; }
.footer-brand { max-width: 340px; }
.footer-brand p { margin: 14px 0 18px; line-height: 1.6; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text); transition: background-color .15s, border-color .15s, color .15s; }
.footer-social svg { width: 14px; height: 14px; }
.footer-social:hover { background: var(--tint); border-color: rgba(229, 216, 189, .3); color: var(--text-hi); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 32px clamp(40px, 6vw, 96px); }
.footer-nav div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-heading { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.footer-nav a { transition: color .15s; }
.footer-nav a:hover { color: var(--text-hi); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-legal p { margin: 0; }
.footer-legal a { text-decoration: underline; text-decoration-color: rgba(229, 216, 189, .3); text-underline-offset: 3px; transition: color .15s; }
.footer-legal a:hover { color: var(--text-hi); }
.tmdb-note { max-width: 520px; line-height: 1.5; }
.tabbar { display: none; }

/* ------------------------------------------------------------------ dialogs & toast */
.dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dialog[open] { animation: pop .22s var(--ease); }
.dialog::backdrop { background: rgba(20, 16, 12, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog-shell { position: relative; padding: 22px; }
.dialog-x { position: absolute; top: 12px; right: 12px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.dialog-text { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.dialog-status { min-height: 20px; margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--text-2); }
.dialog--video { width: min(1100px, calc(100vw - 24px)); background: var(--bg); }
.dialog--video .dialog-shell { padding: 12px; }
.dialog--video .dialog-head h2 { padding-left: 6px; font-size: 15px; color: var(--text-2); }
.video-frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 14px; max-width: min(460px, calc(100vw - 32px)); padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--cream); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s var(--ease), transform .25s var(--ease); }
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast[data-tone="error"] { background: #F1CDBF; color: #3B1A0C; }

/* ------------------------------------------------------------------ pop-up notice */
/* Shown once, right after the entry card: the page dims first, then the card rises into place. */
.dialog--notice { max-width: 440px; }
.dialog--notice[open] { animation: notice-in .5s var(--ease) .16s both; }
.dialog--notice::backdrop { animation: backdrop-in .3s ease-out; }
@keyframes notice-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }
.notice-shell { padding: 32px 28px 24px; text-align: center; }
.notice-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-hi); }
.notice-icon svg { width: 28px; height: 28px; }
.notice-shell .eyebrow { margin-bottom: 8px; }
.notice-shell h2 { margin: 0 0 10px; font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.notice-text { max-width: 350px; margin: 0 auto 20px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.notice-tip { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); text-align: left; }
.notice-tip svg { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); }
.notice-tip p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.notice-tip strong { font-weight: 600; color: var(--text-hi); }
.notice-actions { display: grid; gap: 10px; }
.notice-actions .btn svg { width: 17px; height: 17px; }
.notice-foot { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------------ unlock window: the ticket */
/* A cinema ticket: the dark main part walks through the steps, the cream stub fills in with the
   holder, their $FLIX and a barcode drawn from the address, and gets stamped "Admitted".
   Notches are cut with masks where the two parts meet. gate.js renders it. */
.dialog--gate { width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; border: 0; border-radius: 0; background: none; box-shadow: none; scrollbar-width: none; }
.dialog--gate[open] { animation: ticket-in .5s var(--ease); }
@keyframes ticket-in { from { opacity: 0; transform: translateY(26px) rotate(-1.2deg) scale(.97); } }
.ticket { --notch: 13px; --stub: 212px; display: grid; grid-template-columns: minmax(0, 1fr) var(--stub); min-height: 470px; filter: drop-shadow(0 28px 50px rgba(10, 7, 5, .55)); }
.ticket-main { position: relative; padding: 20px 28px 26px; border-radius: 18px 0 0 18px; background: var(--surface);
  -webkit-mask: radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) bottom / 100% 51% no-repeat; }
.ticket-stub { position: relative; display: flex; flex-direction: column; padding: 24px 22px 22px; border-radius: 0 18px 18px 0; background: linear-gradient(160deg, #EDE1C9, #E3D5B8); color: #282119;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) bottom / 100% 51% no-repeat; }
.ticket-stub::before { content: ""; position: absolute; left: 0; top: calc(var(--notch) + 6px); bottom: calc(var(--notch) + 6px); border-left: 2px dashed rgba(40, 33, 25, .28); }
.stub-brand { display: flex; align-items: center; gap: 8px; font: 700 13px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; }
.stub-brand img { width: 22px; height: 22px; border-radius: 6px; }
.stub-admit { margin: 22px 0 0; font: 700 50px/.86 var(--display); letter-spacing: .01em; text-transform: uppercase; color: #A54D27; }
.stub-fields { display: grid; gap: 12px; margin: 26px 0 0; }
.stub-fields dt { font: 700 10px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: rgba(40, 33, 25, .55); }
.stub-fields dd { margin: 4px 0 0; font: 700 17px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stub-code { position: relative; margin-top: auto; padding-top: 18px; }
.stub-barcode { display: block; width: 100%; height: 40px; fill: #282119; opacity: .9; transition: opacity .3s; }
.ticket[data-holder="no"] .stub-barcode { opacity: .28; }
/* The usher's scanner runs over the barcode while the balance is checked. */
.ticket[data-step="checking"] .stub-code::after { content: ""; position: absolute; left: -6px; right: -6px; top: 18px; height: 2px; border-radius: 2px; background: #C97338; box-shadow: 0 0 12px 2px rgba(201, 115, 56, .7); animation: scan .9s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(38px); } }
.stub-stamp { position: absolute; left: 50%; top: 66%; padding: 9px 14px 7px; border: 3px solid currentColor; border-radius: 8px; color: #B4552A; text-align: center; font: 700 30px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: translate(-50%, -50%) rotate(-13deg) scale(1.9); mix-blend-mode: multiply; pointer-events: none; }
.stub-stamp strong { display: block; font-weight: 700; }
.stub-stamp small { display: block; margin-top: 5px; font: 700 10px/1 var(--font); letter-spacing: .18em; }
.ticket.is-admitted .stub-stamp { animation: stamp-in .45s cubic-bezier(.2, .9, .3, 1.15) .2s forwards; }
.ticket.is-admitted { animation: ticket-thud .32s ease .44s; }
@keyframes stamp-in {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-13deg) scale(1.9); }
  62% { opacity: 1; transform: translate(-50%, -50%) rotate(-13deg) scale(.93); }
  100% { opacity: .92; transform: translate(-50%, -50%) rotate(-13deg) scale(1); }
}
@keyframes ticket-thud { 35% { transform: translateY(3px) scale(.994); } }

.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.ticket-x { margin-right: -10px; }
.ticket-steps { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ticket-steps li { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.ticket-steps li + li::before { content: ""; width: 18px; height: 2px; margin-right: 1px; border-radius: 2px; background: var(--surface-3); }
.ticket-steps i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font: 700 11px/1 var(--font); font-style: normal; }
.ticket-steps i svg { width: 13px; height: 13px; stroke-width: 3; }
.ticket-steps .is-active { color: var(--text-hi); }
.ticket-steps .is-active i { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ticket-steps .is-done { color: var(--text-2); }
.ticket-steps .is-done i { background: var(--accent-soft); color: var(--accent-hi); }
.ticket-steps .is-done + li::before { background: var(--accent-line); }
.ticket-steps .is-error i { background: rgba(228, 124, 99, .16); color: var(--danger); }

.ticket-view.is-entering { animation: view-in .32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.ticket-view .eyebrow { margin-bottom: 8px; }
.ticket-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--text-hi); }
.ticket-text { margin: 10px 0 20px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.ticket-text strong { color: var(--text-hi); }
.ticket-foot { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.ticket-hint { margin: -8px 0 20px; font-size: 13px; color: var(--muted); }
.ticket-hint b { color: var(--text); font-variant-numeric: tabular-nums; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ticket-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.wallet-list { display: grid; gap: 8px; }
.wallet-row { display: flex; align-items: center; gap: 14px; width: 100%; height: 60px; padding: 0 16px 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(229, 216, 189, .035); color: var(--text); font: 600 16px/1 var(--font); text-align: left; transition: background-color .15s, border-color .15s, transform .15s var(--ease); }
.wallet-row:hover { background: var(--tint-2); border-color: rgba(229, 216, 189, .3); transform: translateY(-1px); }
.wallet-row:active { transform: scale(.99); }
.wallet-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; overflow: hidden; border-radius: 10px; }
.wallet-icon img { width: 100%; height: 100%; object-fit: cover; }
.wallet-mono { display: grid; place-items: center; width: 100%; height: 100%; background: var(--surface-3); color: var(--cream); font: 700 17px/1 var(--display); }
.wallet-name { flex: 1; min-width: 0; }
.wallet-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wallet-tag svg { width: 13px; height: 13px; }
.wallet-tag.is-ready { color: var(--ok); }
a.wallet-row .wallet-tag.is-ready { color: var(--accent-hi); }

.ticket-wait, .ticket-done, .ticket-error { display: flex; flex-direction: column; align-items: center; padding-top: 18px; text-align: center; }
.ticket-wait .ticket-text, .ticket-done .ticket-text, .ticket-error .ticket-text { max-width: 400px; }
.wait-orb { position: relative; display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 22px; border-radius: 50%; background: var(--surface-2); }
.wait-orb > img, .wait-orb > .wallet-mono { width: 48px; height: 48px; border-radius: 13px; }
.wait-orb::before, .wait-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: orb 1.8s ease-out infinite; }
.wait-orb::after { animation-delay: .9s; }
@keyframes orb { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.65); } }
.wait-spinner { width: 58px; height: 58px; margin: 12px 0 26px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.done-check svg { width: 88px; height: 88px; margin-bottom: 18px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .55s ease-out forwards; }
.done-check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .35s ease-out .45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.error-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 50%; background: rgba(228, 124, 99, .14); color: var(--danger); font: 700 30px/1 var(--display); }

.flix-meter { margin: 16px 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.flix-meter-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.flix-meter-row strong { font-size: 17px; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.flix-meter-row small { font-size: 13px; font-weight: 600; color: var(--muted); }
.flix-meter-row.is-muted { font-size: 13px; color: var(--muted); }
.flix-bar { height: 10px; margin: 11px 0 9px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.flix-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rust), var(--accent)); animation: fill .8s var(--ease); }
@keyframes fill { from { width: 0; } }
.flix-how { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.flix-how li { display: flex; gap: 12px; }
.flix-how b { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 12px; }
.flix-how li > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; flex: 1; font-size: 13px; line-height: 1.5; color: var(--muted); }
.flix-how strong { font-size: 14px; color: var(--text); }
.flix-how a:not(.btn) { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.flix-ca { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.flix-ca code { flex: 1; min-width: 0; overflow: hidden; padding: 8px 10px; border-radius: 8px; background: var(--bg); color: var(--text); font: 600 12.5px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.flix-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.flix-links .btn svg, .flix-ca .btn svg { width: 14px; height: 14px; }

/* Phones: the stub becomes a strip across the top, the perforation runs sideways. */
@media (max-width: 640px) {
  .dialog--gate { width: calc(100vw - 20px); max-height: calc(100dvh - 16px); }
  .ticket { --notch: 12px; grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ticket-stub { order: -1; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand brand" "admit fields" "code code"; column-gap: 18px; padding: 16px 18px 14px; border-radius: 18px 18px 0 0;
    -webkit-mask: radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--notch) at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat; }
  .ticket-stub::before { left: calc(var(--notch) + 6px); right: calc(var(--notch) + 6px); top: auto; bottom: 0; border-left: 0; border-bottom: 2px dashed rgba(40, 33, 25, .28); }
  .stub-brand { grid-area: brand; }
  .stub-admit { grid-area: admit; margin-top: 12px; font-size: 38px; }
  .stub-fields { grid-area: fields; grid-template-columns: 1fr 1fr; align-content: end; margin: 12px 0 2px; }
  .stub-fields dd { font-size: 15px; }
  .stub-code { grid-area: code; padding-top: 12px; }
  .stub-barcode { height: 30px; }
  .ticket[data-step="checking"] .stub-code::after { top: 12px; }
  @keyframes scan { to { transform: translateY(28px); } }
  .stub-stamp { left: auto; right: -14px; top: 78%; font-size: 21px; }
  .stub-stamp small { font-size: 9px; }
  .ticket-main { padding: 16px 18px 20px; border-radius: 0 0 18px 18px;
    -webkit-mask: radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--notch) at 0 0, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat; }
  .ticket-head { margin-bottom: 16px; }
  .ticket-steps { gap: 4px; }
  .ticket-steps li + li::before { width: 8px; }
  .ticket-steps li:not(.is-active) span { display: none; }
  .ticket-title { font-size: 25px; }
  .ticket-text { font-size: 14.5px; }
  .ticket-actions .btn { flex: 1 1 auto; }
}
.toast button { padding: 6px 12px; border: 0; border-radius: var(--r-sm); background: var(--bg); color: var(--cream); font-size: 13px; font-weight: 700; }
.toast button:hover { background: var(--brown); }

/* ------------------------------------------------------------------ watch page & player */
body[data-route="watch"] .site-header, body[data-route="watch"] .site-footer, body[data-route="watch"] .tabbar { display: none; }
body.is-watching { overflow: hidden; }
.watch-screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
.watch-screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(40, 33, 25, .35), rgba(40, 33, 25, .94) 75%); pointer-events: none; }
.watch-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: blur(3px); }
.watch-card { position: relative; z-index: 1; max-width: 560px; padding: 32px var(--gutter); text-align: center; }
.watch-card h1 { margin: 0 0 12px; font: 700 clamp(34px, 5vw, 56px)/1 var(--display); letter-spacing: -.005em; text-transform: uppercase; color: var(--text-hi); }
.watch-card p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.watch-card p strong { color: var(--accent-hi); }
.watch-card .eyebrow { color: var(--accent-hi); }
.watch-card .actions { justify-content: center; margin-top: 24px; }
.watch-page { position: fixed; inset: 0; z-index: 50; background: #000; }
.player { position: absolute; inset: 0; overflow: hidden; background: #000; color: var(--text-hi); outline: none; -webkit-user-select: none; user-select: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-embed { position: absolute; inset: 0; z-index: 1; background: #000; }
.player-embed .player-frame { display: block; width: 100%; height: 100%; border: 0; }
/* Embed mode: the vendor player has its own controls, so drop ours entirely and
   keep only the back button, the title, and the episode-drawer slot. */
.player.is-embed video,
.player.is-embed .player-bigplay,
.player.is-embed .player-spinner,
.player.is-embed .player-flash,
.player.is-embed .player-bottom,
.player.is-embed .skip-intro,
.player.is-embed .player-error { display: none !important; }
/* The overlay (back arrow, title, sources button) hides over the full-bleed vendor
   player; hovering the top edge reveals it. */
.player.is-embed .player-top { z-index: 6; padding-bottom: 34px; background: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.player.is-embed:hover .player-top, .player.is-embed:focus-within .player-top { opacity: 1; pointer-events: auto; }
.player.is-embed .player-slot { z-index: 5; }
.player.is-embed .episode-drawer { z-index: 7; }
.player video::cue { font-family: var(--font); font-size: clamp(16px, 2.4vw, 30px); background: rgba(0, 0, 0, .7); }
.player.is-idle { cursor: none; }
.player-top, .player-bottom { position: absolute; left: 0; right: 0; z-index: 4; padding: 18px clamp(14px, 2.4vw, 32px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.player-top { top: 0; display: flex; align-items: center; gap: 12px; padding-bottom: 50px; background: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent); }
.player-bottom { bottom: 0; padding-top: 60px; background: linear-gradient(0deg, rgba(0, 0, 0, .88), transparent); }
.player.is-idle .player-top, .player.is-idle .player-bottom, .player.is-idle .skip-intro { opacity: 0; pointer-events: none; }
.player.is-idle .player-top { transform: translateY(-10px); }
.player.is-idle .player-bottom { transform: translateY(10px); }
.player-titles { min-width: 0; }
.player-titles strong { display: block; overflow: hidden; font-size: clamp(16px, 1.6vw, 21px); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.player-titles small { display: block; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.player-top-slot { margin-left: auto; }
.player-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 42px; height: 42px; padding: 0 8px; border: 0; border-radius: var(--r); background: none; color: var(--text-hi); transition: background-color .15s, transform .15s var(--ease); }
.player-btn svg { width: 24px; height: 24px; }
.player-btn:hover { background: rgba(229, 216, 189, .14); }
.player-btn:active { transform: scale(.92); }
.player-btn.is-on { color: var(--accent-hi); }
.player-btn--text span { font-size: 14px; font-weight: 600; }
.seek { position: relative; display: flex; align-items: center; height: 22px; cursor: pointer; }
.seek-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(229, 216, 189, .24); transition: height .15s var(--ease); }
.seek:hover .seek-track { height: 6px; }
.seek-buffer, .seek-played { position: absolute; inset: 0; border-radius: inherit; transform: scaleX(0); transform-origin: left; }
.seek-buffer { background: rgba(229, 216, 189, .38); }
.seek-played { background: var(--accent); }
.seek-handle { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 0 4px rgba(201, 115, 56, .28); transform: scale(0); transition: transform .15s var(--ease); }
.seek:hover .seek-handle, .seek:focus-within .seek-handle { transform: scale(1); }
.seek-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seek-tip { position: absolute; bottom: 24px; padding: 3px 7px; border-radius: 6px; background: rgba(20, 16, 12, .9); font-size: 12px; font-weight: 600; transform: translateX(-50%); pointer-events: none; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 4px; }
.volume { display: flex; align-items: center; }
.volume input { width: 0; height: 4px; opacity: 0; accent-color: var(--accent); cursor: pointer; transition: width .2s var(--ease), opacity .2s var(--ease); }
.volume:hover input, .volume:focus-within input { width: 90px; margin: 0 8px; opacity: 1; }
.time { margin-left: 10px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.pmenu-wrap { position: relative; }
.pmenu { position: absolute; bottom: calc(100% + 10px); right: 0; min-width: 170px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(40, 33, 25, .97); box-shadow: var(--shadow); animation: pop .15s var(--ease); }
/* Menus anchored to the top bar (Sources) drop DOWN instead of up. */
.player-top .pmenu { top: calc(100% + 10px); bottom: auto; }
.pmenu p { margin: 4px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pmenu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--text-2); }
.pmenu button:hover { background: var(--tint-2); color: var(--text-hi); }
.pmenu button.is-active { color: var(--text-hi); }
.pmenu button.is-active::before { content: "✓ "; color: var(--accent-hi); }
.player-spinner { position: absolute; z-index: 3; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border: 3px solid rgba(229, 216, 189, .15); border-top-color: var(--accent); border-radius: 50%; opacity: 0; pointer-events: none; animation: spin .8s linear infinite; transition: opacity .2s; }
.player.is-loading .player-spinner, .player-spinner.is-static { opacity: 1; }
.player-spinner.is-static { position: relative; left: auto; top: auto; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-bigplay { position: absolute; z-index: 5; left: 50%; top: 50%; display: grid; place-items: center; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 40px rgba(201, 115, 56, .4); transition: transform .2s var(--ease), background-color .15s; }
.player-bigplay:hover { transform: scale(1.06); background: var(--accent-hi); }
.player-bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.player-flash { position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(20, 16, 12, .6); font-size: 16px; font-weight: 700; opacity: 0; pointer-events: none; }
.player-flash svg { width: 30px; height: 30px; }
.player-flash.is-on { animation: flash .6s var(--ease); }
@keyframes flash { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.25); } }
.skip-intro { position: absolute; z-index: 5; right: clamp(14px, 2.4vw, 32px); bottom: 120px; }
.player-slot { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.player-slot > * { pointer-events: auto; }
.embed-hint, .demo-banner { position: absolute; top: 84px; left: 50%; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 28px); padding: 8px 8px 8px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(40, 33, 25, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 14px; color: var(--text); transform: translateX(-50%); }
.embed-hint { animation: rise .4s var(--ease); }
.embed-hint .icon-btn, .demo-banner .icon-btn { width: 30px; height: 30px; }
.embed-hint .icon-btn svg, .demo-banner .icon-btn svg { width: 16px; height: 16px; }
.demo-banner { border-color: rgba(226, 174, 92, .4); font-size: 13px; color: var(--text-2); }
.demo-banner strong { white-space: nowrap; color: var(--warn); }
.player-error { position: absolute; z-index: 7; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20, 16, 12, .88); text-align: center; }
.player-error strong { font-size: 20px; font-weight: 600; }
.player-error p { max-width: 420px; color: var(--text-2); }
.up-next { position: absolute; right: clamp(14px, 2.4vw, 32px); bottom: 120px; display: flex; align-items: center; gap: 14px; width: min(460px, calc(100vw - 28px)); padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: rgba(40, 33, 25, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); animation: rise .4s var(--ease); }
.up-next img { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.up-next strong { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.up-next .eyebrow { margin-bottom: 4px; }
.up-next--end { left: 50%; right: auto; bottom: 50%; width: min(620px, calc(100vw - 28px)); padding: 22px; transform: translate(-50%, 50%); animation: none; }
.up-next > div { flex: 1; min-width: 0; }
.end-recs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.end-recs .card { width: auto; }
.end-recs .card-copy { height: auto; padding-top: 8px; }
.end-recs .card-copy small { display: none; }
.end-recs .card-copy strong { font-size: 13px; }
.episode-drawer { position: absolute; z-index: 8; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(400px, 100vw); border-left: 1px solid var(--line); background: rgba(40, 33, 25, .97); animation: drawer .3s var(--ease); }
@keyframes drawer { from { transform: translateX(100%); } }
.episode-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.episode-drawer select { max-width: 260px; }
.drawer-list { flex: 1; display: grid; align-content: start; gap: 6px; overflow-y: auto; padding: 10px; }
.drawer-ep { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: background-color .15s; }
.drawer-ep:hover { background: var(--tint-2); }
.drawer-ep.is-current { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.drawer-ep.is-upcoming { opacity: .5; }
.drawer-thumb { position: relative; flex: 0 0 120px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-3); }
.drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer-ep strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.drawer-ep small { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .site-header { --head-box: 38px; }
  .primary-nav { display: none; }
  .tabbar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(40, 33, 25, .95); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--text-hi); }
  .tabbar a.is-active svg { color: var(--accent-hi); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .hero { height: 78vh; min-height: 520px; }
  .hero-img { object-position: 62% 20%; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(40, 33, 25, .84) 34%, rgba(40, 33, 25, .15) 70%), linear-gradient(180deg, rgba(40, 33, 25, .6), transparent 20%); }
  .hero-copy { bottom: 64px; }
  .hero-logo { max-width: 78%; max-height: 96px; }
  .hero-overview { -webkit-line-clamp: 2; margin-bottom: 18px; font-size: 15px; }
  .hero-copy .btn--lg { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .hero-copy .btn--icon.btn--lg { width: 46px; padding: 0; }
  .hero-nav { left: var(--gutter); right: auto; bottom: 24px; }
  .hero-arrow { display: none; }
  .home-rails { margin-top: 0; }
  .rail-btn { display: none; }
  .section-head { align-items: flex-start; }
  .section-tools:has(.tabs) { width: 100%; justify-content: space-between; }
  .section-tools .tabs { overflow-x: auto; }
  .detail-hero { min-height: 0; }
  .detail-inner { padding-top: 46vh; padding-bottom: 30px; }
  .detail-backdrop { bottom: auto; height: 62vh; -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent); mask-image: linear-gradient(180deg, #000 50%, transparent); }
  .detail-shade { background: linear-gradient(180deg, rgba(40, 33, 25, .4), transparent 30%, rgba(40, 33, 25, .72) 55%, var(--bg) 70%); }
  .detail-logo { max-height: 110px; }
  .detail-inner .actions .btn--lg { min-height: 46px; padding: 0 16px; font-size: 15px; }
  .detail-inner .actions .btn--icon.btn--lg { width: 46px; padding: 0; }
  .detail-inner .actions .btn--primary { flex: 1 1 100%; }
  .facts dt { flex-basis: 96px; }
  .episode > a { gap: 12px; padding: 10px; }
  .episode-thumb { flex-basis: 128px; }
  .episode-copy em { -webkit-line-clamp: 2; font-size: 13px; }
  .mini-search { flex: 1; }
  .mini-search input { width: 100%; }
  .episode-tools { width: 100%; }
  .episode-tools .select-wrap { flex: 1; }
  .episode-tools select { width: 100%; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .browse-bar .segmented { flex: 1 1 100%; }
  .browse-bar .segmented button { flex: 1; }
  .browse-bar .select-wrap { flex: 1; }
  .browse-bar select { width: 100%; }
  .filters.is-open { max-height: 1400px; }
  .filter-row { gap: 16px; }
  .search-box { height: 54px; }
  .tabs--pill { overflow-x: auto; scrollbar-width: none; }
  .person-head { flex-direction: column; align-items: center; text-align: center; }
  .person-head .facts > div { justify-content: center; }
  .person-head .facts dt { flex-basis: auto; }
  .bio { text-align: left; }
  .filmography li { grid-template-columns: 44px minmax(0, 1fr) 30px; padding: 11px 14px; }
  .film-role { display: none; }
  .section--ranked { --card-w: 156px; }
  .rank-badge { font-size: 96px; }
  .controls { flex-wrap: wrap; }
  .time { margin-left: 4px; font-size: 13px; }
  .volume input { display: none; }
  .player-btn[data-p="back10"], .player-btn[data-p="fwd10"] { display: none; }
  .up-next { bottom: 100px; }
  .up-next img { width: 110px; }
  .end-recs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .end-recs .card:nth-child(n+3) { display: none; }
  .embed-hint, .demo-banner { top: 70px; }
  .footer-main { flex-direction: column; }
  .footer-legal { flex-direction: column; }
  .dialog-shell { padding: 18px; }
  .notice-shell { padding: 28px 20px 20px; }
  .notice-shell h2 { font-size: 23px; }
}
@media (max-width: 560px) {
  .header-actions { gap: 8px; }
  .wallet-btn { width: var(--head-box); padding: 0; }
  .wallet-btn span { display: none; }
  .ca-btn { padding: 0 10px; }
  .ca-icon { display: none; }
}
@media (max-width: 480px) {
  .site-header { --head-box: 36px; gap: 12px; }
}
@media (max-width: 360px) {
  .ca-label { display: none; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-chip { flex-basis: 220px; }
}
/* No prefers-reduced-motion overrides: all motion plays for everyone, whatever the system setting
   (the owner's call). */
