:root {
  --bg: #f7f5f1; --surface: #ffffff; --ink: #111111; --muted: #5f5f5a; --line: #e2ded6;
  --teal: #82dbdb; --teal-deep: #1f7373; --amber: #ffbf55; --coral: #c23a25; --green: #4a9d5b; --violet: #8e5ab8; --sky: #2f8fd8;
  --display: "Playfair Display", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }

#map { position: fixed; inset: 0; z-index: 0; background: #d7e6ea; }
.leaflet-container { font-family: var(--body); }

/* Oberleiste */
.topbar { position: fixed; z-index: 1100; top: env(safe-area-inset-top, 0px); left: 0; right: 0; padding: 10px 12px 0; display: grid; gap: 8px; pointer-events: none; max-width: 560px; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand-actions { display: flex; gap: 8px; align-items: center; }
.brand h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; text-shadow: 0 1px 0 #fff, 0 0 8px #fff; }
.brand h1 span { color: var(--teal-deep); }
.search { position: relative; }
.search input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }
#results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); max-height: 46dvh; overflow-y: auto; }
#results .group { padding: 6px 10px 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
#results li[role="option"] { display: flex; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
#results li[aria-selected="true"], #results li[role="option"]:hover { background: #ece8e0; }
#results small { color: var(--muted); }
.row { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px 4px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Pins */
.pin { display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.c-Sehenswurdigkeit { background: var(--teal-deep); }
.c-Restaurant { background: var(--amber); }
.c-Aktivitat { background: var(--coral); }
.c-Strand { background: var(--sky); }
.popup h3 { margin: 0 0 2px; font-size: 15px; }
.popup p { margin: 0 0 8px; color: var(--muted); }
.leaflet-container a.popup-route, .popup a.popup-route { display: inline-block; margin-left: 6px; border-radius: 999px; padding: 6px 12px; min-height: 40px; line-height: 28px; font-weight: 700; font-size: 13px; background: #1a73e8; color: #fff; text-decoration: none; }
.popup button { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; }

/* Schwebende Bedienelemente */
.pill { position: fixed; z-index: 1150; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); background: var(--amber); color: var(--ink); border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 800; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); white-space: nowrap; }
.fab { position: fixed; z-index: 1150; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.leaflet-bottom.leaflet-right { margin-bottom: 8px; }
.banner { position: fixed; z-index: 1150; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 536px; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
body.adding #map { cursor: crosshair; }

/* Bottom Sheet */
.sheet { position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 68dvh; overflow-y: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28); }
form.sheet { display: grid; gap: 12px; align-content: start; background: var(--surface); }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sheet-head h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; text-wrap: balance; }
.sheet-head p { margin: 0; color: var(--muted); }
.close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #ece8e0; font-size: 22px; line-height: 1; }
.list { list-style: none; margin: 10px 0 0; padding: 0; }
.item { padding-block: 14px; border-top: 1px solid var(--line); }
.head { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; }
.rank { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; color: var(--line); font-variant-numeric: tabular-nums; }
.item:nth-child(1) .rank { color: var(--amber); }
.item:nth-child(2) .rank, .item:nth-child(3) .rank { color: var(--teal-deep); }
.name { font-weight: 700; font-size: 16px; margin: 0 0 2px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink); }
.note { margin: 0 0 6px; color: var(--muted); }
.tag { display: flex; margin-top: 2px; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.item-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 0 42px; }
.rate-btn { margin: 0; border: 2px solid var(--ink); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.rate-btn[aria-expanded="true"] { background: var(--ink); color: #fff; }
.rate-btn.done { border-color: var(--teal-deep); color: var(--teal-deep); }
.rate-btn[aria-expanded="true"].done { color: #fff; }
.panel { margin: 10px 0 0 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.stars { display: flex; gap: 4px; }
.star { border: 0; background: none; padding: 2px; font-size: 30px; line-height: 1; color: var(--line); }
.star.on { color: var(--amber); }
.comments { margin: 10px 0 0 48px; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.more, .status { padding-block: 16px 4px; color: var(--muted); text-align: center; font-size: 13px; }
.empty { padding-block: 24px; color: var(--muted); text-align: center; }
label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; }
textarea { resize: none; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; background: #ece8e0; color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; }
.banner .btn { background: #fff; }
.error { color: #b3261e; font-weight: 700; margin: 0; }
@media (prefers-reduced-motion: no-preference) { .pill, .fab, .star { transition: transform 0.12s ease, background 0.12s ease; } .star:active { transform: scale(0.9); } }

/* Detailseite */
.detail { z-index: 1300; max-height: 86dvh; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 12px -16px 0; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 82%; max-width: 420px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; scroll-snap-align: center; background: #ece8e0; }
.gallery img:only-child { width: 100%; }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.text p { margin: 12px 0 0; }
.tip { margin: 14px 0 0; padding: 12px 14px; background: #fff6e3; border-left: 4px solid var(--amber); border-radius: 8px; }
.locked { margin: 14px 0 0; color: var(--muted); font-style: italic; }
.community { margin-top: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; }
.community h3 { margin: 0; font-family: var(--display); font-size: 18px; }
.community .avg { color: var(--muted); }
.detail-actions { margin-top: 14px; display: flex; gap: 8px; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #ece8e0; }
.popup img { display: block; width: 180px; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; background: #ece8e0; }

/* Etabliert / Neu */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; background: #ece8e0; border-radius: 12px; }
.segmented button { border: 0; border-radius: 9px; padding: 9px 8px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pin-new { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--amber), 0 2px 10px rgba(0, 0, 0, 0.4); }
.badge-new { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--amber); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.empty-new { padding: 24px 8px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty-new .btn { background: var(--ink); color: #fff; }

/* Konto */
.account-btn { border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.account-btn.on { width: 38px; height: 38px; padding: 0; background: var(--ink); color: #fff; font-size: 16px; }
.sheet.auth { z-index: 1400; background: var(--surface); }
#account { z-index: 1350; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }
.acc-section { margin-top: 18px; }
.acc-section h3 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-list button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.acc-list small { color: var(--muted); }
.acc-actions { margin-top: 20px; display: grid; gap: 10px; }
.btn.danger { background: #fdecea; color: #b3261e; }
.confirm-delete { display: grid; gap: 8px; padding: 12px; border: 1px solid #f0c4bf; border-radius: 12px; background: #fff8f7; }

/* Tipp hinzufügen: Ortssuche */
.place-search { display: grid; gap: 6px; }
#f-results { list-style: none; margin: 0; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 2px; max-height: 34dvh; overflow-y: auto; }
#f-results li { padding: 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 2px; }
#f-results li[aria-selected="true"], #f-results li:hover { background: #ece8e0; }
#f-results small { color: var(--muted); font-weight: 400; }
.link-btn { border: 0; background: none; color: var(--teal-deep); font-weight: 700; padding: 4px 0; text-align: left; text-decoration: underline; font-size: 14px; }
.picked { margin: 0; padding: 10px 12px; background: #eaf7f7; border-radius: 10px; font-size: 14px; display: grid; gap: 6px; }
.picked .warn { color: #8a5a00; font-weight: 700; }
.picked .btn { justify-self: start; padding: 6px 12px; font-size: 13px; }
label .hint { font-weight: 400; }

/* Standort, Hinweis, Weiter ansehen */
.locate-btn { position: fixed; z-index: 1150; right: 10px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: #1a73e8; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.toast { opacity: 0; pointer-events: none; transition: opacity 0.2s; position: fixed; z-index: 1500; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); max-width: min(90vw, 420px); margin: 0; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 12px; font-size: 14px; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
.more-btn { background: var(--ink); color: #fff; padding: 12px 22px; }
.more:has(.more-btn) { padding-block: 18px 6px; }

.badge-same, .badge-similar { font-size: 12px; font-weight: 700; }
.badge-same { color: #b3261e; }
.badge-similar { color: #8a5a00; }
#form-error .btn { margin-top: 6px; }

.chip:disabled { opacity: 0.4; cursor: default; }
#sheet-cats .chip[aria-pressed="true"]:disabled { opacity: 1; }

/* Einstieg: Was möchtest du sehen oder machen? */
.intro { position: fixed; inset: 0; z-index: 1600; background: rgba(247, 245, 241, 0.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow-y: auto; display: grid; align-items: center; padding: calc(24px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left)); }
.intro-card { width: 100%; max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.intro-card h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; text-wrap: balance; }
.intro-card p { margin: 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: grid; gap: 4px; align-content: start; text-align: left; min-height: 104px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); border-left-width: 6px; }
.tile:hover, .tile:focus-visible { border-color: var(--ink); }
.tile:active { transform: scale(0.98); }
.tile .ico { font-size: 28px; line-height: 1; }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-size: 13px; }
.tile.c-Sehenswurdigkeit { border-left-color: var(--teal-deep); background: var(--surface); }
.tile.c-Restaurant { border-left-color: var(--amber); background: var(--surface); }
.tile.c-Aktivitat { border-left-color: var(--coral); background: var(--surface); }
.tile.c-Strand { border-left-color: var(--sky); background: var(--surface); }
@media (max-width: 380px) { .intro-card h2 { font-size: 28px; } }

/* Topbar-Symbole, Aktionsleiste, Angaben, Listen */
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.head-actions { display: flex; gap: 8px; flex: none; }
.head-actions .close { display: grid; place-items: center; }
.action-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.act { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
.act .act-ico { display: grid; place-items: center; height: 24px; }
.act.on { border-color: var(--coral); color: var(--coral); }
.action-panel { margin-top: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.action-panel .btn, .action-panel a.btn { text-align: center; text-decoration: none; display: block; }
.trip-pick { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 700; color: var(--ink); }
.trip-pick[aria-pressed="true"] { border-color: var(--teal-deep); }
.new-trip { display: flex; gap: 8px; }
.new-trip input { flex: 1; }
.facts-card { margin-top: 14px; padding: 4px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.fact { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact:last-of-type { border-bottom: 0; }
.fact span:first-child { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 2px; }
.report-link { margin: 6px 0 2px; font-size: 13px; }
.report-box { margin-top: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.lrow .thumb { width: 48px; height: 48px; }
.lrow .ph { width: 48px; height: 48px; border-radius: 10px; background: #ece8e0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.lrow .who { display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 0; color: var(--ink); }
.lrow .who b { font-size: 15px; }
.lrow .who small { color: var(--muted); }
.lrow .ctl { display: flex; gap: 6px; }
.lrow .ctl button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 800; }
.trip-head { display: grid; gap: 8px; margin: 4px 0 8px; }
.trip-head .row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.trip-head a.btn { text-decoration: none; }
.trip-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
#mylists { z-index: 1250; }

/* Jodel-Voting in den Top-Listen */
.vote { display: grid; justify-items: center; align-items: center; min-width: 48px; }
.vbtn { width: 48px; height: 34px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 10px; }
.vbtn:active { transform: scale(0.9); }
.vbtn.up.on { color: var(--teal-deep); }
.vbtn.down.on { color: var(--coral); }
.vbtn:disabled { opacity: 0.35; cursor: default; }
.vnum { font-family: var(--display); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; min-height: 22px; display: grid; place-items: center; }
.voted-up .vnum { color: var(--teal-deep); }
.voted-down .vnum { color: var(--coral); }
.stars-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

/* Geheimtipp */
.c-Geheimtipp { background: #c2185b; }
.tile.c-Geheimtipp { border-left-color: #c2185b; background: var(--surface); }
.pin-secret { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c2185b, 0 2px 10px rgba(0, 0, 0, 0.4); }
.badge-secret { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #c2185b; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.secret-row { margin-top: 10px; display: grid; gap: 4px; }
.secret-btn { padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 700; text-align: left; }
.secret-btn.on { border-color: #c2185b; color: #c2185b; }
.secret-row small { color: var(--muted); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 700; }
label.check input { width: 22px; height: 22px; flex: none; }

/* Fotos von Nutzern, Profile, Bestenliste, Benachrichtigungen */
.photo-box { margin-top: 12px; display: grid; gap: 8px; }
.user-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.user-photos::-webkit-scrollbar { display: none; }
.user-photos figure { flex: none; width: 70%; max-width: 320px; margin: 0; scroll-snap-align: center; }
.user-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #ece8e0; display: block; }
.user-photos figcaption { font-size: 13px; color: var(--muted, #5a5a5a); padding-top: 4px; }
.user-photos figcaption .link-btn { font-size: 13px; }
.bell { position: relative; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d4372c; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.bell-count[hidden] { display: none; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: 12px; padding: 10px 4px; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.stat strong { display: block; font-family: var(--display); font-size: 22px; }
.stat small { font-size: 12px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--amber); color: var(--ink); font-weight: 800; font-size: 14px; }
.leaders { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.leaders button { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px; text-align: left; border: 0; border-radius: 12px; background: var(--surface); padding: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); font: inherit; }
.leaders .rank { font-family: var(--display); font-size: 20px; }
.legend { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.notes li.unread button { border-left: 4px solid var(--amber); }

/* Fotos in den Top-Listen: links, blenden nach rechts weich aus, rechts steht der Text */
.item.has-photo { display: grid; grid-template-columns: 124px 1fr; column-gap: 0; align-items: stretch; }
.item-pic { position: relative; grid-column: 1; grid-row: 1 / span 2; display: block; width: 100%; min-height: 108px; padding: 0; border: 0; margin: 0; border-radius: 12px 0 0 12px; overflow: hidden; background: transparent; }
.item-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 100%); mask-image: linear-gradient(to right, #000 45%, transparent 100%); }
.pic-rank { position: absolute; top: 6px; left: 6px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.95); font-family: var(--display); font-weight: 800; font-size: 15px; display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); }
.item:nth-child(1) .pic-rank { background: var(--amber); }
.item.has-photo .head { grid-column: 2; grid-template-columns: 1fr auto; padding-left: 4px; }
.item.has-photo .head .rank { display: none; }
.item.has-photo .item-row { grid-column: 2; margin: 8px 0 0 4px; }

.dormant-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef1f4; color: var(--muted); font-size: 14px; }

/* Registrierung und Einstellungen */
.sheet.auth { max-height: 90dvh; }
#auth-extra { display: grid; gap: 12px; }
#auth-extra[hidden] { display: none; }
#auth-extra label.check { align-items: flex-start; font-weight: 500; }
#auth-extra label.check input { margin-top: 2px; }
#auth-extra .hint, .set-form .hint { font-weight: 400; }
.set-form { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.set-form h3 { margin: 0; }
.set-form .hint.ok { color: var(--teal-deep); font-weight: 700; }
.legal-links a { color: var(--teal-deep); font-weight: 700; }
a.btn { display: inline-block; text-decoration: none; text-align: center; }
#auth-extra a { color: var(--teal-deep); font-weight: 700; }

/* Passwortfeld mit Auge */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; }
.eye .slash { display: none; }
.eye[aria-pressed="true"] .slash { display: block; }
.eye[aria-pressed="true"] { color: var(--ink); }
.hint.bad { color: #b3261e; font-weight: 700; }

/* Abzeichen-Karten */
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.badge-card { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); opacity: 0.6; filter: grayscale(0.8); }
.badge-card.earned { opacity: 1; filter: none; background: #fff6e3; border-color: var(--amber); }
.badge-icon { font-size: 30px; line-height: 1; }
.badge-card strong { font-size: 15px; }
.badge-card small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.badge-state { font-size: 12px; font-weight: 800; color: var(--muted); }
.badge-card.earned .badge-state { color: var(--teal-deep); }
.badge-bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 4px; }
.badge-bar span { display: block; height: 100%; background: var(--teal-deep); border-radius: 999px; }
@media (max-width: 340px) { .badge-grid { grid-template-columns: 1fr; } }

/* Neue Kategorien */
.c-Unterkunft { background: #5b6bd6; }
.c-Nachtleben { background: #8a2e7f; }
.c-Shopping { background: #d9578a; }
.tile.c-Unterkunft { border-left-color: #5b6bd6; background: var(--surface); }
.tile.c-Nachtleben { border-left-color: #8a2e7f; background: var(--surface); }
.tile.c-Shopping { border-left-color: #d9578a; background: var(--surface); }
/* Öffnungszeiten, Preis, Bearbeiten, Folgen */
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.edit-wrap { margin-top: 8px; display: grid; gap: 8px; }
.social-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.social-row .hint { margin: 0; flex: 1 1 100%; }

/* Gemeinsame Trips */
.crew { margin: 14px 0 6px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; }
.crew h3 { margin: 0; font-family: var(--display); font-size: 17px; }
.crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crew-list li { display: flex; align-items: center; gap: 8px; }
.crew-list li small { color: var(--muted); flex: 1; }

/* Konto-Menü, aufklappbare Bereiche */
.account-menu { display: grid; gap: 8px; margin-top: 14px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 14px; background: var(--surface); padding: 14px 16px; font-size: 16px; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.menu-icon { font-size: 22px; width: 28px; text-align: center; }
details.fold { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
details.fold summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 800; cursor: pointer; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: '›'; font-size: 22px; margin-left: 8px; transition: transform 0.15s; }
details.fold[open] summary::after { transform: rotate(90deg); }
details.fold summary small { margin-left: auto; color: var(--muted); font-weight: 700; }
details.fold .acc-list, details.fold > .hint { padding-bottom: 12px; margin: 0; }
details.danger-zone { margin-top: 18px; color: var(--muted); }
details.danger-zone summary { cursor: pointer; font-size: 14px; padding: 8px 0; }
details.danger-zone .confirm-delete { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details.danger-zone h3 { margin: 0; color: #b3261e; }
.btn.danger { background: #b3261e; color: #fff; }

/* Trip: Liste zugeklappt, damit die Karte mit den Stopps frei ist */
#mylists.peek { max-height: 168px; overflow: hidden; }
body:has(#mylists:not([hidden])) #top10 { display: none; }

/* Moderation */
.mod-card { display: grid; gap: 6px; padding: 12px; margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.mod-card .hint { margin: 0; }
.mod-photo { max-width: 220px; border-radius: 10px; }
.team-tools { margin-top: 14px; padding: 10px 12px; background: #eef1f4; border-radius: 12px; display: grid; gap: 8px; }

.visually-hidden-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Barrierefreiheit und Bedienbarkeit auf dem Handy (Prüfung 20.09.2026) */
input, select, textarea { font-size: 16px; } /* unter 16 px zoomt iOS beim Antippen ein */
.toast.show { opacity: 1; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.close, .icon-btn, .account-btn.on, .lrow .ctl button, .eye { width: 44px; height: 44px; }
.eye { right: 2px; }
.vbtn { min-height: 44px; height: 44px; }
.star { min-width: 44px; min-height: 44px; }
.chip, .rate-btn, .popup button { min-height: 40px; }
.link-btn { min-height: 44px; display: inline-flex; align-items: center; }
.rank { color: #767676; }
.item:nth-child(1) .rank { color: #9a6f00; }
.star { color: #949490; }
.star.on { color: #c27c00; }
.badge-card, .badge-card:not(.earned) { opacity: 1; filter: none; }
.badge-card:not(.earned) .badge-icon { opacity: 0.45; filter: grayscale(1); }
/* Sichere Bereiche auch links und rechts (Querformat, Kamera-Aussparung) */
.topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.sheet { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.search input, #search { font-size: 16px; }

/* Handy-Ansicht: weniger Bedienelemente, unten eine Tab-Leiste, oben nur Suche und Kategorien */
:root { --tab-h: 58px; }
html, body { overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
button, .chip, .tile, .tabbar { -webkit-user-select: none; user-select: none; }
.tabbar { display: none; }
@media (max-width: 700px), (pointer: coarse) and (max-height: 500px) {
  :root { --tab-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
  .brand { display: none; }
  .topbar { padding-top: 10px; max-width: none; }
  .search input { padding: 13px 16px; border-radius: 16px; }
  .chip { min-height: 40px; padding: 6px 12px; }
  .fab { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; z-index: 1700; left: 0; right: 0; bottom: 0; height: var(--tab-bottom); padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left)); background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; min-height: var(--tab-h); border: 0; background: none; color: #6b6b66; font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; padding: 4px 2px; }
  .tabbar button[aria-current="page"] { color: var(--ink); font-weight: 800; }
  .tabbar button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--teal-deep); }
  .tabbar .tab-add[aria-current="page"]::before { display: none; }
  .tabbar .tab-add { padding-top: 0; gap: 3px; }
  .tabbar .tab-add i { display: grid; place-items: center; width: 42px; height: 42px; margin-top: -6px; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
  .tabbar .tab-add[aria-current="page"] i { background: var(--teal-deep); }
  .tabbar .tab-add span { color: #6b6b66; font-weight: 700; }
  .tabbar .tab-add[aria-current="page"] span { color: var(--teal-deep); }
  .tab-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
  .sheet { bottom: var(--tab-bottom); max-height: min(62dvh, 560px); padding-bottom: 20px; border-radius: 20px 20px 0 0; transition: max-height 0.25s ease, transform 0.25s ease; }
  form.sheet, form.sheet.auth { max-height: calc(100dvh - var(--tab-bottom) - env(safe-area-inset-top, 0px) - 24px); } /* Formulare (Anmelden, Tipp eintragen) bekommen mehr Platz */
  .sheet.tall { max-height: calc(100dvh - var(--tab-bottom) - env(safe-area-inset-top, 0px) - 132px); } /* Suche und Kategorien oben bleiben frei */
  .sheet > .grabber { display: block; position: absolute; top: 0; left: 50%; width: 96px; height: 44px; margin-left: -48px; padding: 0; border: 0; background: none; z-index: 3; }
  .sheet > .grabber::before { content: ""; display: block; width: 38px; height: 4px; margin: 6px auto 0; border-radius: 2px; background: #8a857a; }
  .sheet-head { position: sticky; top: -16px; z-index: 2; background: inherit; margin-top: -16px; padding: 24px 0 8px; } /* Titel und X bleiben beim Scrollen oben stehen */
  /* Top-10 auf dem Handy: schmale Zeilen, damit man mehrere Plätze sieht und direkt abstimmen kann */
  .item { padding-block: 4px; }
  .item.has-photo { grid-template-columns: 88px 1fr; }
  .item-pic { min-height: 84px; border-radius: 10px 0 0 10px; }
  .pic-rank { top: 4px; left: 4px; min-width: 22px; height: 22px; font-size: 13px; }
  .name { font-size: 15px; line-height: 1.25; }
  .note { margin: 0 0 3px; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .stars-note { margin-top: 2px; }
  .item-row:has(.rate-btn:not(.done)) { display: none; }
  .item-row { margin-top: 4px; }
  .vote .vbtn { width: 44px; height: 44px; min-height: 44px; }
  .vote { min-width: 44px; }
  .item:not(.has-photo) .head { grid-template-columns: 26px 1fr auto; gap: 8px; }
  .item:not(.has-photo) .item-row { margin-left: 34px; }
  .rank { font-size: 22px; }
  .intro { padding-bottom: calc(16px + var(--tab-bottom)); }
  .intro-card { gap: 10px; }
  .intro-card h2 { font-size: 28px; }
  .intro-card > p { display: none; }
  .tiles { gap: 8px; }
  .tile { min-height: 76px; padding: 10px 12px; gap: 2px; border-radius: 14px; }
  .tile .ico { font-size: 24px; }
  .tile small { display: none; }
  .intro-card .link-btn { justify-self: center; }
  .pill { bottom: calc(var(--tab-bottom) + 12px); }
  .locate-btn { bottom: calc(var(--tab-bottom) + 136px); }
  .banner { bottom: calc(var(--tab-bottom) + 12px); }
  .toast { bottom: calc(var(--tab-bottom) + 24px); }
  .leaflet-bottom.leaflet-right, .leaflet-bottom.leaflet-left { margin-bottom: var(--tab-bottom); }
  .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; }
}

.offline { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--bg); }
.offline h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: 28px; }
.offline p { margin: 0 0 16px; color: var(--muted); max-width: 320px; }
body.kb .tabbar { display: none; }
body.kb .sheet { bottom: 0; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px); } /* Tastatur offen: das Fenster darf mehr Platz nehmen */

.vote.own .vbtn { opacity: 0.35; }

/* Anmelden mit Apple und Google */
#auth-social { display: grid; gap: 8px; }
.btn.social { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 12px; font-size: 16px; }
.btn.social.apple { background: #000; color: #fff; }
.btn.social.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.social-or { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.social-or::before, .social-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#auth-google-web { display: flex; justify-content: center; min-height: 44px; }

.grabber { display: none; }
.vote.own .vbtn { cursor: not-allowed; }

/* Doppeltippen auf Knöpfe, Listen und Leisten zoomt nicht mehr die ganze Ansicht (Zusammenziehen mit zwei Fingern bleibt erlaubt, die Karte selbst zoomt weiter wie gewohnt) */
body, .topbar, .topbar *, .sheet, .sheet *, .tabbar, .tabbar *, .intro, .intro *, .locate-btn, .pill, .toast, .leaflet-control-zoom, .leaflet-control-zoom * { touch-action: manipulation; }

/* Die Überschrift eines Fensters bekommt den Fokus nur für Bildschirmleser, ein Rahmen darum sieht wie ein Fehler aus */
h2[tabindex="-1"]:focus, h2[tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }
