/* Plopptown Prototyp: Handy zuerst. Markenfarben Orange #ff6b3d, Navy #1f2a44, Mint #2fbf85, Gras #8fd06a. */
:root {
  --orange: #ff6b3d;
  --orange-dunkel: #e8552a;
  --orange-weich: #fff0ea;
  --navy: #1f2a44;
  --mint: #2fbf85;
  --mint-weich: #e3f6ee;
  --gras: #8fd06a;
  --bg: #f3f5f9;
  --flaeche: #ffffff;
  --tinte: #1f2a44;
  --leise: #5d6783;
  --linie: #e3e7f0;
  --rot: #d63c30;
  --schatten: 0 6px 18px rgba(31, 42, 68, 0.12);
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --kopf: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121826; --flaeche: #1b2334; --tinte: #e9edf6; --leise: #a3acc4; --linie: #2c3650; --orange-weich: #3a2219; --mint-weich: #15332a;
    --schatten: 0 6px 18px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121826; --flaeche: #1b2334; --tinte: #e9edf6; --leise: #a3acc4; --linie: #2c3650; --orange-weich: #3a2219; --mint-weich: #15332a;
  --schatten: 0 6px 18px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tinte); font-family: var(--text); font-size: 16px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 30; height: var(--kopf);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--flaeche); box-shadow: 0 1px 0 var(--linie);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--orange); }
.logo-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--orange); display: grid; place-items: center; box-shadow: 0 3px 0 var(--orange-dunkel); }
.logo-icon svg { width: 22px; height: 22px; fill: #fff; }
.logo-text { font-family: var(--display); font-size: 27px; letter-spacing: 0.01em; }
.kopf-rechts { display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; letter-spacing: 0.08em; color: var(--rot); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); animation: puls 1.6s infinite; }
@keyframes puls { 50% { opacity: 0.3; } }
.insta-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--bg); color: var(--tinte);
  text-decoration: none; font-weight: 800; font-size: 13.5px; }
.insta-knopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.insta-knopf svg .voll { fill: currentColor; stroke: none; }

@media (max-width: 420px) {
  .live { display: none; }
  .logo-text { font-size: 25px; }
}
@media (max-width: 360px) {
  .insta-knopf span { display: none; }
  .insta-knopf { padding: 8px; }
}

