/* ChiYu's content-first mobile visual system. Loaded after the functional base. */
:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #1b1c1f;
  --surface-raised: #25262a;
  --surface-hover: #2d2e32;
  --ink: #f5f5f6;
  --muted: #b0b1b9;
  --dim: #9799a3;
  --line: #ffffff12;
  --accent: #a8e8d7;
  --accent-2: #a8e8d7;
  --accent-ink: #143b32;
  --danger: #f39b98;
  --brand-coral: #ffa59a;
  --nav-bg: #252629e8;
  --preference-track: #111214;
  --preference-selected: #a8e8d714;
  --preference-shadow: 0 2px 6px #00000024;
  --shadow: 0 24px 90px #0006;
  --bottom-bar-height: 100px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-feature-settings: "ss01";
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-raised: #eeeeF1;
  --surface-hover: #e8e9ed;
  --ink: #1b1c20;
  --muted: #61636d;
  /* At least 4.5:1 for 11-12px metadata on white, page and raised surfaces. */
  --dim: #6a6c76;
  --line: #1c1c2810;
  --accent: #266d5c;
  --accent-2: #266d5c;
  --accent-ink: #fff;
  --danger: #bd4949;
  --brand-coral: #b34e46;
  --nav-bg: #fffffff0;
  --preference-track: #f0f0f3;
  --preference-selected: #d9ece5;
  --preference-shadow: 0 2px 5px #16162212, 0 0 1px #1616221a;
  --shadow: 0 24px 90px #1b1c281c;
}

body { font-size: 16px; letter-spacing: -.15px; }
button, input, select { letter-spacing: inherit; }
button, a, input, select { outline-offset: 3px; }
.app-icon, .bottom-nav .nav-link svg { stroke-width: 1.75; }
.app-shell { max-width: 1440px; padding-right: 44px; padding-left: 44px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.site-header { padding-top: 28px; padding-bottom: 22px; border: 0; }
.header-main { min-height: 48px; gap: 40px; }
.brand { gap: 10px; }
.brand img { width: 45px; height: 45px; border-radius: 13px; }
.brand strong { font-size: 23px; font-weight: 750; letter-spacing: -.6px; }
.brand strong span { font-size: 20px; font-weight: 650; color: var(--ink); }
.brand small { display: none; }
.search-form { height: 48px; max-width: 600px; border: 1px solid transparent; background: var(--surface); border-radius: 18px; }
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--preference-selected); }
.search-icon { color: var(--dim); padding-left: 16px; }
.search-form input { font-size: 15px; padding: 0 12px; }
.search-form input::placeholder { color: var(--dim); }
/* The form no longer clips its children, so the submit follows its rounded edge. */
.search-submit { padding: 0 20px; color: var(--ink); background: transparent; font-size: 14px; font-weight: 600; border-radius: 0 17px 17px 0; }
.search-submit:hover, :root[data-theme="light"] .search-submit:hover { background: var(--surface-hover); }
#main { padding-top: 15px; padding-bottom: 38px; }
.section-heading { margin-bottom: 24px; align-items: center; }
.heading-copy h1 { font-size: 30px; line-height: 1.2; font-weight: 750; letter-spacing: -.8px; }
.heading-copy p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.heading-eyebrow { color: var(--dim); }
.button { min-height: 46px; border-color: transparent; border-radius: 14px; background: var(--surface-raised); font-size: 14px; font-weight: 600; }
.button:hover { background: var(--surface-hover); border-color: transparent; }
.button.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.button.primary:hover, :root[data-theme="light"] .button.primary:hover { background: var(--accent); opacity: .88; }
.button.subtle { background: var(--surface); }
.icon-button { border-color: transparent; border-radius: 14px; background: var(--surface); color: var(--ink); width: 44px; height: 44px; min-width: 44px; }
.icon-button:hover { background: var(--surface-hover); color: var(--ink); }
.text-button { font-size: 13px; }
.shuffle-button { min-height: 44px; padding: 9px 13px; font-size: 13px; border-radius: 24px; background: var(--surface); color: var(--muted); }
.shuffle-button svg { width: 17px; height: 17px; }
.filters-row { margin-bottom: 22px; gap: 8px; }
.category-list, .unified-category-list { gap: 5px; }
.category-list.unified-category-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; }
.category-list.unified-category-list .filter-chip { padding-left: 9px; padding-right: 9px; }
.filter-chip, :root[data-theme="light"] .filter-chip { min-height: 44px; padding: 10px 17px; border: 0; border-radius: 23px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.filter-chip:hover { background: var(--surface); color: var(--ink); }
.filter-chip.active, :root[data-theme="light"] .filter-chip.active { background: var(--ink); color: var(--bg); font-weight: 650; }
.all-categories-button { min-height: 44px; padding: 10px 8px; font-size: 13px; }
.secondary-filters { margin-top: -8px; margin-bottom: 24px; padding: 5px; gap: 4px; border: 0; border-radius: 18px; background: var(--surface); }
.secondary-chip { flex: 1; min-width: 0; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 13px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.secondary-chip.active { background: var(--surface-raised); border: 0; color: var(--ink); font-weight: 650; }
.secondary-filters:not(.anime-secondary-filters) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.secondary-filters:not(.anime-secondary-filters) .secondary-chip { width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 10px 4px; white-space: nowrap; }
.library-status { margin-bottom: 18px; font-size: 12px; color: var(--dim); }
.library-status strong { color: var(--muted); }
.library-status > span:first-child { flex: 1; min-width: 0; }
.library-status .library-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; max-width: none; flex: 0 0 auto; }
.library-status > .library-actions:last-child { max-width: none; }
.library-actions .all-categories-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 9px 4px; color: var(--muted); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.library-actions .all-categories-button > span { white-space: nowrap; flex-shrink: 0; }
.library-actions .all-categories-button svg { width: 16px; height: 16px; }
.library-actions .shuffle-button { font-size: 12px; padding: 9px 11px; gap: 6px; }
.library-actions .source-controls { margin: 0; }
.result-badge { border-radius: 8px; background: var(--surface); font-size: 12px; padding: 6px 10px; }
.notice { border: 0; border-radius: 17px; background: var(--surface); color: var(--muted); padding: 15px 17px; font-size: 13px; line-height: 1.7; }
:root[data-theme="light"] .notice { background: #e9f0eb; color: #466453; border: 0; }
.notice.warning, :root[data-theme="light"] .notice.warning { background: #a7792f14; color: var(--muted); border: 0; }

/* Suggestions stay attached to the input; the submit button remains usable. */
.search-form { position: relative; overflow: visible; z-index: 20; }
.search-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; max-height: min(420px, calc(100dvh - 160px)); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); box-shadow: 0 16px 42px #0004; }
:root[data-theme="light"] .search-suggestions { background: var(--surface); box-shadow: 0 14px 36px #1b1c281f, 0 0 0 1px #1b1c280a; }
.search-suggestions[hidden] { display: none; }
.search-suggestion { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; }
.search-suggestion[aria-selected="true"], .search-suggestion:active { background: var(--preference-selected); }
.search-suggestion-title { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.35; font-weight: 550; }
.search-suggestion-meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.35; color: var(--dim); }
.search-suggestions-empty { margin: 0; padding: 16px 14px; font-size: 13px; color: var(--dim); }
.search-submit { position: relative; touch-action: manipulation; }
.search-submit:active { background: var(--surface-hover); }
.search-submit.is-searching > svg { visibility: hidden; }
.search-submit.is-searching::after { content: ""; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); width: 18px; height: 18px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: search-submit-spin .7s linear infinite; pointer-events: none; }
@keyframes search-submit-spin { to { transform: rotate(360deg); } }
/* The native clear control keeps its behaviour; only its glyph joins the quiet icon set. */
.search-form input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-form input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0 -6px 0 6px;
  background-color: var(--dim);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18Zm0 7.5 3.6-3.6 1.5 1.5-3.6 3.6 3.6 3.6-1.5 1.5-3.6-3.6-3.6 3.6-1.5-1.5 3.6-3.6-3.6-3.6 1.5-1.5Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18Zm0 7.5 3.6-3.6 1.5 1.5-3.6 3.6 3.6 3.6-1.5 1.5-3.6-3.6-3.6 3.6-1.5-1.5 3.6-3.6-3.6-3.6 1.5-1.5Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  cursor: pointer;
}
.search-form input::-webkit-search-cancel-button:active { background-color: var(--muted); }

