/* Scuderia Vangala Collection.
   "Gallery" aesthetic: Scandinavian minimalism with cues from modern art galleries and
   watchmakers. Light mode is gallery white (expansive whitespace, hairline rules, ink type);
   dark mode is uniform darkspace with infotainment-style modules. Apple HIG foundations:
   SF type, 44 pt targets, 4.5:1 text contrast. All colours are tokens; never hard-code one. */

:root {
  /* Surfaces */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --module-bg: #FAFAF8;      /* instrument modules, detail panels */
  --module-hi: transparent;  /* top highlight on modules (dark only) */
  --sidebar: #FFFFFF;
  --fill: rgba(15,15,16,0.045);
  --placeholder-bg: #F2F2F0;
  /* Text (all ≥4.5:1 on --bg and --module-bg) */
  --label: #0F0F10;
  --label-2: #66666A;        /* 5.6:1 on white */
  --label-3: #A3A3A7;        /* icons and decoration only */
  --separator: #E3E3E0;
  --separator-light: #EEEEEB;
  /* Brand */
  --accent: #0F0F10;         /* ink: actions are monochrome */
  --accent-hover: #3A3A3D;
  --accent-tint: rgba(15,15,16,0.06);
  --on-accent: #FFFFFF;
  --gold: #8A7553;           /* champagne detail: hairlines, active marker */
  --brand-ink: #111111;      /* logo lettering: black, as in the artwork */
  --btn-primary: #0F0F10;
  --btn-primary-hover: #2E2E31;
  /* Status */
  --red: #B3261E;
  --green: #2E6B4F;
  --orange: #8A5A12;
  --blue: #2D4F7C;
  --grey: #66666A;
  --orange-tint: #FBF3E6;
  --tint-rose: #FBECEB;
  --chip-bg: rgba(255,255,255,0.88);   /* frosted label on photos */
  --chip-collection-fg: var(--green);
  --chip-service-fg: var(--orange);
  --chip-for_sale-fg: var(--blue);
  --chip-sold-fg: var(--grey);
  /* Misc */
  --shadow: none;
  --shadow-lift: 0 22px 48px -24px rgba(15,15,16,0.28);
  --overlay: rgba(15,15,16,0.30);
  --viewer-bg: #0B0B0C;      /* photo viewer: darkspace in both themes */
  --viewer-fg: #F2F2F0;
  --viewer-fg-2: #A9A9AE;
  --seg-on: #FFFFFF;
  --toast-bg: rgba(15,15,16,0.94);
  --floor: rgba(15,15,16,0.07);
  --photo-shade: rgba(15,15,16,0.04);
  --radius: 4px;
  --radius-lg: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

/* Dark palette: uniform darkspace. theme.js sets data-theme before first paint. */
:root[data-theme="dark"] {
  --bg: #0A0A0B;
  --surface: #0A0A0B;
  --module-bg: #121214;
  --module-hi: rgba(255,255,255,0.05);
  --sidebar: #0A0A0B;
  --fill: rgba(255,255,255,0.06);
  --placeholder-bg: #17171A;
  --label: #F4F4F5;          /* 18:1 */
  --label-2: #9C9CA2;        /* 7:1 */
  --label-3: #5E5E64;
  --separator: #232326;
  --separator-light: #19191C;
  --accent: #F4F4F5;
  --accent-hover: #FFFFFF;
  --accent-tint: rgba(255,255,255,0.08);
  --on-accent: #0A0A0B;
  --gold: #C9B48A;
  --brand-ink: #FFFFFF;      /* logo lettering: white, as in the dark artwork */
  --btn-primary: #F4F4F5;
  --btn-primary-hover: #FFFFFF;
  --red: #FF8A80;
  --green: #7FD1A4;
  --orange: #F2B66D;
  --blue: #9DB8E8;
  --grey: #A9A9AF;
  --orange-tint: rgba(242,182,109,0.10);
  --tint-rose: rgba(255,138,128,0.12);
  --chip-bg: rgba(10,10,11,0.74);
  --shadow: none;
  --shadow-lift: 0 22px 48px -20px rgba(0,0,0,0.8);
  --overlay: rgba(0,0,0,0.62);
  --viewer-bg: #050506;
  --viewer-fg: #F2F2F0;
  --viewer-fg-2: #A9A9AE;
  --seg-on: #232326;
  --toast-bg: #232326;
  --floor: rgba(255,255,255,0.05);
  --photo-shade: rgba(0,0,0,0.0);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}
[hidden] { display: none !important; }
/* Roles: guests get a read-only showroom (the server also withholds private data). */
[data-role="guest"] .owner-only { display: none !important; }
:root:not([data-role="guest"]) .guest-only { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.bold { stroke-width: 2; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { color: var(--red); font-size: 15px; }
.error.banner { background: var(--tint-rose); padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-tint); }

/* Small tracked capitals: the house label style */
.eyebrow, .count-label, .section-title, .stat .k, .kpi .k, .module-title, .sidebar-heading, .card-year, .rail-year {
  font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--label-2);
}

/* ---------- Brand ---------- */
/* Lockup = colour SV mark + the logo's own lettering + "COLLECTION".
   The lettering is the real artwork (brand/wordmark.png) used as a mask, so it takes the
   theme's ink colour; "COLLECTION" is Michroma, slanted and stretched to the same width. */
@font-face {
  font-family: "SV Display"; src: url("fonts/michroma.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
.sv-lockup { display: flex; flex-direction: column; align-items: center; width: var(--lockup-w, 260px); }
.sv-mark { display: block; height: auto; }
.sv-lockup .sv-mark { width: 84%; margin-bottom: 9%; }
.sv-wordmark {
  display: block; width: 100%; aspect-ratio: 1400 / 314; background-color: var(--brand-ink);
  -webkit-mask: url("brand/wordmark.png") center / contain no-repeat;
  mask: url("brand/wordmark.png") center / contain no-repeat;
}
.sv-collection { display: block; width: 100%; height: auto; margin-top: 5.5%; overflow: visible; }
.sv-collection text {
  font-family: "SV Display", var(--font); font-size: 80px; fill: var(--brand-ink);
  transform: skewX(-12deg); transform-box: fill-box; transform-origin: center;
}
.sv-lockup-xl { --lockup-w: min(280px, 74vw); }
.sv-lockup-side { --lockup-w: 152px; }
.sv-lockup-side .sv-mark { width: 70%; margin-bottom: 11%; }
.sv-mark-bar { width: 58px; }
.sv-mark-empty { width: 120px; opacity: 0.9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--btn-primary); color: var(--on-accent); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-tinted { background: transparent; color: var(--label); border-color: var(--separator); }
.btn-tinted:hover { border-color: var(--label); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 8px; border: 0; background: none; border-radius: var(--radius);
  color: var(--label); font-size: 15px;
}
.link-btn:hover { color: var(--label-2); }
.link-btn.strong { font-weight: 600; }
.link-btn svg { width: 18px; height: 18px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--label);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 22px; height: 22px; }

/* Light/dark toggle: outlined half moon in light mode, filled moon in dark mode */
.theme-toggle { color: var(--label-2); }
.theme-toggle:hover { color: var(--label); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { fill: transparent; transition: fill 0.2s ease; }
.theme-toggle[aria-pressed="true"] { color: var(--gold); }
.theme-toggle[aria-pressed="true"] .moon { fill: currentColor; }
.login-theme { position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.mobile-bar-right { display: flex; gap: 0; }

/* ---------- Inputs ---------- */
.field {
  width: 100%; min-height: 50px; padding: 12px 4px;
  border: 0; border-bottom: 1px solid var(--separator); border-radius: 0;
  background: transparent; font-size: 17px; letter-spacing: 0.02em;
  transition: border-color 0.2s ease;
}
.field:focus { outline: none; border-bottom-color: var(--label); }
.field::placeholder, input::placeholder, textarea::placeholder { color: var(--label-2); opacity: 1; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--bg);
}
.login-card {
  width: 100%; max-width: 340px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.login-brand { margin-bottom: 20px; }
.login-fields { width: 100%; display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.login-fields .field { text-align: center; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 36px 20px 22px; background: var(--sidebar); border-right: 1px solid var(--separator);
  overflow-y: auto;
}
.brand { display: flex; justify-content: center; padding: 4px 0 34px; margin-bottom: 14px; border-bottom: 1px solid var(--separator-light); }
.sidebar-heading { padding: 10px 14px 10px; }
.side-filters { display: flex; flex-direction: column; gap: 0; }
.side-filter {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 0; background: transparent; font-size: 15px; font-weight: 400; text-align: left;
  color: var(--label-2); transition: color 0.15s ease;
}
.side-filter::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0;
  background: var(--label); transform: translateY(-50%); transition: height 0.2s ease;
}
.side-filter:hover { color: var(--label); }
.side-filter[aria-current="true"] { color: var(--label); font-weight: 500; }
.side-filter[aria-current="true"]::before { height: 20px; }
.side-filter .label { flex: 1; }
.side-filter .count { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.side-filter.attention .count { color: var(--orange); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--separator-light); display: flex; flex-direction: column; gap: 0; }
.side-action {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 0; background: transparent; font-size: 14px; color: var(--label-2); text-align: left;
}
.side-action:hover { color: var(--label); }
.side-action svg { width: 17px; height: 17px; color: currentColor; }

.main {
  flex: 1; min-width: 0;
  padding: 56px clamp(28px, 4.5vw, 72px) 80px;
  display: flex; flex-direction: column; gap: 44px;
}
.mobile-bar { display: none; }
.chips { display: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.title-block { flex: 1 0 100%; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.title-block h1 {
  font-family: var(--display); font-size: clamp(40px, 4.4vw, 60px); font-weight: 200;
  letter-spacing: -0.025em; line-height: 1.02;
}
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; width: 300px; max-width: 100%;
  padding: 0 4px; border-radius: 0; background: transparent; color: var(--label-2);
  border-bottom: 1px solid var(--separator);
  transition: border-color 0.2s ease;
}
.search:focus-within { border-bottom-color: var(--label); }
.search svg { width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--label); }
.sort {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px;
  border-bottom: 1px solid var(--separator); font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--label-2);
}
.sort select {
  height: 40px; border: 0; background: transparent; font-size: 15px; letter-spacing: 0; text-transform: none;
  color: var(--label); outline: none; cursor: pointer;
}
.toolbar .btn { height: 44px; margin-left: auto; }
.app[data-view="table"] .sort, .app[data-view="showroom"] .sort { display: none; }

/* ---------- Instrument cluster (summary) ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--separator); border: 1px solid var(--separator); border-radius: var(--radius-lg); overflow: hidden; }
.stat {
  position: relative; padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 10px;
  background: var(--module-bg); box-shadow: inset 0 1px 0 var(--module-hi); min-width: 0;
}
.stat .v {
  font-family: var(--display); font-size: clamp(24px, 2.2vw, 34px); font-weight: 200; letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1;
}
.stat .sub { font-size: 12px; color: var(--label-2); letter-spacing: 0.02em; line-height: 1.4; }
.stat .v.pos, .stat .sub.pos { color: var(--green); }
.stat .v.neg, .stat .sub.neg { color: var(--red); }
.stat .v.warn { color: var(--orange); }
.meter { display: block; height: 2px; margin-top: 2px; background: var(--separator); border-radius: 1px; overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--label); transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.meter-fill.pos { background: var(--green); }
.meter-fill.neg { background: var(--red); }
.stat-button { border: 0; text-align: left; font: inherit; color: inherit; transition: background-color 0.2s ease; }
.stat-button:hover { background: var(--fill); }
.stat-button .sub::after { content: " →"; }

/* ---------- Spotlight: side-scrolling gallery rail ---------- */
.spotlight { display: flex; flex-direction: column; gap: 18px; margin-right: calc(-1 * clamp(28px, 4.5vw, 72px)); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: clamp(28px, 4.5vw, 72px); }
.rail-nav { display: flex; gap: 6px; }
.rail-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--separator); background: transparent;
  color: var(--label); display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.rail-btn:hover { border-color: var(--label); }
.rail-btn:disabled { opacity: 0.3; cursor: default; border-color: var(--separator); }
.rail-btn svg { width: 16px; height: 16px; }
.rail {
  list-style: none; margin: 0; padding: 0 clamp(28px, 4.5vw, 72px) 6px 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(300px, 34vw, 520px); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; }
.rail-card {
  width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit;
  display: flex; flex-direction: column; gap: 16px;
}
.rail-photo {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10; background: var(--placeholder-bg); color: var(--label-3); border-radius: 2px;
}
.rail-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.rail-card:hover .rail-photo img { transform: scale(1.035); }
.rail-photo > svg { width: 56px; height: 56px; stroke-width: 1; }
.rail-caption { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 4px 16px; }
.rail-index { grid-row: span 2; font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--label-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.rail-year { grid-column: 2; }
.rail-value { grid-column: 3; grid-row: 1 / span 2; align-self: end; font-family: var(--display); font-size: 17px; font-weight: 300; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail-title { grid-column: 2; font-family: var(--display); font-size: 21px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.rail-title .model { color: var(--label-2); font-weight: 300; }

/* ---------- View switch ---------- */
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: -18px; padding-top: 4px; border-top: 1px solid var(--separator-light); padding-top: 26px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.segmented button {
  width: 44px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--label-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segmented button:hover { color: var(--label); }
.segmented button[aria-pressed="true"] { background: var(--seg-on); color: var(--label); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.segmented svg { width: 17px; height: 17px; }
.segmented .dash { stroke-dasharray: 2 2.5; }

/* ---------- Web photo badge (globe = downloaded from the web) ---------- */
.card-photo, .thumb-img, .hero, .photo-preview, .slot-photo, .rail-photo { position: relative; overflow: hidden; }
.web-badge {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,11,0.5); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none;
}
.web-badge svg { width: 14px; height: 14px; stroke-width: 1.5; }
.thumb-img .web-badge { right: 2px; bottom: 2px; width: 14px; height: 14px; }
.thumb-img .web-badge svg { width: 9px; height: 9px; stroke-width: 2; }
.photo-preview .web-badge { right: 4px; bottom: 4px; width: 18px; height: 18px; }
.photo-preview .web-badge svg { width: 11px; height: 11px; }
.hero .web-badge { right: 18px; bottom: 18px; width: 30px; height: 30px; }
.hero .web-badge svg { width: 17px; height: 17px; }

/* ---------- Index cards (gallery frames) ---------- */
.vehicles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 48px 32px;
}
.card {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; gap: 18px; padding: 0; border: 0; border-radius: 0;
  background: none; text-align: left; color: inherit;
}
.card-photo {
  aspect-ratio: 4 / 3; width: 100%; background: var(--placeholder-bg); border-radius: 2px;
  display: flex; align-items: center; justify-content: center; color: var(--label-3);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-photo img { transform: scale(1.035); }
.card-photo > svg { width: 48px; height: 48px; stroke-width: 1; }
.card .chip { position: absolute; top: 12px; left: 12px; z-index: 1; }
.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card-title { font-family: var(--display); font-size: 20px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-sub { font-size: 14px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 14px;
  font-size: 13px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--separator-light);
}
.card-body .card-meta { margin-top: 10px; }
.card-meta .miles { color: var(--label-2); letter-spacing: 0.02em; }
.card-meta .value { font-family: var(--display); font-weight: 300; font-size: 17px; }
.card-alert { font-size: 13px; color: var(--orange); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card-alert svg { width: 14px; height: 14px; stroke-width: 2; }
.chevron { display: none; }
.desktop-hide { display: none; }

/* Status label: dot + small caps; frosted when it sits on a photo */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; line-height: 1.3;
  background: var(--fill); color: var(--label);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.card .chip, .hero .chip { background: var(--chip-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.chip-collection::before { background: var(--chip-collection-fg); }
.chip-service::before    { background: var(--chip-service-fg); }
.chip-for_sale::before   { background: var(--chip-for_sale-fg); }
.chip-sold::before       { background: var(--chip-sold-fg); }

.empty { text-align: center; padding: 88px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { font-family: var(--display); font-size: 30px; font-weight: 200; letter-spacing: -0.01em; }
.empty .btn { margin-top: 12px; }

/* ---------- Table view ---------- */
.table-wrap { border-top: 1px solid var(--separator); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vtable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.vtable th {
  padding: 0; text-align: left; white-space: nowrap;
  font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--label-2);
  border-bottom: 1px solid var(--separator);
}
.vtable th.num { text-align: right; }
.th-btn {
  display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 48px;
  border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.vtable th.num .th-btn { justify-content: flex-end; }
.th-btn:hover { color: var(--label); }
.vtable th[aria-sort="ascending"], .vtable th[aria-sort="descending"] { color: var(--label); }
.sort-ind { width: 11px; height: 11px; stroke-width: 2.2; opacity: 0; transition: transform 0.15s ease; }
.th-btn:hover .sort-ind { opacity: 0.35; }
.vtable th[aria-sort="ascending"] .sort-ind, .vtable th[aria-sort="descending"] .sort-ind { opacity: 1; }
.vtable th[aria-sort="descending"] .sort-ind { transform: rotate(180deg); }
.vtable td { border-bottom: 1px solid var(--separator-light); white-space: nowrap; vertical-align: middle; padding-top: 14px; padding-bottom: 14px; }
.vtable td, .vtable .th-btn { padding-left: 10px; padding-right: 10px; }
.vtable td:first-child { padding-left: 0; }
.vtable td.num { text-align: right; }
.vtable tbody tr { cursor: pointer; transition: background-color 0.15s ease; }
.vtable tbody tr:hover td { background: var(--fill); }
.vtable tfoot td { border-top: 1px solid var(--separator); border-bottom: 0; font-weight: 500; padding-top: 18px; padding-bottom: 18px; }
.vtable tfoot td.num { font-family: var(--display); font-size: 16px; font-weight: 300; }
.vtable .thumb { width: 76px; padding-right: 0; }
.thumb-img {
  width: 64px; height: 44px; border-radius: 2px; background: var(--placeholder-bg);
  display: flex; align-items: center; justify-content: center; color: var(--label-3);
}
.thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-img > svg { width: 20px; height: 20px; stroke-width: 1.2; }
.row-link { border: 0; background: none; padding: 0; font-family: var(--display); font-size: 15px; font-weight: 500; color: var(--label); text-align: left; cursor: pointer; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.vtable td.model { white-space: normal; min-width: 150px; }
.vtable .variant { display: block; max-width: 220px; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtable td.loc span { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.vtable .pos { color: var(--green); }
.vtable .neg { color: var(--red); }
.vtable .chip { background: transparent; padding-left: 0; }
.warn-ic { display: inline-flex; margin-left: 6px; color: var(--orange); vertical-align: -2px; }
.warn-ic svg { width: 14px; height: 14px; stroke-width: 2; }

/* ---------- Showroom (CSS 3D carousel, no libraries) ---------- */
.showroom {
  --slot-w: 340px;
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: radial-gradient(ellipse 70% 60% at 50% 30%, var(--module-bg), var(--bg) 80%);
  border: 1px solid var(--separator-light);
  padding: 40px 0 28px;
  user-select: none; -webkit-user-select: none;
}
.stage {
  position: relative; height: calc(var(--slot-w) * 0.86 + 40px);
  perspective: 1600px; perspective-origin: 50% 35%;
  touch-action: pan-y; cursor: grab;
}
.stage:active { cursor: grabbing; }
.stage:focus-visible { outline-offset: -4px; }
.ring {
  position: absolute; left: 50%; top: 14px; width: var(--slot-w); margin-left: calc(var(--slot-w) / -2);
  transform-style: preserve-3d; will-change: transform;
}
.slot {
  position: absolute; left: 0; top: 0; width: var(--slot-w); padding: 0; border: 0; background: none;
  transform-style: preserve-3d; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: inherit; text-align: center;
}
.slot-photo {
  width: 100%; aspect-ratio: 3 / 2; border-radius: 2px; background: var(--placeholder-bg);
  display: flex; align-items: center; justify-content: center; color: var(--label-3);
  box-shadow: 0 30px 50px -24px rgba(0,0,0,0.45);
  -webkit-box-reflect: below 6px linear-gradient(transparent 66%, rgba(255,255,255,0.16));
}
.slot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.slot-photo > svg { width: 56px; height: 56px; stroke-width: 1; }
.floor {
  position: absolute; left: 10%; right: 10%; bottom: 0; height: 60px;
  background: radial-gradient(ellipse at center, var(--floor), transparent 70%);
  pointer-events: none;
}
.showroom-bar { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 12px 16px 0; }
.spin-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--separator);
  background: transparent; color: var(--label); display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease;
}
.spin-btn:hover { border-color: var(--label); }
.spin-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }
.showroom-now { min-width: 0; flex: 0 1 380px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.showroom-now .sr-year { font-size: 11px; font-weight: 500; letter-spacing: 0.26em; color: var(--label-2); }
.showroom-now .sr-title {
  font-family: var(--display); font-size: 26px; font-weight: 300; line-height: 1.2; letter-spacing: -0.01em;
  border: 0; background: none; padding: 0; color: var(--label);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.showroom-now .sr-title:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.showroom-now .sr-sub { font-size: 13px; color: var(--label-2); }
.showroom-hint { text-align: center; font-size: 11px; color: var(--label-2); margin-top: 14px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Sheets (dialogs) ---------- */
dialog { color: var(--label); }
dialog::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { padding: 0; border: 0; background: var(--bg); max-width: none; max-height: none; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 56px; padding: 4px 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--separator-light);
}
.sheet-bar > :first-child { justify-self: start; }
.sheet-bar > :last-child { justify-self: end; }
.sheet-bar h2 { font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; text-align: center; }
.sheet-detail .sheet-bar { grid-template-columns: 1fr 1fr; position: absolute; left: 0; right: 0; border-bottom-color: transparent; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-detail .sheet-bar .link-btn {
  min-height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  background: var(--chip-bg); color: var(--label); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.sheet-detail .sheet-bar { transition: background-color 0.25s ease, border-color 0.25s ease; }
.sheet-detail.scrolled .sheet-bar {
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom-color: var(--separator-light);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
.sheet-detail.scrolled .sheet-bar .link-btn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-body { flex: 1; overflow-y: auto; padding: 24px 26px 48px; -webkit-overflow-scrolling: touch; }

.sheet-detail {
  margin: 0 0 0 auto; height: 100vh; height: 100dvh; width: min(1040px, 100vw);
  box-shadow: -30px 0 80px rgba(0,0,0,0.18);
}
.sheet-detail[open] { animation: slide-in 0.4s cubic-bezier(.2,.8,.2,1); }
#detailBody { padding: 0 0 56px; }
.sheet-form {
  width: min(680px, calc(100vw - 32px)); height: min(880px, calc(100vh - 48px));
  border-radius: var(--radius-lg); box-shadow: 0 40px 100px rgba(0,0,0,0.25);
}
.sheet-form[open] { animation: rise 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes slide-in { from { transform: translateX(56px); opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Detail (drill-down) ---------- */
.hero {
  aspect-ratio: 16 / 9; max-height: 62vh; width: 100%;
  background: var(--placeholder-bg); display: flex; align-items: center; justify-content: center; color: var(--label-3);
}
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero > svg { width: 72px; height: 72px; stroke-width: 1; }
.detail-inner { padding: 0 clamp(20px, 4vw, 56px); display: flex; flex-direction: column; }
.photo-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
  min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--separator);
  background: transparent; color: var(--label); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: border-color 0.2s ease;
}
.pill-btn:hover { border-color: var(--label); }
.pill-btn.danger { color: var(--red); }
.pill-btn.danger:hover { border-color: var(--red); }
.pill-btn svg { width: 14px; height: 14px; }
.pill-btn:disabled { opacity: 0.5; cursor: progress; }
.photo-credit { font-size: 12px; color: var(--label-2); display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; max-width: 520px; }
.photo-credit svg { width: 13px; height: 13px; margin-top: 2px; }
.photo-credit a { color: var(--label-2); text-decoration: underline; text-underline-offset: 2px; }
.detail-head { margin: 40px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.detail-head h1 { font-family: var(--display); font-size: clamp(34px, 4vw, 52px); font-weight: 200; letter-spacing: -0.025em; line-height: 1.04; }
.detail-head .sub { color: var(--label-2); font-size: 16px; font-weight: 300; letter-spacing: 0.01em; }
.detail-head .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.alert-banner {
  margin: 20px 0 0; padding: 14px 18px; border-radius: var(--radius);
  background: var(--orange-tint); color: var(--orange); font-size: 14px; font-weight: 500;
  display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--orange);
}
.kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 30px;
  background: var(--separator); border: 1px solid var(--separator); border-radius: var(--radius-lg); overflow: hidden;
}
.kpi { padding: 20px 22px; background: var(--module-bg); box-shadow: inset 0 1px 0 var(--module-hi); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kpi .v { font-family: var(--display); font-size: clamp(22px, 2.4vw, 32px); font-weight: 200; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.kpi .v.pos { color: var(--green); }
.kpi .v.neg { color: var(--red); }
.kpi .sub { font-size: 12px; color: var(--label-2); line-height: 1.4; }
.kpi .sub.pos { color: var(--green); }
.kpi .sub.neg { color: var(--red); }
.kpi-total { background: var(--label); box-shadow: none; }
.kpi-total .k, .kpi-total .sub { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.kpi-total .v { color: var(--bg); font-weight: 300; }

.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; gap: 16px; margin-top: 16px; }
.module {
  border: 1px solid var(--separator); border-radius: var(--radius-lg); background: var(--module-bg);
  box-shadow: inset 0 1px 0 var(--module-hi); overflow: hidden; display: flex; flex-direction: column;
}
.module-wide { margin-top: 16px; }
.module-title {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--separator-light);
}
.module-title .link-btn { min-height: 36px; font-size: 13px; text-transform: none; letter-spacing: 0.02em; padding: 0; font-weight: 500; color: var(--label); }
.group { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 13px 20px; min-height: 46px; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--separator-light); }
.kv .k { color: var(--label-2); flex-shrink: 0; font-size: 14px; }
.kv .v { text-align: right; overflow-wrap: anywhere; }
.kv.block { flex-direction: column; gap: 6px; }
.kv.block .v { text-align: left; white-space: pre-wrap; line-height: 1.55; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; letter-spacing: 0.08em; }
.group-empty { padding: 18px 20px; color: var(--label-2); font-size: 14px; }

.svc { padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; align-items: start; }
.att-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att {
  display: inline-flex; align-items: center; max-width: 100%; border: 1px solid var(--separator); border-radius: var(--radius);
  background: var(--bg); font-size: 13px;
}
.att a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 10px; color: var(--label); min-width: 0; }
.att a:hover .att-name { text-decoration: underline; text-underline-offset: 2px; }
.att a svg { width: 16px; height: 16px; color: var(--label-2); }
.att-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.att-x { width: 32px; height: 36px; border: 0; background: none; color: var(--label-2); display: inline-flex; align-items: center; justify-content: center; }
.att-x:hover { color: var(--red); }
.att-x svg { width: 14px; height: 14px; }
.svc-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--label-2);
}
.mini-btn:hover { color: var(--label); }
.mini-btn.danger:hover { color: var(--red); }
.mini-btn svg { width: 14px; height: 14px; }
.form-note { font-size: 12px; color: var(--label-2); letter-spacing: 0.01em; text-transform: none; }
.svc + .svc { border-top: 1px solid var(--separator-light); }
.svc .t { font-size: 15px; }
.svc .m { font-size: 12px; color: var(--label-2); grid-column: 1; letter-spacing: 0.02em; }
.svc .c { font-size: 15px; font-weight: 300; font-family: var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.svc .del { grid-column: 2; grid-row: 2; justify-self: end; border: 0; background: none; color: var(--red); font-size: 12px; padding: 4px 0; min-height: 28px; }
.svc-form { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--separator-light); }
.svc-form .wide { grid-column: 1 / -1; }
.svc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--label-2); }
.svc-form input, .svc-form select, .svc-form textarea { min-height: 44px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--separator); border-radius: 0; background: transparent; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--label); width: 100%; }
.svc-form input:focus, .svc-form select:focus, .svc-form textarea:focus { outline: none; border-bottom-color: var(--label); }
.svc-form .actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.danger-zone { margin-top: 40px; display: flex; justify-content: center; }
.danger-zone .btn { background: transparent; color: var(--red); border-color: var(--separator); }
.danger-zone .btn:hover { border-color: var(--red); }

/* ---------- Editor form ---------- */
.photo-pick { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.guest-badge { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--separator); border-radius: var(--radius); font-size: 12px; line-height: 1.45; color: var(--label-2); }
.action-note { margin: 0; padding: 14px 16px; font-size: 13px; color: var(--label-2); text-align: center; }

/* Road status: MOT and road tax at a glance (car page + card marks). Colour only when it matters. */
.road-status { margin: 22px 0 16px; }
.rs-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rs-tile { position: relative; padding: 18px 20px 16px; border: 1px solid var(--separator); border-radius: var(--radius); background: var(--module-bg); overflow: hidden; }
.rs-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rs-colour, var(--label-3)); }
.rs-k { font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--label-2); }
.rs-status { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--rs-text, var(--label)); }
.rs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rs-colour, var(--label-3)); flex-shrink: 0; }
.rs-date { margin-top: 4px; font-family: var(--display); font-weight: 300; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.01em; line-height: 1.15; }
.rs-sub { margin-top: 2px; font-size: 13px; color: var(--label-2); }
.rs-ok { --rs-colour: var(--green); }
.rs-soon { --rs-colour: var(--orange); --rs-text: var(--orange); }
.rs-bad { --rs-colour: var(--red); --rs-text: var(--red); }
.rs-soon.rs-tile { background: color-mix(in srgb, var(--orange) 7%, var(--module-bg)); }
.rs-bad.rs-tile { background: color-mix(in srgb, var(--red) 7%, var(--module-bg)); }
.rs-none { --rs-colour: var(--label-3); --rs-text: var(--label-2); }
.rs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; font-size: 12px; color: var(--label-2); letter-spacing: 0.02em; }
.rs-foot .mini-btn { margin-left: auto; }
.rs-error { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); }
.rs-error svg { width: 13px; height: 13px; }
.rs-marks { display: flex; gap: 12px; margin: 6px 0 2px; }
.rs-mark { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rs-text, var(--label-2)); }
.rs-mark.rs-ok { --rs-text: var(--label-2); }

/* Calendar links */
.cal-intro { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--label); }
.cal-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cal-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--separator); border-radius: var(--radius); background: var(--module-bg); }
.cal-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cal-name svg { width: 22px; height: 22px; color: var(--label-2); flex-shrink: 0; }
.cal-name > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.cal-actions .btn { min-height: 38px; padding: 0 14px; }
.cal-empty { padding: 14px 16px; border: 1px dashed var(--separator); border-radius: var(--radius); font-size: 14px; color: var(--label-2); }
.cal-form { display: flex; gap: 10px; margin-bottom: 22px; }
.cal-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--separator); border-radius: var(--radius); background: var(--bg); color: var(--label); font: inherit; font-size: 16px; }
.cal-form input:focus { outline: none; border-color: var(--label); }
.cal-help { font-size: 13px; line-height: 1.6; color: var(--label-2); border-top: 1px solid var(--separator-light); padding-top: 14px; }
.cal-help p { margin: 0 0 10px; }

/* Service invoices: editor queue */
.invoice-pick { margin-bottom: 28px; }
.queue-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.queue-list:empty { display: none; }
.queue-list li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--separator); border-radius: var(--radius); font-size: 14px; }
.queue-list li > svg { width: 16px; height: 16px; color: var(--label-2); flex-shrink: 0; }
.queue-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Service history overview + scan progress (detail) */
.title-actions { display: inline-flex; gap: 18px; }
.history-body { padding: 16px 20px 18px; }
.history-text { margin: 0; font-size: 16px; line-height: 1.65; max-width: 72ch; }
.history-meta { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.02em; color: var(--label-2); }
.history-stale { color: var(--orange); }
.history-empty { margin: 0; font-size: 14px; line-height: 1.55; color: var(--label-2); max-width: 72ch; }
.scan-box { margin-top: 16px; border: 1px solid var(--separator); border-radius: var(--radius); background: var(--bg); }
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 14px; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--separator-light); }
.scan-list { list-style: none; margin: 0; padding: 4px 0; }
.scan-list li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 14px; font-size: 13px; }
.scan-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label-2); }
.scan-state { text-align: right; flex-shrink: 0; max-width: 60%; }
.scan-pending .scan-state, .scan-uploading .scan-state { color: var(--label-2); }
.scan-done .scan-state { color: var(--green); }
.scan-duplicate .scan-state { color: var(--label-2); }
.scan-error .scan-state { color: var(--red); }

