/* Sanjish Auto — "night garage" theme.
   Asphalt blue-graphite surfaces, dashboard-amber signal colour, the VIN plate as the hero object. */
:root {
  --asphalt: #121821;
  --carbon: #19212C;
  --panel: #202A37;
  --rim: #2C3847;
  --steel: #8C99AB;
  --chrome: #EEF2F6;
  --amber: #F5A524;
  --amber-ink: #1A1206;
  --ok: #3DDC97;
  --warn: #F5A524;
  --bad: #FF6B5E;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--asphalt); color: var(--chrome); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(120% 60% at 50% -10%, #23314A 0%, rgba(35,49,74,0) 60%),
  var(--asphalt); min-height: 100vh; }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.app { max-width: 480px; margin: 0 auto; padding: 12px 18px calc(96px + var(--safe-b)); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand-mark { width: 30px; height: 30px; }
.lang { display: flex; padding: 3px; background: var(--carbon); border: 1px solid var(--rim); border-radius: 999px; }
.lang button { border: 0; background: none; color: var(--steel); font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.lang button.on { background: var(--chrome); color: var(--asphalt); }

/* hero */
.hero { padding: 22px 0 18px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.3px; margin: 0 0 10px; }
.page-title { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 22px 0 6px; }
.lead { color: var(--steel); margin: 0; max-width: 36ch; }

/* VIN plate — the signature object */
.plate-wrap { margin-top: 4px; }
.plate { display: block; position: relative; cursor: text; padding: 14px 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, #3A4656 0%, #262F3C 45%, #1E2631 100%);
  border: 1px solid #435063;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.4), 0 18px 40px -18px rgba(0,0,0,.7); }
.plate::before, .plate::after { content: ""; position: absolute; top: 12px; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9AA6B6, #3B4553); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.plate::before { left: 12px; } .plate::after { right: 12px; }
.plate-top { display: flex; justify-content: space-between; padding: 0 16px 10px; font-size: 12px; color: #AEB9C7; font-weight: 600; }
#vinCount { font-variant-numeric: tabular-nums; color: var(--steel); }
.cells { display: grid; grid-template-columns: repeat(17, 1fr); gap: 3px; }
.cell { height: 40px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--chrome);
  background: rgba(10,14,20,.55); box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.06); transition: background .15s; }
.cell.sep { margin-left: 4px; }
.cell.cur { box-shadow: inset 0 0 0 1.5px var(--amber), inset 0 1px 2px rgba(0,0,0,.6); }
.cell.cur::after { content: ""; width: 2px; height: 18px; background: var(--amber); animation: blink 1s steps(1) infinite; }
.cell.filled.cur::after { display: none; }
.plate.scan .cell { animation: scan .5s ease-out both; animation-delay: calc(var(--i) * 28ms); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes scan { 0% { background: rgba(10,14,20,.55); } 35% { background: rgba(245,165,36,.55); color: var(--amber-ink); } 100% { background: rgba(10,14,20,.55); } }
#vin { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; border: 0; cursor: text; }
.plate:focus-within { border-color: #5B6A80; }
.hint { color: var(--steel); font-size: 12.5px; margin: 10px 4px 0; }
.err { color: var(--bad); font-size: 13px; margin: 8px 4px 0; min-height: 0; }
.err:empty { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-md); padding: 15px 18px; font-weight: 700; font-size: 15.5px; cursor: pointer; transition: transform .12s, background .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.primary { width: 100%; margin-top: 14px; background: var(--amber); color: var(--amber-ink); box-shadow: 0 10px 24px -12px rgba(245,165,36,.8); }
.btn.primary:disabled { opacity: .6; }
.btn.ghost { background: var(--panel); color: var(--chrome); border: 1px solid var(--rim); font-weight: 600; font-size: 14px; padding: 12px 14px; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn svg { width: 18px; height: 18px; }
.link { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--steel); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn.loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* perks */
.perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.perks li { display: flex; gap: 14px; align-items: flex-start; }
.pi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--carbon); border: 1px solid var(--rim); color: var(--amber); flex-shrink: 0; }
.perks b { display: block; font-weight: 650; }
.perks span:not(.pi) { color: var(--steel); font-size: 13.5px; }

/* passport */
#result { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.passport { margin-top: 22px; padding: 18px; border-radius: var(--r-lg); background: var(--carbon); border: 1px solid var(--rim); }
.pp-head { display: flex; align-items: center; gap: 14px; }
.badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--asphalt); background: linear-gradient(150deg, #F2F5F8, #AEB9C7); flex-shrink: 0; }
.pp-title { min-width: 0; }
.pp-make { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; }
.pp-model { color: var(--steel); font-size: 14px; }
.pp-year { margin-left: auto; font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--amber); }
.pp-vin { margin: 14px 0 4px; font-family: var(--mono); font-size: 13px; letter-spacing: 1.5px; color: var(--steel); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 14px 0 0; }
.specs div { min-width: 0; }
.specs dt { color: var(--steel); font-size: 12px; }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; }
.status { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 13.5px; }
.status:empty { display: none; }
.status.ok { background: rgba(61,220,151,.1); color: var(--ok); }
.status.bad { background: rgba(255,107,94,.1); color: var(--bad); }
.status svg { width: 18px; height: 18px; margin-top: 1px; }
.fine { color: var(--steel); font-size: 12.5px; margin: 12px 0 0; }
.pp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

h2.sec { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 30px 0 4px; }
.sec-sub { color: var(--steel); margin: 0 0 12px; font-size: 14px; }
.reports { display: grid; gap: 10px; }
.report { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 16px; border-radius: var(--r-md); background: var(--carbon); border: 1px solid var(--rim); cursor: pointer; transition: border-color .2s, transform .12s; }
.report:active { transform: scale(.99); }
.report.rec-on { border-color: rgba(245,165,36,.55); background: linear-gradient(180deg, rgba(245,165,36,.07), rgba(245,165,36,0)) , var(--carbon); }
.r-flag { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 12px; background: var(--panel); color: var(--chrome); border: 1px solid var(--rim); }
.r-body b { display: block; font-weight: 650; }
.r-body span { display: block; color: var(--steel); font-size: 13px; margin-top: 2px; }
.rec { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--amber); margin-top: 6px; }
.r-price { font-family: var(--display); font-weight: 700; font-size: 18px; text-align: right; }
.r-price small { display: block; font-family: var(--ui); font-weight: 500; font-size: 11.5px; color: var(--steel); }

/* garage */
.cars { display: grid; gap: 10px; margin-top: 18px; }
.car { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--carbon); border: 1px solid var(--rim); cursor: pointer; text-align: left; width: 100%; transition: border-color .2s; }
.car.on { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset; }
.car .badge { width: 44px; height: 44px; border-radius: 13px; font-size: 16px; }
.car-t { min-width: 0; flex: 1; }
.car-t b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-t span { display: block; font-family: var(--mono); font-size: 12px; color: var(--steel); letter-spacing: .8px; }
.car-a { font-size: 12px; font-weight: 700; color: var(--amber); }
.car-x { border: 0; background: none; color: var(--steel); padding: 6px; cursor: pointer; border-radius: 8px; }
.car-x svg { width: 18px; height: 18px; }
.empty { text-align: center; padding: 32px 12px; border: 1px dashed var(--rim); border-radius: var(--r-md); color: var(--steel); }
.empty svg { width: 40px; height: 40px; color: var(--rim); display: block; margin: 0 auto 10px; }