/* One real selection, with the artwork carrying the visual hierarchy. */
.discovery-heading { margin-bottom: 20px; }
.discovery-feature { position: relative; display: block; isolation: isolate; width: 100%; height: 430px; margin: 0 0 28px; padding: 0; border: 0; border-radius: 28px; overflow: hidden; background: #252629; color: #fff; text-align: left; }
.feature-art, .feature-shade { position: absolute; inset: 0; }
.feature-art { z-index: -3; }
.feature-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 29%; }
.feature-shade { z-index: -2; background: linear-gradient(0deg, #08090bf5 0%, #08090bd9 15%, #08090b52 51%, #08090b00 80%), linear-gradient(90deg, #08090b55, #08090b00 65%); }
.feature-copy { position: absolute; left: 34px; right: 34px; bottom: 30px; display: flex; align-items: flex-start; flex-direction: column; max-width: 620px; }
.feature-kicker { font-size: 11px; font-weight: 600; letter-spacing: 2px; line-height: 1.5; color: #e9e9ec; margin-bottom: 11px; }
.feature-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 36px; font-weight: 750; line-height: 1.22; letter-spacing: -.9px; text-wrap: balance; text-shadow: 0 2px 12px #0004; }
.feature-meta { margin-top: 11px; font-size: 13px; line-height: 1.5; color: #d0d0d6; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.feature-cta { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; margin-top: 20px; padding: 10px 18px; border-radius: 22px; background: #f5f5f6; color: #17181b; font-size: 13px; font-weight: 650; line-height: 1.4; }
.feature-cta svg { width: 16px; height: 16px; fill: currentColor; stroke-width: 0; }
.discovery-feature:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.discovery-feature:active .feature-cta { background: #d9f1e8; }
.video-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 19px; }
.video-card, .card-link { border-radius: 15px; }
.card-poster, :root[data-theme="light"] .card-poster { padding-top: 145%; border-radius: 15px; background: var(--surface-raised); }
.card-poster::before { top: 67%; background: linear-gradient(transparent, #08090bb3); }
.card-poster img { color: var(--dim); }
.poster-label { top: 9px; left: 9px; padding: 4px 7px; border: 0; border-radius: 6px; background: #16171ba8; color: #f5f5f6; font-size: 10px; backdrop-filter: blur(8px); }
.poster-remark { bottom: 9px; left: 10px; right: 10px; font-size: 11px; font-weight: 500; }
.card-link h2 { font-size: 14px; font-weight: 600; line-height: 1.5; height: 42px; min-height: 42px; margin: 11px 0 3px; letter-spacing: -.2px; }
.card-meta { font-size: 12px; color: var(--dim); line-height: 18px; height: 18px; }
.card-remove { background: #191a1fcf; border-color: #ffffff12; backdrop-filter: blur(8px); }
.pagination { margin-top: 34px; }
.pagination .button { min-height: 44px; border-radius: 22px; }
.page-info { font-size: 13px; }
.empty-state, :root[data-theme="light"] .empty-state { border: 0; border-radius: 24px; background: var(--surface); }
.empty-icon, :root[data-theme="light"] .empty-icon { border: 0; background: var(--surface-raised); color: var(--muted); border-radius: 20px; }
.skeleton-poster, :root[data-theme="light"] .skeleton-poster { background: var(--surface-raised); border-radius: 15px; }
.skeleton-line, :root[data-theme="light"] .skeleton-line { background: var(--surface-raised); }
.site-footer { border-color: var(--line); font-size: 11px; color: var(--dim); padding-top: 22px; }
.site-footer > span:first-child { font-size: 12px; color: var(--muted); }

/* A stable floating dock, without a second selection shape or decorative rail. */
.search-submit { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 0 12px; }
.search-submit svg { width: 21px; height: 21px; }
.bottom-nav { left: 50%; right: auto; bottom: calc(14px + env(safe-area-inset-bottom)); width: 320px; max-width: calc(100% - 32px); height: 64px; padding: 0; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: translateX(-50%); }
.bottom-nav-inner { height: 64px; min-height: 64px; width: 100%; max-width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px; gap: 3px; border: 1px solid #ffffff0d; border-radius: 34px; background: var(--nav-bg); box-shadow: 0 8px 28px #00000020, 0 1px 1px #ffffff05 inset; backdrop-filter: blur(26px) saturate(125%); -webkit-backdrop-filter: blur(26px) saturate(125%); }
:root[data-theme="light"] .bottom-nav-inner { border-color: #fff; box-shadow: 0 8px 30px #1b1c2812, 0 0 0 1px #1b1c2804; }
.bottom-nav .nav-link { height: 50px; min-height: 50px; max-height: 50px; flex-direction: row; padding: 8px 12px; gap: 9px; background: transparent; border-radius: 26px; font-size: 13px; font-weight: 500; color: var(--dim); }
.bottom-nav .nav-link svg { width: 25px; height: 25px; min-height: 25px; max-height: 25px; stroke-width: 1.8; }
.bottom-nav .nav-link:not(.quick-nav).is-active svg { filter: drop-shadow(0 0 7px #ffa59a25); }
.bottom-nav .nav-link > span:not(.nav-count) { height: 18px; line-height: 18px; font-size: 13px; font-weight: 550; }
.bottom-nav .nav-link::before, .bottom-nav .nav-link::after { display: none; }
.bottom-nav .nav-link.is-active, :root[data-theme="light"] .bottom-nav .nav-link.is-active { background: transparent; color: var(--brand-coral); font-weight: 550; }
.bottom-nav .nav-link.is-active svg { stroke-width: 2; }
.bottom-nav .nav-link.quick-nav, :root[data-theme="light"] .bottom-nav .nav-link.quick-nav {
  --quick-glow-rest: .38;
  --quick-glow-peak: .64;
  position: relative;
  isolation: isolate;
  gap: 0;
  padding: 5px 9px;
  border-radius: 27px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  overflow: visible;
}
.bottom-nav .nav-link.quick-nav::before {
  content: "";
  display: block;
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 50%;
  background: conic-gradient(from 24deg, #a78bfa 0deg, #bd82ee 110deg, #ffb16b 210deg, #f5a064 290deg, #a78bfa 360deg);
  filter: blur(8px);
  opacity: var(--quick-glow-rest);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: quick-logo-breathe 3.8s ease-in-out infinite;
}
.bottom-nav .nav-link.quick-nav::after {
  content: "";
  display: block;
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #bc98ed52;
  background: radial-gradient(circle at 14% 15%, #a78bfa14, transparent 55%), radial-gradient(circle at 90% 90%, #ffb16b1c, transparent 60%);
  box-shadow: -2px -1px 10px #ac8cf51a, 2px 2px 10px #ffb16b18;
  transform: translate(-50%, -50%);
  opacity: .75;
  pointer-events: none;
}
.bottom-nav .quick-nav-mark {
  position: relative;
  z-index: 1;
  display: block;
  width: 38px;
  height: 38px;
  max-width: 38px;
  flex: 0 0 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px #361d5a24);
  /* Keep the icon anchored; only its surrounding light breathes. */
  animation: none;
}
.bottom-nav .nav-link.quick-nav > span { display: none; }
.bottom-nav .nav-link.quick-nav.is-active, :root[data-theme="light"] .bottom-nav .nav-link.quick-nav.is-active {
  --quick-glow-rest: .55;
  --quick-glow-peak: .8;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.bottom-nav .nav-link.quick-nav.is-active::after { border-color: #d1b0fa80; box-shadow: -2px -1px 12px #ac8cf533, 2px 2px 12px #ffb16b2e; }
.bottom-nav .nav-link.quick-nav:hover, .bottom-nav .nav-link.quick-nav:active { background: transparent; }
.bottom-nav .nav-link.quick-nav:active { opacity: .8; }
@keyframes quick-logo-breathe {
  0%, 100% { opacity: var(--quick-glow-rest); transform: translate(-50%, -50%) scale(.96); }
  50% { opacity: var(--quick-glow-peak); transform: translate(-50%, -50%) scale(1.06); }
}
.bottom-nav .nav-link:hover { background: #ffffff05; }
.bottom-nav .nav-link:active { background: var(--surface-hover); opacity: .8; }
.bottom-nav .nav-count { top: 2px; right: calc(50% - 27px); min-width: 16px; line-height: 16px; font-size: 9px; background: var(--brand-coral); color: var(--bg); }
.toast { bottom: calc(102px + env(safe-area-inset-bottom)); border-radius: 16px; background: var(--ink); color: var(--bg); border: 0; box-shadow: 0 10px 35px #0003; font-size: 14px; padding: 13px 18px; }

/* Preferences have native control proportions and quieter grouping. */
body.settings-view .site-header { display: none; }
body.settings-view #main { padding-top: 44px; }
body.settings-view .site-footer { display: none; }
.settings-page { max-width: 620px; }
.settings-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.settings-intro h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 750; letter-spacing: -1px; }
.settings-intro p { margin: 8px 0 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.settings-intro > img { width: 52px; height: 52px; object-fit: contain; border-radius: 16px; }
.settings-group { margin-bottom: 28px; }
.settings-group > h2 { margin: 0 0 11px 3px; font-size: 13px; font-weight: 500; letter-spacing: .1px; color: var(--dim); }
.settings-list { border: 0; border-radius: 23px; background: var(--surface); }
.preference-setting { padding: 20px; }
.preference-setting + .preference-setting { border-top: 1px solid var(--line); }
.preference-heading { margin-bottom: 15px; gap: 9px; }
.preference-heading h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.preference-heading .setting-icon { width: 22px; height: 24px; border-radius: 0; background: transparent; color: var(--muted); }
.preference-heading .app-icon { width: 20px; height: 20px; }
.language-options { padding: 4px; gap: 3px; border-radius: 15px; background: var(--preference-track); }
.preference-option { min-height: 46px; padding: 10px 30px 10px 12px; border: 1px solid transparent; border-radius: 11px; font-size: 14px; font-weight: 500; color: var(--muted); }
.preference-option[aria-pressed="true"] { border-color: transparent; background: var(--surface-raised); color: var(--ink); box-shadow: var(--preference-shadow); font-weight: 600; }
:root[data-theme="light"] .preference-option[aria-pressed="true"] { background: var(--surface); }
.preference-check { width: 15px; height: 15px; right: 10px; background: var(--accent); color: var(--accent-ink); }
.preference-check .app-icon { width: 10px; height: 10px; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.theme-option { min-height: 84px; flex-direction: column; gap: 9px; padding: 14px 4px 12px; background: var(--preference-track); border-radius: 15px; font-size: 13px; }
.theme-option[aria-pressed="true"], :root[data-theme="light"] .theme-option[aria-pressed="true"] { border-color: var(--accent); background: var(--preference-selected); color: var(--ink); box-shadow: none; }
.theme-swatch { width: 30px; height: 28px; min-height: 28px; margin: 0; border: 0; border-radius: 0; background: transparent; color: inherit; box-shadow: none; }
.theme-swatch--system, .theme-swatch--light, .theme-swatch--dark { border: 0; background: transparent; color: inherit; }
.theme-swatch > svg { width: 26px; height: 26px; stroke-width: 1.55; }
.theme-option .preference-check { width: 14px; height: 14px; top: 7px; right: 7px; }
.preference-help { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--dim); }
.setting-row { min-height: 78px; padding: 16px 18px; gap: 13px; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-icon { width: 32px; height: 34px; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.setting-icon .app-icon { width: 22px; height: 22px; }
.setting-copy { gap: 4px; }
.setting-copy strong { color: var(--ink); font-size: 15px; font-weight: 550; line-height: 1.45; }
.setting-copy small { color: var(--dim); font-size: 12px; line-height: 1.6; }
.setting-value { font-size: 12px; color: var(--dim); }
.setting-chevron { color: var(--dim); opacity: .7; }
.setting-action--danger .setting-icon { background: transparent; color: var(--danger); }
.setting-action:hover { background: var(--surface-hover); }
.settings-footnote { margin-top: 32px; font-size: 12px; letter-spacing: .2px; color: var(--dim); }
.collection-back { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 0; margin: 0 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.collection-back .app-icon { width: 19px; height: 19px; }

/* Film details and sheets keep their existing actions, with less chrome. */
.modal-backdrop { background: #07080bb8; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.modal { border-color: #ffffff0d; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.modal-close, :root[data-theme="light"] .modal-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-raised); color: var(--ink); }
.detail-hero { display: grid; grid-template-columns: 170px minmax(0, 1fr); padding: 34px 30px 28px; gap: 24px 28px; align-items: center; }
.detail-poster { width: 100%; border-radius: 18px; box-shadow: 0 12px 30px #0003; }
.detail-copy h1 { margin-bottom: 12px; font-size: 28px; line-height: 1.35; letter-spacing: -.5px; font-weight: 700; }
.detail-type { color: var(--dim); font-size: 11px; margin-bottom: 10px; }
.detail-type span, :root[data-theme="light"] .detail-type span { padding: 0; border: 0; background: transparent; }
.detail-meta { color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-description { color: var(--dim); font-size: 13px; }
.detail-actions { display: flex; grid-column: 1 / -1; gap: 10px; margin-top: 0; }
.detail-actions .button { min-height: 44px; padding: 11px 17px; border-radius: 13px; font-size: 13px; }
.detail-actions .button.primary { flex: 1; }
.detail-actions .button:not(.primary) { min-width: 100px; background: var(--surface-raised); color: var(--muted); }
.detail-actions .button.is-saved { background: var(--preference-selected); color: var(--accent); }
.detail-actions .button svg { width: 18px; height: 18px; }
.detail-body { padding: 0 30px 30px; }
.detail-synopsis { margin: 0; border-top: 1px solid var(--line); }
.detail-synopsis > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; list-style: none; cursor: pointer; color: var(--ink); font-size: 15px; font-weight: 550; }
.detail-synopsis > summary::-webkit-details-marker { display: none; }
.detail-synopsis > summary .app-icon { width: 18px; height: 18px; color: var(--dim); transition: transform .18s; }
.detail-synopsis[open] > summary .app-icon { transform: rotate(180deg); }
.detail-synopsis .detail-description, .detail-synopsis > p { display: block; max-height: none; overflow: visible; font-size: 14px; line-height: 1.9; color: var(--muted); margin: 0 0 24px; }
.episodes-heading { padding-top: 25px; border-color: var(--line); }
.episodes-heading h2 { font-size: 18px; font-weight: 650; }
.episodes-heading h2 small { color: var(--dim); font-size: 12px; font-weight: 400; }
.episode-button { min-height: 46px; border: 1px solid transparent; border-radius: 13px; background: var(--surface-raised); color: var(--muted); font-size: 13px; }
.episode-button.active, :root[data-theme="light"] .episode-button.active { background: var(--preference-selected); border-color: var(--accent); color: var(--accent); }
select { border: 0; border-radius: 13px; background: var(--surface-raised); min-height: 44px; font-size: 13px; }
.detail-footnote { color: var(--dim); font-size: 12px; line-height: 1.8; }
.category-modal { padding: 30px; }
.fine-category-grid { gap: 8px; }
.fine-category-grid .filter-chip { background: var(--surface-raised); border-radius: 13px; }
.fine-category-grid .filter-chip.active { background: var(--ink); }
.disclaimer-header { border-color: var(--line); padding: 24px 26px 19px; }
.disclaimer-header h2 { font-size: 22px; letter-spacing: -.3px; }
.disclaimer-content { font-size: 14px; line-height: 1.9; color: var(--muted); }
.disclaimer-content h3 { font-size: 16px; }
.disclaimer-footer { border-color: var(--line); background: var(--surface); }
.source-manager-card { border: 0; background: var(--surface); border-radius: 22px; }
.source-card-actions { border-color: var(--line); }
.source-toggle { border-color: var(--line); border-radius: 12px; font-size: 12px; }
.source-toggle.enabled, :root[data-theme="light"] .source-toggle.enabled { background: var(--preference-selected); border-color: transparent; color: var(--accent); }
.source-form-modal .field { background: var(--surface-raised); border-color: transparent; border-radius: 13px; min-height: 50px; font-size: 16px; }
.source-form-intro, .source-manager-note { color: var(--muted); font-size: 13px; }

/* A neutral theatre. Positions, hit areas and visibility still belong to the base. */
.watch-player {
  --surface: #151618;
  --surface-raised: #27282c;
  --surface-hover: #323338;
  --ink: #f5f5f6;
  --muted: #b2b3ba;
  --dim: #94969f;
  --line: #ffffff12;
  --accent: #a8e8d7;
  --accent-ink: #143b32;
  --player-panel: #151618;
  --player-soft: #232428;
  --player-line: #ffffff18;
  --player-ink: #f5f5f6;
  --player-muted: #a5a6af;
  background: #151618;
  color: #f5f5f6;
  border-color: #ffffff10;
  border-radius: 26px;
}
:root[data-theme="light"] .watch-player { background: #151618; }
.watch-player .player-header, :root[data-theme="light"] .watch-player .player-header { border-color: #ffffff0b; background: #151618; padding-top: 12px; padding-bottom: 12px; }
.watch-player .player-header .icon-button { width: 44px; min-width: 44px; height: 44px; border: 0; border-radius: 50%; background: #ffffff07; color: #e9e9ed; }
.watch-player .player-heading h2 { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.2px; }
.watch-player .player-heading p { margin-top: 4px; font-size: 12px; color: #a5a6af; }
.watch-player .video-stage { background: #050506; }
.watch-player .player-status { background: radial-gradient(ellipse at center, #22232666, transparent 75%); }
.watch-player .player-status p { color: #b8bac2; font-size: 13px; }
.watch-player .player-status > svg { color: #b8bac2; }
.watch-player .player-status .button { border: 0; background: #ffffff0f; color: #e7e7ec; font-size: 12px; }
.watch-player .player-status .button.primary { background: #a8e8d7; color: #143b32; }
.watch-player .player-diagnostic { width: min(100%, 430px); min-width: 0; color: #b8bac2; text-align: left; }
.watch-player .player-diagnostic > summary { min-height: 36px; padding: 8px 0; cursor: pointer; font-size: 11px; }
.watch-player .player-diagnostic pre { max-height: 110px; margin: 0; padding: 10px; overflow: auto; border: 1px solid #ffffff15; border-radius: 8px; background: #0006; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.watch-player .watch-media-controls { background: linear-gradient(transparent, #08090bb8 50%, #08090bef); }
.watch-player .watch-media-controls .watch-play { width: 44px; min-width: 44px; height: 44px; border: 0; border-radius: 12px; background: #f3f3f5; color: #242528; }
.watch-player .watch-media-controls .icon-button, .watch-player .watch-media-controls .speed-trigger { width: 44px; min-width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; background: transparent; color: #f3f3f5; }
.watch-player .watch-media-controls .icon-button .app-icon, .watch-player .watch-media-controls .speed-trigger > .app-icon { width: 22px; height: 22px; }
.watch-player .watch-media-controls .watch-mute[aria-pressed="true"], .watch-player .watch-media-controls .speed-trigger[aria-expanded="true"] { background: #a8e8d71c; color: #b6efdf; }
.watch-player .watch-timeline input::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #b4eddf 0 var(--seek-progress, 0%), #ffffff4d var(--seek-progress, 0%) 100%); }
.watch-player .watch-timeline input::-webkit-slider-thumb { width: 12px; height: 12px; background: #f6f6f8; margin-top: -4.5px; }
.watch-player .watch-timeline input::-moz-range-track { height: 3px; background: #ffffff4d; }
.watch-player .watch-timeline input::-moz-range-progress { height: 3px; background: #b4eddf; }
.watch-player .watch-timeline input::-moz-range-thumb { width: 12px; height: 12px; background: #f6f6f8; }
.watch-player #watch-rate-label { background: #b4eddf; color: #143b32; }
.watch-player .video-play-toggle { width: 68px; height: 68px; border-color: #ffffff61; background: #20212466; backdrop-filter: blur(20px) saturate(115%); -webkit-backdrop-filter: blur(20px) saturate(115%); box-shadow: 0 8px 30px #0002, inset 0 1px 0 #ffffff22; }
/* The play path is already centroid-centred; 1px is the optical nudge. */
.watch-player .video-play-toggle .app-icon { margin-left: 1px; filter: drop-shadow(0 1px 3px #0006); }
/* A visible status (loading, gesture request, last episode) owns the centre and its own actions. */
.watch-player:not(.is-buffering) .video-stage:has(> .player-status:not([hidden])) > .video-play-toggle { display: none; }
.watch-player .watch-controls { padding: 17px 22px 20px; border-top: 0; background: #151618; }
.watch-player.is-embedded .watch-seek-steps,
.watch-player.is-embedded #watch-mode-note { display: none; }
.watch-player.is-embedded .watch-controls { padding-top: 12px; }
.watch-seek-steps { gap: 12px; margin-bottom: 18px; }
.seek-step-group { border: 1px solid #ffffff29; border-radius: 12px; background: #ffffff03; }
.seek-step-group button { min-height: 46px; border-color: #ffffff26; color: #e6e6eb; font-size: 12px; font-weight: 500; }
.watch-seek-steps .watch-mode { border-radius: 12px; font-size: 11px; }
.watch-seek-steps .watch-mode[aria-pressed="false"] { border-color: #95dcbc65; background: #95dcbc14; color: #b2ebd2; }
.watch-seek-steps .watch-mode[aria-pressed="true"] { border-color: #ffc18475; background: #ffb57116; color: #ffc58b; }
.watch-player .watch-episode-controls { max-width: none; padding: 4px; border: 0; background: #232428; border-radius: 17px; }
.watch-player .watch-episode-controls .button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #c2c3ca; font-size: 13px; }
.watch-player .watch-episode-controls [data-action="player-episodes"] { background: #37383e; color: #f1f1f4; }
.watch-player .watch-episode-controls .button:active { background: #45464e; }
.watch-player .watch-find { color: #a9c9bf; font-size: 12px; }
.watch-player .watch-note { color: #94969f; font-size: 11px; }
.watch-player .player-extra, .watch-player .player-alternatives { background: #151618; color: #f3f3f5; border-color: #ffffff0a; }
.watch-player .watch-section-heading h3 { font-size: 17px; font-weight: 650; }
.watch-player .episode-button { background: #27282c; border-color: transparent; color: #c3c4cc; font-size: 12px; border-radius: 12px; min-height: 46px; }
.watch-player .episode-button.active, :root[data-theme="light"] .watch-player .episode-button.active { background: #a8e8d7; border-color: #a8e8d7; color: #143b32; }
.watch-player .watch-section-heading select { background: #27282c; color: #e0e0e6; }
.watch-player .alternative-list { border-color: #ffffff12; border-radius: 16px; }
.watch-player .alternative-item:hover { background: #ffffff07; }
.watch-player .alternative-item + .alternative-item { border-color: #ffffff0b; }
.watch-player.is-buffering .player-status { background: #222326dd; border-color: #ffffff18; }
.player-recommendations { background: #151618; border-color: #ffffff0b; padding: 26px 22px 30px; }
.player-recommendations h2, .player-recommendations h3 { margin-bottom: 19px; font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.player-recommendation-grid { gap: 22px 14px; padding: 0 0 8px; }
.player-recommendation-poster { background: #27282c; border-radius: 14px; }
.player-recommendation { color: #eeeeF1; }
.player-recommendation > strong { font-size: 13px; line-height: 1.5; height: 39px; font-weight: 500; margin-top: 10px; }
.player-recommendations .card-poster { border-radius: 14px; }
.player-recommendations .card-link h2 { font-size: 13px; font-weight: 500; line-height: 1.5; height: 39px; min-height: 39px; margin-top: 10px; }
.player-recommendations .card-meta { color: #94969f; font-size: 11px; }
.speed-sheet-backdrop { background: #07080b8c; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.speed-sheet { border-color: #ffffff0d; border-radius: 28px; background: #222326; color: #f2f2f5; padding: 25px 22px; }
.speed-sheet-header { margin-bottom: 22px; }
.speed-sheet-header h2, .speed-sheet-header h3 { font-size: 21px; font-weight: 650; letter-spacing: -.4px; }
.speed-sheet-header .icon-button { width: 44px; min-width: 44px; height: 44px; background: #ffffff09; color: #cdced6; }
.speed-options { gap: 10px; }
.speed-option { min-height: 62px; border-color: transparent; border-radius: 17px; background: #ffffff07; color: #cccdd5; font-size: 17px; }
.speed-option.is-selected { border-color: #a8e8d7; background: #a8e8d713; color: #b8efdf; box-shadow: none; }
/* In fullscreen the sheet mounts inside the player; drop the base layer's old teal inset. */
.watch-player .speed-option.is-selected { box-shadow: none; }
.speed-option-check { color: #b8efdf; }

/* The discovery feed owns one scroll surface; the dock stays outside its frames. */
body.quick-view { overflow: hidden; background: #070708; }
/* Locking page scroll must retain the same fixed-position viewport width. */
html:has(body.quick-view), html:has(body.overlay-open) { overflow-y: hidden; scrollbar-gutter: stable; }
body.overlay-open { position: fixed; top: var(--overlay-scroll-y, 0px); left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
body.overlay-open #overlay-root { position: fixed; inset: 0; z-index: 100; height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
body.overlay-open #overlay-root > .modal-backdrop { position: absolute; inset: 0; height: 100%; max-height: 100%; overflow: hidden; }
body.overlay-open .modal { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.overlay-open .watch-player { height: 100%; max-height: 100%; overflow-x: hidden; overflow-y: auto; }
body.overlay-open .watch-player .player-header { position: sticky; top: 0; z-index: 10; }
body.quick-view .app-shell { max-width: none; padding: 0; margin: 0; }
body.quick-view .site-header, body.quick-view .site-footer { display: none; }
body.quick-view #main { min-height: 0; padding: 0; }
.quick-watch-host { width: 100%; height: calc(100vh - 90px - env(safe-area-inset-bottom)); height: calc(100dvh - 90px - env(safe-area-inset-bottom)); background: #070708; color: #f5f5f6; }
.quick-watch-shell { position: relative; width: 100%; height: 100%; max-width: 620px; margin: 0 auto; overflow: hidden; background: #070708; }
.quick-watch-track { position: relative; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; overflow-anchor: none; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; touch-action: pan-y; }
.quick-watch-track::-webkit-scrollbar { display: none; }
.quick-watch-item { position: relative; isolation: isolate; width: 100%; height: 100%; min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #070708; }
.quick-watch-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #070708; }
.quick-watch-video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.quick-watch-overlay { position: absolute; z-index: 2; inset: 0; background: linear-gradient(0deg, #070708ed 0%, #0707089c 18%, #07070800 43%, #07070800 77%, #07070855 100%); pointer-events: none; }
.quick-watch-overlay button, .quick-watch-overlay a { pointer-events: auto; }
.quick-watch-meta { position: absolute; z-index: 3; left: 22px; right: 82px; bottom: 25px; color: #fff; text-shadow: 0 1px 12px #0003; }
.quick-watch-meta h1, .quick-watch-meta h2, .quick-watch-meta h3 { margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 25px; line-height: 1.35; letter-spacing: -.5px; font-weight: 700; }
.quick-watch-meta p { margin: 0; font-size: 13px; line-height: 1.7; color: #c7c7cf; }
.quick-watch-actions { position: absolute; z-index: 4; right: 17px; bottom: 26px; display: flex; flex-direction: column; gap: 15px; align-items: center; }
.quick-watch-actions button { display: inline-flex; align-items: center; justify-content: center; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; border: 1px solid #ffffff12; border-radius: 50%; background: #26272bd6; color: #f6f6f8; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.quick-watch-actions .app-icon { width: 23px; height: 23px; }
.quick-watch-actions button[aria-pressed="true"] { color: #ffb2a6; background: #453334e6; }
.quick-watch-actions button:active { background: #ffffff33; }
.quick-watch-item button:focus-visible, .quick-watch-shell > button:focus-visible { outline-color: #a8e8d7; }
.quick-watch-canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.quick-watch-canvas:focus-visible { outline: 2px solid #a8e8d7; outline-offset: -5px; }
.quick-watch-top { position: absolute; top: max(25px, env(safe-area-inset-top)); left: 22px; right: 128px; display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; }
.quick-watch-kicker { font-size: 15px; line-height: 1.5; font-weight: 600; color: #f3f3f5; letter-spacing: .2px; }
.quick-watch-buffer { color: #c1c2cc; font-size: 12px; line-height: 1.5; }
.quick-watch-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 50px); display: flex; align-items: center; flex-direction: column; gap: 14px; text-align: center; }
.quick-watch-status { padding: 14px 18px; color: #ececf1; font-size: 14px; line-height: 1.7; border: 1px solid #ffffff18; border-radius: 17px; background: #25262ad4; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.quick-watch-status:empty, .quick-watch-buffer:empty { display: none; }
.quick-watch-status .app-icon { width: 28px; height: 28px; }
.quick-watch-retry { min-width: 100px; min-height: 44px; padding: 11px 18px; border: 0; border-radius: 23px; background: #a8e8d7; color: #143b32; font-size: 13px; font-weight: 600; }
.quick-watch-retry[hidden] { display: none; }
.quick-watch-item[data-state="playing"] .quick-watch-center { visibility: hidden; opacity: 0; }
.quick-watch-bottom { position: absolute; bottom: 26px; left: 22px; right: 17px; display: flex; align-items: flex-end; gap: 20px; }
.quick-watch-bottom .quick-watch-meta { position: static; flex: 1; min-width: 0; }
.quick-watch-bottom .quick-watch-actions { position: static; flex: 0 0 46px; }
.quick-watch-episode { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quick-watch-navigation { position: absolute; z-index: 5; top: max(19px, env(safe-area-inset-top)); right: 17px; display: flex; gap: 8px; }
.quick-watch-navigation button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid #ffffff10; border-radius: 50%; background: #25262ac4; color: #e9e9ef; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.quick-watch-navigation .app-icon { width: 20px; height: 20px; }
.quick-watch-navigation button:disabled { opacity: .3; }
.quick-watch-navigation button:active { background: #ffffff30; }
.quick-watch-actions .quick-watch-sound[aria-pressed="true"] { color: #b7ecdd; background: #31443ce6; }
.quick-watch-track:focus-visible { outline: 2px solid #a8e8d7; outline-offset: -3px; }
.quick-watch-navigation .quick-watch-button-label,
.quick-watch-actions .quick-watch-button-label,
.quick-watch-canvas .quick-watch-button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.quick-watch-actions button > svg { width: 23px; height: 23px; flex: 0 0 23px; }
.quick-watch-navigation button > svg { width: 20px; height: 20px; flex: 0 0 20px; }
/* Trial clips leave the centre to the film; the rail has only intentional actions. */
.quick-watch-buffer { display: none; }
.quick-watch-top { right: 22px; pointer-events: none; }
.quick-watch-kicker { font-size: 12px; line-height: 1.5; font-weight: 500; letter-spacing: .4px; color: #d5d5dc; }
.quick-watch-bottom { gap: 13px; }
/* The rail grows for a longer translated Episodes label instead of overlapping the title. */
.quick-watch-bottom .quick-watch-actions { flex: 0 0 auto; min-width: 76px; max-width: 132px; align-items: flex-end; gap: 15px; }
.quick-watch-actions .quick-watch-episodes { width: auto; min-width: 76px; height: 44px; min-height: 44px; padding: 0 12px; gap: 5px; border-radius: 23px; background: #f2f2f4; color: #242529; backdrop-filter: none; -webkit-backdrop-filter: none; }
.quick-watch-actions .quick-watch-episodes > svg { width: 17px; height: 17px; flex-basis: 17px; }
.quick-watch-actions .quick-watch-episodes .quick-watch-button-label { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: nowrap; border: 0; font-size: 12px; line-height: 1.5; font-weight: 600; }
.quick-watch-actions .quick-watch-favorite[aria-pressed="true"] { background: #3c292de6; color: #ffaaa0; border-color: #fca49c38; }
.quick-watch-actions .quick-watch-favorite[aria-pressed="true"] > svg { fill: currentColor; stroke-width: 1.5; }
.quick-watch-status[hidden] { display: none !important; }
/* The centre stays decorative: taps fall through to the full-frame canvas button. */
.quick-watch-item[data-state="paused"] .quick-watch-status { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; padding: 0; border: 1px solid #ffffff61; border-radius: 50%; background: #20212466; color: #fff; box-shadow: 0 8px 30px #0002, inset 0 1px 0 #ffffff22; backdrop-filter: blur(20px) saturate(115%); -webkit-backdrop-filter: blur(20px) saturate(115%); }
.quick-watch-status .quick-watch-status-icon { display: block; width: 26px; height: 26px; margin-left: 0; fill: currentColor; stroke-width: 0; filter: drop-shadow(0 1px 3px #0006); }
/* The helper's bare SVG would otherwise take the base 22px size inside the 26px box. */
.quick-watch-status .quick-watch-status-icon > svg { display: block; width: 100%; height: 100%; }
.quick-watch-item[data-state="preparing"] .quick-watch-status { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.quick-watch-spinner { display: block; width: 26px; height: 26px; border: 2px solid #ffffff38; border-top-color: #f2f2f5; border-radius: 50%; animation: quick-watch-spin .9s linear infinite; }
@keyframes quick-watch-spin { to { transform: rotate(360deg); } }

@media (hover: none) {
  .quick-watch-navigation { opacity: 0; pointer-events: none; }
  .quick-watch-navigation:focus-within { opacity: 1; pointer-events: auto; }
  /* The overlay re-enables its buttons; invisible ones must not take swipe-area taps. */
  .quick-watch-navigation:not(:focus-within) button { pointer-events: none; }
}

@media (min-width: 950px) {
  .quick-watch-shell { max-width: 620px; border-right: 1px solid #ffffff08; border-left: 1px solid #ffffff08; }
}

@media (min-width: 950px) {
  .discovery-feature { height: 420px; }
  .feature-copy { max-width: 480px; }
  .feature-shade { background: linear-gradient(90deg, #08090bf5, #08090b6b 50%, #08090b12 80%), linear-gradient(0deg, #08090b99, transparent 70%); }
  .feature-art img { object-position: 50% 32%; }
}

@media (max-width: 950px) {
  .app-shell { padding-right: 28px; padding-left: 28px; }
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 17px; }
  .discovery-feature { height: 380px; }
  .feature-title { font-size: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .app-shell { padding-left: 20px; padding-right: 20px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .site-header { padding-top: max(22px, env(safe-area-inset-top)); padding-bottom: 22px; }
  .header-main { display: flex; flex-wrap: wrap; gap: 19px; }
  .brand { gap: 9px; }
  .brand img { width: 38px; height: 38px; border-radius: 12px; }
  .brand strong { font-size: 22px; letter-spacing: -.6px; }
  .brand strong span { font-size: 19px; }
  .brand small { display: none; }
  .search-form { width: 100%; min-width: 0; height: 48px; flex-basis: 100%; border-radius: 16px; }
  .search-form input { font-size: 16px; }
  .search-submit { padding-left: 16px; padding-right: 16px; font-size: 13px; border-radius: 0 15px 15px 0; }
  #main { padding-top: 5px; padding-bottom: 25px; }
  .section-heading, .discovery-heading { margin-bottom: 18px; }
  .heading-copy h1 { font-size: 28px; letter-spacing: -.7px; }
  .heading-copy p { font-size: 13px; }
  .shuffle-button { font-size: 12px; min-height: 44px; padding: 9px 11px; }
  .filters-row { margin-bottom: 20px; gap: 5px; }
  .category-list, .unified-category-list { gap: 3px; }
  .filter-chip, .unified-category-list .filter-chip, :root[data-theme="light"] .filter-chip { min-height: 44px; min-width: 0; padding: 10px 12px; font-size: 13px; border-radius: 23px; }
  /* Six equal tracks are 45-63px wide; a three-character label fits with 3px sides in both themes. */
  .category-list.unified-category-list .filter-chip, :root[data-theme="light"] .category-list.unified-category-list .filter-chip { padding-left: 3px; padding-right: 3px; overflow: hidden; text-overflow: ellipsis; }
  .all-categories-button { padding: 10px 3px; font-size: 12px; }
  .secondary-filters { padding: 4px; gap: 1px; margin-top: -7px; margin-bottom: 20px; }
  .secondary-chip { font-size: 12px; padding: 10px 4px; }
  .library-status { font-size: 12px; margin-bottom: 16px; gap: 8px; line-height: 1.6; }
  .library-status > span:first-child { max-width: none; }
  .library-status > span:last-child { max-width: 120px; }
  .discovery-feature { height: 330px; margin-bottom: 25px; border-radius: 24px; }
  .feature-art img { object-position: 50% 25%; }
  .feature-copy { left: 23px; right: 23px; bottom: 23px; }
  .feature-kicker { font-size: 10px; letter-spacing: 1.6px; margin-bottom: 9px; }
  .feature-title { font-size: 27px; font-weight: 750; line-height: 1.25; letter-spacing: -.6px; }
  .feature-meta { font-size: 12px; margin-top: 9px; }
  .feature-cta { min-height: 40px; margin-top: 15px; padding: 9px 16px; font-size: 12px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 14px; }
  .card-poster, :root[data-theme="light"] .card-poster { padding-top: 148%; border-radius: 13px; }
  .card-link h2 { font-size: 15px; line-height: 1.45; height: 44px; min-height: 44px; margin: 11px 0 4px; font-weight: 550; }
  .card-meta { font-size: 12px; line-height: 18px; height: 18px; }
  .poster-remark { font-size: 11px; left: 8px; right: 8px; bottom: 8px; }
  .poster-label { top: 7px; left: 7px; font-size: 9px; max-width: calc(100% - 14px); padding: 3px 5px; }
  .card-play { display: none; }
  .site-footer { gap: 15px; padding-top: 20px; font-size: 10px; }
  .bottom-nav { left: 50%; right: auto; bottom: calc(12px + env(safe-area-inset-bottom)); width: 310px; max-width: calc(100% - 32px); height: 64px; padding: 0; }
  .bottom-nav-inner { height: 64px; min-height: 64px; gap: 2px; padding: 6px; border-radius: 34px; }
  .bottom-nav .nav-link { height: 50px; min-height: 50px; max-height: 50px; flex-direction: row; padding: 8px 8px; gap: 7px; }
  .bottom-nav .nav-link > span:not(.nav-count) { height: 18px; line-height: 18px; font-size: 13px; }
  .bottom-nav .nav-link svg { width: 23px; height: 23px; min-height: 23px; max-height: 23px; }
  body.settings-view #main { padding-top: max(38px, env(safe-area-inset-top)); }
  .settings-intro { margin-bottom: 32px; }
  .settings-intro h1 { font-size: 33px; }
  .settings-intro p { margin-top: 7px; font-size: 13px; }
  .settings-intro > img { width: 48px; height: 48px; }
  .settings-group { margin-bottom: 27px; }
  .settings-group > h2 { margin-bottom: 10px; font-size: 12px; }
  .settings-list { border-radius: 22px; }
  .preference-setting { padding: 19px 17px; }
  .preference-heading { margin-bottom: 14px; }
  .preference-heading h3 { font-size: 15px; }
  .theme-options { gap: 6px; }
  .theme-option { min-height: 82px; padding: 13px 3px 12px; font-size: 12px; }
  .theme-swatch { width: 28px; height: 27px; min-height: 27px; }
  .theme-swatch > svg { width: 25px; height: 25px; }
  .preference-help { font-size: 12px; }
  .setting-row { min-height: 79px; padding: 16px; gap: 11px; }
  .setting-icon { width: 28px; height: 32px; }
  .setting-icon .app-icon { width: 21px; height: 21px; }
  .setting-copy strong { font-size: 14px; }
  .setting-copy small { font-size: 12px; }
  .setting-value { font-size: 11px; }
  .modal-backdrop:not(.player-backdrop) { padding: 12px; }
  .modal { border-radius: 26px; }
  .modal-close { top: 14px; right: 14px; }
  .detail-hero { grid-template-columns: 104px minmax(0, 1fr); padding: 32px 21px 24px; align-items: start; gap: 22px 18px; }
  .detail-poster { width: 104px; border-radius: 14px; }
  .detail-copy { padding-right: 22px; }
  .detail-copy h1 { margin-bottom: 9px; font-size: 21px; line-height: 1.35; }
  .detail-type { font-size: 10px; margin-bottom: 8px; }
  .detail-meta { font-size: 12px; }
  .detail-actions { margin-top: 0; flex-wrap: nowrap; gap: 9px; }
  .detail-actions .button { padding: 9px 12px; font-size: 12px; min-height: 44px; border-radius: 12px; }
  .detail-actions .button svg { width: 16px; height: 16px; }
  .detail-body { padding: 0 21px 26px; }
  .episodes-heading { padding-top: 22px; margin-bottom: 17px; }
  .episodes-heading h2 { font-size: 17px; }
  .episodes-heading h2 small { font-size: 11px; }
  .episodes-heading select { min-height: 44px; font-size: 12px; }
  .episodes-heading .select-wrap:after { top: 17px; }
  .episode-grid { gap: 8px; }
  .episode-button { min-height: 46px; padding: 10px 7px; font-size: 12px; }
  .detail-footnote { font-size: 11px; }
  .source-form-modal { padding: 28px 22px; }
  .category-modal { padding: 28px 21px; }
  .fine-category-grid .filter-chip { padding: 10px 6px; font-size: 12px; }
  .disclaimer-content { font-size: 13px; }
  .disclaimer-content h3 { font-size: 15px; }
  .watch-player { border-radius: 0; }
  .watch-player .player-header { padding: 12px 13px; min-height: 68px; gap: 10px; }
  .watch-player .player-heading h2 { font-size: 14px; }
  .watch-player .player-heading p { font-size: 11px; }
  .watch-player .watch-controls { padding: 17px 16px 19px; }
  .watch-seek-steps { gap: 8px; margin-bottom: 17px; }
  .seek-step-group { border-radius: 11px; }
  .seek-step-group button { min-height: 46px; padding: 7px 2px; font-size: 11px; }
  .watch-seek-steps .watch-mode { min-height: 46px; border-radius: 11px; }
  .watch-player .watch-media-controls { column-gap: 5px; padding-left: 8px; padding-right: 8px; }
  .watch-player .watch-media-controls .watch-timeline { font-size: 10px; gap: 5px; }
  .watch-player .watch-media-controls .tuning-actions { gap: 0; }
  .watch-player .watch-episode-controls .button { font-size: 12px; }
  .watch-player .player-extra, .watch-player .player-alternatives { padding: 22px 16px; background: #151618; }
  .player-recommendations { padding: 25px 16px 27px; }
  .player-recommendations h2, .player-recommendations h3 { font-size: 19px; margin-bottom: 17px; }
  .player-recommendation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 11px; }
  .player-recommendation-poster, .player-recommendations .card-poster { border-radius: 13px; }
  .player-recommendation > strong, .player-recommendations .card-link h2 { font-size: 12px; line-height: 1.5; height: 36px; min-height: 36px; }
  .speed-sheet { border-radius: 28px 28px 0 0; padding: 25px 20px calc(26px + env(safe-area-inset-bottom)); }
}

@media (max-width: 350px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .filter-chip, .unified-category-list .filter-chip, :root[data-theme="light"] .filter-chip { padding-left: 9px; padding-right: 9px; font-size: 12px; }
  .feature-copy { left: 20px; right: 20px; }
  .feature-title { font-size: 25px; }
  .feature-cta { font-size: 12px; }
  .video-grid { gap: 24px 12px; }
  .card-link h2 { font-size: 15px; height: 44px; min-height: 44px; }
  .card-meta { font-size: 12px; }
  .library-actions .shuffle-button { width: 44px; min-width: 44px; padding: 9px; }
  .library-actions .shuffle-button > span { display: none; }
  .settings-intro h1 { font-size: 31px; }
  .preference-setting { padding: 18px 15px; }
  .theme-option { padding-left: 2px; padding-right: 2px; font-size: 11px; }
  .setting-row { padding: 16px 14px; gap: 9px; }
  .setting-copy strong { font-size: 13px; }
  .setting-copy small { font-size: 11px; }
  .setting-value { font-size: 11px; }
  .detail-hero { grid-template-columns: 88px minmax(0, 1fr); padding-left: 18px; padding-right: 18px; gap: 20px 13px; }
  .detail-poster { width: 88px; }
  .detail-copy h1 { font-size: 19px; }
  .detail-copy { padding-right: 22px; }
  .detail-actions .button { font-size: 11px; padding-left: 10px; padding-right: 10px; }
  .watch-player .watch-controls { padding-left: 13px; padding-right: 13px; }
  .watch-seek-steps { gap: 6px; }
  .seek-step-group button { font-size: 10px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .watch-player .player-header { height: 56px; min-height: 56px; padding-top: 5px; padding-bottom: 5px; }
  .watch-player .video-stage { height: calc(100dvh - 56px); }
}

@media (hover: hover) and (pointer: fine) {
  .discovery-feature .feature-art img { transition: transform .45s ease; }
  .discovery-feature:hover .feature-art img { transform: scale(1.025); }
  .card-link:hover img { transform: scale(1.025); }
  .preference-option:not([aria-pressed="true"]):hover { background: var(--surface-hover); border-color: transparent; color: var(--ink); }
  .watch-player .watch-media-controls .icon-button:hover, .watch-player .watch-media-controls .speed-trigger:hover { background: #ffffff15; }
  .watch-player .player-header .icon-button:hover { background: #ffffff14; }
  .seek-step-group button:not(:disabled):hover { background: #ffffff0e; }
  .speed-option:hover { background: #ffffff0e; border-color: #a8e8d74d; }
}

@media (hover: none) {
  .card-link:hover img { transform: none; }
  .card-link:hover .card-play, .card-link:focus .card-play { display: none; }
  .bottom-nav .nav-link:hover { background: transparent; }
  .setting-action:hover { background: transparent; }
  .setting-action:active { background: var(--surface-hover); }
  .preference-option:active { background: var(--preference-selected); }
  .watch-player .watch-media-controls .icon-button:not([aria-pressed="true"]):hover, .watch-player .watch-media-controls .speed-trigger:not([aria-expanded="true"]):hover { background: transparent; }
  .seek-step-group button:hover { background: transparent; }
  /* Touch has no hover; the poster dims in place so a press never shifts the grid. */
  .card-link:active .card-poster, .player-recommendation:active .player-recommendation-poster { opacity: .82; }
}

button { transition-property: background-color, color, border-color, opacity; transition-duration: .16s; }
button:active { transition-duration: .06s; }
.preference-option:active { box-shadow: none; }
.watch-player .watch-media-controls button:active { background: #ffffff26; color: #fff; }
.watch-player .watch-media-controls .watch-play:active { background: #d7edE6; color: #143b32; }
.seek-step-group button:active { background: #a8e8d722; color: #c8f7e8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .discovery-feature:hover .feature-art img, .card-link:hover img { transform: none; }
  .bottom-nav .nav-link.quick-nav::before { opacity: .52; transform: translate(-50%, -50%); }
  .bottom-nav .quick-nav-mark { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #d2d3da; --dim: #bbbcc6; --line: #ffffff40; }
  :root[data-theme="light"] { --muted: #494b56; --dim: #555761; --line: #1b1c2850; }
  .settings-list, .bottom-nav-inner, .modal, .seek-step-group { border: 1px solid var(--line); }
  .bottom-nav .nav-link.is-active { text-decoration: underline; text-underline-offset: 3px; }
}

@media (forced-colors: active) {
  .bottom-nav .nav-link.quick-nav::before { display: none; }
  .bottom-nav .nav-link.quick-nav::after { border-color: ButtonText; background: Canvas; box-shadow: none; opacity: 1; }
  .bottom-nav .nav-link.quick-nav.is-active::after { border-color: Highlight; border-width: 2px; box-shadow: none; }
  .bottom-nav .nav-link.quick-nav:focus-visible { outline: 2px solid Highlight; outline-offset: -3px; }
  .bottom-nav-inner, .settings-list, .modal, .theme-option, .seek-step-group, .speed-option { border: 1px solid CanvasText; }
  .bottom-nav .nav-link.is-active, .filter-chip.active, .secondary-chip.active, .preference-option[aria-pressed="true"], .speed-option.is-selected { outline: 2px solid Highlight; outline-offset: -4px; }
  .preference-check { background: Highlight; color: HighlightText; }
  .feature-title, .feature-kicker, .feature-meta, .feature-cta { background: Canvas; color: CanvasText; text-shadow: none; }
  .watch-player .watch-media-controls { background: Canvas; color: CanvasText; }
  .watch-player .watch-media-controls button, .watch-player .watch-timeline #watch-elapsed { color: CanvasText; }
  .watch-player .video-play-toggle { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .quick-watch-status, .quick-watch-actions button, .quick-watch-navigation button, .quick-watch-retry { border: 1px solid ButtonText; color: ButtonText; background: ButtonFace; }
}