/* Work entry notes */
.svc-notes { grid-column: 1 / -1; margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--label); }
.svc-notes ul { margin: 0; padding-left: 18px; }
.svc-notes li + li { margin-top: 2px; }
.svc-warn { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--orange); }
.svc-warn svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; }

/* Gallery: labelled photo tiles (editor and detail) */
.gallery-pick { margin-bottom: 28px; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.gallery-head h3 { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--label-2); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.photos-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.photos-module .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px;
  border: 1px dashed var(--separator); background: transparent; color: var(--label-2); font: inherit; font-size: 13px;
}
.g-chip svg { width: 14px; height: 14px; }
.g-chip:hover { border-color: var(--label); color: var(--label); }
.g-chip.strong { border-style: solid; color: var(--label); }
.g-tile, .g-add {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; padding: 0;
  border: 1px solid var(--separator); background: var(--placeholder-bg); color: var(--label-2); font: inherit;
}
.g-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.g-tile { cursor: zoom-in; }
button.g-tile:hover img { transform: scale(1.03); }
.g-tile img { transition: transform 0.4s ease; }
.g-label {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 3px; font-size: 11px; letter-spacing: 0.06em;
  background: var(--chip-bg); color: var(--label); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.g-view {
  position: absolute; left: 6px; right: 40px; bottom: 6px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 3px;
  font: inherit; font-size: 12px; background: var(--chip-bg); color: var(--label); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.g-x {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--chip-bg); color: var(--label);
}
.g-x svg { width: 14px; height: 14px; }
.g-x:hover { color: var(--red); }
.g-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border-style: dashed; background: transparent; font-size: 13px; transition: border-color 0.2s ease, color 0.2s ease;
}
.g-add svg { width: 20px; height: 20px; }
.g-add:hover { border-color: var(--label); color: var(--label); }

