/* Heirfolio — palette from design export */
:root {
    --bg: #f5f2ea;
    --ink: #211d17;
    --panel: #ffffff;
    --line: #e3dcc9;
    --side-bg: #211d17;
    --side-fg: #d9d2c3;
    --side-muted: #8f8672;
    --side-line: #3a342a;
    --gold: #cbb886;
    --gold-dark: #8a6d3b;
    --gold-darker: #6d5326;
    --amber: #d9a94a;
    --green: #5a7a4d;
    --red: #a4432e;
    --serif: 'Source Serif 4', serif;
    --sans: 'Libre Franklin', sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold-darker); text-decoration: underline; }
input, select, button, textarea { font-family: var(--sans); font-size: 13px; }
::selection { background: #e6d9bd; }
h1, h2, h3 { font-family: var(--serif); }
/* FocusOnNavigate / programmatic focus targets (tabindex=-1, not in tab order).
   Keeps a11y page-announce behavior without a visible ring on non-interactive headings.
   Do not restyle :focus-visible on buttons, links, inputs. */
[tabindex="-1"]:focus { outline: none; }

.boot { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100vh; font-family:var(--serif); font-size:28px; font-weight:700; }
.boot span { font-family:var(--sans); font-size:12px; color:var(--side-muted); margin-top:6px; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.estate-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 22px; border-bottom: 1px solid var(--line);
    background: var(--panel);
}
.estate-bar-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--side-muted); }
.estate-chip {
    border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
    background: var(--bg); font-weight: 600; max-width: min(320px, 70vw);
}
.estate-bar-role {
    font-size: 12px; color: var(--side-muted); font-weight: 500;
}
.estate-role-badge {
    display: inline-block; font-size: 11px; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    background: #efe6d0; color: var(--gold-darker);
    border-radius: 4px; padding: 2px 8px;
}
.estate-bar-switch {
    margin-left: auto; font-size: 12px; font-weight: 600; color: var(--gold-dark);
    background: none; border: 0; cursor: pointer; padding: 4px 8px; font-family: inherit;
}
.estate-bar-switch:hover { color: var(--gold-darker); text-decoration: underline; }
.estate-bar-path {
  padding: 0; margin: 0; background: transparent; border: 0;
  flex: 1; min-width: 0;
}
.estate-bar .estate-role-badge { flex-shrink: 0; }

