/* Hallmark · pre-emit critique: P5 H5 E4 S5 R4 V5 · macrostructure: Workbench · tone: friendly-utilitarian · anchor hue: coral · theme: Hum · enrichment: none · nav: N13 · footer: Ft5 · F3 knobs: columns=3, rules=groups-of-3, numbers=tabular · contrast: pass (40–41) · slop: pass (1–57) · mobile: pass (34, 49, 50–57) */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@10..48,600;10..48,700&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@500;600&display=swap");
@import url("./tokens.css");

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--color-paper); }
body {
  min-width: 320px;
  margin: 0;
  background: radial-gradient(circle at 7% 4%, var(--color-paper-glow), transparent 25rem), var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  font-synthesis: none;
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: 0.55; }
button:active, a:active { transform: translateY(1px); }
a { text-decoration: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3, p { margin-block-start: 0; }
h1, h2, h3 { font-family: var(--font-display); font-style: normal; line-height: 1.08; letter-spacing: -0.035em; }

.app-shell { min-height: 100dvh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: var(--space-xl);
  min-height: 72px;
  padding: var(--space-sm) clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-paper);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; background: var(--color-accent); color: var(--color-accent-ink); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; transform: rotate(-5deg); }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.brand-kicker { color: var(--color-muted); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.search-pill { display: flex; align-items: center; gap: var(--space-xs); width: min(360px, 100%); min-height: 44px; margin-inline: auto; padding: 0 var(--space-xs) 0 var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-muted); text-align: left; transition: border-color var(--dur-mid) var(--ease-out), background var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); }
.search-pill:hover { border-color: var(--color-rule-2); background: var(--color-panel); transform: translateY(-1px); }
.search-pill:active { transform: translateY(1px); }
.search-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; }
.search-icon svg { width: 15px; height: 15px; }
.search-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { padding: 0.3rem 0.38rem; border: 1px solid var(--color-rule-2); border-radius: 4px; background: var(--color-panel); color: var(--color-ink-2); font-family: var(--font-outlier); font-size: 0.68rem; line-height: 1; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-xs); }
.topbar-link { min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.topbar-link:hover { background: var(--color-paper-2); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--color-rule-2); border-radius: 50%; background: var(--color-yellow); font-family: var(--font-display); font-weight: 700; }

.workspace { display: grid; grid-template-columns: minmax(310px, 0.84fr) minmax(0, 1.6fr); gap: clamp(1rem, 4vw, 4rem); max-width: 1500px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 4.5rem) clamp(1rem, 4vw, 3.5rem) var(--space-3xl); }
.capture-column, .inventory-column { min-width: 0; }
.inventory-column { padding-block-start: var(--space-2xl); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-xs); margin: 0 0 var(--space-md); color: var(--color-ink-2); font-family: var(--font-outlier); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow::before { width: 22px; height: 3px; border-radius: var(--radius-pill); background: var(--color-cool); content: ""; }
h1 { max-width: 12ch; margin-block-end: var(--space-md); font-size: clamp(2.65rem, 5vw, 4.7rem); overflow-wrap: anywhere; }
.intro { max-width: 45ch; margin-block-end: var(--space-xl); color: var(--color-ink-2); font-size: var(--text-md); line-height: 1.45; }
.quiet-note { color: var(--color-muted); font-size: var(--text-sm); }
.capture-note { margin-top: var(--space-md); }