/* parts */
.for-car { display: flex; align-items: center; gap: 8px; width: 100%; margin: 14px 0 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(245,165,36,.4); background: rgba(245,165,36,.08); cursor: pointer; text-align: left; }
.fc-l { color: var(--steel); font-size: 13px; }
.fc-n { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-c { margin-left: auto; color: var(--amber); font-weight: 700; font-size: 13px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: var(--r-md); background: var(--carbon); border: 1px solid var(--rim); color: var(--steel); }
.search input { flex: 1; border: 0; background: none; color: var(--chrome); font: inherit; font-size: 16px; padding: 13px 0; outline: none; }
.search:focus-within { border-color: #5B6A80; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -18px 4px; padding: 0 18px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex-shrink: 0; border: 1px solid var(--rim); background: var(--carbon); color: var(--chrome); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.chips button.on { background: var(--chrome); color: var(--asphalt); border-color: var(--chrome); font-weight: 650; }
.parts { margin-top: 8px; }
.part { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rim); }
.part-n { font-weight: 650; }
.part-m { color: var(--steel); font-size: 12.5px; }
.part-m code { font-family: var(--mono); font-size: 12px; color: #B9C4D1; }
.fit { font-size: 11.5px; font-weight: 700; color: var(--ok); }
.fit.uni { color: var(--steel); }
.ask { grid-row: 1 / span 3; grid-column: 2; border: 1px solid var(--rim); background: var(--panel); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 650; cursor: pointer; }
.none { color: var(--steel); padding: 20px 0; font-size: 14px; }
.demo { font-size: 12px; color: var(--steel); margin: 12px 0 0; }
.cant { margin-top: 24px; padding: 18px; border-radius: var(--r-lg); background: var(--carbon); border: 1px solid var(--rim); }
.cant b { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; }
.cant span { display: block; color: var(--steel); font-size: 13.5px; margin-top: 4px; }

/* tab bar */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(444px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px; border-radius: 22px; background: rgba(25,33,44,.82); border: 1px solid var(--rim); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); z-index: 20; }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 0; background: none; color: var(--steel); font-size: 11.5px; font-weight: 600; border-radius: 16px; cursor: pointer; transition: color .2s, background .2s; }
.tabbar button.on { color: var(--chrome); background: var(--panel); }
.tabbar button.on svg { color: var(--amber); }
.tabbar .dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(5,8,12,.6); z-index: 30; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(480px, 100%); max-height: 92vh; overflow: auto; z-index: 31;
  padding: 10px 20px calc(24px + var(--safe-b)); border-radius: 26px 26px 0 0; background: var(--carbon); border: 1px solid var(--rim); border-bottom: 0; animation: up .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes up { from { transform: translate(-50%, 100%); } }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--rim); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0; }
