:root {
  color-scheme: dark;
  --bg: #090a0d;
  --surface: #101216;
  --surface-2: #171a20;
  --text: #f5f5f1;
  --muted: #8b909a;
  --line: rgba(255,255,255,.09);
  --accent: #9ee8cb;
  --accent-ink: #10251d;
  --danger: #ff7262;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
.topbar { height: 72px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgba(9,10,13,.86); backdrop-filter: blur(18px); }
.brand { color: var(--text); text-decoration: none; font-weight: 760; letter-spacing: -.02em; display: inline-flex; gap: 11px; align-items: center; }
.brand-mark { width: 11px; height: 22px; background: var(--accent); border-radius: 2px 9px 2px 9px; transform: skew(-8deg); box-shadow: 0 0 22px rgba(217,255,67,.35); }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.service-state { color: var(--muted); font-size: 13px; }
.primary-button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 750; cursor: pointer; transition: transform .18s ease, opacity .18s ease; }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { opacity: .48; cursor: wait; }
.logout-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 8px 2px; }
.logout-button:hover { color: var(--text); }
.workspace { width: min(1460px, 92vw); margin: 0 auto; }
.overview { min-height: 380px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 10vw; align-items: end; padding: 9vh 0 64px; border-bottom: 1px solid var(--line); animation: rise .5s ease both; }
.eyebrow { margin: 0 0 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 800; }
.overview h1 { margin: 0; font-size: clamp(50px, 6vw, 96px); line-height: .9; letter-spacing: -.065em; max-width: 820px; white-space: nowrap; }
.subcopy { color: var(--muted); max-width: 560px; font-size: 16px; line-height: 1.65; margin: 28px 0 0; }
.capacity { padding-bottom: 8px; }
.capacity-copy { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 13px; }
.capacity-copy strong { font-size: 30px; color: var(--text); letter-spacing: -.04em; }
.capacity-track { height: 4px; background: var(--surface-2); margin: 15px 0 12px; overflow: hidden; }
.capacity-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .7s cubic-bezier(.2,.8,.2,1), background .2s; }
.capacity small { color: var(--muted); }
.library { padding: 56px 0 100px; }
.library-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.library h2 { font-size: 28px; letter-spacing: -.04em; margin: 0 0 7px; }
.library-head p { margin: 0; color: var(--muted); font-size: 13px; }
.library-tools { display: flex; align-items: flex-end; gap: 24px; }
.sort-control { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.sort-control select { min-width: 150px; border: 0; border-bottom: 1px solid var(--line); outline: none; appearance: none; background: var(--bg); color: var(--text); padding: 10px 20px 10px 2px; cursor: pointer; }
.sort-control select:focus { border-color: var(--accent); }
.search { min-width: min(400px, 45vw); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 2px; }
.search span { color: var(--accent); font-size: 20px; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.root-status { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.root-chip { color: var(--muted); font-size: 12px; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; }
.root-chip[data-status="complete"] { color: var(--text); }
.root-chip[data-status="running"] { border-color: rgba(217,255,67,.45); color: var(--accent); }
.media-list { border-top: 1px solid var(--line); }
.media-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 130px 160px; gap: 24px; align-items: center; min-height: 72px; border-bottom: 1px solid var(--line); animation: fade .3s ease both; }
.media-name { overflow: hidden; }
.media-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.media-name small, .media-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-link { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 720; text-align: right; }
.media-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; position: relative; }
.media-organize { position: relative; color: var(--muted); font-size: 12px; }
.media-organize summary { cursor: pointer; list-style: none; }
.media-organize summary::-webkit-details-marker { display: none; }
.media-organize > div { position: absolute; z-index: 4; right: 0; top: calc(100% + 8px); display: flex; padding: 6px; gap: 4px; border: 1px solid var(--line); background: var(--surface-2); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.media-organize button { border: 0; background: transparent; color: var(--text); padding: 7px 9px; font-size: 11px; cursor: pointer; }
.media-organize button:hover { color: var(--accent); }
.empty { color: var(--muted); padding: 44px 0; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 24px 0; color: var(--muted); font-size: 12px; }
.pagination button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); padding: 8px 13px; cursor: pointer; }
.pagination button:disabled { opacity: .32; cursor: default; }
.back-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.player-page { min-height: 100vh; }
.player-topbar { position: relative; }
.player-shell { width: min(1500px, 100%); margin: 0 auto; padding: clamp(16px, 3vw, 42px); }
.video-stage { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; min-height: 240px; background: #000; overflow: hidden; }
.video-player-frame { --video-ratio: 1.7777778; width: min(100%, calc((100svh - 150px) * var(--video-ratio))); aspect-ratio: var(--video-ratio); max-height: calc(100svh - 150px); background: #000; transition: width .28s ease, aspect-ratio .28s ease; }
.video-player-frame video { object-fit: contain; }
.video-player-frame video-player, .video-player-frame video-skin, .native-video { width: 100%; height: 100%; }
.video-player-frame video-skin { display: block; --media-accent-color: var(--accent); --media-accent-text-color: var(--accent-ink); --media-video-border-radius: 0; }
.video-loading { position: absolute; z-index: 20; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; background: #050506; color: var(--muted); transition: opacity .3s ease; }
.video-loading.hidden { opacity: 0; pointer-events: none; }
.video-loading span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.player-info { padding: 30px 0 70px; }
.player-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.player-heading h1 { max-width: 980px; font-size: clamp(22px, 3vw, 38px); line-height: 1.22; letter-spacing: -.045em; margin: 0; overflow-wrap: anywhere; }
.external-players { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 280px; }
.external-players > span { color: var(--muted); font-size: 12px; margin-right: 4px; }
.external-player { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: transparent; color: var(--text); padding: 8px 12px; border-radius: 999px; font-size: 12px; line-height: normal; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: border-color .16s ease, color .16s ease, transform .16s ease; }
.external-player:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.external-player-primary { border-color: rgba(217,255,67,.45); }
.external-player:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.external-player:disabled { opacity: .3; cursor: not-allowed; transform: none; }
.organize-media { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.organize-media[hidden] { display: none; }
.organize-media > span { color: var(--muted); font-size: 12px; margin-right: 4px; }
.organize-media button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 13px; font-size: 12px; cursor: pointer; transition: border-color .16s ease, color .16s ease; }
.organize-media button:hover { border-color: var(--accent); color: var(--accent); }
.organize-media button:disabled { opacity: .35; cursor: wait; }
.media-facts { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); margin: 34px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.media-facts div { padding: 16px 0; font-size: 13px; }
.media-facts dt { color: var(--muted); margin-bottom: 6px; }
.media-facts dd { margin: 0; }
.episode-panel { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 28px; }
.episode-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.episode-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.episode-heading > span { color: var(--muted); font-size: 12px; }
.episode-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--line); }
.episode-link { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.episode-link:hover, .episode-link[aria-current="true"] { color: var(--accent); background: rgba(217,255,67,.035); }
.episode-link span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.episode-link small { flex: none; color: var(--muted); }
.episode-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 16px; color: var(--muted); font-size: 12px; }
.episode-pagination button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); padding: 7px 12px; cursor: pointer; }
.episode-pagination button:disabled { opacity: .32; cursor: default; }
.player-notice { color: var(--accent); font-size: 13px; line-height: 1.5; }
.player-error { color: var(--danger); font-size: 13px; line-height: 1.5; }
.login-page { display: grid; place-items: center; background: #07080a; }
.login-shell { width: min(100%, 520px); padding: 32px; }
.login-panel { border-top: 1px solid var(--line); padding-top: 26px; animation: rise .45s ease both; }
.login-copy { margin: 12vh 0 48px; }
.login-copy h1 { margin: 0; font-size: clamp(38px, 8vw, 62px); line-height: .96; letter-spacing: -.06em; }
.login-copy > p:last-child { color: var(--muted); line-height: 1.65; max-width: 420px; margin: 22px 0 0; }
.login-form { display: grid; gap: 12px; }
.login-form label { color: var(--muted); font-size: 12px; }
.login-form input { width: 100%; border: 0; border-bottom: 1px solid var(--line); outline: none; background: transparent; color: var(--text); font-size: 18px; padding: 14px 2px; }
.login-form input:focus { border-color: var(--accent); }
.login-form .primary-button { justify-self: start; margin-top: 10px; min-width: 120px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 800px) {
  .overview { grid-template-columns: 1fr; gap: 48px; padding-top: 70px; }
  .overview h1 { white-space: normal; }
  .library-head { align-items: stretch; flex-direction: column; }
  .library-tools { width: 100%; align-items: stretch; flex-direction: column; gap: 12px; }
  .search { min-width: 100%; }
  .media-row { grid-template-columns: minmax(0, 1fr) 76px; gap: 14px; }
  .media-row .media-meta:nth-of-type(1), .media-row .media-meta:nth-of-type(2) { display: none; }
  .player-shell { padding: 12px; }
  .video-player-frame { width: min(100%, calc((100svh - 120px) * var(--video-ratio))); max-height: calc(100svh - 120px); }
  .player-heading { flex-direction: column; }
  .external-players { min-width: 0; justify-content: flex-start; }
  .external-player { min-height: 42px; padding-inline: 14px; }
  .media-facts { grid-template-columns: repeat(2, 1fr); }
  .login-shell { padding: 24px; }
}

/* Media workspace: compact navigation, quiet surfaces, readable file rows. */
.topbar { height: 76px; background: rgba(9,10,13,.94); }
.brand { font-size: 19px; }
.brand-mark { box-shadow: none; width: 17px; height: 23px; border-radius: 4px; transform: none; clip-path: polygon(0 0,100% 50%,0 100%); }
.workspace { width: min(1460px, 90vw); }
.overview { min-height: 0; padding: 48px 0 36px; gap: 48px; align-items: center; grid-template-columns: 1fr minmax(220px, 320px); }
.overview h1 { font-size: clamp(36px,4vw,58px); line-height: 1.12; letter-spacing: -.045em; }
.heading-dot { color: var(--accent); margin-left: 5px; }
.overview .eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .2em; margin-bottom: 12px; }
.subcopy { font-size: 14px; margin-top: 13px; }
.capacity-copy strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.capacity-track { height: 5px; border-radius: 4px; }
.capacity small { display: block; font-size: 11px; line-height: 1.6; }
.library { padding: 0 0 64px; }
.library-tabs { display: flex; gap: 28px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 32px; scrollbar-width: thin; }
.library-tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; padding: 20px 0 17px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; transition: color .18s, border-color .18s; }
.library-tabs button:hover { color: var(--text); }
.library-tabs button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.library h2 { font-size: 22px; }
.library-head { margin-bottom: 22px; align-items: center; }
.library-tools { gap: 16px; align-items: center; }
.search { min-width: 300px; background: var(--surface); border: 1px solid var(--line); padding: 11px 14px; border-radius: 9px; }
.search:focus-within { border-color: var(--accent); }
.search span { font-size: 22px; line-height: 1; color: var(--muted); }
.search input { font-size: 13px; }
.sort-control { display: flex; align-items: center; gap: 10px; }
.sort-control select { padding: 11px 24px 11px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; }
.root-status { gap: 16px; margin-bottom: 22px; }
.root-chip { border: 0; padding: 0; font-size: 11px; color: var(--muted); }
.root-chip[data-status="complete"] { color: var(--muted); }
.media-columns, .media-row { grid-template-columns: minmax(0,1fr) 80px 100px 140px; gap: 24px; }
.media-columns { display: grid; padding: 12px 16px; background: var(--surface); border-radius: 8px 8px 0 0; font-size: 11px; color: var(--muted); }
.media-columns span:last-child { text-align: right; }
.media-row { padding: 16px; min-height: 82px; transition: background .18s ease; }
.media-row:hover { background: rgba(255,255,255,.025); }
.media-name strong { font-weight: 550; line-height: 1.6; }
.media-name small { display: block; margin-top: 4px; font-size: 11px; opacity: .8; }
.media-meta { font-variant-numeric: tabular-nums; }
.play-link { padding: 8px 12px; border-radius: 7px; background: rgba(158,232,203,.07); white-space: nowrap; transition: background .18s; }
.play-link:hover { background: rgba(158,232,203,.14); }
.pagination { justify-content: center; padding-top: 28px; }
.media-organize > div { border-radius: 9px; }
.player-topbar { height: 64px; border: 0; }
.player-shell { width: min(1560px,100%); padding-top: 8px; }
.video-stage { border-radius: 12px; border: 1px solid var(--line); }
.video-player-frame { width: min(100%,calc((100svh - 180px) * var(--video-ratio))); max-height: calc(100svh - 180px); }
.video-player-frame.is-portrait { width: min(100%,calc((100svh - 180px) * var(--video-ratio))); }
.player-info { width: min(1240px,100%); margin: 0 auto; padding: 32px 0 48px; animation: rise .4s ease both; }
.player-heading { gap: 24px; }
.player-heading > div:first-child { flex: 1; min-width: 0; }
.player-heading .eyebrow { font-size: 10px; margin-bottom: 10px; }
.player-heading h1 { font-size: clamp(20px,2.2vw,30px); line-height: 1.45; letter-spacing: -.025em; }
.external-players { max-width: 430px; min-width: 0; }
.external-players > span { width: 100%; text-align: right; margin-bottom: 4px; }
.external-player { border-radius: 8px; background: var(--surface); }
.media-facts { margin-top: 26px; }
.media-facts div { padding: 18px 0; }
.media-facts dt { font-size: 11px; }
.media-facts dd { font-variant-numeric: tabular-nums; }
.episode-heading h2 { font-size: 21px; }
.episode-panel[hidden] { display: none; }
.episode-list { gap: 0 20px; }
.episode-link { min-height: 60px; border-radius: 5px; transition: background .18s,color .18s; }
.episode-link[aria-current="true"] { box-shadow: inset 3px 0 var(--accent); }
.player-notice:empty, .player-error:empty { display: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 1000px) {
  .library-tools { gap: 10px; }
  .search { min-width: 220px; }
  .sort-control > span { display: none; }
}
@media (max-width: 800px) {
  .topbar { height: 64px; padding: 0 5vw; }
  .brand { font-size: 16px; gap: 8px; }
  .topbar-actions { gap: 12px; }
  .library-page .service-state { display: none; }
  .library-page .topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 10px; padding-block: 12px; }
  .library-page .topbar-actions { flex-wrap: wrap; gap: 10px; }
  .primary-button { padding: 9px 13px; font-size: 12px; }
  .overview { padding: 30px 0 24px; gap: 24px; grid-template-columns: 1fr; }
  .capacity { padding: 0; }
  .capacity-copy strong { font-size: 21px; }
  .capacity-track { margin: 10px 0 8px; }
  .library-tabs { gap: 24px; margin-bottom: 24px; }
  .library-tabs button { padding: 17px 0 14px; }
  .library-tools { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .library-head { align-items: stretch; }
  .search { order: -1; min-width: 100%; }
  .sort-control { width: 100%; }
  .sort-control select { width: 100%; }
  .root-status { gap: 8px 14px; }
  .media-columns { display: none; }
  .media-row { grid-template-columns: minmax(0,1fr) 92px; gap: 12px; padding: 14px 0; }
  .media-name strong { font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .media-actions { flex-wrap: wrap; gap: 8px; }
  .play-link { min-height: 42px; display: inline-flex; align-items: center; }
  .player-shell { padding: 0 12px; }
  .video-stage { border-radius: 8px; min-height: 180px; }
  .video-player-frame, .video-player-frame.is-portrait { width: min(100%,calc((100svh - 140px) * var(--video-ratio))); max-height: calc(100svh - 140px); }
  .player-info { padding: 24px 4px 40px; }
  .external-players { max-width: 100%; justify-content: flex-start; }
  .external-players > span { text-align: left; }
  .organize-media { justify-content: flex-start; flex-wrap: wrap; }
  .media-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .episode-list { grid-template-columns: minmax(0,1fr); }
  .back-link { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.external-player-primary { border-color: rgba(158,232,203,.4); }
.subtitle-section { padding: 25px 0; border-bottom: 1px solid var(--line); }
.subtitle-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.subtitle-heading .eyebrow { margin-bottom: 8px; }
#subtitle-state { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.subtitle-actions, .subtitle-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.subtitle-section button, .subtitle-dialog button:not(.primary-button) { border: 1px solid var(--line); color: var(--text); background: var(--surface); border-radius: 8px; padding: 10px 13px; font-size: 12px; cursor: pointer; transition: border-color .18s, background .18s; }
.subtitle-section button:hover, .subtitle-dialog button:hover { border-color: var(--accent); }
.subtitle-section button:disabled, .subtitle-dialog button:disabled { opacity: .4; cursor: wait; }
.subtitle-controls { margin-top: 18px; }
.subtitle-controls[hidden] { display: none; }
.subtitle-controls label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; }
.subtitle-controls input, .subtitle-controls select { width: 76px; border: 1px solid var(--line); border-radius: 7px; padding: 9px; color: var(--text); background: var(--surface); }
.subtitle-controls select { width: 112px; }
.subtitle-controls .subtitle-save { color: var(--accent); border-color: rgba(158,232,203,.3); }
.subtitle-notice { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 0 0; overflow-wrap: anywhere; }
.subtitle-notice:empty { display: none; }
.subtitle-notice.is-error, #subtitle-save-error { color: var(--danger); }
.subtitle-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px,100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid var(--line); padding: 30px; background: #101216; color: var(--text); overflow-y: auto; }
.subtitle-dialog[open] { animation: subtitle-enter .2s ease both; }
.subtitle-dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.subtitle-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.subtitle-dialog h2 { font-size: 24px; margin: 0; letter-spacing: -.035em; }
.subtitle-help, .subtitle-save-dialog p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.subtitle-search-form { display: grid; grid-template-columns: minmax(0,1fr) 106px auto; gap: 8px; margin-top: 22px; }
.subtitle-search-form input, .subtitle-search-form select { min-width: 0; width: 100%; padding: 11px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; }
#subtitle-search-state { font-size: 12px; color: var(--muted); line-height: 1.8; min-height: 22px; }
#subtitle-results h3 { font-size: 13px; font-weight: 500; margin-top: 28px; }
.subtitle-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.subtitle-result > div { min-width: 0; }
.subtitle-result strong { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; line-height: 1.7; }
.subtitle-result small { display: block; color: var(--muted); margin-top: 6px; font-size: 11px; }
.subtitle-result button { flex: none; }
.subtitle-save-dialog { width: min(480px,calc(100% - 24px)); height: auto; max-height: calc(100dvh - 40px); inset: 0; margin: auto; border: 1px solid var(--line); border-radius: 14px; }
.subtitle-save-dialog .subtitle-temp-warning { color: var(--accent); }
#subtitle-save-detail { overflow-wrap: anywhere; }
video::cue { background: rgba(0,0,0,.8); color: white; }
@keyframes subtitle-enter { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 800px) {
  .subtitle-heading { flex-direction: column; align-items: flex-start; }
  .subtitle-section button { min-height: 42px; }
  .subtitle-dialog:not(.subtitle-save-dialog) { inset: auto 0 0; height: 85dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 24px 18px; }
  .subtitle-search-form { grid-template-columns: minmax(0,1fr) 104px; }
  .subtitle-search-form button { grid-column: 1 / -1; }
}

