@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Pacifico";
  src: url("fonts/pacifico-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f6efe3;
  --surface: #fffaf1;
  --text: #16282c;
  --muted: #5d6b6b;
  --line: #e2d7c4;
  --primary: #12343b;
  --primary-text: #fff8ec;
  --accent: #b9481f;
  --today: #f9e3cf;
  --danger: #a8281c;

  --c-natur: #3f6b3c;
  --c-strand: #11708a;
  --c-stadt: #55607a;
  --c-kultur: #8a5a2b;
  --c-essen: #8e2f4f;
  --c-abenteuer: #b9481f;
  --c-fahrt: #4a5a5e;
  --c-unterkunft: #5b4a86;
  --c-flug: #2b6a9e;
  --c-sonstiges: #6d6a5e;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1d21;
    --surface: #16292e;
    --text: #f1e9da;
    --muted: #a3b0ad;
    --line: #27403f;
    --primary: #f4c58d;
    --primary-text: #16282c;
    --accent: #f0935f;
    --today: #2b2a20;
    --danger: #f2a79f;

    --c-natur: #8fc088;
    --c-strand: #6cc3da;
    --c-stadt: #a9b4cf;
    --c-kultur: #d6a877;
    --c-essen: #e58fac;
    --c-abenteuer: #f0935f;
    --c-fahrt: #aab9bc;
    --c-unterkunft: #b6a6e0;
    --c-flug: #86bdea;
    --c-sonstiges: #bdb9a9;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Die Seite läuft nie seitlich weg und federt nicht nach, die Leiste unten bleibt so ruhig stehen. */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; overscroll-behavior: none; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.spacer { flex: 1; }
.error { color: var(--danger); font-weight: 600; }
.error:empty { display: none; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

main { max-width: 720px; margin: 0 auto; outline: none; }
.content { padding: 0 20px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main:focus-visible { outline: none; }

.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* Kategorie-Farben */
.c-natur { --c: var(--c-natur); }
.c-strand { --c: var(--c-strand); }
.c-stadt { --c: var(--c-stadt); }
.c-kultur { --c: var(--c-kultur); }
.c-essen { --c: var(--c-essen); }
.c-abenteuer { --c: var(--c-abenteuer); }
.c-fahrt { --c: var(--c-fahrt); }
.c-unterkunft { --c: var(--c-unterkunft); }
.c-flug { --c: var(--c-flug); }
.c-sonstiges { --c: var(--c-sonstiges); }

.chip-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.chip-icon .icon { width: 19px; height: 19px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.small { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.btn.large { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.danger { color: var(--danger); border-color: currentColor; }
.btn.block { display: flex; width: 100%; margin-top: 24px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { cursor: pointer; display: inline-flex !important; color: var(--text); }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-btn:disabled { opacity: .25; cursor: default; }
.icon-btn.subtle { color: var(--muted); }

.text-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 0;
  border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: 470px;
  background: linear-gradient(to bottom, #12343b 0, #12343b 45%, var(--bg) 100%);
  color: #fff8ec;
}
.hero-img {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 76%;
  object-fit: cover; object-position: 62% 100%; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 86%, transparent);
}
.hero-text { position: relative; padding: calc(28px + env(safe-area-inset-top)) 56px 0 20px; }
.hero .eyebrow { color: #f4c58d; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.25rem, 9vw, 3rem); text-wrap: balance; }
.hero-lead { margin-top: 8px; color: rgba(255, 248, 236, .86); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 320px; margin-top: 16px; }
.countdown > div { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; background: rgba(18, 52, 59, .62); border: 1px solid rgba(255, 248, 236, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 12px; }
.countdown b { font: 500 1.5rem/1.1 var(--display); font-variant-numeric: tabular-nums; color: #fff8ec; }
.countdown span { margin-top: 2px; font-size: .7rem; color: rgba(255, 248, 236, .8); }
.hero-actions { position: absolute; z-index: 1; top: calc(16px + env(safe-area-inset-top)); right: 12px; display: flex; align-items: center; }
.joke-btn { display: grid; place-items: center; width: 32px; height: 44px; padding: 0; border: 0; background: none; color: #fff8ec; opacity: .35; cursor: pointer; }
.joke-btn .icon { width: 16px; height: 16px; }
.joke-btn:focus-visible { opacity: 1; }
.flag-btn { display: grid; place-items: center; width: 44px; height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font: 700 1.1rem/1 var(--body); opacity: .55; cursor: pointer; }
.flag-btn.is-on { opacity: 1; color: var(--accent); font-size: 1.35rem; }
.tl-item.is-flagged .tl-card { border-color: var(--accent); }
.row-flag { flex: none; color: var(--accent); font-weight: 700; }
.spotify-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 12px; border: 1px solid currentColor; border-radius: 999px; color: var(--text); font-size: .85rem; font-weight: 600; text-decoration: none; }
.spotify-btn .icon { width: 16px; height: 16px; }
.hero-actions .spotify-btn { color: #fff8ec; }
.page-head .spotify-btn { margin-top: 2px; }
.spot-add { width: 100%; gap: 6px; margin-bottom: 16px; }
.spot { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spot-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); }
.spot-icon .icon { width: 19px; height: 19px; }
.spot-body { flex: 1; min-width: 0; }
.spot-name { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.spot-type, .spot-note { margin-top: 3px; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.spot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.spot-link { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; text-underline-offset: 3px; }
.spot-link .icon { width: 13px; height: 13px; }
.spot-days { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.spot-to-day, .spot-day { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 1px solid var(--text); border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.spot-day { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
.spot-to-day .icon, .spot-day .icon { width: 15px; height: 15px; }
.pick-list { display: grid; gap: 8px; margin: 16px 0; }
.pick-list h3 { margin-top: 8px; font-size: .95rem; font-weight: 600; }
.pick-list h3:first-child { margin-top: 0; }
.pick-row { display: grid; gap: 2px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pick-row strong { font-weight: 600; }
.pick-row span { font-size: .85rem; color: var(--muted); }
.pick-row:disabled { opacity: .5; cursor: default; }
.spot-base-list { margin: 16px 0; }
.base-badge { --base: #6c7a7d; min-height: 34px; padding: 0 12px; border: 1px solid var(--base); border-radius: 999px; background: color-mix(in srgb, var(--base) 18%, var(--surface)); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.base-badge.is-open { border-style: dashed; background: none; color: var(--muted); }
.base-badge.is-active { background: var(--base); border-color: var(--base); color: #fff; }
.base-0 { --base: #0f7c86; }
.base-1 { --base: #b9481f; }
.base-2 { --base: #6f7f1f; }
.base-3 { --base: #8a4fa3; }
.base-4 { --base: #a8740c; }
.base-5 { --base: #c43e6b; }
.trip-settings { padding: 8px 20px 24px; text-align: center; }
.joke-date { margin-bottom: 8px; font-size: .8rem; color: var(--muted); }
.joke-answer { margin-top: 14px; font: 500 1.25rem/1.3 var(--display); color: var(--accent, inherit); }
.hero-setup .hero-text { padding-right: 20px; }
.setup-cta { display: grid; justify-items: center; gap: 28px; padding: 16px 20px 32px; }
.join-box { display: grid; gap: 8px; width: min(100%, 440px); padding-top: 24px; border-top: 1px solid var(--line); }
.join-box h2 { font-size: 1.25rem; }

/* Kennzahlen */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 4px 20px 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: .75rem; color: var(--muted); line-height: 1.25; }
.stats dd { margin: 0; font: 500 1.75rem/1.1 var(--display); }
.stats small { font-size: 1rem; color: var(--muted); }

/* Tagesliste, nach Übernachtung gruppiert */
.flight-section { margin-bottom: 20px; }
.flight-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(14, 29, 33, .04), 0 8px 22px rgba(14, 29, 33, .06); }
.flight-banner { position: relative; display: flex; align-items: flex-end; min-height: 128px; padding: 12px 16px; color: #fffaf1; }
.flight-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flight-banner::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(14, 29, 33, .68), rgba(14, 29, 33, 0) 65%); }
.flight-banner h2 { position: relative; z-index: 2; font-size: 1.5rem; }
.flight-body { padding: 12px 16px; }
.flight-no { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.flight-no b { color: var(--text); font-size: 1rem; }
.flight-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin: 12px 0 8px; }
.flight-route > div { display: flex; flex-direction: column; min-width: 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.flight-route .flight-to { text-align: right; }
.flight-route .flight-code { font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
.flight-route b { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.flight-path { align-self: start; margin-top: 20px; color: var(--muted); }
.flight-card .tl-links { padding: 4px 0 0; }
.shop-add { margin: 16px 0; }
.shop-add input { flex: 1; min-width: 0; }
.shop-list { margin: 0 0 12px; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.shop-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.shop-row:last-child { border-bottom: 0; }
.shop-row label { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; padding: 8px 4px 8px 14px; overflow-wrap: anywhere; cursor: pointer; }
.shop-row input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 0; }
.shop-row.is-done span { color: var(--muted); text-decoration: line-through; }
.shop-remove { flex: none; width: 44px; height: 44px; font-size: 1.25rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.shop-done-head { margin: 18px 0 8px; font-size: 1rem; color: var(--muted); }
.travel-link { position: relative; height: 26px; margin: -8px 4px 14px; overflow: hidden; color: var(--muted); }
.travel-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.travel-link span { position: absolute; top: 50%; left: calc(50% - 21px); display: flex; padding: 0 6px; background: var(--bg); transform: translateY(-50%); }
.travel-link.is-plane { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .travel-link span { left: 0; }
  .travel-link.is-running span { animation: travel-across 3.2s cubic-bezier(.45, .05, .25, 1) forwards; }
  .travel-link.is-plane.is-running span { animation-duration: 2.2s; }
  .travel-link.is-parked span { left: calc(100% - 42px); }
}
@keyframes travel-across { to { left: calc(100% - 42px); } }

/* Einmalige Effekte, siehe applyMotion in app.js */
@media (prefers-reduced-motion: no-preference) {
  .will-reveal { opacity: 0; transform: translateY(8px); }
  .stats, .flight-card, .stay-card, .day-rows, .shop-list, .timeline { transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), box-shadow .2s ease; }
  .play-intro .hero-img { animation: hero-settle 1.2s var(--ease-out) both; }
  .play-intro .hero-text > * { animation: rise-in .5s var(--ease-out) both; }
  .play-intro .hero-text > :nth-child(2) { animation-delay: .05s; }
  .play-intro .hero-text > :nth-child(3) { animation-delay: .1s; }
  .play-intro .hero-text > :nth-child(4) { animation-delay: .15s; }
  .stay-card[open] > .stay-card-body { animation: rise-in .25s var(--ease-out); }
  .stay-rules[open] > .rule-row { animation: rise-in .2s var(--ease-out); }
  .stay-image, .flight-banner img { transition: transform .4s var(--ease-out); }
  .btn, .icon-btn, .add-btn, .shop-remove, .base-badge, .spot-to-day, .spot-day, .pick-row, .filter-select { transition: transform .12s var(--ease-out), background-color .15s ease, border-color .15s ease, color .15s ease; }
  .btn:active, .icon-btn:active:not(:disabled), .add-btn:active, .shop-remove:active, .base-badge:active, .spot-to-day:active, .spot-day:active, .pick-row:active:not(:disabled) { transform: scale(.97); }
  .stay-summary:active .stay-image { transform: scale(1.03); }
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--muted); }
  .btn.primary:hover { border-color: var(--primary); opacity: .92; }
  .icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
  .joke-btn:hover { opacity: 1; }
  .pick-row:hover:not(:disabled) { border-color: var(--text); }
  .place-suggest button:hover { background: var(--line); }
  .day-row:hover .chev { color: var(--text); transform: translateX(2px); }
  .check:hover::before { border-color: var(--muted); }
  .add-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
  .tabbar button:hover { color: var(--text); }
  .stay-card:hover .stay-image, .flight-card:hover .flight-banner img { transform: scale(1.04); }
  .stay-card:hover, .flight-card:hover { box-shadow: 0 2px 4px rgba(14, 29, 33, .06), 0 14px 32px rgba(14, 29, 33, .12); }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes hero-settle { from { transform: scale(1.07); } }
.stay-group { margin-bottom: 28px; }
.stay-head { padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.stay-head h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.stay-head p { margin-top: 2px; font-size: .875rem; color: var(--muted); }
.stay-group.is-open .stay-head { border-bottom: 2px dashed var(--muted); }
.stay-group.is-open .stay-head h2 { color: var(--muted); }
.stay-add { margin: 10px 0 4px; gap: 6px; }
.stay-add .icon { width: 16px; height: 16px; }
/* Unterkunft als Oberkategorie: Karte über den Tagen, die dazugehören */
.stay-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(14, 29, 33, .04), 0 8px 22px rgba(14, 29, 33, .06); }
.stay-summary { position: relative; display: flex; align-items: center; min-height: 76px; padding: 12px 44px 12px 16px; list-style: none; cursor: pointer; }
.stay-summary::-webkit-details-marker { display: none; }
.stay-summary::after { content: ""; position: absolute; top: 50%; right: 20px; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.stay-card[open] > .stay-summary::after { margin-top: -2px; transform: rotate(-135deg); }
.stay-summary:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; border-radius: 14px; }
.stay-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.has-image > .stay-summary { color: #fffaf1; }
.has-image > .stay-summary::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(14, 29, 33, .72), rgba(14, 29, 33, .28)); }
.stay-summary h2 { position: relative; z-index: 2; }
.has-image > .stay-summary::after { z-index: 2; }
.stay-card[open] > .stay-summary { min-height: 168px; align-items: flex-end; }
.stay-card-body { display: grid; gap: 14px; padding: 16px; }
.stay-card h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.stay-card p { margin-top: 2px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.stay-title { font-size: .95rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.stay-card .stay-title { color: var(--text); font-size: .95rem; }
.stay-card .stay-lead { display: grid; gap: 2px; margin: 0; }
.stay-lead b { font-size: 1rem; font-weight: 600; color: var(--text); }
.stay-card .stay-notes { margin: 0; padding: 10px 12px; color: var(--text); white-space: pre-line; background: var(--bg); border-left: 3px solid #b9481f; border-radius: 4px 10px 10px 4px; }
.stay-notes b { display: block; margin-bottom: 2px; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: #b9481f; }
.stay-block h3 { margin: 0 0 8px; font-size: .72rem; font-weight: 600; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stay-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.stay-actions .btn { flex: 1 1 auto; justify-content: center; }
.rule-row { padding: 10px 0; border-top: 1px solid var(--line); }
.rule-row:first-of-type { margin-top: 6px; }
.rule-row b { display: block; margin-bottom: 2px; font-size: .85rem; font-weight: 600; }
.stay-card .rule-row p { margin: 0; color: var(--muted); white-space: pre-line; }
.rule-row a { font-weight: 600; color: var(--text); word-break: break-all; }
.stay-card .tl-links { padding: 8px 0 0; }
.stay-card .stay-notes a { font-weight: 600; word-break: break-all; }
.stay-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.stay-times > div { padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.stay-times dt { font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.stay-times dd { margin: 2px 0 0; font-size: .9rem; }
.stay-times b { display: block; font-size: 1rem; font-weight: 600; }
.stay-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stay-amenities li { padding: 3px 10px; font-size: .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.stay-card .stay-missing { margin-top: 6px; font-size: .78rem; }
.stay-rules { padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.stay-rules summary { min-height: 32px; font-weight: 600; cursor: pointer; }
.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
dialog label.check-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; font-weight: 500; color: var(--text); cursor: pointer; }
.check-chip input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.stay-map-links { display: grid; gap: 4px; margin-top: 8px; font-size: .875rem; }
.stay-address { display: flex; align-items: flex-start; gap: 6px; font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.stay-address .icon { flex: none; width: 18px; height: 18px; }
/* Treffer der Ortssuche direkt unter dem Eingabefeld */
.place-suggest { display: grid; margin-top: -8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.place-suggest button {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; overflow-wrap: anywhere;
}
.place-suggest button:last-child { border-bottom: 0; }
.place-suggest .icon { flex: none; width: 18px; height: 18px; color: var(--muted); }

.day-row {
  width: 100%; display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: inherit; font: inherit; cursor: pointer;
}
.day-row.is-today { background: var(--today); margin: 0 -10px; padding: 12px 10px; width: calc(100% + 20px); border-radius: 10px; border-bottom-color: transparent; }
.date { flex: 0 0 44px; display: grid; justify-items: center; }
.date-num { font: 500 1.75rem/1 var(--display); }
.date-wd { margin-top: 3px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.row-body { flex: 1; min-width: 0; display: grid; gap: 3px; align-self: center; }
.row-item { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-free { color: var(--muted); }
.row-more { font-size: .85rem; color: var(--muted); padding-left: 16px; }
.today-tag { justify-self: start; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.time { flex: none; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.chev { flex: none; align-self: center; color: var(--line); transition: transform .15s; }

/* Tagesdetail */
.day-detail { padding-top: calc(8px + env(safe-area-inset-top)); }
.day-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.day-step { display: flex; margin-right: -8px; }
.day-title { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.big-num { font: 400 5rem/.9 var(--display); letter-spacing: -.03em; color: var(--accent); font-variant-numeric: lining-nums; }
.day-title h1 { font-size: 1.875rem; margin-top: 4px; }

.stay-field { display: flex; align-items: center; gap: 4px; margin: 0 0 22px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.stay-main { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 0; border: 0; background: none; text-align: left; color: var(--muted); font: inherit; cursor: pointer; }
.stay-main > .icon { flex: none; width: 18px; height: 18px; }
.stay-text { display: grid; gap: 1px; min-width: 0; }
.stay-now { font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.stay-leave { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

.section-title { display: block; font: 500 1.25rem/1.2 var(--display); margin-bottom: 14px; }
.empty-note { padding: 20px; margin-bottom: 14px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }

.timeline { position: relative; margin-bottom: 18px; }
.tl-item { position: relative; display: grid; grid-template-columns: 44px 36px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 71px; top: 40px; bottom: 0; width: 2px;
  background: var(--line);
}
.tl-time { padding-top: 8px; text-align: right; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.tl-mark { position: relative; }
.tl-card {
  display: block; overflow: hidden; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.tl-main {
  flex: 1; min-width: 0; display: grid; gap: 3px; padding: 12px 4px 12px 14px;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  overflow-wrap: anywhere;
}
.tl-main strong { font-weight: 600; line-height: 1.3; }
.tl-place { font-size: .875rem; color: var(--muted); }
.tl-notes { font-size: .875rem; color: var(--muted); white-space: pre-wrap; margin-top: 4px; }
.tl-actions { display: grid; justify-items: center; padding: 4px 4px 4px 0; }
.check {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; color: transparent; cursor: pointer; position: relative;
}
.check::before {
  content: ""; position: absolute; inset: 10px;
  border: 2px solid var(--line); border-radius: 50%;
}
.check .icon { position: relative; width: 14px; height: 14px; stroke-width: 3; }
.is-done .check { color: var(--primary-text); }
.is-done .check::before { background: var(--primary); border-color: var(--primary); }
.is-done .tl-main strong { text-decoration: line-through; color: var(--muted); }
.is-done .chip-icon { opacity: .55; }

.add-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 36px; }
.add-row .btn { padding-inline: 6px; font-size: .92rem; }
.add-row .btn.primary { grid-column: 1 / -1; font-size: 1rem; }
.notes-field { display: block; }

/* Formulare */
input, select, textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); font: 400 16px/1.4 var(--body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; }
input::-webkit-date-and-time-value { text-align: left; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px;
  text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237d8a88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
textarea { resize: vertical; display: block; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
dialog input:not([type="checkbox"]), dialog select, dialog textarea { background-color: var(--bg); }

dialog {
  --pad: 24px;
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: var(--pad) var(--pad) 0; border: 0; border-radius: 20px; overscroll-behavior: contain;
  background: var(--surface); color: var(--text);
}
dialog[open] { animation: dialog-in .2s var(--ease-out); }
dialog[open]::backdrop { animation: backdrop-in .2s ease-out; }
/* Hinweis direkt über der Leiste, so bleiben die Überschriften frei. */
body:has(.install-hint:not([hidden])) { padding-bottom: calc(156px + env(safe-area-inset-bottom)); }
.install-hint { position: fixed; z-index: 4; bottom: calc(70px + env(safe-area-inset-bottom)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; max-width: 480px; margin-inline: auto; padding: 8px 2px 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 24, 28, .2); }
.install-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; color: #fff8ec; background: #12343b; border-radius: 50%; }
.install-icon .icon { width: 18px; height: 18px; }
.install-text { flex: 1; min-width: 0; font-size: .95rem; font-weight: 600; }
.install-hint .btn { flex: none; }
.install-hint .shop-remove { width: 32px; margin-left: -6px; }
.install-body { display: grid; gap: 12px; }
.install-body h3 { font-size: .95rem; font-weight: 600; }
.install-body .btn { gap: 6px; }
.install-steps { display: grid; gap: 8px; margin: 0; padding-left: 22px; list-style: decimal; }
.install-steps .icon { width: 18px; height: 18px; vertical-align: -4px; }
dialog::backdrop { background: rgba(10, 24, 28, .55); }
dialog form { display: grid; gap: 16px; }
dialog h2 { font-size: 1.5rem; }
dialog label { display: grid; gap: 6px; min-width: 0; font-weight: 600; font-size: .8125rem; color: var(--muted); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dialog-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px;
  margin: 0 calc(var(--pad) * -1); padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.dialog-actions .spacer { display: none; }
.dialog-actions .btn { flex: 1; padding: 0 14px; white-space: nowrap; }
.dialog-actions .btn.danger { flex: none; border-color: transparent; padding-inline: 10px; }
/* Abschnitte im Dialog: Trennlinie und kleine Überschrift, keine Kästen in Kästen */
.inspo, .share-box { display: block; min-width: 0; margin: 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.inspo > * + *, .share-box > * + * { margin-top: 10px; }
.inspo legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; }
.inspo legend + * { clear: both; margin-top: 0; }
.inspo legend, .share-box h3 { font-size: .9375rem; font-weight: 600; color: var(--text); }

@keyframes dialog-in { from { opacity: 0; transform: scale(.97); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes backdrop-in { from { opacity: 0; } }

/* Handy: Dialog als Blatt von unten */
@media (max-width: 560px) {
  dialog {
    --pad: 20px;
    width: 100%; max-width: 100%; margin: auto 0 0;
    max-height: calc(100dvh - 28px - env(safe-area-inset-top));
    border-radius: 20px 20px 0 0;
  }
  dialog[open] { animation: sheet-in .36s var(--ease-drawer); }
}

/* Seitenkopf */
.page-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px;
  padding: calc(24px + env(safe-area-inset-top)) 0 20px;
}
.page-head h1 { font-size: 2.25rem; margin-top: 6px; }

/* Ideen */
.filter-bar { display: grid; gap: 10px; margin-bottom: 24px; }
.filter-bar.is-double { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.filter-field { display: grid; gap: 6px; min-width: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.filter-select { min-height: 44px; padding-block: 10px; font-weight: 500; }
.region { margin-bottom: 28px; }
.region h2 { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.idea { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.idea-body { flex: 1; min-width: 0; }
.idea-body strong { font-weight: 600; line-height: 1.3; }
.idea-body p { margin: 3px 0 5px; font-size: .9rem; color: var(--muted); }
.idea-body a { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; text-underline-offset: 3px; }
.idea-body a .icon { width: 13px; height: 13px; }
.add-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--text); border-radius: 50%; background: none; color: var(--text); cursor: pointer;
}
.add-btn.is-planned { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }

/* Route */
.route li { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding-left: 26px; }
.route li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--text); }
.route li:first-child::before { top: 50%; }
.route li:last-child::before { bottom: 50%; }
.route li.is-open::before { background: repeating-linear-gradient(to bottom, var(--muted) 0 5px, transparent 5px 10px); }
.route-mark {
  position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.is-open .route-mark { background: var(--bg); border: 2px solid var(--muted); }
.route-stop {
  flex: 1; min-width: 0; display: grid; gap: 2px; padding: 8px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.route-name { font: 500 1.375rem/1.15 var(--display); overflow-wrap: anywhere; }
.is-open .route-name { color: var(--muted); }
.route-meta { font-size: .85rem; color: var(--muted); }
.route-nights { flex: none; display: grid; justify-items: end; font-size: .72rem; color: var(--muted); }
.route-nights b { font: 500 1.5rem/1 var(--display); color: var(--text); }

/* Tableiste */
.tabbar {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line);
  touch-action: manipulation;
}
.tabbar button {
  flex: 1; min-width: 0; max-width: 120px; min-height: 48px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 12px; background: none; color: var(--muted);
  font: inherit; cursor: pointer; transition: color .12s ease;
}
.tabbar button span { font-size: .6875rem; font-weight: 600; }
.tabbar button.active { color: var(--accent); }

#toast {
  position: fixed; z-index: 6; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px; max-width: calc(100vw - 32px);
  background: var(--text); color: var(--bg); font-weight: 600; font-size: .9rem;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Ab Tablet: Hero als abgerundete Karte */
@media (min-width: 760px) {
  main { padding-top: 20px; }
  .hero { border-radius: 24px; min-height: 520px; }
  .hero-img { height: 100%; object-position: 50% 100%; }
  .hero-text { padding: 36px 80px 0 36px; }
  .hero-actions { top: 24px; right: 20px; }
  .content { padding: 0 8px; }
  .stats { margin-inline: 8px; }
}

@media (max-width: 340px) {
  .row, .filter-bar.is-double { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .install-hint { animation: banner-in .32s var(--ease-out); }
  .install-hint.is-leaving { animation: banner-out .2s var(--ease-out) forwards; }
}
@keyframes banner-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes banner-out { to { opacity: 0; transform: translateY(12px); } }

/* Anfangsanimation: Comicbild im Ring mit Schreibschrift wie eine Neonreklame, ein Flugzeug zieht einmal seine Runde. */
.splash { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; overflow: hidden; --neon: #ff5a36; --neon-core: #ffc9b5; --neon-line: #ff8a68; --neon-band: #0a1b1f; --neon-glow: #1c4c55; --neon-dark: #0e2529; background: radial-gradient(circle at 50% 50%, var(--neon-glow), var(--neon-dark) 70%); touch-action: none; cursor: pointer; }
.splash-badge { position: relative; width: min(90vw, 66vh, 620px); aspect-ratio: 1; }
.splash-comic { position: absolute; left: 18.2%; top: 18.2%; width: 63.6%; height: 63.6%; border-radius: 50%; }
.splash-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.splash-band { fill: none; stroke: var(--neon-band); stroke-width: 50; }
.splash-ink { fill: none; stroke: var(--neon-line); stroke-width: 2.5; filter: drop-shadow(0 0 5px var(--neon)); }
.splash-letters { fill: var(--neon-core); font: 400 37px "Pacifico", cursive; text-anchor: middle; filter: drop-shadow(0 0 2px var(--neon-line)) drop-shadow(0 0 7px var(--neon)) drop-shadow(0 0 16px var(--neon)); }
.splash-trail { fill: none; stroke: var(--neon-line); stroke-width: 1.5; stroke-dasharray: 1 1; opacity: .75; }
.splash-orbit { transform-origin: 220px 220px; }
.splash-plane { fill: #fff8ec; stroke: var(--neon-dark); stroke-width: 3; paint-order: stroke; }
@media (prefers-reduced-motion: no-preference) {
  .splash-comic, .splash-band, .splash-ink, .splash-letters, .splash-orbit { opacity: 0; }
  .splash-trail { stroke-dashoffset: 1; }
  .splash-band, .splash-ink { transform-origin: 220px 220px; }
  .splash.is-playing .splash-comic { animation: splash-pop .75s cubic-bezier(.2, 1.3, .4, 1) forwards; }
  .splash.is-playing .splash-band, .splash.is-playing .splash-ink { animation: splash-pop .75s .08s cubic-bezier(.2, 1.3, .4, 1) forwards; }
  .splash.is-playing .splash-letters { animation: splash-neon 1.1s .45s linear forwards; }
  .splash.is-playing .splash-orbit { animation: splash-orbit 1.8s .55s cubic-bezier(.45, 0, .25, 1) forwards; }
  .splash.is-playing .splash-trail { animation: splash-trail 1.8s .55s cubic-bezier(.45, 0, .25, 1) forwards; }
  .splash.is-leaving { animation: splash-out .5s ease-in forwards; }
}
@keyframes splash-pop { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: none; } }
@keyframes splash-neon { 0%, 14% { opacity: 0; } 16%, 24% { opacity: 1; } 26%, 42% { opacity: .15; } 44%, 52% { opacity: 1; } 54%, 62% { opacity: .3; } 64%, 100% { opacity: 1; } }
@keyframes splash-orbit { from { opacity: 1; transform: rotate(0); } to { opacity: 1; transform: rotate(360deg); } }
@keyframes splash-trail { to { stroke-dashoffset: 0; } }
@keyframes splash-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Tafelberg als wiederkehrendes Zeichen */
.mountain { display: block; fill: currentColor; }
.page-head .mountain { grid-column: 1 / -1; width: 100%; height: 34px; margin-top: 4px; color: var(--line); }
.end-mark { padding: 12px 0 8px; color: var(--line); }
.end-mark .mountain { width: 100%; height: 56px; }

/* Bilder in der Planung */
.tl-row { display: flex; align-items: flex-start; gap: 2px; min-width: 0; }
.tl-image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.is-done .tl-image { opacity: .55; }
.tl-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 14px 12px; font-size: .875rem; font-weight: 600; }
.tl-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; text-underline-offset: 3px; }
.tl-links a .icon { width: 13px; height: 13px; }
.text-link { min-height: 28px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-embed { display: block; width: 100%; height: 600px; border: 0; border-top: 1px solid var(--line); background: var(--bg); }
.tl-embed.is-instagram { height: calc(min(100vw - 40px, 680px) + 210px); }
/* Link-Vorschau: zeigt aus der offiziellen Einbettung nur das Bild. Der Kopf des Beitrags ist 55px hoch,
   das quadratische Bild wird im Rahmen mittig ausgeschnitten. Ein Tipp öffnet den Beitrag. */
.tl-preview {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; container-type: inline-size; background: var(--line);
}
.tl-preview iframe {
  position: absolute; left: 0; top: calc(-55px - 18.75cqw);
  width: 100%; height: calc(100cqw + 320px); border: 0; pointer-events: none;
}
/* Beiträge brauchen Platz: Die Karte nutzt dann die volle Breite unter Uhrzeit und Symbol. */
.tl-item.has-embed .tl-card { grid-column: 1 / -1; position: relative; }
.row-thumb { flex: none; align-self: center; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.idea-img { flex: none; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }

/* Inspiration im Dialog */
.link-row { display: flex; gap: 8px; min-width: 0; }
.link-row input { flex: 1; }
.link-row .btn { min-height: 48px; flex: none; }
.image-pick { display: grid; gap: 10px; }
#image-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.file-btn span { font: inherit; }

/* Karte */
.map-wrap { position: relative; height: min(62vh, 520px); margin: 0 -20px; overflow: hidden; background: var(--line); }
#map { position: absolute; inset: 0; }
.map-status { min-height: 1.4em; margin: 8px 0 12px; }
.map-status:empty { margin: 8px 0; min-height: 0; }
.map-error { padding: 40px 20px; text-align: center; color: var(--muted); }
.map-stop {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 3px solid #fffaf1; border-radius: 50%; background: #b9481f; color: #fffaf1;
  font: 600 .95rem/1 var(--display); cursor: pointer; box-shadow: 0 2px 8px rgba(10, 24, 28, .4);
}
.map-pin {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; overflow: hidden;
  border: 2px solid #fffaf1; border-radius: 50%; background: var(--surface); color: var(--c);
  cursor: pointer; box-shadow: 0 2px 8px rgba(10, 24, 28, .4);
}
.map-pin.is-large { width: 48px; height: 48px; }
.map-pin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-pin .icon { width: 15px; height: 15px; }
.map-pin.is-large .icon { width: 22px; height: 22px; }
.maplibregl-popup-content { padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--text); font-family: var(--body); }
.maplibregl-popup-tip { display: none; }
.maplibregl-popup-close-button { width: 28px; height: 28px; font-size: 18px; color: var(--text); background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 0 12px 0 8px; }
.map-popup { display: grid; gap: 2px; padding-bottom: 10px; }
.map-popup > * { margin-inline: 12px; }
.map-popup img { width: 100%; margin: 0 0 6px; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.map-popup strong { font: 500 1.05rem/1.2 var(--display); padding-right: 16px; }
.map-popup span { font-size: .8rem; color: var(--muted); }
.map-popup .text-link { justify-self: start; font-size: .875rem; margin-top: 4px; }
.map-popup strong:first-child { padding-top: 12px; }
.map-list { display: grid; gap: 4px; margin-bottom: 8px; }
.map-list-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.map-list-item > span:last-child { display: grid; min-width: 0; }

@media (min-width: 760px) {
  .map-wrap { margin: 0; border-radius: 18px; }
}

#sync-pill {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px); padding: 7px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(10, 24, 28, .18);
}
