/* Propworx Archive — archival catalogue look, light & dark. */
:root {
  --paper: #f6f3ee;
  --card: #fffdf9;
  --ink: #1d1a15;
  --ink-2: #4a453c;
  --muted: #7a7366;
  --line: #e2dcd1;
  --accent: #9a4d12;
  --accent-ink: #fff;
  --accent-soft: #f4e6d8;
  --errata: #a3261d;
  --errata-soft: #f8e5e2;
  --research: #1f5f8b;
  --research-soft: #e2eef6;
  --screen: #5a3e8f;
  --draft: #8a6d00;
  --draft-soft: #fbf3d3;
  --ins: #1d6b32;
  --ins-soft: #dff1e3;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(30 25 15 / .06), 0 4px 14px rgb(30 25 15 / .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f; --card: #1f1c16; --ink: #ece6da; --ink-2: #c8c0b1; --muted: #9a9283; --line: #36312a;
    --accent: #e39a5b; --accent-ink: #1a1208; --accent-soft: #3a2a1b;
    --errata: #f08a7e; --errata-soft: #3b1f1b; --research: #7fb6dd; --research-soft: #1b2b38; --screen: #b9a1e6;
    --draft: #e3c45a; --draft-soft: #332b10; --ins: #7fd394; --ins-soft: #17301d;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); margin: .2em 0 .3em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.15rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--accent-soft); padding: .05em .35em; border-radius: 4px; }
small, .small { font-size: .85em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 700 .8rem/1 var(--sans); letter-spacing: .05em; }
.header-search { flex: 1 1 220px; max-width: 420px; }
.header-search input { width: 100%; }
.header-search { position: relative; }
.header-search .header-suggest { position: absolute; top: calc(100% + 4px); left: 0; width: max(100%, min(26rem, calc(100vw - 32px))); max-height: min(24rem, 70vh); }
.header-suggest-all { border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .45rem; }
.header-suggest .md-suggest-item strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 719px) { .header-search .header-suggest { width: 100%; } }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.nav-admin { color: var(--draft) !important; }
@media (max-width: 719px) { .site-nav { margin-left: 0; width: 100%; gap: .9rem; font-size: .95rem; } .brand-text { font-size: 1rem; } }

input, select, textarea, button { font: inherit; color: inherit; }
input[type=search], input:not([type]), input[type=text], input[type=password], input[type=number], select, textarea {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem; width: 100%;
}
textarea { resize: vertical; line-height: 1.5; }
input.short { width: 7rem; }

