:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #6d7a73;
  --line: #e5ebe7;
  --paper: #f5f8f6;
  --card: #fff;
  --green: #16764d;
  --green-dark: #105b3b;
  --green-soft: #e3f3e9;
  --amber: #9a6505;
  --amber-soft: #fff3d8;
  --red: #bd3e39;
  --red-soft: #ffebe9;
  --blue: #356eaf;
  --blue-soft: #e8f1fb;
  --shadow: 0 10px 30px rgba(25, 47, 35, .055);
  --page-gutter: clamp(16px, 2vw, 32px);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; font-size: 14px; }
body.mobile-menu-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 5; min-height: 76px; padding: 10px var(--page-gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 16px; letter-spacing: -.3px; }
.brand strong { font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: var(--green); font-weight: 700; font-size: 19px; }
.mobile-drawer { display: contents; }
.mobile-drawer-heading, .mobile-menu-button, .mobile-menu-backdrop { display: none; }
.process-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.process-summary { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); align-items: center; gap: 1px; flex: 0 0 clamp(132px, 11vw, 152px); min-height: 46px; padding: 4px 7px; background: #f8faf8; border: 1px solid #edf1ee; border-radius: 7px; }
.process-summary-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.process-summary-item > span { overflow: hidden; color: #59665e; font-size: 8px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.process-summary-item > strong { color: var(--ink); font: 600 10px/1.2 'DM Mono', monospace; }
.process-summary-issues > strong { color: var(--amber); }
.top-actions { display: flex; align-items: center; gap: 11px; }
.system-metrics { display: flex; align-items: center; justify-content: flex-start; gap: 9px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.system-metric { flex: 0 0 clamp(96px, 9vw, 126px); min-width: 0; padding: 5px 7px; background: #f8faf8; border: 1px solid #edf1ee; border-radius: 7px; }
.system-metric-gpu { flex-basis: clamp(132px, 11vw, 152px); }
.system-metric-gpu-codecs { flex-basis: clamp(118px, 10vw, 138px); }
.system-metric-network { flex-basis: clamp(120px, 11.25vw, 157.5px); }
.system-metric-heading { display: flex; justify-content: space-between; gap: 5px; color: #59665e; font-size: 9px; line-height: 1.2; }
.system-metric-heading > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-metric-heading strong { color: var(--ink); font: 600 10px 'DM Mono', monospace; }
.system-progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 5px; overflow: hidden; margin: 4px 0 3px; padding: 0; border: 0; background: #e5ebe7; border-radius: 4px; }
.system-progress::-webkit-progress-bar { background: #e5ebe7; border-radius: 4px; }
.system-progress::-webkit-progress-value { background: #329260; border-radius: 4px; }
.system-progress::-moz-progress-bar { background: #329260; border-radius: 4px; }
.system-progress-memory::-webkit-progress-value { background: #6681bb; }
.system-progress-memory::-moz-progress-bar { background: #6681bb; }
.system-metric small { display: block; overflow: hidden; color: #87928b; font-size: 8px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.system-vram { display: flex; align-items: center; gap: 5px; color: #87928b; }
.system-vram .system-progress { flex: 1; min-width: 18px; margin: 3px 0; }
.system-vram small { flex: 0 0 auto; }
.system-codec-row { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #59665e; font-size: 8px; line-height: 1; }
.system-codec-row > span { flex: 0 0 22px; }
.system-codec-row > strong { flex: 0 0 25px; color: var(--ink); text-align: right; font: 700 9px 'DM Mono', monospace; }
.system-codec-row .system-progress { flex: 1; min-width: 16px; margin: 0; }
.system-progress-decoder::-webkit-progress-value { background: #6681bb; }
.system-progress-decoder::-moz-progress-bar { background: #6681bb; }
.system-traffic { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; color: #59665e; font: 9px 'DM Mono', monospace; }
.system-traffic b { color: #329260; }
.system-unavailable { color: #87928b; font-size: 10px; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); margin: 0; font-size: 12px; }
.dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #a6b1ab; }
.connected .dot { background: #24a265; box-shadow: 0 0 0 3px #e1f4e9; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 9px 14px; font-weight: 600; transition: background .15s, border .15s, transform .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .47; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { color: var(--green-dark); background: #f0f7f2; border-color: #d9e9de; }
.button-quiet { color: #506057; background: #fff; border-color: var(--line); }
.button-quiet:hover:not(:disabled) { background: #f6f9f7; border-color: #cfdad2; }
.button-small { padding: 7px 10px; font-size: 12px; }
.button-start { color: #fff; background: var(--green); }
.button-stop { color: #fff; background: #45534b; }
.button-danger-quiet { color: #9b514d; background: transparent; border-color: transparent; }
.button-danger-quiet:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }
.page { width: auto; margin: 24px var(--page-gutter) 70px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: 1.35px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(27px, 3.3vw, 35px); letter-spacing: -1.15px; line-height: 1.1; }
.subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.process-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 13px; }
.process-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 166px; padding: 12px; overflow: visible; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.process-card.card-idle { background: #fafcfb; }
.process-card.card-state-muted { background: #eef1ef; }
.process-card.card-state-info { background: var(--blue-soft); }
.process-card.card-state-warning { background: var(--amber-soft); }
.process-card.card-state-error { background: var(--red-soft); }
.card-heading { display: flex; align-items: center; gap: 7px; min-width: 0; }
.card-status-area { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.process-title { display: flex; align-items: center; flex: 1 1 auto; gap: 8px; min-width: 0; }
.process-title h2 { overflow: hidden; flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.15px; text-overflow: ellipsis; white-space: nowrap; }
.process-indicator { flex: 0 0 auto; width: 9px; height: 9px; border: 2px solid #aeb8b1; border-radius: 50%; }
.indicator-on { border-color: #1b925b; background: #1b925b; box-shadow: 0 0 0 4px #e7f4eb; }
.state-badge { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 4px 7px; border-radius: 20px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.state-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-running { color: var(--green); background: var(--green-soft); }
.state-muted { color: #65736b; background: #eef1ef; }
.state-error { color: var(--red); background: var(--red-soft); }
.state-warning { color: var(--amber); background: var(--amber-soft); }
.state-info { color: var(--blue); background: var(--blue-soft); }
.card-menu { position: relative; z-index: 1; flex: 0 0 auto; }
.card-menu[open] { z-index: 10; }
.card-menu-area { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.card-menu-toggle { display: grid; place-items: center; width: 27px; height: 27px; color: #59665e; background: #f4f7f5; border: 1px solid var(--line); border-radius: 7px; list-style: none; cursor: pointer; }
.card-menu-toggle::-webkit-details-marker { display: none; }
.card-menu-toggle::marker { content: ""; }
.card-menu-toggle:hover { color: var(--green-dark); background: var(--green-soft); }
.card-menu-popup { position: absolute; bottom: calc(100% + 5px); left: 0; z-index: 10; display: grid; gap: 2px; width: 174px; max-height: min(65vh, 360px); overflow-y: auto; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 28px rgba(16, 32, 22, .18); }
.card-menu:not([open]) > .card-menu-popup { display: none; }
.card-menu-popup button { width: 100%; padding: 7px 9px; color: #46534b; background: transparent; border: 0; border-radius: 6px; font-size: 11px; text-align: left; }
.card-menu-popup button:hover:not(:disabled) { background: #f0f6f2; }
.card-menu-popup button:disabled { color: #a4ada7; cursor: not-allowed; }
.card-menu-popup .card-menu-delete { color: var(--red); }
.card-menu-popup .card-menu-delete:hover { background: var(--red-soft); }
.recovery-countdown { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 58px; padding: 4px 6px; color: #8a6214; background: #fff5dc; border: 1px solid #f0dfb5; border-radius: 7px; font: 600 9px 'DM Mono', monospace; white-space: nowrap; }
.card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 10px; margin: 14px 0 13px; }
.metric { min-width: 0; }
.metric > span { display: block; margin-bottom: 2px; color: #86918a; font-size: 9px; }
.metric strong { display: block; overflow: hidden; font: 500 14px 'DM Mono', monospace; text-overflow: ellipsis; white-space: nowrap; }
.metric small { color: #7e8b83; font: 10px 'DM Sans', sans-serif; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px solid #edf0ee; }
.card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.card-actions .button { width: auto; padding: 7px 9px; font-size: 11px; }
.card-recovery-toggle { display: inline-flex; min-width: 0; align-items: center; gap: 6px; color: #526057; font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.card-recovery-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); cursor: pointer; }
.card-recovery-toggle input:disabled { cursor: wait; }
.empty-state { padding: 70px 20px; text-align: center; background: var(--card); border: 1px dashed #d5dfd8; border-radius: 12px; }
.empty-state[hidden] { display: none; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 17px; color: var(--green); background: var(--green-soft); border-radius: 16px; font-size: 19px; }
.empty-state h2 { margin-bottom: 7px; font-size: 17px; }
.empty-state p { margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.page-error { margin-top: 17px; padding: 11px 13px; color: var(--red); background: var(--red-soft); border-radius: 8px; }
.page-error[hidden] { display: none; }
.dialog { width: min(580px, calc(100% - 28px)); max-height: min(90vh, 760px); padding: 0; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 22px 70px rgba(16, 32, 22, .25); }
.dialog::backdrop { background: rgba(19, 32, 24, .42); backdrop-filter: blur(3px); }
.dialog-form { padding: 23px; }
.process-dialog { width: min(960px, calc(100% - 28px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 21px; }
.dialog-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.icon-button { width: 31px; height: 31px; color: #657168; background: #f0f3f1; border: 0; border-radius: 8px; font-size: 21px; line-height: 1; }
.dialog-form label { display: block; margin: 14px 0 6px; color: #46534b; font-size: 11px; font-weight: 700; }
.dialog-form input, .dialog-form textarea { width: 100%; padding: 10px 11px; color: var(--ink); background: #fbfcfb; border: 1px solid #dce4de; border-radius: 7px; outline: none; }
.dialog-form input:focus, .dialog-form textarea:focus { border-color: #5d9b76; box-shadow: 0 0 0 3px #e7f3ea; }
.dialog-form textarea { resize: vertical; font: 12px/1.55 'DM Mono', monospace; }
.process-dialog textarea { min-height: 260px; }
.preview-edit-dialog { width: min(1120px, calc(100% - 28px)); max-height: min(92vh, 900px); overflow-y: auto; }
.preview-edit-dialog .dialog-heading { margin-bottom: 10px; }
.preview-tabs { display: flex; gap: 5px; margin: 17px 0 0; border-bottom: 1px solid var(--line); }
.preview-tab { padding: 10px 14px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.preview-tab.active { color: var(--green); border-bottom-color: var(--green); }
.preview-tab:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.preview-panel { padding: 13px 2px 2px; }
.preview-panel[hidden] { display: none; }
.preview-panel > label { margin-top: 11px; }
.preview-panel textarea { min-height: 220px; }
.preview-panel > h3 { margin: 0 0 8px; color: var(--ink); font-size: 13px; }
.field-hint { margin: 8px 0 0; color: #839087; font-size: 10px; line-height: 1.6; }
.field-hint code, footer code { font: 10px 'DM Mono', monospace; }
.form-error { margin: 12px 0 0; padding: 9px 10px; color: var(--red); background: var(--red-soft); border-radius: 7px; font-size: 11px; }
.form-error[hidden] { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 15px; border-top: 1px solid var(--line); }
.logs-dialog { width: min(1180px, calc(100% - 28px)); height: min(760px, calc(90vh - 24px)); max-height: min(90vh, 760px); overflow: hidden; }
.logs-dialog .dialog-form { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.logs-dialog .logs-content { flex: 1 1 auto; min-height: 120px; max-height: none; }
.recovery-logs-dialog { width: min(1180px, calc(100% - 28px)); height: min(760px, calc(90vh - 24px)); max-height: min(90vh, 760px); overflow: hidden; }
.recovery-logs-dialog .dialog-form { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.recovery-log-selector { display: flex !important; align-items: center; gap: 12px; flex: 0 0 auto; margin: 0 0 12px !important; }
.recovery-log-selector select { width: min(420px, 70%); padding: 8px 10px; color: var(--ink); background: #fbfcfb; border: 1px solid #dce4de; border-radius: 7px; }
.recovery-logs-dialog .logs-content { flex: 1 1 auto; min-height: 120px; max-height: none; }
.ffmpeg-info-dialog { width: min(1180px, calc(100% - 28px)); height: min(820px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; }
.ffmpeg-info-dialog .dialog-form { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.ffmpeg-info-toolbar { display: grid; grid-template-columns: 170px minmax(0, 360px); align-items: center; gap: 12px; }
.ffmpeg-info-toolbar label { color: #46534b; font-size: 11px; font-weight: 700; }
.ffmpeg-info-toolbar select { width: 100%; min-width: 0; max-width: 360px; padding: 8px 10px; color: var(--ink); background: #fbfcfb; border: 1px solid #dce4de; border-radius: 7px; }
.ffmpeg-info-category-toolbar { margin-top: 10px; }
#ffmpeg-info-status { flex: 0 0 auto; margin: 10px 0; }
.ffmpeg-info-output { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 14px; color: #dbe8df; background: #17221c; border-radius: 8px; font: 11px/1.55 'DM Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.ffmpeg-info-output[hidden] { display: none; }
.metrics-settings-dialog { width: min(560px, calc(100% - 28px)); }
.metrics-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.metrics-option { display: flex !important; align-items: center; gap: 9px; min-width: 0; margin: 0 !important; padding: 11px; color: #46534b; background: #f8faf8; border: 1px solid var(--line); border-radius: 8px; font-size: 11px !important; cursor: pointer; }
.metrics-option input { flex: 0 0 auto; width: 15px !important; height: 15px; margin: 0; accent-color: var(--green); }
.metrics-option span { overflow-wrap: anywhere; }
.preview-dialog { width: min(960px, calc(100% - 28px)); height: min(820px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; }
.preview-dialog .dialog-form { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding: 16px 20px; }
.preview-dialog .dialog-heading { margin-bottom: 10px; }
.preview-message { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.preview-progress { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 24px; }
.preview-progress progress { width: 112px; height: 8px; accent-color: var(--green); }
.preview-progress.preview-finished progress { visibility: hidden; }
.preview-progress .preview-message { margin: 0; flex: 1; }
.preview-elapsed { color: #738078; font: 10px 'DM Mono', monospace; }
.preview-log { flex: 1 1 auto; min-height: 70px; overflow: auto; margin: 0 0 12px; padding: 9px 11px; color: #dbe8df; background: #17221c; border-radius: 8px; font: 10px/1.5 'DM Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-result { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.preview-result[hidden] { display: none; }
.preview-dialog.preview-ready .preview-result:not([hidden]) { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(72px, .28fr) auto; gap: 5px; flex: 1 1 auto; overflow: hidden; align-content: stretch; }
.preview-dialog.preview-ready .preview-result[hidden] { display: none; }
.preview-dialog.preview-ready .preview-image[hidden],
.preview-dialog.preview-ready .preview-waveform[hidden] { display: none; }
.preview-image { display: block; width: min(100%, 680px, max(240px, calc((100dvh - 490px) * 1.7778))); max-height: 35dvh; height: auto; margin: 0 auto 8px; object-fit: contain; background: #111; border-radius: 8px; }
.preview-dialog.preview-ready .preview-image,
.preview-dialog.preview-ready .preview-waveform { width: min(100%, 680px); height: 100%; max-height: none; margin: 0 auto; object-fit: contain; }
.preview-image[hidden] { display: none; }
.preview-waveform { display: block; width: min(100%, 680px, max(240px, calc((100dvh - 490px) * 1.7778))); max-height: 18dvh; height: auto; margin: 0 auto 8px; background: #17221c; border-radius: 8px; }
.preview-waveform[hidden] { display: none; }
.preview-section-title { margin: 5px auto 6px; width: min(100%, 680px, max(240px, calc((100dvh - 460px) * 1.7778))); font-size: 12px; }
.preview-details { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; width: min(100%, 680px); margin: 0 auto; }
.preview-details > div { flex: 1 1 0; min-width: 0; padding: 8px 6px; background: #f3f6f4; border-radius: 7px; text-align: center; }
.preview-details span { display: block; margin-bottom: 3px; color: #839087; font-size: 9px; text-transform: uppercase; }
.preview-details strong { color: #3b4a40; font: 11px 'DM Mono', monospace; overflow-wrap: anywhere; }
.login-dialog { width: min(430px, calc(100% - 28px)); }
@media (max-width: 600px) { .preview-tab { padding: 9px 8px; font-size: 11px; } .preview-panel textarea { min-height: 170px; } .preview-dialog { height: min(820px, calc(100dvh - 16px)); max-height: calc(100dvh - 16px); } .preview-dialog .dialog-form { padding: 12px; } }
.login-help { margin: -8px 0 13px; line-height: 1.6; }
.login-help code { color: #435d4d; font: 10px 'DM Mono', monospace; }
.logs-content { max-height: min(60vh, 600px); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 13px; color: #dbe8df; background: #17221c; border-radius: 8px; font: 11px/1.6 'DM Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.last-error-dialog { width: min(680px, calc(100% - 28px)); }
.last-error-time { margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.last-error-content { max-height: min(55vh, 520px); overflow: auto; margin: 0; padding: 13px; color: #783c38; background: #fff8f7; border: 1px solid #f0d8d5; border-radius: 8px; font: 12px/1.6 'DM Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
footer { padding: 18px 24px 25px; color: #89958d; text-align: center; font-size: 10px; }
footer span { padding: 0 5px; }

@media (min-width: 761px) and (max-width: 1024px) {
  .topbar { flex-wrap: wrap; }
  .system-metrics { order: 4; flex: 1 0 100%; }
}

@media (max-width: 760px) {
  .topbar { height: auto; min-height: 65px; padding: 12px 16px; gap: 12px; flex-wrap: nowrap; justify-content: flex-start; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .connection { display: inline-flex; flex: 0 0 auto; margin-left: auto; font-size: 10px; }
  .mobile-menu-button { position: relative; z-index: 22; display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; padding: 0; color: #35443a; background: #f3f7f4; border: 1px solid var(--line); border-radius: 9px; font-size: 19px; }
  .mobile-menu-button:hover, .mobile-menu-button[aria-expanded="true"] { color: var(--green-dark); background: var(--green-soft); }
  .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 20; display: block; width: 100%; height: 100%; padding: 0; background: rgba(19, 32, 24, .42); border: 0; }
  .mobile-menu-backdrop[hidden] { display: none; }
  .mobile-drawer { position: fixed; inset: 0 0 0 auto; z-index: 21; display: none; width: min(360px, calc(100vw - 44px)); height: 100vh; height: 100dvh; flex-direction: column; align-items: stretch; gap: 17px; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px 26px; background: var(--card); box-shadow: -14px 0 40px rgba(16, 32, 22, .18); }
  .mobile-drawer.is-open { display: flex; }
  .mobile-drawer-heading { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; margin-bottom: 1px; font-size: 16px; }
  .mobile-drawer .process-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .mobile-drawer .process-actions > .button { width: 100%; padding: 11px 12px; text-align: left; }
  .mobile-drawer .process-summary { flex: 0 0 auto; width: 100%; min-height: 64px; padding: 7px 10px; }
  .mobile-drawer .process-summary-item > span { font-size: 10px; }
  .mobile-drawer .process-summary-item > strong { font-size: 12px; }
  .mobile-drawer .system-metrics { display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; max-height: none; overflow: visible; padding: 0; }
  .mobile-drawer .system-metric { flex: 0 0 auto; width: 100%; padding: 8px 10px; }
  .mobile-drawer .system-metric-heading { font-size: 10px; }
  .mobile-drawer .system-metric-heading strong { font-size: 11px; }
  .mobile-drawer .system-metric small { font-size: 9px; }
  .mobile-drawer .top-actions { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; margin-left: 0; }
  .mobile-drawer .top-actions .button { width: 100%; padding: 11px 12px; font-size: 12px; text-align: left; }
  .page { margin: 29px 16px 70px; }
}

@media (max-width: 1200px) {
  .process-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .process-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .brand { font-size: 13px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .top-actions { margin-left: auto; }
  .ffmpeg-info-toolbar { grid-template-columns: minmax(96px, 140px) minmax(0, 1fr); align-items: center; gap: 8px; }
  .ffmpeg-info-toolbar select { width: 100%; min-width: 0; }
  .metrics-options { grid-template-columns: 1fr; }
}