.capture-card { border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-panel); box-shadow: var(--shadow-card); }
.capture-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.capture-head h2 { margin: 0; font-size: var(--text-lg); }
.step-badge { display: inline-flex; align-items: center; min-height: 28px; padding-inline: var(--space-sm); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-muted); font-family: var(--font-outlier); font-size: var(--text-xs); white-space: nowrap; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xs); margin: var(--space-lg) var(--space-lg) 0; padding: var(--space-2xs); border-radius: var(--radius-md); background: var(--color-paper-2); }
.mode-tab { min-height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-muted); font-weight: 600; }
.mode-tab:hover { color: var(--color-ink); }
.mode-tab.is-active { background: var(--color-panel); color: var(--color-ink); box-shadow: 0 2px 8px -6px var(--color-shadow); }
.capture-body { padding: var(--space-lg); }
.input-label { display: block; margin-block-end: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 600; }
.helper { min-height: 1lh; margin: var(--space-xs) 0 0; color: var(--color-muted); font-size: var(--text-xs); }
.dropzone { position: relative; display: grid; place-items: center; min-height: 210px; padding: var(--space-lg); border: 1px dashed var(--color-rule-2); border-radius: var(--radius-md); background: var(--color-paper-2); text-align: center; transition: border-color var(--dur-mid) var(--ease-out), background var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--color-accent); background: var(--color-paper-coral); transform: translateY(-1px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto var(--space-sm); border-radius: 15px; background: var(--color-cool); color: var(--color-cool-ink); }
.dropzone-icon svg { width: 23px; height: 23px; }
.dropzone strong { display: block; margin-block-end: 0.15rem; font-size: var(--text-md); }
.dropzone span { display: block; color: var(--color-muted); font-size: var(--text-sm); }
.preview { position: relative; overflow: hidden; min-height: 210px; border-radius: var(--radius-md); background: var(--color-paper-2); }
.preview img { display: block; width: 100%; height: 210px; object-fit: cover; }
.preview::after { position: absolute; right: var(--space-sm); bottom: var(--space-sm); padding: 0.35rem 0.55rem; border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-ink-2); content: "Bereit zur Analyse"; font-size: var(--text-xs); font-weight: 700; }
.preview-clear { position: absolute; z-index: 1; top: var(--space-sm); right: var(--space-sm); display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--color-rule); border-radius: 50%; background: var(--color-panel); }
.preview-clear:hover { background: var(--color-paper-2); }
textarea, input[type="number"], select { width: 100%; min-height: 44px; border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm); outline: 2px solid transparent; outline-offset: 1px; background: var(--color-panel); color: var(--color-ink); }
textarea { min-height: 210px; padding: var(--space-md); resize: vertical; line-height: 1.5; }
input[type="number"], select { padding: 0 var(--space-sm); }
textarea:hover, input[type="number"]:hover, select:hover { background: var(--color-paper-2); }
textarea:focus, input[type="number"]:focus, select:focus { outline-color: var(--color-focus); border-color: var(--color-ink-2); }
textarea[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--color-error); }
textarea:disabled, input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; background: var(--color-paper-2); }
.action-row { display: flex; align-items: center; gap: var(--space-sm); margin-block-start: var(--space-lg); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: 1px solid transparent; border-radius: var(--radius-pill); font-weight: 700; white-space: nowrap; transition: background var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out), color var(--dur-mid) var(--ease-out); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--color-accent); color: var(--color-accent-ink); }
.button-primary:hover { background: var(--color-accent-ink); color: var(--color-paper); }
.button-secondary { border-color: var(--color-rule-2); background: var(--color-panel); color: var(--color-ink-2); }
.button-secondary:hover { background: var(--color-paper-2); }
.button[aria-busy="true"] { pointer-events: none; }
.button[aria-busy="true"]::before { width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; content: ""; }
.button.is-success { background: var(--color-success); color: var(--color-white-ink); }
.capture-status { min-height: 1lh; margin: var(--space-sm) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.capture-status[data-state="success"] { color: var(--color-success); }
.capture-status[data-state="error"] { color: var(--color-error); }

.inventory-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); align-items: start; margin-block-end: var(--space-xl); }
.inventory-heading h2 { margin: 0; font-size: clamp(2rem, 3vw, 3.2rem); }
.inventory-heading > p { justify-self: end; max-width: 45ch; margin: 0; color: var(--color-muted); font-size: var(--text-sm); text-align: right; }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); margin-block-end: var(--space-xl); }
.stat { min-width: 0; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-panel); }
.stat-value { display: block; color: var(--color-ink); font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.stat-label { display: block; margin-block-start: var(--space-2xs); color: var(--color-muted); font-size: var(--text-xs); }
.stat-accent { background: var(--color-yellow); border-color: transparent; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-block-end: var(--space-md); }
.filter-tabs { display: flex; align-items: center; gap: var(--space-2xs); overflow-x: auto; padding-block: 2px; }
.filter-tab { min-height: 40px; padding-inline: var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.filter-tab:hover { background: var(--color-paper-2); color: var(--color-ink); }
.filter-tab.is-active { background: var(--color-ink); color: var(--color-paper); }
.add-item { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding-inline: var(--space-sm); border: 0; border-radius: var(--radius-pill); background: var(--color-cool); color: var(--color-cool-ink); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.add-item:hover { background: var(--color-cool-ink); color: var(--color-paper); transform: translateY(-1px); }
.review-panel { margin-block-end: var(--space-xl); border: 1px solid var(--color-accent); border-radius: var(--radius-lg); background: var(--color-paper-coral); }
.review-head { display: flex; align-items: start; justify-content: space-between; gap: var(--space-md); padding: var(--space-lg); border-bottom: 1px solid var(--color-accent); }
.review-title { display: flex; gap: var(--space-sm); }
.review-spark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 12px; background: var(--color-accent); color: var(--color-accent-ink); }
.review-spark svg { width: 20px; }
.review-head h3 { margin: 0; font-size: var(--text-md); letter-spacing: -0.02em; }
.review-head p { margin: 0.2rem 0 0; color: var(--color-ink-2); font-size: var(--text-sm); }
.review-count { display: inline-flex; align-items: center; min-height: 28px; padding-inline: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-panel); color: var(--color-ink-2); font-family: var(--font-outlier); font-size: var(--text-xs); white-space: nowrap; }
.review-list { display: grid; gap: var(--space-xs); padding: var(--space-sm); }
.review-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(112px, 0.8fr) minmax(98px, 0.65fr) auto; align-items: center; gap: var(--space-sm); min-width: 0; padding: var(--space-sm); border: 1px solid transparent; border-radius: var(--radius-md); background: var(--color-panel); }
.review-item:hover { border-color: var(--color-accent); }
.review-item.is-actions-open, .inventory-row.is-actions-open { z-index: 5; }
.review-item.is-keyboard-active, .inventory-row.is-keyboard-active { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.item-check { width: 18px; height: 18px; accent-color: var(--color-accent); }
.item-identity { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.item-thumb, .inventory-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-paper-2); color: var(--color-ink-2); }
.item-thumb svg, .inventory-icon svg { width: 25px; height: 25px; }
.item-copy { min-width: 0; }
.item-name, .inventory-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.12rem; color: var(--color-muted); font-size: var(--text-xs); }
.source-badge { display: inline-flex; align-items: center; min-height: 22px; padding-inline: 0.45rem; border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink-2); font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.source-badge.estimated { background: var(--color-paper-yellow); color: var(--color-ink-2); }
.source-badge.market { background: var(--color-paper-cool); color: var(--color-cool-ink); }
.market-note { color: var(--color-muted); font-size: 0.68rem; }
.item-field { min-width: 0; }
.item-field label { display: block; margin-block-end: 0.2rem; color: var(--color-muted); font-size: 0.68rem; }
.item-field select, .item-field input { min-height: 38px; font-size: var(--text-sm); }
.item-delete, .row-menu { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--color-muted); }
.item-delete:hover, .row-menu:hover { background: var(--color-paper-2); color: var(--color-error); }
.row-menu-wrap { position: relative; z-index: 6; display: grid; place-items: center; width: 38px; height: 38px; }
.row-actions-menu { position: absolute; z-index: 7; top: 0; right: calc(100% + var(--space-xs)); display: grid; min-width: 168px; padding: var(--space-2xs); border: 1px solid var(--color-rule-2); border-radius: var(--radius-md); background: var(--color-panel); box-shadow: var(--shadow-card); }
.row-actions-menu[hidden] { display: none; }
.row-actions-menu button { min-height: 36px; padding: 0.45rem 0.65rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink-2); text-align: left; font-size: var(--text-sm); font-weight: 650; }
.row-actions-menu button:hover, .row-actions-menu button:focus-visible { background: var(--color-paper-2); color: var(--color-ink); }
.review-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.review-foot-copy { min-width: 0; }
.review-foot small { color: var(--color-ink-2); }
.market-status { max-width: 58ch; margin: 0.25rem 0 0; color: var(--color-muted); font-size: var(--text-xs); }
.market-status[data-state="success"] { color: var(--color-success); }
.market-status[data-state="error"] { color: var(--color-error); }
.review-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: var(--space-xs); }
.review-actions .button { min-width: 148px; }