/* Photo viewer */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--viewer-bg); color: var(--viewer-fg);
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: var(--viewer-bg); }
.lb-bar, .lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(16px, 3vw, 32px); min-height: 56px; }
.lb-bar .link-btn { color: var(--viewer-fg); min-height: 44px; }
.lb-bar .link-btn.danger { color: var(--viewer-fg-2); }
.lb-bar .link-btn.danger:hover { color: var(--red); }
.lb-actions { display: flex; gap: 18px; }
.lb-count, .lb-label { font-size: 13px; letter-spacing: 0.12em; color: var(--viewer-fg-2); font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 clamp(8px, 6vw, 88px); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--viewer-fg) 25%, transparent); background: transparent; color: var(--viewer-fg);
  display: flex; align-items: center; justify-content: center;
}
.lb-nav svg { width: 20px; height: 20px; }
.lb-nav:disabled { visibility: hidden; }
.lb-nav.prev { left: clamp(8px, 2vw, 24px); }
.lb-nav.next { right: clamp(8px, 2vw, 24px); }
.lb-view { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--viewer-fg-2); }
.lb-view select {
  min-height: 36px; padding: 0 10px; border-radius: 3px; font: inherit; font-size: 14px;
  background: transparent; color: var(--viewer-fg); border: 1px solid color-mix(in srgb, var(--viewer-fg) 25%, transparent);
}
.lb-view select option { color: initial; }

