:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #121720;
  --surface-2: #191f2a;
  --surface-3: #222a37;
  --line: #2b3442;
  --line-strong: #3a4657;
  --text: #f3f5f7;
  --muted: #9aa6b6;
  --primary: #7be0ad;
  --primary-strong: #46c58a;
  --primary-ink: #062a1a;
  --danger: #ff7d88;
  --warning: #f5c66a;
  --info: #78b7ff;
  --radius: 14px;
  --radius-small: 9px;
  --shadow: 0 16px 50px rgb(0 0 0 / 0.2);
  --sidebar: 190px;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 92% -10%, rgb(123 224 173 / 0.09), transparent 28rem), var(--bg); }
body, input, select, button { font: inherit; }
a { color: inherit; text-decoration: none; }
button, input, select { min-height: 44px; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -0.035em; }
h2 { margin-bottom: 6px; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.02em; }
h3 { margin-bottom: 5px; font-size: 1rem; }
p { line-height: 1.58; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: -80px; padding: 10px 14px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font-weight: 800; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.83rem; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.min-width-zero { min-width: 0; }
.eyebrow { margin-bottom: 7px; color: var(--primary); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

.topbar { position: fixed; z-index: 50; inset: 0 0 auto 0; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgb(11 13 18 / 0.9); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -0.02em; }
.brand-mark, .login-logo { display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 1.1rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }
.player-link, .icon-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 0.82rem; cursor: pointer; }
.player-link:hover, .icon-button:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-2); }
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; padding-top: 64px; }
.sidebar { position: fixed; z-index: 40; top: 64px; bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 5px; padding: 22px 14px; border-right: 1px solid var(--line); background: rgb(11 13 18 / 0.82); }
.sidebar a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-size: 0.9rem; font-weight: 650; }
.sidebar a > span:first-child { width: 22px; text-align: center; font-size: 1.05rem; }
.sidebar a:hover { color: var(--text); background: var(--surface); }
.sidebar a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 var(--primary); }
.content { grid-column: 2; width: 100%; max-width: 1480px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 64px) 80px; }