.inventory-list { overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-panel); }
.inventory-list-head, .inventory-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(96px, 0.8fr) minmax(88px, 0.6fr) auto; gap: var(--space-md); align-items: center; }
.inventory-list-head { padding: var(--space-sm) var(--space-lg); border-bottom: 1px solid var(--color-rule); color: var(--color-muted); font-family: var(--font-outlier); font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; }
.inventory-row { position: relative; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.inventory-row.is-key-selected { background: var(--color-paper-cool); }
.inventory-row:last-child { border-bottom: 0; }
.inventory-main { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.inventory-icon.cool { background: var(--color-paper-cool); }
.inventory-icon.yellow { background: var(--color-yellow); }
.inventory-icon.coral { background: var(--color-paper-coral); }
.inventory-location { display: block; overflow: hidden; color: var(--color-muted); font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.value strong { display: block; font-size: var(--text-sm); }
.value span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.row-menu:hover { color: var(--color-ink); }
.keyboard-hint { color: var(--color-muted); font-family: var(--font-outlier); font-size: 0.68rem; letter-spacing: 0.03em; white-space: nowrap; }
.empty-state { padding: var(--space-xl); color: var(--color-muted); text-align: center; }
.empty-state strong { display: block; margin-block-end: var(--space-xs); color: var(--color-ink); }

.footer { max-width: 1500px; margin: 0 auto; padding: var(--space-2xl) clamp(1rem, 4vw, 3.5rem) var(--space-xl); }
.footer-line { max-width: 28ch; margin: 0 0 var(--space-lg); font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 3.1rem); line-height: 1; letter-spacing: -0.04em; }
.footer-meta { display: flex; justify-content: space-between; gap: var(--space-md); padding-block-start: var(--space-sm); border-top: 1px solid var(--color-rule); color: var(--color-muted); font-size: var(--text-xs); }
.footer-meta a { white-space: nowrap; }

.toast { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: var(--space-lg); z-index: 60; display: flex; align-items: center; gap: var(--space-md); max-width: min(390px, calc(100% - 2rem)); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-md); background: var(--color-ink); color: var(--color-paper); box-shadow: var(--shadow-toast); transform: translateY(18px); opacity: 0; pointer-events: none; transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); }
.toast.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast-message { flex: 1; font-size: var(--text-sm); }
.toast-undo { min-height: 38px; padding-inline: var(--space-sm); border: 1px solid var(--color-rule-2); border-radius: var(--radius-pill); background: transparent; color: var(--color-paper); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.toast-undo:hover { background: var(--color-ink-2); }

dialog { width: min(560px, calc(100% - 2rem)); max-height: min(80dvh, 40rem); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--color-rule-2); border-radius: var(--radius-lg); background: var(--color-panel); color: var(--color-ink); box-shadow: var(--shadow-dialog); }
dialog::backdrop { background: var(--color-scrim); backdrop-filter: blur(4px); }
.command-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); border-bottom: 1px solid var(--color-rule); }
.command-head input { flex: 1; min-height: 44px; border: 0; outline: 0; background: transparent; font-size: var(--text-md); }
.dialog-close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--color-muted); font-size: 1.4rem; }
.dialog-close:hover { background: var(--color-paper-2); }
.command-results { max-height: 46dvh; overflow: auto; padding: var(--space-sm); }
.command-group { margin: var(--space-sm) var(--space-sm) var(--space-xs); color: var(--color-muted); font-family: var(--font-outlier); font-size: var(--text-xs); letter-spacing: 0.07em; text-transform: uppercase; }
.command-item { display: flex; align-items: center; gap: var(--space-sm); width: 100%; min-height: 48px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-sm); background: transparent; text-align: left; }
.command-item:hover { background: var(--color-paper-2); }
.command-item strong { display: block; font-size: var(--text-sm); }
.command-item small { display: block; margin-top: 0.1rem; color: var(--color-muted); font-size: var(--text-xs); }
.command-foot { display: flex; gap: var(--space-md); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--color-rule); color: var(--color-muted); font-size: var(--text-xs); }
.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; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.review-item, .inventory-row { animation: rise 260ms var(--ease-out) both; }

