/* Reel — trip-app system: light = warm grey + black + one orange, dark = rmndo near-black + silver.
   Fonts self-hosted (Google Fonts is blocked in China). Plain CSS on purpose: TV browsers are old. */
@font-face { font-family: "Archivo"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/archivo-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/archivo-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/archivo-vietnamese-wght-normal.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JB Mono"; font-weight: 400; font-display: swap; src: url(/static/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JB Mono"; font-weight: 500; font-display: swap; src: url(/static/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #e8e8e5; --surface: #f6f6f3; --ink: #121212; --muted: #5e5e5a;
  --line: #cbcbc6; --line-strong: #121212;
  --accent: #ff4f00; --accent-ink: #121212; --accent-text: #ad3600;
  --press: rgba(18, 18, 18, .06); --focus: #121212;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "JB Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --tap: 44px; --r: 3px; --r-lg: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #030303; --surface: #0b0b0b; --ink: #c6c8ca; --muted: rgba(198, 200, 202, .7);
    --line: #1f2021; --line-strong: #c6c8ca;
    --accent: #ff5a1f; --accent-ink: #030303; --accent-text: #ff6a33;
    --press: rgba(198, 200, 202, .08); --focus: #ff5a1f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #030303; --surface: #0b0b0b; --ink: #c6c8ca; --muted: rgba(198, 200, 202, .7);
  --line: #1f2021; --line-strong: #c6c8ca;
  --accent: #ff5a1f; --accent-ink: #030303; --accent-text: #ff6a33;
  --press: rgba(198, 200, 202, .08); --focus: #ff5a1f; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
body { max-width: 760px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
/* TV browsers usually report 960–1920 CSS px and sit 3 m away: everything a size up */
@media (min-width: 1100px) { html, body { font-size: 20px; } body { max-width: 1040px; } }

[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 1100px) { .mono { font-size: 14px; } }
.muted { color: var(--muted); }

.top { display: flex; align-items: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 0 16px; border-bottom: 1px solid var(--line-strong); }
.top .mono { margin-left: auto; }
.brand { font-weight: 800; font-size: 28px; letter-spacing: -.02em; line-height: 1; }
.brand.small { font-size: 20px; margin-left: auto; }
.brand.big { font-size: 56px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap);
  padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { background: var(--press); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
@media (min-width: 1100px) { .btn { min-height: 56px; padding: 0 26px; font-size: 20px; } .btn.small { min-height: 44px; font-size: 16px; } }
/* TV remotes move focus with the arrow keys: focus has to be unmissable */
a:focus, button:focus, input:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

.list { padding-top: 8px; }
.item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.item-main { display: block; text-decoration: none; padding: 2px 0; border-radius: var(--r); }
.item h2, .player .title { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (min-width: 1100px) { .item h2, .player .title { font-size: 28px; } }
.label { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.facts { margin-top: 8px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.empty { padding: 48px 0; }
.empty-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.hint { margin: 20px 0 0; font-size: 14px; }
@media (min-width: 1100px) { .hint { font-size: 17px; } }

.player { padding-top: 16px; }
.frame { background: #000; border-radius: var(--r); overflow: hidden; margin: 0 -16px 16px; }
@media (min-width: 792px) { .frame { margin: 0 0 16px; } }
video { display: block; width: 100%; max-height: 80vh; background: #000; }
.back { margin-right: auto; }
#resume { margin-top: 12px; }

.pin { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-top: 32px; }
.pin-form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.pin-form input {
  min-height: 60px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: 500 28px/1 var(--mono); letter-spacing: .3em; width: 100%;
}
.pin-form .btn { min-height: 56px; font-size: 18px; }
.error { color: var(--accent-text); font-weight: 600; }

.update { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.update .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }

.foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; color: var(--muted); }
.theme, .foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.foot-row form { margin: 0; }
.chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  font: 500 14px/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--line-strong); background: var(--surface); font-weight: 700; }
