/* ============================================================
   RadGuide Göttingen – Styles (mobile-first)
   ============================================================ */
:root {
  --green: #2e9e4f;
  --green-dark: #237a3c;
  --ink: #1c2430;
  --muted: #6b7785;
  --line: #e4e8ee;
  --bg: #f4f6f8;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(20, 35, 55, .12);
  --shadow-sm: 0 2px 8px rgba(20, 35, 55, .10);
  --radius: 16px;
  --appbar-h: 54px;
  --steps-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; margin: 0; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Kopfzeile ---------- */
#appbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: calc(var(--appbar-h) + var(--safe-t));
  padding-top: var(--safe-t);
  display: flex; align-items: center; gap: 8px;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.appbar-title { flex: 1; display: flex; flex-direction: column; line-height: 1.05; }
.brand { font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 7px; }
.brand-logo { width: 22px; height: 22px; border-radius: 6px; display: block; }
.appbar-sub { font-size: .72rem; opacity: .85; }
.iconbtn {
  width: 40px; height: 40px; margin: 0 6px;
  border: none; background: rgba(255,255,255,.16); color: #fff;
  border-radius: 12px; font-size: 1.3rem; line-height: 1;
  display: grid; place-items: center;
}
.iconbtn.lang-toggle { width: auto; min-width: 34px; padding: 0 9px; font-size: .82rem; font-weight: 800; letter-spacing: .02em; }
.iconbtn.light { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.iconbtn.nav-stop { background: #d9534f; color: #fff; box-shadow: var(--shadow-sm); font-size: 1.05rem; }
.iconbtn:active { transform: scale(.94); }

/* ---------- Reiter: Ziele wählen / Tour ---------- */
#steps {
  position: fixed; left: 0; right: 0; z-index: 999;
  top: calc(var(--appbar-h) + var(--safe-t));
  height: var(--steps-h);
  display: flex; background: #fff; border-bottom: 1px solid var(--line);
}
.step {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: none; background: transparent; cursor: pointer; height: 100%;
  color: var(--muted); border-bottom: 3px solid transparent; line-height: 1.15;
}
.step-no { font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.step-tx { font-size: .92rem; font-weight: 700; }
.step[data-screen="select"] .step-tx {
  display: inline-block; transform-origin: center;
  animation: stepWabern 1.5s ease-in-out infinite;
}
@keyframes stepWabern {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.11); }
}
.step.is-active { color: var(--green); border-bottom-color: var(--green); background: #f3fcf6; }
.step:disabled { opacity: .4; cursor: default; }
.step:not(:first-child) { border-left: 1px solid var(--line); }

/* ---------- Screens ---------- */
#app {
  position: fixed; inset: 0;
  top: calc(var(--appbar-h) + var(--steps-h) + var(--safe-t));
  bottom: 0;
}
.screen { display: none; position: absolute; inset: 0; }
.screen.is-active { display: block; }
.pad { padding: 18px 18px 8px; }
.lead { color: var(--muted); margin: 0 0 18px; }

/* screen 1 is scrollable content + sticky action */
#screen-prefs { overflow-y: auto; padding-bottom: 96px; }
.screen-actions {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.screen-actions.floating { background: transparent; pointer-events: none; }
.screen-actions.floating .btn { pointer-events: auto; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: 14px; padding: 14px 18px;
  font-size: 1rem; font-weight: 700; color: #fff; background: var(--green);
  box-shadow: var(--shadow-sm); transition: transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); }
.btn-primary:disabled { background: #b9c3cd; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 13px; font-size: .85rem; border-radius: 11px; }
.btn-ghost { background: #eef1f5; color: var(--ink); box-shadow: none; }
.btn-ghost:disabled { color: #aeb6bf; }

/* ---------- Kategorien (Vorlieben) ---------- */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line);
  box-shadow: var(--shadow-sm); text-align: left;
  color: var(--ink); font-weight: 600; font-size: .92rem;
}
.cat .emoji { font-size: 1.5rem; }
.cat.is-on { border-color: var(--green); background: #eafaef; }
.cat.is-on::after { content: "✓"; margin-left: auto; color: var(--green); font-weight: 800; }

.field { margin-top: 22px; }
.field > label { display: block; font-weight: 600; margin-bottom: 8px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--green); }
.range-row output {
  min-width: 34px; text-align: center; font-weight: 800; color: var(--green);
  background: #eafaef; border-radius: 9px; padding: 4px 8px;
}

/* ---------- Karte ---------- */
#map, #mapTour { position: absolute; inset: 0; }
.leaflet-container { background: #dfe6ec; font: inherit; }

/* ---------- Ortssuche auf der Karte ---------- */
.map-search {
  position: absolute; z-index: 600; top: 12px; left: 56px; right: 12px;
  max-width: 520px; display: flex; gap: 7px;
}
.ms-field { position: relative; flex: 1; min-width: 0; }
.map-search input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: .95rem;
  padding: 11px 46px 11px 14px; border: none; border-radius: 12px;
  background: #fff; color: var(--ink); box-shadow: 0 4px 16px rgba(20,35,55,.22);
}
.map-search input:focus { outline: 2px solid var(--green); }
.map-search .ms-go-in {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; border-radius: 9px; cursor: pointer;
  background: var(--green); color: #fff; font-size: 1.2rem; font-weight: 800;
}
.map-search .ms-go-in:active { transform: translateY(-50%) scale(.94); }
.map-search .ms-loc {
  flex: none; width: 46px; border: none; border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--green); font-size: 1.4rem; font-weight: 800;
  box-shadow: 0 4px 16px rgba(20,35,55,.22);
}
.map-search .ms-loc:active { transform: scale(.96); }
.map-search .ms-loc.is-loading { opacity: .55; }
.ms-filter {
  flex: none; border: none; border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--ink); font-weight: 700; font-size: .88rem;
  padding: 0 12px; box-shadow: 0 4px 16px rgba(20,35,55,.22); white-space: nowrap;
}
.ms-filter.is-active { background: var(--green); color: #fff; }
.ms-filter:active { transform: scale(.96); }
.search-pin { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }


/* eigene Marker */
.poi-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2.5px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.poi-pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.poi-pin.is-sel { outline: 3px solid #ffd23f; }
.num-pin {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 800;
  border: 2.5px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35);
  display: grid; place-items: center; font-size: 14px;
}
.me-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2196f3; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(33,150,243,.3);
}

