.app-shell { grid-template-columns: 230px minmax(0, 1fr); }
.app-shell main { max-width: 1500px; }
h1 { font-size: 32px; }
h2 { font-size: 20px; }
.block { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.button, button, input, select, textarea { border-radius: 11px; }
.chips a, .utility-link { min-height: 44px; display: inline-flex; align-items: center; }
.quick-filters a { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); padding: 8px 16px; text-decoration: none; font-weight: 600; }
.quick-filters a[aria-current=page] { background: var(--ink); color: var(--surface); }
.quick-filters .filter-scope { background: transparent; padding: 0; color: var(--muted); font-size: 12px; }
.library-nav { background: var(--segment-bg); border: 0; }
.library-nav a[aria-current=page] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px var(--shadow-soft); }
.home-header + .library-nav + .search { background: transparent; padding: 0; }
.home-header + .library-nav + .search input { min-height: 48px; }
.inventory-header > .search { background: transparent; padding: 0; margin: 12px 0; }
.inventory-header .search-row { flex-wrap: nowrap; }
.inventory-header .search-row input { flex: 1 1 0; min-height: 48px; }
.inventory-header .search-row button { flex: 0 0 auto; }
.inventory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.inventory-toolbar .quick-filters { margin: 0; }
.result-count { margin: 8px 0 12px; }
.inventory-layout, .inventory-results { min-width: 0; }
.inventory-card { border: 1px solid var(--card-line); background: var(--surface); border-radius: 14px; margin-bottom: 12px; }
.item-card-link { display: flex; padding: 16px; gap: 14px; align-items: flex-start; text-decoration: none; }
.item-card-copy { flex: 1; min-width: 0; }
.item-card-actions { display: flex; padding: 0 16px 8px; justify-content: flex-end; }
.item-card-actions a { display: inline-flex; min-height: 44px; align-items: center; font-size: 13px; }
.item-card-title { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; }
.item-card-title h3 { font-size: 18px; margin: 0; line-height: 1.35; }
.card-total { text-align: right; line-height: 1.2; }
.card-total strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.card-total small { display: block; }
.item-tile { flex: 0 0 52px; width: 52px; height: 58px; object-fit: cover; border-radius: 10px; }
.item-initial { display: grid; place-items: center; background: var(--segment-bg); color: var(--muted); font-weight: 700; font-size: 22px; }
.state-bar { display: flex; height: 7px; background: var(--segment-bg); border-radius: 5px; overflow: hidden; margin: 10px 0 6px; }
.state-bar span + span { border-left: 2px solid var(--surface); }
.state-stored { background: var(--stored-fill); }
.state-in_use { background: var(--out-fill); }
.state-missing { background: var(--missing-fill); }
.state-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 7px 0 0; font-size: 13px; font-weight: 400; }
.state-text-in_use { color: var(--out-ink); }
.state-text-missing { color: var(--missing-ink); }
.compact-placements, .matching-total { margin: 7px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.matching-total { font-weight: 600; color: var(--ink); }
.inventory-table-wrap { display: none; min-width: 0; overflow: auto; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); }
.inventory-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.inventory-table th, .inventory-table td { padding: 15px; border-bottom: 1px solid var(--row-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.inventory-table thead th { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.inventory-table tbody th { width: 31%; }
.inventory-table td p { margin: 0 0 6px; font-size: 14px; }
.inventory-table td:last-child a { display: flex; min-height: 44px; align-items: center; font-size: 13px; }
.inventory-table tr[data-selected=true] { background: var(--context-bg); }
.selected-item { display: none; min-width: 0; }
.selected-item h2 { margin: 8px 0; }
.selected-item p { overflow-wrap: anywhere; }
.selected-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 9px; }
.preview-total strong { font-size: 29px; }
.container-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px; border-radius: 16px; background: var(--ink); color: var(--surface); margin-bottom: 16px; }
.hero-copy { min-width: 0; }
.container-hero .eyebrow, .hero-location { color: var(--hero-muted); }
.container-hero h1 { font-size: 18px; font-weight: 500; margin: 0; }
.container-hero h1 span { display: block; font-size: 56px; font-weight: 800; overflow-wrap: anywhere; }
.container-hero.long-identifier h1 span { font-size: 32px; }
.hero-description { font-size: 20px; margin: 10px 0 6px; }
.hero-location { font-size: 14px; overflow-wrap: anywhere; }
.container-hero a:hover { color: var(--surface); }
.hero-photo { flex: 0 0 110px; }
.hero-photo img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.record-toolbar { display: flex; margin: 0 0 18px; }
.record-toolbar > .actions { width: 100%; }
.record-toolbar .record-menu { margin-left: auto; }
.accent-button { background: var(--accent); color: var(--ink); border-color: var(--accent-line); }
.freshness { color: var(--muted); font-size: 13px; }
.compact-climate { font-size: 14px; padding: 10px 14px; }
.item-cover-link { display: block; margin: 0 0 20px; }
.item-cover { display: block; width: 100%; max-height: 210px; object-fit: contain; background: var(--media-bg); border-radius: 14px; }
.item-owned { text-align: right; margin-left: auto; }
.item-owned strong { display: block; font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.item-owned small { display: block; }
.activity-summary article { border-left: 2px solid var(--line); padding: 6px 0 12px 16px; margin-left: 5px; }
.activity-summary article p { margin: 3px 0; font-size: 14px; }
.photo-status { color: var(--muted); font-size: 14px; }
.quantity-stepper { display: flex; align-items: center; gap: 7px; }
.quantity-stepper input { flex: 1; width: 5em; text-align: center; font-size: 21px; font-weight: 650; }
.quantity-stepper button { min-width: 44px; padding: 10px; }
.destination-matches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; font-size: 14px; }
.destination-matches button { text-align: left; justify-content: flex-start; }
[data-destination-warning]:not(.warning) { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; }
.sticky-action { position: sticky; bottom: 0; z-index: 3; background: var(--surface); padding: 12px 0; }
.action-dialog { width: min(720px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--paper); }
.action-dialog::backdrop { background: var(--ink); opacity: .58; }
.action-dialog main { padding: 20px 24px; max-width: 100%; width: 100%; }
.action-dialog h1 { padding-right: 65px; font-size: 26px; }
.action-dialog .breadcrumbs { display: none; }
.dialog-close { float: right; margin: 10px 12px 0; position: relative; z-index: 4; }
.action-dialog .edit-form { padding: 18px; }
.action-dialog .sticky-action { bottom: 0; }
.project-entry .entry-outcome { color: var(--muted); margin: 8px 0; }
.project-progress .eyebrow { color: var(--hero-muted); }
.project-entry h3 { margin-top: 0; }
.project-entry .actions { margin-top: 12px; }
.project-entry .actions > a, .project-entry > a, .section-title > a { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.project-resolved { border-left: 4px solid var(--stored-fill); }
.project-followup { border-left: 4px solid var(--out-fill); }
.project-missing { border-left: 4px solid var(--missing-fill); }
.finish-preflight { margin-top: 24px; }
.finish-preflight h2 { margin-top: 0; }
.finish-preflight li { margin-bottom: 10px; }
.finish-preflight li a { display: inline-flex; align-items: center; min-height: 44px; }
.label-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.label-selection { max-height: 400px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 16px 0; }
@media (min-width: 901px) {
  .inventory-cards { display: none; }
  .inventory-table-wrap { display: block; }
  .inventory-header > .search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; }
  .inventory-header > .search > label { grid-column: 1 / -1; margin: 0; }
  .inventory-header .classification-filters { margin: 0; }
  .inventory-header .classification-filters:not([open]) > summary { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-height: 48px; }
  .inventory-header .classification-filters[open] { grid-column: 1 / -1; }
  .inventory-header .filter-summary, .inventory-header .applied-filters { grid-column: 1 / -1; }
  .inventory-results-heading { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 1280px) {
  .inventory-header { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr) auto; gap: 16px; align-items: start; }
  .inventory-header .home-header { display: contents; }
  .inventory-header h1 { grid-column: 1; grid-row: 1; margin: 26px 0 0; }
  .inventory-header .home-header > .actions { grid-column: 3; grid-row: 1; margin-top: 24px; }
  .inventory-header > .search { grid-column: 2; grid-row: 1; margin: 0; }
  .inventory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
  .selected-item { display: block; position: sticky; top: 20px; margin: 0; }
}
@media (min-width: 901px) and (max-width: 1279px) {
  .selected-item { display: block; margin-top: 20px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sticky-action { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .action-dialog .sticky-action { bottom: 0; }
  .keyboard-open .sticky-action { bottom: var(--keyboard-inset, 0); }
}
@media (max-width: 650px) {
  h1 { font-size: 28px; }
  .container-hero { padding: 20px; gap: 12px; }
  .hero-photo { flex-basis: 78px; }
  .hero-photo img { width: 78px; height: 90px; }
  .hero-description { font-size: 17px; }
  .item-owned strong { font-size: 34px; }
  .item-card-link { padding: 14px; gap: 10px; }
  .item-card-title h3 { font-size: 17px; }
  .item-tile { width: 42px; height: 52px; flex-basis: 42px; }
  .card-total strong { font-size: 21px; }
  .record-toolbar .button, .record-toolbar .record-menu > summary { padding: 10px 9px; font-size: 14px; }
  .record-toolbar .actions { gap: 8px; flex-wrap: nowrap; }
  .action-dialog { width: 100%; max-height: calc(100dvh - 12px); margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .action-dialog main { padding: 14px 16px; }
  .action-dialog .edit-form { padding: 14px; }
  .action-dialog h1 { padding-right: 0; clear: both; }
  .label-options { grid-template-columns: 1fr; gap: 10px; }
  .inventory-toolbar .library-nav { width: 100%; }
  .inventory-toolbar .quick-filters { order: -1; }
}