/* V5C scan card (editor) */
.v5-pick {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 16px 18px; margin-bottom: 22px; border: 1px solid var(--separator); border-radius: var(--radius);
  background: var(--module-bg);
}
.v5-mark {
  width: 52px; height: 40px; border-radius: 3px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--separator); background: var(--bg); position: relative; overflow: hidden;
}
.v5-mark span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--label-2); }
.v5-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.v5-text strong { font-weight: 500; font-size: 15px; }
.v5-text .small { line-height: 1.45; }
.v5-pick .btn { min-height: 38px; padding: 0 16px; white-space: nowrap; }
.v5-pick[data-state="reading"] .v5-mark::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--blue);
  animation: v5-scan 1.4s ease-in-out infinite alternate;
}
@keyframes v5-scan { from { top: 4px; } to { top: calc(100% - 6px); } }
.v5-pick[data-state="done"] { border-color: color-mix(in srgb, var(--blue) 45%, var(--separator)); }
.v5-pick[data-state="done"] .v5-mark span { color: var(--blue); }
.v5-pick[data-state="error"] { border-color: color-mix(in srgb, var(--red) 45%, var(--separator)); }
.v5-pick[data-state="error"] .v5-text strong { color: var(--red); }
.form-row.from-v5 > label { color: var(--blue); }
.form-row.from-v5 > label::after { content: ' · V5C'; font-size: 11px; letter-spacing: 0.06em; }