/* ---------- Bottom Sheet (Liste) ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 500;
  background: var(--card); border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 28px rgba(20,35,55,.18);
  height: var(--sheet-h, 58%); min-height: 92px; max-height: 92%;
  display: flex; flex-direction: column;
}
.sheet-grip {
  flex: none; height: 28px; cursor: grab; touch-action: none;
  display: flex; align-items: center; justify-content: center;
}
.sheet-grip::before {
  content: ""; display: block;
  width: 64px; height: 7px; border-radius: 4px; background: #c4ccd4;
}
.sheet.is-dragging .sheet-grip { cursor: grabbing; }
.sheet.is-dragging .sheet-grip::before { background: var(--green); }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 6px 16px 10px; border-bottom: 1px solid var(--line);
  touch-action: none;
}
.sheet-head strong { font-size: 1rem; }
.view-toggle, .guide-modes { display: flex; background: #eef1f5; border-radius: 11px; padding: 3px; }
.seg {
  border: none; background: transparent; color: var(--muted);
  font-weight: 700; font-size: .82rem; padding: 7px 12px; border-radius: 9px;
}
.seg.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- POI-Liste ---------- */
.poi-list, .tour-list {
  list-style: none; margin: 0; padding: 6px 10px calc(16px + var(--safe-b));
  overflow-y: auto; flex: 1 1 auto; min-height: 0;
}
.sheet-foot {
  flex: none; padding: 10px 14px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line); background: #fff;
  border-radius: 0 0 20px 20px;
}
.poi {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px; margin-bottom: 8px;
  background: #fff; border: 1.5px solid var(--line);
}
.poi.is-sel { border-color: var(--green); background: #f3fcf6; }
.poi-ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 1.3rem; color: #fff;
}
.poi-body { flex: 1; min-width: 0; }
.poi-name { font-weight: 700; font-size: .96rem; }
.poi-name .poi-star { color: #f5b301; font-size: .9em; }
.poi-sub { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.poi-actions { display: flex; gap: 6px; align-items: center; }
/* Kategorie-PNG-Icon (gerahmtes Motiv bringt eigenen Hintergrund/Rahmen mit) */
.cat-img { display: block; object-fit: contain; }
.poi-ic.poi-ic-img { background: transparent; padding: 0; }
.poi-ic.poi-ic-img .cat-img { width: 100%; height: 100%; border-radius: 11px; }
.chipbtn {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 8px 10px; font-size: .8rem; font-weight: 700;
}
.chipbtn.add { color: var(--green); border-color: var(--green); }
.chipbtn.is-sel { background: var(--green); color: #fff; border-color: var(--green); }
.chipbtn.audio { color: var(--green-dark); }

/* ---------- Tour-Liste (nummeriert) ---------- */
.tour-list { counter-reset: stop; }
.tour-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px; margin-bottom: 8px;
  background: #fff; border: 1.5px solid var(--line);
}
.tour-item.is-next { border-color: var(--green); background: #f3fcf6; }
.tour-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--green); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: .9rem;
}
.tour-leg { font-size: .74rem; color: var(--muted); }

/* ---------- Navigations-Banner ---------- */
.nav-banner {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 600;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.nav-banner-main { flex: 1; display: flex; flex-direction: column; }
.nav-banner-main #navNextName { font-weight: 800; }
.nav-dist { font-size: .82rem; color: var(--green-dark); font-weight: 700; }
.nav-arrow {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 1.6rem; line-height: 1;
  transition: transform .35s ease; box-shadow: var(--shadow-sm);
}
.nav-arrow.is-arrived { background: var(--green-dark); }

/* ---------- Audioguide Overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(18,28,40,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.guide-card {
  width: 100%; max-width: 560px; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(24px + var(--safe-b));
  box-shadow: var(--shadow); position: relative;
  animation: slideUp .22s ease;
  max-height: 88%; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.guide-close { position: absolute; top: 12px; right: 12px; background: #eef1f5; color: var(--ink); }
.guide-cat { font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
#guideName { margin: 4px 0 14px; padding-right: 40px; }
.guide-modes { width: max-content; margin-bottom: 14px; }
.guide-text { font-size: 1.02rem; line-height: 1.62; margin: 0 0 18px; }
.guide-controls { display: flex; gap: 10px; }
.btn-audio { flex: 1; }
.btn-audio.is-playing { background: var(--green-dark); }
.guide-foot { font-size: .76rem; margin: 12px 0 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
  z-index: 3000; background: #1c2430; color: #fff;
  padding: 11px 16px; border-radius: 12px; font-size: .85rem; font-weight: 600;
  box-shadow: var(--shadow); max-width: 90%; text-align: center;
}

/* ===================== Landing / Hero ===================== */
body.immersive #app { top: 0; }
.btn-lg { padding: 16px 20px; font-size: 1.05rem; border-radius: 16px; }

.screen-landing { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.hero {
  position: relative; min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-t)) 20px calc(20px + var(--safe-b));
  background:
    radial-gradient(120% 80% at 82% -10%, rgba(122,240,166,.32), transparent 60%),
    radial-gradient(90% 70% at 0% 112%, rgba(25,215,197,.24), transparent 55%),
    linear-gradient(160deg, #2fa552 0%, var(--green-dark) 60%, #0f2c1b 100%);
  color: #fff; overflow: hidden;
}

/* animierte Karten-Szene (dekorativ) */
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hs-blocks rect { opacity: .06; }
.hs-route {
  stroke-dasharray: 9 13; animation: routeFlow 1.1s linear infinite;
  filter: drop-shadow(0 0 6px rgba(191,247,209,.5));
}
@keyframes routeFlow { to { stroke-dashoffset: -22; } }
.hs-pins .pin { transform-box: fill-box; transform-origin: center; animation: pinPop .7s ease both; }
.hs-pins .p1 { animation-delay: .5s; } .hs-pins .p2 { animation-delay: .9s; } .hs-pins .p3 { animation-delay: 1.3s; }
@keyframes pinPop { 0% { transform: scale(0); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hs-dot { filter: drop-shadow(0 0 7px rgba(255,255,255,.95)); }

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(46px); }
.blob.b1 { width: 300px; height: 300px; background: #7af0a6; opacity: .30; top: -80px; right: -60px; animation: float1 9s ease-in-out infinite; }
.blob.b2 { width: 240px; height: 240px; background: #19d7c5; opacity: .20; bottom: 20px; left: -80px; animation: float2 11s ease-in-out infinite; }
.blob.b3 { width: 180px; height: 180px; background: #fff; opacity: .07; top: 42%; left: 60%; animation: float1 13s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(-18px, 22px); } }
@keyframes float2 { 50% { transform: translate(22px, -18px); } }

.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 440px; text-align: center; }
.hero-inner > * { animation: heroUp .6s cubic-bezier(.2,.7,.3,1) both; }
.hero-inner > *:nth-child(2) { animation-delay: .10s; }
.hero-inner > *:nth-child(3) { animation-delay: .18s; }
.hero-inner > *:nth-child(4) { animation-delay: .26s; }
.hero-inner > *:nth-child(5) { animation-delay: .34s; }
.hero-inner > *:nth-child(6) { animation-delay: .42s; }
.hero-inner > *:nth-child(7) { animation-delay: .50s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-brandrow { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.hero-brandtext { text-align: left; }
.hero-logo {
  width: 64px; height: 64px; flex: none; display: block;
  border-radius: 18px; box-shadow: 0 10px 24px rgba(0,0,0,.28);
  animation: logoFloat 5s ease-in-out 1.2s infinite;
}
@keyframes logoFloat { 50% { transform: translateY(-6px); } }
.hero-badge {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18);
  padding: 5px 12px; border-radius: 999px; margin: 5px 0 0; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-title { font-size: 2.15rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1; text-shadow: 0 4px 18px rgba(0,0,0,.22); }
.hero-title span { color: #bff7d1; }
.hero-sub { font-size: .95rem; line-height: 1.5; opacity: .94; margin: 12px auto 16px; max-width: 360px; }

.hero-modes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto 14px; }
.hmode {
  font-size: .85rem; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
}
.hero-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto 20px; max-width: 400px; }
.feat {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
  padding: 9px 13px; border-radius: 12px; font-weight: 600; font-size: .86rem;
}
.feat-ic { font-size: 1.15rem; }
.cta-card {
  background: #fff; color: var(--ink); border-radius: 22px; padding: 16px;
  box-shadow: 0 22px 50px rgba(0,0,0,.34); text-align: left; max-width: 384px; margin: 0 auto;
}
.cta-head { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; text-align: center; }
.auth-tabs { display: flex; gap: 5px; background: #eef1f5; border-radius: 12px; padding: 4px; margin-bottom: 4px; }
.auth-tab {
  flex: 1; border: none; background: transparent; color: var(--muted);
  font-weight: 700; font-size: .92rem; padding: 9px 8px; border-radius: 9px; cursor: pointer;
}
.auth-tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.fld { display: block; font-weight: 600; font-size: .82rem; color: var(--muted); margin-top: 9px; }
.fld input {
  width: 100%; margin-top: 4px; padding: 11px 13px; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
.fld input:focus { outline: none; border-color: var(--green); }
.cta-card .btn { margin-top: 12px; }
.cta-start { text-align: center; }
.cta-welcome { font-weight: 700; margin: 0 0 14px; font-size: 1.1rem; }
.login-err { color: #d9534f; font-weight: 700; font-size: .85rem; margin: 10px 0 0; text-align: center; }
.hero-foot { font-size: .76rem; opacity: .82; margin: 10px 0 0; }
.legal-links { font-size: .78rem; margin: 6px 0 0; opacity: .9; }
.legal-links a { color: inherit; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .hero-scene, .hs-route, .hs-pins .pin, .hs-dot, .blob, .hero-logo, .hero-inner > *,
  .step[data-screen="select"] .step-tx { animation: none !important; }
}

/* ===================== Stadt-Auswahl ===================== */
.screen-cities {
  overflow-y: auto; background: var(--bg);
  padding: calc(18px + var(--safe-t)) 16px calc(28px + var(--safe-b));
}
.cities-back {
  border: none; background: #fff; color: var(--ink); font-weight: 700; font-size: .9rem;
  padding: 9px 14px; border-radius: 11px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.cities-back:active { transform: scale(.96); }
.cities-head { text-align: center; margin: 4px 0 18px; }
.cities-head h1 { font-size: 1.6rem; }
.city-grid { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
@media (min-width: 720px) { .city-grid { grid-template-columns: 1fr 1fr; } }
.city-card {
  --accent: #2e9e4f;
  display: block; width: 100%; text-align: left; padding: 0; overflow: hidden;
  background: #fff; border: none; border-radius: 20px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s, box-shadow .15s; animation: heroIn .5s ease both;
}
.city-card:active { transform: scale(.985); }
.city-card:hover { box-shadow: 0 16px 38px rgba(20,35,55,.20); }
.city-illu { height: 130px; overflow: hidden; }
.city-illu svg { width: 100%; height: 100%; display: block; }
.city-body { padding: 15px 18px 18px; border-top: 4px solid var(--accent); }
.city-top { display: flex; align-items: center; justify-content: space-between; }
.city-name { font-size: 1.35rem; font-weight: 800; }
.city-flag { font-size: 1.4rem; }
.city-country { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.city-tag { color: var(--accent); font-weight: 700; margin-top: 6px; }
.city-blurb { font-size: .9rem; line-height: 1.5; color: #4a5560; margin: 8px 0 14px; }
.city-foot { display: flex; align-items: center; justify-content: space-between; }
.city-count { font-size: .8rem; color: var(--muted); font-weight: 600; }
.city-go { color: var(--accent); font-weight: 800; font-size: .9rem; }

/* Turn-by-Turn: Zielzeile unter dem Abbiegehinweis */
.nav-sub { font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* Abmelden */
.cities-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cities-bar .cities-back { margin-bottom: 0; }
.cities-logout {
  border: none; background: #fff; color: #d9534f; font-weight: 700; font-size: .9rem;
  padding: 9px 14px; border-radius: 11px; box-shadow: var(--shadow-sm);
}
.cities-logout:active { transform: scale(.96); }
.link-btn {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: underline; cursor: pointer;
}

/* Karten-Popup (Auswahlkarte) */
.map-pop { min-width: 170px; }
.map-pop-img {
  width: 100%; height: 64px; object-fit: cover; display: block;
  border-radius: 10px; margin: 0 0 8px; background: #eef1f5;
}
.map-pop-cat { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.map-pop-credit { font-size: .64rem; color: #8a96a3; margin: 2px 0 4px; line-height: 1.2; }
.map-pop-name { font-weight: 800; font-size: 1rem; margin: 2px 0 8px; }
.map-pop-actions { display: flex; gap: 6px; }
.pop-btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 9px; padding: 7px 9px; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.pop-add { color: var(--green); border-color: var(--green); }
.pop-add.is-sel { background: var(--green); color: #fff; }

/* Admin-Button (Stadt-Auswahl) */
.cities-bar-right { display: flex; gap: 8px; align-items: center; }
.cities-admin {
  border: none; background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem;
  padding: 9px 14px; border-radius: 11px; box-shadow: var(--shadow-sm);
}
.cities-admin:active { transform: scale(.96); }

/* Sternebewertung im Audioguide */
.guide-rating { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.rating-avg, .rating-mine { display: flex; align-items: center; gap: 10px; }
.rating-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stars { display: inline-flex; }
.star { color: #d4dae1; font-size: 1.4rem; line-height: 1; }
.star.on { color: #f5b301; }
.stars-interactive .mystar { background: none; border: none; padding: 0 2px; cursor: pointer; color: #d4dae1; font-size: 1.75rem; line-height: 1; transition: transform .1s; }
.stars-interactive .mystar:hover { transform: scale(1.15); }
.stars-interactive .mystar.on { color: #f5b301; }

/* Info-Fenster: Hinzufügen + Mehr-Infos-Link */
.guide-add { margin-top: 10px; }
.guide-add.is-on { background: #eafaef; color: var(--green-dark); }
.guide-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; padding: 13px 16px;
  background: #eafaef; color: var(--green-dark); font-weight: 800; font-size: 1rem;
  text-decoration: none; border: 1.5px solid var(--green); border-radius: 14px;
}
.guide-link:active { transform: scale(.98); }

/* Foto im Info-Panel */
.guide-fig { margin: -4px 0 14px; }
.guide-fig img { width: 100%; max-height: 210px; object-fit: cover; border-radius: 14px; display: block; background: #eef1f5; }
.guide-credit { font-size: .7rem; color: var(--muted); margin-top: 5px; line-height: 1.3; }
.guide-credit a { color: var(--muted); }

/* Tour speichern / Meine Touren */
.tour-head-actions { display: flex; gap: 6px; align-items: center; }
.mytours-btn {
  display: block; width: 100%; max-width: 760px; margin: 0 auto 16px;
  background: #fff; border: 1.5px dashed #c4ccd4; color: var(--ink);
  font-weight: 700; font-size: .95rem; padding: 13px; border-radius: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.mytours-btn:active { transform: scale(.99); }
.tours-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tour-saved { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.ts-name { font-weight: 700; }
.ts-sub { font-size: .8rem; color: var(--muted); }
.ts-actions { display: flex; gap: 6px; flex: none; }

/* Tour: Station umsortieren */
.tour-move { display: flex; flex-direction: column; gap: 3px; flex: none; }
.movebtn {
  width: 30px; height: 22px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 7px; font-size: .65rem; line-height: 1; color: var(--ink); cursor: pointer; padding: 0;
}
.movebtn:disabled { opacity: .35; cursor: default; }
.movebtn:active:not(:disabled) { background: #eef1f5; }

/* Filter-Leiste (Vorlieben) auf der Auswahl-Karte */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px 10px;
  border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; font-size: .82rem; padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.fchip.is-on { background: var(--cat, var(--green)); color: #fff; border-color: var(--cat, var(--green)); }
.fchip-ic { font-size: 1rem; display: inline-flex; align-items: center; }
.fchip-ic .cat-img { width: 22px; height: 22px; border-radius: 6px; }

/* Filter-Button in der Kopfzeile + Modal */
.head-actions { display: flex; align-items: center; gap: 8px; }
.filter-btn { background: #eef1f5; color: var(--ink); font-weight: 700; }
.filter-btn.is-active { background: var(--green); color: #fff; }
.filter-card .filter-hint { margin: 2px 0 16px; }
.filter-top-toggle {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px;
  padding: 12px 14px; margin: 0 0 16px; border: 1.5px solid #f0d48a; border-radius: 14px;
  background: #fffdf4; cursor: pointer; user-select: none;
}
.filter-top-toggle input { width: 20px; height: 20px; accent-color: #f5b301; grid-row: span 2; }
.filter-top-toggle > span { font-weight: 700; font-size: .98rem; }
.filter-top-toggle .ftt-star { color: #f5b301; }
.filter-top-toggle small { grid-column: 2; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-chips .fchip { font-size: .92rem; padding: 10px 14px; }
.filter-actions { display: flex; gap: 10px; margin-top: 20px; }
.filter-actions .btn { flex: 1; }

/* Verkehrsmittel-Leiste (Tour) */
.mode-bar { display: flex; gap: 8px; align-items: center; padding: 8px 14px 6px; }
.mode-seg { display: flex; background: #eef1f5; border-radius: 11px; padding: 3px; flex: 1; }
.modebtn { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: .82rem; padding: 8px 4px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.mode-seg .modebtn.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.modebtn.transit { flex: none; background: #eef1f5; border-radius: 11px; color: var(--ink); padding: 8px 12px; }
.modebtn.transit:active { transform: scale(.96); }

/* ---------- Desktop / breitere Schirme ---------- */
@media (min-width: 760px) {
  .cat-grid { grid-template-columns: 1fr 1fr 1fr; }
  .sheet { max-width: 420px; right: auto; left: 12px; bottom: 12px;
           border-radius: 18px; height: auto; max-height: calc(100% - 110px); }
  .sheet-grip { cursor: default; }
  #screen-prefs { max-width: 720px; margin: 0 auto; }
  .screen-actions { max-width: 720px; left: 50%; transform: translateX(-50%); }
}

/* ===================== Anleitung („So funktioniert's") ===================== */
.howto-btn {
  margin: 0 auto 14px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-weight: 700; font-size: .92rem; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.howto-btn span { font-weight: 600; opacity: .8; font-size: .82rem; }
.howto-btn:active { transform: scale(.97); }

.howto-overlay { align-items: center; justify-content: center; padding: 18px; }
.howto-card {
  width: 100%; max-width: 400px; background: var(--card); color: var(--ink);
  border-radius: 22px; padding: 20px 18px calc(18px + var(--safe-b));
  box-shadow: var(--shadow); position: relative; max-height: 94%; overflow-y: auto;
  animation: slideUp .25s ease;
}
.howto-head { text-align: center; margin: 2px 30px 12px; }
.howto-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.howto-head h2 { font-size: 1.2rem; margin: 2px 0 0; }

/* Phone-Mockup */
.howto-phone {
  width: min(232px, 64vw); margin: 0 auto; padding: 9px;
  background: #1c2430; border-radius: 26px; box-shadow: 0 12px 30px rgba(20,35,55,.3);
}
.howto-screen {
  position: relative; width: 100%; aspect-ratio: 232 / 300; overflow: hidden;
  border-radius: 18px; background: #e7efe6;
}
.hscene { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.hscene.is-active { opacity: 1; }

/* „Karte" im Mockup */
.demo-map {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(58deg, rgba(255,255,255,.5) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(-32deg, rgba(255,255,255,.45) 0 2px, transparent 2px 34px),
    linear-gradient(160deg, #e9f1e6, #dfeadd);
}
.demo-map.dim { filter: saturate(.7) brightness(.97); }
.dpin {
  position: absolute; width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
  background: #d9534f; border: 2px solid #fff; transform: translate(-50%,-100%) rotate(-45deg);
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.dpin.dtap { background: var(--green); }
.dnum {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%,-50%) scale(0);
  background: var(--green); color: #fff; font-weight: 800; font-size: .72rem;
  display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.hscene.is-active .dnum { animation: dnumPop .4s ease forwards; }
.hscene.is-active .dnum.n2 { animation-delay: .25s; }
.hscene.is-active .dnum.n3 { animation-delay: .5s; }
@keyframes dnumPop { to { transform: translate(-50%,-50%) scale(1); } }

.dfinger { position: absolute; font-size: 28px; transform: translate(-10%,-6%); filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.hscene[data-scene="0"].is-active .dfinger { animation: fingerTap1 4s ease-in-out forwards; }
@keyframes fingerTap1 {
  0% { transform: translate(60px,70px) scale(1); opacity: 0; }
  22% { transform: translate(-10%,-6%) scale(1); opacity: 1; }
  34% { transform: translate(-10%,-6%) scale(.8); }
  44%,100% { transform: translate(-10%,-6%) scale(1); }
}
.dpop, .dcard { box-shadow: 0 4px 12px rgba(20,35,55,.28); }
.dpop {
  position: absolute; transform: translate(-50%, calc(-100% - 16px)) scale(0);
  background: #fff; border-radius: 10px; padding: 7px 9px; width: 116px; transform-origin: bottom center;
}
.hscene[data-scene="0"].is-active .dpop { animation: popIn .3s ease .9s forwards; }
@keyframes popIn { to { transform: translate(-50%, calc(-100% - 16px)) scale(1); } }
.dpop b { font-size: .72rem; display: block; margin-bottom: 4px; }
.dpop-b, .dcard-b { display: flex; gap: 4px; }
.dpop-b i, .dcard-b i { font-style: normal; font-size: .6rem; font-weight: 700; padding: 3px 5px; border-radius: 6px; background: #eef1f5; color: var(--ink); }
.dpop-b i.add, .dcard-b i.add { background: var(--green); color: #fff; }

/* Szene 2: Karte als Vollbild-Sheet */
.dcard {
  position: absolute; left: 8%; right: 8%; bottom: 10%; background: #fff; border-radius: 12px; padding: 10px;
}
.dcard-name { font-weight: 800; font-size: .8rem; margin-bottom: 7px; }
.dcard-b i { font-size: .66rem; padding: 5px 7px; }
.dadd { transition: none; }
.hscene[data-scene="1"].is-active .dadd { animation: addPulse 4s ease forwards; }
@keyframes addPulse { 0%,40% { transform: scale(1); } 50% { transform: scale(.86); } 62%,100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(46,158,79,.4); } }
.dbadge {
  position: absolute; top: 9%; left: 50%; transform: translate(-50%,-14px); opacity: 0;
  background: #1c2430; color: #fff; font-size: .68rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.hscene[data-scene="1"].is-active .dbadge { animation: badgeIn .4s ease 1.4s forwards; }
@keyframes badgeIn { to { opacity: 1; transform: translate(-50%,0); } }
.dfinger.f2 { left: 64%; top: 80%; }
.hscene[data-scene="1"].is-active .dfinger.f2 { animation: fingerTap2 4s ease forwards; }
@keyframes fingerTap2 { 0% { opacity: 0; transform: translate(20px,30px); } 28% { opacity: 1; transform: translate(0,0); } 40% { transform: translate(0,4px); } 52%,100% { opacity: 1; transform: translate(0,0); } }

/* Reiter-Andeutung in Szene 3 */
.dtabs { position: absolute; top: 0; left: 0; right: 0; display: flex; z-index: 2; font-size: .6rem; font-weight: 800; }
.dtabs span { flex: 1; text-align: center; padding: 6px 2px; background: #fff; color: var(--muted); border-bottom: 2px solid transparent; }
.dtabs span.on { color: var(--green); border-bottom-color: var(--green); background: #f3fcf6; }
.droute { position: absolute; inset: 0; width: 100%; height: 100%; }
.droute-line { stroke-dasharray: 520; stroke-dashoffset: 520; }
.hscene[data-scene="2"].is-active .droute-line { animation: drawRoute 1.6s ease .3s forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
.droute-line.drawn { stroke-dashoffset: 0; }
.dmeta { position: absolute; bottom: 7%; left: 50%; transform: translate(-50%,10px); opacity: 0; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .68rem; font-weight: 700; box-shadow: 0 3px 8px rgba(20,35,55,.2); }
.hscene[data-scene="2"].is-active .dmeta { animation: badgeIn .4s ease 1.7s forwards; }

/* Szene 4: Navigation + Audio */
.dme { position: absolute; left: 14%; top: 20%; width: 16px; height: 16px; border-radius: 50%; background: #2196f3; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(33,150,243,.3); transform: translate(-50%,-50%); }
.hscene[data-scene="3"].is-active .dme { animation: meMove 4s ease-in-out infinite; }
@keyframes meMove { 0% { left:14%; top:20%; } 50% { left:73%; top:44%; } 100% { left:14%; top:20%; } }
.dspeak {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%,0) scale(0); transform-origin: left bottom;
  background: #1c2430; color: #fff; font-size: .6rem; padding: 6px 8px; border-radius: 9px; width: 120px;
}
.hscene[data-scene="3"].is-active .dspeak { animation: popIn2 .4s ease .8s forwards, speakPulse 1.4s ease-in-out 1.2s infinite; }
@keyframes popIn2 { to { transform: translate(-50%,0) scale(1); } }
@keyframes speakPulse { 50% { box-shadow: 0 0 0 4px rgba(46,158,79,.25); } }
.dnavbar { position: absolute; top: 6%; left: 6%; right: 6%; background: #fff; border-radius: 10px; padding: 7px 9px; font-size: .64rem; font-weight: 700; box-shadow: 0 3px 8px rgba(20,35,55,.2); }
.dnavbar b { color: var(--green-dark); }

.howto-caption { text-align: center; font-size: .92rem; font-weight: 600; line-height: 1.4; margin: 14px 6px 10px; min-height: 2.6em; }
.howto-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 14px; }
.howto-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.howto-dots span.on { background: var(--green); width: 20px; border-radius: 5px; }
.howto-actions { display: flex; gap: 10px; }
.howto-actions .btn { flex: 1; }
.howto-actions .btn-sm { flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .hscene * { animation: none !important; }
  .droute-line { stroke-dashoffset: 0; }
  .dnum { transform: translate(-50%,-50%) scale(1); }
  .dpop, .dcard, .dbadge, .dmeta, .dspeak, .dfinger { opacity: 1 !important; }
}
