/* AuraCurve Web-Planer — App-Optik: dunkle Paneele, Gold #FFC442, Radius 16. */

:root {
  --gold: #FFC442;
  --bg: #0B0E14;
  --panel: rgba(15, 18, 26, 0.92);
  --text: #EDEDEA;
  --muted: rgba(237, 237, 234, 0.62);
  --line: rgba(255, 255, 255, 0.10);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--gold); text-decoration: none; }

/* Kopf-Leiste */
.leiste {
  position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: rgba(11, 14, 20, 0.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.leiste-logo img { height: 26px; display: block; }
.leiste-titel { font-size: 15px; font-weight: 600; color: var(--muted); }
.leiste-rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.paletten { display: flex; gap: 6px; }
.palette-punkt {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.25); padding: 0;
}
.palette-punkt.aktiv { border-color: var(--gold); }

/* Karte */
#karte { position: fixed; inset: 56px 0 0 0; }

/* Knöpfe */
.knopf {
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 700;
  font-family: inherit;
}
.knopf.gold { background: var(--gold); color: #0B0E14; padding: 9px 16px; font-size: 14px; }
.knopf.gold:hover { background: #FFD060; }
.knopf.gold:disabled { background: rgba(255, 196, 66, 0.35); cursor: default; }
.knopf.klein {
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  padding: 8px 13px; font-size: 13px; font-weight: 600;
}
.knopf.klein:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); }
.knopf.klein:disabled { color: var(--muted); cursor: default; }

/* Seiten-Panel */
.panel {
  position: fixed; z-index: 30; left: 12px; top: 68px; bottom: 12px;
  width: 360px; max-width: calc(100vw - 24px);
  background: var(--panel); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.panel-block { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.panel-block:last-of-type { border-bottom: 0; padding-bottom: 0; }

.tour-name {
  width: 100%; background: rgba(255, 255, 255, 0.06); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-size: 14.5px; font-weight: 600; font-family: inherit; margin-bottom: 10px;
}
.tour-name:focus { outline: none; border-color: rgba(255, 196, 66, 0.6); }

/* Ortssuche (eigener Index) */
.suche { position: relative; }
.suche-treffer {
  position: absolute; left: 0; right: 0; top: calc(100% - 6px); z-index: 50;
  list-style: none; background: #171B26; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  max-height: 290px; overflow-y: auto;
}
.suche-treffer li {
  padding: 9px 12px; font-size: 13.5px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  border-left: 3px solid transparent;
}
.suche-treffer li.aktiv, .suche-treffer li:hover {
  background: rgba(255, 196, 66, 0.10); border-left-color: var(--gold);
}
.suche-treffer .t-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suche-treffer .t-info { color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* Wegpunkt-Liste */
.wegpunkte { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wegpunkt {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 9px; font-size: 13px;
}
.wegpunkt.zieht { opacity: 0.4; }
.wegpunkt .griff { cursor: grab; color: var(--muted); font-size: 15px; user-select: none; }
.wegpunkt .marke {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #0B0E14; background: var(--gold);
}
.wegpunkt .marke.via { background: #39404E; color: var(--text); border: 1.5px solid var(--gold); font-size: 10px; }
.wegpunkt .koord { color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wegpunkt .weg {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 2px 4px;
}
.wegpunkt .weg:hover { color: var(--text); }

.hinweis { font-size: 13px; color: var(--muted); padding: 2px 2px 8px; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Optionen */
.regler-zeile { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.regler-zeile label { font-size: 14px; font-weight: 600; }
.regler-wert { font-size: 13px; color: var(--gold); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--gold); margin-bottom: 10px; }
.schalter {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px;
  color: var(--muted); padding: 4px 0; cursor: pointer;
}
.schalter input { accent-color: var(--gold); width: 16px; height: 16px; }

/* Ergebnis */
.stats { display: flex; gap: 22px; align-items: center; }
.stat { display: flex; flex-direction: column; }
.stat-wert { font-size: 21px; font-weight: 800; color: var(--gold); }
.stat-name { font-size: 12px; color: var(--muted); }
.lade {
  width: 18px; height: 18px; border-radius: 50%; margin-left: auto;
  border: 2.5px solid rgba(255, 196, 66, 0.25); border-top-color: var(--gold);
  animation: drehen 0.8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.alternativen { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.alternativen:empty { margin-top: 0; }
.alt-pille {
  border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.05);
  color: var(--text); border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.alt-pille.aktiv { background: var(--gold); color: #0B0E14; border-color: var(--gold); }

.fehler {
  background: rgba(255, 96, 74, 0.12); border: 1px solid rgba(255, 96, 74, 0.45);
  color: #FF9C8C; border-radius: 10px; padding: 9px 12px; font-size: 13px;
}

.panel-fuss { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* QR-Dialog */
.qr-schleier {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
/* display:flex überstimmt sonst das hidden-Attribut. */
.qr-schleier[hidden] { display: none; }
.qr-blatt {
  background: #12151E; border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; max-width: 380px; text-align: center;
}
.qr-blatt h2 { font-size: 18px; margin-bottom: 16px; }
.qr-bild { background: #FFFFFF; border-radius: 12px; padding: 10px; display: inline-block; }
.qr-bild svg { display: block; width: 240px; height: 240px; }
.qr-text { font-size: 13px; color: var(--muted); margin: 14px 0 4px; text-align: left; }
.qr-blatt .reihe { justify-content: center; margin-top: 12px; }

/* Toast */
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: rgba(18, 21, 30, 0.95); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 10px 18px; font-size: 13.5px;
}

/* Wegpunkt-Marker auf der Karte */
.marker-punkt {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 800 12px system-ui, sans-serif; color: #0B0E14;
  background: var(--gold); border: 2px solid #0B0E14;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); cursor: grab;
}
.marker-punkt.via {
  width: 20px; height: 20px; font-size: 10px;
  background: #2B303C; color: #EDEDEA; border-color: var(--gold);
}

/* Handy: Panel als unteres Blatt */
@media (max-width: 720px) {
  .panel {
    left: 8px; right: 8px; top: auto; bottom: 8px; width: auto;
    max-height: 46vh;
  }
  .leiste-titel { display: none; }
  #karte { inset: 56px 0 0 0; }
}