/* V5C record (detail page) */
.v5-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 20px; font-size: 13px; color: var(--label-2); border-bottom: 1px solid var(--separator-light); }
.v5-meta .svc-actions { grid-column: auto; margin: 0 0 0 auto; }
.v5-check { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); }
.v5-check svg { width: 14px; height: 14px; }
.v5-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1px; background: var(--separator-light); }
.v5-grid .kv { background: var(--module-bg); border-top: 1px solid var(--separator-light); }
.v5-code { display: inline-block; min-width: 30px; margin-right: 8px; font-size: 11px; letter-spacing: 0.04em; color: var(--label-2); font-variant-numeric: tabular-nums; }
.photo-pick-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.photo-preview {
  width: 120px; height: 80px; border-radius: 2px; background: var(--placeholder-bg);
  display: flex; align-items: center; justify-content: center; color: var(--label-3); flex-shrink: 0;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview > svg { width: 30px; height: 30px; stroke-width: 1.1; }
.photo-pick .btn { min-height: 38px; padding: 0 16px; }

.form-section { margin-bottom: 14px; }
.form-section > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 0 2px; font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--label-2);
}
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::after { content: "+"; font-size: 18px; font-weight: 300; line-height: 1; transition: transform 0.2s; color: var(--label-2); }
.form-section[open] > summary::after { transform: rotate(45deg); }
.form-section > summary .hint { text-transform: none; letter-spacing: 0.01em; font-weight: 400; font-size: 13px; color: var(--label-2); margin-left: auto; margin-right: 12px; }
.form-grid { border: 1px solid var(--separator); border-radius: var(--radius-lg); background: var(--module-bg); padding: 2px 18px; }
.form-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0; }
.form-row + .form-row { border-top: 1px solid var(--separator-light); }
.form-row > label { font-size: 15px; color: var(--label-2); }
.form-row > label .req { color: var(--label); margin-left: 2px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 0; background: transparent; padding: 8px 0; text-align: right; min-height: 40px; font-size: 16px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; }
.form-row:focus-within > label { color: var(--label); }
.form-row textarea { text-align: left; resize: vertical; min-height: 88px; line-height: 1.5; }
.form-row.block { grid-template-columns: 1fr; gap: 0; padding-top: 12px; }
.form-row select { text-align-last: right; -webkit-appearance: none; appearance: none; color: var(--label); cursor: pointer; }
.form-row .affix { display: flex; align-items: center; gap: 6px; }
.form-row .affix input { flex: 1; min-width: 0; }
.form-row .affix span { color: var(--label-2); font-size: 15px; }
.form-row .help { grid-column: 2; font-size: 12px; color: var(--label-2); margin-top: -6px; padding-bottom: 4px; text-align: right; }
.form-row.invalid > label { color: var(--red); }
.switch { position: relative; width: 51px; height: 31px; justify-self: end; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--separator); transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.2s; }
.switch input:checked + span { background: var(--label); }
.switch input:checked + span::after { transform: translateX(20px); }
:root[data-theme="dark"] .switch input:checked + span::after { background: var(--bg); }
.season-toggle { display: inline-flex; align-items: center; gap: 12px; justify-self: end; }
.season-opt { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--label-3); transition: color 0.2s ease; }
.season-opt svg { width: 15px; height: 15px; }
.season-toggle:not(:has(input:checked)) .season-opt.summer { color: var(--label); }
.season-toggle:has(input:checked) .season-opt.winter { color: var(--blue); }
.season-toggle .switch input:checked + span { background: var(--blue); }
.season-toggle .switch input:not(:checked) + span { background: var(--orange); }
.tyre-tag, .season-val { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label-2); }
.tyre-tag svg, .season-val svg { width: 15px; height: 15px; }
.tyre-tag.winter svg, .season-val.winter svg { color: var(--blue); }
.tyre-tag.summer svg, .season-val.summer svg { color: var(--orange); }
.switch input:focus-visible + span { outline: 1.5px solid var(--accent); outline-offset: 3px; }

