:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5d6470;
  --border: #e3e6eb;
  --accent: #2448d8;
  --accent-text: #ffffff;
  --danger: #c22a2a;
  --danger-bg: #fdecec;
  --ok: #17794a;
  --ok-bg: #e8f6ee;
  --warn-bg: #fff6e0;
  --warn: #8a5a00;
  --wanted: #d11a4a;
  --toast-link: #a9bbff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --text: #e8eaee;
  --muted: #9aa2ae;
  --border: #2a2f39;
  --accent: #6b8cff;
  --accent-text: #0b0d12;
  --danger: #ff7a7a;
  --danger-bg: #3a1b1d;
  --ok: #5fd39a;
  --ok-bg: #15301f;
  --warn-bg: #33290f;
  --warn: #f0c35a;
  --wanted: #ff6b8f;
  --toast-link: #1d3fc4;
  --shadow: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8eaee;
    --muted: #9aa2ae;
    --border: #2a2f39;
    --accent: #6b8cff;
    --accent-text: #0b0d12;
    --danger: #ff7a7a;
    --danger-bg: #3a1b1d;
    --ok: #5fd39a;
    --ok-bg: #15301f;
    --warn-bg: #33290f;
    --warn: #f0c35a;
    --wanted: #ff6b8f;
    --toast-link: #1d3fc4;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text are underlined, so they don't rely on colour alone. */