.page-header { margin-bottom: 30px; }
.page-header > p:last-child { max-width: 760px; margin-bottom: 0; }
.page-header.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading > a, .section-heading > button { flex: none; color: var(--primary); font-size: 0.84rem; font-weight: 750; }
.section-block { margin-top: 34px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-small); font-weight: 760; font-size: 0.86rem; cursor: pointer; transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }
.button.primary { background: var(--primary); color: var(--primary-ink); }
.button.primary:hover { background: var(--primary-strong); }
.button.secondary { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.button.secondary:hover { background: var(--surface-3); }
.button.ghost { min-height: 38px; padding-inline: 10px; border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover { color: var(--text); background: var(--surface-2); }
.button.danger { background: var(--danger); color: #2a0408; }
.button.full { width: 100%; }
.danger-text { color: var(--danger) !important; }

.panel, .link-command { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(25 31 42 / 0.9), rgb(18 23 32 / 0.92)); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.link-command { padding: clamp(22px, 4vw, 34px); border-color: rgb(123 224 173 / 0.26); }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.metric { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 86px; padding: 24px; background: var(--surface); }
.metric:hover { background: var(--surface-2); }
.metric span { color: var(--muted); font-size: 0.85rem; }
.metric strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr); gap: 22px; }
.current-job { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 20px; }
.current-job img { width: 130px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.current-job h3 { margin: 9px 0 12px; font-size: 1.05rem; }
progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--primary); }
progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-3); }
progress::-webkit-progress-value { border-radius: 999px; background: var(--primary); }
progress::-moz-progress-bar { border-radius: 999px; background: var(--primary); }
.status-list { margin: 0; }
.status-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.status-list > div:last-child { border-bottom: 0; }
.status-list dt { color: var(--muted); font-size: 0.84rem; }
.status-list dd { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.85rem; font-weight: 700; text-align: right; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgb(255 125 136 / 0.1); }
.status-dot.ok { background: var(--primary); box-shadow: 0 0 0 4px rgb(123 224 173 / 0.1); }
.music-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.music-card { min-width: 0; }
.cover, .file-cover, .job-thumb { display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--muted); }
.cover { width: 100%; aspect-ratio: 1; margin-bottom: 11px; border: 1px solid var(--line); border-radius: 12px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.music-card h3, .music-card p { margin-bottom: 3px; }
.music-card p { font-size: 0.8rem; }

.alert { margin-bottom: 20px; padding: 13px 15px; border: 1px solid; border-radius: 10px; font-size: 0.87rem; line-height: 1.5; }
.alert.error { border-color: rgb(255 125 136 / 0.4); background: rgb(255 125 136 / 0.09); color: #ffadb4; }
.alert.warning { border-color: rgb(245 198 106 / 0.4); background: rgb(245 198 106 / 0.09); color: #f9d995; }
.alert.success { border-color: rgb(123 224 173 / 0.4); background: rgb(123 224 173 / 0.09); color: #a6f0c9; }
.alert a { text-decoration: underline; font-weight: 700; }
.empty { display: flex; min-height: 280px; flex-direction: column; align-items: center; justify-content: center; padding: 36px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty > span:first-child { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%; background: var(--surface-2); color: var(--primary); font-size: 1.4rem; }
.empty h2, .empty h3, .empty h1 { color: var(--text); }
.empty p { max-width: 520px; }
.empty.compact { min-height: 160px; padding: 20px; }
.empty.compact > span:first-child { width: 42px; height: 42px; margin-bottom: 8px; }
.error-state { min-height: 60vh; border: 0; }

label { display: flex; flex-direction: column; gap: 7px; color: #c8d0da; font-size: 0.83rem; font-weight: 680; }
input, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background: #0e1219; color: var(--text); padding: 0 13px; outline: 0; }
input::placeholder { color: #687487; }
input:focus, select:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgb(120 183 255 / 0.14); }
input[type="checkbox"] { width: 19px; min-height: 19px; height: 19px; accent-color: var(--primary); }
input[type="file"] { padding: 10px; }
label small, .field-help { margin: 0; color: var(--muted); font-size: 0.76rem; font-weight: 450; line-height: 1.55; }
.optional { color: var(--muted); font-weight: 450; }
.form-stack { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }
.inline-form, .filter-row { display: flex; align-items: flex-end; gap: 12px; }
.inline-form label, .filter-row label { min-width: 130px; }
.search-field { flex-direction: row; align-items: center; min-width: min(100%, 340px); }
.search-field input { min-width: 0; }

.link-form > label { margin-bottom: 10px; color: var(--text); font-size: 1rem; }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.input-action input { min-height: 52px; font-size: 1rem; }
.input-action .button { min-height: 52px; padding-inline: 22px; }
.field-help { margin-top: 10px; }
.analysis-region { margin-top: 24px; }
.skeleton-card { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skeleton-card div { min-height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: pulse 1.2s linear infinite; }
.skeleton-card div:first-of-type { grid-row: span 3; min-height: 120px; }
@keyframes pulse { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

.preview-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.preview-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 11px; }
.preview-card h2 { margin: 8px 0; font-size: 1.35rem; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font-size: 0.82rem; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.metadata-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.metadata-form .wide { grid-column: span 2; }
.choice-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--surface-2); }
.choice-strip > p { width: 100%; margin-bottom: 0; }
.playlist-preview { display: grid; gap: 16px; }

.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; font-size: 0.69rem; font-weight: 800; white-space: nowrap; }
.status-completed { border-color: rgb(123 224 173 / 0.3); background: rgb(123 224 173 / 0.11); color: #9ee9c1; }
.status-pending, .status-metadata { border-color: rgb(120 183 255 / 0.3); background: rgb(120 183 255 / 0.1); color: #9dccff; }
.status-downloading, .status-converting, .status-tagging, .status-moving { border-color: rgb(245 198 106 / 0.32); background: rgb(245 198 106 / 0.1); color: #f6d590; }
.status-failed, .status-cancelled { border-color: rgb(255 125 136 / 0.3); background: rgb(255 125 136 / 0.09); color: #ffabb3; }
.status-skipped, .badge.neutral { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); }

.table-panel { padding: 0; overflow: hidden; }
.table-panel > .section-heading { padding: 20px 22px 0; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 0.83rem; }
th { color: var(--muted); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
tbody tr:hover { background: rgb(255 255 255 / 0.018); }
.video-cell { display: grid; grid-template-columns: 84px minmax(180px, 1fr); align-items: center; gap: 12px; }
.video-cell img { width: 84px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; }
.video-cell span { display: block; margin-top: 3px; font-size: 0.76rem; }
.filter-panel { margin-bottom: 18px; }
.filter-row .search-field { flex: 1; }
.selection-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 16px; }
.chip { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.75rem; font-weight: 650; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.range-select { flex-direction: row; align-items: center; gap: 6px; margin-left: auto; }
.range-select input { width: 62px; min-height: 34px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px -22px -22px; padding: 14px 22px; border-top: 1px solid var(--line); background: rgb(11 13 18 / 0.45); }
.bulk-bar > div { display: flex; gap: 8px; }
.settings-inline { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.settings-inline h2, .settings-inline p { margin-bottom: 0; }

.job-list, .file-list { display: grid; gap: 12px; }
.job-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); }
.job-row:first-child { border-top: 0; }
.job-thumb { width: 88px; aspect-ratio: 16 / 9; border-radius: 8px; }
.job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-title-line { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.job-title-line h3 { min-width: 0; margin: 0; }
.job-meta { margin: 6px 0 0; color: var(--muted); font-size: 0.75rem; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.job-error { margin-top: 10px; color: var(--danger); font-size: 0.78rem; }
.job-error summary { cursor: pointer; }
.job-error pre { max-width: min(720px, 65vw); overflow: auto; white-space: pre-wrap; color: #f0b2b7; }

.playlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.playlist-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.playlist-card > div:last-child { padding: 17px; }
.playlist-card h2 { margin-bottom: 4px; }
.playlist-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8.8; overflow: hidden; background: var(--surface-2); color: var(--muted); }
.playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-cover > span { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 7px; background: rgb(0 0 0 / 0.76); font-size: 0.72rem; font-weight: 750; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0; padding: 11px 0; border-block: 1px solid var(--line); }
.mini-stats div { text-align: center; }
.mini-stats dt { color: var(--muted); font-size: 0.67rem; }
.mini-stats dd { margin: 3px 0 0; font-weight: 800; }

.file-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) minmax(180px, auto); align-items: center; gap: 17px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.file-cover { width: 82px; aspect-ratio: 1; border-radius: 10px; }
.file-cover img { width: 100%; height: 100%; object-fit: cover; }
.file-info h2, .file-info p { margin-bottom: 3px; }
audio { display: block; width: min(100%, 420px); height: 36px; margin-top: 9px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 20px; align-items: start; }

.dialog { width: min(92vw, 500px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 30px 90px rgb(0 0 0 / 0.58); }
.dialog.wide { width: min(92vw, 720px); }
.dialog::backdrop { background: rgb(0 0 0 / 0.66); backdrop-filter: blur(3px); }
.dialog form { padding: 24px; }
.dialog h2 { font-size: 1.25rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(380px, calc(100vw - 36px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-left: 4px solid var(--primary); border-radius: 10px; background: #202734; box-shadow: var(--shadow); font-size: 0.84rem; }
.toast.error { border-left-color: var(--danger); }

.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 28px; }
.login-card { width: min(100%, 420px); padding: clamp(28px, 6vw, 42px); border: 1px solid var(--line); border-radius: 18px; background: rgb(18 23 32 / 0.94); box-shadow: 0 30px 100px rgb(0 0 0 / 0.34); }
.login-logo { width: 48px; height: 48px; margin-bottom: 24px; border-radius: 14px; font-size: 1.4rem; }
.login-card h1 { font-size: 1.85rem; }
.login-card > .muted { margin-bottom: 24px; }

@media (max-width: 1100px) {
  :root { --sidebar: 76px; }
  .sidebar { align-items: center; padding-inline: 10px; }
  .sidebar a { width: 52px; justify-content: center; padding: 0; }
  .sidebar a > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .music-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .playlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand > span:last-child { font-size: 0.9rem; }
  .player-link { display: none; }
  .app-shell { display: block; padding-top: 56px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .content { padding: 26px 15px 44px; }
  .sidebar { position: fixed; z-index: 60; top: auto; right: 0; bottom: 0; width: 100%; height: calc(62px + env(safe-area-inset-bottom)); flex-direction: row; align-items: flex-start; justify-content: space-around; gap: 0; padding: 4px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); border-right: 0; background: rgb(11 13 18 / 0.96); backdrop-filter: blur(16px); }
  .sidebar a { width: auto; min-width: 50px; height: 54px; flex-direction: column; justify-content: center; gap: 2px; padding: 0 5px; border-radius: 8px; font-size: 0.63rem; }
  .sidebar a > span:first-child { width: auto; font-size: 1rem; }
  .sidebar a > span:last-child { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .sidebar a[aria-current="page"] { box-shadow: inset 0 3px var(--primary); }
  .page-header { margin-bottom: 22px; }
  .page-header.split { align-items: stretch; flex-direction: column; gap: 15px; }
  .page-header.split > .button { align-self: flex-start; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 72px; padding: 17px; }
  .metric strong { font-size: 1.45rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .current-job { grid-template-columns: 94px minmax(0, 1fr); }
  .current-job img { width: 94px; }
  .music-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 11px; }
  .input-action { grid-template-columns: 1fr; }
  .preview-card { grid-template-columns: 1fr; padding: 17px; }
  .preview-card > img { max-height: 230px; }
  .metadata-form, .form-grid { grid-template-columns: 1fr; }
  .metadata-form .wide { grid-column: auto; }
  .form-actions { grid-column: auto; }
  .playlist-grid { grid-template-columns: 1fr; }
  .filter-row, .inline-form { align-items: stretch; flex-direction: column; }
  .filter-row label, .inline-form label { width: 100%; }
  .selection-tools { flex-wrap: nowrap; margin-inline: -22px; padding: 0 22px 6px; overflow-x: auto; }
  .selection-tools .chip { flex: none; }
  .range-select { display: none; }
  .bulk-bar { align-items: stretch; flex-direction: column; }
  .bulk-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-inline { align-items: stretch; flex-direction: column; }
  .job-row { grid-template-columns: 70px minmax(0, 1fr); padding: 16px; }
  .job-thumb { width: 70px; }
  .job-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .file-row { grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
  .file-cover { width: 64px; }
  .file-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .search-field { width: 100%; }
  .responsive-table { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tbody tr { display: grid; grid-template-columns: 28px 34px minmax(0, 1fr); align-items: center; padding: 12px 10px; border-top: 1px solid var(--line); }
  tbody td { display: block; padding: 4px; border: 0; }
  tbody td:nth-child(4), tbody td:nth-child(5) { grid-column: 3; }
  .video-cell { grid-template-columns: 68px minmax(0, 1fr); }
  .video-cell img { width: 68px; }
  .dialog form { padding: 20px; }
  .toast-region { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .content { padding-inline: 12px; }
  .sidebar a { min-width: 45px; font-size: 0.59rem; }
  .panel { padding: 17px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 1.25rem; }
  .current-job { grid-template-columns: 1fr; }
  .current-job img { width: 100%; max-height: 180px; }
  .bulk-bar { margin: 14px -17px -17px; padding: 13px 17px; }
  .selection-tools { margin-inline: -17px; padding-inline: 17px; }
  .topbar-actions .icon-button { width: 42px; padding: 0; font-size: 0; }
  .topbar-actions .icon-button::after { content: "↪"; font-size: 1rem; }
}

