:root {
  --green-900: #0b3d2e;
  --green-700: #135c45;
  --green-500: #1f8a62;
  --green-100: #e3f3ec;
  --amber: #f2a93b;
  --amber-100: #fff4e0;
  --red: #c8412f;
  --ink: #17221d;
  --muted: #5e6b65;
  --line: #dde4e0;
  --bg: #f5f7f4;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 40, 30, .06), 0 6px 20px rgba(15, 40, 30, .06);
  --side-1: #ff4d2e;
  --side-2: #2e7dff;
  --side-3: #ffb000;
  --side-4: #c03dff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

.test-banner {
  background: repeating-linear-gradient(-45deg, #ffe08a, #ffe08a 12px, #ffd25c 12px, #ffd25c 24px);
  color: #4a3500; text-align: center; font-size: .85rem; font-weight: 600; padding: 6px 12px;
}
.topbar { background: var(--green-900); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand svg { flex: none; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--amber); color: #3b2600; }
.topbar .spacer { flex: 1; }
.topbar a.link { color: #cfe9de; font-size: .9rem; text-decoration: none; }

.wrap { max-width: 760px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.wrap.wide { max-width: 1200px; }
main { padding-bottom: 120px; }

.hero { background: linear-gradient(180deg, var(--green-900), var(--green-700)); color: #fff; padding: 22px 0 64px; }
.hero p { color: #d6efe5; max-width: 34em; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 12px 0 0; list-style: none; font-size: .92rem; color: #e9f7f1; }
.hero-points li::before { content: "✓ "; color: var(--amber); font-weight: 700; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.hero + .wrap > .card:first-child, .lift { margin-top: -44px; position: relative; }

.steps { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.steps li { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.done, .steps li.active { background: var(--green-500); }
.step-label { font-size: .8rem; font-weight: 600; color: var(--green-700); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  min-height: 48px; transition: border-color .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(31, 138, 98, .15); }
.field { margin-bottom: 14px; }
.grid { display: grid; gap: 12px; }
.grid-addr { grid-template-columns: 1fr 110px; }
.grid-city { grid-template-columns: 110px 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 12px; padding: 13px 20px; min-height: 48px; text-decoration: none;
  background: var(--green-500); color: #fff; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--green-100); color: var(--green-900); }
.btn.ghost { background: transparent; color: var(--green-700); padding-left: 8px; padding-right: 8px; }
.btn.danger { background: #fbe4e0; color: var(--red); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 9px; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; }
.actions .btn:last-child { flex: 1; max-width: 320px; margin-left: auto; }

/* Autovervollständigung */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); margin: 0; padding: 4px; list-style: none; max-height: 300px; overflow: auto; }
.ac-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.ac-list li:hover, .ac-list li.sel { background: var(--green-100); }
.ac-list li small { display: block; color: var(--muted); }

.notice { border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: .93rem; }
.notice.info { background: var(--green-100); color: var(--green-900); }
.notice.warn { background: var(--amber-100); color: #5a3d00; }
.notice.error { background: #fde8e4; color: #7c1f12; }
.notice.neighbors { background: linear-gradient(90deg, #fff4e0, #ffe9c2); color: #4f3300; font-weight: 600; }

/* Karte */
#map, .map { height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e9ece9; }
@media (min-width: 700px) { #map { height: 430px; } }
.map-wrap { position: relative; margin: 8px 0 12px; }
.map-hint { position: absolute; z-index: 500; left: 50%; transform: translateX(-50%); top: 10px; background: rgba(11, 61, 46, .92); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.leaflet-container { font: inherit; }
.side-label { background: #fff; border: 2px solid currentColor; border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: .82rem; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.vertex-icon { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--amber); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }

.sides { list-style: none; padding: 0; margin: 0 0 12px; }
.sides li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sides li:last-child { border-bottom: 0; }
.swatch { width: 16px; height: 6px; border-radius: 3px; flex: none; }
.sides .len { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.sides input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green-500); }
.total-front { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; background: var(--green-100); border-radius: 12px; padding: 12px 14px; }
.total-front strong { font-size: 1.6rem; color: var(--green-900); font-variant-numeric: tabular-nums; }
.correct-row { display: flex; gap: 10px; align-items: end; margin-top: 12px; }
.correct-row .field { flex: 1; margin: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--amber-100); color: #6a4700; }
.tag.green { background: var(--green-100); color: var(--green-900); }
.tag.red { background: #fde8e4; color: var(--red); }
.tag.blue { background: #e4eeff; color: #1d4fb8; }
.tag.grey { background: #eceeed; color: #4e5853; }

/* Add-ons */
.addon { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; transition: border-color .15s, background .15s; }
.addon.on { border-color: var(--green-500); background: #f7fcf9; }
.addon-head { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.addon-head input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--green-500); flex: none; }
.addon-head .price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.addon-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .92rem; cursor: pointer; min-height: 40px; }
.chip.on { border-color: var(--green-500); background: var(--green-100); color: var(--green-900); font-weight: 700; }
.draw-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }

/* Preisleiste */
.pricebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 40, 30, .08); padding-bottom: env(safe-area-inset-bottom); }
.pricebar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.pricebar .amount { font-size: 1.5rem; font-weight: 800; color: var(--green-900); font-variant-numeric: tabular-nums; }
.pricebar .sub { font-size: .8rem; color: var(--muted); }
.pricebar button.toggle { margin-left: auto; }
.breakdown { border-top: 1px solid var(--line); padding: 8px 0 12px; }
.breakdown table, table.lines { width: 100%; border-collapse: collapse; font-size: .92rem; }
.breakdown td, table.lines td { padding: 4px 0; }
.breakdown td:last-child, table.lines td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.disc td { color: var(--green-700); font-weight: 600; }
tr.sum td { border-top: 1px solid var(--line); font-weight: 800; padding-top: 8px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .93rem; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--green-500); }

.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-100); display: grid; place-items: center; margin-bottom: 12px; }
.booking-no { font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; background: var(--green-100); color: var(--green-900); display: inline-block; padding: 6px 14px; border-radius: 10px; font-variant-numeric: tabular-nums; }

.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.secondary .spinner { border-color: rgba(11,61,46,.2); border-top-color: var(--green-900); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: absolute; inset: 0; z-index: 600; background: rgba(255,255,255,.75); display: grid; place-items: center; font-weight: 600; color: var(--green-900); }

footer.site { padding: 24px 0 40px; color: var(--muted); font-size: .88rem; text-align: center; }
footer.site a { color: var(--muted); margin: 0 8px; }

/* Rechtstexte */
.legal h2 { margin-top: 1.4em; font-size: 1.1rem; }
.placeholder { background: #fff4c2; padding: 0 4px; border-radius: 3px; }
