:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #1c1c1e;
  --control: #2c2c2e;
  --control-hover: #3a3a3c;
  --text: #f5f5f7;
  --muted: #aeaeb2;
  --tertiary: #8e8e93;
  --line: #38383a;
  /* Apple's current dark-appearance system red; see docs/VALIDATION.md. */
  --accent: #ff4245;
  --accent-soft: #ff42451a;
  --accent-border: #ff424524;
  --accent-hover: #ff6165;
  --on-accent: #1c0809;
  --glass: #242426ed;
  --floating-control-height: 64px;
  --content-inset: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
#website { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#website>.site-header, #website>.site-footer { flex-shrink: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .35; cursor: not-allowed; }
button, a, input, summary { outline-offset: 4px; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; }
svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button svg { pointer-events: none; }
button, select { touch-action: manipulation; }
.shell { width: min(960px, calc(100% - 64px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; padding-top: env(safe-area-inset-top); z-index: 12; background: #000c; backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); border-bottom: 1px solid #ffffff0b; }
.header-content { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { font-size: 28px; font-weight: 700; letter-spacing: -.8px; }
.site-header nav { display: flex; gap: 6px; padding: 4px; border-radius: 100px; background: #1c1c1eaa; border: 1px solid #ffffff0b; }
.site-header nav a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 100px; color: var(--muted); font-size: 14px; font-weight: 600; }
.site-header nav svg { width: 19px; height: 19px; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a.active { background: var(--control); color: var(--accent); }
#main { flex: 1; padding-top: 28px; }
.cinema-player { scroll-margin-top: 112px; }
.screen { aspect-ratio: 16 / 9; background: #080808; border-radius: 22px; overflow: hidden; }
.screen video { display: block; width: 100%; height: 100%; object-fit: contain; }
.screen video:not(.started) { object-fit: cover; }
.cinema-player:fullscreen { display: flex; flex-direction: column; background: #000; padding: 16px; }
.cinema-player:fullscreen .screen { flex: 1; min-height: 0; aspect-ratio: auto; }
.cinema-player:fullscreen video { object-fit: contain; }
.transport { display: flex; align-items: center; gap: 14px; padding: 18px 0 12px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none; border-radius: 50%; color: var(--text); }
.icon-button:hover { background: var(--control); }
.icon-button:active { transform: scale(.95); }
#play-toggle { background: var(--accent); color: var(--on-accent); }
#play-toggle:hover { background: var(--accent-hover); }
#play-toggle svg { width: 24px; height: 24px; }
input[type=range] { --progress: 0%; appearance: none; -webkit-appearance: none; min-width: 0; flex: 1; height: 32px; margin: 0 4px; background: linear-gradient(to right, var(--accent) var(--progress), var(--line) var(--progress)) center / 100% 4px no-repeat; border-radius: 100px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 100px; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 1px 5px #0006; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 100px; background: transparent; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; background: #fff; border: 0; border-radius: 50%; }
input[type=range]:disabled { opacity: .35; cursor: not-allowed; }
.playback-time { display: flex; gap: 7px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.time-divider { opacity: .5; }
.now-playing { margin-top: 8px; }
.watch-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-height: 36px; color: var(--muted); font-size: 12px; }
.watch-context button { min-height: 36px; font-size: 13px; }
.watch-context:has(button[hidden]) { display: none; }
.admin-preview-note { margin: -6px 0 32px; }
.admin-section h2 { font-size: 20px; margin-bottom: 14px; }
.admin-card { background: var(--panel); border-radius: 18px; overflow: hidden; }
.admin-status-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; }
.admin-status-row>div { min-width: 0; }
.admin-status-row .muted { margin-top: 6px; font-size: 13px; }
.admin-status-row button { flex: none; font-size: 14px; }
.admin-card .public-control-option { border-radius: 0; background: transparent; border-top: 1px solid var(--line); padding: 16px 20px; gap: 20px; }
.public-control-option small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 5px; }
.admin-footnote { margin: 10px 20px 0; font-size: 12px; }
.development-panel { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.development-panel summary { cursor: pointer; font-size: 13px; padding-block: 12px; }
.development-panel>p { margin: 8px 0 16px; }
.development-panel .option { font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.publish-option { margin-top: 24px; }
.publish-note { margin-top: 8px; font-size: 12px; }
.device-now { margin-top: 28px; }
.device-now h3 { font-size: 22px; margin-bottom: 6px; }
.device-transport { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 24px 0; }
#device-toggle { width: 56px; height: 56px; border-radius: 50%; padding: 0; }
#device-select { width: 100%; margin: 16px 0; }
#cinema-control-dialog>.picker { width: 100%; }
#cinema-control-dialog .picker-trigger { width: 100%; }
#cinema-control-dialog .picker-menu { min-width: 100%; }
@media (max-width: 500px) {
  .admin-status-row { align-items: flex-start; flex-direction: column; gap: 16px; }
  .admin-status-row button { width: 100%; }
}
.now-playing h1 { padding-inline: var(--content-inset); font-size: 24px; font-weight: 650; letter-spacing: -.5px; overflow-wrap: anywhere; }
.text-link, .text-button { color: var(--accent); font-size: 15px; padding: 0; white-space: nowrap; }
.text-link:hover, .text-button:hover { opacity: .8; }
.text-link { display: inline-flex; align-items: center; gap: 8px; }
.text-link svg { width: 17px; height: 17px; }
.status-message { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 12px; }
.video-info { margin-top: 16px; border-radius: 18px; background: var(--panel); overflow: hidden; }
.video-info summary, .info-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px var(--content-inset); list-style: none; }
.video-info summary { cursor: pointer; }
.video-info summary::-webkit-details-marker { display: none; }
.video-info summary:hover { background: #ffffff04; }
.video-info summary:focus-visible { outline-offset: -3px; border-radius: 18px; }
.info-overview { min-width: 0; flex: 1; }
.info-summary { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; }
.video-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.video-info[open] .video-description, .video-info-static .video-description { -webkit-line-clamp: unset; }
.info-disclosure { display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding-top: 2px; color: var(--accent); font-size: 13px; flex: 0 0 54px; }
.info-disclosure svg { width: 16px; height: 16px; }
.video-info .when-open, .video-info[open] .when-closed { display: none; }
.video-info[open] .when-open { display: inline; }
.video-info[open] .info-disclosure svg { transform: rotate(180deg); }
.info-body { padding: 0 var(--content-inset) 20px; }
.info-body .video-metadata { margin: 0; }
.video-metadata { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 12px 16px; margin: 24px 0 20px; font-size: 14px; line-height: 1.5; }
.video-metadata dt { color: var(--muted); }
.video-metadata dd { margin: 0; overflow-wrap: anywhere; }
.metadata-link { padding: 0; color: var(--accent); text-align: left; }
.metadata-link:hover { text-decoration: underline; }
.active-queue { margin-top: 16px; padding: 18px 20px; border-radius: 18px; background: var(--panel); color: var(--muted); font-size: 14px; }
.active-queue summary { cursor: pointer; color: var(--text); }
#queue-count { margin-left: 10px; color: var(--muted); font-size: 13px; }
#queue-list { margin: 16px 0 0; padding-left: 24px; }
#queue-list li { padding: 10px 0 10px 4px; }
#queue-list li.current { color: var(--accent); }
.queue-duration { float: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.library-panel { margin-top: 40px; scroll-margin-top: 112px; }
.library-panel>.page-heading { padding-left: var(--content-inset); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.utility-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 2px 0 10px; color: var(--accent); font-size: 16px; font-weight: 600; }
.utility-button svg { width: 19px; height: 19px; }
.utility-button:hover { opacity: .75; }
.library-toolbar { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.library-pickers>.picker { width: fit-content; max-width: 100%; min-width: 0; }
.library-pickers>.picker .picker-trigger { background: transparent; width: 100%; padding-left: 0; color: var(--text); }
.library-pickers>.picker .picker-value { overflow: hidden; text-overflow: ellipsis; }
.library-pickers>.picker .picker-trigger>svg { flex: none; }
.library-admin-actions { display: flex; gap: 16px; }
.search-box { display: flex; align-items: center; flex: none; width: 96px; height: 44px; padding: 0; border-radius: 12px; background: transparent; transition: width .25s cubic-bezier(.2,.8,.2,1), background-color .2s; }
.search-box.is-expanded { width: clamp(180px, 33.333%, 320px); padding-right: 8px; background: var(--panel); }
.search-box.is-expanded:focus-within { box-shadow: inset 0 0 0 1px var(--line); }
.search-box button:focus-visible { outline-color: var(--muted); }
.search-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 96px; width: 96px; height: 44px; padding: 0; border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 500; }
.search-box:not(.is-expanded) .search-toggle { justify-content: flex-end; padding-right: var(--content-inset); }
.search-toggle svg { display: block; width: 22px; height: 22px; }
.search-box.is-expanded .search-toggle { flex-basis: 44px; width: 44px; gap: 0; color: var(--muted); }
.search-box.is-expanded .search-label { display: none; }
.search-field { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .15s; }
.search-box.is-expanded .search-field { min-width: 1px; opacity: 1; visibility: visible; }
.search-box input { flex: 1; min-width: 1px; width: 100%; height: 44px; padding: 0; border: 0; outline: none; color: var(--text); background: none; font-size: 16px; }
.search-box input::placeholder { color: var(--tertiary); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-reset { display: grid; place-items: center; width: 32px; height: 40px; padding: 0; flex: none; color: var(--muted); }
.search-reset svg { width: 16px; height: 16px; }
.library-pickers { padding-left: var(--content-inset); display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-width: 0; }
.library-pickers>.picker:first-child { min-width: min(112px, 100%); }
.library-pickers>.picker:last-child { flex: 0 1 auto; width: fit-content; max-width: 180px; min-width: min(96px, 100%); }
#year-filter + .picker-trigger .picker-value { white-space: normal; overflow: visible; line-height: 1.4; }
.library-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 16px; }
.library-pagination button { min-width: 64px; min-height: 44px; }
.library-pagination span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.library-list { border-radius: 18px; background: var(--panel); overflow: hidden; }
.library-row { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px var(--content-inset); text-align: left; }
.library-row:not(:last-child)::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.library-row:hover { background: #ffffff08; }
.library-row:focus-visible { outline-offset: -3px; border-radius: 12px; }
.row-image { width: 100px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; flex: none; background: var(--control); }
.row-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.row-title small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 5px; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.personal-poster { display: grid; place-items: center; height: 100%; background: var(--control); color: var(--muted); }
.playlist-art { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.playlist-art svg { width: 28px; height: 28px; }
.empty-state { padding: 48px 20px; border-radius: 18px; background: var(--panel); color: var(--muted); font-size: 15px; text-align: center; }
.empty-state button { margin-top: 15px; min-height: 44px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: auto; padding-block: 28px calc(28px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--tertiary); }
.home-view .site-footer { padding-bottom: calc(var(--floating-control-height) + 36px + env(safe-area-inset-bottom)); }
.site-footer a { scroll-margin-bottom: 220px; }
.site-footer button { min-height: 44px; font-size: 13px; padding: 0 0 0 12px; color: var(--accent); }
.about-page { max-width: 580px; padding-top: 8px; }
.about-page h1 { font-size: 34px; margin-bottom: 24px; }
.about-page>p { font-size: 17px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

/* Native-dialog behavior, with sheet presentation on phones. */
dialog { width: min(460px, calc(100% - 40px)); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; padding: 24px; color: var(--text); background: var(--panel); border: 1px solid #ffffff12; box-shadow: 0 24px 100px #0008; border-radius: 28px; }
dialog::backdrop { background: #0009; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 22px; font-weight: 650; letter-spacing: -.4px; }
.dialog-close { position: relative; color: var(--muted); background: var(--control); width: 44px; height: 44px; }
.dialog-close svg { width: 18px; height: 18px; stroke-width: 2.5; }
.dialog-close:hover { background: var(--control-hover); }
.muted { font-size: 14px; color: var(--muted); line-height: 1.5; }
fieldset { border: 0; margin: 24px 0; padding: 0; min-width: 0; }
legend, .field-label { font-size: 14px; color: var(--muted); margin-bottom: 10px; display: block; }
.option { display: flex; align-items: center; gap: 12px; font-size: 16px; min-height: 48px; padding: 12px; margin: 0; background: var(--control); cursor: pointer; }
.option:first-of-type { border-radius: 12px 12px 0 0; }
.option:last-of-type { border-radius: 0 0 12px 12px; }
.option:only-of-type { border-radius: 12px; }
.option+.option { border-top: 1px solid var(--line); }
.role-options { display: flex; gap: 1px; border-radius: 12px; overflow: hidden; }
.role-options .option { flex: 1; margin: 0; border: 0; border-radius: 0; }
.text-input { width: 100%; min-height: 48px; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; color: var(--text); background: var(--control); font-size: 16px; }
.text-input:focus { outline: none; border-color: var(--accent); }
.metadata-fields { margin-top: 24px; }
.metadata-fields .field-label { margin-top: 18px; margin-bottom: 8px; }
.metadata-fields .muted { margin-top: 8px; font-size: 13px; }
.drop-zone { display: grid; place-items: center; position: relative; border: 1px dashed var(--tertiary); border-radius: 16px; background: var(--control); color: var(--accent); min-height: 116px; margin-top: 24px; font-size: 15px; font-weight: 500; padding: 20px; text-align: center; }
.drop-zone.drag { background: var(--accent-soft); border-color: var(--accent); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.form-feedback { font-size: 14px; line-height: 1.5; margin-top: 16px; }
.form-feedback:empty { display: none; }
.primary-button, .outline-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px 20px; font-size: 16px; font-weight: 600; border-radius: 14px; }
.primary-button { background: var(--accent); color: var(--on-accent); }
.primary-button:hover { background: var(--accent-hover); }
.outline-button { background: var(--control); color: var(--accent); }
.outline-button:hover { background: var(--control-hover); }
.playlist-choice { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.playlist-choice img { width: 52px; height: 34px; border-radius: 6px; object-fit: cover; }
.playlist-choice span:not(.selection-order) { flex: 1; }
.selection-order { font-size: 13px; color: var(--accent); }
.detail-dialog { width: min(600px, calc(100% - 40px)); padding: 0; }
.detail-dialog>.dialog-close { position: absolute; top: 12px; right: 12px; background: #202022c9; backdrop-filter: blur(12px); z-index: 2; color: #fff; }
.detail-poster, .detail-player { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #080808; }
.detail-body { padding: 24px; background: var(--bg); }
#detail-media { position: relative; }
.detail-preview { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 24px #0006; }
.detail-preview svg { width: 30px; height: 30px; }
.detail-preview:hover { background: var(--accent-hover); }
.detail-edit { min-height: 44px; margin-top: 8px; }
.detail-actions:not(:has(button:not([hidden]))) { display: none; }
.detail-body h2 { padding-inline: var(--content-inset); font-size: 24px; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; }
.detail-actions>button { flex: 1; }
.credit-line { font-size: 11px; color: var(--tertiary); line-height: 1.5; margin-top: 20px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 80px); opacity: 0; padding: 14px 20px; max-width: calc(100% - 32px); width: max-content; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--glass); border: 1px solid var(--line); border-radius: 18px; pointer-events: none; z-index: 20; transition: opacity .15s, transform .15s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.skip-link { position: fixed; top: -100px; left: 15px; background: var(--text); color: var(--bg); padding: 12px; z-index: 100; }
.skip-link:focus { top: 10px; }

/* Menus keep neutral symbols; tint belongs to their calling controls. */
.picker { position: relative; min-width: 0; }
.picker-trigger { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 13px; border-radius: 100px; background: var(--panel); color: var(--accent); font-size: 14px; font-weight: 500; }
.picker-trigger:hover, .is-open>.picker-trigger { background: var(--control); }
.picker-trigger>svg { width: 17px; height: 17px; }
.picker-trigger>svg:last-child { width: 14px; height: 14px; margin-left: 3px; }
.picker-value { white-space: nowrap; }
.picker-menu { position: absolute; top: calc(100% + 7px); left: 0; width: max-content; min-width: 100%; max-width: calc(100vw - 32px); overflow: auto; padding: 5px; border: 1px solid #ffffff1a; border-radius: 16px; background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); box-shadow: 0 12px 32px #0007; z-index: 15; scrollbar-width: thin; scrollbar-color: var(--tertiary) transparent; }
.opens-up>.picker-menu { top: auto; bottom: calc(100% + 7px); }
.picker-option { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-height: 44px; padding: 11px 12px; border-radius: 10px; color: var(--text); text-align: left; font-size: 15px; line-height: 1.4; }
.picker-option>span { overflow-wrap: anywhere; }
.picker-option svg { width: 17px; height: 17px; visibility: hidden; }
.picker-option[aria-selected=true] svg { visibility: visible; }
.picker-option:hover, .picker-option:focus-visible, .picker-option.highlighted { background: #ffffff10; outline: none; }
.input-picker .text-input { padding-right: 46px; }
.input-picker .picker-menu { width: 100%; }
.suggestion-toggle { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 10px; color: var(--muted); }
.suggestion-toggle svg { width: 17px; height: 17px; }
.suggestion-toggle:hover { color: var(--text); }
input[type=radio], input[type=checkbox] { appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; width: 22px; height: 22px; flex: none; margin: 0; border: 1.5px solid var(--tertiary); background: transparent; cursor: pointer; }
input[type=radio], input[type=checkbox] { border-radius: 50%; }
input[type=radio]::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); }
input[type=radio]:checked::before { transform: scale(1); }
input[type=radio]:checked, input[type=checkbox]:checked { border-color: var(--accent); }
input[type=checkbox]:checked { background: var(--accent); }
input[type=checkbox]::before { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg); visibility: hidden; }
input[type=checkbox]:checked::before { visibility: visible; }
.option:has([role=switch]) { justify-content: space-between; }
input[role=switch] { order: 1; position: relative; display: block; width: 50px; height: 30px; border: 0; border-radius: 100px; background: #48484a; }
input[role=switch]::before { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; visibility: visible; transform: none; box-shadow: 0 1px 3px #0003; transition: transform .18s; }
input[role=switch]:checked::before { transform: translateX(20px); }

@media (max-width: 700px) {
  :root { --content-inset: 16px; }
  .shell { width: calc(100% - 40px); }
  .header-content { min-height: 76px; gap: 12px; }
  .brand { font-size: 23px; letter-spacing: -.6px; }
  .site-header nav { gap: 0; padding: 3px; }
  .site-header nav a { padding: 0 10px; min-height: 38px; font-size: 13px; gap: 5px; }
  .site-header nav svg { width: 17px; height: 17px; }
  #main { padding-top: 20px; }
  .cinema-player, .library-panel { scroll-margin-top: 96px; }
  .screen { border-radius: 18px; }
  .transport { gap: 8px; padding: 14px 0 10px; }
  .playback-time { font-size: 11px; gap: 5px; }
  .now-playing h1 { padding-inline: var(--content-inset); font-size: 22px; }
  .video-info summary, .info-heading { padding: 16px var(--content-inset); gap: 14px; }
  .info-body { padding: 0 var(--content-inset) 18px; }
  .library-panel { margin-top: 32px; }
  .page-heading { margin-bottom: 16px; }
  .page-heading h2 { font-size: 28px; }
  .library-toolbar { gap: 8px; margin-bottom: 6px; }
  .search-box.is-expanded { width: clamp(140px, 40%, 200px); }
  .library-pickers { column-gap: 8px; }
  .picker-trigger { padding-inline: 12px; font-size: 13px; }
  .search-toggle { font-size: 13px; }
  .library-pickers>.picker:last-child .picker-menu { left: 0; right: auto; }
  .library-list { border-radius: 16px; }
  .library-row { gap: 12px; padding-block: 15px; }
  .row-image { width: 72px; }
  .row-title { font-size: 15px; }
  .row-title small { font-size: 12px; }
  .site-footer { font-size: 11px; gap: 12px; }
  .toast { bottom: calc(126px + env(safe-area-inset-bottom)); }
}
@media (max-width: 500px) {
  .transport { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) 44px 44px; column-gap: 8px; row-gap: 0; padding: 6px 0 8px; }
  #seek { grid-column: 1 / -1; grid-row: 1; margin: 0; width: 100%; height: 28px; }
  .playback-time { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; font-size: 11px; margin-top: -3px; margin-bottom: 6px; }
  .time-divider { display: none; }
  #play-toggle { grid-column: 3; grid-row: 3; justify-self: center; }
  #previous { grid-column: 2; grid-row: 3; }
  #next { grid-column: 4; grid-row: 3; }
  #mute { grid-column: 1; grid-row: 3; }
  #fullscreen { grid-column: 5; grid-row: 3; }
  dialog { position: fixed; inset: auto 0 0; margin: 0 auto; width: 100%; max-width: 100%; max-height: calc(100dvh - 36px); padding: 24px 20px max(24px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; border-bottom: 0; }
  .detail-dialog { width: 100%; padding: 0; }
  .detail-body { padding: 22px 20px max(24px, env(safe-area-inset-bottom)); }
  .detail-actions { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .shell { width: calc(100% - 32px); }
  .brand { font-size: 21px; }
  .site-header nav a { padding-inline: 9px; }
  .site-header nav svg { display: none; }
  .picker-trigger { padding-inline: 10px; font-size: 12px; }
  .search-toggle { font-size: 12px; }
  .picker-trigger>svg:first-child:not(:last-child) { display: none; }
}
@media (prefers-contrast: more) {
  :root { --accent: #ff6165; --muted: #d1d1d6; --tertiary: #aeaeb2; --line: #636366; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 600px) {
  .site-header nav a { padding-inline: 9px; font-size: 12px; }
  .site-header nav svg { display: none; }
}
@media (max-width: 360px) {
  .header-content { gap: 8px; }
  .brand { font-size: 18px; white-space: nowrap; }
  .site-header nav { gap: 2px; }
  .site-header nav a { padding-inline: 7px; font-size: 11px; }
}