.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: .55rem 1rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn-small { padding: .3rem .7rem; font-size: .88rem; }
.btn.is-current { background: var(--ink); color: var(--paper); }
.btn-danger { background: var(--errata); }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
form.inline { display: inline; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--card), var(--paper)); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.hero h1 { max-width: 18ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--muted); margin: 0; font-weight: 600; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 70ch; }
.hero-search { display: flex; gap: .5rem; max-width: 640px; margin-top: 1.25rem; }
.hero-search input { flex: 1; padding: .75rem 1rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-head h2 a { color: inherit; text-decoration: none; }
.guide-block { margin: 2.5rem 0; }

/* Sale cards */
.sale-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sale-card a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.sale-card a:hover { transform: translateY(-2px); }
.sale-card-img { aspect-ratio: 16/9; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.sale-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sale-num { font: 700 2rem var(--serif); color: var(--accent); }
.sale-card-body { padding: .8rem 1rem 1rem; }
.sale-card-body h3 { margin: 0 0 .2rem; }
.sale-card-body p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Lot grid */
.count { color: var(--muted); margin: 1rem 0 .5rem; }
.lot-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 420px) { .lot-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
.lot-card a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.lot-card a:hover { border-color: var(--accent); }
.lot-card-img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; overflow: hidden; }
/* Out of the flow, so a tall photo can't stretch its square; the whole photo shows, centred on white. */
.lot-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lot-card-body { padding: .6rem .75rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.lot-num { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.lot-title { font-size: .93rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lot-price { font-weight: 700; margin-top: auto; padding-top: .3rem; }
.noimg { color: var(--muted); font-size: .85rem; }
.noimg.large { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 99px; letter-spacing: .02em; }
.badge-context { background: var(--research); color: #fff; }
.lot-card-img .badge { position: absolute; top: .4rem; left: .4rem; }
.badge-draft { background: var(--draft-soft); color: var(--draft); border: 1px solid currentColor; }
.badge-shared { background: var(--research-soft); color: var(--research); border: 1px solid currentColor; }
.badge-missing { background: var(--errata-soft); color: var(--errata); border: 1px solid currentColor; }

/* Breadcrumbs, headers */
.crumbs { font-size: .88rem; color: var(--muted); margin: 1.2rem 0 .4rem; }
.crumbs a { color: var(--ink-2); }
.sale-header { margin: 1rem 0 1.5rem; }
.sale-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.group-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0; }
.group-nav a { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: .25rem .8rem; text-decoration: none; color: var(--ink-2); font-size: .9rem; }
.group-nav a small { color: var(--muted); }
.group-nav a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.group-nav a[aria-current] small { color: inherit; opacity: .7; }

/* Lot page */
.lot-header { margin-bottom: 1.25rem; }
.lot-header h1 { max-width: 30ch; }
.lot-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .lot-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); } }
.gallery-main { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; }
.gallery-main img { max-height: 72vh; width: auto; margin: 0 auto; display: block; }
.gallery-thumbs { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .5rem; }
.gallery-thumbs a { position: relative; display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.gallery-thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lot-facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; align-self: start; box-shadow: var(--shadow); }
.lot-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; }
.lot-facts dt { color: var(--muted); font-size: .88rem; padding-top: .1rem; }
.lot-facts dd { margin: 0; }
.lot-facts .price { font: 700 1.35rem var(--serif); display: flex; flex-direction: column; }
.lot-facts .price small { font: 400 .8rem var(--sans); color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tags a { display: inline-block; background: var(--accent-soft); color: var(--ink-2); border-radius: 99px; padding: .15rem .65rem; font-size: .85rem; text-decoration: none; }
.tags a:hover { color: var(--accent); }
.tags-large a { font-size: .95rem; padding: .3rem .85rem; }
.tags small { color: var(--muted); }
.category-columns { columns: 16rem; padding: 0; list-style: none; }
.category-columns li { break-inside: avoid; padding: .1rem 0; }

.lot-text { max-width: 78ch; margin-top: 2rem; }
.prose { overflow-wrap: break-word; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.prose h4 { font-family: var(--serif); font-size: 1.05rem; margin: 1.5em 0 .4em; }
.prose blockquote { margin: 1em 0; padding: .2em 1em; border-left: 3px solid var(--line); color: var(--ink-2); }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: .3rem .6rem; }
.legal_warning, .no_bidders, .addendum, .lot-notes > div { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 6px; padding: .6rem 1rem; margin: 1rem 0; }
.legal_warning h4, .no_bidders h4 { margin-top: .3rem; }
.lot-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.lot-pager a { text-decoration: none; max-width: 45%; }
.lot-pager a span { display: block; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-pager a[rel=next] { text-align: right; }

.notice { background: var(--accent-soft); border-radius: 8px; padding: .6rem 1rem; }
.notice-errata { background: var(--errata-soft); color: var(--errata); font-weight: 600; }
.notice-errata a { color: inherit; }
.result-conflict { color: var(--errata); }
.form-inline { display: flex; gap: .9rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }

/* Post-sale context */
.context { margin: 2.5rem 0; padding-top: 1.5rem; border-top: 3px double var(--line); }
.context-head h2 { margin: 0 0 .3rem; }
.context-sub { color: var(--muted); margin: 0 0 1rem; }
.context-entry { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.context-entry header h3 { margin: .25rem 0 .5rem; }
.kind-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kind-errata, .kind-correction { border-left-color: var(--errata); }
.kind-errata .kind-label, .kind-correction .kind-label { color: var(--errata); }
.kind-research, .kind-provenance { border-left-color: var(--research); }
.kind-research .kind-label, .kind-provenance .kind-label { color: var(--research); }
.kind-screen-use { border-left-color: var(--screen); }
.kind-screen-use .kind-label { color: var(--screen); }
.is-draft { background-image: repeating-linear-gradient(-45deg, transparent 0 12px, var(--draft-soft) 12px 24px); }
.context-meta { font-size: .82rem; color: var(--muted); margin-top: .75rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sources { font-size: .88rem; color: var(--ink-2); margin: .6rem 0 0; padding-left: 1.4rem; }
.sources a { overflow-wrap: anywhere; }
.media-heading { margin-top: 2rem; }
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 1rem 0; }
.media-grid-inline { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.media-item { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.media-item a { display: block; background: #000; }
.media-item img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.media-item figcaption { padding: .55rem .75rem .7rem; font-size: .85rem; display: flex; flex-direction: column; gap: .1rem; }
.media-kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--screen); }
.media-where { color: var(--ink-2); font-family: var(--mono); font-size: .78rem; }
.media-credit { color: var(--muted); font-size: .78rem; }

/* Original listing */
.original-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .original-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .5rem 1rem; text-decoration: none; color: var(--ink-2); border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; }
.tabs a[aria-selected=true] { background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 600; margin-bottom: -1px; }
.original-frame { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-top: 0; background: #fff; display: block; }
.original-thumb { display: block; background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: 1rem; }

/* Research list */
.research-list { list-style: none; padding: 0; margin: 1rem 0; }
.research-list li { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.research-thumb { display: block; width: 64px; height: 64px; background: #fff; border-radius: 6px; overflow: hidden; }
.research-thumb img { width: 64px; height: 64px; object-fit: cover; }
.research-list .muted { display: block; font-size: .85rem; }
.excerpt { margin: .25rem 0 0; color: var(--ink-2); font-size: .93rem; }
.strip { list-style: none; padding: 0; margin: 1rem 0; display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.strip li { flex: 0 0 200px; scroll-snap-align: start; }
.strip img { width: 200px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; display: block; }

/* Tables */
.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
@media (min-width: 720px) { .data { display: table; } }
.data th, .data td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data th { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pager { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.pager a, .pager span { padding: .35rem .75rem; border-radius: 6px; border: 1px solid var(--line); background: var(--card); text-decoration: none; }
.pager [aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager .gap { border: 0; background: none; }

.search-help { margin-top: 1rem; color: var(--ink-2); font-size: .93rem; }
.search-help summary { cursor: pointer; color: var(--accent); }
.page-body { padding-bottom: 3rem; }
/* SitRep posts */
.post .post-meta { margin-top: -.4rem; }
.post img { display: block; max-width: 100%; height: auto; margin: 1rem 0; border-radius: 6px; }
.post-cover { margin: 0 0 1.2rem; }
.post-cover img { width: 100%; }
.post-card .sale-card-body > p:last-child { color: var(--ink-2); }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 1rem 0 3rem; }
.post-nav a[rel=next] { text-align: right; }
.post-images { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem 1rem; margin: 1rem 0; }
.post-image-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .8rem; }
.post-image { display: flex; gap: 1rem; align-items: flex-start; }
.post-image img { border-radius: 4px; flex: none; }
.error-page { padding: 4rem 16px; }

/* Forms / admin */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: .9rem; margin: 1rem 0; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .92rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.form-row { display: flex; gap: .9rem; flex-wrap: wrap; align-items: flex-end; }
.form-row .grow { flex: 1 1 240px; }
.preview:empty { display: none; }
.preview { border: 1px dashed var(--line); border-radius: 8px; padding: .75rem 1rem; background: var(--paper); }
.preview::before { content: "Preview"; display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; }
.admin-lot-head { display: flex; gap: 1.25rem; align-items: center; margin: 1rem 0; }
.admin-lot-head img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.admin-lot-head h1 { margin: .1rem 0; font-size: 1.6rem; }
.admin-columns { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .admin-columns { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.media-edit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: .6rem 0; padding: .5rem .75rem; }
.media-edit summary { display: flex; gap: .75rem; align-items: center; cursor: pointer; }
.media-edit summary img { border-radius: 4px; }
.media-edit-zoom { display: block; flex: none; cursor: zoom-in; }
.media-uses { font-size: .8rem; margin-top: .3rem; }
.media-uses ul { margin: .15rem 0 0; padding-left: 1.1rem; }
.media-uses li { margin: .1rem 0; }
.media-item .media-uses a { display: inline; background: none; }
.media-uses-label, .media-uses summary { color: var(--muted); cursor: default; }
.media-uses summary { cursor: pointer; }
.media-also { margin: .5rem 0 .8rem; }
.media-also summary { cursor: pointer; }
.media-attach { margin: 1rem 0; }
.media-pick { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: .6rem 0; padding: 0; list-style: none; }
.media-pick-item { display: flex; flex-direction: column; gap: .3rem; }
.media-pick-frame { position: relative; }
.media-pick-frame a { display: block; cursor: zoom-in; }
.media-pick-frame img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #000; }
.media-pick-frame:has(input:checked) img { outline: 3px solid var(--accent); outline-offset: 1px; }
.media-pick-item .frakr-pick-frame { background: rgb(0 0 0 / .35); border-radius: 4px 0 4px 0; }
/* The full caption and lot are in the full-size view. */
.media-pick-item [data-pick-caption] { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.media-pick-item .btn { align-self: flex-start; }
.media-share { margin: .6rem 0; }
.admin-results { padding-left: 1.2rem; }
.is-admin .site-header { border-bottom-color: var(--draft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 3rem; padding: 1.5rem 0 2rem; font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.footer-inner p { max-width: 60ch; margin: 0; }
.footer-inner nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(10 8 5 / .92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 3.5rem 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; background: #fff; cursor: zoom-in; transition: transform .15s ease-out; touch-action: pinch-zoom; }
.lightbox img.is-zoomed { cursor: zoom-out; transition: none; touch-action: none; }
.lightbox figure { overflow: hidden; }
.lightbox figcaption { color: #eee; margin-top: .75rem; text-align: center; max-width: 80ch; }
.lightbox-close { position: fixed; top: .6rem; right: .9rem; font-size: 2rem; background: none; color: #fff; border: 0; cursor: pointer; }
.lightbox-nav { position: fixed; top: 50%; transform: translateY(-50%); font-size: 2.5rem; background: rgb(255 255 255 / .1); color: #fff; border: 0; width: 2.75rem; height: 4rem; border-radius: 8px; cursor: pointer; }
.lightbox-nav.prev { left: .5rem; } .lightbox-nav.next { right: .5rem; }
.lightbox-nav[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .lot-pager, .gallery-thumbs, .lightbox, .header-search { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Auction houses */
.house-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.house-card a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.house-card a:hover { border-color: var(--accent); }
.house-card h3 { margin: 0 0 .25rem; }
.house-card p { margin: .15rem 0; font-size: .9rem; }
.house-card.is-empty a { box-shadow: none; background: transparent; border-style: dashed; }
.house-card.is-empty h3 { color: var(--ink-2); }
.badge-defunct { background: var(--line); color: var(--ink-2); vertical-align: middle; font-family: var(--sans); }

/* Editor */
.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.admin-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.admin-nav a:hover { color: var(--accent); }
.data.compact th, .data.compact td { padding: .3rem .55rem; font-size: .9rem; }
.data th[scope=row] { text-transform: none; letter-spacing: 0; color: var(--ink); white-space: nowrap; }

/* Plugins */
.references { margin: 2rem 0 0; }
.references-h { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.ref-list { padding-left: 1.2rem; margin: .3rem 0 .8rem; }
.ref-list li { margin: .15rem 0; }
.plugin-panels { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
.plugin-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.plugin-panel h2 { margin-top: 0; }
/* The WYSIWYG / Markdown editor (public/assets/vendor/toastui-editor) that replaces Markdown textareas. */
.md-editor { margin: .3rem 0 1rem; font-family: var(--sans); }
.md-editor .toastui-editor-defaultUI { border-color: var(--line); border-radius: 8px; background: var(--card); }
.md-editor .toastui-editor-contents { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
.md-editor .toastui-editor-mode-switch { border-radius: 0 0 8px 8px; }
/* Fill the box, so a click anywhere in its empty space puts the cursor in the text (--md-min is set by app.js). */
.md-editor .toastui-editor-main .ProseMirror { min-height: var(--md-min, 160px); }
.md-editor .md-shorthand { display: inline-block; padding: 0 .4em; border-radius: 4px; background: var(--accent-soft); color: var(--ink);
  font-family: var(--sans); font-size: .9em; line-height: 1.5; cursor: default; }
.md-suggest { position: fixed; z-index: 50; width: min(26rem, calc(100vw - 16px)); max-height: 20rem; overflow-y: auto; padding: .25rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); font-family: var(--sans); }
.md-suggest[hidden] { display: none; }
.md-suggest-item { display: flex; gap: .55rem; align-items: center; padding: .3rem .4rem; border-radius: 6px; cursor: pointer; }
.md-suggest-item[aria-selected="true"], .md-suggest-item:hover { background: var(--accent-soft); }
.md-suggest-item img, .md-suggest-icon { flex: none; width: 36px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--line); }
.md-suggest-icon { display: grid; place-items: center; font: 600 .95rem var(--serif); color: var(--ink-2); }
.md-suggest-item span { display: flex; flex-direction: column; min-width: 0; }
.md-suggest-item strong { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-suggest-item small { font-size: .78rem; color: var(--muted); }
.md-suggest-item > span:nth-child(2) { flex: 1; }
.md-suggest-open { flex: none; width: 1.9rem; height: 1.9rem; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font-size: 1rem; cursor: pointer; }
.md-suggest-open:hover { background: var(--card); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.md-editor .toastui-editor-ww-container .md-shorthand { cursor: pointer; }
.md-editor .toastui-editor-ww-container .md-shorthand:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.md-chip-edit { position: fixed; z-index: 50; width: min(24rem, calc(100vw - 16px)); padding: .75rem; display: grid; gap: .55rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); font-family: var(--sans); }
.md-chip-edit[hidden] { display: none; }
.md-chip-edit label { display: grid; gap: .2rem; font-size: .82rem; font-weight: 600; }
.md-chip-edit input { font: inherit; font-weight: 400; font-size: .92rem; }
.md-chip-edit .md-chip-suggest { position: static; width: auto; max-height: 14rem; box-shadow: none; }
.md-chip-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.md-chip-error { margin: 0; color: var(--errata); font-size: .85rem; }
.md-chip-error[hidden] { display: none; }
.md-editor .md-shorthand.is-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.frakr-results { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.frakr-results li { display: flex; flex-direction: column; gap: .3rem; }
.frakr-results img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: #000; border-radius: 6px; }
.frakr-results li.is-attached img { outline: 3px solid var(--research); }
/* A shot's other frames, until its "+N" opens them (the script adds is-collapsing, so without it they all show). */
.frakr-results.is-collapsing li.is-grouped:not(.is-open) { display: none; }
.frakr-results li.is-grouped img { opacity: .85; }
.frakr-results li.is-anchor img { outline: 3px solid var(--accent, var(--research)); outline-offset: 1px; }
.frakr-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--ink-2); filter: none; }
.frakr-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 0; }
.frakr-frame { position: relative; }
.frakr-zoom { display: block; cursor: zoom-in; }
/* The tick box sits in the frame's corner with a generous target; the rest of the frame opens the full-size view. */
.frakr-pick-frame { position: absolute; top: 0; left: 0; z-index: 1; padding: .45rem; cursor: pointer; }
.frakr-pick-frame input { display: block; width: 1.2rem; height: 1.2rem; margin: 0; cursor: pointer; }
.frakr-frame:has(.frakr-pick-frame input:checked) img { outline: 3px solid var(--accent, var(--research)); outline-offset: 1px; }
.frakr-similar-to { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.frakr-similar-to img { width: 80px; height: 45px; object-fit: cover; border-radius: 4px; background: #000; }
.pick-lightbox { width: min(96vw, 1500px); max-height: 96vh; padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #eee; overflow: hidden; }
.pick-lightbox::backdrop { background: rgb(0 0 0 / .8); }
.pick-lightbox img { display: block; width: 100%; max-height: calc(96vh - 4rem); object-fit: contain; background: #000; }
.pick-lightbox-bar { display: flex; gap: .6rem 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .6rem .8rem; background: #111; }
.pick-lightbox-buttons { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.pick-lightbox .btn-quiet { color: #eee; box-shadow: inset 0 0 0 1px #444; }
.pick-lightbox [hidden] { display: none; }
.frakr-people { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0; }
.frakr-person { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem .15rem .15rem; border: 1px solid var(--line, #ccc); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.frakr-person img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #000; }
.frakr-person.is-chosen { border-color: var(--research); font-weight: 600; }
.frakr-person small { color: var(--muted); font-size: .75rem; }
button.frakr-person { background: var(--card); color: inherit; cursor: pointer; font: inherit; font-size: .85rem; }
button.frakr-person:hover, button.frakr-person:focus { border-color: var(--research); outline: none; }
.frakr-pick-field { position: relative; }
.frakr-pick-suggest { position: absolute; z-index: 10; left: 0; top: 100%; min-width: 16rem; max-width: 32rem; margin: .25rem 0 0;
  padding: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.frakr-pick-suggest[hidden] { display: none; }
.media-source { font-size: .8rem; }

/* Embedded videos (YouTube/Vimeo links on a line of their own, see Context::embedVideos) */
.video { margin: 1.25rem 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: .4rem; font-size: .9rem; color: var(--muted); }

/* Series picker on a lot's context page */
.series-pick { margin: 1rem 0; }
.series-pick h2 { margin: 0; font-size: 1.15rem; }
.series-pick fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.series-pick legend { font-weight: 600; font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: .3rem; }

/* Recent changes and diffs */
.changes-filter { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin: 1rem 0 1.5rem; font-size: .9rem; }
.changes-filter label { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); }
.changes-day { font-size: 1rem; margin: 1.6rem 0 .4rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.changes { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.changes li { padding: .3rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.changes li.is-deleted .ch-item { text-decoration: line-through; }
.changes .kind-label { margin-right: .15rem; }
.ch-links { color: var(--muted); font-size: .85rem; }
.ch-sep { color: var(--muted); margin: 0 .2rem; }
.changes time { font-variant-numeric: tabular-nums; }
.ch-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 .4rem; border-radius: 99px; margin-right: .25rem;
  border: 1px solid var(--line); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; vertical-align: .08em; }
.ch-tag-new, .ch-tag-published { color: var(--ins); border-color: currentColor; }
.ch-tag-deleted, .ch-tag-unpublished { color: var(--errata); border-color: currentColor; }
.ch-tag-new-draft { color: var(--draft); border-color: currentColor; }
.ch-delta { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.ch-delta.is-pos { color: var(--ins); }
.ch-delta.is-neg { color: var(--errata); }
.ch-summary { color: var(--ink-2); font-style: italic; }
.ch-summary-block { font-style: italic; color: var(--ink-2); }
.ch-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0; font-size: .92rem; }
.ch-image { max-width: 240px; border-radius: 6px; }
.diff-legend { font-size: .85rem; margin: 1rem 0; }
.diff-field { margin: 1.2rem 0; }
.diff-field h2, .diff-field h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .4rem; }
table.diff { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .82rem; table-layout: fixed;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
table.diff td { padding: .15rem .5rem; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
table.diff td.diff-sign, table.diff .diff-gap td:first-child { width: 1.6rem; text-align: center; color: var(--muted); user-select: none; }
.diff-del { background: var(--errata-soft); }
.diff-add { background: var(--ins-soft); }
.diff-gap td { color: var(--muted); }
.diff del, .diff-legend del, .diff-field p del { background: var(--errata-soft); color: var(--errata); text-decoration: line-through; }
.diff ins, .diff-legend ins, .diff-field p ins { background: var(--ins-soft); color: var(--ins); text-decoration: none; }
.diff-del del { background: color-mix(in srgb, var(--errata) 22%, transparent); color: inherit; }
.diff-add ins { background: color-mix(in srgb, var(--ins) 22%, transparent); color: inherit; font-weight: 600; }

/* Sale history: lots that are the same item sold again (Resales) */
.sale-history ol, .resale-list { padding-left: 1.5rem; }
.sale-history li, .resale-list li { margin: .35rem 0; }
.resales { margin: 1rem 0; }
.resale-add { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.resale-add label { flex: 1 1 14rem; }
.resale-suggestions { margin-top: 1rem; }
.resale-suggestions li { margin: .4rem 0; }
.resale-suggestions select { width: auto; }
.similar-lots { margin: 2rem 0; }
.similar-lots .lot-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.similar-suggestions { list-style: none; padding: 0; max-height: 24rem; overflow-y: auto; }
.similar > form { margin-top: .75rem; }
.similar > [data-similar-open] { margin-top: .5rem; }
.similar-search { width: min(96vw, 52rem); max-height: 90vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.similar-search[open] { display: flex; flex-direction: column; }
.similar-search::backdrop { background: rgb(0 0 0 / .55); }
.similar-search > * { padding-inline: 1rem; }
.similar-search > p { margin: 0 0 .5rem; }
.similar-search-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding-block: .75rem .5rem; }
.similar-search-head h2 { margin: 0; font-size: 1.15rem; }
.similar-search-find { display: flex; gap: .5rem; margin-bottom: .5rem; }
.similar-search-find input { flex: 1; min-width: 0; }
.similar-search [data-similar-pick] { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 0; }
.similar-search-results { overflow-y: auto; min-height: 8rem; padding-inline: 1rem; border-top: 1px solid var(--line); }
.similar-search-results[aria-busy] { opacity: .5; }
.similar-search-list { list-style: none; padding: 0; margin: 0; }
.similar-search-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.similar-search-list li.is-in { opacity: .6; }
.similar-search-list label.check { display: flex; gap: .6rem; align-items: center; }
.similar-search-list img, .similar-search-list .noimg { flex: none; width: 48px; height: 48px; object-fit: cover; border-radius: 4px; font-size: .6rem; }
.similar-search-pager { display: flex; gap: .5rem; justify-content: center; }
.similar-search-foot { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .6rem 1rem;
  border-top: 1px solid var(--line); }

/* Catalogue revisions */
.revisions { list-style: none; padding: 0; margin: 1.5rem 0; }
.revision { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.revision > h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.revision .ch-tag { margin-left: .3rem; color: var(--ink-2); border-color: var(--line); }
.rev-photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.rev-photos li { position: relative; aspect-ratio: 1; background: #fff; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; }
.rev-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rev-photos .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: .75rem; }
.rev-photos li.is-added { border-color: var(--ins); }
.rev-photos li.is-removed { border-color: var(--errata); }
.rev-photos li.is-removed img { opacity: .55; }
.rev-mark { position: absolute; left: 0; right: 0; bottom: 0; font-size: .7rem; font-weight: 700; text-align: center; padding: .1rem;
  background: var(--card); }
.is-added .rev-mark { color: var(--ins); }
.is-removed .rev-mark { color: var(--errata); }

/* Tags and baskets (editor) */
.lot-tags { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .9rem 0 0; font-size: .9rem; }
.lot-tags dt { color: var(--muted); }
.lot-tags dd { margin: 0; }
.tag-header .lot-tags { max-width: 70ch; }
.tag-links { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .92rem; }
.tag-links a::after { content: " ↗"; color: var(--muted); }
.chip { display: inline-block; background: var(--accent-soft); border-radius: 99px; padding: .05rem .55rem; font-size: .82rem; margin: .1rem 0; }
.chip.is-add { background: var(--ins-soft); color: var(--ins); }
.chip.is-remove { background: var(--errata-soft); color: var(--errata); text-decoration: line-through; }
.chip.is-new { border: 1px dashed currentColor; }
.facet-tabs { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 1rem 0; }
.facet-tabs a[aria-current] { font-weight: 700; color: var(--ink); text-decoration: none; }
.tag-box { margin: 1rem 0; }
.tag-box h2 { margin: 0; font-size: 1.15rem; }
.tag-box fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; }
.tag-box legend { font-weight: 600; font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: .2rem; }
.tag-box .tag-suggestions { margin: .8rem 0 0; gap: .35rem; }
.tag-box .tag-suggestions legend { width: 100%; }
.form label.chip-check { cursor: pointer; display: inline-flex; flex-direction: row; align-items: center; gap: .35rem; font-weight: 500; padding: .15rem .65rem; }
.chip-check input { margin: 0; }
.tag-box .form-row { align-items: flex-start; }
.chip-check:has(input:checked) { background: var(--ins-soft); color: var(--ins); }
.chip-pair { display: inline-flex; align-items: center; }
.chip-dismiss { border: 0; background: none; color: var(--muted); font: inherit; font-size: 1rem; line-height: 1; padding: .1rem .3rem; cursor: pointer; }
.chip-dismiss:hover, .chip-dismiss:focus-visible { color: var(--errata); }
.tag-box .tag-proposals { margin: .8rem 0 0; display: block; }
.tag-proposals ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.tag-proposals li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.tag-proposals .chip.is-remove { text-decoration: none; }
.tag-preview mark { background: var(--ins-soft); color: inherit; padding: 0 .1em; }
.tag-prefixes { margin: .9rem 0 .3rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
button.chip { border: 0; font: inherit; font-size: .82rem; color: var(--accent); cursor: pointer; }
button.chip:hover, button.chip:focus-visible { background: var(--accent); color: #fff; }
.tag-prefixes + p { margin-top: 0; }
.tag-hint { display: block; min-height: 1.2em; margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.tag-hint.is-ok { color: var(--ins); }
.tag-hint.is-new { color: var(--ink-2); }
.tag-hint.is-error { color: var(--errata); font-weight: 600; }
.tag-hint-poster { float: left; width: 30px; height: auto; margin: 0 .5rem .2rem 0; border-radius: 2px; }
.tag-choices { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 0; padding: 0; clear: both; font-weight: 400; }
.tag-choice { display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-items: center; text-align: left;
  padding: .3rem .55rem .3rem .3rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  color: var(--ink); font: inherit; cursor: pointer; }
.tag-choice:hover, .tag-choice:focus-visible { border-color: var(--ink-2); }
.tag-choice img { grid-row: span 2; width: 28px; height: auto; border-radius: 2px; }
.tag-choice small { color: var(--muted); font-size: .75rem; }
.film-box-body { display: flex; gap: 1rem; align-items: flex-start; }
.film-poster { margin: 0; flex: none; }
.film-poster img { display: block; width: 120px; height: auto; border-radius: 4px; }
.film-hits { list-style: none; padding: 0; display: grid; gap: .5rem; }
.film-hits li { display: flex; gap: .75rem; align-items: center; }
.film-hits li span { flex: 1; }
.film-hits small { display: block; }
@media (max-width: 600px) { .film-box-body { flex-direction: column; } }
.tag-box input[aria-invalid="true"] { border-color: var(--errata); }
.tag-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.tag-inputs > div { display: flex; flex-direction: column; gap: .4rem; }
.tag-inputs h3 { margin: 0; font-size: .95rem; }
.form fieldset.card { display: flex; flex-direction: column; gap: .9rem; }
.form fieldset.card legend { font-weight: 700; padding: 0 .3rem; }
.tag-change p { margin: .3rem 0; }
.preview-sale { margin: 1rem 0; }
.preview-sale summary { cursor: pointer; padding: .4rem 0; }
.data td.thumb { width: 56px; padding: .2rem; }
.data td.thumb img { width: 48px; height: 48px; object-fit: contain; }
.data tr.is-undone td { color: var(--muted); }
.lot-card { position: relative; }
.lot-card .basket-add { position: absolute; top: .4rem; right: .4rem; }
.lot-card .basket-add .btn { padding: .15rem .5rem; font-size: .75rem; opacity: .85; }
.lot-card .basket-add .btn:hover, .lot-card .basket-add .btn.is-current { opacity: 1; }
.editor-tools { margin: .5rem 0 1rem; align-items: center; }

/* Collapsible editor sections */
.admin-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 1rem 0; padding: 0 1.25rem; }
.admin-section[open] { padding-bottom: 1rem; }
.admin-section > summary, .form-more > summary, .media-attach > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .75rem; cursor: pointer; list-style: none; }
.admin-section > summary { padding: .9rem 0; }
.admin-section > summary::-webkit-details-marker, .form-more > summary::-webkit-details-marker, .media-attach > summary::-webkit-details-marker { display: none; }
.admin-section > summary::before, .form-more > summary::before, .media-attach > summary::before { content: "▸"; color: var(--muted); display: inline-block; transition: transform .15s; }
.admin-section[open] > summary::before, .form-more[open] > summary::before, .media-attach[open] > summary::before { transform: rotate(90deg); }
.admin-section > summary h2 { margin: 0; font-size: 1.15rem; }
.media-attach > summary h3 { margin: 0; }
.section-meta { color: var(--muted); font-size: .88rem; font-weight: 400; }
.admin-section > .form:first-of-type, .admin-section > .form-more:first-of-type { margin-top: 0; }
.form-more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .6rem 0; }
.form-more > summary { font-weight: 600; font-size: .92rem; }
.form-more[open] { display: flex; flex-direction: column; gap: .9rem; }
.is-dirty > summary::after { content: "Unsaved"; margin-left: auto; align-self: center; font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 99px;
  background: var(--draft-soft); color: var(--draft); border: 1px solid currentColor; }
.section-tools { margin: -.25rem 0 .5rem; font-size: .88rem; }
.admin-lot-pager { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin: 0 0 .4rem; }
.admin-lot-pager a { text-decoration: none; }
/* The lot form's save buttons stay in reach while the form scrolls */
.form-actions { position: sticky; bottom: 0; z-index: 2; background: var(--paper); border-top: 1px solid var(--line); padding: .6rem 0; margin-bottom: -.6rem; align-items: center; }
.field-warning { color: var(--errata); margin: -.4rem 0 0; }
.danger-zone { margin: 2.5rem 0 1rem; border: 1px solid var(--errata-soft); border-radius: var(--radius); padding: .5rem .75rem; }
.danger-zone summary { cursor: pointer; color: var(--errata); font-size: .9rem; font-weight: 600; }
.pwx-original { font-size: .9rem; margin-top: -.4rem; }
.pwx-original summary { cursor: pointer; color: var(--muted); }
.pwx-original .prose { border-left: 3px solid var(--line); padding-left: .8rem; margin-top: .4rem; }
.notice form { margin: .4rem 0 0; }
/* Drag-and-drop ordering of a lot's photos and images */
.drag-handle { flex: none; cursor: grab; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: .3rem .1rem; user-select: none; }
.drag-handle:hover { color: var(--ink); }
.drag-handle:active { cursor: grabbing; }
.sortable > .is-dragging { opacity: .45; border-style: dashed; }
.sort-hint { margin: .6rem 0 0; }

/* Search: filters beside the results */
.search-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 900px) { .search-layout { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }
.search-filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .8rem; font-size: .92rem; }
.search-filters > label { display: grid; gap: .25rem; font-weight: 600; }
.search-filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .3rem; }
.search-filters legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }
.search-filters label.check { display: flex; gap: .45rem; align-items: center; font-weight: 400; }
.price-range { grid-template-columns: 1fr auto 1fr !important; align-items: center; }
.search-filters select, .search-filters input[type=number] { padding: .4rem .55rem; }
.search-facet h3 { font-family: var(--sans); font-size: .85rem; margin: .4rem 0 .3rem; }
.search-facet ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; }
@media (max-width: 899px) { .search-filters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .search-facet, .search-filters > .btn { grid-column: 1 / -1; } }
.active-filters { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.active-filters li { display: inline-flex; align-items: center; gap: .35rem; background: var(--accent-soft); border-radius: 99px; padding: .15rem .3rem .15rem .75rem; font-size: .88rem; }
.active-filters li a { text-decoration: none; font-weight: 700; padding: 0 .35rem; border-radius: 99px; }
.active-filters li.clear { background: none; padding-left: .2rem; }
.active-filters li.clear a { font-weight: 400; text-decoration: underline; }
.feed-link { font-size: .9rem; }

/* Visitors' suggestions */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.suggestions { list-style: none; padding: 0; display: grid; gap: 1rem; }
.suggestion header { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin-bottom: .5rem; }
.suggestion-body { background: var(--paper); border-radius: 6px; padding: .6rem .8rem; overflow-wrap: anywhere; }
.suggestion-meta { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; font-size: .9rem; margin: .6rem 0; }
.suggestion-meta dt { color: var(--muted); }
.suggestion-meta dd { margin: 0; overflow-wrap: anywhere; }

/* Price figures and charts */
.stat-tiles { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-tiles li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; }
.stat-value { font: 700 1.5rem/1.2 var(--serif); color: var(--ink); }
.stat-label { color: var(--muted); font-size: .85rem; }
.chart { margin: 0 0 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; position: relative; }
.chart figcaption { font-weight: 600; margin-bottom: .4rem; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--sans); }
.chart .bar path { fill: var(--accent); }
.chart .bar .hit { fill: transparent; }
.chart .bar:hover path, .chart .bar:focus path { fill: var(--ink); }
.chart .bar:focus { outline: none; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .pt.is-current { fill: var(--ink); }
.chart .pt-label { fill: var(--ink-2); font: 600 11px var(--sans); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: .82rem; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); z-index: 2; }
.chart-table { margin-top: .5rem; font-size: .9rem; }
.chart-table summary { cursor: pointer; color: var(--accent); }
.estimate-split { margin: .5rem 0; }

/* Photo matches */
.photo-pairs { list-style: none; padding: 0; display: grid; gap: 1rem; }
.pm-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: start; margin: .4rem 0 .8rem; }
.pm-lot { display: grid; grid-template-columns: 96px 1fr; gap: .7rem; color: inherit; text-decoration: none; font-size: .9rem; }
.pm-lot img { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.pm-lot:hover strong { color: var(--accent); }
.pm-arrow { align-self: center; color: var(--muted); font-size: 1.4rem; }
.vm-show { margin: 1.2rem 0; }
.vm-show h2 { margin-top: 0; }
.vm-show details { margin: .6rem 0; }
@media (max-width: 640px) { .pm-pair { grid-template-columns: 1fr; } .pm-arrow { transform: rotate(90deg); justify-self: center; } }
.photo-matches li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.photo-matches li img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 4px; }
.bulk-photos tr.is-nolot td { color: var(--errata); }
.bulk-photos tr.is-exists td { color: var(--muted); }
strong.errata { color: var(--errata); }

/* Data quality */
.table-scroll { overflow-x: auto; }
.quality td, .quality th { white-space: nowrap; }
.quality td:first-child { white-space: normal; min-width: 16rem; }
.broken-links code { background: var(--errata-soft); color: var(--errata); }

/* Chip inputs (categories, tags) */
.chip-input { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; flex: 1 1 100%; font-weight: 400; }
.chip-input:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.chip-list { list-style: none; margin: 0; padding: 0; display: contents; }
.chip-list .chip { display: inline-flex; align-items: center; gap: .2rem; font-size: .88rem; padding: .1rem .2rem .1rem .6rem; }
.chip-list .chip button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; padding: 0 .3rem; border-radius: 99px; }
.chip-list .chip button:hover { background: rgb(0 0 0 / .08); }
.chip-input input[type=text] { flex: 1 1 10rem; min-width: 8rem; border: 0; background: transparent; padding: .25rem; outline: none; }
.chip-input .tag-hint { flex-basis: 100%; }
.search-filters-toggle > summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: .5rem; }
@media (min-width: 900px) { .search-filters-toggle > summary { display: none; } }

/* Sharing tags with a group of similar lots (admin lot context) */
.tag-share { margin: .6rem 0 0; }
.tag-share summary { cursor: pointer; font-size: .92rem; }
.tag-share .form { margin-top: .5rem; }

/* Film tags: poster beside the header, facts under the title, TMDB's credit in the footer */
.tag-header.has-poster { display: grid; grid-template-columns: 160px 1fr; column-gap: 1.5rem; align-items: start; }
.tag-header.has-poster > * { grid-column: 2; }
.tag-header.has-poster > .tag-poster { grid-column: 1; grid-row: 1 / span 20; }
.tag-poster { width: 160px; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.film-facts { color: var(--ink-2); margin-top: -.25rem; }
.tmdb-credit { font-size: .8rem; color: var(--muted); }
.tmdb-credit img { vertical-align: middle; margin-right: .35rem; }
@media (max-width: 600px) {
  .tag-header.has-poster { grid-template-columns: 96px 1fr; column-gap: 1rem; }
  .tag-poster { width: 96px; }
}

/* Film lists: small poster cards, in franchise and release order (/tags/film, /tags, franchise and film pages) */
.film-list { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .75rem; }
.film-list a { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: .5rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none; }
.film-list a:hover, .film-list a:focus-visible { border-color: var(--ink-2); }
.film-list [aria-current] a { border-color: var(--ink); }
.film-list img, .film-noposter { width: 64px; height: 96px; object-fit: cover; border-radius: 3px; background: var(--line); }
.film-name { font-weight: 600; line-height: 1.25; }
.film-list small { color: var(--muted); }
.letter-nav a { display: inline-block; min-width: 1.6em; text-align: center; }

/* Advanced search (/search/advanced) and the search page's summary and wider-search suggestions */
.advanced-search .adv-group { border: 0; border-top: 1px solid var(--line); padding: .9rem 0 0; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.advanced-search .adv-group legend { font-weight: 700; padding: 0 .4rem 0 0; }
.advanced-search .adv-in, .advanced-search .adv-checks { flex-direction: row; flex-wrap: wrap; gap: .4rem 1.1rem; }
.advanced-search .adv-in legend { width: 100%; }
.adv-preview { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; }
.adv-preview p { margin: 0 0 .3rem; font-size: .85rem; }
.adv-preview code { background: none; padding: 0; word-break: break-word; }
.count.search-summary { color: var(--ink-2); }
.search-links { font-size: .9rem; margin-top: .6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.wider { margin: .5rem 0 0; padding-left: 1.2rem; line-height: 1.9; }
/* The scope bar under the search box: which field the words are looked for in (in:) */
.scope-bar { border: 0; padding: 0; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.scope-bar label { cursor: pointer; }
.scope-bar span { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: .25rem .85rem;
  font-size: .9rem; color: var(--ink-2); }
.scope-bar label:hover span { border-color: var(--accent); }
.scope-bar input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.scope-bar input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* How to search (/search/help) */
.search-help-page .search-examples { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.search-help-page .search-examples th { text-align: left; font-family: var(--sans); font-size: .85rem; color: var(--muted); font-weight: 600; }
.search-help-page .search-examples td:last-child { white-space: nowrap; }
.search-help-page .search-examples a { text-decoration: none; }
.help-toc { font-size: .92rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .6rem 0; margin: 1.2rem 0; }
@media (max-width: 600px) { .search-help-page .search-examples td:last-child { white-space: normal; word-break: break-word; } }

/* Home page: houses still pending as a compact list; franchises as poster cards (the most-lotted title's poster) */
.house-pending-head { font-size: 1rem; color: var(--ink-2); margin: 1.5rem 0 .5rem; }
.house-pending { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.house-pending a { display: inline-block; border: 1px dashed var(--line); border-radius: var(--radius); padding: .3rem .7rem; font-size: .9rem; color: var(--ink-2); text-decoration: none; }
.house-pending a:hover { border-color: var(--accent); color: var(--accent); }
.franchise-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.franchise-grid a { display: flex; flex-direction: column; gap: .3rem; color: inherit; text-decoration: none; }
.franchise-grid img, .franchise-noposter { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius);
  background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); }
.franchise-noposter { display: flex; align-items: center; justify-content: center; padding: .75rem; text-align: center; font-weight: 700; color: var(--ink-2); }
.franchise-grid a:hover img, .franchise-grid a:hover .franchise-noposter, .franchise-grid a:focus-visible img { border-color: var(--accent); }
.franchise-name { font-weight: 600; line-height: 1.25; }
.franchise-grid small { color: var(--muted); }
@media (max-width: 600px) { .franchise-grid { grid-template-columns: repeat(3, 1fr); gap: .6rem; } .franchise-grid small { font-size: .75rem; } }
