/* Gäste-Seite Allgäu
 * Layout: eine Spalte wie eine App — Kopfzeile oben, Vorführleiste, Inhalt, Tab-Leiste unten (Daumenbereich).
 * Gestaltung aus der Region: gelbe Wanderwegweiser mit Gehzeit, Enzianblau als Akzent,
 * Jahreszeiten-Kulisse mit Bergkette. Schrift: Barlow Condensed (Schilder) + Atkinson Hyperlegible (gut lesbar, auch für ältere Gäste).
 * Schriften liegen lokal in /fonts (kein Google-Server, DSGVO-freundlich).
 */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #f2f4f1;
  --surface: #ffffff;
  --ink: #17231f;
  --muted: #55625c;
  --line: #d6ddd8;
  --enzian: #2347a1;
  --enzian-ink: #ffffff;
  --sign: #f3c02e;
  --sign-ink: #16150f;
  --ok: #24724a; --ok-bg: #e2f1e8;
  --warn: #8a5410; --warn-bg: #fbeed7;
  --closed: #8c3a31; --closed-bg: #f6e3e0;
  --c-bahn: #2347a1; --c-natur: #2f7d45; --c-kultur: #7a4b8c; --c-winter: #1f7f8c;
  --band: #d6e6f5; --ridge: #2f5a7a; --ridge-snow: #ffffff; --season-ink: #1b3a52;
  --map-bg: #e8eee7; --map-river: #6f9fc9; --map-ring: #9aa8a0;
  --i-sun: #e2a414; --i-cloud: #8e9ba3; --i-rain: #2f6fb3; --i-snow: #7fa7c9; --i-bolt: #e2a414; --i-wind: #6b7f8a;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 10px;
  --maxw: 760px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #18211e; --ink: #e7eeea; --muted: #a2b0a9; --line: #2b3733;
    --enzian: #8fa9f2; --enzian-ink: #0f1513; --sign: #f3c02e; --sign-ink: #16150f;
    --ok: #7fd3a1; --ok-bg: #173226; --warn: #f0be72; --warn-bg: #352712; --closed: #f0a198; --closed-bg: #3a1d1a;
    --c-bahn: #8fa9f2; --c-natur: #79c98f; --c-kultur: #c79ad8; --c-winter: #6cc9d6;
    --band: #15212c; --ridge: #2a4a63; --ridge-snow: #c9d6e2; --season-ink: #d5e4f0;
    --map-bg: #17201d; --map-river: #4f7fa8; --map-ring: #4d5c55;
    --i-cloud: #9aa7af; --i-rain: #7fb1e6; --i-snow: #b6cfe6; --i-wind: #9fb1ba;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --surface: #18211e; --ink: #e7eeea; --muted: #a2b0a9; --line: #2b3733;
  --enzian: #8fa9f2; --enzian-ink: #0f1513; --sign: #f3c02e; --sign-ink: #16150f;
  --ok: #7fd3a1; --ok-bg: #173226; --warn: #f0be72; --warn-bg: #352712; --closed: #f0a198; --closed-bg: #3a1d1a;
  --c-bahn: #8fa9f2; --c-natur: #79c98f; --c-kultur: #c79ad8; --c-winter: #6cc9d6;
  --band: #15212c; --ridge: #2a4a63; --ridge-snow: #c9d6e2; --season-ink: #d5e4f0;
  --map-bg: #17201d; --map-river: #4f7fa8; --map-ring: #4d5c55;
  --i-cloud: #9aa7af; --i-rain: #7fb1e6; --i-snow: #b6cfe6; --i-wind: #9fb1ba;
  color-scheme: dark;
}

