:root {
  color-scheme: light;
  --ink: #163c34;
  --muted: #4b5f58;
  --paper: #f3f6f5;
  --line: #d8e2de;
  --accent: #d1e8a9;
  --surface: #ffffff;
  --white: var(--surface);
  --error: #9c3025;
  --card-line: #e1e8e4;
  --row-line: #edf1ef;
  --segment-bg: #e3eae6;
  --stored-fill: #4f8a73;
  --out-fill: #e8a33d;
  --out-ink: #6b4a12;
  --out-bg: #fff8e8;
  --out-line: #ecd7a6;
  --missing-fill: #c4513f;
  --missing-ink: #9c3025;
  --attention-bg: #fff6e4;
  --attention-line: #e7c9a0;
  --attention-ink: #6b4a12;
  --hero-muted: #b9cdc5;
  --link-hover: #327160;
  --nav-active-bg: #dfece7;
  --nav-active-ink: #104c3f;
  --button-hover: #285b4c;
  --media-bg: #eef0e9;
  --search-bg: #e8eddf;
  --chip-bg: #edf2e8;
  --surface-soft: #ffffff99;
  --surface-overlay: #fffffff5;
  --input-line: #b8c5b9;
  --focus: #327160;
  --success-bg: #e2efd4;
  --success-line: #c6d9b2;
  --error-bg: #fff0eb;
  --error-line: #e3b1a6;
  --empty-line: #c3ccbd;
  --context-bg: #eaf0e2;
  --context-line: #bacfb0;
  --accent-line: #b7ce7f;
  --accent-hover: #c3df80;
  --menu-hover: #eaf2ee;
  --shadow-menu: #163c3426;
  --shadow-soft: #163c3410;
  --shadow-panel: #163c3418;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--link-hover); }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea, summary { touch-action: manipulation; }
.site-header { padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.app-shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100dvh; }
.app-shell .site-header { grid-column: 1 / -1; }
.app-shell main { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; margin: 0 auto; align-self: start; }
.app-shell footer { grid-column: 2; grid-row: 3; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 25px; font-weight: 750; line-height: 1.15; }
.brand-mark { background: var(--ink); color: var(--accent); border-radius: 10px; padding: 10px 15px; }
.brand-sub { display: block; font-size: 9px; letter-spacing: 1.6px; margin-top: 5px; }
.site-nav { grid-column: 1; grid-row: 2 / 4; display: flex; flex-direction: column; gap: 8px; padding: 24px 12px; position: sticky; top: 0; align-self: start; }
.site-nav a { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 600; text-decoration: none; padding: 13px 14px; border-radius: 9px; min-height: 48px; }
.site-nav a[aria-current=page] { background: var(--nav-active-bg); color: var(--nav-active-ink); }
.site-nav svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.header-scan { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
main { max-width: 1160px; margin: auto; padding: 28px 24px 56px; }
h1 { font-size: clamp(29px, 4vw, 40px); letter-spacing: -1.1px; line-height: 1.15; margin: 8px 0 16px; overflow-wrap: anywhere; }
h2 { font-size: 22px; letter-spacing: -.4px; margin: 26px 0 14px; line-height: 1.3; overflow-wrap: anywhere; }
h3 { font-size: 18px; margin: 4px 0 10px; overflow-wrap: anywhere; }
p { margin: 10px 0; }
.muted, small { color: var(--muted); }
small { font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted); }
.intro { max-width: 740px; color: var(--muted); }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.heading h1 { margin-top: 0; }
.actions, .form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-actions { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--surface); border: 1px solid var(--ink); padding: 11px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.4; min-height: 44px; cursor: pointer; }
.button:hover, button:hover { background: var(--button-hover); color: var(--surface); }
.secondary { color: var(--ink); background: transparent; }
.danger { background: var(--error); border-color: var(--error); }
button:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; min-width: 0; overflow-wrap: anywhere; }
.card > h2:first-child { margin-top: 0; }
.grid, .add-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grid > .card { margin-bottom: 0; }
.add-options { grid-template-columns: 1fr 1fr; }
.tote-card { display: flex; flex-direction: column; text-decoration: none; }
.tote-card:hover { border-color: var(--ink); }
.tote-number { font-size: 36px; line-height: 1.2; margin-bottom: 10px; overflow-wrap: anywhere; }
.tote-card small { margin-top: 12px; }
.tote-cover { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.reference-cover { object-fit: contain; background: var(--media-bg); }
.type-reference { display: block; width: min(100%, 240px); max-height: 180px; object-fit: contain; border-radius: 8px; margin-bottom: 8px; }
.classification-filters { margin-top: 16px; }
.classification-filters summary { min-height: 44px; padding: 10px 0; }
.classification-filters { border: 0; padding: 0; margin: 6px 0 0; }
.classification-filters > summary { padding: 6px 0; }
.filter-summary { font-size: 14px; margin-bottom: 0; }
.classification-filters select { max-width: 100%; }
.tag-filter-options { max-height: 260px; overflow-y: auto; margin: 12px 0; }
.tag-filter-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; overflow-wrap: anywhere; }
.tag-filter-options input { flex: 0 0 auto; }
.type-summary h2 { margin-top: 8px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 22px; }
.section-title h2 { margin-top: 0; }
.section-title a { font-size: 14px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.segmented a { padding: 9px 24px; min-height: 44px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.segmented a[aria-current=page] { background: var(--ink); color: var(--surface); }
.library-nav { display: flex; width: fit-content; max-width: 100%; }
.library-nav a { padding: 9px 18px; }
.library-nav + .grid { margin-top: 16px; }
.place-card { display: block; text-decoration: none; }
.place-card h2 { margin: 0 0 8px; }
.place-card:hover, .place-card:focus-visible { border-color: var(--ink); }
.place-card:hover h2, .place-card:focus-visible h2 { text-decoration: underline; }
.search { padding: 18px; border-radius: 12px; background: var(--search-bg); margin: 18px 0; }
.search label { margin-top: 0; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; min-width: 80px; }
.search-row select { max-width: 170px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.chips span, .chips a, .badge { background: var(--chip-bg); border-radius: 6px; padding: 4px 9px; font-size: 13px; }
.chips a { min-height: 38px; display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere; }
.badge { display: inline-block; }
.chips .in-use, .in-use { background: var(--out-bg); color: var(--out-ink); }
.attention a { text-decoration: none; min-height: 44px; gap: 10px; }
.attention a[aria-current=page] { background: var(--ink); color: var(--surface); }
.filter-panel { margin: 14px 0 20px; background: var(--surface-soft); }
summary .choice-caption { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.holdings { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.holdings .holding { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: 16px; }
.holdings .holding:last-child { border-bottom: 0; }
.holdings .empty { margin: 0; border: 0; }
.holding-climate { grid-column: 1 / -1; }
.climate-note { font-size: 13px; overflow-wrap: anywhere; }
.climate-note.notice { padding: 10px 12px; }
.packing-page .destination-banner { padding: 12px 16px; margin-bottom: 8px; }
.packing-page .destination-banner h2 { font-size: 20px; margin: 0 0 4px; }
.packing-page .destination-banner small { display: block; }
.packing-page main > details { margin: 8px 0; padding: 4px 12px; }
.packing-search { padding: 12px; margin: 12px 0; }
.packing-search .search-row input { flex: 1 1 0; width: auto; }
.packing-search .search-row button { flex: 0 0 auto; }
.packing-count { font-size: 13px; margin: 8px 0; }
.packing-row h2 { margin: 0 0 8px; font-size: 20px; }
.packing-row > p { margin: 8px 0; }
.packing-options { margin: 10px 0; padding: 4px 10px; }
.packing-actions { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
.packing-actions .field { flex: 1; margin: 0; }
.packing-actions button { flex: 1; }
.holding-copy { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.holding-copy > div { min-width: 0; }
.item-name { font-size: 18px; font-weight: 650; text-decoration: none; }
.item-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; display: block; }
.placement { margin: 8px 0 4px; overflow-wrap: anywhere; }
.quantity { min-width: 94px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.quantity strong { font-size: 29px; line-height: 1.1; }
.quantity > span { color: var(--muted); font-size: 13px; }
.row-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; text-decoration: none; }
.row-more { border: none; padding: 0; margin: 2px 0 0; max-width: 150px; font-size: 13px; }
.row-more summary { font-weight: 400; justify-content: flex-end; }
.row-more a { display: block; padding: 10px 0; }
label, legend { display: block; font-size: 14px; font-weight: 600; margin: 0 0 7px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--input-line); border-radius: 8px; padding: 12px; background: var(--surface); color: var(--ink); min-height: 46px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 22px; flex-shrink: 0; margin: 0; accent-color: var(--ink); vertical-align: middle; }
input[type=file] { font-size: 14px; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.field { margin-bottom: 19px; min-width: 0; }
.field-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 7px; }
.field-label label { margin-bottom: 0; }
.required-marker { font-size: 11px; font-weight: 400; color: var(--muted); }
.check-field .field-label { margin-bottom: 0; align-items: center; }
.item-matches { padding: 12px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; }
.item-matches a, [data-duplicate-review] a { display: inline-flex; min-height: 44px; align-items: center; padding: 4px 0; }
.not-found { background: var(--error-bg); color: var(--missing-ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-field { display: grid; grid-template-columns: 24px 1fr; gap: 6px 10px; align-items: center; }
.check-field label { margin: 0; min-height: 44px; display: flex; align-items: center; }
.check-field small, .check-field .errorlist { grid-column: 2; }
.field fieldset div label { min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; padding: 8px 0; }
.field fieldset > div:has(input[type=radio]) { display: flex; flex-wrap: wrap; gap: 20px; }
.edit-form { max-width: 760px; }
.edit-form > p, form > p { overflow-wrap: anywhere; }
.errorlist { color: var(--error); padding-left: 20px; font-size: 14px; margin: 8px 0; }
.notice { padding: 15px 18px; border-radius: 9px; background: var(--success-bg); border: 1px solid var(--success-line); margin: 0 0 18px; overflow-wrap: anywhere; }
.notice.error { color: var(--error); background: var(--error-bg); border-color: var(--error-line); }
.notice h2 { margin: 0 0 10px; font-size: 18px; }
.notice.warning { background: var(--attention-bg); border-color: var(--attention-line); }
.notice a { margin-left: 6px; }
.error-summary { max-width: 760px; }
.error-summary ul:empty { display: none; }
.project-notice { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.empty { padding: 24px; border: 1px dashed var(--empty-line); border-radius: 10px; margin: 12px 0; color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty .button { margin-top: 10px; }
.login { max-width: 450px; margin: 28px auto; }
.login h1 { font-size: 36px; }
.login input { margin-top: 5px; }
.login button { width: 100%; margin-top: 12px; }
.cancel { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; }
.save-state { display: block; margin-top: 12px; font-size: 14px; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 18px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 10px; }
summary::before { content: "+"; color: var(--muted); font-size: 18px; font-weight: 400; }
details[open] > summary::before { content: "-"; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
details[open] > summary { margin-bottom: 10px; }
.scan-panel { padding-top: 4px; padding-bottom: 4px; margin-top: -6px; }
.scanner { max-width: 640px; }
.scanner video { display: block; width: 100%; max-height: 360px; background: var(--paper); border-radius: 8px; }
.scanner button { margin: 6px 8px 0 0; }
.details { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.details dt { font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photo-grid figure { margin: 0; padding: 12px; overflow: hidden; }
.photo-grid > p { grid-column: 1 / -1; }
.photo-grid img { width: 100%; height: 210px; object-fit: contain; background: var(--media-bg); border-radius: 7px; }
.photo-grid figcaption { padding: 10px 2px; font-size: 13px; overflow-wrap: anywhere; }
.photo-placeholder { height: 130px; display: grid; place-items: center; background: var(--paper); }
.upload-box { margin-top: 18px; }
.upload-box form { max-width: 650px; }
.upload-box input { margin-bottom: 10px; }
.error { color: var(--error); }
.history article { border-bottom: 1px solid var(--line); padding: 16px 0; }
.history small { display: block; }
.qr { max-width: 240px; width: 100%; }
.check-row { display: flex; gap: 10px; align-items: center; padding: 12px 0; min-height: 44px; border-bottom: 1px solid var(--line); }
.bulk-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.bulk-row input[type=number] { max-width: 160px; }
.bulk-group { margin: 20px 0; }
.bulk-group h2 { font-size: 19px; }
.selection-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 20px; }
.selection-count { color: var(--muted); font-size: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 24px; }
.stats > span { color: var(--muted); }
.stats strong { display: block; font-size: 29px; color: var(--ink); }
.wrap { overflow-wrap: anywhere; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; margin: 0 0 20px; color: var(--muted); }
.breadcrumbs > *, .heading > * { min-width: 0; overflow-wrap: anywhere; }
.context-line, .usual-note { padding: 12px 14px; border-radius: 8px; background: var(--context-bg); overflow-wrap: anywhere; }
.choice-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.choice-row h3 { margin: 0 0 5px; }
.choice-row > div { min-width: 0; }
.purchase-card { display: block; text-decoration: none; }
.purchase-card h2 { margin-top: 0; }
.count-summary { margin-top: 22px; }
.count-summary h2 { margin-top: 0; }
.destination-banner { position: sticky; top: 8px; z-index: 2; background: var(--context-bg); border-color: var(--context-line); }
.destination-banner h2 { margin: 0 0 6px; }
.workbench-heading h1 { margin: 0; font-size: 28px; }
.workbench-heading { margin: 0 0 12px; }
.workbench-heading .eyebrow { margin: 0 0 4px; }
.packing-page .destination-banner .eyebrow { font-size: 10px; margin: 0 0 2px; }
.workbench-modes { margin: 10px 0; display: flex; width: 100%; }
.workbench-modes a { flex: 1; text-align: center; padding: 9px 10px; }
.workbench-help { font-size: 14px; margin: 8px 0 12px; }
.packing-page .breadcrumbs { margin-bottom: 8px; }
.packing-page .edit-form { max-width: 760px; }
.packing-page .form-actions { background: var(--surface); }
.capture-workbench { display: block; max-width: 760px; }
.capture-workbench .packing-recent { margin-top: 20px; }
.capture-workbench .packing-recent h2 { margin-top: 0; }
.packing-page .form-actions button:not(.secondary), .packing-actions button { background: var(--accent); color: var(--ink); border-color: var(--accent-line); }
.packing-page .form-actions button:not(.secondary):hover, .packing-actions button:hover { background: var(--accent-hover); }
.packing-recent { margin-top: 24px; min-width: 0; overflow-wrap: anywhere; }
.packing-recent li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.packing-recent ul { list-style: none; padding: 0; }
.record-jumps { margin: 8px 0 16px; }
.record-details > summary { font-size: 17px; }
.record-heading { align-items: flex-start; }
.record-heading h1 { margin-bottom: 8px; }
.record-heading p { margin: 4px 0; }
.record-views { display: flex; width: fit-content; max-width: 100%; margin: 0 0 20px; }
.record-panel { min-width: 0; }
.record-panel > h2:first-child { margin-top: 0; }
.js .record-panel:not(.is-active) { display: none; }
.record-menu { position: relative; border: 0; padding: 0; margin: 0; }
.record-menu > summary { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.record-menu[open] > summary { margin: 0; }
.record-menu > summary::before { content: none; }
.menu-items { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; width: min(320px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px var(--shadow-menu); }
.menu-items a { display: flex; align-items: center; min-height: 44px; padding: 9px 12px; text-decoration: none; border-radius: 6px; overflow-wrap: anywhere; }
.menu-items a:hover, .menu-items a:focus-visible { background: var(--menu-hover); }
.category-list { list-style: none; padding: 0; margin: 20px 0; max-width: 760px; }
.category-list li + li { border-top: 1px solid var(--line); }
.category-list a { display: block; padding: 18px 4px; text-decoration: none; }
.category-list strong { font-size: 18px; }
.category-list span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.category-list a:hover strong { text-decoration: underline; }
.feature-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.feature-group { min-width: 0; scroll-margin-top: 16px; }
.feature-list { padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.feature-list li + li { border-top: 1px solid var(--line); }
.feature-list a { display: block; min-height: 44px; padding: 14px 16px; text-decoration: none; overflow-wrap: anywhere; }
.feature-list a:hover strong { text-decoration: underline; }
.feature-list span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.section-jumps a { min-height: 44px; }
.action-guide dt { font-weight: 600; margin-top: 16px; }
.action-guide dd { margin: 6px 0 0; color: var(--muted); }
.project-progress { background: var(--ink); color: var(--surface); padding: 20px; border-radius: 12px; margin: 16px 0; }
.project-progress .stats { gap: 24px; }
.project-progress .stats > span, .project-progress .stats strong { color: var(--surface); }
.project-progress progress { display: block; width: 100%; height: 12px; accent-color: var(--accent); margin: 16px 0 8px; }
.project-card h2 { margin: 0 0 8px; }
.project-card .stats { gap: 18px; margin: 12px 0; }
.project-card .stats strong { font-size: 22px; }
.project-card { display: flex; flex-direction: column; align-items: flex-start; }
.project-card .button { margin-top: auto; }
.project-filters { display: flex; flex-wrap: wrap; margin: 16px 0; }
.project-filters a { padding: 9px 14px; }
.pagination { display: flex; gap: 20px; align-items: center; justify-content: center; margin-top: 24px; font-size: 14px; }
footer { max-width: 1160px; margin: auto; padding: 20px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; }
footer span { max-width: 100%; overflow-wrap: anywhere; }
.skip { position: absolute; left: 8px; top: -100px; background: var(--surface); padding: 10px; z-index: 10; }
.skip:focus { top: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .app-shell { display: block; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-nav { position: fixed; bottom: 0; top: auto; left: 0; right: 0; z-index: 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: var(--surface-overlay); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .site-nav a { flex-direction: column; gap: 4px; padding: 7px 2px; min-height: 58px; font-size: 12px; line-height: 1.2; }
  .keyboard-open .site-nav { display: none; }
  .app-shell.keyboard-open { padding-bottom: 0; }
  .capture-workbench { display: block; }
  .capture-workbench .packing-recent { margin-top: 24px; }
  .packing-page .edit-form > .form-actions { position: sticky; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 0; box-shadow: 0 -4px 12px var(--shadow-soft); }
  .focused-packing-row .packing-actions { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 3; background: var(--surface); padding: 8px 0; box-shadow: 0 -4px 12px var(--shadow-soft); }
  .keyboard-open.packing-page .edit-form > .form-actions, .keyboard-open .packing-row:focus-within .packing-actions { position: sticky; bottom: var(--keyboard-inset, 8px); z-index: 3; background: var(--surface); box-shadow: 0 -4px 12px var(--shadow-panel); padding: 10px; }
}
@media (max-width: 650px) {
  .site-header { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .brand { font-size: 23px; }
  .brand-mark { padding: 8px 13px; }
  .brand-sub { font-size: 8px; }
  .header-scan { font-size: 13px; }
  main { padding: 18px 16px 36px; }
  .heading { flex-direction: column; align-items: stretch; gap: 10px; }
  .record-heading { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .record-heading > h1, .record-heading > div:first-child { flex: 1 1 180px; }
  .record-heading > .record-menu { flex: 0 0 auto; margin-left: auto; }
  .record-heading > .actions { width: 100%; justify-content: space-between; }
  .workbench-heading { flex-direction: row; align-items: center; }
  .workbench-heading > a { flex: 0 0 84px; font-size: 13px; text-align: right; min-height: 44px; display: flex; align-items: center; }
  .packing-page .site-header { padding-top: 8px; padding-bottom: 8px; }
  .packing-page main { padding-top: 12px; }
  .packing-page .workbench-heading { margin-bottom: 8px; }
  .packing-page .destination-banner { padding: 10px 14px; }
  .packing-page .workbench-modes { padding: 2px; margin: 8px 0; }
  .packing-page .packing-search { padding: 10px; }
  .home-header { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .home-header .actions .secondary { display: none; }
  .home-header h1 { font-size: 28px; margin-bottom: 0; }
  .home-header .muted { display: none; }
  .home-header { margin-bottom: 12px; }
  .filter-panel { padding-top: 4px; padding-bottom: 4px; }
  .project-notice { padding: 10px 14px; }
  h1 { font-size: 30px; }
  .search { padding: 16px; }
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: 100%; }
  .search-row select { flex: 1; max-width: none; }
  .search-row button { flex: 1; }
  .home-header + .library-nav + .search .search-row { flex-wrap: nowrap; }
  .home-header + .library-nav + .search .search-row input { flex: 1 1 0; }
  .home-header + .library-nav + .search .search-row button { flex: 0 0 auto; }
  .card { padding: 17px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid .card { padding: 14px; }
  .grid h2 { font-size: 18px; }
  .add-options { grid-template-columns: 1fr; gap: 0; }
  .tote-number { font-size: 31px; }
  .tote-cover { height: 100px; }
  .holding { gap: 12px; }
  .holdings .holding { padding: 14px; }
  .holding-copy { gap: 10px; }
  .item-thumb { width: 42px; height: 42px; }
  .item-name { font-size: 17px; }
  .quantity { min-width: 74px; }
  .quantity strong { font-size: 26px; }
  .row-more { max-width: 100px; }
  .section-title h2 { font-size: 20px; }
  .section-title a { font-size: 13px; text-align: right; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-grid img { height: 150px; }
  .choice-row { align-items: flex-start; }
  .choice-row .button { flex-shrink: 0; }
  .form-actions { gap: 10px; }
  .form-actions button { flex: 1 1 160px; }
  .feature-groups { grid-template-columns: 1fr; gap: 0; }
  .library-nav { width: 100%; }
  .library-nav a { flex: 1; text-align: center; padding: 9px 8px; font-size: 14px; }
  .record-views { width: 100%; }
  .record-views a { flex: 1; min-width: 0; text-align: center; padding: 9px 8px; font-size: 14px; }
  .project-filters a { font-size: 14px; padding: 9px 10px; }
  footer { padding: 18px 16px; }
}
@media (max-width: 360px) {
  .holding-copy .item-thumb { width: 32px; height: 32px; }
  .field-row { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { header, footer, .site-nav, button { display: none; } body.app-shell { display: block; background: var(--surface); padding: 0; } }
