:root {
  color-scheme: dark;
  --paper: #090909;
  --surface: #121212;
  --ink: #f4f0e7;
  --muted: #aaa49a;
  --line: rgba(210, 166, 77, .18);
  --accent: #b74f41;
  --accent-dark: #8f3a30;
  --gold: #d2a64d;
  --panel: rgba(18, 18, 18, .94);
  --raised: #181818;
  --soft-ink: #96958f;
  --quiet-ink: #8f8e87;
  --timer: #74746e;
  --meter-line: #34312c;
  --shadow: rgba(0, 0, 0, .48);
  --gold-hover: #e0bb69;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f1ece4;
  --surface: #fffdf8;
  --ink: #16130f;
  --muted: #574f45;
  --line: rgba(91, 61, 17, .32);
  --accent: #963b30;
  --accent-dark: #84362c;
  --gold: #82580e;
  --panel: rgba(255, 253, 248, .98);
  --raised: #e9e2d7;
  --soft-ink: #5e574d;
  --quiet-ink: #585147;
  --timer: #514b43;
  --meter-line: #bdb2a2;
  --shadow: rgba(65, 45, 15, .18);
  --gold-hover: #996815;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--paper); color: var(--ink); }
body { min-height: 100vh; margin: 0; font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif; background: radial-gradient(circle at 50% -10%, rgba(210,166,77,.11), transparent 32%), var(--paper); transition: color .22s, background-color .22s; }
html[lang="ja"] body { font-family: 'Hiragino Sans', 'Yu Gothic', YuGothic, 'Noto Sans JP', sans-serif; }
button, select { font: inherit; }
button { color: inherit; }
.site-header { height: 74px; padding: 0 clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.wordmark b { color: var(--gold); font-weight: 700; }
.wordmark-symbol { width: 52px; height: 52px; flex: 0 0 52px; display: block; overflow: hidden; border-radius: 50%; background: #050505; }
.wordmark-symbol img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.55); }
.header-tools { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 28px); }
.header-link { color: var(--muted); text-decoration: none; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: color .18s; }
.header-link:hover, .header-link[aria-current="page"] { color: var(--gold); }
.local-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.local-badge i { width: 7px; height: 7px; border-radius: 50%; background: #4c7d5f; box-shadow: 0 0 0 4px rgba(76,125,95,.10); }
.language-picker { position: relative; display: inline-flex; }
.language-picker select { min-width: 76px; height: 38px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--raised); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.theme-toggle { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--raised); cursor: pointer; transition: color .18s, background .18s, border-color .18s, transform .18s; }
.theme-toggle:hover { border-color: var(--gold); transform: translateY(-1px); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon-icon { display: none; }
:root[data-theme="light"] .theme-toggle .sun-icon { display: none; }
:root[data-theme="light"] .theme-toggle .moon-icon { display: block; }
:root[data-theme="light"] .format-card:hover { border-color: rgba(130, 88, 14, .62); }
:root[data-theme="light"] .format-card.selected { background: rgba(130, 88, 14, .10); }
:root[data-theme="light"] .mode-switch button.selected { color: #fffdf8; }
:root[data-theme="light"] .status span { background: #716b62; }
:root[data-theme="light"] .stop-button { border-color: rgba(150, 59, 48, .52); color: #7e2e25; background: #f5e3df; }
:root[data-theme="light"] .stop-button:hover { background: #efd3cd; }
:root[data-theme="light"] .meter-line { height: 2px; background: #8f806d; }
:root[data-theme="light"] .meter-bars i { background: linear-gradient(to top, #2f2922, #82580e 78%, #963b30); }
:root[data-theme="light"] .result-panel audio { padding: 3px; border: 1px solid rgba(91,61,17,.34); border-radius: 8px; background: #ded4c5; color-scheme: light; accent-color: var(--gold); filter: contrast(1.12) saturate(1.08); }
:root[data-theme="light"] .result-panel audio::-webkit-media-controls-panel { background-color: #ded4c5; }
:root[data-theme="light"] .result-panel audio::-webkit-media-controls-timeline { filter: contrast(1.55); }
.app-shell { width: min(790px, calc(100% - 36px)); margin: 0 auto; padding: 58px 0 46px; }
.intro { text-align: center; margin-bottom: 28px; }
.kicker { margin: 0 0 12px; color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 500; letter-spacing: .15em; }
.intro h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(41px, 7vw, 61px); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.intro > p:last-child { margin: 15px auto 0; color: var(--muted); font-size: 14px; }
.capture-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 28px 85px var(--shadow); }
.capture-head { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 9px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.status span { width: 8px; height: 8px; border-radius: 50%; background: #a3a39d; }
.status.live { color: var(--accent); }
.status.live span { background: var(--accent); box-shadow: 0 0 0 5px rgba(182,70,53,.12); animation: status-pulse 1.8s ease-out infinite; }
.status.paused span { background: var(--gold); }
.status.processing span { border: 1px solid var(--gold); border-right-color: transparent; background: transparent; animation: spin .8s linear infinite; }
.status.finished span { background: #4c7d5f; }
.capture-head time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--timer); font-variant-numeric: tabular-nums; }
.meter { position: relative; min-height: 234px; margin: 0 24px; border-bottom: 1px solid var(--line); }
.meter-visual { position: relative; height: 128px; display: grid; place-items: center; }
.meter-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--meter-line); }
.meter-bars { position: relative; width: 100%; height: 78px; display: flex; align-items: center; justify-content: center; gap: clamp(5px, 1vw, 10px); }
.meter-bars i { width: 3px; height: 4%; min-height: 3px; border-radius: 2px; background: linear-gradient(to top, var(--ink), var(--gold) 82%, var(--accent)); transition: height 80ms linear; }
.meter-label { position: absolute; bottom: 4px; color: var(--soft-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.meter-label.left { left: 0; }.meter-label.center { left: 50%; transform: translateX(-50%); }.meter-label.right { right: 0; }
.meter-readouts { min-height: 55px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 18px; border-top: 1px solid var(--line); }
.meter-readouts > span { min-width: 0; display: grid; gap: 3px; }
.meter-readouts small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.meter-readouts strong { overflow: hidden; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.meter-readouts .meter-clip { min-width: 48px; grid-template-columns: auto 1fr; align-items: center; gap: 6px; }
.meter-clip i { width: 8px; height: 8px; border-radius: 50%; background: var(--meter-line); transition: background .12s, box-shadow .12s; }
.meter-clip[data-state="clipped"] i { background: var(--accent); box-shadow: 0 0 0 4px rgba(183,79,65,.16); }
.meter-clip[data-state="clipped"] small { color: var(--accent); }
.loudness-readouts { min-height: 50px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 18px; border-top: 1px solid var(--line); }
.loudness-readouts > span { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.loudness-readouts small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.loudness-readouts strong { color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.loudness-readouts em { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--quiet-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7px; font-style: normal; letter-spacing: .04em; white-space: nowrap; }
.format-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 20px 22px 0; }
.format-card { position: relative; min-height: 90px; padding: 14px 15px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: border-color .18s, background .18s; }
.format-card:hover { border-color: rgba(210,166,77,.48); }
.format-card.selected { border-color: var(--gold); background: rgba(210,166,77,.07); box-shadow: inset 0 0 0 1px var(--gold); }
.format-card.selected::after { content: '✓'; position: absolute; top: 9px; right: 10px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: #090909; background: var(--gold); font-size: 10px; }
.format-card span { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.format-card small { justify-self: end; color: var(--muted); font-size: 10px; }
.format-card em { grid-column: 1 / -1; color: var(--soft-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-style: normal; }
.format-card:disabled { cursor: not-allowed; opacity: .56; }
.action-zone { padding: 25px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.record-button { min-height: 52px; padding: 0 22px; display: inline-flex; align-items: center; gap: 11px; border: 0; border-radius: 7px; color: #090909; background: var(--gold); font-size: 13px; font-weight: 650; cursor: pointer; box-shadow: 0 10px 26px rgba(210,166,77,.13); transition: transform .17s, background .17s; }
.record-button:hover { transform: translateY(-1px); background: var(--gold-hover); }
.record-dot { width: 13px; height: 13px; border: 2px solid white; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.action-zone p { margin: 0; color: var(--muted); font-size: 10px; }
.source-session { margin: 12px 22px 18px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(76,125,95,.35); border-radius: 8px; background: rgba(76,125,95,.08); }
.source-session > span { display: flex; align-items: center; gap: 8px; color: var(--soft-ink); font-size: 10px; }
.source-session i { width: 7px; height: 7px; border-radius: 50%; background: #4c7d5f; box-shadow: 0 0 0 4px rgba(76,125,95,.12); }
.source-session button { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.capture-actions { padding: 24px 22px; display: flex; justify-content: center; gap: 9px; }
.control-button, .stop-button, .new-button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .17s, background .17s; }
.control-button:hover, .new-button:hover { border-color: #aaa69d; }
.control-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.stop-button { border-color: rgba(183,79,65,.5); color: #e6a49b; background: rgba(103,39,31,.2); }
.stop-button:hover { background: rgba(103,39,31,.34); }
.stop-button > span { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.processing { min-height: 94px; padding: 22px; display: flex; align-items: center; justify-content: center; gap: 13px; }
.processing-spinner { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.processing > div, .result-head > div { display: flex; flex-direction: column; gap: 3px; }
.processing b, .result-head b { font-size: 12px; }
.processing small, .result-head small { color: var(--muted); font-size: 9px; }
.result-panel { padding: 22px; }
.result-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.result-check { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: #4c7d5f; font-size: 13px; }
.result-panel audio { width: 100%; height: 42px; margin-bottom: 15px; }
.result-actions { display: flex; gap: 9px; }
.download-button { min-height: 46px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #090909; background: var(--gold); text-decoration: none; font-size: 11px; font-weight: 650; }
.download-button:hover { background: var(--gold-hover); }
.error-message { margin: 0; padding: 13px 22px; border-top: 1px solid #e5c8c1; color: #8f3328; background: #fff4f1; font-size: 10px; line-height: 1.5; text-align: center; }
.settings { border-top: 1px solid var(--line); }
.settings summary { min-height: 52px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 650; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary::before { content: '+'; order: 3; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; font-weight: 400; }
.settings[open] summary::before { content: '−'; }
.settings-value { margin-left: auto; color: var(--muted); font-weight: 400; }
.settings-mode { margin: 0 22px 18px; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 9px; background: rgba(210,166,77,.035); }
.settings-mode > div:first-child { display: grid; gap: 3px; }
.settings-mode b { font-size: 10px; }
.settings-mode small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.mode-switch { flex: 0 0 auto; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); }
.mode-switch button { min-width: 62px; height: 30px; padding: 0 12px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.mode-switch button.selected { color: #090909; background: var(--gold); }
.mode-switch button:disabled { cursor: not-allowed; opacity: .55; }
.settings-body { padding: 0 22px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-body label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.settings-body select, .settings-body input[type="text"] { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); color: var(--ink); font-size: 11px; }
.settings-body select:disabled, .settings-body input:disabled { cursor: not-allowed; opacity: .55; }
.basic-settings-note { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.toggle-setting { grid-column: 1 / -1; min-height: 48px; display: flex !important; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.toggle-setting-wide { grid-column: 1 / -1; }
.toggle-setting > span { display: grid; gap: 2px; }
.toggle-setting b { color: var(--ink); font-size: 10px; }
.toggle-setting small { font-size: 9px; }
.toggle-setting input { appearance: none; width: 34px; height: 19px; margin: 0; padding: 2px; border-radius: 999px; background: #c9c6be; cursor: pointer; transition: background .17s; }
.toggle-setting input::before { content: ''; display: block; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.17); transition: transform .17s; }
.toggle-setting input:checked { background: var(--ink); }
.toggle-setting input:checked::before { transform: translateX(15px); }
.processing-options { grid-column: 1 / -1; margin: 2px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.processing-options legend { padding: 0 6px; color: var(--ink); font-size: 10px; font-weight: 650; }
.processing-options > p { margin: 0 0 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.processing-options .toggle-setting { min-height: 40px; padding-top: 8px; }
.encoder-status { grid-column: 1 / -1; min-height: 52px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.encoder-status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(210,166,77,.10); }
.encoder-status > span:last-child { display: grid; gap: 3px; }
.encoder-status b { color: var(--ink); font-size: 10px; }
.encoder-status small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.encoder-status[data-state="wasm"] .encoder-status-dot { background: #4c7d5f; box-shadow: 0 0 0 4px rgba(76,125,95,.12); }
.encoder-status[data-state="fallback"] .encoder-status-dot { background: var(--gold); }
.encoder-status[data-state="unavailable"] .encoder-status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(183,79,65,.12); }
.memory-estimate { grid-column: 1 / -1; padding: 13px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(135deg, rgba(210,166,77,.06), transparent 58%), var(--raised); }
.memory-estimate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memory-estimate-head b { color: var(--ink); font-size: 10px; }
.memory-estimate-head span { padding: 3px 6px; border: 1px solid rgba(210,166,77,.35); border-radius: 999px; color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7px; letter-spacing: .04em; text-transform: uppercase; }
.memory-estimate p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.memory-estimate strong { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.memory-estimate small { padding-top: 5px; border-top: 1px solid var(--line); color: var(--quiet-ink); font-size: 8px; line-height: 1.45; }
.pipeline-diagnostics { grid-column: 1 / -1; padding: 13px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.pipeline-diagnostics p { margin: 0; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 9px; }
.pipeline-diagnostics strong { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; text-align: right; }
.pipeline-diagnostics small { padding-top: 5px; border-top: 1px solid var(--line); color: var(--quiet-ink); font-size: 8px; line-height: 1.45; }
.settings-note { margin: 0; padding: 0 22px 18px; color: var(--quiet-ink); font-size: 9px; line-height: 1.5; }
.privacy-note { max-width: 610px; margin: 22px auto 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.privacy-note svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: var(--gold); stroke-width: 1.5; }
.privacy-note p { margin: 0; font-size: 10px; line-height: 1.45; }
.privacy-note b { color: var(--ink); }
footer { min-height: 64px; padding: 18px clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--quiet-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; letter-spacing: .04em; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes status-pulse { 70% { box-shadow: 0 0 0 10px rgba(182,70,53,0); } 100% { box-shadow: 0 0 0 0 rgba(182,70,53,0); } }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 620px) {
  .site-header { height: 64px; padding-inline: 16px; }
  .wordmark { font-size: 10px; }
  .wordmark-symbol { width: 46px; height: 46px; flex-basis: 46px; }
  .local-badge { font-size: 0; gap: 0; }
  .header-link { font-size: 9px; }
  .language-picker select { min-width: 70px; height: 40px; }
  .theme-toggle { width: 40px; height: 40px; }
  .app-shell { width: min(100% - 24px, 790px); padding: 36px 0 34px; }
  .intro h1 { font-size: clamp(38px, 13vw, 52px); }
  .intro > p:last-child { max-width: 34ch; line-height: 1.5; }
  .capture-head, .format-row, .action-zone, .capture-actions, .result-panel { padding-left: 16px; padding-right: 16px; }
  .meter { margin-inline: 16px; }
  .format-row { grid-template-columns: 1fr; }
  .format-card { min-height: 72px; }
  .meter { min-height: 226px; }
  .meter-visual { height: 120px; }
  .meter-readouts { gap: 10px; }
  .meter-readouts strong { font-size: 10px; }
  .loudness-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .loudness-readouts > span { display: grid; gap: 3px; }
  .loudness-readouts em { display: none; }
  .record-button { width: 100%; justify-content: center; text-align: center; }
  .capture-actions { flex-wrap: wrap; }
  .control-button, .stop-button { flex: 1 1 150px; }
  .settings-value { display: none; }
  .settings-mode { align-items: stretch; flex-direction: column; }
  .mode-switch { width: 100%; }
  .settings-body { grid-template-columns: 1fr; }
  .toggle-setting, .basic-settings-note, .processing-options, .encoder-status { grid-column: auto; }
  .result-actions { flex-direction: column; }
  .download-button, .new-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 410px) {
  .wordmark > span:not(.wordmark-symbol) { display: none; }
  .capture-panel { margin-inline: -12px; border-right: 0; border-left: 0; border-radius: 0; }
  .intro { margin-bottom: 22px; }
  .format-card { min-height: 68px; }
  .settings summary, .settings-body, .settings-note { padding-left: 16px; padding-right: 16px; }
  .settings-mode { margin-left: 16px; margin-right: 16px; }
}

@media (max-height: 700px) and (orientation: landscape) {
  .app-shell { padding-top: 28px; }
  .intro { margin-bottom: 20px; }
  .meter { min-height: 220px; }
  .meter-visual { height: 114px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