/* ---------- Seite ---------- */
.seite { display: grid; gap: 0; }
.einstieg { padding: 18px 16px 14px; display: grid; gap: 6px; }
.einstieg h1 { font-size: clamp(32px, 9vw, 48px); color: var(--tinte); }
.einstieg h1 span { color: var(--orange); }
.einstieg p { color: var(--leise); font-weight: 600; font-size: 15px; max-width: 46ch; }
.einstieg .alle-namen { width: fit-content; margin-top: 4px; padding: 7px 12px; border-radius: 12px; background: var(--mint-weich); color: var(--tinte); font-size: 13.5px; }
.einstieg .alle-namen b { color: #1a9a68; }

/* ---------- Karte ---------- */
.karte { position: relative; height: min(66svh, 620px); min-height: 420px; background: var(--gras); overflow: hidden; touch-action: pan-y; }
.karte canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.karte canvas:active { cursor: grabbing; }
.schilder { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.etikett { position: absolute; left: 0; top: 0; padding: 4px 12px 3px; border-radius: 999px; background: #fff; color: #1f2430; white-space: nowrap; text-align: center;
  font-family: var(--display); font-size: 16px; line-height: 1.05; border: 2.5px solid #2b2f3a; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); transition: opacity 0.2s; }
.etikett::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top: 7px solid #2b2f3a; }
.etikett .u { display: block; font-family: var(--text); font-weight: 800; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-dunkel); }
.etikett.gruen .u { color: #1a9a68; }
.etikett.klein { font-size: 13px; padding: 3px 9px 2px; }
.etikett.person { font-family: var(--text); font-weight: 800; font-size: 11px; padding: 2px 8px; border-width: 2px; background: rgba(255,255,255,0.92); }
.etikett.person::after { display: none; }
.etikett small { font-family: var(--text); font-weight: 800; font-size: 11px; color: var(--leise); }
.etikett.klein .u { font-size: 8px; }

.suche { position: absolute; z-index: 3; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px;
  background: #fff; border-radius: 16px; box-shadow: var(--schatten); color: #1f2a44; }
.suche svg { width: 20px; height: 20px; fill: none; stroke: #5d6783; stroke-width: 2.4; stroke-linecap: round; flex: none; }
.suche input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-weight: 700; font-size: 16px; color: #1f2a44; }
.suche input::placeholder { color: #7a839b; }
.suche:focus-within { box-shadow: 0 0 0 3px var(--orange), var(--schatten); }

.laufband { position: absolute; z-index: 2; left: 50%; top: 72px; transform: translateX(-50%); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(31, 42, 68, 0.86); color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.laufband span:last-child { overflow: hidden; text-overflow: ellipsis; }
.laufband .punkt { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; font-family: var(--display); font-size: 13px; flex: none; }
.laufband.neu { animation: wackel 0.5s; }
@keyframes wackel { 30% { transform: translateX(-50%) scale(1.07); } }

.chips { position: absolute; z-index: 2; left: 12px; right: 64px; bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap-reverse; }
.chip { display: flex; align-items: center; gap: 6px; padding: 6px 13px 6px 8px; border-radius: 999px; background: rgba(32, 36, 48, 0.84); color: #fff;
  border: 2.5px solid rgba(255, 255, 255, 0.9); font-family: var(--display); font-size: 19px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.chip svg { width: 18px; height: 18px; fill: #fff; }
.chip small { font-family: var(--text); font-weight: 800; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.muenze { width: 19px; height: 19px; border-radius: 50%; background: #ffc83d; color: #8a5a00; border: 1.5px solid #8a5a00; display: grid; place-items: center;
  font-family: var(--text); font-weight: 900; font-size: 11px; }
.karten-knoepfe { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.knopf-rund { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; box-shadow: var(--schatten); color: #1f2a44;
  display: grid; place-items: center; cursor: pointer; font-size: 19px; }
.knopf-rund.breit { width: auto; padding: 0 12px 0 10px; display: flex; gap: 6px; font-family: var(--display); font-size: 17px; }
.knopf-rund svg { width: 20px; height: 20px; fill: none; stroke: #1f2a44; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.lade { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--gras); color: #1f3a1a;
  font-weight: 800; transition: opacity 0.4s; }
.lade.weg { opacity: 0; pointer-events: none; }
.lade-haus { width: 56px; height: 56px; border-radius: 16px; background: var(--orange) url("bilder/icon.svg") center / cover; animation: plopp 0.9s infinite; box-shadow: 0 5px 0 var(--orange-dunkel); }
@keyframes plopp { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.15, 0.85); } 55% { transform: scale(0.92, 1.12) translateY(-10px); } }

/* Steckbrief-Blatt über der Karte */
.blatt { position: absolute; z-index: 5; left: 10px; right: 10px; bottom: 10px; padding: 16px; border-radius: 20px; background: var(--flaeche); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: grid; gap: 14px; animation: hoch 0.25s ease-out; }
@keyframes hoch { from { transform: translateY(20px); opacity: 0; } }
.blatt-zu { position: absolute; right: 8px; top: 6px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; color: var(--leise); cursor: pointer; }
.blatt-kopf { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 22px; }
.avatar.gruen { background: var(--mint); }
.blatt h2 { font-size: 22px; }
.blatt p { color: var(--leise); font-weight: 600; font-size: 14px; }
.blatt-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blatt-knoepfe .knopf:only-child { grid-column: 1 / -1; }

/* Liste aller Einwohner */
.blatt.liste { top: 72px; display: flex; flex-direction: column; gap: 10px; }
.blatt.liste h2 { font-size: 22px; padding-right: 30px; }
.blatt.liste input { height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--linie); background: var(--bg); font-weight: 600; font-size: 16px; outline: 0; }
.blatt.liste input:focus { border-color: var(--orange); }
.blatt.liste ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; display: grid; align-content: start; gap: 2px; }
.blatt.liste li button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 6px 6px; border: 0; border-radius: 12px;
  background: none; text-align: left; cursor: pointer; }
.blatt.liste li button:hover { background: var(--bg); }
.blatt.liste li b { font-weight: 800; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blatt.liste li small { color: var(--leise); font-weight: 700; font-size: 12.5px; }
.blatt.liste .leer { color: var(--leise); font-weight: 600; font-size: 14px; padding: 8px 4px; }
.avatar.klein { width: 34px; height: 34px; font-size: 15px; background: var(--mint); }

/* ---------- Kästen ---------- */
.spalte { display: grid; gap: 14px; padding: 16px; }
.karte-kasten { background: var(--flaeche); border-radius: 22px; padding: 20px 18px; display: grid; gap: 10px; box-shadow: 0 1px 0 var(--linie); }
.ueber { font-weight: 900; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.karte-kasten h2 { font-size: 27px; }
.karte-kasten h3 { font-size: 19px; }
.leise { color: var(--leise); font-weight: 600; font-size: 14.5px; }
.fein { color: var(--leise); font-size: 12.5px; font-weight: 600; }

/* Abstimmung */
.optionen { display: grid; gap: 10px; margin-top: 4px; }
.option { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px;
  border: 2px solid var(--linie); border-radius: 16px; background: var(--flaeche); cursor: pointer; text-align: left; overflow: hidden; transition: border-color 0.15s, transform 0.1s; }
.option:active { transform: scale(0.98); }
.option .balken { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--orange-weich); transition: width 0.5s ease-out; z-index: 0; }
.option > *:not(.balken) { position: relative; z-index: 1; }
.option .bild { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--bg); }
.option b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; }
.option small { display: block; font-weight: 700; font-size: 12.5px; color: var(--leise); }
.option small.teuer { color: var(--rot); }
.option .prozent { font-family: var(--display); font-size: 20px; color: var(--leise); min-width: 3ch; text-align: right; }
.option.gewaehlt { border-color: var(--orange); }
.option.gewaehlt .prozent { color: var(--orange); }
.option.gewaehlt .balken { background: color-mix(in srgb, var(--orange) 22%, transparent); }

/* Warteliste */
.warteliste form { display: grid; gap: 8px; margin-top: 4px; }
.warteliste label { font-weight: 800; font-size: 13.5px; }
.warteliste input[type="email"], .warteliste input[type="text"] { width: 100%; height: 50px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--linie); background: var(--bg);
  font-weight: 600; font-size: 16px; outline: 0; }
.warteliste input:focus { border-color: var(--orange); }
.mit-at { position: relative; }
.mit-at span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--leise); }
.mit-at input { padding-left: 32px !important; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 600 !important; font-size: 13.5px !important; color: var(--leise); margin-top: 4px; cursor: pointer; }
.haken input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--orange); }
.fehler { color: var(--rot); font-weight: 700; font-size: 13.5px; min-height: 0; }
.fehler:empty { display: none; }
.einladung { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--mint-weich); font-weight: 700; font-size: 14px; }
.einladung .avatar { width: 34px; height: 34px; font-size: 15px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--orange); color: #fff;
  font-family: var(--display); font-size: 19px; letter-spacing: 0.01em; cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 var(--orange-dunkel); transition: transform 0.08s; }
.knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-dunkel); }
.knopf.leicht { background: var(--bg); color: var(--tinte); box-shadow: 0 4px 0 var(--linie); }
.knopf.klein { min-height: 44px; font-size: 16px; padding: 0 14px; }

.erfolg { display: grid; gap: 14px; margin-top: 4px; }
.erfolg-kopf { display: grid; gap: 10px; }
.erfolg-kopf p { font-weight: 600; }
.stempel { width: fit-content; padding: 4px 14px 2px; border: 3px solid var(--mint); color: var(--mint); border-radius: 10px; font-family: var(--display); font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.05em; transform: rotate(-4deg); }
.teilen { display: grid; gap: 10px; padding-top: 14px; border-top: 2px dashed var(--linie); }
.link-zeile { display: flex; gap: 8px; }
.link-zeile input { flex: 1; min-width: 0; height: 44px !important; font-size: 14px !important; }

/* So ziehst du ein */
.schritte { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.schritte li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; counter-increment: s; }
.schritte li::before { content: counter(s); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--orange-weich); color: var(--orange);
  display: grid; place-items: center; font-family: var(--display); font-size: 19px; }
.schritte b { font-weight: 800; }
.schritte span { color: var(--leise); font-size: 14px; font-weight: 600; }
.insta-gross { background: linear-gradient(100deg, #ff6b3d, #e8407a 70%, #b03ad6); box-shadow: 0 4px 0 #9c2f63; }
.bald { background: linear-gradient(160deg, var(--flaeche), var(--mint-weich)); }
.bald .ueber { color: var(--mint); }
.gruen-knopf { background: var(--mint); box-shadow: 0 4px 0 #1f9e6c; }

.werkzeug { padding: 4px 6px; color: var(--leise); font-size: 14px; }
.werkzeug summary { cursor: pointer; font-weight: 800; }
.werkzeug p { margin: 8px 0; }
.werkzeug-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.fuss { padding: 8px 6px 28px; color: var(--leise); font-size: 12.5px; font-weight: 600; display: grid; gap: 4px; }

.meldung { position: fixed; z-index: 50; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); padding: 12px 20px; border-radius: 14px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 14.5px; box-shadow: var(--schatten); transition: transform 0.3s, visibility 0.3s; max-width: calc(100% - 32px); text-align: center;
  visibility: hidden; transform: translate(-50%, calc(100% + 40px)); }
.meldung.an { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Breiter Bildschirm: Karte links fest, Kästen rechts ---------- */
@media (min-width: 900px) {
  .seite { grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto 1fr; }
  .einstieg { grid-column: 2; grid-row: 1; padding: 24px 24px 0; }
  .karte { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: var(--kopf); height: calc(100svh - var(--kopf)); }
  .spalte { grid-column: 2; grid-row: 2; padding: 16px 24px; align-content: start; }
  .suche { left: 24px; right: auto; width: min(440px, calc(100% - 48px)); top: 20px; }
  .laufband { top: 84px; left: 24px; transform: none; }
  .laufband.neu { animation: none; }
  .chips { left: 24px; bottom: 24px; }
  .karten-knoepfe { right: 24px; bottom: 24px; }
  .blatt { left: auto; right: 24px; bottom: 80px; width: 380px; }
  .blatt.liste { top: 84px; bottom: 24px; right: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Navigation unten (wie im Spiel), nur auf dem Handy */
.unten-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--flaeche);
  border-top: 1px solid var(--linie); padding: 4px 0 max(6px, env(safe-area-inset-bottom)); }
.unten-nav a { display: grid; justify-items: center; gap: 1px; padding: 5px 0; text-decoration: none; font-weight: 800; font-size: 11px; color: var(--leise); }
.unten-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.unten-nav .aktiv { color: var(--orange); }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.meldung { bottom: calc(76px + env(safe-area-inset-bottom)); }
.fuss a { color: var(--leise); font-weight: 800; }
#abstimmung .insta-gross { margin-top: 4px; }
.option { cursor: pointer; }
@media (min-width: 900px) {
  .unten-nav { display: none; }
  body { padding-bottom: 0; }
  .meldung { bottom: max(20px, env(safe-area-inset-bottom)); }
}

/* Rechtstexte (Impressum, Datenschutz) */
.recht { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.recht h1 { font-size: clamp(34px, 7vw, 48px); color: var(--orange); margin: 8px 0 18px; }
.recht h2 { font-size: 24px; margin: 30px 0 8px; }
.recht h3 { font-size: 19px; margin: 18px 0 6px; }
.recht p, .recht li { color: var(--tinte); }
.recht ul { padding-left: 20px; }
.recht a { color: var(--orange-dunkel); }
.recht .leise { color: var(--leise); font-size: 14px; }
.recht .fehlt { background: #ffe08a; color: #3b2d00; padding: 0 6px; border-radius: 6px; font-weight: 700; }
.recht address { font-style: normal; line-height: 1.6; }
.recht .zurueck { display: inline-block; margin-top: 28px; font-weight: 700; }
/* Freundes-Straße: Straßenname über dem Schild (weiß mit Navy-Rand wie im Video) */
.etikett.strasse { border-radius: 8px; border-color: #1f2a44; text-transform: uppercase; letter-spacing: 0.03em; font-size: 15px; padding: 3px 10px 2px; }
.etikett.strasse .u { color: #1a9a68; }
