:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --surface: #fff;
  --text: #2b2f33;
  --muted: #5b5b5b;
  --heading: #17191c;
  --accent: #a52a2a;
  --border: rgba(40, 40, 40, .16);
  --selected: #f7eeea;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101214;
  --surface: #1b1e23;
  --text: #d8d5cf;
  --muted: #b2ada5;
  --heading: #edeae4;
  --accent: #de9572;
  --border: rgba(255, 255, 255, .2);
  --selected: #392a25;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Optima Medium", Optima, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
.page-header, main { width: min(1440px, 100%); margin: 0 auto; padding: 24px 32px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-header > div { min-width: 0; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
h1 { margin: 0; color: var(--heading); font-size: clamp(21px, 3vw, 30px); line-height: 1.3; overflow-wrap: anywhere; }
#note { margin: 8px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
button:hover { color: var(--accent); border-color: var(--accent); }
button:disabled { opacity: .65; cursor: progress; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
main { padding-top: 0; padding-bottom: 24px; }
.notice { line-height: 1.7; overflow-wrap: anywhere; }
#watch { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.video-stage { position: relative; background: #101214; border-radius: 11px 11px 0 0; }
video { display: block; width: 100%; max-height: min(68vh, max(240px, calc(100dvh - 370px))); aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: inherit; }
.play-overlay {
  position: absolute;
  /* Leave the native timeline and playback controls accessible. */
  inset: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .3);
  color: #fff;
}
.play-overlay:hover { color: #fff; background: rgba(0, 0, 0, .4); }
.play-ring { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #fff; border-radius: 50%; font-size: 25px; }
.captions { padding: 18px 22px 20px; }
.caption-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
h2 { margin: 0; color: var(--heading); font-size: 16px; font-weight: 600; }
h2 span { color: var(--muted); font-weight: 400; margin-left: 5px; }
.languages { display: flex; flex-wrap: wrap; gap: 6px; }
.languages [aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--selected); }
#fullscreen { margin-left: auto; }
#caption-status { margin: 18px 0 0; line-height: 1.6; }
.caption-text { margin-top: 12px; min-height: 3.5em; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.55; }
.caption-text p { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.caption-text p:last-child { margin-bottom: 0; }
.caption-text [lang="en"] { color: var(--muted); }
#watch:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; background: var(--bg); overflow: auto; }
#watch:fullscreen .video-stage { border-radius: 0; }
#watch:fullscreen video { max-height: 65vh; }
#watch:fullscreen .captions { max-width: 1440px; margin: 0 auto; }
@media (max-width: 600px) {
  .page-header, main { padding-left: 12px; padding-right: 12px; }
  .page-header { align-items: flex-start; flex-direction: column; padding-top: 20px; padding-bottom: 18px; gap: 14px; }
  .captions { padding: 18px 16px 22px; }
  .caption-toolbar { gap: 12px; }
  .caption-toolbar h2 { flex-basis: 100%; }
  #fullscreen { margin-left: 0; }
}