:where(p, li, dd, td, .hold-note, .small, .muted, .auth-foot) > a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Brand: the Spectrum stripe */
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.stripe { display: inline-flex; transform: skewX(-20deg); }
.stripe i { width: 5px; height: 18px; display: block; }
.stripe i:nth-child(1) { background: #d7261e; }
.stripe i:nth-child(2) { background: #f4b400; }
.stripe i:nth-child(3) { background: #2ea84a; }
.stripe i:nth-child(4) { background: #1f8fd6; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 16px; }
.auth-wrap .brand { font-size: 1.15rem; margin-bottom: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.3rem; }
.auth-foot { margin-top: 1rem; text-align: center; font-size: .9rem; color: var(--muted); }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3rem; }
.field { margin-bottom: 1rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=tel], input[type=date], select {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; outline: none;
}
input:focus, select:focus, input[type=date]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[readonly] { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .95rem;
  font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.inline { display: inline; }
.row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.row > .grow { flex: 1 1 220px; }
.row .field { margin-bottom: 0; }

/* Alerts */
.alert { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .92rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.secret { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.secret input { font-family: var(--mono); font-size: .85rem; }

/* App shell */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; gap: 1.5rem; }
.nav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.nav a { color: var(--muted); padding: .4rem .65rem; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav a.active { color: var(--text); background: var(--bg); }
.user-menu { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.user-menu .name { color: var(--muted); }
main.container { max-width: 1100px; margin: 0 auto; padding: 1.75rem 16px 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.head-search { display: flex; gap: .5rem; width: min(100%, 420px); }
.head-search input { flex: 1; min-width: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1.5rem; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.section { margin-bottom: 1.5rem; }
.section > h2 { margin-bottom: .25rem; }
.section > .card > p:last-child { margin-bottom: 0; }
.settings-nav { display: flex; gap: .5rem; margin-bottom: 1.25rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.badge-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.badge-danger { color: var(--danger); }
.actions { text-align: right; white-space: nowrap; }
.empty { color: var(--muted); padding: 1rem 0; }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: .5rem; }
  .user-menu .name { display: none; }
  .nav { order: 3; flex-basis: 100%; }
}

/* Team switcher */
.team-menu { position: relative; }
.team-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; font-size: .9rem; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-menu > summary::-webkit-details-marker { display: none; }
.team-menu .caret { color: var(--muted); font-size: .75rem; }
.team-menu .menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow), 0 8px 24px rgba(16,24,40,.12); padding: .35rem; }
.menu-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: .4rem .6rem .25rem; }
.menu-item { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem .6rem; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu-item.current { font-weight: 600; }
.menu-item.current::after { content: "✓"; color: var(--accent); margin-left: auto; }
.menu form { margin: 0; }
.role-form select { width: auto; padding: .3rem .5rem; }

/* Support */
textarea { width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tab { padding: .35rem .7rem; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .9rem; }
.tab:hover { background: var(--surface); text-decoration: none; }
.tab.active { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.tab .count { color: var(--muted); font-size: .8rem; margin-left: .15rem; }
.check { display: flex; align-items: center; gap: .3rem; font-weight: 500; margin: 0; white-space: nowrap; }
.status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.status-open { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.status-waiting { background: var(--warn-bg); color: var(--warn); }
.status-resolved { background: var(--ok-bg); color: var(--ok); }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .ticket-layout { grid-template-columns: 1fr; } }
.thread { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.msg header { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.msg header .when { margin-left: auto; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-outbound { border-left: 3px solid var(--accent); }
.msg-note { background: var(--warn-bg); border-color: transparent; }
.attachments { margin-top: .6rem; font-size: .88rem; color: var(--muted); }
.composer label { margin-bottom: .4rem; }
.composer-actions { justify-content: flex-end; margin-top: .75rem; }
.note-box { margin-top: 1rem; }
.note-box summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.note-box form { margin-top: .5rem; display: grid; gap: .5rem; justify-items: start; }
.side { margin-bottom: 1rem; }
.side h2 { font-size: .95rem; }
.side p { margin-bottom: .5rem; }
ul.plain { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
ul.plain li { padding: .25rem 0; }
tr.clickable td:first-child a { color: var(--text); }

/* Search results */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hit { margin-bottom: 1.25rem; padding: 1.25rem 1.25rem .5rem; }
.hit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.hit-title { font-size: 1.2rem; margin-bottom: .2rem; }
.hit .meta { color: var(--muted); font-size: .85rem; }
.screens { display: flex; gap: .5rem; flex: 0 0 auto; }
.screen { display: block; line-height: 0; cursor: zoom-in; }
.screen img { width: 128px; height: 96px; object-fit: cover; image-rendering: pixelated; border-radius: 4px; border: 1px solid var(--border); background: #000; }

/* Release table */
.rel-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rel-table th { padding: .45rem .5rem; white-space: nowrap; }
.rel-table td:nth-child(4) { min-width: 6.5rem; }
.rel-table td.mono { font-size: .78rem; }
.rel-table td { padding: .7rem .5rem; vertical-align: middle; border-top: 1px solid var(--border); border-bottom: 0; }
.rel-table tbody tr:hover td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.rel-table .col-pics { width: 1%; padding-left: 0; }
.rel-table .col-marks { width: 1%; padding-right: 0; text-align: right; }
.rel-publisher { font-weight: 600; }
.rel-sub { color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* Picture tiles: identical boxes so every row lines up */
.tiles { display: flex; gap: .4rem; }
.tile { position: relative; flex: 0 0 auto; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); overflow: hidden; cursor: zoom-in; }
.tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.tile-hidden { display: none; }
.tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: .15rem .3rem; font-size: .65rem; font-weight: 600; line-height: 1.3; color: #fff; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .15s; text-align: center; }
.tile:hover .tile-label, .tile:focus-visible .tile-label { opacity: 1; }
.tile-more { flex-direction: column; color: var(--text); font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; }
.tile-more span { font-size: .72rem; font-weight: 500; color: var(--muted); }
.tile-more:hover { text-decoration: none; border-color: var(--muted); }
.tile-broken { cursor: default; border-style: dashed; }
.broken-note { color: var(--muted); font-size: .72rem; text-align: center; line-height: 1.2; padding: .3rem; }
.screen.tile-broken { display: flex; align-items: center; justify-content: center; width: 128px; height: 96px; border: 1px dashed var(--border); border-radius: 4px; }
.tile-empty { color: var(--muted); font-size: .75rem; cursor: default; border-style: dashed; }

/* Owned / Wanted */
.marks { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: nowrap; }
.rel-table .marks { flex-direction: column; align-items: stretch; }
.rel-table .mark { justify-content: center; }
.mark-form { margin: 0; }
.mark { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .65rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mark:hover { color: var(--text); border-color: var(--muted); }
.mark-wanted.on { color: var(--wanted); border-color: color-mix(in srgb, var(--wanted) 45%, transparent); background: color-mix(in srgb, var(--wanted) 9%, var(--surface)); }
.mark-wanted.on svg { fill: currentColor; }
.mark-owned.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); }
.mark-owned.on svg circle { fill: currentColor; }
.mark-owned.on svg .tick { stroke: var(--surface); }
.mark:disabled { opacity: .6; cursor: progress; }

/* Hover preview: the whole picture */
.preview { position: fixed; z-index: 60; top: 50%; right: 24px; transform: translateY(-50%); max-width: min(46vw, 760px); padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.28); pointer-events: none; display: none; }
.preview.left { right: auto; left: 24px; }
.preview.on { display: block; }
.preview img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; image-rendering: auto; }
.preview-caption { font-size: .8rem; color: var(--muted); padding: .4rem .2rem 0; text-align: center; }

/* Viewer (click) */
body.no-scroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(10,12,16,.92); display: none; align-items: center; justify-content: center; padding: 3rem 4.5rem; }
.viewer.on { display: flex; }
.viewer figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.viewer img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: 6px; background: #fff; }
.viewer figcaption { color: #d9dde3; font-size: .9rem; text-align: center; }
.viewer button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 999px; font: inherit; line-height: 1; }
.viewer button:hover { background: rgba(255,255,255,.24); }
.viewer-close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.8rem; }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2.2rem; }
.viewer-prev { left: 1rem; }
.viewer-next { right: 1rem; }
.viewer-open { position: absolute; bottom: 1rem; right: 1.25rem; color: #c9d4ff; font-size: .85rem; }

/* Collection */
.coll-title { font-size: 1.05rem; margin-bottom: .2rem; }
.cat-tabs { margin-top: .5rem; }
.tab-sm { font-size: .82rem; padding: .25rem .6rem; }
.owned-count { align-self: center; font-size: .78rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.owned-count[hidden] { display: none; }
.mark.pulse { transform: scale(1.06); transition: transform .15s; }
.badge-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.totals { display: flex; gap: 1.5rem; }
.totals > div { display: flex; flex-direction: column; align-items: flex-end; }
.totals .label { color: var(--muted); font-size: .78rem; }
.totals .value { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.totals .sub { color: var(--muted); font-size: .75rem; }
.coll-group { margin-bottom: 1rem; }
.coll-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: start; }
.coll-head .badge { margin-bottom: .3rem; }
.coll-actions .marks { flex-direction: column; align-items: stretch; }
.coll-note { margin: .75rem 0 0; }
.copies { margin-top: 1rem; display: grid; gap: .75rem; }
.copy { border: 1px solid var(--border); border-radius: 8px; padding: .75rem .9rem; background: color-mix(in srgb, var(--bg) 45%, var(--surface)); }
.copy:target { border-color: var(--accent); }
.copy-head { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .5rem; flex-wrap: wrap; }
.copy-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.copy-grid .field { margin-bottom: .4rem; }
.copy-grid label, .complete legend { font-size: .8rem; }
.hidden-field { display: none !important; }
.copy-foot { display: flex; gap: .5rem; align-items: center; }
.copy-foot input[type=text] { flex: 1; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; font-size: .85rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.complete { border: 0; padding: 0; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.complete legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; padding: 0; }
.complete .check { font-weight: 400; font-size: .88rem; }
input[type=date] { width: 100%; padding: .55rem .6rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }

@media (max-width: 900px) {
  .hit-head { flex-direction: column; }
  .rel-table thead { display: none; }
  .rel-table, .rel-table tbody, .rel-table tr, .rel-table td { display: block; width: 100%; }
  .rel-table tr { border-top: 1px solid var(--border); padding: .75rem 0; }
  .rel-table td { border: 0; padding: .2rem 0; }
  .rel-table .col-marks { text-align: left; }
  .rel-table .col-marks .marks { justify-content: flex-start; flex-direction: row; margin-top: .4rem; }
  .coll-head { grid-template-columns: 1fr; }
  .coll-actions .marks { flex-direction: row; }
  .copy-grid { grid-template-columns: 1fr 1fr; }
  .hidden-field { display: none; }
  .totals { gap: 1rem; }
}
@media (max-width: 640px) {
  .tile { width: 84px; height: 84px; }
  .viewer { padding: 3.5rem .5rem; }
  .viewer-prev, .viewer-next { top: auto; bottom: 1rem; transform: none; }
}

/* Values and estimates */
.conf { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-left: .3rem; vertical-align: middle; background: var(--muted); }
.conf.conf-high { background: var(--ok); }
.conf.conf-medium { background: var(--warn); }
.conf.conf-low { background: var(--border); border: 1px solid var(--muted); }
span.conf[class*="conf-"]:not(:empty) { width: auto; height: auto; border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 600; color: var(--surface); }
.value-link { display: inline-flex; align-items: center; color: var(--text); }
.value-link:hover { text-decoration: none; color: var(--accent); }
.value-link.none { color: var(--muted); }
.copy-est { margin-left: auto; font-size: .9rem; }
.copy-est a { color: var(--text); }
.up { color: var(--ok); }
.down { color: var(--danger); }
.est-chip { display: inline-block; padding: .05rem .55rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-weight: 600; margin-right: .3rem; }
.link-btn { background: none; border: 0; padding: .2rem 0 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .8rem; }
.link-btn:hover { text-decoration: underline; }
.value-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1rem 0 .5rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.value-summary .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.value-big { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.value-by-cond ul { list-style: none; margin: .3rem 0 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.value-by-cond li { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; font-size: .9rem; break-inside: avoid; }

/* Imports */
.import-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.help-card h2 { font-size: 1rem; }
.help-card ol { padding-left: 1.2rem; font-size: .9rem; }
.help-card li { margin-bottom: .5rem; }
.import-table td.listing { min-width: 260px; }
.import-table td.match { min-width: 280px; }
.import-table td.match select { width: 100%; }
.import-table .manual { margin-top: .3rem; width: 100%; font-size: .85rem; padding: .3rem .5rem; }
.import-table .badge { margin: .15rem .15rem 0 0; }
.row-skip td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.row-skip td.listing > div:first-child { color: var(--muted); }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }

@media (max-width: 720px) {
  .value-summary, .import-layout { grid-template-columns: minmax(0, 1fr); }
  .value-summary > * { min-width: 0; overflow-wrap: anywhere; }
  .copy-est { margin-left: 0; width: 100%; }
}
span.conf.conf-low:not(:empty) { color: var(--text); }

/* Search box and suggestions */
.search-box { display: flex; gap: .5rem; margin: .75rem 0 1rem; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field input[type=search] { width: 100%; padding: .75rem .9rem .75rem 2.6rem; font-size: 1.05rem; border-radius: 10px; }
.search-icon { position: absolute; left: .85rem; top: 50%; width: 1.15rem; height: 1.15rem; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-box .btn { padding-inline: 1.2rem; }
.suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); max-height: 70vh; overflow-y: auto; }
.suggest li { margin: 0; }
.sg { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem; border-radius: 7px; color: var(--text); }
.sg:hover, [aria-selected=true] > .sg { background: var(--bg); text-decoration: none; }
.sg img, .sg .sg-icon { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; background: var(--bg); flex: none; display: grid; place-items: center; font-size: 1.1rem; }
.sg-text { display: flex; flex-direction: column; min-width: 0; }
.sg-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-sub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-pub .sg-icon { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sg-all { color: var(--accent); font-weight: 600; padding: .55rem .6rem; }
.filter-chips { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: -.25rem 0 1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .35rem .25rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: .9rem; }
.chip a { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; color: var(--muted); font-size: 1.05rem; }
.chip a:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.start h2 { font-size: 1.05rem; margin-bottom: .2rem; }
.section-gap { margin-top: 1.25rem; }
.pub-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.pub-chip { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: .9rem; font-weight: 500; }
.pub-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pub-chip .count { color: var(--muted); font-size: .8rem; margin-left: .2rem; }
.result-count { margin: -.25rem 0 .75rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1rem 0 2rem; }
.rel-publisher a { color: inherit; }
.rel-publisher a:hover { color: var(--accent); }
a.badge:hover { text-decoration: none; color: var(--accent); }

/* Barcode scanner */
.scan-btn { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.scan-btn:hover { border-color: var(--accent); color: var(--accent); }
.scan-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-field:has(.scan-btn:not([hidden])) input[type=search] { padding-right: 5.5rem; }
.search-field:has(.scan-btn:not([hidden])) input[type=search]::-webkit-search-cancel-button { margin-right: .25rem; }
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; display: none; }
.scanner.on { display: block; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; left: 50%; top: 45%; width: min(80vw, 420px); height: min(30vw, 160px); transform: translate(-50%, -50%); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); border: 3px solid rgba(255,255,255,.9); overflow: hidden; }
.scanner-line { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 15%; } to { top: 85%; } }
@media (prefers-reduced-motion: reduce) { .scanner-line { animation: none; } }
.scanner-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 12px; color: #fff; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.scanner-title { font-weight: 700; }
.scanner-close { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.scanner-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75) 30%); text-align: center; }
.scanner-status { margin: 0 0 .75rem; font-weight: 600; }
.scanner-status.error { color: #ffb4b4; }
.scanner-manual { display: flex; gap: .5rem; max-width: 420px; margin: 0 auto; }
.scanner-manual input { flex: 1; min-width: 0; }
.scan-result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.scan-result.found { background: var(--ok-bg); color: var(--ok); }
.scan-result.missing { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 560px) { .scan-btn span { display: none; } .search-field:has(.scan-btn:not([hidden])) input[type=search] { padding-right: 3.2rem; } }
.rel-table tr.row-hit td { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.rel-table tr.row-hit td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-opt { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .8rem; margin: 0; font-weight: 500; cursor: pointer; border-right: 1px solid var(--border); }
.seg-opt:last-child { border-right: 0; }
.seg-opt:has(input:checked) { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.seg-opt input { margin: 0; }
.format-field { margin-bottom: .6rem; }

/* Title facts and "more about" */
.title-facts { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; margin-top: .4rem; font-size: .85rem; }
.badge-award { color: #8a5a00; background: #fff6dc; border-color: #f0d68a; }
:root[data-theme="dark"] .badge-award { color: #ffd479; background: #3a2f12; border-color: #6b5520; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-award { color: #ffd479; background: #3a2f12; border-color: #6b5520; } }
.more { border-top: 1px solid var(--border); margin-top: .5rem; padding: .6rem 0 .25rem; }
.more summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
.more summary .muted { font-weight: 400; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 1.5rem; margin-top: .75rem; }
.more-grid .wide { grid-column: 1 / -1; }
.more h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .35rem; }
.plain { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.plain li { padding: .12rem 0; }
table.mini td { padding: .3rem .4rem; font-size: .88rem; }
.links { margin: .5rem 0 0; }
.country { color: var(--muted); font-weight: 400; font-size: .8em; }

/* Photo search */
.photo-btn { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; white-space: nowrap; }
.photo-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.photo-btn[data-disabled] { opacity: .55; }
.photo-busy { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(0,0,0,.45); padding: 16px; }
.photo-busy.on { display: grid; }
.photo-busy-card { background: var(--surface); color: var(--text); border-radius: 14px; padding: 1.4rem 1.6rem; max-width: 360px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.photo-busy-card p { margin: .6rem 0 0; font-weight: 600; }
.photo-busy.error .photo-busy-card p { color: var(--danger); margin-bottom: .8rem; }
.spinner { width: 2.2rem; height: 2.2rem; margin: 0 auto; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) { .photo-btn span { display: none; } .search-box .btn-primary { padding-inline: .9rem; } }
.search-go svg { display: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 560px) {
  /* Phones: the search box comes first, with Snap and Search as icon buttons on the same row;
     once there are results, the page title's description makes way for them. */
  .search-top { display: flex; flex-direction: column; }
  .search-top .search-box { order: -1; margin: 0 0 .6rem; gap: .4rem; }
  .search-box .search-field { flex: 1 1 auto; }
  .search-box .photo-btn, .search-box .search-go { flex: 0 0 auto; width: 3rem; padding: 0; justify-content: center; }
  .search-box .photo-btn span, .search-go span { display: none; }
  .search-go svg { display: block; }
  .search-head { margin-bottom: .6rem; }
  .search-head.has-query p, .search-head.has-query > div:last-child:not(:first-child) { display: none; }
  .search-head.has-query h1 { font-size: 1.25rem; margin: 0; }
  .search-field input[type=search] { padding-block: .65rem; }
}

/* Photo search: pick from candidates */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.pick-card { display: flex; flex-direction: column; padding: .75rem; color: var(--text); gap: .6rem; transition: border-color .15s, transform .15s; }
.pick-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.pick-pic { aspect-ratio: 1 / 1; display: grid; place-items: center; background: var(--bg); border-radius: 8px; overflow: hidden; }
.pick-pic img { width: 100%; height: 100%; object-fit: contain; }
.pick-info { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.pick-info .btn { margin-top: .35rem; }
.rel-price { margin-top: .15rem; }
.rel-price div { display: inline; margin-left: .4rem; }
.more-ids { margin: .6rem 0 0; color: var(--muted); }
.confirm-form { display: inline; margin: 0; }
.pick-info .confirm-form .btn { margin-top: .35rem; }
.keep-check { display: flex; margin-top: .4rem; font-weight: 400; white-space: normal; }
.inline-confirm .link-btn { font-size: inherit; padding: 0; }
.photo-is-this { display: block; margin-top: .4rem; text-align: center; }

/* Seller photos on copies */
.copy-photos { margin-top: .75rem; padding-top: .65rem; border-top: 1px dashed var(--border); }
.copy-photos > .label { display: block; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }
.photo-strip { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; }
.photo-tile { width: 96px; }
.photo-tile img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.photo-actions { display: flex; justify-content: space-between; margin-top: .2rem; }
.photo-actions form { margin: 0; }
.link-btn.danger { color: var(--danger); }
.photo-add-btn { width: 96px; height: 96px; border: 2px dashed var(--border); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; color: var(--muted); cursor: pointer; margin: 0; font-weight: 500; }
.photo-add-btn span[aria-hidden] { font-size: 1.6rem; line-height: 1; }
.photo-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.photo-add-btn.busy { opacity: .5; pointer-events: none; }
.sale-links { margin-top: .6rem; }
.sale-desc textarea { min-height: 3.2rem; }
.available-note { color: var(--ok); margin-bottom: .2rem; }
.toggle { margin-bottom: 1rem; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 .55rem; border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; background: var(--bg); color: var(--muted); font-size: .9rem; }
.input-prefix input { border-radius: 0 8px 8px 0; flex: 1; min-width: 0; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; min-width: 0; }
.listing-text textarea { font-family: inherit; }

/* Public shop */
.shop-foot { padding-top: 0; padding-bottom: 2rem; }
.shop-list { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.shop-tile { display: flex; flex-direction: column; gap: .3rem; color: var(--text); }
.shop-tile:hover { text-decoration: none; border-color: var(--accent); }
.shop-about p:last-child { margin-bottom: 0; }
.listing-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.listing-card { display: flex; flex-direction: column; gap: .6rem; padding: .75rem; color: var(--text); }
.listing-card:hover { text-decoration: none; border-color: var(--accent); }
/* Marketplace cards are links too: dark text like the shop cards, no underline. */
a.card.listing { color: var(--text); }
a.card.listing:hover { text-decoration: none; border-color: var(--accent); }
.listing-pic { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: var(--bg); border-radius: 8px; overflow: hidden; }
.listing-pic img { width: 100%; height: 100%; object-fit: contain; }
.pic-note { position: absolute; left: .4rem; bottom: .4rem; font-size: .7rem; background: rgba(0,0,0,.55); color: #fff; padding: .05rem .4rem; border-radius: 999px; }
.listing-info { display: flex; flex-direction: column; gap: .2rem; }
.listing-title { line-height: 1.25; }
.listing-price { font-weight: 700; font-size: 1.1rem; margin-top: .2rem; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.item-main { background: var(--bg); border-radius: 10px; display: grid; place-items: center; min-height: 260px; overflow: hidden; }
.item-main img { max-width: 100%; max-height: 520px; display: block; }
.item-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.item-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.item-title { margin-bottom: .2rem; }
.item-price { font-size: 1.8rem; font-weight: 700; margin: .4rem 0 .2rem; }
.item-facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.item-facts dt { color: var(--muted); }
.item-facts dd { margin: 0; }
.item-desc { white-space: pre-wrap; margin-bottom: 1rem; }
.enquire { margin-top: 1.25rem; }
.enquire h2 { font-size: 1.1rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .item-layout { grid-template-columns: 1fr; } }
.shop-offer { display: block; text-align: center; font-size: .8rem; font-weight: 600; color: var(--ok); margin-top: .25rem; white-space: nowrap; }
.enquire .field input, .enquire .field textarea { width: 100%; }
.shop-foot { max-width: 1100px; margin: 0 auto; padding: 0 16px 2rem; }
.nav a { padding: .4rem .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem 1rem; }
@media (max-width: 1400px) { .user-menu .name { display: none; } }
.buy-box { margin-top: 1.25rem; }
.buy-box h2 { font-size: 1.1rem; }
.buy-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-big { font-size: 1.05rem; padding: .7rem 1.4rem; }
.offer-box { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.offer-row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.offer-row .field { margin-bottom: 0; }
.offer-box .field input { width: 100%; }
.item-price .badge { font-size: .8rem; vertical-align: middle; margin-left: .4rem; }
.offers-table td, .offers-table th { vertical-align: top; }
.offers-table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.offers-table .actions form { margin: 0; }
.hold-note { margin: .5rem 0; padding: .6rem .8rem; border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.hold-note form { display: inline; }
.basket-lines { list-style: none; padding: 0; margin: 0; }
.basket-lines li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.basket-lines li:last-child { border-bottom: 0; }
.basket-lines li.gone { opacity: .6; }
.basket-pic img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.basket-price { font-weight: 700; }
.basket-lines form { margin: 0; }
.basket-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; }
.error-text { color: var(--danger); }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 760px) { .order-layout { grid-template-columns: 1fr; } }
.choice { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: start; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.choice-price { font-weight: 700; text-align: right; white-space: nowrap; }
.choice-price .save { color: var(--ok); font-weight: 600; }
.checkout .field input, .checkout .field textarea { width: 100%; }
.btn.wide { width: 100%; justify-content: center; }
.order-items { width: 100%; border-collapse: collapse; }
.order-items td { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.order-items td.num { text-align: right; white-space: nowrap; }
.order-items tr.total td { font-weight: 700; border-bottom: 0; }
.address { line-height: 1.5; }
.big-badge { font-size: .9rem; padding: .25rem .8rem; }
.postage-table { border-collapse: collapse; }
.postage-table th, .postage-table td { padding: .35rem .5rem; text-align: left; }
.postage-table input[type=text] { width: 6.5rem; }
.market-search { display: flex; gap: .5rem; max-width: 640px; }
.market-search input[type=search] { flex: 1; }
.market-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.market-pic img { width: 100%; border-radius: 8px; display: block; background: var(--bg); }
@media (max-width: 640px) { .market-head { grid-template-columns: 1fr; } .market-pic { max-width: 220px; } }
.market-sort { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.market-sort a.active { font-weight: 700; color: var(--text); }
.market-offers { display: flex; flex-direction: column; gap: .7rem; }
.market-offer { display: grid; grid-template-columns: 220px minmax(0, 1fr) 170px; gap: 1rem; align-items: start; }
.nudge-note { margin: .6rem .8rem 0; padding: .6rem .75rem; border-radius: 8px; background: var(--warn-bg); font-size: .9rem; }
.nudge-note p { margin: 0 0 .5rem; }
.nudge-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (min-width: 641px) { .nudge-note { margin: 0 0 .75rem; } }
.market-filters { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 0; }
.cut-toggle { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ok); font-weight: 600; font-size: .9rem; }
.cut-toggle:hover { text-decoration: none; border-color: var(--ok); }
.cut-toggle.on { background: var(--ok-bg); border-color: var(--ok); }
.cut-toggle .count { color: var(--muted); font-weight: 500; }
.copy-summary .cs-bits .cs-hidden { color: var(--warn); font-weight: 600; }
.finish-card h2 { margin-top: 0; }
.finish-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .35rem; }
.finish-list li::before { content: "○ " / ""; color: var(--warn); font-weight: 700; }
.finish-list li.done { color: var(--muted); }
.finish-list li.done::before { content: "✓ " / ""; color: var(--ok); }
.public-tile.have-it { border-color: var(--ok); }
.have-note { color: var(--ok); font-weight: 600; }
.session-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  margin-bottom: 1rem; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.session-bar > div:first-child { display: flex; flex-direction: column; gap: .15rem; }
.session-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.photo-session-cta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.cta-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.beta-tour { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.beta-tour h2 { margin-top: 0; }
.tour-steps { margin: .5rem 0 1rem; padding-left: 1.3rem; display: grid; gap: .45rem; }
.ticket-shots { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.ticket-shots img { max-width: 220px; max-height: 320px; border: 1px solid var(--border); border-radius: 8px; display: block; }
.feedback-filters { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.news-card h2 { margin-top: 0; font-size: 1.05rem; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.news-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .4rem; align-items: start; }
.share-wrap { position: relative; display: inline-block; }
.share-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; margin-right: .3rem; }
.share-menu { position: absolute; z-index: 30; top: calc(100% + .3rem); left: 0; min-width: 11rem; padding: .3rem; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.share-menu a, .share-menu button { display: block; padding: .5rem .7rem; border-radius: 6px; color: var(--text); text-align: left; font: inherit; background: none; border: 0; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--bg); text-decoration: none; }
.share-line { margin: .3rem 0 .6rem; }
.sold-elsewhere, .reserve-form { margin-top: .5rem; }
.sold-elsewhere summary, .reserve-form summary { cursor: pointer; color: var(--muted); }
.reserve-form input[name=who] { flex: 1 1 10rem; min-width: 0; }
.reserved-note { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sold-report { margin-bottom: 1rem; }
.sold-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sold-head h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.sold-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.sold-totals > div { display: flex; flex-direction: column; }
.sold-totals .label { color: var(--muted); font-size: .78rem; }
.sold-totals .value { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.sold-totals .sub { color: var(--muted); font-size: .75rem; }
.sold-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.sold-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sold-table caption { text-align: left; font-weight: 600; padding-bottom: .3rem; }
.sold-table th, .sold-table td { padding: .3rem .4rem; border-bottom: 1px solid var(--border); text-align: right; }
.sold-table th[scope=row], .sold-table thead th:first-child { text-align: left; font-weight: 500; }
.sold-table thead th { color: var(--muted); font-weight: 500; font-size: .78rem; }
.sold-elsewhere-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0; }
.quick-reply { margin-top: .35rem; }
.quick-reply summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.quick-reply textarea { width: 100%; min-width: 220px; margin: .4rem 0; font: inherit; }
.quick-actions-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.how-it-works { position: relative; margin: 0 0 1rem; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.how-it-works[hidden] { display: none; }
.how-it-works h2 { margin: 0 2rem .6rem 0; font-size: 1.05rem; }
.hiw-close { position: absolute; top: .4rem; right: .5rem; width: 2.2rem; height: 2.2rem; border: 0; background: none;
  font-size: 1.4rem; color: var(--muted); cursor: pointer; border-radius: 8px; }
.hiw-close:hover { background: var(--bg); color: var(--text); }
.hiw-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .55rem; }
.hiw-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .4rem; align-items: start; font-size: .95rem; }
@media (min-width: 900px) { .hiw-list { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.hiw-actions { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.badge-cut { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 700; vertical-align: middle; }
.market-alert { display: flex; align-items: center; gap: .4rem .7rem; flex-wrap: wrap; margin: .6rem 0 .2rem; }
.market-alert [hidden] { display: none; }
.market-offer.held { background: var(--bg); border-style: dashed; }
.mo-pics { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.mo-pics img { width: 68px; height: 68px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.mo-info .badge { margin-right: .4rem; }
.mo-desc { margin: .4rem 0; }
.mo-buy { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; text-align: right; }
.mo-buy form { margin: 0; }
@media (max-width: 760px) { .market-offer { grid-template-columns: 1fr; } .mo-buy { align-items: flex-start; text-align: left; } }
.pager { display: flex; gap: .8rem; align-items: center; justify-content: center; }
.ideas { display: flex; flex-direction: column; gap: .6rem; }
.idea { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.idea .vote { margin: 0; }
.vote-btn { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface, #fff); color: var(--muted); font-weight: 700; cursor: pointer; line-height: 1.2; }
.vote-btn span { font-size: 1.05rem; color: var(--text); }
.vote-btn.voted { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.vote-btn:disabled { cursor: default; opacity: .7; }
.idea-desc { margin: .3rem 0 0; white-space: pre-wrap; }
.staff-note { margin: .4rem 0 0; color: var(--muted); }
.app-foot { max-width: 1100px; margin: 0 auto; padding: 1.5rem 16px 2rem; text-align: center; }
.app-foot a { color: var(--muted); }
.label-box h3 { font-size: 1rem; margin-bottom: .4rem; }
.label-box form.inline { display: inline; }
.beta-table td { vertical-align: middle; }
.beta-pic { width: 52px; }
.beta-pic img { width: 48px; height: 48px; object-fit: contain; display: block; }
.inline-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.grid-empty { grid-column: 1 / -1; }
.grid-empty p { margin: 0 0 .5rem; }
.grid-empty p:last-child { margin-bottom: 0; }
.market-search + .listing-grid, .market-search + .cat-tabs { margin-top: 1rem; }

/* Audit fixes: phones */
@media (max-width: 760px) { .order-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .team-menu .menu { position: fixed; left: 16px; right: 16px; top: 64px; min-width: 0; max-width: none; }
}
.check.toggle { white-space: normal; flex-wrap: wrap; align-items: baseline; }
.check .muted { white-space: normal; }
.seg { max-width: 100%; flex-wrap: wrap; }
.check { white-space: normal; }
/* Photo checklist on collection copies */
.photos-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .5rem; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.shot { border: 1px dashed var(--border); border-radius: 10px; padding: .5rem; display: flex; flex-direction: column; gap: .35rem; background: var(--surface); min-width: 0; }
.shot.done { border-style: solid; }
.shot form { margin: 0; }
.shot-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.shot-btn { display: flex; flex-direction: column; gap: .2rem; cursor: pointer; padding: .35rem; border-radius: 8px; min-height: 44px; }
.shot:not(.done) .shot-btn { align-items: center; text-align: center; justify-content: center; min-height: 120px; }
.shot-btn:hover { background: var(--bg); }
.shot-btn.busy { opacity: .5; pointer-events: none; }
.shot-icon { font-size: 1.6rem; line-height: 1; }
.shot-label { font-weight: 600; font-size: .9rem; }
.shot-ok { color: var(--ok); }
.shot-tip { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.shot-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.shot-actions .link-btn { cursor: pointer; }
@media (max-width: 560px) { .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shot-tip { font-weight: 400; } .shot-assign { width: 100%; font-size: .8rem; padding: .2rem; }

/* Header: main links, then basket, admin and account menus (and the menu button on phones) */
.topbar-inner { gap: 1rem; }
.top-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; flex-shrink: 0; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; user-select: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.3rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; }
a.dd-btn:hover { text-decoration: none; background: var(--bg); }
.dd-btn:hover, .dd[open] > .dd-btn { background: var(--bg); }
.dd-btn.active { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); color: var(--accent); }
.dd-btn .caret { color: var(--muted); font-size: .7rem; }
.avatar-btn { padding: .2rem .45rem .2rem .2rem; border-radius: 999px; }
.avatar { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: .85rem; }
.dd .menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 250px; max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow), 0 8px 24px rgba(16,24,40,.14); padding: .35rem; }
.dd a.menu-item { color: var(--text); }
.menu-item.active { background: var(--bg); font-weight: 600; }
.menu-head { display: flex; flex-direction: column; padding: .45rem .6rem .35rem; min-width: 0; }
.menu-head > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--border); margin: .3rem .1rem; }
.theme-pick { display: flex; gap: .25rem; padding: .1rem .35rem .3rem; }
.theme-pick button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: .3rem; padding: .4rem .35rem; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font: inherit; font-size: .83rem; cursor: pointer; white-space: nowrap; }
.theme-pick button:hover { color: var(--text); }
.theme-pick button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); font-weight: 600; }
.foot-theme { display: flex; justify-content: center; margin-bottom: .75rem; }
.foot-theme .theme-pick { padding: 0; max-width: 300px; flex: 1; }
.nav-dd { display: none; }
@media (max-width: 760px) {
  /* One row normally; with the phone's text turned up the buttons drop to a second row
     rather than covering the logo. */
  .app-top .topbar-inner { flex-wrap: wrap; gap: .5rem; row-gap: .4rem; }
  .app-top .brand { flex-shrink: 0; }
  .app-top .nav { display: none; }
  .nav-dd { display: block; }
  .dd-label { display: none; }
  .dd .menu { position: fixed; left: 16px; right: 16px; top: 62px; min-width: 0; max-width: none; max-height: calc(100vh - 80px); overflow-y: auto; }
  .hide-phone { display: none; }
  .brand { min-width: 0; }
}

/* Spacing and phones */
.card.empty { padding: 1.25rem 1.5rem; color: var(--muted); }
.card.empty p:last-child { margin-bottom: 0; }
.btn { max-width: 100%; }
@media (max-width: 640px) {
  main.container { padding: 1.25rem 12px 2.5rem; }
  .card { padding: 1rem; }
  .card.empty { padding: 1rem; }
  .card .card { padding: .85rem; }
  .page-head { margin-bottom: 1rem; }
  h1 { font-size: 1.35rem; }
  .btn { white-space: normal; text-align: center; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .grid .stat .value { font-size: 1.3rem; }
  .totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; width: 100%; }
  .totals > div { align-items: flex-start; }
  /* Category and view pills: one row that scrolls sideways, not three wrapped lines */
  .cat-tabs, .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .cat-tabs::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .cat-tabs > *, .tabs > * { flex-shrink: 0; white-space: nowrap; }
  /* List tables: one card per row, each value with its heading */
  .table-wrap:has(table.stack) { overflow: visible; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { padding: .7rem 0; border-bottom: 1px solid var(--border); }
  table.stack tr:first-child { padding-top: 0; }
  table.stack tr:last-child { border-bottom: 0; padding-bottom: 0; }
  table.stack td { position: relative; padding: .2rem 0 .2rem 7rem; border: 0; text-align: left; white-space: normal; min-height: 1.6rem; }
  table.stack td::before { content: attr(data-label); position: absolute; left: 0; top: .35rem; width: 6.5rem; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; line-height: 1.3; }
  table.stack td[data-label=""] { padding-left: 0; }
  table.stack td[data-label=""]::before { content: none; }
  table.stack td:empty { display: none; }
  table.stack td.actions { text-align: left; }
}
.not-listed { margin: .75rem 0 .25rem; }
/* Collection spreadsheet import */
.import-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; margin-bottom: 1.5rem; }
.import-layout input[type=file] { max-width: 100%; }
.field-list li { padding: .2rem 0; }
.steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; flex-wrap: wrap; counter-reset: step; }
.steps li { counter-increment: step; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.steps li::before { content: counter(step) ". "; }
.steps li.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.steps li.done { color: var(--ok); }
.steps li.done::before { content: "✓ "; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin: 1rem 0; }
.col-card { padding: .9rem; display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.col-card.col-off { opacity: .6; }
.col-head { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-samples { list-style: none; margin: 0; padding: .35rem .5rem; background: var(--bg); border-radius: 6px; font-size: .83rem; font-family: var(--mono); min-height: 3.6rem; }
.col-samples li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matching { text-align: center; }
.matching progress { width: min(100%, 360px); height: .8rem; margin: .5rem 0; }
@media (max-width: 760px) { .import-layout { grid-template-columns: minmax(0, 1fr); } }
/* Footer: copyright and legal links */
.legal-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.legal-foot a { color: var(--muted); }
.auth-legal { margin-top: 2rem; width: 100%; max-width: 400px; }
.auth-legal .legal-foot { border-top: 0; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 1.75rem; }
.legal h3 { font-size: 1rem; margin-top: 1.25rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .35rem; }
.legal table { margin: .5rem 0 1rem; }
/* Invite friends */
.copy-row { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.copy-row input { flex: 1; min-width: 0; }
.share-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.share-buttons [hidden] { display: none; }
/* Home */
a.stat-link { color: inherit; display: block; }
a.stat-link:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.stat-alert .value { color: var(--accent); }
.start-steps { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.start-steps a { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); height: 100%; }
.start-steps a:hover { text-decoration: none; border-color: var(--accent); }
.start-steps a > span:last-child { display: flex; flex-direction: column; gap: .15rem; }
.start-steps .tick { flex: 0 0 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); font-weight: 700; font-size: .85rem; }
.start-steps li.done a { background: var(--bg); border-style: dashed; }
.start-steps li.done a strong { color: var(--muted); }
.start-steps li.done .tick { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.mini-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mini-item { display: flex; gap: .7rem; align-items: center; padding: .6rem; color: var(--text); }
.mini-item:hover { text-decoration: none; border-color: var(--accent); }
.mini-item img, .mini-item .no-pic { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; border-radius: 6px; background: var(--bg); display: grid; place-items: center; }
.mini-item > span { display: flex; flex-direction: column; min-width: 0; }
.mini-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.promo { display: flex; flex-direction: column; gap: .3rem; color: var(--text); border-left: 4px solid var(--accent); }
.promo:hover { text-decoration: none; }
.promo strong { font-size: 1.05rem; }
.sell-features { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1rem 0; }
.sell-features .card h3 { font-size: 1rem; margin-bottom: .25rem; }
.sell-features .card p { margin: 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 640px) { .grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* Ranks, badges and the leaderboard: a Spectrum tape-loading look */
.loading-bar { height: .85rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; margin: .5rem 0 .3rem; }
.loading-bar > span { display: block; height: 100%; border-radius: 999px;
  background: repeating-linear-gradient(90deg, #d7272a 0 8px, #00b7d6 8px 16px, #f2c230 16px 24px, #2b9b49 24px 32px); }
.loading-bar.small-bar { height: .55rem; margin: .3rem 0 .15rem; }
.rank-hero { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.rank-hero h1 { font-size: 2rem; margin: 0; }
.rank-main { flex: 1; min-width: 220px; }
.rank-main p { margin: .2rem 0; }
.rank-tape { width: 4.5rem; height: 4.5rem; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: repeating-linear-gradient(180deg, #d7272a 0 6px, #00b7d6 6px 12px); }
.rank-tape > span { width: 70%; height: 70%; display: grid; place-items: center; border-radius: 8px; background: var(--surface); font-weight: 800; font-size: 1.4rem; }
.rank-tape.small-tape { width: 2.6rem; height: 2.6rem; border-radius: 9px; }
.rank-tape.small-tape > span { font-size: .95rem; border-radius: 5px; }
.rank-strip { display: flex; align-items: center; gap: .9rem; color: var(--text); margin-bottom: 1.25rem; padding: .8rem 1rem; }
.rank-strip:hover { text-decoration: none; border-color: var(--accent); }
.rank-strip-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rank-strip > .small:last-child { color: var(--accent); white-space: nowrap; }
.rank-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rank-ladder li { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; display: flex; flex-direction: column; background: var(--surface); }
.rank-ladder li.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.rank-ladder li.done strong::after { content: " ✓"; color: var(--ok); }
.badge-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .9rem .6rem; }
.badge-card .badge-icon { font-size: 1.8rem; line-height: 1.2; }
/* Locked: the icon fades, the words stay readable. */
.badge-card.locked { background: var(--bg); border-style: dashed; box-shadow: none; }
.badge-card.locked .badge-icon { opacity: .4; filter: grayscale(1); }
.badge-card.locked strong { color: var(--muted); }
.set-row + .set-row { margin-top: .75rem; }
.board { list-style: none; margin: 0 0 1.5rem; padding: .35rem; }
.board li { display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem; border-radius: 8px; }
.board li + li { border-top: 1px solid var(--border); }
.board li.me { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.board .place { width: 2rem; text-align: center; font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.board .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.board .score { white-space: nowrap; }
.board li.podium .place { font-size: 1.4rem; }
@media (max-width: 560px) { .rank-hero h1 { font-size: 1.6rem; } .rank-strip > .small:last-child { display: none; } }
.board .who > .badge, .board .who strong + .badge { align-self: flex-start; }
.board .who strong { display: inline-flex; gap: .4rem; align-items: center; }
/* Scan with your phone (on a computer) */
.phone-scan { position: fixed; inset: 0; z-index: 95; display: none; place-items: center; background: rgba(0,0,0,.5); padding: 16px; }
.phone-scan.on { display: grid; }
.phone-scan-card { position: relative; width: min(100%, 420px); text-align: center; }
.phone-scan-card img { display: block; margin: .75rem auto; border-radius: 10px; background: #fff; padding: 6px; }
.phone-scan-close { position: absolute; top: .4rem; right: .6rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.phone-scan-actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
/* Phone vs computer: show the right words and buttons */
@media (hover: hover) and (pointer: fine) { .on-phone { display: none !important; } }
@media (hover: none), (pointer: coarse) { .on-desktop { display: none !important; } }
.phone-photos-btn { margin-left: auto; }
.shot-drop { font-size: .78rem; color: var(--accent); font-weight: 600; margin-top: .2rem; }
.shot.drag-over { border-color: var(--accent); border-style: solid; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.photo-page + .section { margin-top: 1rem; }
.hit-group { font-size: 1rem; margin: 1.25rem 0 .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hit-group:first-child { margin-top: 0; }
/* Search bar: box, Snap and Search all one height, one text size */
.search-box { align-items: stretch; }
.search-field input[type=search] { height: 3rem; padding-top: 0; padding-bottom: 0; }
.search-box > .btn, .search-box > label.btn { height: 3rem; margin: 0; padding-block: 0; border-radius: 10px;
  font-size: 1rem; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.scan-btn { height: 2.2rem; padding-block: 0; font-size: .9rem; }
.head-search { align-items: stretch; }
.head-search input, .head-search .btn { height: 2.6rem; margin: 0; }
.head-search .btn { padding-block: 0; display: inline-flex; align-items: center; font-size: .95rem; }
.export-card { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.export-card form { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
/* Language and currency menu */
.locale-dd .flag { font-size: 1.15rem; line-height: 1; }
.locale-dd .menu { min-width: 200px; }
.auth-locale { position: absolute; top: 12px; right: 16px; }
.auth-locale .dd .menu { right: 0; }

/* --- Reviews, reports, verified sellers --- */
.shop-trust { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; margin: .25rem 0 0; }
.trust-score a { color: inherit; }
.verified { font-weight: 600; }
.trust-summary { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: baseline; }
.review-list { display: grid; gap: .75rem; }
.review { border-left: 3px solid var(--border); padding: .5rem .75rem; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.review-list .review { box-shadow: var(--shadow); }
.review-positive { border-left-color: var(--ok); }
.review-negative { border-left-color: var(--danger); }
.review p { margin: .35rem 0 0; }
.review-rating { font-weight: 600; }
.review-reply { color: var(--muted); padding-left: .75rem; border-left: 2px solid var(--border); }
#review .review + .review, #review .review + details, #review form.review-form { margin-top: .75rem; }
.rating-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.rating-pick label { display: inline-flex; gap: .35rem; align-items: center; padding: .4rem .7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.rating-pick label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.radio-line { display: flex; gap: .5rem; align-items: center; padding: .25rem 0; font-weight: normal; }
.narrow-card { max-width: 640px; }
.report-list { display: grid; gap: .75rem; }
.report-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.report-details { white-space: pre-wrap; }
.report-targets { margin: .5rem 0; padding-left: 1.1rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.report-actions input[name=note] { flex: 1 1 14rem; }

/* --- Adding missing items --- */
.check-row { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.check-row label { display: inline-flex; gap: .35rem; align-items: center; font-weight: normal; }
.new-item-form .form-grid { margin-top: .5rem; }
.max-price { align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }
.max-price .max-input { width: 6.5rem; }
.max-label { margin: 0; flex-basis: 100%; }
.max-picks { display: flex; flex-wrap: wrap; gap: .4rem; flex-basis: 100%; }
.max-own { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.max-own .max-input { width: 6.5rem; }
.max-picks .pick { font: inherit; font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); min-height: 2.25rem; }
.max-picks .pick:hover { border-color: var(--accent); }
.max-picks .pick.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); font-weight: 600; }
.max-picks .pick:disabled { opacity: .6; cursor: progress; }
.tested-field { margin-top: .5rem; }
.away-note { margin-top: .75rem; }
.bulk-actions { display: grid; gap: 1rem; }
.bulk-rule { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .35rem 0; }
.bulk-rule label { display: inline-flex; gap: .35rem; align-items: center; font-weight: normal; }
.pct-input { width: 5.5rem; }
.bulk-other { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.ok-text { color: var(--ok); }
.code-input { max-width: 12rem; text-transform: uppercase; }
.discount-list td code { font-weight: 600; }
.bulk-rule input.pct-input, .bulk-rule select, .inline-pair select { width: auto; flex: 0 0 auto; }
.bulk-rule input.pct-input { width: 5.5rem; }
.inline-pair { display: flex; gap: .4rem; align-items: center; }
.inline-pair input { flex: 1 1 auto; min-width: 0; }
.code-input::placeholder { text-transform: none; }
.bulk-other .row { display: flex; gap: .5rem; align-items: center; flex-wrap: nowrap; }
.bulk-other select { width: auto; }

/* --- Collectors' names for the machines, and the Sinclair stripe --- */
.nick { font-weight: 500; font-size: .8em; color: var(--muted); font-style: italic; white-space: nowrap; }
.topbar { position: relative; }
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #d7261e 0 25%, #f4b400 25% 50%, #2ea84a 50% 75%, #1f8fd6 75% 100%); opacity: .85; }
.page-head h1 + .stripe-rule, .stripe-rule { display: block; width: 64px; height: 4px; margin: .35rem 0 0;
  background: linear-gradient(90deg, #d7261e 0 25%, #f4b400 25% 50%, #2ea84a 50% 75%, #1f8fd6 75% 100%);
  transform: skewX(-20deg); border-radius: 1px; }

/* --- Value over time --- */
.trend-head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.trend-head h2 { margin: 0; }
.trend-change { font-weight: 700; }
.trend-change.up { color: var(--ok); }
.trend-change.down { color: var(--danger); }
.trend-svg { width: 100%; height: 120px; display: block; margin: .5rem 0 .25rem; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.trend-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.trend-foot { display: flex; justify-content: space-between; }

/* --- Set checklists --- */
.set-progress { display: grid; gap: .5rem; }
.set-progress form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.set-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 1rem; padding: .5rem 1rem; }
.set-item { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.set-item:hover span:nth-child(2) { text-decoration: underline; }
.set-item.got .set-check { color: var(--ok); font-weight: 700; }
.set-item:not(.got) span:nth-child(2) { color: var(--muted); }

/* --- Public collection pages --- */
.public-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.public-tile { display: grid; grid-template-columns: 56px 1fr; gap: .75rem; align-items: center; padding: .6rem; }
.public-tile img, .public-tile .tile-empty { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: var(--bg); display: block; }
.trace { white-space: pre-wrap; overflow-x: auto; background: var(--bg); padding: .5rem; border-radius: 6px; max-height: 24rem; }

/* --- Disputes --- */
.thread { display: grid; gap: .5rem; }
.msg { border-left: 3px solid var(--border); padding: .35rem .75rem; background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.msg p { margin: .25rem 0 0; white-space: pre-wrap; }
.msg-seller { border-left-color: var(--accent); }
.msg-admin { border-left-color: var(--warn); }
.problem-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* --- Auctions --- */
.auction-price strong { font-size: 1.5rem; }
.bid-form input { max-width: 10rem; }
.bid-history { margin: .25rem 0 0; padding-left: 1.1rem; }
.auction-note { margin: .5rem 0; padding: .4rem .6rem; border-radius: 6px; background: color-mix(in srgb, var(--ok) 10%, transparent); }
.auction-start { margin: .5rem 0; }

/* --- What's new --- */
.release-head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.release-head h2 { margin: 0; }
.release-version { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.release-items { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.release-items .kind { display: inline-block; min-width: 5.2rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ok); }
.release-items .kind-improved { color: var(--accent); }
.release-items .kind-fixed { color: var(--warn); }
.avatar-btn { position: relative; }
.news-dot { position: absolute; top: 2px; left: 26px; width: 9px; height: 9px; border-radius: 50%; background: #d7261e; border: 2px solid var(--surface); }
.news-strip { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; color: inherit; text-decoration: none; border-left: 4px solid #d7261e; }
.news-strip:hover strong { text-decoration: underline; }
.release-items li { display: grid; grid-template-columns: 5.6rem 1fr; gap: .5rem; align-items: baseline; }
.release-items .kind { min-width: 0; }
.bulk-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.bulk-filter select, .bulk-filter input[type=search] { width: auto; flex: 1 1 12rem; }
.bulk-actions { position: sticky; top: .5rem; z-index: 5; }
.bulk-actions > .field select { max-width: 22rem; }
.bulk-panel select, .bulk-panel input[name=note] { max-width: 26rem; }
.bulk-apply { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
@media (max-width: 700px) { .bulk-actions { position: static; } }
.install-strip { border-left-color: #1f8fd6; align-items: center; justify-content: space-between; }
[hidden] { display: none !important; }

/* --- New releases and publishers --- */
.release-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.release-card { display: flex; flex-direction: column; gap: .5rem; padding: .6rem; color: inherit; text-decoration: none; }
.release-card:hover strong { text-decoration: underline; }
.release-cover { aspect-ratio: 3 / 4; background: var(--bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.release-cover img { width: 100%; height: 100%; object-fit: cover; }
.release-info { display: grid; gap: .15rem; }
.verified-pub { color: var(--ok); font-weight: 700; }
.manage-cover { max-width: 160px; border-radius: 6px; display: block; margin-bottom: .5rem; }
.preorder-list { padding-left: 1.1rem; margin: .25rem 0; }
.release-card, .release-card * { text-decoration: none; }
.release-card:hover strong { text-decoration: underline; }
@media (max-width: 520px) { .release-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Phones ------------------------------------------------------------------------------
   One place for the small-screen rules that apply everywhere. */
.coll-head { grid-template-columns: auto minmax(0, 1fr) auto; }
.marks { flex-wrap: wrap; }
.copy-summary { display: none; }
@media (max-width: 900px) {
  .coll-head { grid-template-columns: minmax(0, 1fr); }
  .coll-actions .marks { justify-content: flex-start; }
}
@media (max-width: 640px) {
  /* iPhones zoom into any field whose text is under 16px when it's tapped. */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
  input[type=url], input[type=tel], input[type=date], input:not([type]), select, textarea,
  :is(input, select, textarea):is(.small, .mono), .import-table .manual { font-size: 16px; }
  main.container { padding-top: 1.1rem; overflow-x: clip; }
  h1 { font-size: 1.5rem; }

  /* Tab rows and the settings menu scroll sideways instead of running off the screen. */
  .tabs, .settings-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
                         max-width: 100%; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar, .settings-nav::-webkit-scrollbar { display: none; }
  .tab, .settings-nav .btn { flex: 0 0 auto; white-space: nowrap; }

  /* Page heads: the title and its buttons stack; totals sit in a 2-up grid. */
  .page-head { align-items: stretch; }
  .page-head > .actions, .page-head > .btn { text-align: left; }
  .totals { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; width: 100%; }
  .totals > div { align-items: flex-start; }

  .card { padding: 1rem; }
  .row > * { flex: 1 1 100%; }
  .row > .btn, .row > button { flex: 0 0 auto; }
  /* Two columns, or one when the phone's text is turned up and two won't fit. */
  .copy-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8.5em, calc(50% - .3rem))), 1fr)); }
  .actions { white-space: normal; }

  /* Collection: each copy is a one-line summary you tap to edit. */
  .copy { padding: 0; }
  .copy > .cs-wrap > details > summary.copy-summary { display: flex; }
  .copy-body { padding: .2rem .8rem .8rem; }
  .copy-body .copy-head > strong:first-child { display: none; }
  /* iPhone Safari gives date fields a fixed minimum width and its own height: make them
     behave like the other fields. */
  input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block;
                     min-height: 2.9rem; line-height: 1.4; text-align: left; }
  input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
  .copy-grid > .field, .copy-grid input, .copy-grid select { min-width: 0; }
  /* When the asking price is hidden there's an odd number of fields: the last one takes the
     whole row instead of leaving a gap. */
  .copy-grid:has(> .ask.hidden-field) > .field:last-child,
  .copy-grid:not(:has(> .ask)):has(> .field:nth-child(odd):last-child) > .field:last-child { grid-column: 1 / -1; }
  /* Choices like "Tested?" fill the width in equal parts instead of wrapping unevenly. */
  .seg { display: flex; width: 100%; flex-wrap: wrap; }
  .seg-opt { flex: 1 1 auto; justify-content: center; text-align: center; padding: .6rem .35rem; min-width: 0;
             font-size: .92rem; position: relative; line-height: 1.25; }
  /* The shading shows the choice, so the radio circles can go and the options fit one line. */
  .seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .seg-opt:has(input:checked) { font-weight: 600; }
  .seg-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
  .coll-info, .coll-info * { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .shot-btn, .shot-btn * { min-width: 0; overflow-wrap: anywhere; }
  input[type=file] { max-width: 100%; }
  /* Long emails, links and codes wrap instead of running off the screen (big text too). */
  table.stack td, table.stack td *, .card p, .card li { overflow-wrap: anywhere; }
  .copy-foot { flex-wrap: wrap; }
  .copy-foot input[type=text] { flex: 1 1 100%; }
  .copy-foot .btn { flex: 1 1 0; padding-block: .5rem; }
  .copy-foot .copy-del { display: none; }  /* the bin on the summary row does this on phones */
  /* Item heads: a small picture beside the title, the buttons underneath. */
  .coll-head { grid-template-columns: auto minmax(0, 1fr); gap: .4rem .8rem; }
  .coll-head > .coll-actions { grid-column: 1 / -1; }
  .coll-head .tiles .tile { width: 64px; height: 64px; }
  /* Release rows stack on phones: leave out empty cells rather than showing dashes. */
  .rel-table td:has(> .dash:only-child), .rel-table td.col-code:has(> .dash:only-child) { display: none; }
  .rel-table .col-value:has(.dash) { display: none; }
  .rel-table .marks { gap: .4rem; width: 100%; }
  .rel-table td.col-marks { width: 100%; }
  .rel-table td.col-pics { width: auto; }
  .coll-head .tiles .tile ~ .tile { display: none; }
  .coll-head .tile-empty { font-size: .6rem; text-align: center; }
  .coll-title { font-size: 1.05rem; }
  .marks .btn { padding: .4rem .7rem; }
  /* What's new: the NEW / IMPROVED label sits above each line rather than in a wide column. */
  .release-items li { grid-template-columns: 1fr; gap: 0; }
  .release-items { gap: .6rem; }
  /* Buying: big, full-width buttons. */
  .buy-actions, .buy-now { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; }
  .buy-actions .btn, .buy-now .btn { width: 100%; padding-block: .75rem; }
  /* Shop and marketplace items: two across, like a shopping app. */
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .listing-card { padding: .5rem; gap: .4rem; font-size: .9rem; }
  .listing-card h3, .listing-card strong { overflow-wrap: anywhere; }
}
.copy-summary { list-style: none; cursor: pointer; align-items: center; gap: .3rem .6rem; flex-wrap: wrap;
                padding: .7rem .8rem; font-size: .92rem; }
.copy-summary::-webkit-details-marker { display: none; }
.copy-summary .cs-bits { display: flex; flex-wrap: wrap; gap: .25rem .5rem; color: var(--muted); flex: 1 1 auto; min-width: 0; }
.copy-summary .cs-bits strong { color: var(--text); }
.copy[hidden], .coll-group[hidden] { display: none !important; }
.copy.just-added { animation: just-added 2.4s ease-out; }
.copy-photos.working { opacity: .6; pointer-events: none; transition: opacity .2s; }
@keyframes just-added { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .copy.just-added { animation: none; outline: 2px solid var(--accent); } }
/* The bin is laid over the summary line, just left of "Edit" (phones only). */
.cs-wrap { display: grid; }
.cs-wrap > details { grid-area: 1 / 1; min-width: 0; }
.cs-bin { display: none; }
.cs-bin svg, .copy-del svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
@media (max-width: 640px) {
  .copy-summary { flex-wrap: nowrap; align-items: flex-start; }
  .copy-summary .cs-edit { flex: none; min-width: 3.4rem; text-align: right; line-height: 2.2rem; margin-left: 0; }
  .copy-summary .cs-bits { line-height: 1.45; padding-top: .3rem; }
  .copy-summary .cs-bin-space { flex: none; width: 2.2rem; margin-left: auto; }
  .copy-summary .cs-bin-space + .cs-edit { margin-left: 0; }
  .cs-wrap > .cs-bin { grid-area: 1 / 1; justify-self: end; align-self: start; z-index: 1;
    margin: .7rem calc(.8rem + 3.4rem + .6rem) 0 0;
    display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem;
    border: 0; border-radius: 8px; background: none; color: var(--danger); cursor: pointer; padding: 0; }
  .cs-wrap > .cs-bin:active { background: var(--danger-bg); }
}
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
         display: flex; align-items: center; gap: 1.2rem; width: max-content; max-width: calc(100% - 32px); padding: .75rem 1rem; border-radius: 10px;
         background: var(--text); color: var(--surface); box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 500; }
.toast[hidden] { display: none; }
.toast.toast-bad { background: var(--danger); color: #fff; }
.toast span { overflow-wrap: anywhere; }
.toast button { background: none; border: 0; padding: .2rem .3rem; font: inherit; font-weight: 700; color: var(--toast-link); cursor: pointer; }
.toast { flex-wrap: wrap; row-gap: .5rem; }
.toast-extra { flex-basis: 100%; }
.toast-extra[hidden] { display: none; }
.toast .toast-link { color: var(--toast-link); font-weight: 600; }
.toast-picks { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.toast-picks > span { flex-basis: 100%; }
.toast .toast-picks .pick { font-weight: 600; font-size: .9rem; padding: .35rem .8rem; min-height: 2.25rem; border-radius: 999px; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: color-mix(in srgb, currentColor 8%, transparent); }
.toast .toast-picks .pick:disabled { opacity: .6; }
.copy-summary .cs-edit { margin-left: auto; flex: none; color: var(--accent); font-weight: 600; white-space: nowrap; }
.copy-summary .cs-edit::after { content: " ▾"; content: " ▾" / ""; }  /* the arrow is decoration: not read out */
details[open] > .copy-summary .cs-edit::after { content: " ▴"; content: " ▴" / ""; }
details[open] > .copy-summary { border-bottom: 1px solid var(--border); }
@media (min-width: 641px) { .copy-details > .copy-summary { display: none !important; } }

.copy-btn { margin-left: .5rem; padding: .15rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
            color: var(--accent); font: inherit; font-family: var(--font); font-size: .75rem; font-weight: 600; cursor: pointer; vertical-align: middle; }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }
.field-with-btn { display: flex; gap: .5rem; }
.field-with-btn input { flex: 1; min-width: 0; }
.field-with-btn .btn { flex: 0 0 auto; }

/* Phones: the price and Buy button at the bottom of item and marketplace pages. */
.buy-bar { display: none; }
@media (max-width: 640px) {
  .buy-bar.show { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; align-items: center; gap: .8rem;
                  padding: .65rem 16px calc(.65rem + env(safe-area-inset-bottom)); background: var(--surface);
                  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .buy-bar-price { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
  .buy-bar-price strong { font-size: 1.15rem; }
  .buy-bar-price .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .buy-bar .btn { flex: 0 0 auto; padding: .7rem 1.2rem; }
  body.has-buy-bar { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  body.has-buy-bar .toast { bottom: calc(5rem + env(safe-area-inset-bottom)); }
}

/* Home page shortcuts (phones). */
.quick-actions { display: none; }
@media (max-width: 640px) {
  .quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; }
  .qa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 5.2rem;
        padding: .8rem .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
        color: var(--text); font-weight: 600; text-align: center; cursor: pointer; box-shadow: var(--shadow); }
  .qa:hover, .qa:active { text-decoration: none; border-color: var(--accent); }
  .qa svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .qa:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
  .qa:first-child svg { stroke: var(--accent-text); }
  .page-head .head-search .btn:not(.btn-primary) { display: none; }  /* Scan is a shortcut tile now */
}
.added-link { display: block; margin-top: .45rem; font-weight: 600; color: var(--ok); animation: added-in .3s ease-out; }
@keyframes added-in { from { opacity: 0; transform: translateY(-3px); } }

/* Collection header: one line of totals on phones. */
.totals > .totals-line { display: none; }
@media (max-width: 640px) {
  .coll-top { margin-bottom: .8rem; gap: .4rem; }
  .coll-top h1 { margin-bottom: .2rem; }
  .coll-top .totals > .totals-line { display: block; grid-column: 1 / -1; color: var(--muted); }
  .totals-line strong { color: var(--text); }
  .totals-line .totals-more { margin-left: .3rem; padding: 0; font-size: .9rem; font-weight: 600; }
  .coll-top:not(.show-more) > div:first-child p, .coll-top:not(.show-more) .totals > div:not(.totals-line) { display: none; }
  .coll-top.show-more .totals { gap: .75rem 1rem; }
}
@media (max-width: 640px) {
  .wanted-details { margin-top: .8rem; border: 1px solid var(--border); border-radius: 8px;
                    background: color-mix(in srgb, var(--bg) 45%, var(--surface)); }
  .wanted-details > summary.copy-summary { display: flex; }
  .wanted-details > :not(summary) { margin-inline: .8rem; }
  .wanted-details > form { margin-bottom: .8rem; }
}
.picks-list h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.picks-list ul { list-style: none; margin: 0; padding: 0; }
.picks-list li { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.picks-list li:last-child { border-bottom: 0; }
.picks-list form.inline { display: inline; margin-left: auto; }
.picks-new { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.picks-new .picks-url { flex: 1 1 16rem; min-width: 0; font-family: var(--mono, monospace); font-size: .85rem; }
.sold-table tbody th, .sold-table tbody td { border-bottom: 1px solid var(--border); text-transform: none; letter-spacing: normal; font-size: .9rem; color: var(--text); background: none; }
.sold-table tbody tr:last-child > * { border-bottom: 0; }
.bundle-offer { margin-top: .8rem; }
.bundle-offer summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.bundle-form { display: grid; gap: .5rem; margin: .6rem 0; max-width: 28rem; }
.bundle-form textarea { width: 100%; font: inherit; }
.bundle-note { margin: .8rem 0 0; }
.bundle-list { display: grid; gap: .6rem; margin-bottom: 1rem; }
.bundle-row { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: space-between; }
.bundle-row p { margin: 0 0 .3rem; }
.bundle-main { flex: 1 1 18rem; min-width: 0; }
.bundle-side { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.bundle-actions { display: flex; gap: .4rem; }
.demand-note { margin: .2rem 0 .6rem; padding: .45rem .7rem; border-radius: 8px; background: color-mix(in srgb, var(--danger) 7%, transparent); }
.cs-demand { color: var(--danger); font-weight: 600; }
.fair-head h1 { margin: .2rem 0 .3rem; }
.fair-today { margin: 0 0 .8rem; }
.fair-search { position: sticky; top: 0; z-index: 5; display: flex; gap: .6rem; align-items: center; padding: .5rem 0; background: var(--bg); }
.fair-search input { flex: 1; min-width: 0; font-size: 1.1rem; padding: .7rem .8rem; }
.fair-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .6rem; }
.fair-item { display: grid; grid-template-columns: 64px 1fr; gap: .4rem .8rem; align-items: start; padding: .7rem; }
.fair-item[hidden] { display: none; }
.fair-pic { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--border); }
.fair-pic img { width: 100%; height: 100%; object-fit: cover; }
.fair-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.fair-title { font-size: 1.05rem; line-height: 1.25; }
.fair-price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.fair-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; }
.fair-actions details { flex: 1 1 8rem; }
.fair-actions details[open] { flex-basis: 100%; }
.fair-actions summary { list-style: none; display: flex; justify-content: center; padding: .7rem; font-size: 1rem; }
.fair-actions summary::-webkit-details-marker { display: none; }
.fair-form { display: flex; gap: .5rem; margin-top: .5rem; }
.fair-form input { flex: 1; min-width: 0; font-size: 1.1rem; padding: .6rem .7rem; }
.fair-sold { list-style: none; padding: 0; margin: 0; }
.fair-sold li { display: flex; gap: .6rem; align-items: baseline; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.fair-sold li span { flex: 1; min-width: 0; }
.counter-offer { margin-top: .4rem; }
.counter-offer summary { cursor: pointer; color: var(--accent); }
.fair-queue { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.fair-queue[hidden] { display: none; }
.fair-queued { opacity: .75; }
.fair-queued-note { margin: .2rem 0 0; color: var(--warn, #9a6700); font-weight: 600; }
.badge.founding { background: color-mix(in srgb, #d4a017 18%, transparent); color: #8a6400; border-color: color-mix(in srgb, #d4a017 45%, transparent); }
.founding-star { color: #c99400; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.founding { color: #f0c64a; } }
:root[data-theme="dark"] .badge.founding { color: #f0c64a; }
.covers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.cover-check p { margin: .4rem 0; }
.cover-pair { display: grid; grid-template-columns: 3fr 2fr; gap: .5rem; align-items: start; }
.cover-scan { position: relative; line-height: 0; }
.cover-scan img, .cover-front img { width: 100%; height: auto; border-radius: 4px; }
.cover-box { position: absolute; border: 2px solid #e5484d; box-shadow: 0 0 0 999px rgba(0,0,0,.35); border-radius: 2px; }
.cover-scan { overflow: hidden; }
.cover-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.covers-run .row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cover-scan { touch-action: none; cursor: crosshair; user-select: none; }
.cover-box { cursor: move; }
.box-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #e5484d; border-radius: 50%; }
.box-handle.nw { left: -2px; top: -2px; cursor: nwse-resize; }
.box-handle.ne { right: -2px; top: -2px; cursor: nesw-resize; }
.box-handle.sw { left: -2px; bottom: -2px; cursor: nesw-resize; }
.box-handle.se { right: -2px; bottom: -2px; cursor: nwse-resize; }
.cover-adjust { margin: .3rem 0; }
.email-group { font-size: 1rem; margin: 0 0 .4rem; }
.email-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.email-source textarea { width: 100%; font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; margin: .4rem 0; }
.email-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.email-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.email-text { white-space: pre-wrap; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 8px; padding: .8rem; font-size: .85rem; }
.email-preview-opts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.email-preview-opts input { width: auto; }
.email-history li { display: flex; flex-wrap: wrap; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.email-subjects h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.email-subject { padding: .5rem 0; border-top: 1px solid var(--border); }
.email-subject .row { display: flex; gap: .5rem; }
.email-subject input[name=subject] { flex: 1; min-width: 0; }
.email-subject code { font-size: .78rem; }
.shot-hint { margin: .3rem 0 0; padding: .3rem .5rem; border-radius: 6px; background: color-mix(in srgb, #f4b400 18%, transparent); color: var(--text); }
.cover-tile { margin: 0; padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.cover-tile img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--border); }
.cover-tile figcaption { display: flex; flex-direction: column; gap: .1rem; }
.covers-thanks h2 { font-size: 1rem; margin: 0 0 .3rem; }

/* Bounced email banner */
.email-bounced .inline-form { display: inline-block; margin: .4rem 0 0; }

/* API costs: share of the monthly limit used */
.meter { height: .6rem; border-radius: 999px; background: var(--border); overflow: hidden; margin: .4rem 0 .6rem; }
.meter span { display: block; height: 100%; background: var(--accent); }
.meter span.meter-over { background: var(--danger); }

/* Library covers: the live box preview, and cards folding away once answered */
.cover-front canvas { width: 100%; height: auto; border-radius: 4px; outline: 2px solid #e5484d; }
.cover-check { transition: height .2s ease, opacity .2s ease; }
.cover-check.cover-gone { opacity: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; }
.cover-check.cover-new { animation: cover-in .6s ease; }
@keyframes cover-in { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .cover-check, .cover-check.cover-new { transition: none; animation: none; } }
.cover-check.cover-current { outline: 3px solid var(--accent); outline-offset: 2px; }
.covers-keys kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3em; background: var(--surface); }
.covers-sure { align-items: center; flex-wrap: wrap; gap: .5rem; }

/* Admin analytics: visitors a day (real people / unconfirmed / bots), stacked bars */
.viz { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; }
:root[data-theme="dark"] .viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70; } }
.viz .s1 { background: var(--s1); } .viz .s2 { background: var(--s2); } .viz .s3 { background: var(--s3); }
.viz-legend { display: flex; gap: 1rem; list-style: none; padding: 0; margin: .3rem 0 .6rem; flex-wrap: wrap; }
.viz-key { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.viz-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1px solid var(--border); }
.viz-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 4px; outline: none; }
.viz-stack { width: 100%; display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.viz-stack span { display: block; min-height: 2px; }
.viz-col:hover .viz-stack, .viz-col:focus-visible .viz-stack { filter: brightness(1.12); }
.viz-tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 5;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: .25rem .5rem; box-shadow: var(--shadow); }
.viz-col:hover .viz-tip, .viz-col:focus-visible .viz-tip { display: block; }
.viz-col:first-child .viz-tip { left: 0; transform: none; } .viz-col:last-child .viz-tip { left: auto; right: 0; transform: none; }
.viz-axis { display: flex; justify-content: space-between; margin-top: .3rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: .8rem; }
.watch-form { display: inline-block; margin-left: .4rem; }
.watch-form .btn.watching { border-color: var(--accent); color: var(--accent); }

/* Admin activity feed */
.activity-tiles { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.activity-tiles .stat-link.active { outline: 2px solid var(--accent); }
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { padding: .45rem 0; border-top: 1px solid var(--border); }
.activity-feed li:first-child { border-top: 0; }
.activity-time { display: inline-block; min-width: 3.2rem; font-variant-numeric: tabular-nums; }
.activity-error a, .activity-report a { color: var(--danger); }
.funnel { list-style: none; margin: .5rem 0 0; padding: 0; }
.funnel li { margin: .55rem 0; }
.funnel-row { display: flex; align-items: center; gap: .6rem; margin-top: .2rem; }
.funnel-bar { display: block; height: .9rem; min-width: 4px; border-radius: 0 4px 4px 0; }
.funnel-n { white-space: nowrap; }
.share-url { margin-top: .25rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.share-url code { word-break: break-all; }
.alias-pick { margin-bottom: .35rem; }
.alias-pick form { display: inline-block; margin: .1rem .15rem; }
.meant { margin: .6rem 0; }
.meant form { display: inline-block; margin: .15rem .1rem; }
.meant p { margin: .3rem 0 0; }
.share-card { margin-top: .35rem; }
.og-preview { display: flex; flex-direction: column; max-width: 22rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: .5rem 0; background: var(--surface); }
.og-preview img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--border); }
.og-preview div { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .6rem; }

/* Most wanted */
.wanted-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.wanted-row { display: grid; grid-template-columns: 2rem 3.5rem 1fr auto; gap: .8rem; align-items: center; padding: .6rem .8rem; }
.wanted-rank { font-weight: 700; color: var(--muted); text-align: center; }
.wanted-pic img, .wanted-pic .no-pic { width: 3.5rem; height: 4.5rem; object-fit: cover; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: var(--border); }
.wanted-what { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.wanted-act { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .wanted-row { grid-template-columns: 1.5rem 3rem 1fr; } .wanted-act { grid-column: 2 / -1; justify-content: flex-start; } }

/* Import review: "Teach the matcher" spellings */
#spellings .plain-list { list-style: none; padding: 0; margin: .5rem 0; }
#spellings .plain-list li + li { border-top: 1px solid var(--border, #e5e5e5); }
#spellings .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 0; margin: 0; }
#spellings .inline-form input[type=text] { flex: 1 1 14rem; min-width: 0; }

/* Email settings: which kinds of thing the "people looking" email covers */
.pref-groups { border: 0; margin: -.2rem 0 .6rem 2.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.pref-groups legend { float: left; margin-right: .5rem; padding: 0; }
.covers-publishers summary { cursor: pointer; }
.covers-publishers tr.is-current td { background: var(--surface); }
.match-trend { margin: .2rem 0 .6rem; }

/* Prices > Sales nothing matched */
.unmatched-list { display: grid; gap: .75rem; }
.unmatched-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.unmatched-fix { margin-top: .6rem; display: grid; gap: .3rem; }
.unmatched-fix .row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.unmatched-fix input[type=text] { flex: 1 1 12rem; min-width: 0; }

/* Checking covers: a close-up while dragging the box, and one card made big */
.cover-loupe { position: fixed; z-index: 50; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; pointer-events: none;
  background-color: #111; background-repeat: no-repeat; border: 3px solid #fff; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.cover-loupe[hidden] { display: none; }
.cover-loupe::before, .cover-loupe::after { content: ""; position: absolute; background: rgba(255,255,255,.85); mix-blend-mode: difference; }
.cover-loupe::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.cover-loupe::after { top: 50%; left: 0; right: 0; height: 1px; }
.loupe-box { position: absolute; border: 2px solid #e5484d; box-sizing: border-box; }
.loupe-zoom { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; color: #fff; background: rgba(0,0,0,.55); padding: 0 .35rem; border-radius: 4px; line-height: 1.5; }
.cover-tools { margin: .3rem 0 0; }
.cover-check.cover-big { grid-column: 1 / -1; }
.cover-check.cover-big .cover-pair { grid-template-columns: 4fr 1fr; }
.cover-check.cover-big .box-handle { width: 18px; height: 18px; }
.box-handle.is-active { background: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.35); }
.cover-snap { margin-left: .4rem; }
.cover-history { margin: .2rem 0; }
.cover-history summary { cursor: pointer; color: var(--muted); }
.cover-history-list { margin: .3rem 0; padding-left: 1.1rem; }
.cover-history-list li { margin: .15rem 0; }
.cover-history-list form.inline { display: inline; }
.cover-check.cover-tidied { box-shadow: 0 0 0 2px #f2b400; }
.covers-tidy-all { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cover-run-publisher { min-width: 12rem; }
.meter-sm { height: 6px; min-width: 5rem; margin-bottom: .2rem; }
.cover-publishers tr.is-ready td { background: color-mix(in srgb, var(--ok, #17794a) 7%, transparent); }
.cover-run-auto { flex-basis: 100%; }

/* Covers: quick review grid */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.quick-tile { position: relative; display: flex; flex-direction: column; gap: .2rem; cursor: pointer; border-radius: 6px; padding: 4px; border: 2px solid transparent; }
.quick-tile img { width: 100%; aspect-ratio: 65 / 100; object-fit: contain; background: var(--surface); border-radius: 4px; }
.quick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.quick-mark { display: none; position: absolute; top: 8px; left: 8px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; padding: 0 .35rem; border-radius: 4px; }
.quick-tile:has(input:checked) { border-color: var(--danger); }
.quick-tile:has(input:checked) img { opacity: .45; }
.quick-tile:has(input:checked) .quick-mark { display: block; }
.quick-tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-run-when { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; flex-basis: 100%; }
.cover-away .away-list { margin: .25rem 0 .75rem; padding-left: 1.2rem; display: grid; gap: .25rem; }
.cover-away .away-flag { color: var(--warn); }
.cover-away h2 .small { font-weight: 400; }
.badge-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.email-setup summary h2 { display: inline; font-size: 1.1rem; }
.email-setup .setup-steps { display: grid; gap: .6rem; padding-left: 1.2rem; }
.email-setup .setup-steps ul { margin: .25rem 0 0; padding-left: 1rem; }
.email-setup .ok { color: var(--ok); }
.email-setup .todo { color: var(--warn); }