/* Full-page multi-estate picker (post sign-in) */
.estate-pick { max-width: 720px; margin: 24px auto 48px; }
.estate-pick h1 { font-size: 28px; margin: 0 0 8px; }
.estate-pick-lead { color: var(--side-muted); font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.estate-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.estate-pick-card {
    text-align: left; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: 16px 18px; font: inherit; color: inherit;
    transition: border-color .12s, box-shadow .12s;
}
.estate-pick-card:hover {
    border-color: var(--gold); box-shadow: 0 2px 10px rgba(33, 29, 23, 0.06);
}
.estate-pick-name { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.estate-pick-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.estate-pick-count { font-family: var(--mono); font-size: 12px; color: var(--side-muted); }
.estate-pick-caps { display: flex; gap: 8px; font-size: 11px; color: var(--side-muted); }
.estate-pick-caps span {
    background: var(--bg); border-radius: 4px; padding: 2px 6px;
}
.estate-pick-caps .muted { opacity: 0.75; font-style: italic; }
.sidebar { width: 224px; flex-shrink: 0; background: var(--side-bg); color: var(--side-fg); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
.side-brand { padding: 24px 20px 18px; border-bottom: 1px solid var(--side-line); }
.side-brand .name { font-family: var(--serif); font-size: 24px; font-weight: 700; color: #f2ede1; }
.side-brand .tag { font-size: 11px; color: var(--side-muted); margin-top: 4px; line-height: 1.4; }
.side-nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 6px; cursor: pointer; color: var(--side-fg); font-weight: 400; text-decoration: none; }
.side-nav a:hover { background: #332d23; text-decoration: none; }
.side-nav a.active { background: #3a342a; color: #f2ede1; font-weight: 600; }
.side-nav .count { font-family: var(--mono); font-size: 11px; background: var(--side-line); color: var(--gold); border-radius: 10px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--side-line); font-size: 11px; line-height: 1.6; color: var(--side-muted); }
.side-foot .head { color: var(--gold); font-weight: 600; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.side-foot .row { display: flex; justify-content: space-between; }
.side-foot .row .v { font-family: var(--mono); color: var(--side-fg); }
.side-foot .row .v.warn { color: var(--amber); }
.side-foot .side-settings {
    display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px;
    border-radius: 6px; color: var(--side-fg); text-decoration: none; font-weight: 500; font-size: 12px;
    border: 1px solid var(--side-line);
}
.side-foot .side-settings:hover { background: #332d23; text-decoration: none; color: #f2ede1; }
.side-foot .side-settings.active { background: #3a342a; color: #f2ede1; border-color: #4a4336; }
.side-foot .side-settings .gear { font-size: 14px; color: var(--gold); line-height: 1; }

/* settings */
.settings-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.provider { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #faf8f3; }
.provider-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.provider-name { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.provider-tag { font-family: var(--sans); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--gold-darker); background: #efe6d0; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.provider-meta { font-size: 12px; color: var(--side-muted); margin-top: 2px; }
.provider-actions { margin-top: 6px; }
.provider .field { margin-bottom: 0; }
.provider .field input { font-family: var(--mono); font-size: 12px; }

.main { flex: 1; padding: 28px 32px 60px; max-width: 1280px; box-sizing: border-box; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--side-muted); font-size: 12px; flex: 1; min-width: 12rem; }
.page-head-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* cards & stats */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat .label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-muted); }
.stat .value { font-family: var(--mono); font-size: 22px; margin-top: 6px; }
.stat .value.money { color: var(--gold-darker); }
.stat .value.warn { color: var(--amber); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 17px; margin: 0 0 12px; }

/* item grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.grid.grid-compact { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.grid.grid-compact .tile .thumb { height: 88px; }
.grid.grid-compact .tile .body { padding: 6px 8px 8px; }
.grid.grid-compact .tile .title { font-size: 12px; -webkit-line-clamp: 1; }
.grid.grid-compact .tile .est { font-size: 11px; margin-top: 4px; }

.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.view-toggle button {
    background: var(--panel); border: 0; border-right: 1px solid var(--line);
    padding: 6px 10px; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink);
}
.view-toggle button:last-child { border-right: 0; }
.view-toggle button.on { background: var(--ink); color: #f5f2ea; }
.view-toggle button:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: -2px; }

.inventory-list a { font-weight: 600; }
.inventory-list tr.is-selected td { background: #fbf6ea; }
.inventory-list tfoot td {
    background: #f7f1e4;
    font-weight: 600;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    padding-top: 12px;
    padding-bottom: 12px;
}
.inventory-list tfoot td.money { color: var(--gold-darker); }
.inventory-list tfoot .inventory-total-label,
.inventory-totals-bar .inventory-total-label {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--side-muted);
    font-weight: 700;
}
.inventory-totals-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 28px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f7f1e4;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}
.inventory-totals-bar .mono { font-weight: 600; }
.inventory-totals-bar .money { color: var(--gold-darker); }

.item-browse { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.item-browse .btn { min-width: 36px; padding: 6px 10px; }
.item-browse-pos {
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.is-draft { color: var(--side-muted); font-weight: 400; }
.draft-tag {
    display: inline-block;
    font-size: 10px;
    font-family: var(--sans);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 5px;
    margin-left: 6px;
    color: var(--side-muted);
    vertical-align: middle;
}
.po-draft-line { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.po-headline.is-draft { color: var(--side-muted); font-weight: 500; }

.evidence-rollup { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.evidence-rollup-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; color: inherit; text-align: left;
}
.evidence-rollup-toggle .po-kicker { display: block; }
.evidence-rollup-label { display: block; font-weight: 600; font-size: 14px; }
.evidence-disp { font-size: 14px; margin: 12px 0 6px; }
.evidence-disp .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.evidence-table { margin-bottom: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; transition: box-shadow .12s; text-decoration: none; color: var(--ink); display: block; }
.tile:hover { box-shadow: 0 2px 10px rgba(33,29,23,.12); text-decoration: none; }
.tile .thumb { height: 140px; background: #eae4d5 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--side-muted); font-size: 11px; overflow: hidden; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile .thumb .auth-image-loading,
.tile .thumb .auth-image-missing,
.tile .thumb .auth-image-failed { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.auth-image-loading { background: linear-gradient(90deg, #eae4d5 0%, #f3eee3 50%, #eae4d5 100%); background-size: 200% 100%; animation: auth-img-shimmer 1.2s ease infinite; }
.auth-image-missing { color: var(--side-muted); font-size: 11px; background: #eae4d5; }
.auth-image-failed {
    color: var(--red); font-size: 11px; line-height: 1.3; text-align: center;
    background: #f4e8e4; border: 0; cursor: pointer; padding: 8px;
    font-family: inherit;
}
.auth-image-failed:hover { background: #edd9d3; }
.review-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    z-index: 40; background: var(--ink); color: #f5f2ea; border: 0;
    border-radius: 8px; padding: 12px 18px; font: inherit; font-weight: 600;
    cursor: pointer; box-shadow: 0 8px 24px rgba(33,29,23,.25); max-width: min(440px, 92vw);
}
.review-toast:hover { background: #332d23; }
.grouping-reason-chip {
    background: #e8e2d4; color: var(--ink); font-weight: 600;
    letter-spacing: 0; text-transform: none; font-size: 12px; padding: 4px 10px;
}
@keyframes auth-img-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.detail-grid .imgs img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.tile .body { padding: 10px 12px 12px; }
.tile .title { font-weight: 600; font-size: 13px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .meta { font-size: 11px; color: var(--side-muted); margin-top: 4px; }
.tile .est { font-family: var(--mono); font-size: 12px; color: var(--gold-darker); margin-top: 6px; }

/* badges */
.badge { display: inline-block; font-size: 10px; letter-spacing: .04em; border-radius: 4px; padding: 2px 7px; font-weight: 600; }
.badge.captured { background: #eae4d5; color: var(--side-muted); }
.badge.cataloged { background: #e3ead9; color: var(--green); }
.badge.needsreview { background: #f4e3c0; color: #8a6117; }
.badge.evaluated { background: #e0e6ef; color: #3b567e; }
.badge.listed { background: #efe0ea; color: #7e3b68; }
.badge.sold { background: #dcd6c8; color: var(--ink); }
.badge.returned { background: #eae4d5; color: var(--side-muted); }
.badge.ai { background: #211d17; color: var(--gold); }
.badge.human { background: #e3dcc9; color: var(--ink); }
/* Appraisal basis chips (HF-05b) */
.badge.basis { background: #e8e2d4; color: var(--ink); }
.badge.basis-model { background: #211d17; color: var(--gold); }
.badge.basis-professional { background: #e0e6ef; color: #3b567e; }
.badge.basis-owner { background: #e3ead9; color: var(--green); }
.badge.basis-receipt { background: #efe0ea; color: #7e3b68; }
.appraisal-range { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.appraisal-history { margin: 0; padding: 0; list-style: none; }
.appraisal-history li {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.appraisal-history li:last-child { border-bottom: none; }
.muted { color: var(--side-muted); }
.appraisal-history .muted { font-size: 12px; }

/* filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters input[type=text], .filters input[type=search], .filters input[type=tel], .filters input[type=number], .filters select { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--panel); }
.filters input[type=text], .filters input[type=search] { min-width: 220px; }
.filters .chk, .opinion-checks .chk, .chk {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--side-muted); user-select: none;
}
.filters .chk input, .opinion-checks .chk input, .chk input { accent-color: var(--gold-dark); }
.opinion-checks { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }

.queue-intro {
    font-size: 13px; color: var(--side-muted); line-height: 1.45;
    margin: 0 0 12px; max-width: 44rem;
}
.queue-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin: 0 0 12px;
}
.queue-toolbar-hint { font-size: 12px; color: var(--side-muted); }
.queue-msg { font-size: 13px; margin: 0 0 12px; }
.queue-msg.ok { color: var(--green); }
.queue-msg.err { color: var(--red); }
.queue-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.queue-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.tile-wrap { position: relative; touch-action: manipulation; }
.tile-wrap.selected .tile { outline: 2px solid var(--gold-dark); outline-offset: 1px; }
/* Hover-corner checkmark (web); always visible in select mode / when selected. */
.tile-check {
    position: absolute; z-index: 2; top: 8px; left: 8px;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0; margin: 0;
    border: 0; background: transparent; cursor: pointer;
    opacity: 0; transition: opacity .12s ease;
}
.tile-wrap.selectable:hover .tile-check,
.tile-wrap.selectable:focus-within .tile-check,
.tile-wrap.select-mode .tile-check,
.tile-wrap.selected .tile-check {
    opacity: 1;
}
.tile-check-box {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 6px;
    background: rgba(255,255,255,.94); border: 1.5px solid var(--line);
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    font-size: 13px; font-weight: 700; color: var(--gold-darker); line-height: 1;
}
.tile-check-box.is-on {
    background: var(--gold-dark); border-color: var(--gold-dark); color: #fff;
}
/* Touch: always show a faint hit target once select mode is on (hover doesn't exist). */
@media (hover: none) {
    .tile-wrap.select-mode .tile-check,
    .tile-wrap.selected .tile-check { opacity: 1; }
}

/* Selection action bar — top bar on wide, bottom sheet on narrow (design §7) */
.selection-action-bar {
    position: sticky; top: 0; z-index: 40;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 4px 18px rgba(33, 29, 23, 0.08);
    margin-bottom: 16px;
}
.selection-action-bar-inner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    padding: 10px 14px;
}
.selection-count { font-size: 13px; min-width: 5.5rem; }
.selection-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.selection-dismiss { min-width: 2.25rem; padding-left: 10px; padding-right: 10px; }
.selection-move-panel {
    border-top: 1px solid var(--line); padding: 12px 14px 14px;
    display: flex; flex-direction: column; gap: 12px;
}
.selection-move-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: 13px; font-weight: 600;
}
.selection-move-foot { display: flex; justify-content: flex-end; }
.selection-move-msg { margin: 0; font-size: 13px; }
.selection-move-msg.ok { color: var(--green); }
.selection-move-msg.err { color: var(--red); }
@media (max-width: 720px) {
    .selection-action-bar {
        position: fixed; left: 10px; right: 10px; bottom: 12px; top: auto;
        margin: 0; border-radius: 14px; z-index: 80;
        box-shadow: 0 -4px 24px rgba(33, 29, 23, 0.14);
    }
    .selection-actions { margin-left: 0; width: 100%; }
    .selection-action-bar-inner { padding-bottom: 12px; }
    /* Room so bottom sheet doesn't cover last tiles */
    .main-col { padding-bottom: 96px; }
}

/* buttons */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.btn.primary:hover { background: #332d23; }
.btn.danger { color: var(--red); border-color: #e0c4bc; }
.btn.danger:hover { background: #f8ebe7; }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* Recently deleted (UX 5 trash) */
.recently-deleted-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recently-deleted-table th,
.recently-deleted-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.recently-deleted-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--side-muted); }
.recently-deleted-table tr.is-selected { background: #f7f2e8; }
.recently-deleted-table .thumb-cell { width: 52px; }
.recently-deleted-table .deleted-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--bg); }
.recently-deleted-table .row-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.selection-delete-copy { margin: 0; font-size: 13px; color: var(--side-muted); line-height: 1.45; }

/* capture dropzone */
.dropzone { border: 2px dashed var(--gold); border-radius: 10px; background: #faf7ef; padding: 48px 24px; text-align: center; color: var(--side-muted); margin-bottom: 20px; }
.dropzone.active { background: #f3ecd9; border-color: var(--gold-dark); }
.dropzone .big { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.dropzone .hint { font-size: 12px; }

/* photo ingest (paste / drop / pick / camera) */
.photo-ingest { padding: 28px 20px 24px; }
.photo-ingest-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.photo-ingest-file-btn { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; }
.photo-ingest-hidden-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; width: 100%; height: 100%;
}
.photo-ingest-heic-note {
  margin: 14px auto 0; max-width: 36rem; font-size: 11px; line-height: 1.4; color: var(--side-muted);
}
.photo-ingest-strip {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px;
}
.photo-ingest-tile {
  width: 88px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
  text-align: center; font-size: 10px;
}
.photo-ingest-tile img { width: 88px; height: 88px; object-fit: cover; display: block; background: #efe9da; }
.photo-ingest-tile-ph {
  width: 88px; height: 88px; display: flex; align-items: center; justify-content: center;
  background: #eae4d5; font-weight: 700; letter-spacing: .04em; color: var(--side-muted);
}
.photo-ingest-tile-meta { padding: 4px 4px 6px; color: var(--side-muted); }
.photo-ingest-tile-meta .ok { color: var(--green); font-weight: 600; }
.photo-ingest-tile-meta .err { color: var(--red); font-weight: 600; }
.photo-ingest-tile.status-uploading { outline: 2px solid var(--gold); }
.photo-ingest-tile.status-done { outline: 2px solid var(--green); }
.photo-ingest-tile.status-failed, .photo-ingest-tile.status-rejected { outline: 2px solid var(--red); }
.photo-ingest-tile { position: relative; }
.photo-ingest-tile-dismiss {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(33,29,23,.65); color: #fff;
  font-size: 10px; line-height: 18px; cursor: pointer;
}
.photo-ingest-tile-dismiss:hover { background: rgba(33,29,23,.85); }
/* Transient "just added" marker on queue/inventory tiles (session-scoped). */
.tile .thumb { position: relative; }
.tile-new-chip {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  background: var(--gold-dark, #8a6d1d); color: #fff;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 9px; pointer-events: none;
}
.photo-ingest-summary { margin-top: 12px; font-size: 13px; font-weight: 600; }

/* ── Filing path sentence control + shared popover picker (UX pass §4) ── */
.filing-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; line-height: 1.4;
}
.filing-path-lead {
  font-weight: 700; color: var(--ink); margin-right: 4px;
}
.filing-path-sep {
  color: var(--side-muted); margin: 0 2px; user-select: none;
}
.popover-picker {
  position: relative; display: inline-flex; vertical-align: middle;
}
.popover-picker-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: transparent; padding: 3px 6px; margin: 0;
  border-radius: 5px; cursor: pointer; font: inherit; color: var(--ink);
  font-weight: 600; max-width: min(280px, 70vw);
}
.popover-picker-trigger:hover,
.popover-picker-trigger.is-open {
  background: var(--bg);
}
.popover-picker-trigger.is-placeholder {
  color: var(--side-muted); font-weight: 500;
}
.popover-picker-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.popover-picker-chev {
  color: var(--side-muted); font-size: 10px; line-height: 1;
  flex-shrink: 0; opacity: .75;
}
.popover-picker-backdrop {
  position: fixed; inset: 0; z-index: 40; background: transparent;
}
.popover-picker-panel {
  position: absolute; z-index: 50; top: calc(100% + 4px); left: 0;
  min-width: 240px; max-width: min(320px, 92vw);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(33, 29, 23, .14);
  display: flex; flex-direction: column; max-height: min(360px, 70vh);
}
.popover-picker-search {
  padding: 8px 8px 6px; border-bottom: 1px solid var(--line);
}
.popover-picker-search input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; background: #fff; font: inherit;
}
.popover-picker-list {
  overflow-y: auto; flex: 1; padding: 4px 0;
}
.popover-picker-choice-row {
  display: flex; align-items: stretch; width: 100%;
}
.popover-picker-choice-row.is-selected { background: #f3ecd9; }
.popover-picker-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  flex: 1; min-width: 0; text-align: left; border: 0; background: transparent;
  padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink);
}
.popover-picker-choice:hover { background: var(--bg); }
.popover-picker-choice.is-selected {
  background: transparent; font-weight: 600;
}
.popover-picker-rename {
  flex-shrink: 0; width: 36px; border: 0; background: transparent;
  cursor: pointer; color: var(--side-muted); font-size: 14px; line-height: 1;
  padding: 0;
}
.popover-picker-rename:hover { color: var(--gold-darker); background: var(--bg); }
.popover-picker-choice.is-clear {
  color: var(--side-muted); font-style: italic;
}
.popover-picker-choice-main { font-size: 13px; }
.popover-picker-choice-sec {
  font-size: 11px; color: var(--side-muted);
}
.popover-picker-empty {
  padding: 14px 12px; font-size: 12px; color: var(--side-muted); text-align: center;
}
.popover-picker-foot {
  border-top: 1px solid var(--line); padding: 4px 0;
}
.popover-picker-foot-row {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 12px; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--gold-dark);
}
.popover-picker-foot-row:hover { background: var(--bg); color: var(--gold-darker); }
.filing-path-create {
  padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px;
}
.filing-path-create input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; font: inherit;
}
.filing-path-create-actions { display: flex; gap: 6px; }
.filing-path-create-err {
  font-size: 12px; color: var(--red); line-height: 1.35;
}

/* tables */
table.list, table.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.list th, table.table th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td, table.table td { padding: 10px 12px; border-bottom: 1px solid #efe9da; vertical-align: middle; }
table.list tr:last-child td, table.table tr:last-child td { border-bottom: none; }
table.table tr.muted-row { opacity: .55; }
.mono { font-family: var(--mono); }

/* detail */
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.detail-grid .imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.flag-card { border-left: 3px solid var(--amber); background: #fbf6ea; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.flag-card .reason { margin: 6px 0; }
.flag-card .meta { font-size: 11px; color: var(--side-muted); }

.empty { text-align: center; color: var(--side-muted); padding: 40px 0; font-size: 13px; }
#blazor-error-ui { position: fixed; bottom: 0; left: 0; right: 0; background: #f4e3c0; padding: 10px 16px; z-index: 999; }


/* ---- Legal / public pages (privacy, support) ---- */
.legal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f5f2ea);
  color: var(--ink, #211d17);
  font-family: var(--sans), system-ui, sans-serif;
}
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line, #e3dcc9);
  background: var(--panel, #fff);
}
.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  font-family: var(--serif), Georgia, serif;
}
.legal-brand:hover { text-decoration: none; opacity: 0.85; }
.legal-nav { display: flex; gap: 16px; font-size: 13.5px; }
.legal-nav a { color: inherit; opacity: 0.75; text-decoration: none; }
.legal-nav a:hover { opacity: 1; text-decoration: underline; }
.legal-main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 48px;
  box-sizing: border-box;
}
.legal-doc h1 {
  font-family: var(--serif), Georgia, serif;
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 700;
}
.legal-doc h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.legal-doc p, .legal-doc li {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(33, 29, 23, 0.88);
}
.legal-doc ul { padding-left: 1.2em; margin: 8px 0 12px; }
.legal-doc li { margin: 4px 0; }
.legal-meta {
  font-size: 12.5px !important;
  color: var(--side-muted, #8f8672) !important;
  margin: 0 0 20px !important;
}
.legal-doc .mono {
  font-family: var(--mono), ui-monospace, monospace;
  font-size: 12.5px;
}
.legal-foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-top: 1px solid var(--line, #e3dcc9);
  font-size: 12.5px;
  color: var(--side-muted, #8f8672);
  background: var(--panel, #fff);
}
.legal-foot a { color: inherit; }

/* Public / anonymous shell */
.shell-public { flex-direction: column; }
.public-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--panel, #fff);
}
.public-brand { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.public-actions { display: flex; gap: 10px; }
.btn.sm { padding: 6px 12px; font-size: 13px; text-decoration: none; display: inline-block; }
.btn.ghost {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 6px; padding: 7px 14px; font-weight: 600; text-decoration: none;
}
.btn.ghost:hover { background: var(--bg); }
.landing {
  max-width: 640px; margin: 0 auto; padding: 48px 28px 64px;
}
.landing-hero { text-align: left; }
.landing-mark {
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--side-muted, #8f8672); margin-bottom: 12px;
}
.landing-tag {
  font-size: 32px; font-weight: 700; line-height: 1.2; margin: 0 0 16px;
  color: var(--ink, #211d17);
}
.landing-pitch {
  font-size: 16px; line-height: 1.65; color: rgba(33, 29, 23, 0.82);
  margin: 0 0 22px; max-width: 36rem;
}
.landing-uses {
  display: grid; gap: 12px; margin: 0 0 28px; max-width: 36rem;
}
.landing-use {
  border: 1px solid var(--line, #e3dcc9); border-radius: 8px;
  background: var(--panel, #fff); padding: 12px 14px;
}
.landing-use-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--side-muted, #8f8672); margin-bottom: 4px;
}
.landing-use p {
  margin: 0; font-size: 14px; line-height: 1.55; color: rgba(33, 29, 23, 0.85);
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.landing-actions .btn { text-decoration: none; display: inline-block; }
.landing-foot { font-size: 13px; color: var(--side-muted, #8f8672); }
.landing-foot a { color: inherit; }

/* Get the Field app banner (Android UA, dismissible) */
.field-app-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, #2a241c 0%, #3a3228 100%);
  border-bottom: 1px solid rgba(154, 111, 36, 0.45);
  color: #f5efe6;
  font-size: 0.9rem;
}
.field-app-banner-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 12rem; flex: 1; }
.field-app-banner-copy { opacity: 0.85; font-size: 0.82rem; }
.field-app-banner-actions { display: flex; align-items: center; gap: 0.75rem; }
.field-app-banner-dismiss {
  background: none; border: 0; color: #c4b8a4; cursor: pointer;
  font: inherit; text-decoration: underline; padding: 0.25rem;
}
.field-app-banner-dismiss:hover { color: #f5efe6; }

/* Possible outcomes — texture follows valuationBasis; no per-item colour override. */
.possible-outcomes-panel {
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 0 16px;
}
.po-toggle {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; color: inherit; text-align: left;
}
.po-toggle-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.po-kicker {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--side-muted);
}
.po-toggle-label { font-weight: 600; font-size: 14px; }
.po-chevron {
    font-size: 16px; line-height: 1; color: var(--side-muted);
    transition: transform .15s ease; display: inline-block;
}
.po-chevron.is-collapsed { transform: rotate(-90deg); }
.po-chevron.is-open { transform: rotate(0deg); }
.po-body { margin-top: 10px; }
.po-scope-note, .po-note, .po-foot {
    font-size: 12px; color: var(--side-muted); line-height: 1.45; margin: 0 0 8px;
}
.po-headline { font-family: var(--serif); font-size: 18px; margin: 0 0 10px; }
.po-sentence { margin: 0 0 8px; line-height: 1.5; font-size: 14px; padding: 2px 6px; }
.value-basis-computed { font-weight: 600; }
.value-basis-human { font-weight: 600; }
.value-basis-comp { font-weight: 500; }
.value-basis-ai-guess {
    background: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(139, 109, 54, 0.12) 3px, rgba(139, 109, 54, 0.12) 6px);
}
.po-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 10px 0 12px; background: #efe6d0; }
.po-bar-seg { display: block; min-width: 4px; height: 100%; }
.po-bar-seg.value-basis-computed { background: #6d5326; }
.po-bar-seg.value-basis-human { background: #5a7a4d; }
.po-bar-seg.value-basis-comp { background: #8a6d3b; }
.po-bar-seg.value-basis-ai-guess {
    background: repeating-linear-gradient(-45deg, #cbb886 0 4px, #e6d9bd 4px 8px);
}
.po-concentration { list-style: none; padding: 0; margin: 0 0 10px; }
.po-concentration li { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; margin: 0 0 6px; }
.po-amt { font-family: var(--mono); }
.po-if { color: var(--side-muted); }
.po-ladder-toggle {
    background: none; border: 0; padding: 0; font: inherit; color: var(--gold-dark);
    cursor: pointer; font-size: 13px; font-weight: 600; margin: 6px 0;
}
.po-ladder { list-style: none; padding: 0; margin: 8px 0; }
.po-ladder li { border-left: 3px solid var(--line); padding: 6px 0 8px 10px; margin: 0 0 6px; }
.po-ladder li.po-here { border-left-color: var(--gold-darker); }
.po-ladder li.po-hyp { opacity: 0.78; }
.po-ladder-label { font-weight: 600; font-size: 13px; }
.po-you, .po-hyp-tag {
    font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    margin-left: 8px; color: var(--gold-darker);
}
.po-ladder-amt { font-family: var(--mono); font-size: 12px; }
.po-ladder-buys { font-size: 12px; color: var(--side-muted); }
.po-contribution {
    font-size: 14px; line-height: 1.45; margin: 8px 0 12px;
    padding: 6px 10px; border-left: 3px solid var(--gold-dark, #8a6d3b);
}
.po-outlier {
    display: flex; gap: 10px; align-items: flex-start; justify-content: space-between;
    background: #f7f0de; border: 1px solid var(--line); border-radius: 6px;
    padding: 8px 10px; margin: 0 0 10px; font-size: 13px; line-height: 1.45;
}
.po-outlier p { margin: 0; }
.po-outlier-dismiss {
    background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
    color: var(--side-muted); text-decoration: underline; white-space: nowrap;
}
.po-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--side-muted); }
.po-sort select { font: inherit; }

@media print {
    .possible-outcomes-panel { display: none !important; }
    .sidebar, .estate-bar, .page-head-actions, .field-app-banner, .no-print, .view-toggle { display: none !important; }
    .valuation-sheet { border: 0; box-shadow: none; }
}

/* First-run purpose wizard */
.estate-pick-wizard { max-width: 820px; }
.estate-pick-fallback { margin-top: 28px; font-size: 13px; color: var(--side-muted); }
.purpose-wizard-kicker {
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold-darker); margin-bottom: 6px;
}
.purpose-groups {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px; margin: 0 0 18px;
}
.purpose-group-card {
    text-align: left; cursor: pointer; font: inherit; color: inherit;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: 14px 16px;
}
.purpose-group-card:hover { border-color: var(--gold); }
.purpose-group-card.on {
    border-color: var(--gold-dark); box-shadow: 0 0 0 2px rgba(138, 109, 59, 0.18);
    background: #fbf6ea;
}
.purpose-group-label { display: block; font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.purpose-group-hint { display: block; font-size: 12px; color: var(--side-muted); line-height: 1.4; }
.purpose-specifics { display: flex; flex-direction: column; gap: 14px; margin: 0 0 16px; }
.purpose-specific-head {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--side-muted); margin-bottom: 6px;
}
.purpose-check {
    display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px;
    font-size: 14px; line-height: 1.4;
}
.purpose-check input { margin-top: 3px; }
.purpose-sub { display: block; font-size: 12px; color: var(--side-muted); font-weight: 400; }
.purpose-noun-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.purpose-noun-chip {
    border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
    background: var(--bg); cursor: pointer; font-size: 13px;
}
.purpose-noun-chip input { position: absolute; opacity: 0; pointer-events: none; }
.purpose-noun-chip.on { border-color: var(--gold-dark); background: #fbf6ea; font-weight: 600; }
.purpose-wizard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.purpose-name-label { display: block; font-weight: 600; margin-bottom: 6px; }
.purpose-name-input {
    width: 100%; max-width: 480px; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: 6px; font: inherit; box-sizing: border-box;
}
.purpose-examples { font-size: 12px; color: var(--side-muted); margin: 6px 0 16px; }
.purpose-error { color: var(--red); font-size: 13px; }
.purpose-inline-lead { font-size: 12px; color: var(--side-muted); margin: 10px 0; }
.purpose-estate-meta { font-size: 13px; color: var(--side-muted); margin: 8px 0 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.purpose-edit-card { margin: 0 0 12px; padding: 12px; background: var(--bg); border-radius: 8px; }
.purpose-banner {
    background: #f7f0de; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 14px; margin: 0 0 16px; font-size: 13px; line-height: 1.5;
}
.purpose-banner.claim { background: #f6ebe6; border-color: #e0c4bc; }
.purpose-fields.compact .purpose-groups { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.seed-rooms { margin: 8px 0 12px; }

@media (max-width: 640px) {
    .purpose-groups { grid-template-columns: 1fr; }
    .estate-pick { margin: 12px 12px 32px; }
}

/* Item-detail media select / split */
.media-strip-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin: 0 0 10px;
}
.media-tile {
    position: relative;
    display: inline-block;
    margin: 0 8px 8px 0;
    vertical-align: top;
    max-width: 100%;
    touch-action: manipulation;
}
.media-tile.selected {
    outline: 2px solid var(--gold-dark, #8a6d3b);
    outline-offset: 2px;
    border-radius: 10px;
}
.media-tile .tile-check { opacity: 1; top: 10px; left: 10px; }
.media-tile-hit { cursor: pointer; }
.split-arrived {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    border-color: var(--gold-dark, #8a6d3b);
}
.split-guard {
    margin: 0;
    padding: 0 14px 12px;
    font-size: 13px;
    color: var(--side-muted);
}
.split-hint { margin: 0 0 10px; }

/* Photo-led browsing, with full uncropped images in the item viewer. */
.grid:not(.grid-compact) { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:20px; }
.grid:not(.grid-compact) .tile .thumb { height:auto; aspect-ratio:4/5; overflow:hidden; }
.grid:not(.grid-compact) .tile .thumb img { width:100%; height:100%; object-fit:cover; }
.tile .title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nav-management { margin-top:18px; border-top:1px solid #ffffff26; padding-top:14px; }
.nav-management summary { padding:8px 0; cursor:pointer; }
.view-summary { margin-bottom:14px; }
.detail-grid { grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr); align-items:start; }
.detail-grid > * { min-width:0; }
.photo-navigation { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.photo-navigation label { margin-left:auto; display:flex; align-items:center; gap:8px; }
.photo-navigation input { max-width:110px; }
.photo-viewport { overflow:auto; max-height:75vh; background:#e9e5dd; border-radius:12px; }
.detail-grid .imgs .photo-viewport img { width:var(--photo-zoom,100%); max-width:none; height:auto; margin:0; display:block; border:0; }
.photo-thumbnails { display:flex; gap:8px; overflow-x:auto; padding:10px 0 16px; }
.photo-thumbnails button { flex:0 0 64px; padding:3px; border:2px solid transparent; border-radius:8px; background:transparent; cursor:pointer; }
.photo-thumbnails button.active { border-color:var(--gold,#b8923a); }
.detail-grid .imgs .photo-thumbnails img { width:54px; height:64px; object-fit:cover; margin:0; }
.img-tile[hidden] { display:none !important; }
.attention-photo-card { display:grid; grid-template-columns:minmax(180px,35%) 1fr; gap:20px; margin-bottom:18px; }
.attention-photo-card > a img { width:100% !important; height:auto !important; aspect-ratio:4/5; object-fit:cover; }
summary { cursor:pointer; }
@media(max-width:900px) { .detail-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:560px) {
 .grid:not(.grid-compact) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .grid:not(.grid-compact) .tile .body { padding:8px; }
 .attention-photo-card { grid-template-columns:minmax(0,1fr); }
 .photo-navigation label { margin-left:0; }
}

.attention-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:18px; }
.attention-grid .attention-photo-card { grid-template-columns:minmax(0,1fr); padding:12px; margin:0; }
.attention-grid .attention-photo-card > a { display:block; }
.card > summary { font-weight:600; padding:4px 0; }
.card[open] > summary { margin-bottom:16px; }
@media(max-width:560px) { .attention-grid { grid-template-columns:minmax(0,1fr); } }

.detail-grid .imgs .photo-viewport:not(.zoomed) img { max-height:70vh; object-fit:contain; }
.detail-grid .imgs .photo-viewport.zoomed img { max-height:none; }
