/* Check my car (calibration) page */
.spread { justify-content: space-between; align-items: flex-start; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.actions { margin-top: 10px; }
.privacy { display: flex; gap: 8px; align-items: center; }
.privacy::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.plate-settings { margin-top: 12px; margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 700; font-size: 15px; }
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
input.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
svg.defs { position: absolute; }

/* framing guide */
.guide-frame {
  position: relative; aspect-ratio: 3 / 4; width: 100%; max-width: 100%; max-height: 40vh; margin: 0 auto;
  background: linear-gradient(#2c3a4d, #1b2533); border-radius: 14px; overflow: hidden;
}
.guide-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* photo stage */
.stage-wrap { position: relative; border-radius: 12px; overflow: auto; background: #000; max-height: 70vh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.stage { position: relative; width: 100%; }
.stage canvas { display: block; width: 100%; height: auto; }
.ov { position: absolute; inset: 0; pointer-events: none; }
.letter { position: absolute; border: 2px solid #3fd0ff; border-radius: 2px; }

.box { position: absolute; pointer-events: auto; touch-action: none; cursor: move; }
.box.space { border: 2px dashed var(--amber); background: rgba(245, 166, 35, .14); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.box.plate { background: rgba(224, 36, 159, .14); border: 2px solid #e0249f; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.box .h { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; touch-action: none; }
.box .h::after { content: ""; position: absolute; left: 11px; top: 11px; width: 14px; height: 14px; background: #fff; border: 2px solid #0b2340; border-radius: 4px; }
.box .h[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; } .box .h[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.box .h[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; } .box .h[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.box .h[data-h="n"] { left: 50%; top: 0; cursor: ns-resize; } .box .h[data-h="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.box .h[data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; } .box .h[data-h="w"] { left: 0; top: 50%; cursor: ew-resize; }
.box.small .h[data-h="n"], .box.small .h[data-h="s"], .box.small .h[data-h="e"], .box.small .h[data-h="w"] { display: none; }
.box.small .h { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.box.small .h::after { left: 9px; top: 9px; width: 12px; height: 12px; }

.sticker-preview {
  position: absolute; background: var(--amber); border-radius: 3px;
  box-shadow: 0 0 0 1.5px #0b2340, 0 2px 8px rgba(0, 0, 0, .45);
  display: grid; place-items: center; overflow: hidden;
}
.sticker-preview span { color: #0b2340; font-weight: 800; font-size: 13px; line-height: 1; white-space: nowrap; letter-spacing: -0.01em; }

.axis { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); pointer-events: none; }
.axis-grip {
  position: absolute; bottom: 12px; left: 0; transform: translateX(-50%); pointer-events: auto; touch-action: none; cursor: ew-resize;
  background: #fff; color: #0b2340; font-weight: 800; font-size: 12px; line-height: 1; padding: 8px 11px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.scalebar { position: absolute; left: 10px; bottom: 10px; height: 8px; border: 2px solid #fff; border-top: none; box-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.scalebar span { position: absolute; left: 0; bottom: 10px; font-weight: 700; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-weight: 700; font-size: 18px; text-align: center; padding: 16px; }

/* status line */
.status { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }

/* layout toggle */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg-btn { appearance: none; border: none; background: var(--bg); color: var(--ink); font: 700 15px/1.2 var(--font); padding: 13px 8px; cursor: pointer; min-height: 48px; }
.seg-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* recommendation */
.rec-card { background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.rec-card .eyebrow { color: var(--amber); }
.rec-name { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; }
.rec-size { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-card .muted { color: #c3cedb; }
.rec-card.none { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.rec-card.none .eyebrow { color: var(--muted); }
.rec-card.none .muted { color: var(--muted); }

/* live camera */
.inline-link { text-decoration: underline; cursor: pointer; color: var(--ink); font-weight: 600; }
html.cam-open, html.cam-open body { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: block; }
.cam-video { position: absolute; left: 0; right: 0; top: 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); width: 100%; height: calc(100% - 96px - env(safe-area-inset-bottom, 0px)); object-fit: contain; background: #000; }
.cam-guide { position: absolute; pointer-events: none; }
.cam-hint {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px));
  width: max-content; max-width: calc(100% - 32px); background: rgba(0, 0, 0, .62); color: #fff; font-weight: 700; font-size: 14px; line-height: 1.25;
  padding: 7px 12px; border-radius: 999px; text-align: center;
}
.cam-hint.ok { background: #1d7a4b; }
.cam-hint.warn { background: rgba(245, 166, 35, .95); color: #0b2340; }
.cam-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(96px + env(safe-area-inset-bottom, 0px));
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: #000;
}
.cam-close { justify-self: start; background: none; border: none; color: #fff; font: 700 17px/1 var(--font); padding: 12px 6px; cursor: pointer; }
.cam-shutter { width: 72px; height: 72px; border-radius: 50%; border: 5px solid #fff; background: var(--amber); cursor: pointer; box-shadow: 0 0 0 3px rgba(0, 0, 0, .6); }
.cam.found .cam-shutter { background: #2fbf71; }
.cam-shutter[disabled] { opacity: .5; }
.cam-shutter:focus-visible, .cam-close:focus-visible { outline: 3px solid #7fb2ff; outline-offset: 3px; }

/* team-only save panel */
.save-panel { border: 1px dashed var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.saved-preview { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; margin-top: 10px; }
.saved-crop { display: block; max-width: 100%; height: auto; border-radius: 8px; margin-top: 8px; image-rendering: auto; }
