:root {
 --hud-height: 100vh;
 --hud-white: #fafafa;
 --hud-rule: rgb(255 255 255 / 30%);
 --hud-right: max(12px, env(safe-area-inset-right, 0px));
 --hud-left: max(12px, env(safe-area-inset-left, 0px));
}
@supports (height: 100dvh) {
 :root { --hud-height: 100dvh; }
}
main { max-width: none; padding: 0; }
header {
 position: absolute;
 z-index: 4;
 inset: 0 0 auto;
 max-width: none;
 min-height: 48px;
 padding: calc(8px + env(safe-area-inset-top, 0px)) var(--hud-right) 8px calc(var(--hud-left) + 49px);
 border: 0;
 color: white;
 background: linear-gradient(rgb(0 0 0 / 48%), transparent);
 pointer-events: none;
}
header a { pointer-events: auto; }
header .brand { gap: 5px; font-size: .88rem; font-weight: 750; white-space: nowrap; text-shadow: 0 1px 3px #000; }
header .brand img, header .brand span { display: none; }
header nav { min-width: 0; gap: 6px; }
header nav a, #scan-menu summary {
 border: 1px solid var(--hud-rule);
 color: var(--hud-white);
 background: rgb(24 25 29 / 74%);
 text-shadow: 0 1px 2px #111;
}
header nav a { padding: 5px 9px; border-radius: 3px; font-size: .77rem; }
header nav b { color: inherit; }
#scanner {
 position: relative;
 min-height: var(--hud-height);
 isolation: isolate;
 overflow: hidden;
 max-width: none;
 margin: 0;
 padding: 0;
 color: var(--hud-white);
 background: #121316;
}
.scanner-head {
 position: absolute;
 z-index: 2;
 top: calc(60px + env(safe-area-inset-top, 0px));
 right: var(--hud-right);
 margin: 0;
 pointer-events: none;
}
.scanner-head .tag { display: none; }
.scanner-head .mode {
 border: 0;
 border-radius: 2px;
 background: rgb(24 25 29 / 72%);
 color: white;
 text-shadow: 0 1px 2px #151414;
}
#scanner:not([data-phase=scan]) .mode { display: none; }
.viewfinder { position: absolute; inset: 0; border: 0; border-radius: 0; aspect-ratio: auto; isolation: auto; background: #111216; }
.viewfinder img, .viewfinder video { width: 100%; height: 100%; object-fit: contain; }
.viewfinder #hero[src="car.svg"], .reticle, #scan-line, .view-hint { display: none; }
.tap-viewfinder {
 position: absolute;
 inset: 0;
 z-index: 1;
 width: 100%;
 height: 100%;
 padding: 0;
 margin: 0;
 border: 0;
 border-radius: 0;
 background: transparent !important;
 box-shadow: none;
 touch-action: manipulation;
 cursor: crosshair;
 -webkit-tap-highlight-color: transparent;
}
.tap-viewfinder:focus-visible { outline: 2px solid white; outline-offset: -5px; }
#scan-menu {
 position: absolute;
 z-index: 5;
 top: calc(8px + env(safe-area-inset-top, 0px));
 left: var(--hud-left);
}
#scan-menu summary {
 display: grid;
 place-items: center;
 list-style: none;
 width: 42px;
 height: 40px;
 padding: 0;
 border-radius: 3px;
 font-size: 0;
 cursor: pointer;
}
#scan-menu summary::-webkit-details-marker { display: none; }
#scan-menu summary::before {
 content: "";
 width: 17px;
 height: 13px;
 border-block: 2px solid currentColor;
 background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
 box-sizing: border-box;
}
#scan-menu .scan-actions {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 2px;
 min-width: 9.5rem;
 margin: 5px 0 0;
 padding: 4px;
 background: rgb(31 32 38 / 95%);
 border: 1px solid var(--hud-rule);
 border-radius: 3px;
}
#scan-menu .scan-actions button, #scan-menu .pick-photo {
 margin: 0;
 padding: 9px 12px;
 text-align: left;
 font: inherit;
 color: white;
 background: transparent;
 border: 0;
 border-radius: 0;
}
#scan-menu .scan-actions :is(button,.pick-photo):hover { background: rgb(255 255 255 / 12%); }
#scanner > #start {
 position: absolute;
 z-index: 3;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 color: white;
 background: rgb(54 51 65 / 94%);
 border: 1px solid rgb(255 255 255 / 60%);
 border-radius: 3px;
 padding: .7rem 1.3rem;
}
#camera-note {
 position: absolute;
 z-index: 2;
 top: calc(50% + 38px);
 left: 12%;
 right: 12%;
 margin: 0;
 color: #eee;
 text-align: center;
 font-size: .83rem;
 text-shadow: 0 1px 3px black;
 pointer-events: none;
}
#camera-note:empty, #recognition-output:empty { display: none; }
#recognition-output:not(:empty) {
 position: absolute;
 z-index: 3;
 right: var(--hud-right);
 bottom: max(12px, env(safe-area-inset-bottom, 0px));
 width: clamp(218px, 65vw, 270px);
 max-width: calc(100% - var(--hud-left) - var(--hud-right));
 max-height: calc(var(--hud-height) - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 overflow: auto;
 overscroll-behavior: contain;
 margin: 0;
 padding: 0;
 border: 0;
 border-radius: 0;
 color: var(--hud-white);
 background: transparent;
 text-shadow: 0 1px 2px rgb(0 0 0 / 75%);
 font-variant-numeric: tabular-nums;
}
#recognition-output:not(:empty):not(:has(.scan-sheet)) {
 background: rgb(39 39 42 / 88%);
 padding: 9px 12px;
 font-size: .85rem;
}
#recognition-output .scan-pages {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 0;
 width: max-content;
 margin: 0 0 0 auto;
}
#recognition-output .scan-page {
 display: grid;
 place-items: center;
 margin: 0;
 padding: 0;
 width: 36px;
 height: 36px;
 color: var(--hud-white);
 background: transparent;
 border: 0;
 border-radius: 0;
}
.scan-page::before {
 content: "";
 width: 7px;
 height: 7px;
 border-radius: 50%;
 background: currentColor;
 opacity: .76;
 box-shadow: 0 1px 3px #202026;
}
.scan-page[aria-pressed=true]::before { width: 11px; height: 11px; opacity: 1; }
.scan-sheet {
 background: rgb(38 38 39 / 89%);
 border-radius: 0;
}
.scan-identity {
 padding: 9px 12px 8px;
 background: rgb(94 88 110 / 69%);
}
.scan-identity p, #recognition-output .scan-identity h2 {
 margin: 0;
 color: var(--hud-white);
 font-weight: 750;
 letter-spacing: -.015em;
 line-height: 1.13;
 overflow-wrap: anywhere;
}
.scan-identity p { font-size: .9rem; }
#recognition-output .scan-identity h2 { margin-top: 2px; font-size: 1.12rem; }
.scan-details { padding: 2px 12px 4px; }
.scan-row {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: .5rem;
 padding: 6px 0;
 border-bottom: 1px solid var(--hud-rule);
 font-size: .85rem;
 line-height: 1.3;
}
.scan-row:last-child { border-bottom: 0; }
.scan-row span { flex-shrink: 0; font-weight: 650; }
.scan-row strong { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.scan-details > p, .scan-unmatched p { margin: 6px 0; font-size: .85rem; }
.scan-details > a { display: block; width: fit-content; padding-block: 4px; }
#recognition-output .scan-details a { margin: 0; font-size: .77rem; color: var(--hud-white); text-decoration: underline; }
.scan-gauge { padding: 3px 0 6px; border-bottom: 1px solid var(--hud-rule); }
.scan-gauge .scan-row { padding: 0 0 2px; border: 0; }
.scan-gauge meter {
 display: block;
 width: 100%;
 height: 5px;
 border: none;
 border-radius: 0;
 background: #71716c;
 appearance: none;
 -webkit-appearance: none;
}
.scan-gauge meter::-webkit-meter-bar { height: 5px; border: none; border-radius: 0; background: #71716c; }
.scan-gauge meter::-webkit-meter-optimum-value { background: #f5f3ed; }
.scan-gauge meter::-moz-meter-bar { background: #f5f3ed; }
.scan-choices { display: grid; }
#recognition-output .scan-choice, #recognition-output .scan-save, #recognition-output .scan-correct {
 min-height: 34px;
 padding: 5px 0;
 margin: 0;
 background: transparent;
 color: white;
 border: 0;
 border-radius: 0;
 font: inherit;
 font-size: .82rem;
 text-align: left;
 text-shadow: inherit;
}
#recognition-output .scan-choice { display: block; width: 100%; border-bottom: 1px solid var(--hud-rule); }
.scan-choice[aria-pressed=true]::after { content: "✓"; float: right; padding-left: .5em; }
.scan-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
#recognition-output .scan-save { font-weight: 750; text-align: right; }
.scan-unmatched { padding: 10px 12px; }
#recognition-output .scan-unmatched h2 { margin: 0; font-size: 1rem; }
.scan-info, #catalog, #garage { max-width: 1060px; margin-inline: auto; padding-inline: clamp(18px, 5vw, 45px); }
.scan-info { margin-block: 18px; }
.back-scan { display: inline-block; color: var(--lime); margin-bottom: 10px; text-decoration: underline; }
@media (min-width: 650px) {
 #recognition-output:not(:empty) { width: clamp(265px, 32vw, 380px); }
 .scan-row { font-size: .96rem; }
 #recognition-output .scan-identity h2 { font-size: 1.3rem; }
}
@media (max-height: 460px) {
 #recognition-output:not(:empty) { bottom: max(7px, env(safe-area-inset-bottom, 0px)); max-height: calc(var(--hud-height) - 62px - env(safe-area-inset-top, 0px)); }
 #recognition-output .scan-page { height: 28px; }
 .scan-row { padding-block: 4px; }
}