/* Jahreszeiten-Kulisse (hell) */
:root[data-season="fruehling"] { --band: #dcebd1; --ridge: #4e7a45; --season-ink: #24401f; }
:root[data-season="sommer"] { --band: #d6e6f5; --ridge: #2f5a7a; --season-ink: #1b3a52; }
:root[data-season="herbst"] { --band: #f1dfc6; --ridge: #8a5a2b; --season-ink: #4a2f12; }
:root[data-season="winter"] { --band: #e3ebf3; --ridge: #5f7690; --season-ink: #253446; }
/* Jahreszeiten-Kulisse (dunkel) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-season="fruehling"] { --band: #1b2819; --ridge: #3f6338; --season-ink: #d3e8c9; }
  :root:not([data-theme="light"])[data-season="sommer"] { --band: #15212c; --ridge: #2a4a63; --season-ink: #d5e4f0; }
  :root:not([data-theme="light"])[data-season="herbst"] { --band: #2a1f15; --ridge: #6e4724; --season-ink: #f1dcc0; }
  :root:not([data-theme="light"])[data-season="winter"] { --band: #18202a; --ridge: #4a5d73; --season-ink: #dbe6f1; }
}
:root[data-theme="dark"][data-season="fruehling"] { --band: #1b2819; --ridge: #3f6338; --season-ink: #d3e8c9; }
:root[data-theme="dark"][data-season="sommer"] { --band: #15212c; --ridge: #2a4a63; --season-ink: #d5e4f0; }
:root[data-theme="dark"][data-season="herbst"] { --band: #2a1f15; --ridge: #6e4724; --season-ink: #f1dcc0; }
:root[data-theme="dark"][data-season="winter"] { --band: #18202a; --ridge: #4a5d73; --season-ink: #dbe6f1; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.55;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: .005em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.3rem; }
p { margin: 0; }
a { color: var(--enzian); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--enzian); outline-offset: 2px; border-radius: 4px; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; color: var(--muted); }
.lead { color: var(--muted); max-width: 62ch; }
.note { color: var(--muted); font-size: .92rem; }
.src { color: var(--muted); font-size: .82rem; }
.empty { color: var(--muted); padding-block: 1rem; }

/* Rahmen */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in, .demobar-in, .main {
  max-width: var(--maxw); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 30px; height: 22px; flex: none; background: var(--sign); clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-ort { font-size: .85rem; color: var(--muted); }
.day-chip { flex: none; font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

.demobar { background: var(--ink); color: var(--bg); }
.demobar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-block: 10px; }
.demo-label { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; background: var(--sign); color: var(--sign-ink); padding: 2px 8px; border-radius: 4px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: inherit; padding: 6px 11px; cursor: pointer; font-size: .95rem; }
.seg button + button { border-left: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.seg button.on { background: var(--bg); color: var(--ink); font-weight: 700; }
.demo-note { flex-basis: 100%; font-size: .85rem; opacity: .85; }

.main { padding-block: 0 calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 18px; }
.main:focus { outline: none; }
.foot { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.block { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.page-title { font-size: 2.1rem; padding-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 140px)); justify-content: center;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: .8rem; border-radius: 8px; }
.tab-ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--enzian); font-weight: 700; }
.tab.on .tab-ic { stroke-width: 2.3; }

/* Begrüßung mit Bergkulisse (bricht seitlich aus der Spalte aus) */
.hero { position: relative; background: var(--band); color: var(--season-ink); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); overflow: hidden; }
.hero-in { position: relative; z-index: 1; padding: 22px max(16px, env(safe-area-inset-left, 0px)) 70px; display: flex; flex-direction: column; gap: 4px; }
.hero .eyebrow { color: inherit; opacity: .8; }
.hero h1 { font-size: 2.6rem; }
.hero-sub { font-size: 1.1rem; font-weight: 700; }
.hero-stay { opacity: .85; }
.ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72px; }
.ridge-fill { fill: var(--ridge); }
.ridge-snow { fill: none; stroke: var(--ridge-snow); stroke-width: 3; stroke-linejoin: round; }
@media (min-width: 760px) { .hero { margin-inline: 0; border-radius: 0 0 var(--r) var(--r); } }

/* Wetter */
.weather-main { display: flex; align-items: center; gap: 14px; }
.wicon .i-sun { color: var(--i-sun); } .wicon .i-cloud { color: var(--i-cloud); } .wicon .i-rain { color: var(--i-rain); }
.wicon .i-snow { color: var(--i-snow); } .wicon .i-bolt { color: var(--i-bolt); } .wicon .i-wind { color: var(--i-wind); }
.w-temp { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.w-min { font-size: 1.4rem; color: var(--muted); font-weight: 500; }
.w-txt { color: var(--muted); }
.w-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.w-facts div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.w-facts dt { font-size: .85rem; color: var(--muted); hyphens: manual; overflow-wrap: anywhere; }
.w-facts dd { margin: 0; font-weight: 700; }

/* Wegweiser-Schilder */
.sign-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sign-list.compact { gap: 8px; }
.sign {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 440px;
  background: var(--sign); color: var(--sign-ink); border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.12rem;
  padding: 9px 30px 9px 12px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  border-radius: 3px 0 0 3px;
}
.sign:hover { filter: brightness(1.04); }
.sign-name { min-width: 0; overflow-wrap: anywhere; }
.sign-time { flex: none; font-weight: 600; text-transform: none; font-variant-numeric: tabular-nums; }
.sign-why { color: var(--muted); font-size: .92rem; margin-top: 4px; padding-left: 2px; }

.host-tip { border-left: 0; background: var(--surface); }
.quote { font-size: 1.12rem; }
.quote.small { font-size: 1rem; color: var(--muted); }
.tips { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.link-btn { align-self: flex-start; background: none; border: 0; color: var(--enzian); font-weight: 700; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.event { border-color: var(--sign); border-width: 2px; }
.event-hint { border-style: dashed; }

/* Planer */
.days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.day details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.day.is-today details { border-color: var(--enzian); border-width: 2px; }
.day summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.day-date { font-family: var(--font-display); font-size: 1.25rem; min-width: 5.6rem; }
.day-label { color: var(--muted); flex: 1; min-width: 6rem; }
.day-w { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.dot-ev { font-size: .78rem; font-weight: 700; background: var(--sign); color: var(--sign-ink); padding: 1px 7px; border-radius: 4px; }
.day-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.day-wtxt { color: var(--muted); }
.change { font-size: .95rem; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.gehzeit { font-family: var(--font-display); font-weight: 600; color: var(--muted); }
.idea-stops { display: flex; flex-direction: column; gap: 8px; }

/* Entdecken */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.chip.on { background: var(--enzian); color: var(--enzian-ink); border-color: var(--enzian); font-weight: 700; }
.switch { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.switch input { width: 20px; height: 20px; accent-color: var(--enzian); }
.poi-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.poi { position: relative; padding-left: 20px; }
.poi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 3px 3px 0; background: var(--cat, var(--line)); }
.cat-bahn { --cat: var(--c-bahn); } .cat-natur { --cat: var(--c-natur); } .cat-kultur { --cat: var(--c-kultur); } .cat-winter { --cat: var(--c-winter); }
.poi-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: .95rem; }
.pill { display: inline-block; font-size: .85rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pill-offen { background: var(--ok-bg); color: var(--ok); }
.pill-pruefen { background: var(--warn-bg); color: var(--warn); }
.pill-zu { background: var(--closed-bg); color: var(--closed); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges:empty { display: none; }
.badge { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line); }
.badge-tip { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); }
.badge-card { color: var(--enzian); border-color: var(--enzian); }
.more summary { cursor: pointer; color: var(--enzian); font-weight: 700; }
.more[open] { display: flex; flex-direction: column; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 8px; background: var(--enzian); color: var(--enzian-ink); border: 1px solid var(--enzian); text-decoration: none; font-weight: 700; cursor: pointer; }
.btn-ghost { background: transparent; color: var(--enzian); }
.btn-ghost[aria-pressed="true"] { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); }
.mini-btn { font-size: .85rem; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--sign); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } html { scroll-behavior: auto; } }

/* Karte */
.map-wrap { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.map { width: 100%; max-width: 100%; height: auto; display: block; border-radius: var(--r); border: 1px solid var(--line); background: var(--map-bg); }
.map-bg { fill: var(--map-bg); }
.ring { fill: none; stroke: var(--map-ring); stroke-width: 1.5; stroke-dasharray: 6 6; }
.ring-in { stroke-dasharray: 2 5; }
.ring-label { fill: var(--muted); font-size: 18px; text-anchor: middle; font-family: var(--font-body); }
.river { fill: none; stroke: var(--map-river); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.lake { fill: var(--map-river); opacity: .55; }
.town circle { fill: var(--ink); }
.town text { fill: var(--muted); font-size: 19px; font-family: var(--font-body); paint-order: stroke; stroke: var(--map-bg); stroke-width: 4px; }
.town.big text { fill: var(--ink); font-size: 24px; font-weight: 700; }
.mp { cursor: pointer; }
.mp circle { fill: var(--cat); stroke: var(--surface); stroke-width: 2.5; }
.mp.st-zu circle { fill: var(--surface); stroke: var(--cat); stroke-width: 3; }
.mp.sel circle { stroke: var(--sign); stroke-width: 5; }
.mp:focus-visible { outline: none; }
.mp:focus-visible circle { stroke: var(--sign); stroke-width: 5; }
.home path { fill: var(--sign); stroke: var(--sign-ink); stroke-width: 1.5; }
.home text { fill: var(--ink); font-size: 21px; font-weight: 700; text-anchor: middle; font-family: var(--font-body); paint-order: stroke; stroke: var(--map-bg); stroke-width: 4px; }
.north path { fill: var(--ink); } .north text { fill: var(--ink); font-size: 19px; font-weight: 700; text-anchor: middle; font-family: var(--font-body); }
.scale line { stroke: var(--ink); stroke-width: 4; } .scale text { fill: var(--ink); font-size: 19px; font-family: var(--font-body); }
.map-wrap figcaption { color: var(--muted); font-size: .85rem; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.lg-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cat); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.lg-closed { background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--muted); }

/* Haus */
.tel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; }
.acc { display: flex; flex-direction: column; gap: 8px; }
.acc-item { padding: 0; }
.acc-item summary { padding: 14px 16px; cursor: pointer; font-weight: 700; }
.acc-item p { padding: 0 16px 16px; }
.nums { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.nums div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.nums div:last-child { border-bottom: 0; padding-bottom: 0; }
.nums dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.gk { border-color: var(--enzian); }
.pitch { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pitch .eyebrow, .pitch .note { color: inherit; opacity: .8; }
.steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 8px; }

@media (min-width: 760px) {
  h1 { font-size: 2.5rem; }
  .hero h1 { font-size: 3rem; }
}