.sheet-sub { color: var(--steel); margin: 6px 0 4px; font-size: 14px; }
.f { display: block; margin-top: 14px; }
.f > span { display: block; font-size: 12.5px; font-weight: 600; color: #B9C4D1; margin-bottom: 6px; }
.f input, .f textarea, .f select { width: 100%; padding: 13px 14px; border-radius: var(--r-sm); border: 1px solid var(--rim); background: var(--asphalt); color: var(--chrome); font: inherit; font-size: 16px; outline: none; }
.f input:focus, .f textarea:focus, .f select:focus { border-color: var(--amber); }
.f textarea { resize: vertical; min-height: 84px; }
.f .mono { font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.summary { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: var(--r-sm); background: var(--asphalt); border: 1px solid var(--rim); }
.summary b { display: block; font-weight: 650; }
.summary span { color: var(--steel); font-size: 12.5px; font-family: var(--mono); }
.summary .r-price { margin-left: auto; }
.done { text-align: center; padding: 18px 0 4px; }
.tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: rgba(61,220,151,.12); color: var(--ok); animation: pop .4s cubic-bezier(.2,1.4,.4,1) both; }
.tick svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40;
  background: var(--chrome); color: var(--asphalt); font-weight: 650; font-size: 14px; padding: 11px 16px; border-radius: 14px; transition: opacity .25s, transform .25s; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 360px) { .cell { height: 34px; font-size: 13px; } .cells { gap: 2px; } h1 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- scan button ---------- */
.actions-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 14px; }
.actions-row .btn.primary { margin-top: 0; }
.scan-btn { background: var(--panel); color: var(--chrome); border: 1px solid var(--rim); padding: 15px 16px; font-weight: 650; font-size: 14.5px; }
.scan-btn svg { width: 20px; height: 20px; color: var(--amber); }

/* ---------- camera scanner ----------
   The page stays in place and is dimmed; the VIN cells fly away and a window opens exactly where
   they were. The camera picture is visible only through that window. */
.cell { transition: background .15s, transform .38s cubic-bezier(.5,0,.2,1), opacity .3s; transition-delay: 0s, calc(var(--o, 0) * 22ms), calc(var(--o, 0) * 22ms); }
.plate.scanning .cell { opacity: 0; transform: translateY(var(--dy, -26px)) translateX(calc(var(--side, 0) * 14px)) scale(.35) rotate(calc(var(--side, 0) * 18deg)); pointer-events: none; }
.plate.scanning .cell.cur::after { display: none; }

