/* Tune — interface styles. Dark by default, light via [data-theme="light"]. */

:root {
  --bg: #14141f;
  --surface: #1c1c2b;
  --surface-2: #25253a;
  --surface-3: #2f2f48;
  --border: #2c2c44;
  --border-strong: #3d3d5c;
  --text: #f3f3f8;
  --text-2: #c3c3d6;
  --muted: #8f90aa;
  --accent: #ff6f4d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 111, 77, .14);
  --violet: #7c5cff;
  --ok: #34d399;
  --warn: #fbbf24;
  --error: #f87171;
  --info: #60a5fa;
  --cat: #8a8fa3;
  --cat-mix: 10%;
  --cat-border: 34%;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 248px;
  --topbar: 64px;
  --font: "Poppins", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f4f9;
  --surface: #ffffff;
  --surface-2: #eeeef5;
  --surface-3: #e2e2ee;
  --border: #e0e0ec;
  --border-strong: #c9c9dc;
  --text: #17172a;
  --text-2: #3b3b55;
  --muted: #6b6c86;
  --accent: #e8502c;
  --accent-soft: rgba(232, 80, 44, .1);
  --violet: #6246ea;
  --ok: #059669;
  --warn: #b45309;
  --error: #dc2626;
  --info: #2563eb;
  --cat-mix: 8%;
  --cat-border: 38%;
  --shadow: 0 10px 30px rgba(30, 30, 60, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
p a, .muted a, .sidebar-empty a, .banner a { color: var(--accent); }
p a:hover, .muted a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font: 12.5px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 3px 7px; border-radius: 6px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { flex: 1 1 auto; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }
.icon { display: inline-flex; flex: none; width: 18px; height: 18px; }
.icon svg { width: 100%; height: 100%; }
.icon.tiny { width: 13px; height: 13px; }

/* ---- loading ---- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-xs { width: 11px; height: 11px; border-width: 2px; display: inline-block; }
.center-pad { display: grid; place-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 550; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--error); border-color: transparent; color: #fff; }
[data-theme="dark"] .btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-soft { color: var(--error); }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-small .icon { width: 14px; height: 14px; }
.btn-block { width: 100%; min-height: 44px; }
.btn.busy .icon, .refresh-btn.busy .icon { animation: spin 1s linear infinite; }
.btn-toggle.on.like { background: color-mix(in srgb, var(--ok) 18%, var(--surface-2)); border-color: var(--ok); color: var(--ok); }
.btn-toggle.on.dislike { background: color-mix(in srgb, var(--error) 16%, var(--surface-2)); border-color: var(--error); color: var(--error); }
.btn-toggle.on.later { background: color-mix(in srgb, var(--violet) 22%, var(--surface-2)); border-color: var(--violet); color: color-mix(in srgb, var(--violet) 70%, var(--text)); }
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--error); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 550; }
.link-btn:hover { text-decoration: underline; }

/* ---- form controls ---- */
.input, .select {
  min-height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); max-width: 100%;
}
.input { width: 100%; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { outline: 2px solid var(--violet); outline-offset: 0; border-color: transparent; }
.input-quiet { background: transparent; border-color: transparent; font-weight: 600; font-size: 15px; padding: 0 8px; margin-left: -8px; }
.input-quiet:hover { border-color: var(--border-strong); }
.input-number { width: 104px; text-align: right; }
.select { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f90aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; }
.select-small { min-height: 30px; font-size: 12.5px; }
.select option { background: var(--surface); color: var(--text); }
.color-input { flex: none; width: 42px; height: 38px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-input::-moz-color-swatch { border: 0; border-radius: 6px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.form-error { color: var(--error); font-size: 13px; }
.form-title { font-size: 13.5px; font-weight: 600; margin: 18px 0 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.stack { display: grid; gap: 14px; max-width: 420px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }
.toggle-col { display: grid; gap: 12px; margin-top: 18px; }
.inline-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background .15s; position: relative; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.switch input:checked + .switch-track { background: var(--violet); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ---- chips, notices ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 550; white-space: nowrap;
}
.chip-cat { background: color-mix(in srgb, var(--cat) 14%, var(--surface)); border-color: color-mix(in srgb, var(--cat) 40%, var(--border)); color: var(--text); }
.chip-filter { min-height: 34px; padding: 0 14px; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.chip-filter:hover { background: var(--surface-3); }
.chip-filter.active { background: color-mix(in srgb, var(--cat, var(--accent)) 22%, var(--surface)); border-color: var(--cat, var(--accent)); color: var(--text); }
.chip-filter.active:not([style]) { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip-info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, var(--border)); }
.chip-ok, .chip-completed, .chip-downloaded { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.chip-warn, .chip-paused { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.chip-error, .chip-failed, .chip-unavailable { color: var(--error); border-color: color-mix(in srgb, var(--error) 40%, var(--border)); }
.chip-queued, .chip-downloading, .chip-pending { color: var(--info); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; margin: 12px 0; }
.notice .icon { margin-top: 1px; }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.notice-warn .icon { color: var(--warn); }
.notice-error { border-color: color-mix(in srgb, var(--error) 45%, var(--border)); background: color-mix(in srgb, var(--error) 9%, var(--surface)); }
.notice-error .icon { color: var(--error); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 550; font-size: 13px; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
[data-theme="dark"] .segmented button.active { background: var(--surface-3); }
.segmented .icon { width: 15px; height: 15px; }
.segmented-icons button { padding: 0 9px; }
.seg-count { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar-sm { width: 26px; height: 26px; font-size: 12px; }
.avatar-lg { width: 44px; height: 44px; }
.avatar-xl { width: 60px; height: 60px; font-size: 22px; }
.avatar-fallback { display: inline-grid; place-items: center; font-weight: 650; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 64px 20px; text-align: center; }
.empty p { color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 8px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); color: var(--muted); margin-bottom: 4px; }
.empty-icon .icon { width: 28px; height: 28px; }

/* ---- toasts ---- */
#toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13.5px; animation: toast-in .2s ease-out; }
.toast .icon { margin-top: 1px; color: var(--info); }
.toast-success .icon { color: var(--ok); }
.toast-error .icon { color: var(--error); }
.toast.leaving { opacity: 0; transition: opacity .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- dialogs & menus ---- */
.overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 16, .66); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.modal-wide { width: min(640px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 12px 22px; }
.modal-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 4px 22px 20px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
.menu { position: fixed; z-index: 80; min-width: 200px; padding: 6px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: fade .1s; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; text-align: left; }
.menu-item:hover { background: color-mix(in srgb, var(--text) 9%, transparent); }
.menu-item.danger { color: var(--error); }
.menu-item .icon { width: 16px; height: 16px; }

/* ---- sign in ---- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 500px at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 60%), var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: 16px; padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.login-tagline { color: var(--muted); margin-top: -8px; }
.login-card .input, .login-card input { min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); width: 100%; }

/* ---- layout ---- */
.layout { display: flex; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; flex: none; width: var(--sidebar); height: 100dvh; display: flex; flex-direction: column; padding: 18px 12px 12px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 14px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.brand-mobile { display: none; padding: 0; }
.nav-section { padding: 14px 12px 8px; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 8px; border-radius: 11px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--muted); transition: background .15s, color .15s; }
.nav-icon .icon { width: 16px; height: 16px; }
.nav-item.active { color: var(--text); font-weight: 600; }
.nav-item.active .nav-icon { background: var(--accent); color: #fff; }
.nav-label { flex: 1; }
.nav-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: center; }
.nav-count-live { background: var(--accent-soft); color: var(--accent); }
.subs { display: grid; gap: 10px; padding-bottom: 12px; }
.sub-group { display: grid; gap: 1px; }
.sub-group-title { display: flex; align-items: center; gap: 8px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); border-radius: 8px; }
.sub-group-title:hover { color: var(--text); background: var(--surface-2); }
.sub-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text-2); border-left: 2px solid transparent; }
.sub-item:hover { background: var(--surface-2); color: var(--text); }
.sub-item.active { background: color-mix(in srgb, var(--cat) 14%, var(--surface)); color: var(--text); border-left-color: var(--cat); }
.sub-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sub-count { font-size: 11px; font-weight: 650; color: var(--text); background: color-mix(in srgb, var(--cat) 30%, var(--surface-2)); border-radius: 999px; padding: 0 6px; }
.sidebar-empty { padding: 4px 12px; color: var(--muted); font-size: 13px; }
.sidebar-foot { margin-top: auto; padding: 12px 12px 2px; color: var(--muted); font-size: 11.5px; }
.scrim { display: none; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--topbar); padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.menu-btn { display: none; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.search:focus-within { border-color: var(--violet); }
.search-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--text); }
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { filter: grayscale(1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.refresh-wrap { position: relative; display: flex; align-items: center; gap: 2px; }
.refresh-btn { min-height: 40px; }
.sync-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 330px; max-width: calc(100vw - 24px); padding: 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.sync-head { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sync-head .icon { color: var(--ok); }
.sync-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sync-stat { padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 45%, transparent); }
.sync-stat b { display: block; font-size: 17px; }
.sync-stat span, .sync-time { color: var(--muted); font-size: 12px; }
.sync-time { margin-top: 10px; }
.sync-errors { margin: 10px 0 0; padding-left: 18px; color: var(--error); font-size: 12.5px; max-height: 140px; overflow: auto; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 6px; border: 0; border-radius: 11px; background: transparent; color: var(--text-2); font-weight: 550; }
.user-btn:hover { background: var(--surface-2); }
.banners { padding: 0 28px; }
.banner { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; }
.banner-warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border)); }
.banner-error { background: color-mix(in srgb, var(--error) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--error) 40%, var(--border)); }
.content { flex: 1; width: 100%; max-width: 1720px; margin: 0 auto; padding: 18px 28px 56px; outline: none; }
.bottomnav { display: none; }

/* ---- page chrome ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 18px; }
.page-sub { color: var(--muted); margin-top: 4px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.row-end { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* ---- video grid & cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 22px 18px; }
.grid-foot { display: grid; justify-items: center; gap: 10px; padding: 28px 0 0; }
.grid-count, .grid-end { color: var(--muted); font-size: 13px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--cat) var(--cat-mix), var(--surface));
  border: 1px solid color-mix(in srgb, var(--cat) var(--cat-border), var(--border));
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--cat) 60%, var(--border)); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card.is-watched .thumb img { opacity: .55; }
.card.is-gone .thumb img { opacity: .5; filter: grayscale(.5); }
.card.is-gone { border-style: dashed; }
.card.is-pending { border-style: solid; }
.badge { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 7px; font-size: 11.5px; font-weight: 650; line-height: 1.5; background: rgba(10, 10, 18, .82); color: #fff; }
.badge-duration { right: 8px; bottom: 8px; font-variant-numeric: tabular-nums; }
.badge-new { left: 8px; top: 8px; background: var(--accent); letter-spacing: .06em; }
.badge-watched { left: 8px; top: 8px; }
.badge-watched .icon { width: 12px; height: 12px; color: var(--ok); }
.badge-kind { right: 8px; top: 8px; background: var(--violet); }
.thumb-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 600; font-size: 13.5px; background: rgba(10, 10, 18, .4); transition: background .15s; }
.thumb-overlay .icon { transition: transform .15s; }
.thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.thumb-progress i { display: block; height: 100%; background: var(--accent); }
.card.is-watched .thumb-progress i { background: var(--ok); }
.card-body { display: grid; grid-template-columns: auto 1fr; gap: 0 11px; padding: 12px 12px 8px; flex: 1; }
.card-avatar { padding-top: 2px; }
.card-text { min-width: 0; display: grid; gap: 3px; align-content: start; }
.card-channel { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; min-width: 0; }
.card-channel a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-channel a:hover { color: var(--text); text-decoration: underline; }
.card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-weight: 600; font-size: 14.5px; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
a.card-title:hover { color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--muted); font-size: 12.5px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.card-meta > span + span::before { content: "•"; margin-right: 6px; opacity: .6; }
.card-meta .icon { color: var(--ok); }
.card-retention { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; margin-top: 1px; }
.card-retention.keep { color: var(--ok); }
.card-retention.warn { color: var(--warn); }
.card-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 2px; margin-top: 8px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--cat) 18%, var(--border)); }
.act { display: inline-grid; place-items: center; width: 36px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); transition: background .15s, color .15s; }
.act:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.act.on.like { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.act.on.dislike { color: var(--error); background: color-mix(in srgb, var(--error) 15%, transparent); }
.act.on.later { color: color-mix(in srgb, var(--violet) 70%, var(--text)); background: color-mix(in srgb, var(--violet) 22%, transparent); }
.act.on .icon svg { fill: color-mix(in srgb, currentColor 25%, transparent); }

.grid-compact { grid-template-columns: 1fr; gap: 10px; }
.card-compact { flex-direction: row; align-items: stretch; }
.card-compact:hover { transform: none; }
.card-compact .thumb { flex: none; width: 200px; }
.card-compact .card-body { grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 12px; }
.card-compact .card-actions { grid-column: auto; margin: 0; padding: 0; border: 0; }
.card-compact .card-actions .spacer { display: none; }

/* ---- hero (favorite channels) ---- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: 350px; margin-bottom: 22px; border-radius: 22px; background: #0d0d16; border: 1px solid color-mix(in srgb, var(--cat) 45%, var(--border)); }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 8, 14, .94) 0%, rgba(8, 8, 14, .74) 36%, rgba(8, 8, 14, .12) 74%), linear-gradient(0deg, rgba(8, 8, 14, .7), transparent 55%); }
.hero-content { display: grid; gap: 10px; max-width: 660px; padding: 30px 34px; color: #fff; }
.hero-chip { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 600; color: #fff; }
.hero-chip:hover { background: rgba(255, 255, 255, .24); }
.hero-chip .icon { color: #fbbf24; }
.hero-chip .icon svg, .fav svg, .star-btn.on svg, .btn-toggle.on.fav svg { fill: currentColor; }
.hero-title { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.hero-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #dcdce8; font-size: 13px; font-weight: 550; }
.hero-new { padding: 1px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; letter-spacing: .06em; }
.hero-desc { color: #b9b9cc; font-size: 13.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero .btn { min-height: 42px; border-radius: 999px; }
.hero-watch { padding: 0 22px; background: #fff; border-color: transparent; color: #14141f; }
.hero-watch:hover { background: #e9e9f2; }
.hero-watch .icon svg { fill: currentColor; }
.hero-btn { padding: 0 18px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-btn:hover { background: rgba(255, 255, 255, .22); }
.hero-btn.on { background: #fff; color: #14141f; border-color: transparent; }
.hero-icon { width: 42px; padding: 0; }
.hero-nav { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: grid; justify-items: center; gap: 8px; color: #fff; font-size: 11.5px; font-weight: 600; }
.hero-nav button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(20, 20, 31, .5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-nav button:hover { background: #fff; color: #14141f; }
.icon.flip { transform: rotate(180deg); }
.fav { color: #fbbf24; }
.star-btn.on, .btn-toggle.on.fav { color: #f59e0b; }
.btn-toggle.on.fav { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, var(--surface-2)); }

/* ---- channel page ---- */
.channel-head { display: flex; align-items: flex-start; gap: 22px; padding: 22px; margin-bottom: 18px; border-radius: 20px; background: color-mix(in srgb, var(--cat) var(--cat-mix), var(--surface)); border: 1px solid color-mix(in srgb, var(--cat) var(--cat-border), var(--border)); }
.avatar-xxl { width: 96px; height: 96px; font-size: 36px; }
.channel-info { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.channel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.channel-about { color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 820px; }
.channel-about.clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.channel-note { margin: -8px 0 16px; font-size: 13px; }
.thumb-btn { width: 100%; padding: 0; border: 0; cursor: pointer; text-align: inherit; }
.thumb-btn:hover .thumb-overlay { background: rgba(10, 10, 18, .62); }
.thumb-btn:hover .thumb-overlay .icon { transform: translateY(2px); }
.input-text { width: 180px; }

.thumb-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .25s; pointer-events: none; }
.previewing .thumb-preview { opacity: 1; }
.previewing .badge-watched, .previewing .thumb-progress { opacity: 0; }
.thumb .badge { z-index: 1; }

/* ---- mini player (a video that keeps playing while you browse) ---- */
.miniplayer { position: fixed; z-index: 45; right: 20px; bottom: 20px; width: 400px; max-width: calc(100vw - 24px); border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--border-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); animation: toast-in .2s ease-out; }
.has-player .miniplayer { bottom: 84px; }
.mini-video { aspect-ratio: 16 / 9; background: #000; }
.mini-video video { display: block; width: 100%; height: 100%; }
.mini-bar { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; background: var(--surface-2); }
.mini-title { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.mini-title b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-title small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-title:hover b { color: var(--accent); }
.mini-bar .icon-btn { width: 34px; height: 34px; }
.has-mini #toasts { bottom: 320px; }

/* ---- watch ---- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; max-height: calc(100dvh - 170px); width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player-gone img { width: 100%; height: 100%; object-fit: cover; opacity: .25; filter: blur(3px); }
.player-gone-inner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; color: #fff; }
.player-gone-inner p { color: #c9c9d9; }
.player-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.player-opt { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.shortcuts { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; cursor: help; }
.watch-title { font-size: 21px; margin-top: 14px; overflow-wrap: anywhere; }
.watch-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 14px; }
.watch-channel { display: inline-flex; align-items: center; gap: 12px; padding-right: 6px; }
.watch-channel span { display: grid; line-height: 1.3; }
.watch-channel small { color: var(--muted); font-size: 12px; }
.watch-channel:hover b { color: var(--accent); }
.watch-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.retention-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; }
.retention-note .icon { margin-top: 1px; color: var(--muted); }
.retention-note.keep { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.retention-note.keep .icon { color: var(--ok); }
.retention-note.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.retention-note.warn .icon { color: var(--warn); }
.description { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.description-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.description-meta .muted { font-weight: 450; }
.description-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.description-text.clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.description .link-btn { margin-top: 8px; }
.side-title { font-size: 15px; margin-bottom: 12px; }
.side-list { display: grid; gap: 10px; }
.side-item { display: grid; grid-template-columns: 150px 1fr; gap: 11px; padding: 6px; border-radius: 12px; border: 1px solid transparent; }
.side-item:hover { background: color-mix(in srgb, var(--cat) 10%, var(--surface)); border-color: color-mix(in srgb, var(--cat) 30%, var(--border)); }
.side-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface-3); }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-item.is-watched .side-thumb img { opacity: .5; }
.side-thumb .badge { font-size: 10.5px; padding: 1px 5px; right: 5px; bottom: 5px; }
.side-thumb .badge-new { left: 5px; top: 5px; right: auto; bottom: auto; }
.side-text { display: grid; align-content: start; gap: 2px; min-width: 0; }
.side-text b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.side-text small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.plain { display: inline-flex; }

/* ---- subscriptions ---- */
.add-form { display: flex; gap: 10px; margin-bottom: 24px; max-width: 720px; }
.add-form .input { min-height: 44px; }
.add-form .btn { min-height: 44px; }
.sub-list { display: grid; gap: 26px; }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 15px; }
.section-title .muted { font-weight: 500; font-size: 13px; }
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.sub-card { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--cat) var(--cat-mix), var(--surface)); border: 1px solid color-mix(in srgb, var(--cat) var(--cat-border), var(--border)); min-width: 0; }
.sub-card-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sub-card-text { min-width: 0; }
.sub-card-text h3, .sub-card-text p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-card-main:hover h3 { color: var(--accent); }
.sub-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--cat) 18%, var(--border)); }
.channel-preview { display: flex; gap: 16px; align-items: flex-start; padding: 4px 0 6px; }
.channel-preview > div { min-width: 0; }
.channel-desc { margin-top: 6px; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.mode-options { display: grid; gap: 8px; }
.mode-option { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.mode-option:hover { border-color: var(--muted); }
.mode-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.mode-option input { margin: 3px 0 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.mode-option span { display: grid; gap: 2px; }
.mode-option small { color: var(--muted); font-size: 12.5px; }
.mode-num { flex: none; display: grid !important; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); font-size: 12px; font-weight: 650; color: var(--text-2); }
.mode-option.selected .mode-num { background: var(--accent); color: #fff; }
.estimate, .mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.estimate-stat, .mini-stat { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.estimate-stat b, .mini-stat b { display: block; font-size: 20px; line-height: 1.2; }
.estimate-stat span, .mini-stat span { color: var(--muted); font-size: 12px; }
.fold { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.fold summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.fold summary:hover { color: var(--text); }
.known-videos, .history-list { display: grid; gap: 2px; margin-top: 10px; }
.known-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 0; }
.known-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.known-pad { width: 0; }
.more-row { padding-top: 8px; }

.sub-card { position: relative; }
.sub-card.is-selected { outline: 2px solid var(--accent); outline-offset: -1px; }
.sub-check { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; }
.sub-check:hover { background: color-mix(in srgb, var(--text) 9%, transparent); }
.sub-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.sub-card-main { padding-right: 34px; }
.section-select { margin-left: 6px; font-size: 12.5px; }
.bulk-bar { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.bulk-count { font-size: 14px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.import-file { margin: 14px 0; }
.file-input { padding: 8px 10px; height: auto; cursor: pointer; }
.import-problems { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); max-height: 180px; overflow: auto; display: grid; gap: 3px; }

/* ---- podcasts ---- */
.section-link { display: flex; align-items: center; gap: 12px; min-height: 46px; margin: 0 0 2px; padding: 0 8px; border-radius: 12px; font-weight: 600; color: var(--text); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)), color-mix(in srgb, var(--violet) 18%, var(--surface-2))); border: 1px solid var(--border); transition: border-color .15s; }
.section-link:hover { border-color: var(--border-strong); }
.section-link .nav-icon { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.section-link.active { border-color: var(--accent); }
.section-link.active .nav-icon { background: var(--accent); color: #fff; }
.pod-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.pod-side { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar) + 12px); }
.side-heading { font-size: 11.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.pod-search { max-width: none; flex: none; }
.pod-search-results { display: grid; gap: 6px; }
.pod-library { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.pod-item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; min-width: 0; }
.pod-item:hover { background: var(--surface); }
.pod-item-text { flex: 1; min-width: 0; display: grid; }
.pod-item-text b, .pod-item-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-item-text b { font-weight: 600; font-size: 13.5px; }
.pod-item-text small { color: var(--muted); font-size: 12px; }
.chip-new { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pod-cover { display: block; flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--surface-3); }
.pod-cover-fallback { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); }
.pod-cover-fallback .icon { width: 42%; height: 42%; }
.pod-cover-sm { width: 48px; height: 48px; border-radius: 10px; }
.pod-cover-round { border-radius: 50%; }
.pod-cover-xl { width: 132px; height: 132px; border-radius: 18px; }
.pod-sections { display: grid; gap: 26px; }
.pod-heading { font-size: 12.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.pod-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; }
.pod-tile { display: grid; gap: 3px; cursor: pointer; min-width: 0; }
.pod-tile-art { position: relative; margin-bottom: 5px; border-radius: 14px; overflow: hidden; }
.pod-tile b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-tile small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-tile.is-finished .pod-cover { opacity: .55; }
.pod-list { display: grid; gap: 10px; }
.pod-list-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ep-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; }
.ep-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ep-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ep-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row.is-finished .ep-title { color: var(--muted); font-weight: 500; }
.ep-new { margin-right: 7px; padding: 1px 6px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; vertical-align: 1px; }
.ep-sub { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ep-sub .icon { color: var(--ok); }
.ep-desc { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; margin-top: 3px; }
.ep-tools { display: flex; align-items: center; flex: none; }
.ep-tools .icon-btn { width: 34px; height: 34px; }
.icon-btn.is-on { color: var(--ok); }
.icon-btn.danger-on { color: var(--error); }
.ep-nas { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.pod-head .inline-switch { margin-top: 4px; }
.ep-progress { height: 3px; margin-top: 4px; max-width: 220px; }
.ep-play { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; transition: transform .15s; }
.ep-play:hover { transform: scale(1.08); }
.ep-play .icon { width: 15px; height: 15px; }
.ep-play .icon svg, .pv-play .icon svg, .pv-btn .icon svg { fill: currentColor; }
.ep-play.is-current { background: var(--violet); }
.ep-play-over { position: absolute; right: 8px; bottom: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.pod-results { display: grid; gap: 8px; }
.pod-result { cursor: default; }
.pod-hero { min-height: 300px; }
.pod-hero .hero-bg { filter: blur(34px) saturate(1.2); transform: scale(1.3); opacity: .75; }
.pod-hero .hero-shade { background: linear-gradient(90deg, rgba(8, 8, 14, .88) 0%, rgba(8, 8, 14, .55) 60%, rgba(8, 8, 14, .35) 100%); }
.pod-hero .hero-content { flex: 1; max-width: none; }
.pod-hero-art { flex: none; align-self: center; width: 210px; margin: 24px 34px 24px 0; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
.hero-dots { position: absolute; left: 34px; bottom: 12px; display: flex; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .35); transition: width .2s, background .2s; }
.hero-dots button.active { width: 22px; background: #fff; }
.pod-hero .hero-content { padding-bottom: 38px; }
.pod-hero .hero-chip .icon { color: #fff; }
.pod-hero .hero-chip .icon svg { fill: none; }
.pod-head .channel-actions { max-width: 300px; }

/* player card (Podcasts page) and player bar (every page) */
.playercard { display: grid; gap: 12px; justify-items: center; margin-top: 8px; padding: 18px; border-radius: 20px; text-align: center; color: #fff; background: linear-gradient(160deg, #262640, #16161f); border: 1px solid var(--border-strong); }
.pc-head { justify-self: start; font-size: 12.5px; font-weight: 600; color: #b9b9cc; }
.playercard .pv-art { width: 150px; border-radius: 50%; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.playercard .pv-art .pod-cover { border-radius: 50%; }
.playercard .pv-text { width: 100%; min-width: 0; }
.playercard .pv-title { font-weight: 650; font-size: 15px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.playercard .pv-sub { color: #b9b9cc; font-size: 12.5px; margin-top: 2px; }
.playercard .pv-seek { width: 100%; }
.playercard .pv-controls { width: calc(100% + 36px); margin: 4px -18px -18px; padding: 14px 18px; justify-content: center; background: var(--accent); border-radius: 0 0 19px 19px; }
.playercard .pv-btn, .playercard .pv-speed { color: #fff; }
.playercard .pv-play { background: #fff; color: var(--accent); }
.pv-idle { display: grid; justify-items: center; gap: 8px; padding: 22px 0 12px; color: #b9b9cc; }
.pv-idle .icon { width: 44px; height: 44px; opacity: .7; }
.pv-sub a:hover { text-decoration: underline; }
.pv-controls { display: flex; align-items: center; gap: 8px; }
.pv-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); }
.pv-btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.pv-btn .icon { width: 16px; height: 16px; }
.pv-play { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; }
.pv-play .icon { width: 17px; height: 17px; }
.pv-speed { min-width: 44px; height: 30px; padding: 0 8px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 650; }
.pv-seek { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv-time { flex: none; min-width: 38px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: inherit; opacity: .75; text-align: center; }
.pv-range { flex: 1; min-width: 0; height: 18px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; --fill: 0%; }
.pv-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(90deg, currentColor var(--fill), color-mix(in srgb, currentColor 25%, transparent) var(--fill)); }
.pv-range::-moz-range-track { height: 4px; border-radius: 999px; background: color-mix(in srgb, currentColor 25%, transparent); }
.pv-range::-moz-range-progress { height: 4px; border-radius: 999px; background: currentColor; }
.pv-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: currentColor; }
.pv-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: currentColor; }
.playerbar { position: sticky; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 14px; padding: 9px 28px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.playerbar .pv-art { flex: none; width: 44px; }
.playerbar .pv-art .pod-cover { border-radius: 9px; }
.playerbar .pv-text { flex: 0 1 260px; min-width: 0; }
.playerbar .pv-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playerbar .pv-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playerbar .pv-seek { flex: 1 1 200px; color: var(--accent); }
.playerbar .pv-time { color: var(--muted); opacity: 1; }

/* ---- news ---- */
.section-link + .section-link { margin-top: 6px; }
.news-search { max-width: 320px; margin-left: auto; height: 38px; }
.news-lead { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 360px; margin-bottom: 22px; border-radius: 22px; overflow: hidden; cursor: pointer; background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 55%, #14141f), #14141f); border: 1px solid color-mix(in srgb, var(--cat) 45%, var(--border)); }
.news-lead .hero-shade { background: linear-gradient(0deg, rgba(8, 8, 14, .95) 0%, rgba(8, 8, 14, .6) 45%, rgba(8, 8, 14, .05) 100%); }
.news-lead-text { display: grid; gap: 8px; padding: 26px 30px; color: #fff; max-width: 860px; }
.news-lead-text h2 { font-size: 27px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.news-lead-text p { color: #c9c9d9; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.news-lead .news-meta { color: #dcdce8; }
.news-lead:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 18px; }
.news-card { display: grid; gap: 8px; align-content: start; cursor: pointer; min-width: 0; border-radius: 14px; }
.news-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--surface-3); border: 1px solid color-mix(in srgb, var(--cat) 30%, var(--border)); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-thumb.no-image { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 45%, var(--surface-2)), var(--surface-2)); }
.news-thumb.no-image span { font-size: 40px; font-weight: 700; color: color-mix(in srgb, var(--text) 55%, transparent); }
.news-unread { position: absolute; top: 10px; left: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(10, 10, 18, .55); }
.news-card h3 { font-size: 15px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.news-card:hover h3 { color: var(--accent); }
.news-intro { color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; overflow-wrap: anywhere; }
.news-card.is-read .news-intro { color: var(--muted); }
.news-card.is-read h3 { color: var(--muted); font-weight: 550; }
.news-card.is-read .news-thumb img { opacity: .6; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 12.5px; min-width: 0; }
.news-meta a { color: inherit; font-weight: 550; }
.news-meta a:hover { text-decoration: underline; }
.news-meta > span + span::before, .news-meta > a + span::before { content: "·"; margin-right: 8px; }
.news-saved { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.news-feed-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 55%, #14141f)); }
.news-feed-mark-xl { width: 88px; height: 88px; border-radius: 20px; font-size: 36px; }
.news-category { max-width: 260px; margin-top: 6px; }
.news-add { max-width: none; }
.reader .modal-body { padding-top: 0; }
.modal.reader { width: min(760px, 100%); }
.reader-image { width: calc(100% + 44px); max-width: none; margin: 0 -22px 18px; max-height: 380px; object-fit: cover; }
.reader-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; margin-top: 16px; }
.reader-meta a { color: var(--text); font-weight: 600; }
.reader-meta > span::before { content: "·"; margin-right: 10px; }
.reader-title { font-size: 26px; line-height: 1.2; margin: 8px 0 16px; overflow-wrap: anywhere; }
.reader-text { font-size: 15.5px; line-height: 1.7; color: var(--text-2); margin-bottom: 14px; white-space: pre-line; overflow-wrap: anywhere; }

/* ---- categories ---- */
.cat-list { display: grid; gap: 10px; max-width: 860px; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--cat) var(--cat-mix), var(--surface)); border: 1px solid color-mix(in srgb, var(--cat) var(--cat-border), var(--border)); }
.cat-main { flex: 1; min-width: 0; }
.cat-main .input { max-width: 340px; }
.cat-sample { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--text-2); background: color-mix(in srgb, var(--cat) 22%, var(--surface)); border: 1px solid var(--cat); }

/* ---- downloads ---- */
.dl-summary { display: flex; align-items: center; gap: 10px; }
.dl-list { display: grid; gap: 10px; margin-top: 16px; }
.dl-row { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--radius); background: color-mix(in srgb, var(--cat) calc(var(--cat-mix) * .7), var(--surface)); border: 1px solid color-mix(in srgb, var(--cat) 22%, var(--border)); }
.dl-thumb { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface-3); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.dl-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-sub { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; }
.dl-stats { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dl-side { display: flex; align-items: center; gap: 8px; }
.dl-buttons { display: flex; align-items: center; gap: 2px; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width .4s ease; }
.progress.paused i { background: var(--muted); }

/* ---- settings ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 20px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .icon { width: 16px; height: 16px; }
.settings-body { display: grid; gap: 18px; max-width: 900px; }
.panel { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.panel-head { margin-bottom: 8px; }
.panel-head p { margin-top: 4px; font-size: 13.5px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--border); }
.panel-head + .setting { border-top: 0; }
.setting-text { display: grid; gap: 2px; min-width: 0; }
.setting-text b { font-weight: 550; }
.setting-text small { color: var(--muted); font-size: 12.5px; }
.setting-control { flex: none; display: flex; align-items: center; max-width: 55%; }
.number-wrap { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.rules { margin: 6px 0 12px; padding-left: 22px; display: grid; gap: 6px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.stat { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { font-size: 22px; line-height: 1.25; }
.stat small { color: var(--muted); font-size: 12px; }
.usage { display: grid; gap: 6px; margin-top: 16px; }
.usage .progress { height: 8px; }
.bars { display: grid; gap: 10px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; align-items: center; gap: 12px; }
.bar-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--cat); }
.bar-value { display: grid; justify-items: end; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bar-value small { color: var(--muted); font-weight: 450; font-size: 11.5px; }
.logs { margin: 0; max-height: 60vh; overflow: auto; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font: 12px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* ---- responsive ---- */
@media (max-width: 1180px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .pod-layout { grid-template-columns: minmax(0, 1fr); }
  .pod-side { position: static; }
  .pod-hero-art { width: 150px; margin-right: 22px; }
  .side-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 900px) {
  :root { --topbar: 56px; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .drawer-open .sidebar { transform: none; }
  .drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8, 8, 16, .6); }
  .menu-btn { display: inline-grid; }
  .brand-mobile { display: flex; }
  .topbar { padding: 0 12px; gap: 8px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar) + env(safe-area-inset-top)); }
  .search { height: 38px; padding: 0 10px; }
  .refresh-label, .user-name, .user-btn .icon, .refresh-wrap > .icon-btn { display: none; }
  .refresh-btn { width: 40px; padding: 0; }
  .refresh-btn.busy { width: auto; padding: 0 10px; }
  .refresh-btn.busy .refresh-label { display: inline; font-size: 12px; }
  .sync-panel { position: fixed; top: calc(var(--topbar) + env(safe-area-inset-top) + 6px); right: 12px; }
  .banners { padding: 0 14px; }
  .content { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .playerbar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .playerbar .pv-text { flex: 1 1 0; }
  .playerbar .pv-seek { order: 5; flex: 1 1 100%; }
  .playerbar .pv-speed, .playerbar .pv-controls .pv-btn:first-child { display: none; }
  .has-player .content { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
  .has-player #toasts { bottom: calc(170px + env(safe-area-inset-bottom)); }
  .miniplayer { width: 240px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); border-radius: 12px; }
  .has-player .miniplayer { bottom: calc(186px + env(safe-area-inset-bottom)); }
  .mini-title small { display: none; }
  .bottomnav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .bottom-item { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 550; border-radius: 10px; }
  .bottom-item.active { color: var(--accent); }
  .bottom-icon { position: relative; display: grid; place-items: center; }
  .bottom-icon .icon { width: 21px; height: 21px; }
  .pip { position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  #toasts { right: 12px; left: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); max-width: none; }
  h1 { font-size: 22px; }
  .watch-title { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .setting-control { max-width: 60%; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .toolbar .select { flex: 1; min-width: 0; }
  .toolbar .segmented:first-child { width: 100%; }
  .toolbar .segmented:first-child button { flex: 1; justify-content: center; }
  .card-compact .thumb { width: 132px; }
  .card-compact .card-body { grid-template-columns: 1fr; gap: 4px; padding: 8px 10px; }
  .card-compact .card-avatar { display: none; }
  .card-compact .card-actions { justify-content: flex-start; margin-top: 2px; }
  .card-compact .act { width: 32px; height: 30px; }
  .hero { min-height: 300px; border-radius: 18px; }
  .hero-shade { background: linear-gradient(0deg, rgba(8, 8, 14, .96) 0%, rgba(8, 8, 14, .7) 55%, rgba(8, 8, 14, .15) 100%); }
  .hero-content { padding: 18px; padding-right: 60px; }
  .hero-title { font-size: 21px; }
  .hero-nav { right: 10px; top: 14px; transform: none; }
  .channel-head { flex-direction: column; gap: 14px; padding: 16px; }
  .avatar-xxl { width: 72px; height: 72px; }
  .channel-actions { justify-content: flex-start; }
  .input-text { width: 100%; }
  .pod-hero-art { display: none; }
  .hero-dots { left: 18px; }
  .pod-list-2 { grid-template-columns: 1fr; }
  .pod-tiles { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
  .pod-cover-xl { width: 96px; height: 96px; }
  .pod-head .channel-actions { max-width: none; }
  .news-lead { min-height: 280px; border-radius: 18px; }
  .news-lead-text { padding: 18px; }
  .news-lead-text h2 { font-size: 20px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .news-card h3 { font-size: 14px; }
  .news-search { max-width: none; margin-left: 0; flex: 1 1 100%; }
  .reader-image { width: calc(100% + 32px); margin: 0 -16px 14px; }
  .reader-title { font-size: 21px; }
  .watch { margin: -14px -14px 0; }
  .watch .player { border-radius: 0; max-height: 56vh; }
  .watch-main > :not(.player), .watch-side { padding: 0 14px; }
  .watch-actions { width: 100%; }
  .watch-actions .btn { flex: 1; padding: 0 8px; }
  .shortcuts { display: none; }
  .side-list { grid-template-columns: 1fr; }
  .side-item { grid-template-columns: 136px 1fr; }
  .add-form { flex-wrap: wrap; }
  .add-form .input { flex: 1 1 200px; }
  .sub-cards { grid-template-columns: 1fr; }
  .cat-sample { display: none; }
  .cat-row { gap: 10px; padding: 10px; }
  .dl-row { flex-wrap: wrap; gap: 10px; }
  .dl-thumb { width: 96px; }
  .dl-main { flex-basis: calc(100% - 110px); }
  .dl-side { width: 100%; justify-content: space-between; }
  .setting { flex-direction: column; align-items: stretch; gap: 10px; }
  .setting-control { max-width: none; }
  .number-wrap { justify-content: flex-start; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-track { grid-column: 1 / -1; order: 3; }
  .panel { padding: 16px; }
  .modal-body { padding: 4px 16px 16px; }
  .modal-head { padding-left: 16px; }
  .modal-footer { padding: 12px 16px; flex-wrap: wrap; }
  .overlay { padding: 8px; align-items: end; }
  .modal { border-radius: 18px 18px 12px 12px; }
  .page-head .segmented { width: 100%; }
  .page-head .segmented button { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .spinner { animation-duration: 1.2s !important; }
}
