/* East Coast Roadtrip – US Route 1 von New York bis Key West */
@property --fill { syntax: '<percentage>'; inherits: false; initial-value: 0%; }

:root {
  --sign: #0F6B45;          /* Wegweiser-Grün */
  --sign-deep: #0A5236;
  --asphalt: #2B2E33;
  --lane: #F7C548;          /* Mittellinie */
  --atlantic: #14284B;
  --flamingo: #E8476F;
  --teal: #1FA6A3;
  --paper: #EEF3F1;
  --card: #FFFFFF;
  --ink: #1B2430;
  --muted: #5A6675;
  --line: #D5DEDB;
  --radius-sign: 10px;
  --radius-card: 14px;
  --radius-pill: 999px;
  --shadow: 0 1px 0 rgb(20 40 75 / .06), 0 8px 24px -12px rgb(20 40 75 / .25);
  --font: 'Overpass', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Yellowtail', 'Brush Script MT', cursive;
  --top: 60px;
  color-scheme: light;
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
/* Sicherheitsnetz: Seite verschiebt sich nie seitlich. Am <html> gesetzt, damit es auf den Viewport wirkt
   (iOS Safari ignoriert es sonst beim Wischen); „hidden“ als Rückfall für Safari < 16 ohne „clip“. */
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 16px); }
body {
  overflow-x: clip; max-width: 100%;
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sign); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lane); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; inset-inline-start: 0; inset-block-start: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: .45em; border: 0; cursor: pointer; white-space: nowrap;
  padding: .55em 1.05em .45em; border-radius: var(--radius-pill); font-weight: 800; font-size: .92rem;
  transition: transform .15s ease, background-color .15s ease;
  & svg { width: 1.1em; height: 1.1em; }
  &:active { transform: translateY(1px); }
}
.btn--lane { background: var(--lane); color: #1E1A0A; }
.btn--lane:hover { background: #FFD45E; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn--ghost:hover { background: rgb(127 127 127 / .12); }
.btn--sign { background: var(--sign); color: #fff; }
.btn--danger { background: #B3261E; color: #fff; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  & svg { width: 18px; height: 18px; }
  &:hover { background: rgb(20 40 75 / .08); color: var(--ink); }
}

/* ───────── Avatare ───────── */
.av {
  --c: #888; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); color: #fff; font-weight: 900; font-size: .8rem; line-height: 1; padding-top: 2px;
  box-shadow: 0 0 0 2px var(--card);
}
.av--lg { width: 46px; height: 46px; font-size: 1.1rem; }
.av--anon { background: #6B7280; }
.avs { display: inline-flex; & .av + .av { margin-left: -8px; } }

/* ───────── Login ───────── */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: hidden; }
.login__scene { position: absolute; inset: 0; & svg { width: 100%; height: 100%; } }
.login__panel {
  position: relative; width: min(440px, 100%); padding: 28px 28px 24px; border-radius: 22px;
  background: rgb(20 40 75 / .62); color: #fff; backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6);
}
.login__q { font-size: 1.6rem; font-weight: 900; margin: 4px 0 18px; }
.login__who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.login__who button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid transparent;
  background: rgb(255 255 255 / .1); color: #fff; font-weight: 800; cursor: pointer; text-align: left;
  &[aria-checked="true"] { border-color: var(--lane); background: rgb(255 255 255 / .18); }
}
.login__pin { display: grid; gap: 6px; margin: 18px 0 14px; font-weight: 700; }
.login__pin input {
  padding: 12px 14px; border-radius: 12px; border: 0; font-size: 1.4rem; letter-spacing: .4em; text-align: center;
  background: rgb(255 255 255 / .92); color: var(--ink);
}
.login__panel .btn { width: 100%; justify-content: center; padding: .8em; font-size: 1rem; }
.login__err { min-height: 1.4em; margin-top: 10px; color: #FFC9D3; font-weight: 700; }

/* ───────── Topbar ───────── */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--top); display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(12px, 3vw, 28px); background: rgb(22 26 31 / .86); color: #fff; backdrop-filter: blur(14px);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; letter-spacing: .01em; }
.topbar__shield svg { width: 30px; height: 30px; }
.topbar__nav { display: flex; gap: 4px; margin-right: auto; }
.topbar__nav a { color: #DDE3EA; text-decoration: none; font-weight: 700; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.topbar__nav a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.topbar__goals { border: 0; cursor: pointer; font-weight: 800; padding: 6px 12px; border-radius: 8px; font-size: .95rem; background: var(--sign); color: #fff; }

/* Etappenziele (Popover aus Kopfleiste oder Leiste unten) */
.menu--goals { left: clamp(12px, 3vw, 28px); right: auto; width: min(380px, calc(100vw - 28px)); max-height: calc(100svh - var(--top) - 24px); overflow: auto; overscroll-behavior: contain; }
.goals__head { padding: 6px 10px 8px; font-size: .8rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.goals a, .goals__links a {
  display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 800; line-height: 1.3;
  &:hover, &:focus-visible { background: #EEF3F1; }
  & small { display: block; font-weight: 600; color: var(--muted); font-size: .84rem; }
}
.goals__no { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 1.1rem; }
.goals__no svg { width: 34px; height: 34px; }
.goals__links { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 4px 2px; margin-top: 6px; border-top: 1px solid var(--line);
  & a { padding: 7px 10px; font-size: .9rem; background: #F2F5F4; } }

/* Leiste unten fürs Handy */
.tabbar { display: none; }
.topbar__tools { display: flex; align-items: center; gap: 10px; }
.topbar__tools .btn--ghost { color: #fff; }
.me { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.reveal-chip { font-size: .82rem; font-weight: 800; padding: 4px 10px; border-radius: var(--radius-pill); display: inline-flex; gap: 6px; align-items: center; }
.reveal-chip svg { width: 16px; height: 16px; }
.reveal-chip[data-on="0"] { background: rgb(255 255 255 / .1); color: #CFD6DE; }
.reveal-chip[data-on="1"] { background: var(--lane); color: #1E1A0A; }
.topbar__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: 0 50%; transform: scaleX(0);
  background: repeating-linear-gradient(90deg, var(--lane) 0 18px, transparent 18px 30px);
}
@supports (animation-timeline: scroll()) {
  .topbar__progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}
.menu {
  position: fixed; inset: auto; top: calc(var(--top) + 6px); right: 14px; margin: 0; border: 0; padding: 8px; width: 290px;
  border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px -18px rgb(0 0 0 / .45);
  opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s, display .18s allow-discrete, overlay .18s allow-discrete;
  &:popover-open { opacity: 1; transform: none; @starting-style { opacity: 0; transform: translateY(-6px); } }
}
.menu__who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-weight: 800; }
.menu button, .menu label {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 10px; background: none;
  cursor: pointer; text-align: left; font-weight: 700;
  &:hover { background: var(--paper); }
}
.menu small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.menu input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sign); flex: none; }

/* ───────── Hero ───────── */
.hero { position: relative; min-height: 100svh; display: grid; align-items: start; overflow: clip; color: #fff; background: var(--atlantic); }
.hero__scene { position: absolute; inset: 0; }
.hero__svg { width: 100%; height: 100%; }
.hero__lane { animation: lane 1.1s linear infinite; }
@keyframes lane { to { stroke-dashoffset: -56; } }
@supports (animation-timeline: scroll()) {
  .hero__sun { animation: sunset linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  .hero__city { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  @keyframes sunset { to { transform: translateY(90px); } }
  @keyframes drift { to { transform: translateY(40px); } }
}
.hero__copy { position: relative; padding: calc(var(--top) + clamp(28px, 8vh, 90px)) clamp(20px, 6vw, 80px) 40px; max-width: 900px; }
.hero__kicker { font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.2rem); color: #FFE2A8; }
.wordmark {
  font-family: var(--script); font-weight: 400; font-size: clamp(4.6rem, 15vw, 12rem); line-height: .9;
  margin: .05em 0 .12em -.04em; color: #FFF6F0; transform: rotate(-6deg); transform-origin: 0 100%;
  text-shadow: 0 0 6px rgb(255 255 255 / .55), 0 0 22px #FF5F8F, 0 0 46px rgb(232 71 111 / .7);
}
.wordmark--sm { font-size: 3.4rem; transform: rotate(-4deg); margin: 0 0 6px; }
@media (prefers-reduced-motion: no-preference) {
  .hero .wordmark { animation: neon 2.4s ease-out 1 both; }
  @keyframes neon { 0%, 18%, 24%, 52% { opacity: .25; text-shadow: none; } 20%, 30%, 100% { opacity: 1; } }
}
/* Tour-Umschalter auf der Startseite */
.tour-switch { margin-top: 22px; display: grid; gap: 8px; max-width: 640px; }
.tour-switch__label { font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #FFE2A8; }
.tour-switch__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.tour-switch button {
  display: grid; gap: 2px; text-align: left; padding: 10px 14px 10px 40px; border-radius: 14px; cursor: pointer; position: relative;
  border: 0; color: #fff; background: rgb(10 18 34 / .45); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .22);
  transition: background .2s, box-shadow .2s; overflow-wrap: anywhere;
  &::before { content: ''; position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .7); }
  & b { font-weight: 900; font-size: 1.02rem; }
  & small { font-size: .84rem; color: #D7E1EE; font-weight: 600; }
  &:hover { background: rgb(10 18 34 / .6); }
  &[aria-checked="true"] { background: rgb(15 107 69 / .78); box-shadow: inset 0 0 0 2px #7FE0B0;
    &::before { background: #fff; box-shadow: inset 0 0 0 4px var(--sign); } }
}
.hero__route { font-size: clamp(1.05rem, 2.1vw, 1.45rem); font-weight: 800; max-width: 40ch; margin-top: 18px; }
.hero__facts { margin-top: 10px; font-size: 1.05rem; color: #E7ECF4; max-width: 52ch; }
.hero__crew { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; align-items: center; }
.hero__crew .pair { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 6px 14px 6px 6px; border-radius: var(--radius-pill); background: rgb(10 18 34 / .45); backdrop-filter: blur(6px); }

/* Meilenstein wie in den Keys – Countdown */
.milemarker {
  position: absolute; right: clamp(16px, 7vw, 120px); bottom: clamp(70px, 16vh, 170px); width: 108px; padding: 10px 8px 12px;
  background: var(--sign); color: #fff; text-align: center; border-radius: 8px; border: 3px solid #fff; outline: 3px solid var(--sign);
  box-shadow: 0 18px 40px -10px rgb(0 0 0 / .55);
  &::after { content: ''; position: absolute; left: 50%; top: 100%; width: 8px; height: 140px; margin: 3px 0 0 -4px; background: #9AA0A6; }
  & small { display: block; font-weight: 800; font-size: .82rem; line-height: 1.1; }
  & strong { display: block; font-size: 2.7rem; font-weight: 900; line-height: 1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
}

/* ───────── Sections ───────── */
.section { padding: clamp(56px, 9vw, 110px) 0 0; }
.wrap { width: min(1280px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 24px; margin-bottom: 28px; }
.section__head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; }
.section__lede { color: var(--muted); max-width: 60ch; flex: 1 1 320px; }
.section__tools { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-only { display: none !important; }
body.is-admin .admin-only { display: revert !important; }
body.is-admin .section__tools.admin-only, body.is-admin .btn.admin-only { display: inline-flex !important; }

/* ───────── Tickets ───────── */
.tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 22px; }
.ticket {
  --notch: 16px; position: relative; display: grid; grid-template-columns: 1fr auto; background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
  mask: radial-gradient(circle var(--notch) at calc(100% - 128px) 0, #0000 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at calc(100% - 128px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__main { padding: 20px 22px 18px; }
.ticket__top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.ticket__route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 14px 0 10px; }
.ticket__code { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 900; letter-spacing: .02em; line-height: 1; }
.ticket__time { font-weight: 800; font-size: 1.15rem; }
.ticket__city { color: var(--muted); font-size: .9rem; }
.ticket__path { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); }
.ticket__path span { position: absolute; left: 50%; top: 50%; translate: -50% -60%; background: var(--card); padding: 0 8px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.ticket__note { font-size: .92rem; color: var(--muted); }
.ticket__stub { width: 128px; border-left: 2px dashed var(--line); padding: 18px 14px; display: grid; align-content: space-between; text-align: center; background: var(--ticket, #14284B); color: #fff; }
.ticket__stub b { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.ticket__stub small { font-weight: 700; opacity: .85; }
.ticket--back { --ticket: var(--teal); }

/* ───────── Route / Straße ───────── */
.route { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 44%); gap: clamp(20px, 3vw, 40px); align-items: start; }
.route__road { position: relative; padding-left: 74px; }
.road__lane {
  position: absolute; left: 14px; top: 0; bottom: 0; width: 44px; border-radius: 22px;
  background: var(--asphalt); box-shadow: inset 3px 0 0 #E8E4DA, inset -3px 0 0 #E8E4DA;
  &::before { content: ''; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 4px; margin-left: -2px;
    background: repeating-linear-gradient(180deg, var(--lane) 0 22px, transparent 22px 40px); }
}
.road__car { position: sticky; top: 52vh; width: 30px; margin: 0 auto; z-index: 2; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .4)); }
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.stay__body > *, .leg > *, .hotel > *, .poll > *, .slide__in > * { min-width: 0; }
.road > li { position: relative; }
/* Bahn-Etappe: Gleis statt Asphalt neben der Etappe */
.road > li.is-rail::before {
  content: ''; position: absolute; left: -60px; width: 44px; top: -24px; bottom: -24px; z-index: 1; border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 11px, #A7B0BA 11px 14px, transparent 14px 30px, #A7B0BA 30px 33px, transparent 33px),
    repeating-linear-gradient(180deg, #7A5A40 0 6px, transparent 6px 15px),
    #4E4740;
}
.road > li.is-rail .leg { background: linear-gradient(180deg, #E1E7F0, #EEF2F7); box-shadow: inset 0 0 0 1.5px #CBD5E3; }
.road > li.is-rail .leg__stats { color: var(--atlantic); }
.exit {
  position: absolute; left: -74px; top: 18px; width: 64px; display: grid; place-items: center; z-index: 3;
  & svg { width: 46px; height: 46px; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .35)); }
}

/* Aufenthalt */
.stay {
  container-type: inline-size; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow);
  overflow: clip; transition: box-shadow .3s;
}
.stay__head { display: grid; grid-template-columns: 1fr; }
.stay__poster { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--atlantic); }
.stay__poster > .ph { position: absolute; inset: 0; }
.stay__poster > .ph > svg, .stay__poster > .ph > img { width: 100%; height: 100%; object-fit: cover; }
.ph img { animation: fadein .6s ease both; }
.credit {
  position: absolute; left: 8px; bottom: 6px; z-index: 2; font-size: 10.5px; line-height: 1.2; padding: 2px 6px 1px; border-radius: 4px;
  background: rgb(0 0 0 / .45); color: #fff; text-decoration: none;
}
.credit:hover { background: rgb(0 0 0 / .7); }
.stay__poster .wx-now {
  position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px;
  border-radius: var(--radius-pill); background: rgb(255 255 255 / .88); backdrop-filter: blur(8px); font-weight: 800; font-size: .95rem;
  & .wxi { width: 26px; height: 26px; }
  & small { font-weight: 600; color: var(--muted); }
}
.stay__title { padding: 16px 20px 0; }
.stay__dates { color: var(--muted); font-weight: 700; font-size: .95rem; }
.guide {
  display: inline-block; margin: 6px 0 4px; padding: .32em .7em .18em; background: var(--sign); color: #fff;
  font-size: clamp(1.5rem, 4cqi, 2.1rem); font-weight: 800; letter-spacing: .005em; border-radius: var(--radius-sign);
  border: 2.5px solid #fff; outline: 3px solid var(--sign);
}
.stay__sub { color: var(--muted); }
.stay__body { padding: 12px 20px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stay__notes { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.stay__notes li::marker { color: var(--flamingo); }
.stay__sleep { padding: 10px 14px; background: #F4F7F6; border-left: 4px solid var(--sign); border-radius: 0 10px 10px 0; font-size: .96rem; }
.stay__sleep b { color: var(--sign-deep); }
.stay__admin { display: flex; gap: 2px; justify-content: flex-end; padding: 0 10px 8px; }
@container (min-width: 640px) {
  .stay__head { grid-template-columns: 260px 1fr; align-items: stretch; }
  .stay__poster { aspect-ratio: auto; min-height: 190px; }
  .stay__title { padding: 18px 22px 0; }
}

/* Wetter */
.wx { display: grid; gap: 8px; }
.wx__label { font-size: .85rem; font-weight: 800; color: var(--muted); }
.wx__days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.wx__day {
  flex: none; display: grid; justify-items: center; gap: 2px; width: 62px; padding: 6px 4px; border-radius: 10px; background: #F4F7F6;
  font-size: .8rem; font-weight: 700; color: var(--muted);
  & .wxi { width: 28px; height: 28px; }
  & b { color: var(--ink); font-size: .92rem; }
  &.is-trip { background: #FFF4D1; box-shadow: inset 0 0 0 2px var(--lane); }
}
.wx__clim { font-size: .93rem; }
.wx__clim b { font-weight: 800; }

/* Sehenswürdigkeiten */
.sights__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sights__head h4 { font-size: 1.1rem; font-weight: 900; }
.sights__head small { color: var(--muted); font-weight: 600; }
.sights {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(250px, 78%); gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 4px 2px 12px; overscroll-behavior-x: contain; position: relative; max-width: 100%;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.sight {
  scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; border-radius: 12px; overflow: hidden; position: relative;
  background: #F7F9F8; box-shadow: inset 0 0 0 1px var(--line);
}
.sight__img { position: relative; aspect-ratio: 4 / 3; background: #CFD8DC; overflow: hidden; cursor: zoom-in; border: 0; padding: 0; width: 100%; }
.sight__img > .ph { position: absolute; inset: 0; }
.sight__img img, .sight__img svg { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@keyframes fadein { from { opacity: 0; } }
.sight:hover .sight__img img { transform: scale(1.04); }
.sight__rank {
  position: absolute; left: 8px; top: 8px; min-width: 28px; height: 28px; padding: 2px 7px 0; border-radius: 8px; display: grid; place-items: center;
  background: var(--asphalt); color: #fff; font-weight: 900; font-size: .9rem;
}
.sight__hot { position: absolute; right: 8px; top: 8px; padding: 3px 8px 1px; border-radius: 8px; background: var(--flamingo); color: #fff; font-weight: 900; font-size: .78rem; }
.sight__body { padding: 10px 12px 12px; display: grid; gap: 6px; align-content: start; }
.sight__meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; font-weight: 800; color: var(--muted); }
.sight__meta span:first-child { color: var(--sign); }
.sight h5 { font-size: 1.02rem; font-weight: 900; margin: 0; line-height: 1.2; }
.sight p { font-size: .88rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sight .vote { margin-top: 4px; }

/* Abstimmen */
.vote { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vote button {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 3px; border-radius: var(--radius-pill); cursor: pointer;
  border: 0; background: #E8EEEC; color: var(--ink); font-weight: 800; font-size: .84rem; transition: background-color .15s, transform .15s;
  & svg { width: 15px; height: 15px; }
  &:hover { background: #DCE5E2; }
  &[aria-pressed="true"][data-v="2"] { background: var(--flamingo); color: #fff; }
  &[aria-pressed="true"][data-v="1"] { background: var(--sign); color: #fff; }
  &[aria-pressed="true"][data-v="-1"] { background: var(--asphalt); color: #fff; }
  &[aria-pressed="true"] { animation: pop .3s ease; }
}
@keyframes pop { 50% { transform: scale(1.12); } }
.voters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.voters .av { width: 24px; height: 24px; font-size: .68rem; position: relative; }
.voters .av[data-v]::after {
  position: absolute; right: -5px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center;
  font-size: 8px; color: #fff; box-shadow: 0 0 0 1.5px var(--card);
}
.voters .av[data-v="2"]::after { content: '★'; background: var(--flamingo); }
.voters .av[data-v="1"]::after { content: '+'; background: var(--sign); }
.voters .av[data-v="-1"]::after { content: '–'; background: var(--asphalt); }
@media (prefers-reduced-motion: no-preference) {
  .voters .av { transition: transform .4s cubic-bezier(.2, 1.6, .4, 1), opacity .3s; @starting-style { transform: scale(0) rotate(-90deg); opacity: 0; } }
}

/* Hotels */
.hotels { border-radius: 12px; background: #F4F7F6; }
.hotels > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-weight: 800;
  &::-webkit-details-marker { display: none; }
  &::after { content: ''; margin-left: auto; width: 10px; height: 10px; border: solid var(--muted); border-width: 0 2.5px 2.5px 0; rotate: 45deg; translate: 0 -3px; transition: rotate .2s; }
}
.hotels[open] > summary::after { rotate: 225deg; translate: 0 3px; }
.hotels::details-content { block-size: 0; overflow: clip; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
.hotels[open]::details-content { block-size: auto; }
.hotels__sum small { display: block; font-weight: 600; color: var(--muted); font-size: .86rem; }
.hotels__list { display: grid; gap: 10px; padding: 0 12px 12px; }
.hotel {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: 12px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); position: relative;
  &.is-lead { box-shadow: inset 0 0 0 2px var(--lane); }
  &.is-booked { box-shadow: inset 0 0 0 2px var(--sign); }
}
.hotel__img { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #DCE3E1; }
.hotel__img img, .hotel__img svg { width: 100%; height: 100%; object-fit: cover; }
.hotel__top { display: flex; gap: 8px; align-items: start; justify-content: space-between; }
.hotel h5 { margin: 0; font-size: 1.02rem; font-weight: 900; line-height: 1.25; }
.hotel h5 a { color: inherit; }
.hotel__meta { font-size: .85rem; color: var(--muted); }
.hotel__price { font-weight: 800; margin-top: 2px; }
.hotel__price small { font-weight: 600; color: var(--muted); }
.hotel__notes { font-size: .88rem; margin-top: 4px; }
.hotel h5, .stay__sleep, .stay__notes, .leg__ways, .sight-dlg__body { overflow-wrap: anywhere; }
.hotel__foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-top: 8px; }
.tag { display: inline-block; padding: 2px 8px 0; border-radius: 6px; font-size: .74rem; font-weight: 900; background: var(--lane); color: #1E1A0A; }
.tag--booked { background: var(--sign); color: #fff; }
.tag--tour { justify-self: start; background: #E3ECF7; color: var(--atlantic); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.add-row .btn { font-size: .85rem; }
.btn--soft { background: #E3EAE8; color: var(--ink); }

/* Etappe */
.leg {
  background: linear-gradient(180deg, #E3ECE9, #EEF3F1); border-radius: var(--radius-card); padding: 14px 16px 16px; display: grid; gap: 10px;
  box-shadow: inset 0 0 0 1.5px #D2DDD9;
}
/* Aktiver Tag: gelber Rahmen – auch beim Zugtag, dessen eigener Rand sonst Vorrang hätte */
.road > li.is-active .leg, .road > li.is-rail.is-active .leg { box-shadow: 0 0 0 3px var(--lane), var(--shadow); }
.leg__head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.leg__head h3 { font-size: 1.1rem; font-weight: 900; }
.leg__stats { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 800; color: var(--sign-deep); }
.leg__stats span { display: inline-flex; gap: 6px; align-items: center; }
.leg__stats svg { width: 18px; height: 18px; }
.leg__stats .leg__sleep { display: inline; color: var(--ink); font-weight: 700; & b { font-weight: 900; } }
.leg__date { color: var(--muted); font-weight: 700; font-size: .9rem; }
.leg__via { font-size: .92rem; color: var(--muted); }
.leg__ways { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.leg__ways li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; font-size: .92rem; }
.leg__ways .tools, .stay__admin { display: flex; flex-wrap: wrap; gap: 0; }
@container (max-width: 520px) { .leg__ways .tools { grid-column: 2; } }
.leg { container-type: inline-size; }
.wx__day .rain { color: #2F7BC4; font-size: .74rem; }
.leg__ways li::before { content: ''; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--asphalt); }
.leg__ways b { font-weight: 800; }
.leg__approx { font-size: .8rem; color: var(--muted); }

/* ───────── Tagesplan ───────── */
.day { gap: 12px; }
.day--stay { background: linear-gradient(180deg, #F4F7F6, #FFFFFF); }
.day__head { display: flex; align-items: center; gap: 8px; }
.day__no { background: var(--asphalt); color: #fff; font-weight: 900; font-size: .82rem; padding: 3px 9px 1px; border-radius: 6px; letter-spacing: .02em; }
.day__date { font-weight: 800; color: var(--muted); font-size: .92rem; }
.day__title { font-size: 1.22rem; font-weight: 900; line-height: 1.2; margin: -4px 0 0; overflow-wrap: anywhere; }
.day__admin { display: flex; justify-content: flex-end; gap: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 2px; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 900;
  letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; vertical-align: middle;
  & svg { width: 15px; height: 15px; } }
.pill--way { background: #F7C548; color: #3A2C00; }
.pill--local { background: var(--sign); color: #fff; }
.box { border-radius: 12px; padding: 10px 12px 12px; display: grid; gap: 8px; overflow-wrap: anywhere;
  & h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 1rem; }
  & h4 small { font-weight: 700; color: var(--muted); font-size: .84rem; }
  & ul { margin: 0; padding-left: 1.15em; display: grid; gap: 4px; font-size: .95rem; }
  & li b { font-weight: 800; }
  & .tools { display: inline-flex; vertical-align: middle; } }
.box--way { background: #FFF6D8; box-shadow: inset 4px 0 0 #F7C548; }
.mini-edit { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--muted); vertical-align: middle; & svg { width: 16px; height: 16px; } }
.box--way li::marker { color: #C99A10; }
.box__flow { list-style: none; padding-left: 0 !important; counter-reset: flow; position: relative;
  & li { position: relative; padding-left: 26px; }
  & li::before { content: ''; position: absolute; left: 6px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: #F7C548; box-shadow: 0 0 0 2px #FFF6D8, 0 0 0 3px #C99A10; }
  & li + li::after { content: ''; position: absolute; left: 10px; top: calc(-1 * 4px - .45em); height: calc(.9em + 4px); border-left: 2px dotted #C99A10; } }
.box__vote { margin: 2px 0 -2px; font-weight: 800; font-size: .9rem; color: #5A4300; }
.box__flow li.is-opt { color: #6B5A2A; font-style: italic; }
.box__flow li.is-opt::before { background: #FFF6D8; }
.box__incl { margin: 0; font-size: .92rem; line-height: 1.6;
  & .ok { font-weight: 900; color: var(--sign-deep); }
  & button { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: #C99A10; cursor: pointer; } }
.box__stops { margin: 0; font-size: .82rem; color: var(--muted); }
.box--local { background: #E7F3EC; box-shadow: inset 4px 0 0 var(--sign); }
.box--local li::marker { color: var(--sign); }
.sights--way { grid-auto-columns: min(220px, 70%); }
.sight.is-way { background: #FFFBEA; box-shadow: inset 0 0 0 1.5px #F2D57A; }
.sight__dur { color: var(--ink); }
.sights__head h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.road > li.is-day .exit { display: none; }
/* Eine Karte pro Tag: Foto des Ziels als Kopf, Zeitleiste, Unterwegs, Vor Ort (inkl. Station) */
.day__banner { position: relative; margin: -14px -16px 0; height: clamp(150px, 32vw, 240px); max-width: none; overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--atlantic);
  & .ph, & .ph > * { position: absolute; inset: 0; width: 100%; height: 100%; }
  & img { width: 100%; height: 100%; object-fit: cover; }
  & .credit { position: absolute; right: 8px; top: 8px; z-index: 2; }
  & .day__title { color: #fff; font-size: 1.35rem; margin: 2px 0 0; text-shadow: 0 2px 8px rgb(0 0 0 / .5); }
  & .day__date { color: #F1F5F9; }
  & .day__no { background: #fff; color: var(--asphalt); } }
.day__over { position: absolute; inset: auto 0 0; padding: 40px 16px 12px; background: linear-gradient(180deg, transparent, rgb(8 16 30 / .78)); }
.tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px;
  & > span { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; }
  & b { font-weight: 900; font-size: .98rem; }
  & small { font-weight: 700; font-size: .84rem; color: var(--muted); } }
.tl__way { background: #FFF1C2; box-shadow: inset 4px 0 0 #F7C548; }
.tl__local { background: #DDF0E5; box-shadow: inset 4px 0 0 var(--sign); }
.tl__end { background: #E3ECF7; box-shadow: inset 4px 0 0 var(--atlantic); }
.box__time { margin: 0; font-size: .95rem; }
.box__sub { margin: 2px 0 -4px; font-weight: 900; font-size: .9rem; color: var(--sign-deep); }
/* Im grünen Kasten keine weiteren Rahmen: nur Zeilen, getrennt durch feine Linien */
.box--local .stay__sleep { margin: 0; padding: 8px 0 0; background: none; border: 0; border-top: 1px solid #C6E0D1; border-radius: 0; }
.box--local .local { border-top: 1px solid #C6E0D1; padding-top: 8px; }
.box--local .hotels { background: none; box-shadow: none; border-radius: 0; border-top: 1px solid #C6E0D1; }
.box--local .hotels > summary { padding-left: 0; padding-right: 0; }
.box--local .stay__admin { display: flex; justify-content: flex-end; }
.sights--top { grid-auto-columns: min(250px, 80%); }
@media (min-width: 900px) { .sights--top { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
.add-idea { margin: 4px 0 0; }
.sight__where { font-size: .82rem !important; font-weight: 700; color: var(--sign-deep); -webkit-line-clamp: unset !important; margin: -2px 0 0; }
.day__ref { margin: 0; font-size: .92rem; color: var(--muted); font-weight: 700; & a { color: var(--sign-deep); } }
.sight__pick { position: absolute; left: 8px; top: 8px; padding: 4px 9px 2px; border-radius: 8px; background: #F7C548; color: #3A2C00;
  font-weight: 900; font-size: .82rem; box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
.sight__pick.is-plan { background: #1E7A4C; color: #fff; }
.sight__pick.is-choice { background: #fff; color: #1E3A5F; }
.box--local .local--more { border-top: 0; padding-top: 0; }
.nofit { margin-top: 6px; font-size: .9rem; color: var(--muted);
  & summary { cursor: pointer; font-weight: 800; padding: 4px 0; }
  & ul { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 2px; }
  & button { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); font-weight: 700; text-decoration: underline; cursor: pointer; } }
/* Übersicht „Tag für Tag“ */
.glance { margin: 0 0 22px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 4px 8px;
  & summary { cursor: pointer; font-weight: 900; font-size: 1.08rem; padding: 12px 10px; list-style: none; display: flex; align-items: center; gap: 10px; }
  & summary::-webkit-details-marker { display: none; }
  & summary::before { content: '▸'; color: var(--sign); transition: transform .2s; }
  &[open] summary::before { transform: rotate(90deg); }
  & .goals { padding: 0 0 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); } }
.goals .goals__no { width: 40px; height: 40px; border-radius: 10px; display: grid; place-content: center; line-height: 1; text-align: center;
  background: #EEF3F1; color: var(--sign-deep); & b { font-size: 1rem; font-weight: 900; } & small { font-size: .7rem; } }
.goals li.is-drive .goals__no { background: #FFF1C2; color: #5A4300; }

/* Atlas-Ausschnitt (statische OSM-Kacheln) */
.atlas {
  position: relative; width: 100%; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 10px; background: #E5E3DF;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); cursor: pointer; border: 0; padding: 0; display: block;
}
.atlas img { position: absolute; max-width: none; image-rendering: auto; user-select: none; pointer-events: none; }
.atlas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas__attr { position: absolute; right: 4px; bottom: 3px; font-size: 10px; line-height: 1.2; padding: 1px 5px; border-radius: 4px; background: rgb(255 255 255 / .8); color: #333; }

/* Endpunkt */
.goal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--atlantic); color: #fff; }
.goal svg { width: 74px; height: 46px; border-radius: 8px; flex: none; }
.goal > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 400px) { .goal svg { width: 52px; height: 34px; } .goal { gap: 10px; padding: 12px; } }
.goal small { display: block; opacity: .8; }

/* Karte */
.route__map { position: sticky; top: calc(var(--top) + 14px); }
.map { position: relative; height: calc(100svh - var(--top) - 70px); min-height: 420px; border-radius: 18px; overflow: hidden; background: #0C1B33; box-shadow: var(--shadow); }
.map__note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.map__caption {
  position: absolute; left: 14px; bottom: 14px; z-index: 5; max-width: min(360px, calc(100% - 28px)); padding: 12px 16px; border-radius: 14px;
  background: rgb(20 40 75 / .78); color: #fff; backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5);
  & b { display: block; font-size: 1.25rem; font-weight: 900; }
  & small { opacity: .85; font-weight: 700; }
}
.mk {
  width: 34px; height: 34px; border: 0; padding: 0; cursor: pointer; background: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .45));
  & svg { width: 100%; height: 100%; }
  &.is-active { width: 44px; height: 44px; }
}
.mk-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--asphalt), 0 1px 3px rgb(0 0 0 / .4); }
.mk-car { width: 26px; height: 46px; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .5)); pointer-events: none; }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* ───────── Polls ───────── */
.polls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.poll { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px; align-content: start; }
.poll.is-closed { opacity: .82; }
.poll h3 { font-size: 1.2rem; font-weight: 900; overflow-wrap: anywhere; }
.poll__opts { display: grid; gap: 8px; }
.opt {
  --fill: 0%; position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  overflow-wrap: anywhere;
  padding: 10px 12px 8px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 700;
  background: linear-gradient(90deg, #D6E8E1 var(--fill), #F1F5F4 var(--fill)); transition: --fill .6s cubic-bezier(.2, .8, .2, 1);
  &:disabled { cursor: default; }
  &.is-mine { box-shadow: inset 0 0 0 2px var(--sign); }
  & .box { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted); background: #fff; }
  &.is-multi .box { border-radius: 5px; }
  &.is-mine .box { background: var(--sign); box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 5px #fff; }
  & .n { font-weight: 900; font-variant-numeric: tabular-nums; }
  & .voters { grid-column: 2 / -1; }
}
.poll__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }

/* ───────── Budget ───────── */
.budget { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.budget__big { background: var(--atlantic); color: #fff; border-radius: 18px; padding: 24px; display: grid; gap: 18px; }
.budget__big p { font-size: 1.15rem; color: #D7E1EE; }
.budget__big strong { display: block; font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.budget__bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: rgb(255 255 255 / .12); }
.budget__bar span { height: 100%; }
.budget__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; }
.budget__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.budget__table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
.budget__table th, .budget__table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.budget__table th { font-weight: 800; color: var(--muted); font-size: .85rem; background: #F4F7F6; }
.budget__table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 800; }
.budget__table td, .budget__table th { overflow-wrap: anywhere; }
@media (max-width: 400px) { .budget__table th, .budget__table td { padding: 8px 9px; } .budget__table { font-size: .88rem; } }
.budget__table small { display: block; color: var(--muted); }
.budget__table tr:last-child td { border-bottom: 0; }
.open { color: #B26B00; font-weight: 800; }

/* ───────── To-dos ───────── */
.todo__add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.todo__add input { flex: 1 1 260px; }
.todo__add input, .todo__add select, .field input, .field select, .field textarea {
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; min-width: 0;
}
.todos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.todo input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--sign); }
.todo__t { overflow-wrap: anywhere; }
.todo.is-done .todo__t { text-decoration: line-through; color: var(--muted); }
.todo__who { font-size: .8rem; font-weight: 800; color: var(--muted); }

.foot { padding: 80px 0 40px; text-align: center; font-size: .82rem; color: var(--muted); }
.foot p { max-width: 90ch; margin: auto; padding: 0 16px; }
.empty { color: var(--muted); font-style: italic; }

/* ───────── Dialog ───────── */
.dlg {
  width: min(620px, calc(100% - 24px)); max-height: calc(100svh - 40px); border: 0; padding: 0; border-radius: 20px; background: var(--card);
  box-shadow: 0 40px 100px -20px rgb(0 0 0 / .5); color: var(--ink);
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s, transform .2s, display .2s allow-discrete, overlay .2s allow-discrete;
  &[open] { opacity: 1; transform: none; @starting-style { opacity: 0; transform: translateY(14px) scale(.98); } }
  &::backdrop { background: rgb(12 20 34 / .55); backdrop-filter: blur(3px); }
}
.dlg form { display: grid; gap: 14px; padding: 22px; }
.dlg h3 { font-size: 1.4rem; font-weight: 900; }
.dlg__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.field { display: grid; gap: 5px; font-weight: 700; font-size: .92rem; }
.field small { font-weight: 500; color: var(--muted); }
.field textarea { min-height: 90px; resize: vertical; }
.field--check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.field--check input { width: 20px; height: 20px; accent-color: var(--sign); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.geo { display: grid; gap: 8px; }
.geo__row { display: flex; gap: 8px; }
.geo__row input { flex: 1; }
.geo__res { display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.geo__res button { text-align: left; border: 0; background: #F1F5F4; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .86rem; }
.sight-dlg { padding: 0 !important; gap: 0 !important; }
.sight-dlg__img { aspect-ratio: 16 / 9; background: #CFD8DC; overflow: hidden; }
.sight-dlg__img img, .sight-dlg__img svg { width: 100%; height: 100%; object-fit: cover; }
.sight-dlg__body { padding: 20px 22px 22px; display: grid; gap: 12px; }
.sight-dlg__wiki { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }

/* Fotoauswahl */
.pick { width: 100%; }
.dlg:has(.pick) { width: min(880px, calc(100% - 24px)); }
.pick__h { font-size: 1rem; font-weight: 900; margin-top: 4px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 38vh; overflow: auto; }
.picker button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; background: #DCE3E1; outline-offset: 2px; }
.picker button img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.picker button:hover img { transform: scale(1.05); }
.picker button.is-current { outline: 3px solid var(--lane); }

/* ───────── Toast ───────── */
.toast {
  inset: auto 0 24px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); border: 0; padding: 12px 18px 10px; border-radius: 14px;
  background: var(--asphalt); color: #fff; font-weight: 800; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .5);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s, display .2s allow-discrete, overlay .2s allow-discrete;
  &:popover-open { opacity: 1; transform: none; @starting-style { opacity: 0; transform: translateY(10px); } }
  &.is-error { background: #B3261E; }
}

/* ───────── Präsentation ───────── */
.present { position: fixed; inset: 0; z-index: 100; background: #0B1424; color: #fff; overflow: hidden; }
.slide { position: absolute; inset: 0; display: grid; view-transition-name: slide; }
.slide__bg { position: absolute; inset: 0; & svg, & img { width: 100%; height: 100%; object-fit: cover; } }
.slide__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(8 14 28 / .88) 0%, rgb(8 14 28 / .6) 45%, rgb(8 14 28 / .1) 100%); }
.slide__in { position: relative; padding: clamp(28px, 6vh, 70px) clamp(24px, 6vw, 90px) 110px; display: grid; gap: 22px; align-content: center; max-width: 1400px; }
.slide h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 900; letter-spacing: -.02em; }
.slide .guide { font-size: clamp(2rem, 5vw, 4rem); }
.slide__sub { font-size: clamp(1.1rem, 2vw, 1.5rem); color: #D9E2EE; font-weight: 700; }
.slide__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 26px; }
.slide__card { background: rgb(255 255 255 / .1); backdrop-filter: blur(10px); border-radius: 18px; padding: 18px 20px; display: grid; gap: 12px; align-content: start; }
.slide__card h3 { font-size: 1.3rem; font-weight: 900; }
.rank { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; }
.rank__bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgb(255 255 255 / .12); overflow: hidden; }
.rank__bar span { display: block; height: 100%; background: var(--lane); transform-origin: 0; }
@media (prefers-reduced-motion: no-preference) { .rank__bar span { animation: barin .9s cubic-bezier(.2, .8, .2, 1) both; } @keyframes barin { from { transform: scaleX(0); } } }
.rank__name { font-weight: 800; font-size: 1.05rem; }
.rank .voters { grid-column: 1 / -1; color: #CBD5E1; }
.rank .voters .av { box-shadow: 0 0 0 2px #0B1424; }
.slide__sights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.slide__sight { border-radius: 14px; overflow: hidden; background: rgb(255 255 255 / .08); }
.slide__sight .img { aspect-ratio: 4 / 3; } .slide__sight .img img, .slide__sight .img svg { width: 100%; height: 100%; object-fit: cover; }
.slide__sight b { display: block; padding: 8px 10px; font-weight: 800; }
.slide__map { width: min(1100px, 100%); }
.slide__map svg { width: 100%; height: auto; max-height: 64vh; }
.present__nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 14px clamp(16px, 4vw, 40px); background: linear-gradient(0deg, rgb(0 0 0 / .55), transparent); }
.present__nav .icon-btn { color: #fff; background: rgb(255 255 255 / .12); width: 44px; height: 44px; }
.present__count { margin-left: auto; margin-right: auto; font-weight: 800; color: #CBD5E1; font-variant-numeric: tabular-nums; }
.present .btn--ghost { color: #fff; }
::view-transition-old(slide) { animation: .35s ease both slide-out; }
::view-transition-new(slide) { animation: .45s ease both slide-in; }
@keyframes slide-out { to { opacity: 0; transform: translateX(-4%); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(5%); } }

/* ───────── Responsive ───────── */
@media (max-width: 1020px) {
  .tabbar {
    position: fixed; inset: auto 0 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgb(22 26 31 / .94); backdrop-filter: blur(14px);
    box-shadow: 0 -8px 24px -12px rgb(0 0 0 / .5);
    & a, & button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: #DDE3EA;
      font: inherit; font-size: .72rem; font-weight: 800; text-decoration: none; border-radius: 10px; cursor: pointer; }
    & a:active, & button:active { background: rgb(255 255 255 / .12); }
    & svg { width: 24px; height: 24px; }
  }
  .tabbar[hidden] { display: none; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .menu--goals { top: auto; bottom: calc(74px + env(safe-area-inset-bottom)); left: 12px; right: 12px; width: auto; max-height: calc(100svh - 150px); }
  .route { grid-template-columns: minmax(0, 1fr); }
  .route__map { position: relative; top: 0; order: -1; }
  .map { height: 46svh; min-height: 300px; }
  .budget { grid-template-columns: minmax(0, 1fr); }
  .topbar__nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .route__road { padding-left: 52px; }
  .road__lane { left: 6px; width: 34px; }
  .road > li.is-rail::before { left: -46px; width: 34px; background:
    linear-gradient(90deg, transparent 8px, #A7B0BA 8px 11px, transparent 11px 23px, #A7B0BA 23px 26px, transparent 26px),
    repeating-linear-gradient(180deg, #7A5A40 0 5px, transparent 5px 13px), #4E4740; }
  .road__car { width: 22px; }
  .exit { left: -54px; width: 50px; & svg { width: 38px; height: 38px; } }
  .reveal-chip span { display: none; }
  .topbar__brand span:last-child { display: none; }
  .milemarker { width: 88px; right: 16px; bottom: 60px; & strong { font-size: 2.1rem; } }
  .slide__sights { grid-template-columns: 1fr 1fr; }
  .hotel { grid-template-columns: 64px minmax(0, 1fr); } .hotel__img { width: 64px; height: 64px; }
  .fields-2 { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; mask: none; } .ticket__stub { width: auto; border-left: 0; border-top: 2px dashed var(--line); display: flex; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
