/* Auto d’Autore — gallery look in the logo palette: deep burgundy, warm ivory, champagne gold. */
:root {
  --bg:#F5EFE8; --surface:#FBF8F4; --studio:#EADFD4; --ink:#1E0A11; --muted:#6E5A5F; --line:#E0D3C7;
  --accent:#5C1A2E; --accent-ink:#F8EEE2; --brass:#8F6A3A; --tire:#1C1416; --glass:#3A2228;
  --ok:#2E7D4F; --ok-bg:#E2F1E8; --warn:#8A5A00; --warn-bg:#FBF0D9; --err:#A83A2A; --err-bg:#F8E3DF;
  --display:"Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body:"Manrope", "Segoe UI", system-ui, sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#13060A; --surface:#1D0B11; --studio:#2A1119; --ink:#F2E7DB; --muted:#B49E95; --line:#3A1D26;
    --accent:#E9CAA1; --accent-ink:#17060C; --brass:#E2BF8F; --tire:#0A0305; --glass:#0F0507;
    --ok:#8CC9A2; --ok-bg:#15261C; --warn:#E8B860; --warn-bg:#2C2010; --err:#F08A78; --err-bg:#311318;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 12px; color: var(--muted); margin: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; gap: 12px; }
.inline { display: inline; margin: 0; }
code { font-family: var(--mono); }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { font-family: var(--display); font-size: 22px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand i { font-weight: 500; color: var(--brass); }
nav.links { display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover { color: var(--ink); }
.userbox { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; background: var(--surface); cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }
@media (max-width: 820px) { nav.links { display: none; } }
@media (max-width: 480px) { .brand { font-size: 19px; } header.top .wrap { gap: 10px; } }

.testnet-banner { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: 13px; font-weight: 700; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
.flashes { padding-top: 14px; display: grid; gap: 8px; }
.flash { margin: 0 0 12px; padding: 12px 14px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.muted { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* hero */
.hero .wrap { padding-block: 64px 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: clamp(40px, 6.4vw, 82px); line-height: .98; letter-spacing: -.02em; margin: 14px 0 0; text-wrap: balance; }
.hero h1 em { color: var(--brass); }
.hero .lede { max-width: 44ch; color: var(--muted); font-size: 17px; margin: 0; }
.threshold { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.threshold div { border-top: 1px solid var(--ink); padding-top: 8px; min-width: 110px; }
.threshold b { display: block; font-family: var(--mono); font-size: 20px; font-weight: 500; }
.threshold span { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 24px; padding-block: 40px 28px; } }

/* inventory */
.inventory { padding-block: 8px 72px; }
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding-block: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.bar .chips { margin: 0; align-self: center; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bar .grow { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field > .label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-width: 0; width: 100%;
}
.bar input, .bar select { width: auto; }
input[type=color] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 3px; }
input[type=file] { font-size: 13px; max-width: 100%; }
.count { font-size: 13px; color: var(--muted); margin: -12px 0 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 22px; }
.card { position: relative; display: flex; flex-direction: column; }
.studio { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 4px; background: radial-gradient(120% 90% at 50% 20%, var(--surface), var(--studio) 70%); overflow: hidden; display: grid; place-items: end center; }
.card .studio img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.studio svg.placeholder { width: 92%; margin-bottom: 6%; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .studio svg.placeholder { transform: translateX(6px); }
.card:hover .studio img { transform: scale(1.03); }
.tag { position: absolute; left: 12px; top: 12px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--line); padding: 4px 8px; border-radius: 3px; }
.heart { position: absolute; right: 10px; top: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.heart svg { width: 16px; }
.heart path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.heart[aria-pressed="true"] path { fill: var(--brass); stroke: var(--brass); }
.meta { padding-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.meta .yr { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
.meta h3 { grid-column: 1; font-family: var(--display); font-weight: 500; font-size: 23px; line-height: 1.15; margin: 0; text-wrap: balance; }
.meta h3 a { text-decoration: none; }
.meta .price { grid-column: 2; grid-row: 1 / 3; align-self: end; font-family: var(--mono); font-size: 17px; font-weight: 500; }
.specs { grid-column: 1 / -1; display: flex; gap: 16px; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.empty { padding: 48px 0; color: var(--muted); text-align: center; grid-column: 1 / -1; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 36px; }

/* process */
.process { background: var(--surface); border-block: 1px solid var(--line); }
.process .wrap { padding-block: 64px; }
.process h2 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 46px); margin: 8px 0 32px; line-height: 1.05; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps div { border-top: 2px solid var(--ink); padding-top: 14px; }
.steps b { font-family: var(--mono); color: var(--brass); font-size: 13px; font-weight: 500; }
.steps h4 { margin: 6px 0; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* buttons, panels */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 11px 18px; font-weight: 700; cursor: pointer; letter-spacing: .02em; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--err); border: 1px solid var(--err); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.stack { display: grid; gap: 14px; }
.narrow { max-width: 520px; padding-block: 48px 72px; }
.narrow.wide { max-width: 880px; }
.page-title { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 6px 0 14px; text-wrap: balance; }
.page-title a { text-decoration: none; }
.section-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 36px 0 14px; }

/* car details */
.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; padding-block: 32px 72px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.view-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.view-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.view-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage-note { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--muted); }
.spin-cta { position: absolute; right: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; border: 0; border-radius: 999px; padding: 10px 16px; background: var(--ink); color: var(--bg); font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.spin-icon { font-size: 18px; line-height: 1; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--brass); }

.spin { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.spin.grabbing { cursor: grabbing; }
.spin img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.spin:fullscreen { background: var(--studio); border-radius: 0; }
.spin-loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); font-size: 13px; background: color-mix(in srgb, var(--studio) 70%, transparent); }
.spin-loading progress { width: 180px; accent-color: var(--accent); }
.spin-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; pointer-events: none; }
.spin-controls { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.spin-controls [aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }
model-viewer.model3d { width: 100%; height: auto; aspect-ratio: 16 / 10; display: block; --poster-color: transparent; }

.buy h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4vw, 46px); line-height: 1.04; margin: 6px 0 4px; text-wrap: balance; }
.bigprice { font-family: var(--mono); font-size: 24px; margin: 4px 0 14px; }
.checkout { margin: 18px 0; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choice legend { margin-bottom: 8px; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 6px; padding: 12px; cursor: pointer; background: var(--bg); }
.option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option input { margin-top: 4px; accent-color: var(--accent); }
.option span { display: grid; gap: 2px; }
.option small { color: var(--muted); font-size: 13px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0 20px; }
.specs-table td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; overflow-wrap: anywhere; }

.chip-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.s-available, .s-paid { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.s-on_hold, .s-awaiting_payment, .s-reserved { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.s-underpaid, .s-overpaid, .s-review { background: var(--err-bg); color: var(--err); border-color: transparent; }

/* payment page */
.pay { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; margin: 18px 0; }
@media (max-width: 720px) { .pay { grid-template-columns: 1fr; } }
.warning { margin: 0; padding: 12px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); }
.copyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.amount { font-size: 26px; font-weight: 500; }
.addr { font-size: 14px; overflow-wrap: anywhere; background: var(--bg); padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); min-width: 0; }
.checklist { padding-left: 18px; display: grid; gap: 6px; }
.pay-side { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; }
.qr { background: #fff; padding: 10px; border-radius: 6px; }
.qr img, .qr canvas { display: block; }
.countdown { font-size: 34px; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--err); }

/* account & admin */
.account { padding-block: 32px 72px; }
.narrow-form { max-width: 480px; }
.admin { padding-block: 28px 72px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 8px; }
.kpis div { border-top: 2px solid var(--ink); padding-top: 8px; }
.kpis b { display: block; font-family: var(--mono); font-size: 28px; font-weight: 500; }
.edit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.edit-grid .span2 { grid-column: span 2; }
.edit-grid .full { grid-column: 1 / -1; }
@media (max-width: 860px) { .edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .edit-grid { grid-template-columns: 1fr; } .edit-grid .span2 { grid-column: auto; } }
.upload-box { border-top: 1px solid var(--line); padding-top: 4px; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 10px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media-grid.small { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.media-grid figure { margin: 0; display: grid; gap: 6px; }
.media-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 4px; background: var(--studio); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.note { font-size: 13px; color: var(--ok); margin: 0; }
.note.err { color: var(--err); }
.btn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.notes { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: 6px; }

footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
footer .small-brand { font-size: 16px; color: var(--ink); }
footer .wrap { align-items: center; }

/* ---------- preloader (first page of a visit) ---------- */
.preloader { display: none; }
html.preload .preloader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(120% 90% at 50% 35%, var(--surface), var(--bg) 70%);
  transition: opacity .55s ease, visibility .55s ease;
  animation: pr-failsafe .4s ease 4s forwards; /* never block the page if scripts fail */
}
html.preload.preload-done .preloader { opacity: 0; visibility: hidden; }
html.preload:not(.preload-done) body { overflow: hidden; }
.preloader-inner { display: grid; justify-items: center; gap: 18px; }
.preloader-mark { filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); }
.preloader-word { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: .01em; animation: pr-rise .7s cubic-bezier(.2,.7,.2,1) .12s both; }
.preloader-word i { font-weight: 500; color: var(--brass); }
.preloader-bar { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 40%; background: var(--brass); border-radius: 2px; animation: pr-slide 1.1s cubic-bezier(.6,.1,.4,.9) infinite; }
@keyframes pr-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pr-slide { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes pr-failsafe { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { html.preload .preloader { display: none; } }

/* ---------- admin shell ---------- */
body.is-admin { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-head .brand { font-size: 19px; }
.side-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--brass); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); border-radius: 999px; padding: 2px 8px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.side-nav a:hover, .side-link:hover { background: var(--bg); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.side-nav a[aria-current="page"] .badge:not(.alert) { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500; background: var(--studio); color: var(--ink); }
.badge.alert { background: var(--err); color: #fff; }
.badge.live { background: var(--warn-bg); color: var(--warn); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #17060C; color: #E9CAA1; border: 1px solid #5C1A2E; font-family: var(--display); font-weight: 700; flex: none; }
.who { display: grid; min-width: 0; line-height: 1.25; }
.who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { margin-left: auto; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--muted); padding: 0; }
.icon-btn:hover { color: var(--err); border-color: var(--err); }
.admin-main { min-width: 0; }
.admin-main .admin { padding-block: 28px 64px; }
.admin-main .flashes { padding-top: 20px; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { min-width: 0; position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); gap: 6px; }
  .side-head { border: 0; padding: 0; margin: 0 auto 0 0; }
  .side-nav { order: 3; width: 100%; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; padding: 7px 10px; }
  .side-foot { margin: 0; border: 0; padding: 0; display: flex; align-items: center; }
  .side-link span, .side-user .who { display: none; }
  .side-user { padding: 0; }
}

/* ---------- dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head .page-title { margin-bottom: 2px; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-actions .btn { padding: 9px 14px; font-size: 14px; }
.dash-actions .ico { width: 16px; height: 16px; }
.alerts { display: grid; gap: 8px; margin-bottom: 18px; }
.alerts .flash { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alerts .flash a { font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 6px; text-decoration: none; position: relative; overflow: hidden; }
a.stat:hover { border-color: var(--brass); }
.stat .label { display: flex; justify-content: space-between; align-items: center; }
.stat b { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1.1; }
.stat small { color: var(--muted); font-size: 12px; }
.stat.tone-alert { border-color: color-mix(in srgb, var(--err) 55%, var(--line)); }
.stat.tone-alert b { color: var(--err); }
.stat.tone-accent::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brass); }
.meter { height: 6px; border-radius: 6px; background: var(--studio); overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; }
.meter .m-free { background: var(--ok); }
.meter .m-assigned { background: var(--warn); }
.meter .m-retired { background: var(--muted); opacity: .5; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.card-panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-panel > header h2 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.card-panel > header a { font-size: 13px; color: var(--muted); }
.card-panel .body { padding: 14px 16px; }
.card-panel table.list th { border-bottom-color: var(--line); padding-inline: 16px; }
.card-panel table.list td { padding-inline: 16px; }
.card-panel table.list tr:last-child td { border-bottom: 0; }
.card-panel .empty-note { padding: 22px 16px; color: var(--muted); margin: 0; }
.health { display: grid; margin: 0; }
.health div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.health div:last-child { border-bottom: 0; }
.health dt { color: var(--muted); }
.health dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.dot.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.bars { display: grid; gap: 10px; }
.bars .bar-row { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.bars .track { height: 8px; background: var(--studio); border-radius: 8px; overflow: hidden; }
.bars .track span { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.bars .bar-row b { font-family: var(--mono); font-weight: 500; text-align: right; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .amt { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.feed small { display: block; color: var(--muted); }

@media (max-width: 520px) {
  .dash-actions { width: 100%; }
  .dash-actions .btn { flex: 1 1 auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 22px; }
}

/* tagline */
.preloader-tagline { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--muted); margin-top: -10px; animation: pr-rise .7s cubic-bezier(.2,.7,.2,1) .2s both; }
footer .tagline { font-family: var(--display); font-style: italic; font-size: 15px; }

/* ---------- logo (monogram + wordmark from assets/img, drawn via CSS masks) ---------- */
:root { --logo: #5C1A2E; --logo-bg: #17060C; --logo-gold: #E9CAA1; }
@media (prefers-color-scheme: dark) { :root { --logo: #E9CAA1; } }
.logo-mark, .logo-word { display: inline-block; flex: none; background: var(--logo);
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }
.logo-mark { height: 40px; aspect-ratio: 746 / 428; -webkit-mask-image: url(../img/logo-mark.png); mask-image: url(../img/logo-mark.png); }
.logo-word { height: 20px; aspect-ratio: 1113 / 149; -webkit-mask-image: url(../img/logo-word.png); mask-image: url(../img/logo-word.png); }
.brand { gap: 10px; }
footer .small-brand .logo-mark { height: 26px; }
footer .small-brand .logo-word { height: 14px; }
@media (max-width: 480px) { header.top .logo-mark { height: 28px; } header.top .logo-word { height: 14px; } }

.side-head { flex-direction: column; align-items: flex-start; gap: 10px; }
.side-head .brand { gap: 8px; }
.side-head .logo-mark { height: 30px; }
.side-head .logo-word { height: 15px; }
@media (max-width: 900px) { .side-head { flex-direction: row; align-items: center; } .side-head .logo-word { height: 13px; } }

/* Preloader shows the full logo on its own burgundy, as in the original artwork. */
html.preload .preloader { background: radial-gradient(110% 80% at 50% 40%, #2A0D17, var(--logo-bg) 70%); }
.preloader .logo-mark, .preloader .logo-word { background: var(--logo-gold); height: auto; }
.preloader .logo-mark { width: min(260px, 62vw); animation: pr-rise .8s cubic-bezier(.2,.7,.2,1) both; }
.preloader .logo-word { width: min(320px, 76vw); }
.preloader-word { animation: pr-rise .8s cubic-bezier(.2,.7,.2,1) .12s both; }
.preloader-tagline { color: rgba(233, 202, 161, .7); margin-top: -4px; }
.preloader-bar { background: rgba(233, 202, 161, .18); }
.preloader-bar span { background: var(--logo-gold); }

/* ---------- footer links ---------- */
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- about ---------- */
.about { padding-bottom: 80px; }
.about-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding-block: 64px 28px; }
.about-mark { height: auto; width: min(220px, 60vw); margin-bottom: 8px; }
.about-hero .page-title { font-size: clamp(34px, 5vw, 58px); margin: 0; }
.about-body { max-width: 720px; font-size: 18px; line-height: 1.75; }
.about-body p { margin: 0 0 22px; }
.about-body i { font-family: var(--display); font-size: 1.08em; color: var(--brass); }
.about-lead { font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; color: var(--ink); text-wrap: balance; }
.about-quote { margin: 44px 0 36px; padding: 28px 0; border-block: 1px solid var(--line); text-align: center; }
.about-quote p { font-family: var(--display); font-style: italic; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0 0 8px; color: var(--brass); }
.about-quote footer { border: 0; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.about-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; padding-block: 56px 80px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 36px 60px; } }
.contact-intro .page-title { font-size: clamp(34px, 4.5vw, 54px); }
.contact-details { margin: 28px 0 0; display: grid; gap: 16px; }
.contact-details div { border-top: 1px solid var(--line); padding-top: 12px; }
.contact-details dd { margin: 4px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.contact-details a { color: var(--brass); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sent-panel { justify-items: start; }
.sent-panel h2 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 6px 0 0; }

/* ---------- verify (OTP) ---------- */
.otp-input { font-size: 28px; letter-spacing: .4em; text-align: center; padding: 12px; }
.resend-row { margin-top: 14px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.linklike { background: none; border: 0; padding: 0; color: var(--brass); text-decoration: underline; cursor: pointer; font-size: 13px; font-weight: 600; }

/* ---------- admin messages ---------- */
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li { border-bottom: 1px solid var(--line); }
.inbox li:last-child { border-bottom: 0; }
.inbox a { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; text-decoration: none; }
.inbox a:hover { background: var(--bg); }
.inbox .who, .inbox .what { display: grid; min-width: 0; line-height: 1.35; }
.inbox small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .what b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox li.unread { box-shadow: inset 3px 0 0 var(--brass); }
.inbox li.unread .who b, .inbox li.unread .what b { font-weight: 800; }
@media (max-width: 700px) { .inbox a { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.msg-from { display: flex; gap: 12px; align-items: center; }
.msg-body { white-space: normal; font-size: 15px; line-height: 1.7; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-wrap: anywhere; }

/* ---------- terms of sale ---------- */
.legal { max-width: 820px; padding-block: 48px 80px; }
.legal-head { margin-bottom: 28px; }
.legal-head .page-title { font-size: clamp(34px, 4.5vw, 54px); margin-bottom: 4px; }
.legal-toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; margin-bottom: 36px; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2 220px; column-gap: 28px; font-size: 14px; }
.legal-toc li { margin: 0 0 6px; break-inside: avoid; }
.legal-toc a { color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--ink); text-decoration: underline; }
.legal section { scroll-margin-top: 90px; padding-top: 6px; }
.legal h2 { font-family: var(--display); font-weight: 500; font-size: 24px; margin: 30px 0 10px; }
.legal p, .legal li { line-height: 1.75; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal a { color: var(--brass); }

/* checkout agreement */
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.agree a { color: var(--brass); }

/* empty showroom */
.showroom-empty { display: grid; justify-items: center; gap: 6px; padding: 56px 16px; }
.showroom-empty .logo-mark { height: 56px; margin-bottom: 10px; }
.showroom-title { font-family: var(--display); font-size: 28px; color: var(--ink); margin: 0; }
.showroom-empty p { margin: 0; max-width: 46ch; }
.showroom-empty a { color: var(--brass); }

/* 404 */
.not-found { padding-block: 90px 110px; text-align: center; }
.not-found .page-title { margin: 6px 0; }
.foot-copy { font-size: 12px; color: var(--muted); }

/* ---------- server check ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks li > span:last-child { display: grid; min-width: 0; }
.checks small { color: var(--muted); overflow-wrap: anywhere; }
.check-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; margin-top: 1px; }
.check-ok .check-icon { background: var(--ok-bg); color: var(--ok); }
.check-warn .check-icon { background: var(--warn-bg); color: var(--warn); }
.check-fail .check-icon { background: var(--err-bg); color: var(--err); }
b.check-ok { color: var(--ok); } b.check-warn { color: var(--warn); } b.check-fail { color: var(--err); }
