:root {
  --ink: #202c27;
  --body: #202c27;
  --muted: #717c77;
  --line: #dfe5e1;
  --bg: #ffffff;
  --card: #ffffff;
  --card-strong: #ffffff;
  --card-ink: #202c27;
  --card-muted: #717c77;
  --accent: #245847;
  --accent-2: #cb7969;
  --accent-soft: #eef4f1;
  --danger: #b04949;
  --warn: #915443;
  --warn-soft: #fbefeb;
  --radius: 8px;
  --rail-width: 224px;
}
html, body { background: #fff; color: var(--body); }
body { font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font-family: inherit; letter-spacing: 0; }
button { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #8bb7a5; outline-offset: 3px; }
button:disabled { opacity: .48; }
[hidden] { display: none !important; }
.lucide { width: 20px; height: 20px; stroke-width: 1.8; flex: 0 0 auto; vertical-align: middle; }
.wrap { display: block; max-width: 1536px; margin: 0 auto 0 var(--rail-width); padding: 42px 44px 72px; }
.app-brand-rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); min-height: 0; margin: 0; padding: 35px 22px; display: block; background: #fff; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; z-index: 30; }
.app-brand-rail::before { display: none; }
.brand { gap: 10px; color: var(--ink); align-items: flex-start; }
.brand-mark { display: flex; justify-content: center; align-items: center; width: 30px; height: 30px; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.brand-mark::before, .brand-mark::after { display: none; }
.brand-mark .lucide { width: 29px; height: 29px; stroke-width: 1.8; }
.app-brand-rail h1 { font-size: 21px; line-height: 1.4; font-weight: 720; white-space: nowrap; }
.subtitle { color: var(--muted); font-size: 10px; margin-top: 5px; line-height: 1.6; max-width: 146px; }
.header-actions { position: fixed; left: 20px; bottom: 24px; width: 184px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.iconbtn { width: 100%; height: 46px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); box-shadow: none; backdrop-filter: none; font-size: 14px; padding: 0 13px; }
.iconbtn:hover { background: #f4f6f5; color: var(--ink); }
.offline-badge { background: var(--warn-soft); color: var(--warn); border: 0; border-radius: 4px; padding: 4px 10px; backdrop-filter: none; }
.tabs { position: fixed; left: 16px; top: 144px; width: 192px; display: grid; gap: 8px; z-index: 31; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.tabs button { display: flex; justify-content: flex-start; align-items: center; gap: 14px; min-height: 48px; padding: 0 18px; color: #75817a; border-radius: 6px; font-size: 15px; font-weight: 550; transition: background .15s ease, color .15s ease; }
.tabs button.on { background: #edf3f0; color: #245847; box-shadow: none; font-weight: 700; }
.tabs button:hover:not(.on) { background: #f7f8f7; }
.tabs .lucide { width: 22px; height: 22px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.workspace-heading h2 { margin: 0 0 8px; font-size: 28px; font-weight: 720; line-height: 1.25; }
.stats { display: flex; align-items: center; gap: 16px; margin: 0; }
.stat { display: flex; align-items: baseline; gap: 5px; padding: 0; margin: 0; border: 0; background: none; border-radius: 0; box-shadow: none; color: var(--muted); }
.stat b, .stat span { display: inline; font-size: 13px; margin: 0; color: var(--muted); line-height: 1.4; font-weight: 400; }
.stat + .stat::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #bac3be; align-self: center; margin-right: 9px; }
.card { background: #fff; border: 0; border-radius: 0; padding: 0; margin: 0 0 24px; box-shadow: none; backdrop-filter: none; }
.btn, .btn.sm { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-height: 44px; font-size: 14px; font-weight: 600; padding: 10px 16px; box-shadow: none; }
.btn.primary, .btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: none; }
.btn:hover:not(:disabled) { background: #f4f7f5; border-color: #bbc9c1; }
.btn.primary:hover:not(:disabled), .btn.accent:hover:not(:disabled) { background: #1b493a; border-color: #1b493a; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .lucide { width: 18px; height: 18px; }
.icon-control { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.icon-control:hover { background: #f0f4f2; color: var(--accent); }
input[type=text], input[type=password], select, textarea { border-radius: 6px; min-height: 46px; padding: 11px 12px; background: #fff; color: var(--ink); font-size: 16px; box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: #739989; box-shadow: 0 0 0 3px #e9f1ed; }
input::placeholder, textarea::placeholder { color: #949e98; }
label { font-size: 13px; color: #56665c; font-weight: 600; }
textarea { min-height: 92px; }
.find-card { display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px; }
.search-row { position: relative; display: flex; gap: 0; align-items: center; background: #f6f8f7; border: 1px solid var(--line); border-radius: 7px; padding: 0 6px 0 15px; min-height: 56px; }
.search-row:focus-within { border-color: #83a493; box-shadow: 0 0 0 3px #eff4f1; }
.search-symbol { color: #7a847e; margin-right: 9px; width: 22px; height: 22px; }
.search-row input { flex: 1; width: 0; min-width: 0; border: 0; box-shadow: none; outline: none; background: transparent; min-height: 54px; padding: 10px 4px; }
.search-row input:focus { box-shadow: none; }
.find-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.chip-row { gap: 8px; min-width: 0; }
#roomFilters { flex: 1; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 1px; scrollbar-width: thin; }
.chip { border: 1px solid transparent; border-radius: 5px; color: #67746c; padding: 10px 13px; min-height: 40px; flex: 0 0 auto; font-size: 13px; white-space: nowrap; background: #f4f6f5; box-shadow: none; }
.chip.on { background: #245847; color: #fff; border-color: #245847; box-shadow: none; }
.inventory-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
#inventorySort { border: 0; background: transparent; font-size: 13px; width: 106px; min-height: 44px; padding: 0 4px; color: var(--muted); }
.view-switch { display: flex; align-items: center; gap: 3px; }
.view-switch button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 5px; background: transparent; color: #929b96; cursor: pointer; }
.view-switch button.on { color: var(--accent); background: #eff4f1; }
.view-switch .lucide { width: 18px; height: 18px; }
.find-extras { border-bottom: 1px solid #edf0ee; padding-bottom: 12px; }
.find-extras summary { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; min-height: 32px; }
.find-extras summary::-webkit-details-marker { display: none; }
.find-extras summary .lucide { width: 14px; height: 14px; }
.find-extras[open] summary .lucide { transform: rotate(180deg); }
.find-extras .smart-strip { padding-top: 12px; min-width: 0; }
.smart-strip > * { min-width: 0; }
.quick-shelf { display: flex; gap: 12px; }
.quick-card { border: 0; background: #f5f7f6; border-radius: 6px; padding: 12px 16px; min-width: 140px; }
.quick-card b { font-size: 18px; }
.quick-card span { color: #68766d; }
.suggest-grid { display: flex; flex-wrap: wrap; }
.suggest-btn { background: #f7f8f7; color: var(--ink); border: 0; border-radius: 5px; min-width: min(110px,100%); max-width: 100%; overflow-wrap: anywhere; }
.suggest-btn small { white-space: normal; overflow-wrap: anywhere; }
.shopping-panel { border: 0; border-left: 3px solid var(--accent-2); border-radius: 0; background: #fcf6f3; }
.shopping-panel .strip-head b { color: var(--warn); }
.result-head { margin: 0 0 13px; font-size: 12px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: start; }
.inventory-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.inventory-photo { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #f3f5f3; overflow: hidden; }
.inventory-photo img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.inventory-no-photo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #b2beb6; }
.inventory-no-photo .lucide { width: 38px; height: 38px; stroke-width: 1.2; }
.inventory-no-photo span { font-size: 12px; }
.inventory-low { position: absolute; left: 10px; top: 10px; background: #fff3ee; color: #a25c4c; font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 4px; }
.inventory-info { padding: 13px 14px 5px; min-width: 0; }
.inventory-name { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.inventory-name h3 { font-size: 15px; line-height: 1.45; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.inventory-qty { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.inventory-location { display: flex; align-items: flex-start; gap: 5px; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.inventory-location .lucide { width: 13px; height: 13px; margin-top: 2px; }
.inventory-location span { overflow-wrap: anywhere; }
.inventory-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 44px; margin-top: 2px; }
.inventory-footer time { font-size: 11px; color: #929b96; }
.inventory-item-actions { display: flex; margin-right: -10px; }
.inventory-item-actions .icon-control { width: 34px; flex-basis: 34px; }
.inventory-item-actions .lucide { width: 15px; height: 15px; }
.is-favorite { color: #bd7258; }
.is-favorite .lucide { fill: #fbede6; }
[data-inventory-layout=list] .inventory-grid { display: block; }
[data-inventory-layout=list] .inventory-item { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
[data-inventory-layout=list] .inventory-photo { width: 92px; height: 92px; border-radius: 6px; }
[data-inventory-layout=list] .inventory-info { padding: 0; }
[data-inventory-layout=list] .inventory-footer { margin-top: 2px; }
.inventory-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 20px 60px; }
.inventory-empty > img { width: 210px; height: 156px; object-fit: cover; object-position: center 57%; border-radius: 7px; margin-bottom: 25px; }
.inventory-empty h3 { color: var(--ink); font-size: 20px; margin: 0; font-weight: 650; }
.inventory-empty p { margin: 10px 0 23px; font-size: 14px; color: var(--muted); }
.inventory-empty > .lucide { width: 40px; height: 40px; color: #9aaea1; margin: 10px 0 22px; stroke-width: 1.4; }
.inventory-empty.compact { padding-top: 64px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.section-heading h3 { font-size: 17px; font-weight: 650; margin: 0; }
.section-heading span { font-size: 12px; color: var(--muted); }
.intake-source { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.photo-actions { max-width: 640px; gap: 12px; }
.photo-actions .btn { min-height: 94px; flex-direction: column; gap: 9px; background: #f7f9f7; border: 1px dashed #c6d3cb; font-weight: 550; }
.photo-actions .btn .lucide { width: 25px; height: 25px; stroke-width: 1.5; color: var(--accent); }
#recogBtn { width: auto; min-width: 192px; }
.photo-grid { max-width: 680px; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: 12px; margin: 18px 0 6px; }
.photo-tile { border: 1px solid var(--line); border-radius: 7px; box-shadow: none; }
.photo-remove { width: 36px; height: 36px; border-radius: 5px; }
.photo-badge { border-radius: 4px; }
.confirm-head { align-items: center; padding-bottom: 20px; margin: 0; }
.confirm-head h2 { font-size: 21px; }
.confirm-head small { font-size: 12px; margin-top: 5px; }
.confirm-count { background: var(--accent-soft); border: 0; border-radius: 5px; padding: 8px 10px; }
.confirmation-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,310px); gap: 32px; align-items: start; }
.confirmation-details { grid-column: 2; grid-row: 1; position: sticky; top: 24px; padding: 0 0 0 24px; border-left: 1px solid var(--line); min-width: 0; }
.confirmation-results { grid-column: 1; grid-row: 1; min-width: 0; }
.confirm-location { border: 0; padding: 0; border-radius: 0; background: none; margin-bottom: 0; }
.field-grid { gap: 10px; }
.combo-toggle { width: 40px; height: 40px; top: 3px; right: 3px; background: #f5f7f5; border-radius: 4px; }
.combo-menu { border: 1px solid var(--line); background: #fff; border-radius: 7px; box-shadow: 0 12px 30px #1b33241a; }
.combo-item, .combo-new { border-radius: 4px; min-height: 44px; font-size: 14px; }
.combo-new { border-radius: 0; }
.place-chip { background: #f4f7f4; border: 0; border-radius: 5px; min-height: 40px; }
.path-preview { font-size: 12px; border: 0; padding: 10px 12px; border-radius: 5px; background: #eff5f1; color: #496c58; overflow-wrap: anywhere; }
.result-list { gap: 24px; }
.photo-result { grid-template-columns: 76px minmax(0,1fr); gap: 12px; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.photo-result > img { width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 6px; }
.photo-result h3 { font-size: 14px; }
.photo-result small { font-size: 12px; margin-top: 4px; }
.item-edit-row { grid-template-columns: 44px minmax(0,1fr) 62px 36px; gap: 6px; }
.item-edit-row input, .photo-additem input { font-size: 16px; padding: 9px 10px; border-radius: 5px; }
.select-toggle { width: 44px; height: 44px; border-radius: 5px; font-size: 12px; border-color: var(--line); }
.item-remove { width: 36px; height: 44px; border-radius: 5px; background: transparent; }
.photo-additem button { border-radius: 5px; }
.confirmation-save { position: sticky; bottom: 0; background: #fff; padding: 16px 0 4px; z-index: 12; border-top: 1px solid var(--line); margin-top: 24px; }
.confirmation-save #saveBtn { width: auto; min-width: 200px; margin-top: 0 !important; }
.location-sheet-head, .intake-location-button { display: none; }
.update-banner, .update-diff, .warnbox, .errbox, .dup-hint { box-shadow: none; border-radius: 6px; }
.update-banner { border: 0; border-left: 3px solid var(--accent-2); background: #fcf1eb; color: var(--warn); }
.update-banner button { min-height: 44px; }
.update-diff { border: 0; border-left: 3px solid #8faf9b; border-radius: 0; background: #f5f8f5; }
.manage-toolbar { padding: 0 0 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.manage-toolbar b { font-weight: 600; }
.atlas-room { margin-top: 28px; }
.atlas-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 20px; }
.atlas-head h2 { font-size: 21px; }
.atlas-container { padding: 0 0 16px 18px; border-left: 2px solid #e4ece6; }
.atlas-container h3 { font-size: 14px; margin-bottom: 16px; }
.atlas-container > .card, #findResults > .card { border: 1px solid var(--line); border-radius: 7px; padding: 18px; margin-bottom: 12px; }
.thumbs img { border: 0; border-radius: 6px; box-shadow: none; }
.photo-group { background: #f6f8f6; border: 0; border-radius: 4px; }
.action-row { gap: 18px; }
.editbtn, .delbtn, .mini-action { min-height: 36px; }
.action-row .lucide { width: 15px; height: 15px; margin-right: 4px; }
.empty { border: 0; border-radius: 0; box-shadow: none; background: #f8faf8; }
.fav-mark, .item-flag { border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 26px; }
.settings-heading h2 { margin: 0; font-size: 22px; }
#settings { position: fixed; z-index: 70; right: 24px; left: auto; top: 24px; bottom: 24px; width: min(460px,calc(100vw - 48px)); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 24px 80px #15291f30; margin: 0; }
body.settings-open::after { content: ""; position: fixed; inset: 0; z-index: 60; background: #12221955; backdrop-filter: blur(3px); }
body.settings-open { overflow: hidden; }
.keyrow small { line-height: 1.6; }
.safety-row { font-size: 13px; padding: 4px 0; }
.modal { z-index: 80; }
.edit-modal { backdrop-filter: blur(5px); }
.edit-panel { border: 0; border-radius: 8px; background: #fff; max-width: 680px; box-shadow: 0 24px 70px #15291f33; }
.edit-head, .edit-body { padding: 22px 24px; }
.edit-head { padding-bottom: 18px; }
.edit-close { width: 44px; height: 44px; border-radius: 5px; }
.edit-grid { grid-template-columns: 1fr 1fr 1fr; }
.edit-group { background: #f6f8f6; border: 0; border-radius: 6px; padding: 14px; }
.edit-item-row { grid-template-columns: minmax(0,1fr) 80px 56px 36px; }
.edit-item-row input, .edit-add input { font-size: 16px; border-radius: 5px; }
.low-toggle { height: 44px; border: 0; border-radius: 5px; background: var(--warn-soft); color: var(--warn); }
.low-toggle.on { background: #a7614e; border: 0; }
.edit-foot { padding: 16px 24px; background: #fff; grid-template-columns: 1fr 1fr; }
.space-head { align-items: center; margin: 0 0 20px; }
.space-head h2 { font-size: 17px; font-weight: 600; }
.space-head span { font-size: 13px; }
.space-actions .btn { min-height: 44px; font-size: 13px; padding: 10px 12px; }
.space-stage { border-radius: 0; box-shadow: none; height: max(520px,62vh); min-height: 440px; width: 100%; margin: 0; background: #111a16; }
.space-topbar { left: 16px; right: 16px; top: 16px; gap: 10px; grid-template-columns: auto minmax(0,180px) 44px; }
.space-modes { border-radius: 6px; padding: 3px; background: #14241ee6; }
.space-modes button { min-height: 38px; border-radius: 4px; padding: 8px 15px; font-size: 13px; }
.space-room-select { height: 46px; min-height: 46px; font-size: 14px; border-radius: 6px; background: #14241ee6; color: #fff; }
.space-reset { width: 44px; height: 46px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #14241ee6; }
.space-anchor { border-radius: 5px; }
.space-underbar { padding-top: 12px; }
.space-object-section { margin-top: 26px; }
.space-object-head { margin-bottom: 14px; }
.space-object-row { min-height: 76px; gap: 14px; }
.space-object-name { font-size: 16px !important; min-height: 30px !important; }
.space-object-actions button { min-height: 44px; border-radius: 5px; padding: 8px 12px; font-size: 13px; background: #fff; }
.space-filebar { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; min-width: 0; }
.space-filebar select { flex: 1; min-width: 0; width: 0; min-height: 44px; background: #f7f9f7; }
.space-filebar button { display: flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; color: var(--accent); border-radius: 5px; cursor: pointer; }
#spaceRemoveFile { color: var(--danger); }
.space-view-tools { position: absolute; left: 16px; bottom: 16px; z-index: 5; display: flex; gap: 8px; align-items: center; }
.space-view-tools button, .space-view-tools select { height: 44px; min-height: 44px; border-radius: 6px; border: 1px solid #ffffff30; background: #14241ee6; color: #fff; padding: 8px 10px; font-size: 14px; backdrop-filter: blur(12px); }
.space-view-tools button { display: flex; align-items: center; justify-content: center; min-width: 44px; gap: 6px; cursor: pointer; }
.space-view-tools select { width: auto; max-width: 160px; }
@media (min-width: 1600px) { .wrap { margin-right: auto; padding-left: 64px; padding-right: 64px; } .inventory-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1150px) and (min-width: 761px) {
  :root { --rail-width: 190px; }
  .wrap { padding: 32px 28px 64px; }
  .app-brand-rail { padding: 30px 16px; }
  .app-brand-rail h1 { font-size: 19px; }
  .brand { gap: 7px; }
  .subtitle { font-size: 10px; max-width: 120px; }
  .tabs { left: 12px; width: 166px; }
  .header-actions { left: 12px; width: 166px; }
  .inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .confirmation-layout { grid-template-columns: 1fr; gap: 24px; }
  .confirmation-details { grid-column: 1; grid-row: 1; position: static; border: 0; padding: 0; }
  .confirmation-results { grid-column: 1; grid-row: 2; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .combo:last-child { grid-column: 1 / -1; }
  .inventory-controls { gap: 2px; }
}
@media (max-width: 760px) {
  .wrap { width: 100%; max-width: none; margin: 0; padding: 0 20px calc(100px + env(safe-area-inset-bottom)); }
  .app-brand-rail { position: relative; inset: auto; width: auto; margin: 0 -20px 26px; padding: calc(20px + env(safe-area-inset-top)) 20px 0; border: 0; display: flex; align-items: center; justify-content: space-between; z-index: 20; min-height: 74px; }
  .brand { gap: 9px; align-items: center; }
  .brand-mark, .brand-mark .lucide { width: 25px; height: 25px; }
  .app-brand-rail h1 { font-size: 19px; }
  .subtitle { font-size: 10px; margin-top: 2px; max-width: none; white-space: nowrap; }
  .header-actions { position: static; width: auto; display: flex; flex-direction: row; gap: 5px; align-items: center; }
  .iconbtn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .iconbtn span { display: none; }
  .offline-badge { font-size: 10px; padding: 3px 6px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); background: #fffffffa; border: 0; border-top: 1px solid #e7ece8; backdrop-filter: blur(14px); border-radius: 0; z-index: 40; }
  .tabs button { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; min-height: 58px; padding: 5px 0; background: transparent; border-radius: 0; font-size: 11px; font-weight: 500; color: #838e87; }
  .tabs button.on { background: transparent; color: var(--accent); font-weight: 700; }
  .tabs button.on .lucide { stroke-width: 2.2; }
  .tabs .lucide { width: 23px; height: 23px; }
  .workspace-heading { margin-bottom: 23px; gap: 12px; }
  .workspace-heading h2 { font-size: 25px; margin-bottom: 8px; }
  .stats { gap: 10px; }
  .stat b, .stat span { font-size: 11px; }
  .stat + .stat::before { margin-right: 3px; width: 2px; height: 2px; }
  #newItemBtn { font-size: 12px; padding: 10px 12px; gap: 5px; }
  #newItemBtn .lucide { width: 16px; height: 16px; }
  .find-card { gap: 14px; margin-bottom: 16px; }
  .search-row { min-height: 50px; padding-left: 12px; }
  .search-row input { font-size: 16px; min-height: 50px; }
  .search-symbol { width: 19px; height: 19px; margin-right: 6px; }
  .find-filterbar { flex-wrap: wrap; gap: 8px; }
  #roomFilters { flex-basis: 100%; margin-right: -20px; padding-right: 20px; }
  .chip { min-height: 44px; padding: 11px 14px; font-size: 12px; }
  .inventory-controls { margin-left: auto; height: 32px; gap: 8px; }
  #inventorySort { min-height: 36px; font-size: 12px; width: 95px; }
  .view-switch button { height: 36px; width: 40px; }
  .view-switch .lucide { width: 16px; height: 16px; }
  .find-extras { margin-top: 0; padding-bottom: 8px; }
  .find-extras summary { min-height: 36px; font-size: 12px; }
  .result-head { margin-bottom: 10px; font-size: 11px; }
  .inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; }
  .inventory-photo { aspect-ratio: 1 / 1; }
  .inventory-info { padding: 10px 10px 2px; }
  .inventory-name { display: block; }
  .inventory-name h3 { font-size: 13px; line-height: 1.5; }
  .inventory-qty { font-size: 10px; display: inline-block; margin-top: 2px; }
  .inventory-location { font-size: 10px; gap: 3px; margin-top: 4px; }
  .inventory-location .lucide { width: 11px; height: 11px; margin-top: 2px; }
  .inventory-footer { flex-wrap: wrap; gap: 0; margin-top: 4px; }
  .inventory-footer time { font-size: 10px; line-height: 1.4; }
  .inventory-item-actions { margin-left: auto; margin-right: -6px; }
  .inventory-item-actions .icon-control { width: 44px; flex-basis: 44px; height: 44px; }
  .inventory-item-actions .lucide { width: 14px; height: 14px; }
  .inventory-empty { padding: 32px 12px; }
  .inventory-empty > img { width: 180px; height: 135px; margin-bottom: 23px; }
  .inventory-empty h3 { font-size: 18px; }
  .inventory-empty p { font-size: 13px; }
  .intake-source { padding-bottom: 22px; margin-bottom: 24px; }
  .section-heading { margin-bottom: 14px; }
  .photo-actions { gap: 10px; }
  .photo-actions .btn { min-height: 100px; }
  #recogBtn { width: 100%; min-height: 48px; }
  .photo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  .photo-remove { width: 36px; height: 36px; }
  .confirm-head { align-items: flex-start; padding-bottom: 18px; }
  .confirm-head h2 { font-size: 20px; }
  .confirm-head small { font-size: 11px; }
  .confirm-count { font-size: 11px; padding: 7px 8px; }
  #itemsCard { scroll-margin-top: 18px; }
  .confirmation-layout { display: flex; flex-direction: column; gap: 24px; }
  .confirmation-details { display: none; width: auto; position: fixed; inset: auto 12px calc(82px + env(safe-area-inset-bottom)); max-height: min(72dvh,600px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 16px; z-index: 65; box-shadow: 0 20px 70px #15291f33; }
  .location-editing .confirmation-details { display: block; }
  body.location-editing::before { content: ""; position: fixed; inset: 0; z-index: 60; background: #12221955; backdrop-filter: blur(3px); }
  body.location-editing { overflow: hidden; }
  .location-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px -4px 16px 0; }
  .location-sheet-head h3 { font-size: 18px; margin: 0; }
  .location-sheet-head .icon-control { color: var(--accent); background: var(--accent-soft); }
  .location-editing .confirm-location > label { display: none; }
  .confirmation-results { width: 100%; }
  .field-grid { gap: 8px; }
  .confirmation-details textarea { min-height: 64px; }
  .combo-toggle { width: 44px; height: 44px; top: 2px; right: 2px; }
  .combo input { min-height: 48px; }
  .photo-result { grid-template-columns: 58px minmax(0,1fr); grid-template-rows: 26px 22px; gap: 6px 10px; padding-bottom: 20px; }
  .photo-result > img { width: 58px; height: 58px; }
  .photo-result > div { display: contents; }
  .photo-result h3 { grid-column: 2; grid-row: 1; align-self: end; }
  .photo-result small { grid-column: 2; grid-row: 2; margin-top: 0; align-self: start; }
  .photo-result > img { grid-row: 1 / 3; }
  .item-edit-list, .photo-additem, .photo-result .note, .photo-empty { grid-column: 1 / -1; }
  .item-edit-list { margin-top: 2px; gap: 10px; }
  .item-edit-row { grid-template-columns: 44px minmax(0,1fr) 60px 36px; gap: 5px; }
  .item-edit-row input { min-width: 0; font-size: 16px; padding: 10px 8px; }
  .item-edit-row .item-qty { padding-left: 6px; padding-right: 6px; }
  .photo-additem { margin-top: 3px; }
  .photo-additem input { min-width: 0; font-size: 16px; }
  .confirmation-save { bottom: calc(68px + env(safe-area-inset-bottom)); padding: 10px 0; margin-top: 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
  .confirmation-save #saveBtn { width: auto; min-width: 116px; min-height: 48px; padding: 10px 14px; }
  .confirmation-save #saveStatus { grid-column: 1 / -1; }
  .confirmation-save #saveStatus:empty { display: none; }
  .intake-location-button { display: flex; align-items: center; gap: 7px; padding: 4px 5px 4px 0; min-height: 48px; min-width: 0; text-align: left; background: transparent; color: var(--accent); border: 0; cursor: pointer; }
  .intake-location-button > span { flex: 1; min-width: 0; }
  .intake-location-button small { display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px; }
  .intake-location-button b { display: block; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .intake-location-button .lucide { width: 16px; height: 16px; }
  .manage-toolbar { grid-template-columns: 1fr 1fr; padding-bottom: 18px; gap: 12px 8px; }
  .manage-toolbar > div:first-child { grid-column: 1 / -1; }
  .manage-toolbar .btn { font-size: 13px; padding: 10px 12px; }
  .atlas-head h2 { font-size: 19px; }
  .atlas-container { padding-left: 12px; }
  .atlas-container > .card { padding: 12px; }
  .rec { gap: 10px; }
  .thumbs { width: 64px; }
  .thumbs.single img { width: 64px; height: 64px; }
  .thumbs.multi { grid-template-columns: repeat(2,30px); }
  .thumbs.multi img { width: 30px; height: 30px; }
  .rec .loc { font-size: 14px; }
  .action-row { gap: 10px; margin-top: 12px; }
  .editbtn, .delbtn { min-height: 44px; font-size: 12px; }
  .mini-action { min-height: 44px; }
  #settings { top: max(12px,env(safe-area-inset-top)); bottom: max(12px,env(safe-area-inset-bottom)); right: 12px; left: 12px; width: auto; padding: 20px; }
  .backup-actions, .safety-actions { grid-template-columns: 1fr 1fr; }
  .backup-actions .btn, .safety-actions .btn { font-size: 12px; padding: 10px 8px; }
  .edit-modal { padding: 0; align-items: flex-end; }
  .edit-panel { max-height: 92dvh; border-radius: 8px 8px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .edit-head, .edit-body { padding: 18px 16px; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-group { padding: 10px; }
  .edit-item-row { grid-template-columns: minmax(0,1fr) 55px 44px 30px; gap: 5px; }
  .edit-item-row input { font-size: 16px; min-width: 0; padding: 10px 7px; }
  .edit-item-row .item-remove { width: 30px; }
  .edit-foot { padding: 14px 16px; grid-template-columns: 1fr 1fr; }
  .space-head { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; }
  .space-head h2 { font-size: 16px; }
  .space-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .space-stage { width: calc(100% + 40px); margin-left: -20px; height: 59dvh; min-height: 410px; border-radius: 0; }
  .space-topbar { left: 12px; right: 12px; top: 12px; gap: 7px; grid-template-columns: auto minmax(0,1fr) 44px; }
  .space-modes button { font-size: 12px; min-height: 38px; padding: 8px 10px; }
  .space-room-select { font-size: 16px; padding: 8px; }
  .space-object-row { grid-template-columns: 8px minmax(0,1fr) 40px; gap: 9px; padding: 12px 0; }
  .space-object-actions { grid-column: 2 / -1; gap: 8px; }
  .space-object-actions button { flex: 1; font-size: 12px; }
  .space-object-head { align-items: center; }
  .space-object-head h3 { font-size: 15px; }
  .space-filebar select, .space-view-tools select { font-size: 16px; }
  .space-view-tools { left: 12px; bottom: 12px; }
}
@media (max-width: 360px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  #roomFilters { margin-right: -16px; padding-right: 16px; }
  .app-brand-rail { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .subtitle { font-size: 9px; }
  .workspace-heading h2 { font-size: 23px; }
  .stat + .stat::before { display: none; }
  .stats { gap: 8px; }
  .inventory-grid { gap: 12px 9px; }
  .inventory-info { padding-left: 8px; padding-right: 8px; }
  .item-edit-row { grid-template-columns: 44px minmax(0,1fr) 50px 30px; }
  .item-remove { width: 30px; }
  .space-stage { width: calc(100% + 32px); margin-left: -16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