/* ---------- Alert ---------- */
.alert {
  width: 300px; padding: 0; border: 0; border-radius: var(--radius-lg); text-align: center;
  background: color-mix(in srgb, var(--module-bg) 94%, transparent);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
}
.alert h2 { font-family: var(--display); font-size: 18px; font-weight: 400; padding: 24px 20px 6px; }
.alert p { font-size: 13px; padding: 0 20px 22px; color: var(--label-2); }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--separator); }
.alert-btn { min-height: 48px; border: 0; background: none; color: var(--label); font-size: 16px; }
.alert-btn + .alert-btn { border-left: 1px solid var(--separator); }
.alert-btn.destructive { color: var(--red); font-weight: 600; }

/* ---------- Action sheet ---------- */
.action-sheet {
  margin: auto auto 0; width: min(420px, 100vw); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border: 0; background: transparent;
}
.action-sheet[open] { display: flex; flex-direction: column; gap: 8px; animation: rise 0.2s ease; }
.action-group { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--module-bg) 94%, transparent); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.action-item {
  min-height: 56px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--label); font-size: 17px;
}
.action-group .action-item + .action-item { border-top: 1px solid var(--separator); }
.action-item.destructive { color: var(--red); }
.action-cancel { border-radius: 14px; background: var(--module-bg); font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 100; max-width: calc(100vw - 32px); padding: 12px 22px; border-radius: 999px;
  background: var(--toast-bg); color: #fff; font-size: 14px; letter-spacing: 0.01em; box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}
.toast.error { background: #A3213A; }
.toast { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.toast[popover] { inset: auto; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); margin: 0; border: 0; overflow: visible; width: max-content; }

/* =================================================================
   iPhone / narrow screens
   ================================================================= */
@media (max-width: 899px) {
  .sidebar, .desktop-only, .sort { display: none !important; }
  .main {
    padding: calc(4px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
    gap: 26px;
  }
  .mobile-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 2px 8px; }
  .mobile-bar > :last-child { justify-self: end; }
  .toolbar { padding: 8px 20px 0; gap: 16px; }
  .title-block { flex-basis: 100%; gap: 8px; }
  .title-block h1 { font-size: 38px; }
  .search { width: 100%; }
  .search input { font-size: 17px; }
  .chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px; scrollbar-width: none; margin-top: -8px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip-filter {
    flex-shrink: 0; height: 36px; padding: 0 16px; border-radius: 18px;
    border: 1px solid var(--separator); background: transparent; font-size: 14px; white-space: nowrap; color: var(--label-2);
  }
  .chip-filter[aria-pressed="true"] { border-color: var(--label); color: var(--label); font-weight: 500; }
  .chip-filter.attention { color: var(--orange); }

  .summary { margin: 0 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius-lg); }
  .stat { padding: 14px 10px 12px; align-items: center; text-align: center; gap: 4px; }
  .stat .v { font-size: 22px; order: -1; max-width: 100%; }
  .stat .k { font-size: 9px; letter-spacing: 0.16em; }
  .stat .sub, .stat .meter { display: none; }
  .stat.optional { display: none; }

  .spotlight { margin-right: 0; gap: 14px; }
  .section-head { padding: 0 20px; }
  .rail-nav { display: none; }
  .rail { grid-auto-columns: 80vw; gap: 16px; padding: 0 20px 4px; scroll-padding-left: 20px; }
  .rail-title { font-size: 18px; }
  .rail-value { font-size: 15px; }

  .view-bar { padding: 22px 16px 0 20px; margin: 0 0 -10px; }

  .vehicles { margin: 0 20px; display: block; border-top: 1px solid var(--separator-light); }
  .vehicles:empty { display: none; }
  .vehicles li { border-bottom: 1px solid var(--separator-light); }
  .card { flex-direction: row; align-items: center; gap: 14px; padding: 12px 0; min-height: 88px; }
  .card:hover .card-photo img { transform: none; }
  .card:hover .card-title { text-decoration: none; }
  .card:active { background: var(--fill); }
  .card-photo { width: 84px; height: 60px; aspect-ratio: auto; flex-shrink: 0; }
  .card-photo > svg { width: 26px; height: 26px; }
  .card-photo .web-badge { right: 3px; bottom: 3px; width: 16px; height: 16px; }
  .card-photo .web-badge svg { width: 10px; height: 10px; stroke-width: 2; }
  .card .chip { position: static; }
  .card-body { padding: 0; gap: 4px; }
  .card-year { display: none; }
  .desktop-hide { display: inline; }
  .card-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-sub { display: none; }
  .card-body .card-meta { margin-top: 0; padding-top: 0; border-top: 0; justify-content: flex-start; align-items: center; gap: 10px; }
  .card-meta .chip { display: inline-flex; background: transparent; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card-meta .miles { display: none; }
  .card-meta .value { font-family: var(--font); font-weight: 400; font-size: 13px; color: var(--label-2); }
  .chevron { display: block; width: 9px; height: 15px; color: var(--label-3); stroke-width: 1.8; }

  .table-wrap { margin: 0 20px; }
  .showroom { --slot-w: 230px; margin: 0 16px; padding-top: 24px; }
  .stage { perspective: 900px; }
  .showroom-now .sr-title { font-size: 20px; }
  .showroom-bar { gap: 14px; }

  .sheet-detail, .sheet-form {
    margin: 0; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none;
  }
  .sheet-form { padding-top: env(safe-area-inset-top); }
  .sheet-detail .sheet-bar { top: env(safe-area-inset-top); }
  .hero { aspect-ratio: 4 / 3; max-height: none; }
  .sheet-body { padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
  #detailBody { padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
  .detail-head { margin-top: 28px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road-status { margin: 16px 0 12px; }
  .rs-tiles { gap: 8px; }
  .rs-tile { padding: 14px 14px 12px; }
  .rs-date { font-size: 22px; }
  .rs-sub { font-size: 12px; }
  .gallery-grid, .photos-module .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photos-body { padding: 14px; }
  .g-chip { min-height: 40px; }
  .lb-nav { display: none; }
  .v5-grid { grid-template-columns: 1fr; }
  .v5-pick { grid-template-columns: auto 1fr; }
  .v5-pick .btn { grid-column: 1 / -1; justify-self: stretch; }
  .v5-meta .svc-actions { margin-left: 0; }
  .kpi { padding: 14px 14px; }
  .kpi .sub { font-size: 11px; }
  .svc-actions { gap: 4px 20px; }
  .mini-btn { min-height: 40px; font-size: 13px; }
  .att-name { max-width: 180px; }
  .kpi .v { font-size: 18px; }
  .kpi .k { font-size: 9px; letter-spacing: 0.16em; }
  .form-row { grid-template-columns: 120px 1fr; }
  .form-row > label { font-size: 14px; }
  .svc-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rail { scroll-behavior: auto; }
}
.svc-form textarea { resize: vertical; line-height: 1.5; font-family: inherit; }

/* ---------- Drag and drop (owner only) ---------- */
.drop-zones {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 32px clamp(16px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dz-title { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--label-2); pointer-events: none; }
.dz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: min(100%, 880px); }
.dz {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; padding: 24px 16px;
  border: 2px dashed var(--separator); border-radius: var(--radius-lg); background: var(--module-bg); text-align: center;
  color: var(--label-2); font-size: 13px; transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.dz > * { pointer-events: none; } /* the zone itself is always the drop target */
.dz strong { font-size: 17px; font-weight: 500; color: var(--label); }
.dz-icon svg { width: 34px; height: 34px; stroke-width: 1.4; }
.dz-v5 { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; padding: 7px 9px; border: 1.5px solid currentColor; border-radius: 4px; }
.dz.over { border-color: var(--blue); border-style: solid; color: var(--blue); transform: scale(1.02);
  background: color-mix(in srgb, var(--blue) 9%, var(--module-bg)); }
.dz.over strong { color: var(--blue); }

/* Card in the collection with photos held over it */
.card.drop-target .card-photo { outline: 2px solid var(--blue); outline-offset: 4px; }
.card.drop-target .card-photo::after {
  content: 'Drop to add photos'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
}

/* Gallery photo dragged towards the main picture */
.g-tile[draggable="true"] { cursor: grab; }
.cover-drop {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20; padding: 14px 24px; border-radius: 999px;
  border: 2px dashed var(--blue); background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--blue);
  font-size: 14px; font-weight: 500; white-space: nowrap; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dragging-photo .hero { position: relative; outline: 3px dashed var(--blue); outline-offset: -10px; }
.cover-over .cover-drop { border-style: solid; background: color-mix(in srgb, var(--blue) 12%, var(--bg)); }
.cover-over .hero { outline-style: solid; }

@media (max-width: 899px) {
  .dz-grid { grid-template-columns: 1fr; gap: 10px; }
  .dz { min-height: 0; flex-direction: row; justify-content: flex-start; padding: 18px; text-align: left; gap: 14px; }
  .dz > span:last-child { margin-left: auto; font-size: 12px; }
  .cover-drop { white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
}
.v5-text #v5Apply { align-self: flex-start; padding-left: 0; padding-right: 0; min-height: 32px; }
