/* JuKu media-center foundation. Existing ids and modules remain stable while the shell is rebuilt. */
:root {
  color-scheme: dark;
  --bg: #090e0d;
  --panel: #111917;
  --panel-elevated: #17221f;
  --soft: #1b2a25;
  --text: #eef7f1;
  --muted: #8fa79a;
  --line: #263a31;
  --line-strong: #416653;
  --brand: #6ee7b7;
  --on-brand: #07130e;
  --brand-text: #8af2c4;
  --tint: #16352a;
  --poster: #20342b;
  --poster-ink: #bdd4c5;
  --danger: #ff8f8f;
  --danger-bg: #3a2023;
  --success: #91e2ad;
  --success-bg: #173827;
  --warning: #f4ca79;
  --warning-bg: #3b2e18;
  --shadow: 0 18px 60px #0009;
  --radius: 16px;
  --control-radius: 11px;
}

:root[data-theme=light] {
  color-scheme: light;
  --bg: #f2f7f3;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --soft: #e8f0eb;
  --text: #17211d;
  --muted: #63746b;
  --line: #d7e3da;
  --line-strong: #9db8a5;
  --brand: #217b5b;
  --on-brand: #ffffff;
  --brand-text: #176747;
  --tint: #e2f2e8;
  --poster: #e2ece5;
  --poster-ink: #5c7665;
  --shadow: 0 18px 50px #28513d1a;
}

