:root {
  --black: #050505;
  --panel: #101010;
  --panel-soft: #181818;
  --gold: #d8a845;
  --gold-light: #f4d27b;
  --steel: #c9ced4;
  --muted: #a6a6a6;
  --white: #f7f3ea;
  --red: #c71f2d;
  --line: rgba(255,255,255,.12);
  --radius: 18px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--black); color: var(--white); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.shell { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }

.payment-return { width: min(1180px, calc(100% - 36px)); margin: 24px auto 0; padding: 16px 18px; border: 1px solid #5e4b1d; background: #12130f; color: var(--white); display: grid; gap: 4px; }
.payment-return strong { color: var(--gold-light); }
.payment-return span { color: #c9c5bb; }
.payment-return.abgebrochen { border-color: #71413c; }
.payment-return.abgebrochen strong { color: #e89a8f; }

.site-header { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px max(18px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: rgba(5,5,5,.92); }
.brand img { display: block; width: 132px; height: 66px; object-fit: contain; }
.back-link { color: var(--steel); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--gold-light); }

.intro { display: grid; grid-template-columns: 1.25fr .75fr; gap: 60px; align-items: end; padding-block: 58px 42px; }
.intro h1 { margin: 0; max-width: 760px; font-size: 66px; line-height: 1.02; letter-spacing: 0; }
.intro p:not(.eyebrow) { max-width: 680px; margin: 20px 0 0; color: var(--muted); font-size: 18px; }
.eyebrow, .kicker { margin: 0 0 8px; color: var(--gold-light); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.steps { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; color: var(--steel); }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(216,168,69,.5); border-radius: 50%; color: var(--gold-light); font-weight: 800; }

.configurator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, .95fr); align-items: start; gap: 22px; padding-bottom: 70px; }
.editor, .preview-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.editor { padding: 26px; }
.preview-panel { padding: 24px; background: linear-gradient(145deg, #171717, #0d0d0d); }
.preview-sticky { position: sticky; top: 18px; }
.section-head, .preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-head h2, .preview-head h2 { margin: 0; font-size: 23px; line-height: 1.2; }
.preview-head { margin-bottom: 22px; }
.preview-head > span { flex: none; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--steel); font-size: 12px; }
.draft-badge { padding: 6px 9px; border-radius: 999px; background: rgba(216,168,69,.1); color: var(--gold-light); font-size: 11px; }

fieldset { min-width: 0; border: 0; padding: 0; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 22px; }
.choice-card, .format-option { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft); transition: border-color .15s, background .15s, transform .15s; }
.choice-card { min-height: 78px; padding: 13px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; }
.choice-card input, .format-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked), .format-option:has(input:checked) { border-color: var(--gold); background: rgba(216,168,69,.09); box-shadow: inset 0 0 0 1px rgba(216,168,69,.25); }
.choice-card:focus-within, .format-option:focus-within { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.choice-card strong { align-self: end; }
.choice-card small { grid-column: 2; align-self: start; color: var(--muted); }
.choice-icon { grid-row: 1 / 3; width: 42px; height: 32px; display: grid; place-items: center; }
.plate-icon { position: relative; border: 1px solid var(--steel); background: #080808; box-shadow: inset 0 0 0 2px #202020; }
.plate-icon i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--steel); }
.plate-icon i:nth-child(1) { left: 4px; top: 4px; }
.plate-icon i:nth-child(2) { right: 4px; top: 4px; }
.plate-icon i:nth-child(3) { left: 4px; bottom: 4px; }
.plate-icon i:nth-child(4) { right: 4px; bottom: 4px; }
.medical-icon { border-radius: 8px; background: var(--red); color: white; }
.medical-icon svg { width: 25px; height: 31px; }
.medical-icon .staff, .medical-icon .snake, .small-medical-symbol .staff, .small-medical-symbol .snake { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.medical-icon .staff, .small-medical-symbol .staff { stroke-width: 2.2; }
.medical-icon .snake, .small-medical-symbol .snake { stroke-width: 2.6; }
.medical-icon circle, .small-medical-symbol circle { fill: currentColor; }

.form-section { margin: 0; }
.form-section legend { margin-bottom: 9px; font-weight: 750; }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.format-option { padding: 12px; }
.format-option::before { content: ""; width: 16px; height: 16px; flex: none; border: 1px solid #777; border-radius: 50%; }
.format-option:has(input:checked)::before { border: 5px solid var(--gold); }
.format-option span { display: grid; }
.format-option small, .field small { color: var(--muted); font-weight: 500; }
.format-note { margin: 10px 0 22px; color: var(--muted); font-size: 13px; }

.form-heading { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.fields { display: grid; gap: 13px; margin-top: 17px; }
.two-col { grid-template-columns: 1fr 1fr; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; color: var(--steel); font-size: 13px; font-weight: 700; }
.field b, .consent b { color: var(--gold-light); }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid #383838; border-radius: 9px; padding: 10px 12px; background: #090909; color: var(--white); outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,168,69,.12); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ef6b72; }
.toggle, .consent { display: flex; align-items: flex-start; gap: 10px; color: var(--steel); font-size: 13px; font-weight: 650; cursor: pointer; }
.toggle { min-height: 42px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #141414; }
.toggle input, .consent input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.privacy-hint { margin: 14px 0 0; padding: 11px 12px; border-left: 3px solid var(--gold); background: rgba(216,168,69,.07); color: var(--steel); font-size: 13px; }
.more-fields { margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.more-fields summary { padding: 12px 14px; cursor: pointer; color: var(--steel); font-weight: 750; }
.more-fields[open] summary { border-bottom: 1px solid var(--line); }
.more-fields .fields { padding: 0 14px 14px; }
.variant-fields:empty { display: none; }
.variant-fields:not(:empty) { margin-top: 15px; padding: 14px; border: 1px solid rgba(216,168,69,.28); border-radius: 10px; }
.variant-intro strong { color: var(--white); }
.variant-intro p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.consent { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.compact-consent { padding-inline: 0; border: 0; }
.consent.invalid { border-color: #ef6b72; background: rgba(239,107,114,.08); }
.compact-consent.invalid { padding: 10px; border: 1px solid #ef6b72; }
.form-error { margin: 10px 0; padding: 10px 12px; border-left: 3px solid #ef6b72; background: rgba(239,107,114,.08); color: #ffd9dc; font-size: 13px; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; min-height: 48px; padding: 12px 18px; font-weight: 800; cursor: pointer; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #171006; }
.primary-button:hover { filter: brightness(1.05); }
.secondary-button { background: #262626; color: var(--white); }
.payment-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.address-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 5px; padding: 15px 0 2px; border-top: 1px solid var(--line); }
.address-heading strong { color: var(--white); font-size: 16px; }
.address-heading span { color: var(--muted); font-size: 12px; text-align: right; }
.price-summary { display: grid; gap: 0; margin-top: 18px; border: 1px solid rgba(216,168,69,.38); border-radius: 10px; background: rgba(216,168,69,.07); overflow: hidden; }
.price-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 13px; color: var(--steel); font-size: 13px; }
.price-summary strong { color: var(--white); text-align: right; }
.price-summary .price-total { padding-block: 13px; border-top: 1px solid rgba(216,168,69,.34); background: rgba(216,168,69,.1); color: var(--gold-light); font-size: 15px; font-weight: 800; }
.price-summary .price-total strong { color: var(--gold-light); font-size: 17px; }
.price-summary p { margin: 0; padding: 0 13px 12px; color: var(--muted); font-size: 11px; }

.plate-stage { padding: 24px 12px; border-radius: 14px; background: #d9dcda; }
.plate { --hole-diameter: 3%; --hole-side-gap: 2%; --hole-vertical-gap: 4%; --safe-side: 5%; position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: radial-gradient(circle at 25% 0, #1b1b1b 0, #070707 45%, #020202 100%); color: #e7e7e3; box-shadow: inset 0 0 0 1px #222, 0 13px 20px rgba(0,0,0,.3); font-family: Arial, Helvetica, sans-serif; }
.plate[data-format="85x50"] { --hole-diameter: 3.529412%; --hole-side-gap: 2.352941%; --safe-side: 5.882353%; aspect-ratio: 1.7 / 1; margin-inline: auto; width: 88%; border-radius: 2.352941% / 4%; }
.hole { position: absolute; width: var(--hole-diameter); aspect-ratio: 1; border-radius: 50%; background: #c4c9c6; box-shadow: inset 1px 1px 2px rgba(0,0,0,.55), 0 0 0 1px #333; }
.top-left { top: var(--hole-vertical-gap); left: var(--hole-side-gap); } .top-right { top: var(--hole-vertical-gap); right: var(--hole-side-gap); } .bottom-left { bottom: var(--hole-vertical-gap); left: var(--hole-side-gap); } .bottom-right { bottom: var(--hole-vertical-gap); right: var(--hole-side-gap); }
.plate-title { position: absolute; z-index: 1; left: var(--safe-side); right: var(--safe-side); top: 1%; height: 10%; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; text-align: center; text-overflow: clip; font-size: 22px; font-weight: 800; line-height: 1; }
.plate-title:empty::after { content: "HERSTELLER / FIRMA"; color: #b8b8b3; opacity: .32; }
.plate-subtitle { position: absolute; z-index: 1; left: calc(var(--safe-side) + 3%); right: calc(var(--safe-side) + 3%); top: 11%; height: 7%; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; text-align: center; text-overflow: clip; font-size: 11px; font-weight: 700; line-height: 1; }
.plate-grid { position: absolute; left: var(--safe-side); right: var(--safe-side); top: 21%; bottom: 18%; display: grid; grid-template-columns: .46fr 1.04fr .92fr .68fr; grid-auto-rows: 1fr; gap: 0 3.7%; align-items: center; font-size: 13px; }
.plate-grid > span { overflow: hidden; white-space: nowrap; text-overflow: clip; }
.plate-grid > span:nth-child(4n), #preview-axle-two { text-align: right; }
#preview-axle-two-label { grid-column: 3; grid-row: 3; }
#preview-axle-two { grid-column: 4; grid-row: 3; }
.plate-grid.has-axle-two > span:nth-child(11) { grid-column: 3; grid-row: 4; }
.plate-grid.has-axle-two > span:nth-child(12) { grid-column: 4; grid-row: 4; }
.engrave-label { font-size: .92em; font-weight: 800; letter-spacing: 0; }
.plate-extra { position: absolute; left: var(--safe-side); right: var(--safe-side); bottom: 4%; height: 6%; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; text-align: center; text-overflow: clip; font-size: 11px; font-weight: 700; line-height: 1; }

.emergency-stage { display: grid; gap: 16px; padding: 20px; border-radius: 14px; background: #d9dcda; }
.emergency-card { aspect-ratio: 85.6 / 54; padding: 7.2% 7%; overflow: hidden; border-radius: 5.8%; background: linear-gradient(145deg, #d62636, #ac111f); color: #fff4eb; box-shadow: 0 10px 16px rgba(0,0,0,.25); font-family: Arial, Helvetica, sans-serif; }
.emergency-title { height: 18%; display: flex; align-items: center; gap: 3%; padding-bottom: 2.2%; border-bottom: 2px solid rgba(255,255,255,.86); }
.emergency-title > div { min-width: 0; display: grid; }
.emergency-title strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 19px; line-height: 1; }
.emergency-title small { font-size: 8px; }
.small-medical-symbol { flex: none; width: clamp(18px, 2.8vw, 31px); height: clamp(23px, 3.6vw, 40px); color: currentColor; }
.small-medical-symbol svg { display: block; width: 100%; height: 100%; }
.medical-title { display: block; }
.medical-rows { display: grid; grid-template-rows: repeat(7, 1fr); height: 82%; }
.medical-rows > div { display: grid; grid-template-columns: 43% 57%; align-items: center; min-height: 0; border-bottom: 1px solid rgba(255,255,255,.76); }
.medical-rows b { font-size: 7.5px; }
.medical-rows span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; font-weight: 750; }
.back-rows { grid-template-rows: repeat(4, 1fr) 1.45fr; }
.back-rows > div { grid-template-columns: 49% 51%; }
.back-rows .tall { align-items: center; padding-top: 0; }
.back-rows .tall span { white-space: normal; line-height: 1.1; }
.preview-help { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.dot.light { background: #e7e7e3; }.hole-dot { background: #c4c9c6; }
.accuracy-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

dialog { width: min(620px, calc(100% - 30px)); max-height: calc(100dvh - 30px); overflow: auto; border: 1px solid rgba(216,168,69,.4); border-radius: 18px; padding: 26px; background: #111; color: var(--white); box-shadow: 0 24px 70px rgba(0,0,0,.7); }
dialog::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 0 18px; font-size: 28px; }
.dialog-close { position: absolute; right: 16px; top: 13px; border: 0; background: none; color: var(--muted); font-size: 30px; cursor: pointer; }
.review-list { display: grid; grid-template-columns: 1fr auto; gap: 9px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #090909; }
.review-list dt { color: var(--muted); }.review-list dd { margin: 0; text-align: right; font-weight: 750; }
.review-list dd { max-width: 340px; overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 18px; }
.disabled-checkout { opacity: .48; cursor: not-allowed; }

footer { display: flex; justify-content: space-between; gap: 22px; padding: 34px max(18px, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line); background: #080808; color: var(--muted); font-size: 13px; }
footer > div, footer nav { display: flex; gap: 17px; flex-wrap: wrap; }
footer strong { color: var(--white); } footer a { text-decoration: none; } footer a:hover { color: var(--gold-light); }

@media (max-width: 980px) {
  .configurator { grid-template-columns: 1fr; }
  .preview-panel { grid-row: 1; }
  .preview-sticky { position: static; }
  .plate-stage, .emergency-stage { max-width: 700px; margin-inline: auto; }
  .plate-title { font-size: 16px; }
  .plate-subtitle { font-size: 9px; }
  .plate-grid { font-size: 10px; }
  .plate-extra { font-size: 8px; }
  .emergency-title strong { font-size: 15px; }
  .emergency-title small { font-size: 6.5px; }
  .medical-rows b { font-size: 6px; }
  .medical-rows span { font-size: 8px; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 560px); }
  .site-header { min-height: 66px; padding-block: 4px; }
  .brand img { width: 98px; height: 49px; }
  .back-link { max-width: 150px; text-align: right; font-size: 12px; }
  .intro { display: block; padding-block: 34px 28px; }
  .intro h1 { font-size: 40px; }
  .intro p:not(.eyebrow) { font-size: 16px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 25px; }
  .steps li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 11px; }
  .editor, .preview-panel { padding: 17px; border-radius: 14px; }
  .configurator { gap: 12px; padding-bottom: 42px; }
  .preview-head h2, .section-head h2 { font-size: 19px; }
  .preview-head > span, .draft-badge { font-size: 10px; }
  .choice-card { min-height: 72px; grid-template-columns: 34px 1fr; padding: 10px; }
  .choice-icon { width: 34px; }
  .choice-card strong { font-size: 14px; }
  .choice-card small { font-size: 11px; }
  .format-grid, .two-col { grid-template-columns: 1fr; }
  .address-heading { display: grid; gap: 2px; }
  .address-heading span { text-align: left; }
  .plate-stage { padding: 16px 6px; }
  .plate-title { font-size: 11px; }
  .plate-subtitle { font-size: 6px; }
  .plate-grid { font-size: 7px; }
  .plate-extra { font-size: 6px; }
  .emergency-title strong { font-size: 11px; }
  .emergency-title small { font-size: 5px; }
  .emergency-stage { padding: 11px; }
  .medical-rows b { font-size: 5.2px; }
  .medical-rows span { font-size: 6.4px; }
  footer { display: grid; padding-block: 25px; }
  .dialog-actions { grid-template-columns: 1fr; }
}

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