@media (min-width: 40rem) {
  .capture-card { position: sticky; top: 96px; }
}
@media (max-width: 60rem) {
  .workspace { grid-template-columns: 1fr; }
  .inventory-column { padding-block-start: 0; }
  .capture-card { position: static; }
}
@media (max-width: 40rem) {
  .topbar { grid-template-columns: 1fr auto; gap: var(--space-sm); min-height: 64px; }
  .search-pill { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; }
  .topbar-link, .brand-kicker { display: none; }
  .workspace { padding-top: var(--space-xl); }
  h1 { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .intro { font-size: var(--text-base); }
  .inventory-heading { display: grid; }
  .inventory-heading > p { justify-self: start; margin-top: var(--space-sm); text-align: left; }
  .stats-strip { gap: var(--space-xs); }
  .stat { padding: var(--space-sm); }
  .stat-value { font-size: var(--text-lg); }
  .stat-label { font-size: 0.68rem; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .filter-tabs { max-width: 100%; width: 100%; }
  .add-item { justify-content: center; }
  .action-row { align-items: stretch; flex-direction: column; }
  .action-row .button { width: 100%; }
  .review-head { align-items: stretch; flex-direction: column; gap: var(--space-sm); padding: var(--space-md); }
  .review-title > div { min-width: 0; }
  .review-head p { line-height: 1.4; }
  .review-count { align-self: flex-start; }
  .keyboard-hint { display: block; margin-top: 0.25rem; line-height: 1.35; white-space: normal; }
  .review-list { padding: var(--space-xs); }
  .review-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-xs); }
  .review-item .item-field { grid-column: 2 / -1; }
  .review-item .item-field:last-of-type { grid-column: 2; }
  .review-item .row-menu-wrap { grid-column: 3; grid-row: 2; justify-self: end; }
  .review-foot { align-items: stretch; flex-direction: column; padding: var(--space-sm) var(--space-md) var(--space-md); }
  .review-actions { width: 100%; flex-direction: column; }
  .review-actions .button { width: 100%; }
  .inventory-list-head { display: none; }
  .inventory-row { grid-template-columns: minmax(0, 1fr) max-content; gap: var(--space-xs) var(--space-sm); padding: var(--space-md); }
  .inventory-row > .inventory-main { grid-column: 1; grid-row: 1 / 4; align-self: center; }
  .inventory-row > .value { grid-column: 2; min-width: 76px; text-align: right; }
  .inventory-row > .value:nth-of-type(2) { grid-row: 1; }
  .inventory-row > .value:nth-of-type(3) { grid-row: 2; }
  .inventory-row > .row-menu-wrap { grid-column: 2; grid-row: 3; justify-self: end; }
  .inventory-row > .value span { white-space: nowrap; }
  .footer-meta { align-items: start; flex-direction: column; }
}
@media (pointer: coarse) {
  .button, .add-item, .filter-tab, .topbar-link, .mode-tab { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
}