body {
  background:
    radial-gradient(circle at 12% -15%, #1d594238, transparent 35rem),
    radial-gradient(circle at 90% 0%, #12382b2b, transparent 32rem),
    var(--bg);
  font-size: 14px;
}

.app-header {
  position: sticky;
  top: 0;
  height: 72px;
  padding-left: 264px;
  padding-right: 28px;
  gap: 28px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.brand-mark { width: 38px; height: 38px; border-radius: 13px; box-shadow: 0 0 0 6px #6ee7b714; }
.brand-name { font-size: 19px; letter-spacing: .02em; }
.header-actions #refreshBtn { border-radius: 999px; padding: 8px 14px; background: var(--tint); color: var(--brand-text); }
.header-actions #openAccountBtn { border-radius: 999px; padding: 8px 12px; }

.desktop-nav {
  position: fixed;
  z-index: 19;
  left: 16px;
  top: 88px;
  bottom: 18px;
  width: 216px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-self: auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
}
.desktop-nav::before {
  content: "工作区";
  padding: 8px 12px 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.desktop-nav .nav-button {
  min-height: 48px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}
.desktop-nav .nav-button[aria-current=page] {
  color: var(--text);
  background: var(--tint);
}
.desktop-nav .nav-button[aria-current=page]:after { display: none; }
.desktop-nav .nav-count { margin-left: auto; background: var(--brand); color: var(--on-brand); }

.workspace {
  margin-left: 240px;
  padding: 30px 34px 46px;
  max-width: none;
}
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.library-toolbar { margin-bottom: 18px; }
.library-search { max-width: none; }
.search-field { min-height: 46px; padding: 0 14px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 88%, transparent); }
.search-field input { min-height: 42px; }
.catalog-controls { gap: 8px; }
.catalog-select select { border-radius: 10px; background: var(--panel); border-color: var(--line); min-height: 40px; }
.catalog-action { min-height: 40px; border-radius: 10px; }

.cards { gap: 24px 18px; }
.card { border-radius: 14px; transition: transform .18s ease, filter .18s ease; }
.poster { border-radius: 14px; box-shadow: 0 8px 22px #0004; }
.card-body { padding: 9px 4px 0; }
.card-title { font-size: 14px; }
.card .meta { color: var(--muted); }
.poster-badge { left: 11px; top: 11px; border-radius: 999px; background: #07130dbd; padding: 4px 8px; }
.poster-caption { padding: 34px 12px 11px; }
@media (hover:hover) { .card:hover { transform: translateY(-4px); } }

.following-list, .groups, .admin-card, .download-destination, .download-summary, .download-filters {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-radius: var(--radius);
}
.overview-page { max-width: 1180px; }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.overview-card { min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 92%, transparent); box-shadow: 0 12px 35px #0002; }
.overview-card strong { display: block; margin-top: 12px; font-size: 29px; letter-spacing: -.04em; color: var(--text); }
.overview-card p { margin-top: 7px; }
.overview-card-accent { background: linear-gradient(145deg, var(--tint), var(--panel)); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.overview-card-accent strong { color: var(--brand-text); }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 18px; }
.overview-panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 92%, transparent); }
.overview-panel h2 { font-size: 17px; }
.overview-panel .section-heading p { margin-top: 4px; }
.overview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.overview-actions button { min-height: 42px; }
.overview-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; }
.overview-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.overview-list li:last-child { border-bottom: 0; }
.overview-list strong { color: var(--text); }
.overview-watching { margin-top: 18px; }
.overview-secondary { margin-top: 18px; }
.overview-recent { margin-top: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.overview-recent-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border: 1px solid var(--line); background: var(--panel-elevated); min-height: 78px; overflow: hidden; }
.overview-recent-card img { width: 40px; height: 58px; object-fit: cover; border-radius: 6px; flex: none; }
.overview-recent-card span { min-width: 0; }
.overview-recent-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.overview-recent-card small { display: block; font-size: 11px; font-weight: 400; margin-top: 5px; }
.overview-watch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sync-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.emby-center { max-width: 1220px; }
.emby-center > .dialog-body { padding: 0; overflow: visible; }
.emby-center .notice, .emby-form, .emby-status, .source-performance { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--panel); margin-bottom: 18px; }
.emby-center .emby-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.emby-entry { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); }
.source-performance summary { cursor: pointer; font-weight: 650; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 28px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.following-row { padding: 16px 18px; }
.segments { padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.segments button { border-radius: 9px; border-bottom: 0; }
.segments button[aria-pressed=true] { background: var(--tint); }

.action-popover, dialog { border-color: var(--line); background: var(--panel-elevated); }
dialog::backdrop { background: #020806b8; backdrop-filter: blur(4px); }
button, input, select { border-radius: 10px; }
button { font-weight: 650; }
button.secondary { background: var(--panel-elevated); }
button.subtle { background: var(--tint); }
.toast { border-radius: 14px; background: var(--panel-elevated); }

@media (max-width: 1100px) and (min-width: 701px) {
  .app-header { padding-left: 240px; padding-right: 20px; }
  .desktop-nav { width: 196px; }
  .workspace { margin-left: 220px; padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 900px) and (min-width: 701px) { .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .desktop-nav { display: none; }
  .app-header { position: sticky; height: 58px; padding: 0 12px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .workspace { margin-left: 0; padding: 16px 14px 28px; }
  .page-heading h1 { font-size: 25px; }
  .cards { gap: 18px 12px; }
  .poster { border-radius: 11px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .overview-card { min-height: 108px; padding: 14px; }
  .overview-card strong { margin-top: 8px; font-size: 22px; }
  .overview-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sync-metrics { grid-template-columns: minmax(0, 1fr); }
  .emby-center .emby-entries { grid-template-columns: minmax(0, 1fr); }
  .library-pagination { flex-wrap: wrap; }
}

.settings-page { max-width: 1060px; }
.settings-page .settings-body, .settings-page .viewer-settings { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 20px; }
.settings-page h2 { font-size: 19px; margin: 26px 0 14px; }
.settings-sections { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.settings-page [id] { scroll-margin-top: 24px; }
.settings-page .playback-settings { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.cards.list-view { grid-template-columns: minmax(0,1fr); gap: 10px; }
.cards.list-view .card { display: grid; grid-template-columns: 70px minmax(0,1fr); height: 108px; border: 1px solid var(--line); background: var(--panel); gap: 16px; padding: 8px; border-radius: 12px; }
.cards.list-view .poster { height: 90px; aspect-ratio: auto; border-radius: 7px; box-shadow: none; }
.cards.list-view .poster-badge, .cards.list-view .poster-caption, .cards.list-view .poster-actions { display: none; }
.cards.list-view .card-body { padding: 8px 0; min-width: 0; }
.cards.list-view .card-title { font-size: 16px; -webkit-line-clamp: 1; }
.cards.list-view .card:hover { transform: none; }
.cards.list-view .card-actions { display: flex; }
.cards.list-view .select-marker { top: 4px; right: 4px; }
.group { overflow: hidden; }
.group-head { padding: 20px; }
.group-head > .progress { margin-top: 14px; }
.download-summary { overflow: hidden; margin: 18px 0; }
.summary-tile { padding: 20px; border-right: 1px solid var(--line); }
.summary-tile:last-child { border-right: 0; }
.group-actions { padding-top: 12px; }
.episode { background: color-mix(in srgb,var(--panel-elevated) 60%,var(--panel)); padding: 18px 20px; }
.detail-dialog { width: min(860px,calc(100vw - 32px)); }
.detail-top { gap: 28px; align-items: center; padding-bottom: 20px; }
.detail-cover { width: 176px; border-radius: 16px; overflow: hidden; }
.detail-top h1 { font-size: clamp(24px,3vw,34px); line-height: 1.25; }
.detail-actions { padding: 14px 0; gap: 10px; }
.detail-episodes { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 22px; }
.detail-episode-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(48px,1fr)); gap: 8px; margin: 16px 0; }
.detail-episode-grid .current { background: var(--tint); border-color: var(--brand); }
@media (min-width: 1000px) {
 .group-head { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 12px 24px; align-items: center; }
 .group-head > .progress { grid-column: 2; grid-row: 1; margin: 0; }
 .group-head > p.small { grid-column: 2; margin: 0; }
 .group-actions { grid-column: 1 / -1; border-top: 1px solid var(--line); }
 .episode { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:700px) {
 .settings-page .settings-body, .settings-page .viewer-settings { padding: 16px; }
 .settings-sections { gap: 2px; }
 .settings-sections button { padding: 8px 10px; }
 .detail-cover { width: 110px; }
 .detail-top { gap: 18px; }
 .group-head { padding: 16px; }
 .summary-tile { padding: 16px 12px; }
}


/* Adaptive media workspace with a record column and a settings column. */
.overview-page, .settings-page, .emby-center {max-width:none;width:100%;}
.workspace {padding:22px 26px 32px;}
.page-heading {margin-bottom:18px;}
.emby-center > .dialog-body {display:block;}
.emby-center .sync-metrics {margin-bottom:12px;}
.emby-center .sync-metrics .overview-card {min-height:108px;padding:16px;}
.emby-center .sync-metrics .overview-card strong {margin:8px 0;font-size:26px;}
.emby-columns {display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);gap:20px;align-items:start;}
.emby-records, .emby-controls {min-width:0;}
.emby-center .following-automation {display:grid;gap:10px;padding:16px;margin-bottom:12px;}
.emby-center .following-automation label {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.emby-center .following-automation input[type=number] {width:92px;}
.emby-center .following-automation p {margin:0;}
.emby-center .emby-form, .emby-center .emby-status {padding:16px;margin-bottom:12px;}
.emby-center .emby-form .settings-grid {gap:10px;}
.emby-center .emby-form .source-performance {padding:12px;margin:10px 0;}
.emby-center .emby-entries {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;}
.emby-center .emby-entry {padding:12px;}
#libraryBatchBar {position:sticky;bottom:12px;z-index:12;border:1px solid var(--line);box-shadow:0 6px 24px #0003;}
.source-current-results {display:grid;gap:6px;padding:12px;border:1px solid var(--line);border-radius:12px;}
@media(min-width:1600px){.emby-center .emby-entries{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1050px){.emby-columns{grid-template-columns:minmax(0,1fr);}.workspace{padding:16px;}}

/* Shared compact workspace: neutral surfaces and a warm primary action. */
:root,:root[data-theme=dark] {--bg:#17181c;--panel:#222329;--panel-elevated:#2a2b32;--soft:#303139;--text:#f4f4f5;--muted:#a3a3ad;--line:#383942;--line-strong:#575961;--brand:#ed8c42;--on-brand:#17110a;--brand-text:#f8af74;--tint:#3a2d24;--poster:#30313a;--poster-ink:#c0c1c9;--radius:12px;--control-radius:8px;--shadow:0 8px 28px #0002;}
:root[data-theme=light] {--bg:#f4f5f7;--panel:#fff;--panel-elevated:#fff;--soft:#eff0f3;--text:#252732;--muted:#717583;--line:#e2e4e9;--line-strong:#bfc3ce;--brand:#d9681d;--on-brand:#fff;--brand-text:#b75010;--tint:#fff0e4;--poster:#e7e9ef;--poster-ink:#777d8c;--shadow:0 4px 20px #26324b08;}
body {background:var(--bg);line-height:1.55;}
button,input,select {border-radius:8px;min-height:38px;}
button {font-weight:550;}
button.secondary,button.quiet {box-shadow:none;}
.app-header {height:64px;background:var(--panel);backdrop-filter:none;gap:18px;padding-right:24px;}
.brand-mark {box-shadow:none;border-radius:9px;background:var(--brand);color:var(--on-brand);}
.desktop-nav {left:0;top:64px;bottom:0;width:224px;border-radius:0;border:0;border-right:1px solid var(--line);box-shadow:none;background:var(--panel);padding:18px 12px;gap:4px;}
.desktop-nav::before {content:'媒体中心';letter-spacing:0;padding-bottom:12px;}
.desktop-nav .nav-button {min-height:44px;border-radius:8px;font-weight:500;}
.desktop-nav .nav-button[aria-current=page] {color:var(--brand-text);font-weight:650;}
.workspace {margin-left:224px;padding:24px;}
.page-heading {margin-bottom:18px;align-items:center;}
.page-heading h1 {font-size:26px;letter-spacing:-.03em;}
.page-heading p {font-size:13px;margin-top:4px;}
.library-toolbar,.download-filters {background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px;}
.search-field {border-radius:8px;background:var(--bg);min-height:40px;}
.catalog-controls {margin-top:10px;gap:8px;}
.library-advanced {font-size:12px;color:var(--muted);margin:10px 0;}
.library-advanced>summary {cursor:pointer;display:inline-block;padding:6px 0;}
.library-advanced[open] {padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:8px;}
.library-advanced p {margin:4px 0 10px;}
.catalog-heading {align-items:center;gap:12px;flex-wrap:wrap;}
.cards {gap:18px 14px;}
.card {border-radius:10px;}
.poster {border-radius:10px;box-shadow:none;}
.card-body {padding:9px 2px 0;}
@media (hover:hover) {.card:hover {transform:none;filter:brightness(1.04);}}
.overview-card {min-height:105px;padding:16px;box-shadow:none;background:var(--panel);}
.overview-card-accent {background:var(--panel);}
.overview-card strong {font-size:25px;margin-top:8px;}
.overview-panel {padding:16px;}
.overview-watching {margin:0 0 16px;}
.overview-columns {grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;}
.overview-grid {gap:12px;}
.emby-tabs {display:inline-flex;margin-bottom:16px;gap:4px;}
.emby-columns {display:block;}
.emby-controls {width:100%;}
.emby-center .emby-form {width:100%;max-width:none;}
.emby-center .emby-form .settings-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
.emby-center .emby-entries {grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:12px;}
.emby-entry>strong,.emby-entry>span {display:block;overflow-wrap:anywhere;}
.emby-center .emby-status {min-height:110px;}
.following-toolbar {margin-bottom:12px;gap:12px;}
.following-row {padding:14px 16px;gap:14px;}
.following-actions {display:flex;align-items:center;gap:8px;}
.following-title {font-weight:600;}
.following-update {color:var(--brand-text);font-size:12px;margin:6px 0;}
.following-list {overflow:visible;}
.group {overflow:visible;}
.group-head {padding:16px;}
.group-heading {gap:12px;min-width:0;}
.download-poster {width:48px;height:70px;border-radius:6px;object-fit:cover;flex:none;}
.group-title {font-size:17px;overflow-wrap:anywhere;}
.episode {padding:12px 16px;}
.action-popover[popover] {margin:0;inset:auto;z-index:1000;min-width:200px;border:1px solid var(--line);border-radius:10px;padding:6px;box-shadow:0 12px 36px #0003;}
.action-popover[popover]:popover-open {display:grid;}
.action-menu>summary {list-style:none;cursor:pointer;}
.action-menu>summary::-webkit-details-marker {display:none;}
.action-popover button {text-align:left;padding:10px 12px;border:0;width:100%;background:transparent;}
.action-popover button:hover {background:var(--soft);}
.settings-page .settings-body,.settings-page .viewer-settings {padding:20px;margin-bottom:16px;}
.settings-page h2 {margin:0 0 14px;font-size:20px;}
.settings-page .playback-settings {margin:0;}
.settings-sections {padding:6px;border-radius:10px;gap:4px;}
.settings-sections [aria-pressed=true] {background:var(--tint);color:var(--brand-text);}
.settings-grid {gap:16px;}
.settings-grid label {font-weight:500;}
.settings-page .toolbar {margin-top:18px;}
.detail-cover {border-radius:10px;}
.detail-top h1 {font-size:26px;}
.detail-dialog .dialog-body {padding:24px;}
.account-page {display:flex;flex-direction:column;justify-content:center;padding:32px 16px;background:var(--bg);}
.account-page .app-header {padding:0;margin:0 0 24px;height:42px;}
.account-page #accountPanel {width:min(420px,100%);margin:0 auto;border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 40px #0001;}
.account-page #accountPanel .dialog-heading {padding:26px 28px 0;background:transparent;border-bottom:0;}
.account-page #accountPanel .dialog-heading h2 {font-size:23px;}
.account-page #accountPanel .dialog-body {padding:16px 28px 28px;}
.account-intro {margin:0 0 20px;color:var(--muted);}
.account-form {gap:16px;}
.account-form label {font-size:13px;gap:7px;}
.account-form input {min-height:44px;background:var(--bg);}
.account-form #accountSubmitBtn {justify-self:stretch;width:100%;min-height:44px;margin-top:4px;}
.account-tabs {margin-bottom:18px;}
[hidden] {display:none!important;}
@media(min-width:1800px) {.workspace {padding:26px 32px;}.cards {gap:22px 18px;}}
@media(max-width:1100px) and (min-width:701px) {.desktop-nav {width:190px;}.workspace {margin-left:190px;padding:20px;}.app-header {padding-left:210px;}}
@media(max-width:900px) {.following-toolbar {flex-wrap:wrap;}.following-toolbar .segments {max-width:100%;overflow-x:auto;white-space:nowrap;}}
@media(max-width:700px) {.app-header {height:58px;padding:0 14px;}.workspace {margin-left:0;padding:16px 12px 90px;}.page-heading h1 {font-size:23px;}.page-heading {gap:12px;}.cards {gap:16px 10px;}.library-toolbar {padding:10px;}.catalog-controls {gap:6px;}.catalog-select {flex:1;min-width:110px;}.catalog-select select {width:100%;}.following-row {display:grid;grid-template-columns:48px minmax(0,1fr);padding:12px;gap:10px;}.following-cover {width:48px;}.following-actions {grid-column:2;justify-content:flex-start;flex-wrap:wrap;}.settings-page .settings-body,.settings-page .viewer-settings {padding:16px;}.settings-grid,.emby-center .emby-form .settings-grid {grid-template-columns:minmax(0,1fr);}.emby-form .settings-grid .wide {grid-column:auto;}.sync-metrics {grid-template-columns:minmax(0,1fr);gap:10px;}.overview-watch-row {gap:10px;}.overview-watch-row strong {font-size:13px;min-width:0;overflow-wrap:anywhere;}.group-head {padding:12px;}.detail-dialog .dialog-body {padding:16px;}.detail-top h1 {font-size:22px;}.account-page {padding:24px 16px;}.account-page #accountPanel .dialog-body {padding:16px 24px 24px;}}
@media(max-width:700px) {
  .following-row .following-actions {flex-direction:row;align-items:center;justify-content:flex-start;}
  .following-row .following-actions > button:first-child {margin-right:4px;}
}

.account-page .desktop-nav,.account-page .mobile-nav {display:none!important;}

/* File management: readable text, one title per row, bounded record controls. */
:root[data-theme=light]{--muted:#4c6056;--poster-ink:#405a4a;--danger:#a42632;--danger-bg:#fce8eb;--success:#17613d;--success-bg:#e1f3e8;--warning:#85530b;--warning-bg:#fff1d5;}
:root[data-theme=dark]{--muted:#b3c5bb;--poster-ink:#b8d1c3;}
body{color:var(--text)}
.small,.statusbar,.download-destination,.history-meta,.settings-page label,.settings-page p,.page-heading p{color:var(--muted);opacity:1}
input,select,textarea{color:var(--text);background:var(--panel)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
.quiet,.secondary,.subtle,.action-menu>summary,.action-popover button{color:var(--text)}
button.danger,.error,.action-popover .danger{color:var(--danger)}
button:disabled{opacity:.65}
.record-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 0;margin:0 0 8px}
.record-pagination select{width:auto;min-width:110px}.record-pagination input{width:64px}
.emby-center .emby-entries{display:flex;flex-direction:column;gap:8px;width:100%}
.emby-center .emby-entry{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px 16px;width:100%}
.emby-entry-description{min-width:0}.emby-entry-description strong{color:var(--text)}
.emby-entry-description p{margin:4px 0;overflow-wrap:anywhere}
#mediaDeletePanel{width:min(580px,calc(100vw - 24px));padding:24px;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:16px}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#mediaDeleteContent .playback-option{margin:16px 0;align-items:flex-start}
#mediaDeleteJobs:empty{display:none}.help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.help-grid article{padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.help-grid h2{font-size:17px;margin:0 0 12px}.help-grid p{line-height:1.8;color:var(--muted)}
.source-status-row{padding:16px 0;border-bottom:1px solid var(--line)}
@media(max-width:700px){.help-grid{grid-template-columns:1fr}.mobile-nav{display:flex;overflow-x:auto;justify-content:flex-start;gap:0}.mobile-nav .nav-button{flex:0 0 64px;min-width:64px}.record-pagination{gap:5px}.emby-center .emby-entry{padding:12px;gap:8px}.record-pagination button{padding:8px}.settings-sections{flex-wrap:wrap}}
button.danger{background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger)}
button.danger:hover{filter:brightness(.96)}

/* Shared paged lists use the page's scroll surface. */
.emby-center .emby-entries{max-height:none;overflow:visible;display:flex}
.emby-center .emby-entry{background:var(--panel);border:1px solid var(--line);border-radius:12px;grid-template-columns:20px 52px minmax(0,1fr) auto}
.emby-cover{width:48px;height:64px;object-fit:cover;border-radius:6px;background:var(--panel)}
.following-row.with-selection{grid-template-columns:20px 52px minmax(0,1fr) auto}
.following-row.with-selection>input{width:18px;accent-color:var(--accent)}
.directory-preview{display:block;margin-top:10px;overflow-wrap:anywhere}
#backgroundTasksPanel,#residualPanel{width:min(820px,calc(100vw - 24px));padding:24px;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:16px}
.background-job{padding:14px 0;border-bottom:1px solid var(--line)}.background-job summary{cursor:pointer;color:var(--muted)}.background-job p{overflow-wrap:anywhere}
#accountSettings #adminPanel{padding:0}#accountSettings .admin-card{margin:0 0 14px}
@media(max-width:700px){.following-row.with-selection{grid-template-columns:20px 48px minmax(0,1fr)}.following-row.with-selection .following-actions{grid-column:3}.emby-center .emby-entry{grid-template-columns:20px 40px minmax(0,1fr)}.emby-cover{width:38px;height:52px}.emby-center .emby-entry>button{grid-column:3}}

.following-batch-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}
.following-batch-toolbar .account-check{display:inline-flex;align-items:center;gap:7px;margin:0;white-space:nowrap}
.following-batch-toolbar .account-check input{width:16px;height:16px;margin:0}
#followingBatchBar{margin:12px 0;padding:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%}
#followingBatchBar select{width:auto;min-width:180px}.following-row.with-selection{display:grid}
.emby-cover-fallback{display:flex;align-items:center;justify-content:center;color:var(--muted);background:var(--bg)}
@media(max-width:700px){#followingBatchBar select{width:100%}.following-batch-toolbar{gap:8px}#backgroundTasksPanel,#residualPanel{padding:16px}}
