.poster{color:#fff;text-decoration:none}.poster img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}.poster:has(img):before{z-index:1;background:linear-gradient(0deg,#07121caa 0%,transparent 45%)}.poster:has(img)>strong{display:none}.media-title-row a{color:inherit;text-decoration:none}.media-title-row a:hover{color:#0877f9}.search-overview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:30px}.card-actions button.selected{background:#0b8f65;color:#fff}.results-heading{display:flex;align-items:center;justify-content:space-between}.source-badge{font-size:12px;background:#fff0ca;color:#825700;border-radius:20px;padding:7px 12px}.source-badge.live{background:#d8f7e9;color:#067149}.title-details{position:relative;margin:-22px -24px -44px;min-height:calc(100vh - 70px);overflow:hidden}.details-backdrop{position:absolute;inset:0 0 auto;height:460px;background-size:cover;background-position:center 25%;filter:saturate(.85)}.details-content{position:relative;padding:220px 6vw 50px;display:grid;grid-template-columns:250px minmax(0,720px);gap:40px;align-items:end}.details-poster{height:375px;border-radius:14px;overflow:hidden;background:linear-gradient(145deg,#16334e,#83675b);box-shadow:0 20px 45px #0b172d55;color:#fff;display:grid;place-items:center;padding:20px;text-align:center}.details-poster img{width:100%;height:100%;object-fit:cover}.details-copy{padding:30px;background:#fffffff0;backdrop-filter:blur(14px);border-radius:16px;box-shadow:0 12px 35px #19324c18}.back-link{color:#526c8c;text-decoration:none}.eyebrow{color:#0877f9;font-weight:700;letter-spacing:2px;font-size:12px;margin:20px 0 4px}.details-copy h1{font-size:42px;line-height:1.05;margin:0}.tagline{font-size:18px;color:#526a86;font-style:italic}.detail-facts,.genre-list,.detail-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.detail-facts span,.genre-list span{background:#eef3f8;border-radius:20px;padding:7px 12px;font-size:13px}.overview{font-size:16px;line-height:1.65;color:#334c69}.action-confirmation{color:#08784c;font-size:13px}@media(max-width:760px){.results-heading{align-items:flex-start;gap:8px}.source-badge{max-width:170px}.title-details{margin:-18px -14px -44px}.details-backdrop{height:280px}.details-content{padding:180px 20px 35px;grid-template-columns:100px 1fr;gap:15px;align-items:start}.details-poster{height:150px;border-radius:9px}.details-copy{padding:20px;grid-column:1/-1;margin-top:-20px}.details-copy h1{font-size:32px}}
/* Shared streaming listings and database-backed library editor. */
.sidebar .brand { flex-direction: column; gap: 4px; align-items: center; padding: 0 8px 24px; }
.brand-logo { display: block; width: 100%; height: auto; }
.sidebar .brand small { font-size: 12px; text-align: center; color: #c5d0dc; }
.nav-list .nav-icon { width: 96px; height: 72px; object-fit: contain; flex-shrink: 0; }
.dashboard .section-heading h2 { display: flex; align-items: center; gap: 10px; }
.dashboard-section-icon { width: 64px; height: 48px; object-fit: contain; flex-shrink: 0; }
.nav-list a { justify-content: center; padding: 4px 12px; }
.sidebar { overflow-y: auto; }
.header-search { padding: 2px 10px; }
.topbar .header-search { margin-left: 0; }
.header-refresh { margin-left: auto; display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--ui-border,#d5deea); border-radius: 10px; background: var(--search-bg,#edf6ff); color: var(--search-text,#005abc); cursor: pointer; }
.header-refresh:hover { background: var(--menu-hover,#dcecff); }
.header-refresh:focus-visible { outline: 3px solid #0877f9; outline-offset: 3px; }
.header-refresh:disabled { cursor: wait; opacity: .65; }
.refresh-spinning { animation: spin 1s linear infinite; }
.refresh-error { position: absolute; top: 100%; right: 15px; max-width: min(360px,calc(100vw - 30px)); padding: 12px; border: 1px solid var(--ui-border,#d5deea); border-radius: 8px; background: var(--menu-bg,#fff); color: var(--menu-text,#0b1838); font-size: 13px; }
@media(prefers-reduced-motion:reduce) { .refresh-spinning { animation: none; } }
.header-search-icon { width: 56px; height: 46px; object-fit: contain; flex-shrink: 0; }
.mobile-brand img { display: block; width: 140px; max-width: 100%; height: auto; }
@media(max-width:760px) {
    .sidebar .brand { display: none; }
    .nav-list a { padding: 5px; gap: 0; min-width: 0; }
    .nav-list .nav-icon { width: 48px; max-width: 100%; height: 44px; }
    .mobile-brand { min-width: 0; }
}
.mini-art { overflow: hidden; text-decoration: none; }
.mini-art img { width: 100%; height: 100%; object-fit: cover; }
.library-indicator { display: block; margin-top: 12px; padding: 10px; border: 1px solid #718ca766; border-radius: 8px; background: #718ca718; color: inherit; font-size: 13px; font-weight: 600; }
.library-indicator:focus-visible { outline: 2px solid #0877f9; outline-offset: 2px; }
.selected-streaming-services { margin: 18px 0; padding: 14px; border: 1px solid #718ca766; border-radius: 10px; background: #718ca710; }
.selected-streaming-services h3 { font-size: 15px; margin: 0 0 10px; }
.selected-streaming-services p { margin: 0; font-size: 13px; }
.selected-service-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.selected-service-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 100%; padding: 7px 10px; border: 1px solid #718ca766; border-radius: 8px; background: #718ca718; }
.selected-service-list li > span { overflow-wrap: anywhere; font-weight: 600; font-size: 13px; }
.selected-service-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.selected-service-list button { border: 0; border-radius: 5px; padding: 6px; background: transparent; color: inherit; cursor: pointer; font-size: 12px; }
.selected-service-list button:hover { background: #718ca733; }
.selected-service-list button:focus-visible { outline: 2px solid #0877f9; outline-offset: 2px; }
.poster-size-small .media-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.poster-size-large .media-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.compact-view .media-copy { padding: 10px; }
.compact-view .media-grid { gap: 12px; }
.theme-dark { background: #111c2a; color: #e7eef7; }
.theme-dark :is(.panel,.media-card,.settings-card,.details-copy,.topbar) { background: #1c2b3e; color: #e7eef7; }
.theme-dark :is(h1,h2,h3,a,input,select,textarea) { color: inherit; }
.theme-dark :is(input,select,textarea,.streaming-offer) { background: #263a50; color: #e7eef7; }
@media (prefers-color-scheme: dark) {
  .theme-system { background: #111c2a; color: #e7eef7; }
  .theme-system :is(.panel,.media-card,.settings-card,.details-copy,.topbar) { background: #1c2b3e; color: #e7eef7; }
  .theme-system :is(h1,h2,h3,a,input,select,textarea) { color: inherit; }
  .theme-system :is(input,select,textarea,.streaming-offer) { background: #263a50; color: #e7eef7; }
}
.streaming-availability { margin: 12px 0; font-size: 12px; }
.streaming-availability > small { display: block; color: #65758b; margin: 5px 0; }
.streaming-offers { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.streaming-offer { display: inline-flex; align-items: center; gap: 6px; background: #eef3f9; padding: 5px 7px; border-radius: 7px; }
.streaming-offer img { width: 24px; height: 24px; border-radius: 5px; }
.streaming-offer small { display: block; color: #566579; }
.availability-message { color: #65758b; margin: 5px 0; }
.library-editor { display: grid; gap: 12px; margin-top: 24px; }
.library-editor label, .settings-card > label:not(.select-row):not(.toggle-row) { display: grid; gap: 5px; margin: 8px 0; }
.settings-card { min-width: 0; }
.settings-card > .select-row select { width: 55%; min-width: 140px; }
@media(max-width:400px) {
  .settings-card > .select-row { flex-direction: column; align-items: stretch; gap: 5px; }
  .settings-card > .select-row select { width: 100%; min-width: 0; }
}
.library-editor input, .library-editor select, .library-editor textarea, .settings-card input { padding: 8px; border: 1px solid #c9d4e1; border-radius: 6px; }
.library-editor input[type=checkbox] { width: 18px; }
[role=alert] { color: #a02323; padding: 12px; background: #fff0ef; border-radius: 6px; }

.app-credits{display:flex;align-items:center;gap:20px;max-width:1452px;margin:30px auto 0;padding:22px 24px;border-top:1px solid #d5deea;font-size:12px;color:#59708d}
.app-credits img{display:block;width:100px;height:auto}.app-credits p{margin:5px 0}.app-credits a{flex-shrink:0}
.season-browser{margin-top:24px;border-top:1px solid #d5deea;padding-top:16px}.season-browser>p,.season-summary>p,.episode-list p{font-size:14px;line-height:1.5}
.season-selector{display:flex;align-items:center;gap:12px}.season-selector select{padding:10px;max-width:100%;border:1px solid #c9d4e1;border-radius:6px;background:#fff}
.season-summary{padding:14px 0}.season-summary h3{margin:4px 0}.season-actions{display:flex;flex-wrap:wrap;gap:8px}.season-save-hint{font-size:12px}
.episode-list{list-style:none;margin:0;padding:0;max-height:520px;overflow:auto}.episode-list li{padding:14px 0;border-top:1px solid #d5deea}.episode-list p{margin:6px 0}.episode-list summary{cursor:pointer;font-size:13px}.next-episode{padding:12px;border-left:3px solid #0877f9}
@media(max-width:600px){.app-credits{align-items:flex-start;gap:14px}.season-selector{align-items:stretch;flex-direction:column}}

.season-actions .outline-button{cursor:pointer;transition:background-color .15s,color .15s,box-shadow .15s,transform .15s}
.season-actions .outline-button:hover:not(:disabled){background:#e4f0ff;color:#004fae;box-shadow:0 3px 9px #0877f92b;transform:translateY(-1px)}
.season-actions .outline-button:focus-visible{outline:3px solid #0877f9;outline-offset:3px}
.season-actions .outline-button[aria-pressed=true]{background:#0877f9;color:#fff;border-color:#0877f9}
.season-actions .outline-button:disabled{opacity:.55;cursor:wait}
.progress-feedback:not(:empty){padding:12px;border-left:3px solid #0877f9;background:#edf6ff;color:#123b66;border-radius:4px}
.episode-list .season-actions{margin:10px 0}

/* Shared dark palette also follows the system appearance setting. */
.theme-dark{--supporting-text:#b5c6dc;--badge-bg:#24476b;--badge-text:#d7eaff;--menu-bg:#1c2b3e;--menu-text:#e7eef7;--menu-hover:#2b4059;--ui-border:#40556e;--search-bg:#263a50;--search-text:#d7eaff}
@media(prefers-color-scheme:dark){.theme-system{--supporting-text:#b5c6dc;--badge-bg:#24476b;--badge-text:#d7eaff;--menu-bg:#1c2b3e;--menu-text:#e7eef7;--menu-hover:#2b4059;--ui-border:#40556e;--search-bg:#263a50;--search-text:#d7eaff}}
.app-shell :is(.metadata,.detail,.release,.progress-label,.tagline,.overview,.availability-message,.streaming-availability > small,.streaming-offer small,.page-heading p,.app-credits){color:var(--supporting-text,#5e7392)}
.app-shell .status{background:var(--badge-bg,#e5efff);color:var(--badge-text,#0564d8);font-weight:600}
.app-shell .status:is(.waiting,.upcoming){background:#ffedb9;color:#864900}
.app-shell .status:is(.finished,.watched){background:#cef7df;color:#07632c}
.app-shell .status.priority{background:#ffd4dc;color:#a51330}
.app-shell .profile-menu-panel{background:var(--menu-bg,#fff);color:var(--menu-text,#0b1838);border-color:var(--ui-border,#d5deea)}
.app-shell .profile-menu-name{border-color:var(--ui-border,#e2e8f0)}
.app-shell .profile-menu-panel :is(a,button){color:var(--menu-text,#203d60)}
.app-shell .profile-menu-panel :is(a,button):is(:hover,:focus-visible){background:var(--menu-hover,#edf6ff);color:var(--menu-text,#005abc)}
.app-shell .header-search{background:var(--search-bg,#edf6ff);color:var(--search-text,#005abc);border-color:var(--ui-border,#d5deea)}
.app-shell .header-search:hover{background:var(--menu-hover,#dcecff)}

/* Complete dark surfaces and contrast for summaries, search, and library controls. */
.theme-dark .summary-card{background:#20364d;color:#e7eef7;border-color:#40556e}
.theme-dark .summary-card.amber{background:#3c3220}
.theme-dark .summary-card.green{background:#1c3a35}
.theme-dark .summary-card.violet{background:#302b48}
.theme-dark :is(.summary-card small,.result-count,.empty-state,.loading-state,.mini-row small,.mini-row>span,.settings-categories small,.settings-card h2 small,.toggle-row small,.action-row small,.integration-row small){color:#b5c6dc}
.theme-dark .empty-state h1{color:#e7eef7}
.theme-dark .search-input{background:#263a50;border-color:#40556e}
.theme-dark .search-input input{background:transparent;color:#e7eef7}
.theme-dark .search-input input::placeholder{color:#b5c6dc;opacity:1}
.theme-dark .search-input button{color:#b5c6dc;cursor:pointer}
.theme-dark .search-input:focus-within{outline:2px solid #73b7ff;outline-offset:2px}
.theme-dark :is(.media-card,.panel,.settings-card,.topbar,.app-credits,.mini-row,.season-browser,.episode-list li){border-color:#40556e}
.theme-dark :is(.toolbar select,.select-row select,.season-selector select,.library-editor input,.library-editor select,.library-editor textarea,.profile-form input){background:#263a50;color:#e7eef7;border-color:#40556e}
.theme-dark :is(.detail-facts span,.genre-list span,.settings-categories>div,.pills button,.search-tabs button,.sort button,.filters button,.provider-row i){background:#263a50;color:#e7eef7;border-color:#40556e}
.theme-dark :is(.pills button.active,.search-tabs button.active,.sort .view.active){background:#0877f9;color:#fff}
.theme-dark .settings-card h2 span{color:#e7eef7}
.theme-dark .outline-button{background:#263a50;color:#b9daff;border-color:#73b7ff}
.theme-dark .outline-button:hover:not(:disabled){background:#2b4059;color:#e7eef7}
.theme-dark .season-actions .outline-button[aria-pressed=true]{background:#0877f9;color:#fff}
.theme-dark .progress-feedback:not(:empty){background:#20364d;color:#d7eaff}
.theme-dark .media-title-row button{color:#b5c6dc}
@media(prefers-color-scheme:dark){
.theme-system .summary-card{background:#20364d;color:#e7eef7;border-color:#40556e}
.theme-system .summary-card.amber{background:#3c3220}
.theme-system .summary-card.green{background:#1c3a35}
.theme-system .summary-card.violet{background:#302b48}
.theme-system :is(.summary-card small,.result-count,.empty-state,.loading-state,.mini-row small,.mini-row>span,.settings-categories small,.settings-card h2 small,.toggle-row small,.action-row small,.integration-row small){color:#b5c6dc}
.theme-system .empty-state h1{color:#e7eef7}
.theme-system .search-input{background:#263a50;border-color:#40556e}
.theme-system .search-input input{background:transparent;color:#e7eef7}
.theme-system .search-input input::placeholder{color:#b5c6dc;opacity:1}
.theme-system .search-input button{color:#b5c6dc;cursor:pointer}
.theme-system .search-input:focus-within{outline:2px solid #73b7ff;outline-offset:2px}
.theme-system :is(.media-card,.panel,.settings-card,.topbar,.app-credits,.mini-row,.season-browser,.episode-list li){border-color:#40556e}
.theme-system :is(.toolbar select,.select-row select,.season-selector select,.library-editor input,.library-editor select,.library-editor textarea,.profile-form input){background:#263a50;color:#e7eef7;border-color:#40556e}
.theme-system :is(.detail-facts span,.genre-list span,.settings-categories>div,.pills button,.search-tabs button,.sort button,.filters button,.provider-row i){background:#263a50;color:#e7eef7;border-color:#40556e}
.theme-system :is(.pills button.active,.search-tabs button.active,.sort .view.active){background:#0877f9;color:#fff}
.theme-system .settings-card h2 span{color:#e7eef7}
.theme-system .outline-button{background:#263a50;color:#b9daff;border-color:#73b7ff}
.theme-system .outline-button:hover:not(:disabled){background:#2b4059;color:#e7eef7}
.theme-system .season-actions .outline-button[aria-pressed=true]{background:#0877f9;color:#fff}
.theme-system .progress-feedback:not(:empty){background:#20364d;color:#d7eaff}
.theme-system .media-title-row button{color:#b5c6dc}
}
