/* ViewFile V5: shared console rhythm, with a warm identity for the library. */
:root {
  --background:#10141e; --card:#191f2c; --popover:#222a3a;
  --muted-surface:#2c3547; --foreground:#eef2fa; --muted-foreground:#a9b4c8;
  --muted:#a9b4c8; --subtle:#9aa7be; --border:#ffffff14; --input:#ffffff29;
  --accent:#b8a9ff; --accent-hover:#cbbfff; --accent-text:#c7bbff;
  --accent-ink:#211a38; --accent-soft:#b8a9ff12; --accent-glow:#b8a9ff25;
  --file-accent:#e7b58b; --file-soft:#e7b58b12; --secondary-accent:#7bd8df;
  --good:#76dfb5; --good-bg:#76dfb512; --warning:#efc28b; --warning-bg:#efc28b12;
  --danger:#ffaaa8; --danger-bg:#ffaaa810; --radius:20px;
  --surface-shadow:0 4px 16px -12px #03061080;
  --vf-ease:cubic-bezier(.2,.8,.2,1); --vf-fast:160ms; --vf-motion:220ms;
  --tv-focus:#c7bbff;
  /* Existing media/work modules use these names for the same surfaces. */
  --surface:var(--card); --surface2:var(--popover); --line:var(--border);
  --bg:var(--background); --panel:var(--card); --text:var(--foreground); --ink:var(--foreground);
  --sports-accent:var(--good); --sports-soft:var(--good-bg);
}
:root[data-theme=light] {
  --background:#f5f4f0; --card:#fffefd; --popover:#eeede8; --muted-surface:#e7e6e1;
  --foreground:#242c3b; --muted-foreground:#5d6472; --muted:#5d6472; --subtle:#616979;
  --border:#242c3b14; --input:#242c3b30; --accent:#6d55b4; --accent-hover:#5c459e;
  --accent-text:#6d55b4; --accent-ink:#fffefd; --accent-soft:#6d55b40c;
  --accent-glow:#6d55b422; --file-accent:#966236; --file-soft:#b8834010;
  --secondary-accent:#227780; --good:#177653; --good-bg:#1776530b;
  --warning:#865d22; --warning-bg:#865d220c; --danger:#b34749; --danger-bg:#b347490c;
  --surface-shadow:0 4px 18px -14px #242c3b45; --tv-focus:#6d55b4;
}
html { background:var(--background); scroll-padding-block:24px; }
body { color:var(--foreground); background:var(--background); line-height:1.65; }
body :is(button,input,select,textarea) { font-family:inherit; }
body button { min-height:44px; }
body :is(button,a,input,select,textarea):focus-visible {
  outline:2px solid var(--accent); outline-offset:4px;
}
body ::selection { color:var(--foreground); background:color-mix(in srgb,var(--accent) 25%,var(--background)); }
body :is(h1,h2,h3,h4) { text-wrap:balance; }
body h1 { font-weight:620; letter-spacing:-.045em; line-height:1.18; font-size:clamp(29px,2.65vw,40px); }
body h2 { letter-spacing:-.025em; line-height:1.35; }
body :is(.btn,.iconbtn,.close,.theme-choice,.library-shortcut,.filetile,.stream-service) {
  transition:transform var(--vf-fast) var(--vf-ease),opacity var(--vf-fast),background-color var(--vf-fast),border-color var(--vf-fast),box-shadow var(--vf-fast);
}
body .btn { border-radius:14px; min-height:46px; padding:12px 18px; font-size:13px; font-weight:620; gap:9px; }
body .btn:not(.secondary):not(.danger) { background:var(--accent); color:var(--accent-ink); border-color:transparent; box-shadow:0 3px 12px -7px var(--accent-glow); }
body .btn:not(.secondary):not(.danger):hover { background:var(--accent-hover); }
body :is(.btn.secondary,.iconbtn,.close) { background:var(--popover); color:var(--foreground); border:1px solid var(--input); box-shadow:none; }
body :is(.btn.secondary,.iconbtn,.close):hover { background:var(--muted-surface); border-color:color-mix(in srgb,var(--accent) 40%,var(--input)); }
body :is(.btn,.iconbtn,.close,.theme-choice):active:not(:disabled) { transform:translateY(1px) scale(.985); }
body :is(.iconbtn,.close) { width:44px; height:44px; min-width:44px; border-radius:14px; display:inline-grid; place-items:center; padding:0; }
body .close svg { width:20px; height:20px; }
body button:disabled { opacity:.46; cursor:not-allowed; transform:none; }
body button[aria-busy=true] { cursor:wait; opacity:.8; }
body .btn[aria-busy=true]::after { content:''; display:block; width:15px; height:15px; flex:0 0 15px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:vf-spin .85s linear infinite; }
body :is(input:not([type=checkbox]):not([type=file]):not([type=range]),select,textarea) {
  min-height:46px; border-radius:14px; background:var(--background); color:var(--foreground); border-color:var(--input); padding:12px 14px;
}
body :is(input,textarea)::placeholder { color:var(--subtle); opacity:1; }
body :is(input,select,textarea):focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
body input[type=checkbox] { accent-color:var(--accent); }
body label { line-height:1.5; }
body .actions { gap:12px; }
body .card { border-radius:20px; padding:26px; background:var(--card); border-color:var(--border); box-shadow:var(--surface-shadow); }
body .shell { grid-template-columns:260px minmax(0,1fr); }
body .shell .sidebar {
  width:260px; padding:24px 16px 20px; gap:24px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--card) 65%,var(--background)),var(--background));
  border-color:var(--border);
}
body .sidebar .brand { padding:0 10px; gap:12px; min-height:48px; font-size:25px; }
body .sidebar .brand img { width:44px; height:44px; }
.brand-label { display:flex; flex-direction:column; line-height:1.15; }
.brand-label small { margin-top:7px; font-size:8px; font-weight:650; letter-spacing:.17em; color:var(--subtle); }
body .sidebar nav { gap:6px; padding:5px; margin:-5px; }
body .sidebar .nav { min-height:46px; padding:12px 14px; border:1px solid transparent; border-radius:13px; gap:12px; font-weight:500; }
body .sidebar .nav.active { color:var(--accent-text); background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 18%,transparent); box-shadow:none; }
body .sidebar .nav.active::after { content:''; width:5px; height:5px; margin-left:auto; border-radius:50%; background:var(--accent); }
body .sidebar .library-toggle { min-height:46px; padding:12px 14px; border-radius:13px; }
body .sidebar .library-toggle strong { font-size:13px; font-weight:620; }
body .sidebar .library-navigation.is-current>.library-toggle { color:var(--file-accent); }
body .sidebar .library-toggle[aria-expanded=false] { background:var(--card); border:1px solid var(--border); }
body .sidebar .library-links { gap:5px; padding-top:6px; }
body .sidebar .library-links .nav { padding-left:18px; }
body .sidebar .navgroup { margin:22px 0 9px; color:var(--subtle); font-size:9px; letter-spacing:.15em; }
body .sidebar .storage-mini { border-radius:17px; background:var(--card); padding:16px; font-size:12px; }
body .storage-mini>strong { font-size:13px; font-weight:620; }
body .storage-mini small { display:block; margin-top:7px; font-size:10px; line-height:1.65; }
body .storage-mini .bar { height:4px; margin:13px 0; background:var(--muted-surface); }
body .storage-mini .bar i { background:linear-gradient(90deg,var(--accent),var(--secondary-accent)); }
body .shell .topbar { height:80px; padding-inline:clamp(28px,3.5vw,56px); background:var(--background); border-color:var(--border); position:relative; }
body .topbar>div { gap:12px; min-width:0; }
body .topbar>div:first-child>.muted { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body .topbar .online { font-size:11px; color:var(--muted-foreground); margin-right:5px; }
body .shell .content { max-width:1840px; padding:44px clamp(28px,3.5vw,56px) 72px; }
body .shell .pagehead { gap:24px; margin-bottom:30px; }
body .pagehead h1 { margin:8px 0 12px; }
body .pagehead p { max-width:620px; line-height:1.7; font-size:13px; }
body .pagehead .eyebrow { font-size:9px; color:var(--file-accent); letter-spacing:.15em; }
body .metricgrid { grid-template-columns:1.3fr 1fr 1fr; gap:16px; }
body .metricgrid .metric { min-height:142px; padding:22px 24px; border-radius:20px; }
body .metricgrid .metric:first-child { background:linear-gradient(125deg,var(--file-soft),transparent 72%),var(--card); }
body .metricgrid .metric>svg { color:var(--file-accent); width:20px; height:20px; right:22px; top:23px; }
body .metricgrid .metric>.muted { font-size:11px; }
body .metricgrid .value { margin:20px 0 8px; font-size:29px; font-weight:600; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
body .metricgrid .metric small { line-height:1.6; font-size:10px; }
.library-summary { border:1px solid var(--border); background:var(--card); border-radius:18px; margin-bottom:20px; }
.library-summary>summary { min-height:62px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 20px; list-style:none; color:var(--muted-foreground); }
.library-summary>summary::-webkit-details-marker { display:none; }
.library-summary>summary>span { display:flex; align-items:center; gap:10px; min-width:0; }
.library-summary>summary>span>svg:first-child { width:18px; height:18px; color:var(--file-accent); }
.library-summary>summary strong { font-size:12px; font-weight:550; color:var(--muted-foreground); }
.library-summary>summary b { font-size:13px; font-weight:600; color:var(--foreground); font-variant-numeric:tabular-nums; }
.library-summary>summary small { color:var(--subtle); font-size:10px; font-weight:400; }
.library-summary>summary>span:last-child>svg { width:16px; height:16px; color:var(--subtle); transition:transform var(--vf-fast); }
.library-summary[open]>summary>span:last-child>svg { transform:rotate(90deg); }
.library-summary>summary:hover { color:var(--foreground); background:var(--accent-soft); border-radius:17px; }
.library-summary>.metricgrid { padding:0 14px 14px; }
.library-summary .metricgrid .metric { background:var(--background); box-shadow:none; }
body .library-shortcuts { gap:12px; margin:20px 0; }
body .library-shortcut { min-height:68px; gap:12px; padding:12px 16px; border-radius:17px; border-color:var(--border); font-size:12px; background:var(--card); }
body .library-shortcut>svg { box-sizing:content-box; width:18px; height:18px; padding:8px; background:var(--file-soft); color:var(--file-accent); border-radius:11px; }
body .library-shortcut[data-nav=photo]>svg { color:var(--good); background:var(--good-bg); }
body .library-shortcut[data-nav=video]>svg { color:var(--accent-text); background:var(--accent-soft); }
body .library-shortcut[data-nav=audio]>svg { color:var(--secondary-accent); background:color-mix(in srgb,var(--secondary-accent) 8%,transparent); }
body .library-shortcut>span { color:var(--subtle); font-size:16px; }
body .library-shortcut:hover { background:var(--popover); border-color:var(--input); transform:translateY(-2px); }
body .upload-dropzone { display:flex; flex-direction:row; align-items:center; justify-content:center; gap:16px; padding:17px 22px; margin:22px 0 26px; border:1px dashed color-mix(in srgb,var(--file-accent) 38%,var(--border)); border-radius:20px; background:var(--file-soft); text-align:left; }
body .upload-dropzone .upload-dropzone-icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; background:var(--card); color:var(--file-accent); border:1px solid var(--border); border-radius:13px; opacity:1; }
body .upload-dropzone .upload-dropzone-copy { display:flex; flex-direction:column; gap:3px; opacity:1; }
body .upload-dropzone strong { font-size:13px; font-weight:600; color:var(--foreground); }
body .upload-dropzone small { font-size:11px; color:var(--muted-foreground); }
body .upload-dropzone:hover { border-color:var(--file-accent); background:color-mix(in srgb,var(--file-accent) 8%,var(--card)); }
body .toolbar { display:grid; grid-template-columns:minmax(160px,1fr) minmax(170px,235px) auto; gap:14px; align-items:center; margin:26px 0 12px; }
body .toolbar .search { min-width:0; max-width:none; }
body .toolbar .search svg { width:18px; height:18px; left:15px; top:14px; color:var(--subtle); }
body .shell .toolbar .search input { padding-left:44px; font-size:13px; }
body .format-filter { min-width:0; gap:9px; font-size:11px; }
body .format-filter select { min-width:0; font-size:12px; padding-inline:12px; }
body .toolbar .viewcontrols { margin:0; gap:7px; }
body .toolbar .viewcontrols .iconbtn { width:44px; height:44px; min-width:44px; background:var(--card); }
body .breadcrumbs { margin:0 0 17px; padding-bottom:14px; gap:6px; border-bottom:1px solid var(--border); }
body .breadcrumbs button { padding:6px 8px; min-height:44px; max-width:min(230px,65vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:10px; color:var(--muted-foreground); font-size:12px; }
body .breadcrumbs button:hover { color:var(--foreground); background:var(--card); }
body .breadcrumbs button[aria-current=page] { color:var(--foreground); font-weight:600; }
body .breadcrumbs>span { color:var(--subtle); padding-inline:2px; }
.library-results { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
.library-results h2 { margin:0; font-size:15px; font-weight:600; text-wrap:pretty; overflow-wrap:anywhere; }
.file-count { color:var(--muted-foreground); font-size:11px; flex-shrink:0; font-variant-numeric:tabular-nums; }
body .filegrid { grid-template-columns:repeat(auto-fill,minmax(182px,1fr)); gap:18px; }
body .filetile { border-radius:20px; border-color:var(--border); box-shadow:var(--surface-shadow); background:var(--card); isolation:isolate; }
body .filetile.selected { background:var(--accent-soft); border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
body .filetile .file-open { padding:42px 15px 20px; min-width:0; }
body .file-art { position:relative; isolation:isolate; height:122px; margin:0 0 17px; border-radius:14px; overflow:hidden; color:var(--file-accent); background:linear-gradient(145deg,var(--file-soft),color-mix(in srgb,var(--card) 70%,var(--background))); }
body .file-art>svg { width:48px; height:48px; stroke-width:1.25; filter:drop-shadow(0 6px 9px #0000000d); }
body .file-art.folder { color:var(--file-accent); background:linear-gradient(145deg,color-mix(in srgb,var(--file-accent) 12%,transparent),var(--file-soft)); }
body .file-art.photo { color:var(--good); background:linear-gradient(145deg,var(--good-bg),var(--popover)); }
body .file-art.video { color:var(--accent-text); background:linear-gradient(145deg,var(--accent-soft),var(--popover)); }
body .file-art.audio { color:var(--secondary-accent); background:color-mix(in srgb,var(--secondary-accent) 7%,var(--card)); }
body .file-art.zip { color:var(--file-accent); background:var(--file-soft); }
body .file-art[data-format=PDF] { color:var(--danger); background:var(--danger-bg); }
body .file-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; z-index:1; }
.file-type-badge { position:absolute; bottom:9px; right:9px; z-index:2; border:1px solid var(--border); border-radius:6px; background:var(--card); color:var(--muted-foreground); font-size:8px; font-weight:650; line-height:1.6; letter-spacing:.04em; padding:2px 6px; }
body .filetile .file-open strong { font-size:13px; font-weight:590; line-height:1.5; }
body .filetile .file-open small { color:var(--muted-foreground); font-size:11px; margin-top:5px; }
body .filetile .pick { inset:0 auto auto 0; width:44px; height:44px; }
body .filetile .pick input { width:17px; height:17px; min-height:17px; }
body .filetile .more { width:44px; height:44px; min-width:44px; top:0; right:0; border-radius:0 18px 0 13px; color:var(--muted-foreground); }
body .filetile .more svg { width:19px; height:19px; }
body .filetile .more:hover { background:var(--popover); color:var(--foreground); }
body .filetile.is-common { border-color:color-mix(in srgb,var(--good) 55%,var(--border)); }
body .filetile.is-common .file-art { color:var(--good); background:var(--good-bg); }
body .filetile.is-common .file-type-badge { color:var(--good); border-color:color-mix(in srgb,var(--good) 25%,var(--border)); }
body .listview { gap:8px; }
body .listview .filetile { display:grid; grid-template-columns:48px minmax(0,1fr) 48px; border-radius:15px; }
body .listview .file-open { flex-direction:row; gap:16px; align-items:center; padding:14px 10px; min-height:76px; }
body .listview .file-art { width:42px; height:42px; flex:0 0 42px; border-radius:10px; margin:0; }
body .listview .file-art>svg { width:24px; height:24px; }
body .listview .file-type-badge { display:none; }
body .listview .file-open strong { flex:1; }
body .listview .file-open small { min-width:90px; margin:0; font-size:11px; text-align:right; }
body .listview .pick { position:static; width:48px; height:48px; }
body .listview .more { position:static; width:48px; height:48px; min-width:48px; border-radius:12px; }
body .selectionbar { gap:10px; padding:14px; border-radius:20px; bottom:max(20px,env(safe-area-inset-bottom)); color:var(--foreground); background:var(--popover); border:1px solid var(--input); box-shadow:0 14px 48px #03061035; }
body .selectionbar>strong { font-size:12px; padding-inline:5px; }
body .selectionbar .btn { background:var(--card); }
body .selectionbar [data-action=delete] { color:var(--danger); }
body .security-note { gap:10px; margin:24px 0 0; font-size:10px; color:var(--muted-foreground); }
body .security-note svg { width:17px; height:17px; color:var(--good); }
body .shell footer { display:flex; align-items:center; gap:10px; margin-top:40px; padding-top:20px; border-top:1px solid var(--border); font-size:10px; color:var(--subtle); }
body .empty { padding:52px 24px; border-radius:20px; background:var(--card); border-color:var(--input); }
body .empty>svg { background:var(--file-soft); color:var(--file-accent); border-radius:17px; border-color:var(--border); }
body .empty h2 { font-size:20px; margin-top:14px; }
body .empty p { line-height:1.8; font-size:13px; }
body :is(.notice,.formerror,.media-error,.optimize-error,.vf-recording-error,.vf-download-error) { overflow-wrap:anywhere; }
body .notice { padding:18px 20px; border-radius:16px; background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 25%,var(--border)); }
body .notice:empty { display:none; }
body .share-row { padding:22px; gap:18px; border:1px solid var(--border); background:var(--card); border-radius:20px; }
body .share-row small { display:block; margin-top:7px; }
body .users-panel { display:grid; gap:18px; }
body .users-panel > p { margin:0; }
body .users-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:18px; }
body .users-grid:empty { display:none; }
body .two-col { gap:20px; }
body .user-card header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; }
body .user-card header h2 { margin:0; font-size:21px; }
body .user-card dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,auto); gap:8px 16px; align-items:baseline; font-size:13px; line-height:1.5; padding-block:16px; border-block:1px solid var(--border); }
body .user-card dl dt { color:var(--muted-foreground); }
body .user-card dl dd { margin:0; text-align:end; font-variant-numeric:tabular-nums; }
body .user-card > .actions { margin-top:14px; }
body .user-common > h2 { margin-top:0; }
body .user-common { border-color:color-mix(in srgb,var(--good) 36%,var(--border)); background:linear-gradient(140deg,var(--good-bg),transparent 70%),var(--card); }
body .shell .workspace-picker { display:flex; gap:12px; margin-bottom:24px; font-size:12px; }
body .shell .workspace-picker select { width:auto; min-height:44px; }

#file-actions-menu {
  position:fixed; z-index:60; width:min(270px,calc(100vw - 16px)); max-height:calc(100dvh - 16px);
  padding:10px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--input);
  border-radius:16px; background:var(--card); color:var(--foreground); box-shadow:0 12px 40px #0005;
}
#file-actions-menu[hidden] { display:none; }
#file-actions-menu header { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 8px; padding:0 2px 8px; }
#file-actions-menu header strong { overflow-wrap:anywhere; line-height:1.3; }
#file-actions-menu header small { grid-column:1/-1; color:var(--muted-foreground); }
#file-actions-menu .file-menu-buttons { display:grid; gap:3px; }
#file-actions-menu .btn { justify-content:flex-start; min-width:0; width:100%; text-align:start; background:transparent; border-color:transparent; }
#file-actions-menu .btn:is(:hover,:focus-visible) { background:var(--popover); border-color:var(--input); }
body .clipboard-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px 0; padding:12px; border:1px solid var(--input); border-radius:14px; background:var(--card); }
body .clipboard-bar > span { flex:1 1 130px; color:var(--muted-foreground); }
body .transfer-capacity { margin:0; font-variant-numeric:tabular-nums; }
body .transfer-capacity[data-insufficient="true"] { color:var(--danger); }
body .transfer-row .transfer-amount { gap:6px 14px; align-items:baseline; }
body .transfer-eta { color:var(--muted-foreground); font-variant-numeric:tabular-nums; }
body .transfer-chart-axis { font-variant-numeric:tabular-nums; }
body :is(.compress-job,.optimize-job,.vf-recording-job,.vf-download-job,.ve-job,.up-job,.transfer-row) { border-radius:18px; border-color:var(--border); background:var(--card); padding:22px; }
body :is(.compress-job-head,.vf-download-job-head,.ve-job-phase,.optimize-job>header,.vf-recording-job>header) { gap:16px; }
body :is(.compress-job,.optimize-job,.vf-recording-job,.vf-download-job,.ve-job,.up-job) .actions { gap:10px; }
body :is(.compress-source,.optimize-source,.ve-library-item) { border-radius:13px; min-height:60px; }
body :is(.compress-picker,.optimize-picker,.ve-library) { background:var(--card); border-color:var(--border); }
body :is(.compress-workspace,.ve-workspace,.optimize-workspace) { gap:24px; }
body .compress-intro { flex-wrap:wrap; gap:12px; }
body .compress-intro h2 { margin-right:auto; }
body :is(.work-tracking,.ve-job-metrics,.vf-recording-metrics,.up-job-metrics,.optimize-metrics) { border-radius:14px; font-variant-numeric:tabular-nums; }
body :is(.work-track-bar,.compress-progress,.vf-download-progress,.ve-progress) { overflow:hidden; border-radius:8px; }
body :is(.work-track-bar,.compress-progress,.vf-download-progress,.ve-progress)>i { background:linear-gradient(90deg,var(--accent),var(--secondary-accent)); }
body :is(.compress-profile,.up-target,.ve-modes button,.vf-recording-tabs button,.vf-recording-timing button) { border-radius:13px; min-height:46px; }
body .ve-segment-actions button { min-height:44px; padding:10px 12px; }
body .ve-segment-fields { grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr) 44px; gap:8px; }
body .ve-segment-fields>.iconbtn,body .ve-join-order button { min-width:44px; width:44px; min-height:44px; }
body .stream-hub .stream-service { border-radius:20px; box-shadow:var(--surface-shadow); }
body .stream-hub .stream-service>svg:first-child { width:38px; height:38px; flex-basis:38px; }
body .stream-hub .stream-service strong { font-weight:600; }
body .stream-hub .stream-service-go { margin-top:4px; }
body :is(.stream-status,.vpn-telemetry,.calendar-event,.sports-channel) { border-radius:20px; }
body :is(.calendar-days,.calendar-sports,.sports-provider-tabs) { gap:8px; padding-block:5px 10px; }
body :is(.calendar-days,.calendar-sports,.sports-provider-tabs) button { min-height:44px; border-radius:12px; }
body .calendar-event-content { padding:24px; }
body .calendar-event-footer { gap:12px; }
body .sports-grid { gap:20px; }
body .sports-channel { border-color:var(--border); box-shadow:var(--surface-shadow); }
body .sports-channel-copy { padding-block:4px; }
body .sports-channel h3 { letter-spacing:-.025em; font-weight:610; }
body .sports-logo img { object-fit:contain; }
body dialog:not(#viewer) { border-radius:24px; padding:28px; background:var(--card); border-color:var(--input); max-height:calc(100dvh - 40px); box-shadow:0 24px 90px #03061070; scrollbar-width:thin; }
body dialog:not(#viewer):is(.ve-dialog,.vf-recordings-dialog,.vf-downloads-dialog,.optimization-dialog) { padding:0; }
body dialog::backdrop { background:#070c18a8; backdrop-filter:blur(6px); }
body dialog[open]:not(#viewer) { animation:vf-dialog-in 180ms var(--vf-ease); }
body .modalhead { gap:18px; align-items:center; margin-bottom:22px; }
body .modalhead h2 { font-size:22px; overflow-wrap:anywhere; }
body .modalbody label { margin-block:20px; }
body .formactions { gap:12px; padding-top:22px; border-top:1px solid var(--border); margin-top:24px; }
body .metadata { gap:14px 22px; font-size:13px; line-height:1.75; padding-block:12px; }
body .metadata dt { color:var(--muted-foreground); }
body :is(.ve-head,.vf-recordings-head,.vf-download-header,.optimize-dialog-head,.archive-dialog>header) { gap:16px; padding-bottom:22px; border-bottom-color:var(--border); }
body :is(.ve-head,.vf-recordings-head,.vf-download-header,.optimize-dialog-head,.archive-dialog>header) h2 { letter-spacing:-.035em; font-size:24px; line-height:1.35; }
body :is(.ve-body,.vf-recordings-body,.vf-download-body,.optimize-dialog-content) { scrollbar-width:thin; }
body :is(.optimize-close,.vf-recordings-head .iconbtn,.vf-download-header .iconbtn) { min-width:44px; width:44px; height:44px; border-radius:13px; }
body .archive-list { border-color:var(--border); background:var(--background); border-radius:16px; padding:10px 18px; }
body .archive-entry { gap:12px; min-height:52px; border-color:var(--border); font-size:12px; }
body .archive-entry>span:first-child { color:var(--file-accent); }
body .archive-extract { padding-top:24px; }
body .archive-extract h3 { font-size:17px; margin-bottom:10px; }
body #viewer[open]:not(.vp-dialog) { display:flex; flex-direction:column; background:#0c111c; }
body #viewer:not(.vp-dialog) .viewerbar { min-height:80px; height:auto; flex:0 0 auto; padding:16px 24px; background:var(--card); border-color:var(--border); }
body #viewer:not(.vp-dialog) .viewerbar strong { color:var(--foreground); font-size:14px; font-weight:600; }
body #viewer:not(.vp-dialog) .stage { flex:1; min-height:0; height:auto; width:100%; padding:20px; background:radial-gradient(ellipse at center,#192334 0%,#0c111c 72%); }
body #viewer:not(.vp-dialog) .stage>img { border-radius:8px; box-shadow:0 18px 70px #0005; }
body #viewer:not(.vp-dialog) .viewerfoot { flex:0 0 auto; min-height:72px; height:auto; gap:20px; padding:16px 24px; background:var(--card); color:var(--muted-foreground); border-top:1px solid var(--border); font-size:12px; }
body #viewer :is(.prev,.next) { background:#171f30dd; border-color:#ffffff29; color:#eef2fa; }
body #viewer .media-error { color:#e7edf8; background:#192334; border:1px solid #ffffff29; padding:24px; max-width:min(500px,calc(100% - 40px)); text-align:center; }
body .vp-dialog { --accent:#b8a9ff; --accent-text:#c7bbff; --accent-ink:#211a38; --foreground:#eef2fa; --card:#191f2c; --popover:#222a3a; --muted-foreground:#a9b4c8; --input:#ffffff29; --background:#10141e; --border:#ffffff14; --good:#76dfb5; --good-bg:#76dfb512; --danger:#ffaaa8; --danger-bg:#ffaaa810; --warning:#efc28b; --warning-bg:#efc28b12; color-scheme:dark; }
body .vp-dialog .vp-cinema { --vp-accent:#b8a9ff; }
body .vp-dialog .vp-cinema .vp-panel { background:#192334f5; border:1px solid #ffffff24; border-radius:18px; box-shadow:0 18px 58px #0006; }
body .vp-dialog .vp-cinema .vp-panel :is(select,.vp-mono-choice) { background:#10141edb; border:1px solid #ffffff17; }
body .vp-dialog .vp-settings-tabs { background:#10141e; gap:6px; border-radius:13px; }
body .vp-dialog .vp-settings-tabs button { color:#a9b4c8; min-height:44px; border-radius:10px; }
body .vp-dialog .vp-settings-tabs button[aria-selected=true] { background:#b8a9ff; color:#211a38; }
body .vp-dialog .vp-settings-tabs button:focus-visible { outline-color:#b8a9ff; }
body .vp-dialog .vp-cinema .vp-main-controls>[data-player=play] { color:#c7bbff; }
body .vp-dialog .vp-cinema .vp-button:hover { background:#b8a9ff18; color:#c7bbff; }
body .vp-header { padding:18px 24px; background:#111723; border-bottom:1px solid #ffffff14; gap:16px; }
body .vp-header strong { font-weight:550; letter-spacing:-.015em; }
body .vp-header>div:first-child { min-width:0; }
body .vp-header-actions { gap:8px; }
body .vp-button { width:44px; min-width:44px; min-height:44px; border-radius:12px; color:#eef2fa; background:#ffffff08; border-color:#ffffff14; }
body .vp-button:hover { background:#ffffff18; }
body .vp-button:active { transform:scale(.95); }
body .vp-button:focus-visible { outline-color:#b8a9ff; }
body .vp-panel { color:#eef2fa; background:#192334f7; border:1px solid #ffffff24; border-radius:18px; box-shadow:0 16px 54px #0006; padding:20px; }
body .vp-panel :is(select,input:not([type=range])) { color:#eef2fa; background:#10141e; border-color:#ffffff29; }
body .vp-settings-tabs { gap:8px; }
body .vp-settings-tabs button { min-height:44px; border-radius:11px; }
body .vp-controls { padding-bottom:max(20px,env(safe-area-inset-bottom)); }
body :is(.vp-loading,.viewer-loading) { gap:14px; font-size:12px; }
.viewer-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; color:#a9b4c8; }
.loading-orbit { width:28px; height:28px; border:2px solid #ffffff1f; border-top-color:#b8a9ff; border-radius:50%; animation:vf-spin 1s linear infinite; }
body .auth { background:var(--background); }
body .authvisual { padding:48px clamp(32px,5vw,80px); background:radial-gradient(ellipse at 20% 30%,var(--file-soft),transparent 65%),linear-gradient(150deg,var(--card),var(--background)); }
body .authvisual .brand img { width:48px; height:48px; }
body .authvisual h1 { max-width:590px; font-size:clamp(42px,4.6vw,68px); font-weight:560; line-height:1.12; }
body .authvisual h1 em { color:var(--file-accent); }
body .authvisual p { max-width:400px; font-size:14px; line-height:1.9; }
body .authvisual>small { color:var(--subtle); font-size:10px; letter-spacing:.04em; }
.auth-art { display:flex; align-items:center; justify-content:center; height:145px; margin:28px 0 12px; gap:14px; position:relative; }
.auth-art>span { width:105px; height:118px; border-radius:18px; border:1px solid var(--input); background:var(--card); display:flex; flex-direction:column; gap:12px; align-items:center; justify-content:center; color:var(--file-accent); box-shadow:0 14px 34px #03061018; transform:rotate(-7deg) translateY(8px); }
.auth-art>span:nth-child(2) { transform:translateY(-8px); color:var(--good); z-index:1; background:linear-gradient(145deg,var(--good-bg),var(--card)); }
.auth-art>span:nth-child(3) { transform:rotate(7deg) translateY(8px); color:var(--accent-text); }
.auth-art svg { width:32px; height:32px; stroke-width:1.25; }
.auth-art i { height:4px; width:45px; background:var(--muted-surface); border-radius:4px; }
.auth-art i:last-child { width:30px; margin-top:-6px; }
body .authform { padding:48px 36px; }
body .authinner { max-width:390px; }
body .authinner h2 { font-size:30px; font-weight:600; margin:12px 0; }
body .authinner>p { font-size:13px; line-height:1.9; }
body .authinner form { margin-top:30px; }
body .authinner form label { margin:20px 0; gap:10px; font-size:12px; }
body .authinner .btn { min-height:50px; margin-top:14px; }
body .auth-mobile-brand { display:none; }
body .share-auth { background:radial-gradient(ellipse at 15% 10%,var(--file-soft),transparent 70%); }
body .share-auth .card { padding:36px; border-radius:26px; box-shadow:0 24px 60px #03061020; }
body .share-auth .card>.brand { margin-bottom:32px; }
body .share-auth h1 { font-size:30px; }
body .share-auth form .btn { width:100%; min-height:48px; }
body .share-ready { max-width:1320px; }
body .loading { color:var(--muted-foreground); }
body .loading>.loading-brand { display:flex; align-items:center; gap:14px; color:var(--foreground); font-size:23px; font-weight:600; }
.loading-brand img { width:48px; height:48px; }
body .loading .skeleton-stack { margin-top:10px; }
body .loading .skeleton { animation:vf-skeleton 1.7s ease-in-out infinite; background:var(--muted-surface); }
body .loading .skeleton:nth-child(2) { animation-delay:100ms; }
body .loading .skeleton:nth-child(3) { animation-delay:200ms; }
body #toast { background:var(--foreground); color:var(--background); border:1px solid var(--input); border-radius:15px; font-size:12px; padding:15px 22px; box-shadow:0 12px 40px #03061035; }
body[data-navigation-loading=true] .shell .content { pointer-events:none; opacity:.6; }
body[data-navigation-loading=true] .shell .topbar::after { content:''; position:absolute; height:2px; left:0; right:0; bottom:0; background:linear-gradient(90deg,transparent,var(--accent),var(--secondary-accent),transparent); transform-origin:left center; animation:vf-navigation 1.1s ease-in-out infinite; }
@media (hover:hover) {
  body .filetile:hover { transform:translateY(-3px); border-color:color-mix(in srgb,var(--file-accent) 35%,var(--border)); box-shadow:0 12px 30px -20px var(--accent-glow); }
  body .filetile.selected:hover { border-color:var(--accent); }
  body .listview .filetile:hover { transform:none; background:var(--popover); box-shadow:none; }
}
@keyframes vf-spin { to { transform:rotate(360deg); } }
@keyframes vf-dialog-in { from { opacity:0; transform:translateY(8px) scale(.99); } to { opacity:1; transform:none; } }
@keyframes vf-skeleton { 50% { opacity:.4; } }
@keyframes vf-navigation { 0% { transform:scaleX(.25); opacity:.3; } 50% { transform:scaleX(.8); opacity:1; } 100% { transform:scaleX(1); opacity:.25; } }
@media (min-width:1800px) {
  body .shell .content { padding-inline:64px; }
  body .filegrid { grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:22px; }
  body .file-art { height:140px; }
}
@media (min-width:851px) { body .shell .mobilemenu { display:none; } }
@media (max-width:1150px) and (min-width:851px) {
  body .shell { grid-template-columns:238px minmax(0,1fr); }
  body .shell .sidebar { width:238px; padding-inline:14px; }
  body .shell .content { padding-inline:28px; }
  body .library-shortcut { gap:8px; padding-inline:12px; font-size:11px; }
  body .toolbar { grid-template-columns:minmax(0,1fr) auto; }
  body .toolbar .search { grid-column:1/-1; }
  body .metricgrid .metric { padding:20px; }
}
@media (max-width:850px) {
  body .shell { grid-template-columns:minmax(0,1fr); }
  body .shell .sidebar { width:280px; }
  body .shell .topbar { height:72px; padding-inline:24px; }
  body .shell .content { padding:32px 24px 64px; }
  body .shell .pagehead { margin-bottom:26px; }
  body .pagehead .actions { width:auto; }
  body .metricgrid { grid-template-columns:1.2fr 1fr 1fr; gap:12px; }
  body .metricgrid .metric { min-height:132px; padding:20px; }
  body .metricgrid .value { font-size:25px; margin:18px 0 8px; }
  body .library-shortcuts { gap:10px; }
  body .library-shortcut { justify-content:flex-start; padding:12px; gap:8px; font-size:11px; }
  body .library-shortcut>span { display:none; }
  body .toolbar { grid-template-columns:minmax(0,1fr) auto; }
  body .toolbar .search { grid-column:1/-1; }
  body .filegrid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:16px; }
  body .file-art { height:116px; }
  body .auth-mobile-brand { display:flex; margin:0 0 36px; font-size:27px; }
  body .auth-mobile-brand img { width:48px; height:48px; }
  body .authform { min-height:100dvh; padding:40px 28px; background:radial-gradient(ellipse at top,var(--file-soft),transparent 55%),var(--background); }
  body .authinner { max-width:420px; }
  body .authinner h2 { font-size:29px; }
  body .authvisual { display:none; }
  body :is(.compress-workspace,.ve-workspace,.optimize-workspace) { gap:18px; }
  body .calendar-event-content { padding:20px; }
}
@media (max-width:600px) {
  body .shell .content { padding:28px 18px 56px; }
  body .shell .topbar { padding-inline:18px; }
  body .shell .pagehead { gap:20px; }
  body .pagehead .actions { width:100%; }
  body .pagehead .actions .btn { flex:1; }
  body .metricgrid { grid-template-columns:1fr 1fr; gap:12px; }
  body .metricgrid .metric { min-height:112px; padding:17px; display:block; }
  body .metricgrid .metric:first-child { grid-column:1/-1; display:grid; grid-template-columns:1fr auto; min-height:96px; align-items:center; gap:5px; }
  body .metricgrid .metric:first-child .value { margin:0; font-size:28px; }
  body .metricgrid .metric:first-child small { grid-column:1/-1; }
  body .metricgrid .value { font-size:23px; margin:12px 0 6px; }
  body .metricgrid .metric small { font-size:10px; }
  .library-summary { margin-bottom:18px; border-radius:16px; }
  .library-summary>summary { min-height:60px; padding:14px 16px; gap:10px; }
  .library-summary>summary>span { gap:8px; }
  .library-summary>summary small { display:none; }
  .library-summary>summary strong { font-size:11px; }
  body .library-shortcuts { grid-template-columns:1fr 1fr; gap:10px; margin-block:18px; }
  body .library-shortcut { min-height:58px; padding:10px 12px; gap:10px; font-size:11px; }
  body .library-shortcut>svg { padding:7px; width:17px; height:17px; }
  body .upload-dropzone { padding:16px; gap:12px; margin:18px 0 22px; }
  body .upload-dropzone strong { font-size:12px; }
  body .upload-dropzone small { font-size:10px; line-height:1.7; }
  body .toolbar { gap:12px; margin-top:20px; }
  body .format-filter { min-width:0; }
  body .format-filter>span { display:none; }
  body .toolbar .viewcontrols { margin-left:auto; gap:6px; }
  body .toolbar .viewcontrols .iconbtn { width:44px; }
  body .filegrid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  body .filetile { border-radius:18px; }
  body .filetile .file-open { padding:40px 12px 17px; }
  body .file-art { height:104px; margin-bottom:14px; border-radius:12px; }
  body .file-art>svg { width:40px; height:40px; }
  body .filetile .file-open strong { font-size:12px; }
  body .filetile .file-open small { font-size:10px; }
  body .filetile .pick input { width:18px; height:18px; min-height:18px; }
  .library-results { margin-bottom:15px; gap:12px; }
  .library-results h2 { font-size:14px; }
  .file-count { font-size:10px; }
  body .listview .file-open { padding:12px 6px; gap:10px; min-height:72px; }
  body .listview .file-open small { display:none; }
  body .listview .filetile { grid-template-columns:44px minmax(0,1fr) 44px; }
  body .listview .pick,body .listview .more { width:44px; min-width:44px; }
  body .selectionbar { padding:12px; gap:8px; border-radius:17px; bottom:max(12px,env(safe-area-inset-bottom)); }
  body .selectionbar>strong { width:100%; margin-bottom:4px; }
  body .selectionbar .btn { padding:11px 12px; font-size:11px; flex:1; }
  body .card { padding:22px; border-radius:19px; }
  body .compress-intro h2 { flex-basis:100%; margin:0 0 8px; }
  body .compress-intro>.btn { flex:1; font-size:12px; padding-inline:12px; }
  body :is(.compress-job,.optimize-job,.vf-recording-job,.vf-download-job,.ve-job,.up-job,.transfer-row) { padding:18px; }
  body .share-row { padding:20px; }
  body .user-card dl { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; font-size:11px; }
  body .user-card .actions .btn { flex:1 1 130px; }
  body dialog:not(#viewer) { width:calc(100% - 24px); max-height:calc(100dvh - 24px); border-radius:21px; padding:22px 18px; }
  body dialog:not(#viewer):is(.ve-dialog,.vf-recordings-dialog,.vf-downloads-dialog,.optimization-dialog) { padding:0; }
  body .modalhead { gap:12px; margin-bottom:20px; }
  body .modalhead h2 { font-size:20px; }
  body .formactions { padding-top:20px; gap:10px; }
  body .formactions .btn { flex:1; padding-inline:12px; }
  body .metadata { font-size:12px; grid-template-columns:auto minmax(0,1fr); gap:12px 16px; }
  body :is(.ve-head,.vf-recordings-head,.vf-download-header,.optimize-dialog-head,.archive-dialog>header) h2 { font-size:20px; }
  body .archive-entry { grid-template-columns:22px minmax(0,1fr) auto; gap:10px; font-size:11px; }
  body #viewer:not(.vp-dialog) .viewerbar { padding:12px; min-height:72px; gap:10px; }
  body #viewer:not(.vp-dialog) .viewerbar strong { font-size:12px; }
  body #viewer:not(.vp-dialog) .viewerbar .actions { flex-wrap:nowrap; gap:8px; }
  body #viewer:not(.vp-dialog) .stage { padding:12px; }
  body #viewer:not(.vp-dialog) .viewerfoot { padding:14px 18px; gap:14px; font-size:11px; }
  body .vp-header { padding:12px; gap:10px; }
  body .vp-header strong { font-size:12px; }
  body .vp-header-actions { gap:6px; }
  body .vp-panel { padding:16px; border-radius:16px; }
  body .authform { padding:32px 24px; }
  body .auth-mobile-brand { margin-bottom:36px; }
  body .share-auth .card { padding:28px 22px; }
  body .share-auth h1 { font-size:27px; }
}
@media (max-width:360px) {
  body .shell .content { padding-inline:16px; }
  body .toolbar { grid-template-columns:minmax(0,1fr); }
  body .toolbar .format-filter { width:100%; }
  body .toolbar .format-filter>span { display:inline; }
  body .toolbar .viewcontrols { justify-content:flex-end; width:100%; }
  body .file-art { height:90px; }
  body .filetile .file-open { padding-inline:10px; }
  body .vp-toolbar { flex-wrap:wrap; justify-content:center; gap:8px; }
  body :is(.vp-main-controls,.vp-extra-controls) { justify-content:center; }
}
@media (max-height:720px) and (min-width:851px) {
  body .shell .sidebar { padding-block:16px; gap:16px; }
  body .sidebar .brand { min-height:44px; }
  body .sidebar .storage-mini { padding:12px; }
}
:root[data-tv=true] body .shell { grid-template-columns:300px minmax(0,1fr); }
:root[data-tv=true] body .shell .sidebar { width:300px; }
:root[data-tv=true] body .shell .content { padding:48px 54px 80px; }
:root[data-tv=true] body :is(button,.btn,.iconbtn,.library-toggle) { min-height:54px; }
:root[data-tv=true] body .sidebar .nav { min-height:54px; font-size:16px; }
:root[data-tv=true] body .filegrid { grid-template-columns:repeat(auto-fill,minmax(228px,1fr)); gap:24px; }
:root[data-tv=true] body .file-art { height:154px; }
:root[data-tv=true] body .filetile .file-open strong { font-size:16px; }
:root[data-tv=true] body .filetile .file-open small { font-size:13px; }
:root[data-tv=true] body .filetile .more { width:54px; min-width:54px; height:54px; }
:root[data-tv=true] body .filetile .pick { width:54px; height:54px; }
:root[data-tv=true] body .filetile .file-open { padding-top:54px; }
:root[data-tv=true] body .vp-button { min-width:54px; width:54px; min-height:54px; }
:root[data-tv=true] body :focus-visible { outline:4px solid var(--tv-focus); outline-offset:4px; }
body[data-motion=paused] *,body[data-motion=paused] *::before,body[data-motion=paused] *::after { animation-play-state:paused!important; }
@media (prefers-reduced-motion:reduce) {
  body :is(.btn,.iconbtn,.close,.theme-choice,.library-shortcut,.filetile,.stream-service,.vp-button),body .skeleton,body .loading-orbit,body .vp-loading span,body button[aria-busy=true]::after,body[data-navigation-loading=true] .topbar::after,body dialog[open] { animation:none!important; transition:none!important; }
  body :is(.filetile,.library-shortcut,.stream-service,.btn,.iconbtn,.close):hover,body :is(.btn,.iconbtn,.close,.theme-choice,.vp-button):active { transform:none!important; }
}