.scanner { position: fixed; inset: 0; z-index: 50; color: #fff; opacity: 0; transition: opacity .3s ease; }
.scanner.on { opacity: 1; }
.scan-hole { position: fixed; border-radius: 9px; box-shadow: 0 0 0 200vmax rgba(5,8,12,.86); }
.scan-win { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #05080c;
  clip-path: inset(50% 0 50% 0 round 9px); transition: clip-path .42s cubic-bezier(.2,.8,.2,1) .22s; }
.scanner.on .scan-win { clip-path: inset(0 0 0 0 round 9px); }
.scan-win video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-hole i { position: absolute; width: 14px; height: 14px; border: 2.5px solid var(--amber); opacity: 0; transition: opacity .25s .5s, border-color .2s; }
.scanner.on .scan-hole i { opacity: 1; }
.scan-hole i:nth-of-type(1) { top: -4px; left: -4px; border-right: 0; border-bottom: 0; border-radius: 9px 0 0 0; }
.scan-hole i:nth-of-type(2) { top: -4px; right: -4px; border-left: 0; border-bottom: 0; border-radius: 0 9px 0 0; }
.scan-hole i:nth-of-type(3) { bottom: -4px; left: -4px; border-right: 0; border-top: 0; border-radius: 0 0 0 9px; }
.scan-hole i:nth-of-type(4) { bottom: -4px; right: -4px; border-left: 0; border-top: 0; border-radius: 0 0 9px 0; }
.scan-line { position: absolute; top: 4px; bottom: 4px; width: 2px; left: 0; background: linear-gradient(180deg, transparent, var(--amber), transparent); box-shadow: 0 0 10px var(--amber); animation: sweepX 1.8s ease-in-out infinite alternate; }
@keyframes sweepX { from { left: 3%; } to { left: 97%; } }
.scanner.locked .scan-line { display: none; }
.scanner.locked .scan-hole i { border-color: var(--ok); }
.scan-top { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; display: flex; justify-content: space-between; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(32,42,55,.85); color: #fff; backdrop-filter: blur(10px); cursor: pointer; }
.round svg { width: 22px; height: 22px; }
.round.on { background: var(--amber); color: var(--amber-ink); }
.scan-under { position: fixed; left: 16px; right: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; opacity: 0; transform: translateY(-6px); transition: opacity .3s .45s, transform .3s .45s; }
.scanner.on .scan-under { opacity: 1; transform: none; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px calc(26px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scan-tip { margin: 0; font-weight: 600; max-width: 34ch; }
.scan-status { margin: 0; color: #B9C4D1; font-size: 13px; min-height: 18px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid rgba(255,255,255,.85); background: transparent; display: grid; place-items: center; cursor: pointer; margin-top: 6px; }
.shutter span { width: 56px; height: 56px; border-radius: 50%; background: #fff; transition: transform .1s; }
.shutter:active span { transform: scale(.9); }
.scanner.locked .shutter { display: none; }
.scan-found { width: min(440px, 100%); background: var(--carbon); border: 1px solid var(--rim); border-radius: 20px; padding: 16px; text-align: center; animation: rise .3s both; }
.sf-how { display: block; color: var(--ok); font-size: 12.5px; font-weight: 700; }
.sf-vin { display: block; font-family: var(--mono); font-weight: 700; font-size: 19px; letter-spacing: 1.5px; margin: 8px 0 14px; }
.sf-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.sf-btns .btn.primary { margin-top: 0; }

/* ---------- desktop ---------- */
.vin-left, .vin-right { min-width: 0; }
@media (min-width: 960px) {
  body { background: radial-gradient(80% 50% at 70% -10%, #23314A 0%, rgba(35,49,74,0) 60%), var(--asphalt); }
  .app { max-width: 1240px; padding: 24px 40px 48px 300px; }
  .top { position: fixed; top: 0; left: max(0px, calc(50% - 620px)); width: 260px; height: auto; padding: 32px 24px 0 40px; flex-direction: column; align-items: flex-start; gap: 22px; z-index: 21; }
  .brand { font-size: 20px; } .brand-mark { width: 36px; height: 36px; }
  .tabbar { left: max(0px, calc(50% - 620px)); transform: none; top: 150px; bottom: auto; width: 220px; margin-left: 40px; grid-template-columns: 1fr; gap: 4px; padding: 8px; border-radius: 20px; }
  .tabbar button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: 14.5px; border-radius: 14px; }
  .tabbar .dot { top: 50%; right: 14px; transform: translateY(-50%); }
  .toast { bottom: 32px; }

  #tab-vin:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 40px; }
  .hero { padding-top: 0; }
  h1 { font-size: 40px; max-width: 14ch; }
  .lead { font-size: 16px; }
  .cell { height: 48px; font-size: 18px; border-radius: 7px; }
  .vin-right { padding-top: 6px; }
  .perks { margin-top: 0; gap: 14px; }
  .perks li { padding: 18px; border-radius: var(--r-lg); background: var(--carbon); border: 1px solid var(--rim); }
  .passport { margin-top: 0; }
  .page-title { font-size: 34px; margin-top: 40px; }

  .cars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #garageAdd { width: auto; padding: 13px 22px; }
  .parts-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .cant { position: sticky; top: 24px; margin-top: 8px; }
  .for-car, .search { max-width: 640px; }
  .chips { margin: 14px 0 4px; padding: 0; flex-wrap: wrap; overflow: visible; }

  .scrim { background: rgba(5,8,12,.7); }
  .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); width: 480px; border-radius: 24px; border-bottom: 1px solid var(--rim); animation: zoom .25s cubic-bezier(.2,.8,.2,1) both; padding-bottom: 24px; }
  .grab { display: none; }
  @keyframes zoom { from { transform: translate(-50%, -48%) scale(.97); opacity: 0; } }
}
.part-p { grid-column: 2; grid-row: 1; justify-self: end; font-family: var(--mono); font-weight: 500; color: var(--amber); white-space: nowrap; }
.part:has(.part-p) .ask { grid-row: 2 / span 2; }

/* ---------- marketplace: photos in list, part card, seller, sell form ---------- */
.part { cursor: pointer; }
.part:has(.part-ph) { grid-template-columns: 58px 1fr auto; }
.part:has(.part-ph) > .part-n, .part:has(.part-ph) > .part-m, .part:has(.part-ph) > .fit { grid-column: 2; }
.part:has(.part-ph) > .part-p, .part:has(.part-ph) > .ask { grid-column: 3; }
.part-ph { grid-column: 1; grid-row: 1 / span 3; width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: var(--panel); border: 1px solid var(--rim); }
.cant .somon { display: block; margin-top: 12px; text-align: center; color: var(--amber); font-weight: 600; font-size: 14px; text-decoration: none; }
.cant .somon:hover { text-decoration: underline; }

.psheet { padding-top: 10px; }
.gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; margin: 6px -2px 0; border-radius: 18px; background: var(--asphalt); aspect-ratio: 4 / 3; scrollbar-width: none; }
.gal::-webkit-scrollbar { display: none; }
.gal img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.gal.empty { aspect-ratio: 16 / 7; }
.nophoto { flex: 1; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--steel); font-size: 13px; }
.nophoto svg { width: 30px; height: 30px; opacity: .7; }
.gal-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gal-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--rim); transition: width .2s, background .2s; }
.gal-dots i.on { width: 18px; background: var(--amber); }
.pd-name { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.3; margin: 16px 0 10px; }
.pd-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pd-price { font-family: var(--mono); font-weight: 700; font-size: 24px; color: var(--amber); margin-right: 6px; }
.pd-price small { font-size: 14px; font-weight: 500; }
.pd-tag { border: 1px solid var(--rim); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: #C9D2DD; }
.pd-meta { color: var(--steel); font-size: 13.5px; margin: 10px 0 0; }
.pd-meta code { font-family: var(--mono); color: var(--chrome); }
.seller { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--carbon); border: 1px solid var(--rim); display: grid; gap: 3px; }
.s-l { color: var(--steel); font-size: 12px; }
.s-n { font-size: 17px; }
.s-a { color: #C9D2DD; font-size: 14px; }
.s-ph { font-family: var(--mono); color: var(--chrome); text-decoration: none; font-size: 15px; margin-top: 2px; }
.s-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.sb { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--rim); color: var(--chrome); text-decoration: none; font-weight: 650; font-size: 14px; }
.sb svg { width: 18px; height: 18px; }
.sb.call { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.psheet > div > .btn { margin-top: 14px; }

.sell .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-l { display: block; color: var(--steel); font-size: 13px; margin: 6px 0 8px; }
.ph-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ph { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; border: 1px solid var(--rim); background: var(--carbon); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 11px; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.ph.add { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--steel); font-size: 10.5px; text-align: center; cursor: pointer; border-style: dashed; }
.ph.add svg { width: 22px; height: 22px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 4px; color: #C9D2DD; font-size: 13.5px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--amber); width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- parts / shops switch + shop directory ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 14px 0 0; border-radius: 14px; background: var(--carbon); border: 1px solid var(--rim); }
.seg button { border: 0; background: none; color: var(--steel); font: 600 14px var(--ui); padding: 10px 8px; border-radius: 10px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--panel); color: var(--chrome); box-shadow: inset 0 0 0 1px var(--rim); }
.shops-sub { color: var(--steel); font-size: 13.5px; margin: 2px 0 12px; }
.shops { display: grid; gap: 10px; }
.shop { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: var(--carbon); border: 1px solid var(--rim); cursor: pointer; transition: border-color .2s; }
.shop:hover, .shop:focus-visible { border-color: #3B4A5E; outline: none; }
.shop.partner { border-color: rgba(245,165,36,.45); }
.shop-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.shop-t { font-family: var(--display); font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.shop-badge { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--steel); border: 1px solid var(--rim); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.shop-badge.ok { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); }
.shop-makes { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-makes span { font-size: 11.5px; color: #C9D2DD; background: var(--panel); border: 1px solid var(--rim); border-radius: 7px; padding: 2px 7px; }
.shop-makes span.hl { color: var(--amber); border-color: rgba(245,165,36,.6); background: rgba(245,165,36,.1); font-weight: 600; }
.shop-d { margin: 0; color: #C9D2DD; font-size: 13.5px; line-height: 1.45; }
.shop-f { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--steel); font-family: var(--mono); font-size: 12px; }
.shop-f .fit { font-family: var(--ui); }
.shop-hd { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.shop-hd .pd-name { margin: 0 0 6px; }
.shop-hd .shop-badge { display: inline-block; }
.shop-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font: 700 20px var(--display); color: var(--asphalt); background: linear-gradient(150deg, #F2F5F8, #AEB9C7); }
.shop-desc { color: #C9D2DD; font-size: 14.5px; line-height: 1.5; margin: 14px 0 10px; }
.wide-sb { margin-top: 8px; }
.shop-note { color: var(--steel); font-size: 12.5px; line-height: 1.45; margin: 14px 2px 0; }
@media (min-width: 960px) {
  .seg { max-width: 360px; }
  .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; }
}

.pd-desc { color: #C9D2DD; font-size: 14.5px; line-height: 1.5; margin: 12px 0 0; }

/* ---------- account card + sign-in sheet ---------- */
#account { margin: 14px 0 6px; }
.acc { padding: 16px; border-radius: var(--r-md); background: var(--carbon); border: 1px solid rgba(245,165,36,.35); display: grid; gap: 8px; }
.acc.on { border-color: var(--rim); }
.acc-t { font-family: var(--display); font-weight: 600; font-size: 15.5px; }
.acc-note { margin: 0; color: var(--steel); font-size: 13px; line-height: 1.45; }
.acc-note.small { margin-top: 16px; font-size: 12px; text-align: center; }
.acc-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.acc-btns .btn { flex: 1 1 140px; }
.acc-top { display: flex; gap: 12px; align-items: center; }
.acc-top b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; }
.acc-top span:not(.acc-ic) { color: var(--steel); font-size: 12.5px; }
.acc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--rim); color: var(--amber); flex-shrink: 0; }
.acc-ic svg { width: 20px; height: 20px; }
.acc-del { background: none; border: 0; color: var(--steel); font-size: 12.5px; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.acc-del:hover { color: var(--bad); }
.a-h { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 8px 0 6px; }
.pin-in { font-family: var(--mono) !important; font-size: 22px !important; letter-spacing: .35em; }
.a-link { display: block; width: 100%; margin-top: 12px; background: none; border: 0; color: var(--amber); font-weight: 600; font-size: 14px; cursor: pointer; padding: 6px; }
.a-test { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(245,165,36,.08); border: 1px dashed rgba(245,165,36,.4); color: #C9D2DD; font-size: 12.5px; }
.tg-widget { display: grid; place-items: center; min-height: 60px; margin-top: 14px; }
@media (min-width: 960px) { #account { max-width: 640px; } }
