*{box-sizing:border-box}body{margin:0;background:#10151c;color:#f1f4f8;font:16px system-ui,sans-serif}main{max-width:1100px;margin:auto;padding:max(20px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom))}header,.progress,nav,.filters,form div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}header,.progress{justify-content:space-between}h1{font-size:clamp(2rem,7vw,3.5rem);letter-spacing:-.05em;margin:0 0 12px}.eyebrow{color:#ffc091;font-size:.75rem;letter-spacing:.14em;font-weight:700;margin:0 0 6px}button,input,select,textarea{font:inherit;color:inherit;background:#232c38;border:1px solid #435367;border-radius:10px;padding:9px;min-height:44px}button{cursor:pointer;font-weight:600}button[aria-pressed=true],#add,form button:last-child{background:#ffc091;color:#26190e;border-color:#ffc091}input[type=checkbox]{accent-color:#ffc091;min-height:0;width:19px;height:19px;vertical-align:middle;margin:0 5px 0 0}.progress{background:#1a222d;padding:12px;border-radius:12px;margin-bottom:14px}progress{flex:1;min-width:90px;max-width:65%;accent-color:#ffc091}.filters{margin:12px 0}.filters input[type=search]{flex:1;min-width:145px}.filters select{max-width:100%}#map{height:clamp(340px,55dvh,650px);background:#142938;border-radius:14px;z-index:0}#entries{padding:0;list-style:none}li,.item{background:#1a222d;border-radius:10px;padding:10px 12px;margin:7px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}small{display:block;color:#b7c5d6;margin-top:4px}a{color:#ffc091}footer,#results,#mapMessage{color:#b7c5d6;font-size:.875rem}footer{margin-top:18px}footer p{margin-bottom:0}dialog{background:#1a222d;color:inherit;border:1px solid #435367;border-radius:14px;width:min(92vw,450px)}dialog::backdrop{background:#000a}form label{display:block;margin:12px 0}form label :is(input:not([type=checkbox]),select,textarea){display:block;width:100%;margin-top:4px}.leaflet-container a{color:#164268}[hidden]{display:none!important}
.map-tools{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:flex;flex-direction:column;gap:6px;align-items:stretch}
.map-tools button{min-width:46px;padding:7px 10px;background:#151e2cf5;border-color:#677991;color:#fff;font-size:.86rem;box-shadow:0 2px 5px #0006}
.map-tools button:disabled{opacity:.55;cursor:default}
.map-zoom{display:flex;gap:5px;justify-content:flex-end}
.map-zoom button{font-size:1.3rem}
.map-pin{display:grid;place-items:center}
.map-pin:focus-visible{outline:2px solid #fff;border-radius:50%}
.pin-dot,.pin-count{display:grid;place-items:center;border-radius:50%;font:bold 13px system-ui;box-shadow:0 2px 6px #000b}
.pin-dot{width:22px;height:22px;color:#10151c;border:2px solid #111b2a}
.pin-count{min-width:32px;height:32px;padding:0 5px;background:#182333;color:#fff;border:2px solid #ffc091}
#pointDialog{width:min(100% - 20px,540px);max-height:80dvh;overflow:auto;overscroll-behavior:contain;padding:18px;box-shadow:0 10px 40px #0008}
#pointDialog p{margin:.5rem 0 .8rem}
#pointDialog h2{margin:0;font-size:1.5rem;line-height:1.15}
#pointDialog h3{font-size:1rem;margin:1rem 0 0}
.point-header{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;margin-bottom:14px}
.point-meta{color:#b7c5d6;font-size:.88rem}
.point-close{font-size:1.45rem;padding:0}
.point-image{width:100%;max-height:260px;object-fit:contain;border-radius:10px;background:#10151c;margin-top:8px}
.point-description{white-space:pre-wrap}
.point-group{padding:0;list-style:none}
.point-group li{padding:0}
.point-group button{width:100%;text-align:left}
.point-done{width:100%;margin-top:12px;border-color:#ffc091}
.safe-details{padding:12px;margin-top:14px;background:#111923;border-radius:12px}
#pointDialog .safe-details h3:first-child{margin-top:0}
.safe-code{display:inline-block;margin:6px 0;color:#ffc091;font-size:1.75rem;letter-spacing:.14em}
.code-form{display:flex;gap:8px;flex-wrap:wrap;align-items:end;margin-top:8px}
.code-form label{flex:1;min-width:140px;margin:0}
.code-form button{flex-shrink:0}

/* Kartenfilter und Fundfenster */
#filterDialog{width:min(100% - 24px,530px);max-height:calc(100dvh - 32px);overflow:auto;padding:18px}
#filterDialog h2{margin:0;font-size:1.3rem}
#filterDialog fieldset{border:0;margin:12px 0;padding:0}
#filterDialog legend,.filter-field{font-size:.9rem;color:#dce6f2}
.filter-field{display:block;margin-bottom:9px}
.filter-field :is(select,input[type=search]){display:block;width:100%;margin-top:5px}
.filter-selects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#categoryChoices{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.category-choice{display:flex;align-items:center;justify-content:center;min-height:44px;padding:5px 9px;border:1px solid #48596e;border-radius:10px;background:#232c38;font-size:.87rem;cursor:pointer}
.category-choice:has(input:checked){border-color:var(--category-color);background:#344055}
.category-choice input{accent-color:var(--category-color);width:16px;height:16px}
.filter-actions{display:flex;justify-content:space-between;gap:8px;margin-top:14px}
#applyFilters{background:#ffc091;color:#26190e}
#pointDialog .point-header{position:sticky;top:0;background:#1a222d;padding:12px 0 8px;z-index:1;margin-bottom:2px}
#pointDialog .point-header .point-meta{margin:0 0 4px}
#pointDialog .point-image{display:block;width:100%;height:auto;max-height:min(240px,34dvh);margin:6px 0 12px}
.point-group small{margin:3px 0 0}
.pin-count[data-group]{border-color:var(--pin-color)}
@media(max-width:380px){.filter-selects{grid-template-columns:1fr;gap:0}}

body.map-active{overflow:hidden}
#mapFrame{position:fixed;inset:0;overflow:hidden;background:#142938}
#map{height:100%;border-radius:0;touch-action:none}
#mapFrame .leaflet-bottom{bottom:env(safe-area-inset-bottom)}
#mapFrame .leaflet-right{right:env(safe-area-inset-right)}
#openMenu{
  position:fixed;z-index:2;top:calc(env(safe-area-inset-top) + 12px);
  left:calc(env(safe-area-inset-left) + 12px);display:grid;place-items:center;
  width:48px;height:48px;background:#151e2c;color:#fff;box-shadow:0 2px 5px #0006
}
.menu-icon{width:20px;height:2px;border-radius:2px;background:currentColor;box-shadow:0 -6px currentColor,0 6px currentColor}
.map-tools{top:calc(env(safe-area-inset-top) + 12px);right:calc(env(safe-area-inset-right) + 12px)}
#mapMessage{
  position:absolute;left:calc(env(safe-area-inset-left) + 12px);bottom:calc(env(safe-area-inset-bottom) + 20px);
  max-width:calc(100% - 24px);margin:0;padding:5px 9px;border-radius:8px;background:#151e2cf0;color:#fff;
  pointer-events:none
}
#mapMessage:empty,body:has(#pointDialog[open]) #mapFrame #mapMessage{display:none}
#pointDialog{
  position:absolute;inset:auto 0 0;margin:0 auto;width:min(100%,620px);
  max-width:none;max-height:66dvh;border-radius:18px 18px 0 0;
  padding:0 16px max(16px,env(safe-area-inset-bottom));z-index:1
}
#filterDialog{
  position:fixed;inset:0 auto 0 0;margin:0;width:min(92vw,380px);height:100dvh;
  max-height:none;max-width:none;overflow:auto;overscroll-behavior:contain;border-radius:0 16px 16px 0;
  padding:calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 16px) max(16px,env(safe-area-inset-left))
}
#filterDialog .point-header{align-items:center}
.menu-tabs{margin-bottom:12px}
.menu-tabs button{flex:1}
.menu-filters{margin-top:16px;border-top:1px solid #344357}
.menu-filters h3{margin:12px 0 4px;font-size:1rem}
#filterSummary{margin:0 0 10px;font-size:.83rem;color:#b7c5d6}
#listView{padding-top:52px}

.category-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pin-dot{position:relative;width:30px;height:30px}
.pin-dot .category-icon{width:18px;height:18px}
.pin-done{position:absolute;right:-5px;bottom:-4px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;border:1px solid #10151c;background:#e6eef8;color:#10151c;font-size:10px}
.pin-count[data-group]{display:flex;align-items:center;justify-content:center;gap:3px;padding:0 6px}
.pin-count .category-icon{width:14px;height:14px;color:var(--pin-color)}
.category-choice .category-icon{margin-right:4px;color:var(--category-color)}

#pointDialog{position:fixed;z-index:3}
#progressDialog{width:min(94vw,520px);max-height:82dvh;overflow:auto}
.progress-groups{display:grid;gap:6px}
.progress-groups button{text-align:left}
.progress-groups button:disabled{opacity:.58}
.menu-filters input[type=file]{max-width:100%;width:100%;font-size:.85rem}
#backupExport{margin-bottom:10px}
.personal-details{border-top:1px solid #344357;margin-top:12px;padding-top:12px}
.spoiler-details{margin-top:10px;padding:10px;border:1px solid #435367;border-radius:10px}
.spoiler-details summary{cursor:pointer;padding:5px}
.route-number{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#ffd093;color:#21180d;border:2px solid #21180d;font:bold 14px system-ui;box-shadow:0 2px 8px #0009}
.map-tools #nearStart[aria-pressed=true]{background:#ffd093;color:#21180d}

#friendsDialog{width:min(94vw,600px);max-height:88dvh;overflow:auto;overscroll-behavior:contain}
#friendsDialog .friends-actions{display:flex;gap:8px;flex-wrap:wrap}
.friends-items{list-style:none;padding:0}
#friendsLeave,#friendsCancelInvite{margin-top:12px}

.friends-discord{padding:10px 0;border-bottom:1px solid #3a485b}.discord-profile{display:inline-flex;align-items:center;gap:8px}.discord-profile img{border-radius:50%;object-fit:cover}#friendsDiscordLogin{background:#5865f2;color:#fff}

#guideDialog{width:min(96vw,680px);max-height:92dvh;padding:14px 16px;overflow:auto;overscroll-behavior:contain}
#guideDialog .point-header{position:sticky;top:-14px;background:#1a222d;padding:10px 0;z-index:1;align-items:center}
#guideTitle{margin:0}
#guideTabs{margin:6px 0 14px;gap:5px}
#guideTabs button{flex:1 1 auto}
.guide-card,.guide-callout{border:1px solid #435367;border-radius:12px;background:#151e2c;padding:12px;margin:8px 0}
.guide-card :is(h3,p){margin:0 0 8px}
.guide-card h3{font-size:1.08rem}
.cheat-sequence{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0 12px}
.cheat-sequence kbd{display:grid;place-items:center;min-width:25px;height:31px;border-radius:6px;background:#ffd093;color:#18202a;font:bold 17px system-ui}
.guide-check{display:block;margin-top:8px}
.guide-links{display:flex;flex-wrap:wrap;gap:12px}
.completion-card input{display:block;width:min(100%,170px);margin-top:3px}
.completion-card progress{display:block;width:100%;max-width:none;margin-bottom:8px}
#guideStatus:empty{display:none}

.point-photo{margin:8px 0 12px}
.point-photo figcaption{font-size:.82rem;color:#b7c5d6}
#pointDialog .point-photo .point-image{margin:0 0 4px}
.model-details{padding:12px;border-radius:12px;background:#111923}
#pointDialog .model-details h3:first-child{margin-top:0}
.model-specs{display:grid;grid-template-columns:minmax(90px,1fr) 2fr;gap:5px 10px;margin:8px 0;font-size:.9rem}
.model-specs dt{color:#b7c5d6}
.model-specs dd{margin:0;overflow-wrap:anywhere}
.model-stats{list-style:none;padding:0;margin:6px 0}
.model-stats li{display:grid;grid-template-columns:minmax(96px,1fr) 2fr auto;padding:5px 0;background:none;font-size:.84rem}
.model-stats progress{width:100%;min-width:0;max-width:none}
.model-find{display:block;margin-top:10px}

#accountGate{min-height:100dvh;display:grid;place-items:center;padding:20px}
#accountGate>div{max-width:480px;width:100%;padding:clamp(22px,6vw,40px);background:#1a222d;border:1px solid #435367;border-radius:16px}
#accountGate p{color:#c3cfde;line-height:1.5}
#accountLogin{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border-radius:10px;background:#4650c5;color:#fff;text-decoration:none;font-weight:700}
#accountControls{margin:10px 0;padding:12px;background:#232c38;border-radius:10px}
#accountControls button{margin-top:8px}

.shared-pin{display:grid;place-items:center;width:34px;height:34px;border:2px solid #f3dcff;border-radius:50%;background:#702e96;color:white;font-weight:800;box-shadow:0 2px 5px #0009}
#sharedPlacesToggle[aria-pressed=true]{border-color:#e1b2ff;background:#4d2868}
#markPlace[aria-pressed=true]{border-color:#ffc091}
#friendsPlaces .friends-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
#friendsPlaces li>span{min-width:0;overflow-wrap:anywhere}

:root {
  --tracker-canvas: #0b0e14;
  --tracker-panel: #121724ed;
  --tracker-border: #ffffff26;
  --tracker-pink: #ff79aa;
  --tracker-teal: #3be4d4;
}
body { background:var(--tracker-canvas); }
.glass-panel {
  background:var(--tracker-panel);
  border:1px solid var(--tracker-border);
  border-radius:16px;
  box-shadow:0 12px 32px #0007;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
.tracker-bar {
  position:fixed;
  z-index:4;
  top:calc(env(safe-area-inset-top) + 12px);
  left:max(12px,env(safe-area-inset-left));
  right:max(12px,env(safe-area-inset-right));
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:10px;
  padding:7px 10px;
}
.tracker-bar #openMenu {
  position:static;
  flex:none;
  width:44px;
  height:44px;
  background:#181d2c;
  border-color:var(--tracker-border);
  box-shadow:none;
}
.tracker-brand { font-weight:750; line-height:1.15; }
.tracker-progress {
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  font-size:.85rem;
}
#barProgress {
  appearance:none;
  width:clamp(64px,14vw,156px);
  height:7px;
  min-width:0;
  max-width:none;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:#ffffff20;
}
#barProgress::-webkit-progress-bar { background:#ffffff20; }
#barProgress::-webkit-progress-value { background:linear-gradient(90deg,var(--tracker-teal),var(--tracker-pink)); }
#barProgress::-moz-progress-bar { background:linear-gradient(90deg,var(--tracker-teal),var(--tracker-pink)); }
#toggleMapPanel[aria-expanded=true] { color:var(--tracker-teal); border-color:var(--tracker-teal); }
#mapFrame { background:#111827; }
.map-tools { top:calc(env(safe-area-inset-top) + 82px); }
#listView { padding-top:74px; }
#mapPanel {
  position:fixed;
  z-index:3;
  inset:auto max(12px,env(safe-area-inset-right)) max(38px,calc(env(safe-area-inset-bottom) + 22px)) max(12px,env(safe-area-inset-left));
  max-height:min(48dvh,calc(100dvh - 122px));
  overflow:auto;
  overscroll-behavior:contain;
  padding:14px;
}
#mapPanel section+section { margin-top:14px; border-top:1px solid var(--tracker-border); padding-top:12px; }
.map-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.map-panel-heading h2 { margin:0; font-size:1rem; }
.map-panel-heading button, #mapChecklist button { font-size:.82rem; }
#mapFriendsStatus { margin:4px 0; font-size:.82rem; color:#b7c5d6; }
#mapFriends, #mapChecklist { margin:0; padding:0; list-style:none; }
#mapPanel li { margin:6px 0; background:#ffffff0d; border:1px solid var(--tracker-border); }
#mapPanel li label, #mapFriends .discord-profile { min-width:0; overflow-wrap:anywhere; }
#mapPanel li small { color:#c5bfd4; }
#mapFriends li small { margin:0; white-space:nowrap; color:var(--tracker-teal); }
#mapChecklist li:has(input:checked) .item-name { color:#b7c5d6; }
#mapChecklist li:has(input:checked) { border-color:#3be4d460; }
#mapChecklist input { accent-color:var(--tracker-teal); }
#mapChecklist button { border-color:#ff79aa66; }
@media(min-width:960px) and (min-height:540px) {
  #mapView:has(#mapPanel:not([hidden])) #mapFrame { right:368px; }
  #mapPanel { inset:calc(env(safe-area-inset-top) + 82px) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) auto; width:344px; max-height:none; }
}
@media(max-width:520px) {
  .tracker-bar { gap:7px; padding:6px 7px; }
  .tracker-brand { font-size:.9rem; }
  .tracker-progress { flex-direction:column-reverse; gap:3px; font-size:.73rem; }
  #barProgress { width:clamp(38px,12vw,66px); height:4px; }
  #toggleMapPanel { font-size:.8rem; }
}
@media(max-height:535px) {
  .map-tools { max-height:calc(100dvh - 110px); overflow:auto; }
}

.route-next {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

#tourNext:empty { display: none; }
#tourNext:not(:empty) {
  position: absolute;
  z-index: 510;
  left: 1rem;
  bottom: 3rem;
  margin: 0;
  padding: .5rem .75rem;
  border-radius: .5rem;
  background: #10151c;
  color: #fff;
}

.marker-video {
  display: block;
  padding: .75rem;
}
.marker-video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  overflow-wrap: anywhere;
}
.marker-video-preview {
  margin-top: .5rem;
}
.marker-video-preview summary {
  cursor: pointer;
}
.marker-video-frame {
  display: block;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 0;
  margin-top: .5rem;
}
.marker-video-frame:is(.instagram, .tiktok) {
  height: min(65dvh, 620px);
  max-width: 380px;
}

/* ==========================================================================
   Vice-City-Theme: Sonnenuntergang, Neon und Nachtviolett.
   Eigene Gestaltung im Stil der Region, ohne Logos oder Schriften von Rockstar.
   ========================================================================== */
:root {
  --vc-night: #120b1f;
  --vc-deep: #1e1034;
  --vc-panel: #1b1030e6;
  --vc-pink: #ff4f8b;
  --vc-orange: #ff9a3c;
  --vc-gold: #ffd27a;
  --vc-violet: #7b3fe4;
  --vc-teal: #2de2e6;
  --vc-text: #fbf3ff;
  --vc-muted: #c9b8e0;
  --vc-line: #ffffff1f;
  --vc-sunset: linear-gradient(120deg, var(--vc-pink), var(--vc-orange));
  --vc-display: "Avenir Next Condensed", "AvenirNextCondensed-Heavy", "Futura", Impact, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  --tracker-canvas: var(--vc-night);
  --tracker-panel: var(--vc-panel);
  --tracker-border: #ff4f8b38;
  --tracker-pink: var(--vc-pink);
  --tracker-teal: var(--vc-teal);
  color-scheme: dark;
  scrollbar-color: #ff4f8b66 transparent;
}
body { background: var(--vc-night); color: var(--vc-text); }
a, .leaflet-container a { color: var(--vc-teal); }
small, .point-meta, footer, #results, #filterSummary, #mapFriendsStatus, .point-photo figcaption, .model-specs dt { color: var(--vc-muted); }
::selection { background: #ff4f8b66; }
:focus-visible { outline: 2px solid var(--vc-teal); outline-offset: 2px; }

/* Überschriften im Display-Stil */
#listTitle, #accountTitle, :is(#pointDialog, #filterDialog, #guideDialog, #friendsDialog, #progressDialog, #favoritesDialog, #tourDialog, #editor, #backupPreview, #sharePlaceDialog) h2 {
  font-family: var(--vc-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}
#listTitle {
  background: var(--vc-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px #ff4f8b55);
}
:is(#pointDialog h3, .menu-filters h3, #progressGroups h3, #friendsPlacesTitle, .map-panel-heading h2) {
  font-family: var(--vc-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  color: var(--vc-teal);
}

/* Bedienelemente */
button, input, select, textarea {
  background: #ffffff0b;
  border: 1px solid var(--vc-line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .1s;
}
button:hover:not(:disabled) { border-color: #2de2e699; background: #ffffff14; }
button:active:not(:disabled) { transform: scale(.97); }
:is(input, select, textarea):focus { border-color: var(--vc-teal); box-shadow: 0 0 0 3px #2de2e633; outline: none; }
select option { background: var(--vc-deep); }
input[type=checkbox] { accent-color: var(--vc-pink); }
button[aria-pressed=true], #add, form button:last-child, #applyFilters, .point-done, #backupApply, #accountGate button[type=submit] {
  background: var(--vc-sunset);
  color: #1d0a17;
  border-color: transparent;
  box-shadow: 0 0 18px #ff4f8b4d;
  font-weight: 750;
}
button[aria-pressed=true]:hover:not(:disabled), #add:hover, form button:last-child:hover, #applyFilters:hover, .point-done:hover {
  background: var(--vc-sunset);
  box-shadow: 0 0 24px #ff4f8b80;
}
.point-done[aria-pressed=true], .point-done[aria-pressed=true]:hover:not(:disabled) {
  background: linear-gradient(120deg, #1fb8bb, var(--vc-teal));
  box-shadow: 0 0 18px #2de2e655;
}
.menu-tabs { padding: 4px; gap: 4px; background: #00000033; border: 1px solid var(--vc-line); border-radius: 14px; }
.menu-tabs button { border: 0; background: transparent; min-height: 40px; }
.menu-tabs button[aria-pressed=true] { background: var(--vc-sunset); color: #1d0a17; }
#friendsDiscordLogin, #accountLogin { background: #5865f2; color: #fff; box-shadow: 0 0 18px #5865f266; }

/* Fortschrittsbalken mit Neon-Verlauf */
progress {
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff1a;
}
progress::-webkit-progress-bar { background: #ffffff1a; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--vc-sunset); border-radius: 999px; box-shadow: 0 0 10px var(--vc-pink); }
progress::-moz-progress-bar { background: var(--vc-sunset); border-radius: 999px; }
.progress { background: #00000033; border: 1px solid var(--vc-line); }
#count { font-family: var(--vc-display); font-size: 1.35rem; letter-spacing: .02em; }

/* Panels und Dialoge */
.glass-panel {
  border-color: #ff4f8b38;
  box-shadow: 0 14px 40px #0009, inset 0 1px 0 #ffffff14;
}
dialog {
  background: linear-gradient(90deg, var(--vc-pink), var(--vc-orange)) top / 100% 3px no-repeat, var(--vc-deep);
  border: 1px solid #ff4f8b33;
  box-shadow: 0 20px 60px #000c, 0 0 40px #7b3fe433;
}
dialog::backdrop { background: #0a0514b3; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#pointDialog .point-header, #guideDialog .point-header { background: var(--vc-deep); }
#filterDialog { border-right: 1px solid #ff4f8b40; }
.safe-details, .model-details, #accountControls { background: #00000038; border: 1px solid var(--vc-line); }
.guide-card, .guide-callout { background: #ffffff08; border-color: var(--vc-line); }
.guide-callout { border-left: 3px solid var(--vc-orange); }
.guide-card h3 { font-family: var(--vc-display); font-weight: 800; letter-spacing: .02em; }
.spoiler-details, .personal-details { border-color: var(--vc-line); }
.menu-filters { border-top-color: var(--vc-line); }

/* Kopfleiste */
.tracker-bar { border-color: #ff4f8b40; }
.tracker-bar::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: -1px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--vc-pink), var(--vc-orange), transparent);
  opacity: .8;
}
.tracker-brand {
  font-family: var(--vc-display);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--vc-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tracker-bar #openMenu { background: #ffffff0d; }
#barProgress::-webkit-progress-value { background: var(--vc-sunset); }
#barProgress::-moz-progress-bar { background: var(--vc-sunset); }
#barCount { font-weight: 700; }

/* Karte: Meer im Abendlicht rund um die Insel */
#mapFrame, #map, .leaflet-container {
  background:
    radial-gradient(ellipse 80% 45% at 50% 110%, #ff4f8b40, transparent 70%),
    radial-gradient(ellipse 60% 40% at 15% 0%, #7b3fe430, transparent 70%),
    linear-gradient(180deg, #0c0719, #1a0d33);
}
.map-tools button {
  background: #1b1030d9;
  border-color: #ffffff26;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px #0008;
}
.map-tools button[aria-pressed=true] { background: var(--vc-sunset); color: #1d0a17; }
#mapMessage, #tourNext:not(:empty) { background: #1b1030e6; border: 1px solid #ff4f8b33; }
.leaflet-control-attribution { background: #120b1fcc !important; color: var(--vc-muted) !important; }

/* Kartenpunkte mit Neon-Glow */
.pin-dot {
  background: var(--pin-color, var(--vc-pink));
  color: var(--vc-night);
  border: 2px solid var(--vc-night);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pin-color, #ff4f8b) 45%, transparent), 0 0 14px var(--pin-color, #ff4f8b);
}
.pin-dot.is-done { background: #5d5470; color: #e6def2; box-shadow: 0 0 0 2px #ffffff22; }
.pin-done { background: var(--vc-teal); border-color: var(--vc-night); color: var(--vc-night); font-weight: 800; }
.pin-count {
  background: #1b1030ee;
  color: #fff;
  border: 2px solid var(--vc-pink);
  box-shadow: 0 0 14px #ff4f8b99;
  font-family: var(--vc-display);
  font-size: 14px;
}
.pin-count[data-group] { border-color: var(--pin-color); box-shadow: 0 0 14px color-mix(in srgb, var(--pin-color) 70%, transparent); }
.route-number { background: var(--vc-sunset); color: #1d0a17; border-color: var(--vc-night); box-shadow: 0 0 14px var(--vc-pink); }
.shared-pin { background: var(--vc-violet); border-color: #e6d4ff; box-shadow: 0 0 16px #7b3fe4; }
.map-tools #nearStart[aria-pressed=true] { background: var(--vc-sunset); color: #1d0a17; }

/* Filter-Chips */
.category-choice { border-radius: 999px; background: #ffffff08; border-color: var(--vc-line); }
.category-choice:has(input:checked) {
  background: color-mix(in srgb, var(--category-color) 22%, transparent);
  border-color: var(--category-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--category-color) 45%, transparent);
}

/* Checkliste */
li, .item { background: #ffffff08; border: 1px solid #ffffff12; border-radius: 12px; }
#entries li:has(input:checked) .item-name, #mapChecklist li:has(input:checked) .item-name { color: var(--vc-muted); text-decoration: line-through; text-decoration-color: #2de2e699; }
#entries li:has(input:checked) { border-color: #2de2e640; }
#mapChecklist input { accent-color: var(--vc-pink); }
#mapChecklist button { border-color: #ff4f8b55; }
#mapPanel li { background: #ffffff08; border-color: #ffffff14; }

/* Tresorcode wie eine Digitalanzeige */
.safe-code {
  padding: 4px 14px;
  border-radius: 10px;
  background: #07040e;
  border: 1px solid #2de2e655;
  color: var(--vc-teal);
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-weight: 700;
  text-shadow: 0 0 10px var(--vc-teal);
}
.cheat-sequence kbd { background: var(--vc-sunset); color: #1d0a17; box-shadow: 0 0 10px #ff4f8b55; }
.model-stats progress::-webkit-progress-value { background: linear-gradient(90deg, var(--vc-teal), var(--vc-violet)); box-shadow: none; }
.model-stats progress::-moz-progress-bar { background: linear-gradient(90deg, var(--vc-teal), var(--vc-violet)); }

/* Anmeldeseite: Sonnenuntergang mit Palmen */
#accountGate {
  position: relative;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3Cg fill='%23120b1f'%3E%3Cpath d='M100 300C104 220 98 160 112 95l6 1c-12 64-6 124-8 204z'/%3E%3Cpath d='M115 95C80 70 45 75 20 100c30-15 65-12 95-5zM115 95c35-30 70-25 85 0-30-10-60-7-85 0zM115 95C100 55 70 35 40 30c35 20 55 40 75 65zM115 95c15-45 45-65 75-60-35 15-55 35-75 60zM115 95c-25 5-55 35-65 65 25-30 45-48 65-65zM115 95c30 10 55 40 60 70-20-30-40-53-60-70z'/%3E%3C/g%3E%3C/svg%3E") no-repeat left -30px bottom -10px / auto 46vh,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3Cg fill='%23120b1f'%3E%3Cpath d='M100 300C104 220 98 160 112 95l6 1c-12 64-6 124-8 204z'/%3E%3Cpath d='M115 95C80 70 45 75 20 100c30-15 65-12 95-5zM115 95c35-30 70-25 85 0-30-10-60-7-85 0zM115 95C100 55 70 35 40 30c35 20 55 40 75 65zM115 95c15-45 45-65 75-60-35 15-55 35-75 60zM115 95c-25 5-55 35-65 65 25-30 45-48 65-65zM115 95c30 10 55 40 60 70-20-30-40-53-60-70z'/%3E%3C/g%3E%3C/svg%3E") no-repeat right -40px bottom -10px / auto 34vh,
    radial-gradient(circle at 50% 78%, #ffe29a 0 9%, #ffb15a 14%, transparent 28%),
    linear-gradient(180deg, #1a0b35 0%, #4b1d7a 32%, #c23a8e 58%, #ff6f6f 76%, #ffb15a 90%, #ffd27a 100%);
}
#accountGate > div {
  position: relative;
  background: #1b1030d9;
  border: 1px solid #ff4f8b55;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px #000a, 0 0 50px #ff4f8b33;
}
#accountTitle {
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  line-height: .95;
  background: var(--vc-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px #ff4f8b66);
}
#accountGate p { color: var(--vc-muted); }
#accountTitle:has(.account-logo) { background: none; filter: none; margin: 0 0 6px; text-align: center; }
.account-logo {
  display: block;
  width: min(260px, 70vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 22px #ff4f8b55);
}
/* The body stays locked for the map, so the sign-in screen scrolls on its own. */
#accountGate { position: fixed; inset: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; place-items: start center; }
#accountGate[hidden] { display: none; }
#accountGate > div { margin-block: auto; }
#accountLogin { display: flex; width: fit-content; margin-inline: auto; }
.mail-access { margin-top: 14px; padding: 12px; border: 1px solid var(--vc-line); border-radius: 10px; text-align: left; }
.mail-access summary { cursor: pointer; }
.mail-access form { display: grid; gap: 8px; margin-top: 12px; }
.mail-access label { display: grid; gap: 4px; }
.mail-access [hidden], .mail-access[hidden] { display: none; }
.mail-access p:empty { display: none; }
#accountGate p.gate-badge { margin: 0 0 6px; text-align: center; }
.gate-badge span { display: inline-block; padding: 3px 10px; border: 1px solid var(--vc-orange); border-radius: 999px; color: var(--vc-orange); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#accountGate p.gate-tagline { margin: 4px 0 10px; text-align: center; color: var(--vc-text); font-weight: 650; }
.gate-features { margin: 0 0 14px; padding-left: 1.2em; color: var(--vc-muted); line-height: 1.45; font-size: .92rem; }
.gate-features li, .gate-install li { display: list-item; background: none; border: 0; border-radius: 0; padding: 0; }
.gate-features li { margin: 4px 0; }
.gate-features li::marker { color: var(--vc-pink); }
.gate-features strong { color: var(--vc-text); }
#accountGate p.gate-note { font-size: .82rem; margin: 12px 0 0; }
.gate-install { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--vc-line); border-radius: 12px; background: #ffffff08; font-size: .9rem; color: var(--vc-muted); }
.gate-install summary { cursor: pointer; font-weight: 700; color: var(--vc-teal); }
.gate-install h2 { margin: 12px 0 4px; font-size: .95rem; color: var(--vc-text); }
.gate-install ol { margin: 0; padding-left: 1.3em; line-height: 1.45; }
.gate-install li { margin: 3px 0; }
.gate-install strong { color: var(--vc-text); }
#updateBanner {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px;
  border: 1px solid #ff4f8b66;
  border-radius: 14px;
  background: #1b1030f2;
  color: var(--vc-text);
  box-shadow: 0 10px 30px #000a, 0 0 24px #ff4f8b40;
  font-weight: 650;
}
#updateBanner button { min-height: 40px; padding: 6px 14px; border-radius: 10px; }
#updateBanner .update-later { padding: 6px 10px; background: transparent; border: 0; color: var(--vc-muted); font-size: 1.2rem; }
.tracker-logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  button, input, select, textarea { transition: none; }
  button:active:not(:disabled) { transform: none; }
}

.map-perspective-plane {
  position: absolute;
  inset: 0;
  transform: perspective(1800px) rotateX(var(--pitch, 0deg)) scale(var(--plane-scale, 1));
  transition: transform 320ms ease;
}
.map-perspective-plane:not(.map-perspective-active) {
  transform: none;
}
.map-buildings-pane { z-index: 250; pointer-events: none; }
.map-buildings { position: absolute; top: 0; left: 0; }
.map-tools #mapPerspective[aria-pressed=true] {
  background: #ffd093;
  color: #21180d;
}
@media (prefers-reduced-motion: reduce) {
  .map-perspective-plane { transition: none; }
}

/* ==========================================================================
   Handy-Bedienung: untere Tab-Leiste, kompakte Kartentasten, Fundfenster
   ========================================================================== */
#bottomNav, .map-compact { display: none; }
#pointDialog .point-done {
  min-height: 52px;
  margin: 2px 0 14px;
  font-size: 1.05rem;
}

@media (max-width: 719px) {
  :root { --nav-space: calc(env(safe-area-inset-bottom) + 98px); }
  #mapFrame .leaflet-bottom { bottom: calc(env(safe-area-inset-bottom) + 78px); }
  .tracker-bar #openMenu { display: none; }
  .tracker-bar { padding-left: 14px; }
  #barCount { font-size: .95rem; font-weight: 800; color: var(--vc-gold, #ffd27a); }

  #bottomNav {
    position: fixed;
    z-index: 2;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 5px;
    border-radius: 20px;
  }
  #bottomNav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 56px;
    padding: 4px 2px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: var(--vc-muted, #c9b8e0);
    font-size: .72rem;
    font-weight: 700;
    box-shadow: none;
  }
  #bottomNav .nav-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  #bottomNav button[aria-current=page] {
    color: var(--vc-pink, #ff4f8b);
    background: #ff4f8b1f;
    text-shadow: 0 0 12px #ff4f8b99;
  }

  .map-compact { display: block; }
  .map-tools {
    top: auto;
    bottom: var(--nav-space);
    right: max(12px, env(safe-area-inset-right));
    max-height: calc(100dvh - var(--nav-space) - 90px);
    overflow: auto;
    gap: 7px;
  }
  .map-tools .map-zoom { display: none; }
  .map-tools:not(.is-expanded) .map-extra { display: none; }
  .map-tools button { min-height: 46px; border-radius: 14px; }
  #mapMore[aria-expanded=true] { border-color: var(--vc-teal, #2de2e6); color: var(--vc-teal, #2de2e6); }

  #mapMessage { bottom: var(--nav-space); max-width: calc(100% - 170px); }
  #tourNext:not(:empty) { bottom: calc(var(--nav-space) + 44px); max-width: calc(100% - 170px); }
  #mapPanel { bottom: var(--nav-space); max-height: min(44dvh, calc(100dvh - 200px)); }
  #listView, #listFooter { padding-bottom: var(--nav-space); }

  #pointDialog { max-height: 62dvh; border-radius: 22px 22px 0 0; }
  #pointDialog::before {
    content: "";
    display: block;
    width: 42px;
    height: 5px;
    margin: 8px auto 0;
    border-radius: 3px;
    background: #ffffff40;
  }
}

.guide-ocr-text {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
}

#forumDialog, #teamDialog { width: min(94vw, 680px); max-height: 88dvh; overflow: auto; }
#forumContent, #teamContent, #teamContent > section { display: grid; gap: .75rem; }
#teamContent > section > h3 { margin: 0; }
#teamContent > section > button { justify-self: start; }
.forum-post-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-post img { display: block; max-width: 100%; max-height: 50dvh; object-fit: contain; }
.forum-image-link { display: block; width: fit-content; max-width: 100%; cursor: zoom-in; }
.forum-post > button { margin: .25rem .25rem 0 0; }

#contactsDialog { width: min(94vw, 580px); max-height: 88dvh; overflow: auto; }
#contactsContent ul { padding: 0; list-style: none; }
#contactsContent li { flex-wrap: wrap; overflow-wrap: anywhere; }

#helpDialog { width: min(94vw, 680px); max-height: 88dvh; overflow: auto; }
#helpTopics { display: grid; gap: .5rem; }
#helpTopics details { padding: .75rem; border: 1px solid #435367; border-radius: 10px; }
#helpTopics summary { cursor: pointer; font-weight: 600; }
#helpTopics p { margin: .75rem 0 0; line-height: 1.5; }

#mainMenu, #trackerSettings { width: min(100% - 24px, 530px); max-height: calc(100dvh - 32px); overflow: auto; }
.tracker-menu { display: grid; gap: 1rem; }
.tracker-menu section h3 { margin: 0 0 .4rem; font-size: .9rem; }
.tracker-menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.tracker-menu-links button { min-width: 0; text-align: left; overflow-wrap: anywhere; }
#openFilters { border-color: var(--vc-sunset, #ffc091); }

.map-quick {
  position: absolute;
  z-index: 1;
  top: calc(env(safe-area-inset-top) + 78px);
  left: max(12px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .35rem;
  width: min(370px, calc(100% - 24px));
  padding: .35rem;
  border-radius: 14px;
}
.map-quick form, .map-quick input, .map-panel-search input { width: 100%; min-width: 0; }
.map-quick input, .map-panel-search input { font-size: 16px; }
.map-quick button, .map-quick input { min-height: 44px; }
.map-panel-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.map-panel-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin-top: .5rem; }
.map-panel-modes button { padding-inline: .25rem; font-size: .85rem; overflow-wrap: anywhere; }
#panelResultCount { margin: .5rem 0; font-size: .85rem; }
#mapChecklist .is-current-map-item { outline: 2px solid var(--vc-teal, #2de2e6); outline-offset: -2px; }
.point-quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.point-quick-actions button { flex: 1 1 140px; }
#mapNextStop { position: absolute; bottom: max(3.5rem, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); z-index: 1; }
body:has(#pointDialog[open]) #mapNextStop { visibility: hidden; }
@media (min-width: 960px) and (min-height: 540px) {
  #mapView:has(#mapPanel:not([hidden])) .map-quick { display: none; }
}
@media (max-width: 719px) {
  .map-tools .map-desktop-favorite { display: none; }
  #mapNextStop { bottom: calc(var(--nav-space) + 54px); }
  #mapView:has(#mapPanel:not([hidden])) #mapNextStop { visibility: hidden; }
}

#contactsContent input[readonly] { display: block; width: 100%; margin: .5rem 0; }
#contactsContent section > div { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.checklist-section {
  margin: .65rem 0;
  border: 1px solid var(--vc-line, #435367);
  border-radius: 14px;
  background: #1a222d;
}
.checklist-section summary { cursor: pointer; padding: .85rem; font-weight: 700; }
.checklist-count { margin-inline-start: .6rem; color: var(--vc-muted, #b7c5d6); font-size: .85rem; font-weight: 500; }
.checklist-section ul { list-style: none; padding: 0 .65rem; margin: 0; }
.checklist-section > button { margin: .5rem .65rem .65rem; }

.friend-invite-card {
  padding: .85rem;
  border: 1px solid var(--vc-line, #435367);
  border-radius: 14px;
}
.friend-invite-card h3 { margin: 0; }
#contactsContent .friend-invite-action {
  background: var(--vc-sunset, #ffc091);
  color: #1d0a17;
}

#supportDialog { width: min(94vw, 650px); max-height: 88dvh; overflow: auto; }
#supportContent .guide-card { margin-block: .6rem; }
#supportContent summary { cursor: pointer; padding-block: .5rem; }

.team-navigation { display: flex; flex-wrap: wrap; gap: .5rem; }
.team-roles .guide-card { margin-block: .6rem; }

#pointDragHandle { display: none; }
#appQuestion { width: min(92vw, 440px); }
#appQuestionMessage { margin-top: 0; font-size: 1.15rem; white-space: pre-line; }
#appQuestionInput { width: 100%; margin-bottom: .75rem; }
#appQuestionForm > div { justify-content: flex-end; }
/* Confirm is the highlighted action; Cancel stays neutral although it is the last button in the markup. */
#appQuestionForm #appQuestionAccept { background: var(--vc-sunset); color: #1d0a17; border-color: transparent; box-shadow: 0 0 18px #ff4f8b4d; }
#appQuestionForm #appQuestionCancel { background: #ffffff0b; color: var(--vc-text); border-color: var(--vc-line); box-shadow: none; }
.selected-map-pin { pointer-events: none; }
.selected-map-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #009ea1, 0 0 16px #000;
}
/* Markers lie on the tilted map plane and would be squashed into ellipses. Stretch them back
   around their centre so they stay round while the centre stays exactly on the location. */
.map-perspective-active .leaflet-marker-icon > *,
.map-perspective-active .selected-map-pin::before {
  transform: scaleY(calc(1 / cos(var(--pitch, 0deg))));
}
@media (max-width: 719px) {
  #panelFilters { display: none; }
  .map-panel-search { grid-template-columns: minmax(0, 1fr); }
  .tracker-bar { padding-block: 2px; min-height: 44px; }
  .tracker-bar button { min-height: 42px; padding-block: 4px; }
  .map-quick { top: calc(env(safe-area-inset-top) + 58px); padding: .2rem; }
  #pointDialog::before { display: none; }
  #pointDragHandle { display: grid; height: 26px; place-items: center; touch-action: none; }
  #pointDragHandle::after { content: ""; width: 42px; height: 5px; border-radius: 4px; background: #ffffff70; }
}
#appQuestionCancel { order: -1; }

.friends-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; background: #00000033; border: 1px solid var(--vc-line); border-radius: 14px; }
.friends-switch button { display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; min-height: 48px; }
.friends-switch button small { margin: 0; font-weight: 500; font-size: .72rem; }
.friends-switch button[aria-pressed=true] { background: var(--vc-sunset); color: #1d0a17; opacity: 1; }

#pointDialog .point-header {
  padding: .85rem 0 .75rem;
  border-bottom: 1px solid var(--vc-line);
  margin-bottom: .8rem;
}
#pointDialog .point-category {
  display: inline-block;
  padding: .25rem .6rem;
  margin: 0 0 .45rem;
  border-radius: 8px;
  background: #36d9dd1c;
  color: #a7f6f2;
  font-size: .76rem;
  font-weight: 650;
}
#pointDialog .point-category[data-category="collectible"] { background: #ffb46122; color: #ffd199; }
#pointDialog .point-header h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); overflow-wrap: anywhere; }
#pointDialog .point-quick-actions { display: grid; grid-template-columns: 1.2fr 1fr; }
#pointDialog .point-quick-actions button { margin: 0; min-height: 46px; font-size: clamp(.82rem, 2vw, 1rem); }
#pointDialog .point-photo {
  margin: .8rem 0;
  overflow: hidden;
  border: 1px solid var(--vc-line);
  border-radius: 14px;
  background: #110d21;
}
#pointDialog .point-photo-link { display: block; cursor: zoom-in; }
#pointDialog .point-photo .point-image { max-height: min(280px, 32dvh); margin: 0; border-radius: 0; }
#pointDialog .point-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem .75rem;
  padding: .5rem .75rem;
  font-size: .76rem;
}
.point-map-media { position: relative; background: #182037; }
.point-map-media canvas { display: block; width: 100%; height: clamp(96px, 22dvh, 204px); object-fit: cover; }
.point-preview-pin {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 23px;
  height: 23px;
  border: 3px solid #fff4e9;
  border-radius: 50%;
  background: #ff617c;
  box-shadow: 0 0 0 8px #ff617c45, 0 3px 12px #100a2299;
  pointer-events: none;
}
#pointDialog .point-hint {
  margin: .8rem 0;
  padding: .75rem .9rem;
  border: 1px solid var(--vc-line);
  border-left: 3px solid var(--vc-teal);
  border-radius: 10px;
  background: #2be1de0b;
}
#pointDialog .point-hint h3 { margin: 0; }
#pointDialog .point-hint p { margin: .4rem 0 0; }
.point-secondary-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.point-secondary-actions button { font-size: .82rem; padding-inline: .7rem; }

.team-queue, .team-queue-results { display: grid; gap: .6rem; min-width: 0; }
.team-queue > select { justify-self: start; max-width: 100%; }
.team-queue > small { margin: 0; }
.team-queue-results > .point-group { margin: 0; }
.team-queue-results > .point-group > li { display: grid; gap: .35rem; padding: .45rem; }
.team-triage { min-width: 0; padding: .45rem .55rem; }
.team-triage-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.team-triage-tags > span { padding: .2rem .45rem; border-radius: .4rem; background: #37304e; color: #f1e7fa; font-size: .75rem; overflow-wrap: anywhere; }
.team-triage-tags > [data-priority="1"] { background: #604425; color: #ffdfaa; }
.team-triage-tags > [data-priority="2"] { background: #672d49; color: #ffe0ec; }
.team-triage details { margin-top: .4rem; font-size: .83rem; }
.draft-advice { padding: .7rem .8rem; margin: .65rem 0; border: 1px solid #a4764d; border-radius: .65rem; background: #ffb5611c; }
:is(.team-triage, .draft-advice) ul { margin: .35rem 0 0; padding-inline-start: 1.2rem; }
:is(.team-triage, .draft-advice) li { display: list-item; margin: .25rem 0; padding: 0; background: none; overflow-wrap: anywhere; }
.friends-switch button[aria-pressed=true] small { color: #3a1426; }

/* Impressum, Datenschutz und Konto-Löschen */
.legal-body { overflow: auto; min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 60% at 50% -10%, #ff4f8b40, transparent 60%), radial-gradient(90% 50% at 100% 0%, #7b3fe455, transparent 70%), var(--vc-night) fixed; }
.legal-page { max-width: 780px; margin: 0 auto; padding: clamp(20px, 5vw, 40px); line-height: 1.65; color: var(--vc-muted);
  background: var(--vc-panel); border: 1px solid var(--vc-line); border-radius: 20px; box-shadow: 0 20px 60px #0008; backdrop-filter: blur(6px); }
.legal-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--vc-line); }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--vc-text); font-family: var(--vc-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; text-decoration: none; letter-spacing: .03em; }
.legal-brand img { width: 44px; height: 44px; border-radius: 12px; }
.legal-back { padding: 7px 14px; border: 1px solid var(--vc-line); border-radius: 999px; background: #ffffff0d; color: var(--vc-text); font-size: .88rem; font-weight: 650; text-decoration: none; }
.legal-back:hover { border-color: var(--vc-teal); color: var(--vc-teal); }
.legal-page h1 { margin: 18px 0 6px; font-family: var(--vc-display); font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1.05; font-weight: 800; text-transform: uppercase; background: var(--vc-sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.legal-page h2 { margin: 2rem 0 .5rem; padding-top: 1.2rem; border-top: 1px solid var(--vc-line); font-size: 1.08rem; color: var(--vc-teal); }
.legal-page h1 + h2, .legal-page h1 + p + h2 { border-top: 0; padding-top: 0; }
.legal-page p, .legal-page ul { margin: .6rem 0; }
.legal-page :is(strong, code) { color: var(--vc-text); }
.legal-page code { font-size: .85em; padding: 1px 5px; border-radius: 6px; background: #ffffff12; overflow-wrap: anywhere; }
.legal-page a { overflow-wrap: anywhere; }
.legal-page ul { padding-left: 1.2em; }
.legal-page li { display: list-item; background: none; border: 0; padding: 2px 0; margin: 6px 0; }
.legal-page li::marker { color: var(--vc-pink); }
.legal-footer { max-width: 780px; margin: 16px auto 0; text-align: center; font-size: .82rem; color: var(--vc-muted); }
.legal-note { padding: 10px 12px; border-left: 3px solid var(--vc-orange); background: #ffffff08; border-radius: 8px; }
.legal-links { margin: 14px 0 0; font-size: .85rem; color: var(--vc-muted); }
.account-danger { margin-top: 12px; padding: 10px; border: 1px solid #ff5a4e55; border-radius: 12px; }
.account-danger summary { cursor: pointer; font-weight: 700; }
.account-danger button { display: block; width: 100%; margin-top: 8px; }
#accountControls .danger-button, .danger-button { background: #ff5a4e26; border-color: #ff5a4e; color: #ffd6d2; }

/* ==========================================================================
   Ruhiges Oberflächen-Design für alles, was über der Karte liegt:
   flache Flächen, eine Akzentfarbe, keine Leuchteffekte, klare Schrift-Hierarchie.
   Steht bewusst am Ende, damit es die Neon-Regeln oben überschreibt.
   ========================================================================== */
:root {
  --ui-font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ui-surface: #16121e;
  --ui-surface-glass: #16121ef2;
  --ui-raised: #221c2d;
  --ui-raised-hover: #2b2438;
  --ui-field: #0f0c15;
  --ui-border: #ffffff14;
  --ui-border-strong: #ffffff29;
  --ui-text: #f1edf6;
  --ui-muted: #a69db4;
  --ui-accent: #ff5c93;
  --ui-accent-hover: #ff74a3;
  --ui-on-accent: #1c0912;
  --ui-radius: 12px;
  --ui-radius-sm: 8px;
  --ui-shadow: 0 1px 2px #0006, 0 12px 32px -8px #000c;
}

/* Flächen */
dialog, .glass-panel, #updateBanner {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  font-family: var(--ui-font);
  color: var(--ui-text);
}
.glass-panel { background: var(--ui-surface-glass); }
dialog::backdrop { background: #07050bb3; -webkit-backdrop-filter: none; backdrop-filter: none; }
#pointDialog .point-header, #guideDialog .point-header { background: var(--ui-surface); }

/* Überschriften: normale Schrift statt Impact-Großbuchstaben */
:is(#pointDialog, #filterDialog, #guideDialog, #friendsDialog, #progressDialog, #favoritesDialog, #tourDialog, #editor, #backupPreview, #sharePlaceDialog) h2,
dialog h2 {
  font-family: var(--ui-font);
  font-weight: 650;
  text-transform: none;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ui-text);
}
#pointDialog .point-header h2 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
:is(#pointDialog h3, .menu-filters h3, #progressGroups h3, #friendsPlacesTitle, .map-panel-heading h2),
dialog h3 {
  font-family: var(--ui-font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  color: var(--ui-muted);
}
:is(dialog, .glass-panel) :is(p, label, small, li) { font-family: var(--ui-font); }
.point-meta, #pointDialog .point-meta { color: var(--ui-muted); font-size: .8rem; }
#pointDialog .point-header { padding: .25rem 0 .9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--ui-border); }

/* Kategorie-Kennzeichnung: dezentes Label statt farbiger Pille */
#pointDialog .point-category,
#pointDialog .point-category[data-category="collectible"] {
  padding: .2rem .5rem;
  border: 1px solid var(--ui-border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ui-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
}

/* Bedienelemente */
:is(dialog, .glass-panel, .map-tools, #mapView) :is(button, input, select, textarea),
#updateBanner button {
  font-family: var(--ui-font);
  border-radius: var(--ui-radius-sm);
  box-shadow: none;
}
:is(dialog, .glass-panel, .map-tools, #mapView) button,
#updateBanner button {
  background: var(--ui-raised);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  font-weight: 550;
  text-shadow: none;
}
:is(dialog, .glass-panel, .map-tools, #mapView) button:hover:not(:disabled),
#updateBanner button:hover:not(:disabled) {
  background: var(--ui-raised-hover);
  border-color: var(--ui-border-strong);
  box-shadow: none;
}
:is(dialog, .glass-panel, .map-tools, #mapView) button:active:not(:disabled) { transform: none; }
:is(dialog, .glass-panel, #mapView) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  background: var(--ui-field);
  border: 1px solid var(--ui-border-strong);
  color: var(--ui-text);
}
:is(dialog, .glass-panel, #mapView) :is(input, select, textarea):focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px #ff5c9333;
}
:is(dialog, .glass-panel, #mapView) :is(input, textarea)::placeholder { color: #7d748b; }

/* Umschalter (Treffer/Merkliste/Route, Tag/Nacht, 3D …): ruhiger „aktiv“-Zustand */
:is(dialog, .glass-panel, .map-tools, #mapView) button[aria-pressed=true],
:is(dialog, .glass-panel, .map-tools, #mapView) button[aria-pressed=true]:hover:not(:disabled),
.menu-tabs button[aria-pressed=true], .friends-switch button[aria-pressed=true],
.map-tools #mapPerspective[aria-pressed=true], .map-tools #nearStart[aria-pressed=true] {
  background: #ff5c931f;
  border-color: #ff5c9373;
  color: #ffd3e2;
  box-shadow: none;
}
.friends-switch button[aria-pressed=true] small { color: #ffd3e2; }
:is(dialog, .glass-panel, .map-tools, #mapView) button[aria-expanded=true] { border-color: var(--ui-border-strong); color: var(--ui-text); }
dialog, .glass-panel, #mapPanel { scrollbar-color: #ffffff2e transparent; }

/* Hauptaktion: eine flache Akzentfläche, kein Verlauf, kein Glühen */
:is(dialog, #mapView) :is(.point-done, #applyFilters, #backupApply, #add, #appQuestionAccept),
#updateBanner button:not(.update-later),
#contactsContent .friend-invite-action {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--ui-on-accent);
  font-weight: 650;
  box-shadow: none;
}
:is(dialog, #mapView) :is(.point-done, #applyFilters, #backupApply, #add, #appQuestionAccept):hover:not(:disabled),
#updateBanner button:not(.update-later):hover:not(:disabled) {
  background: var(--ui-accent-hover);
  border-color: var(--ui-accent-hover);
  box-shadow: none;
}
/* Erledigt: klare Bestätigung statt Neon-Verlauf */
#pointDialog .point-done[aria-pressed=true],
#pointDialog .point-done[aria-pressed=true]:hover:not(:disabled) {
  background: #1d3b34;
  border-color: #3fbf9b;
  color: #c8f5e6;
  box-shadow: none;
}
#pointDialog .point-done { min-height: 46px; margin: 0; font-size: .95rem; }
#updateBanner button { white-space: nowrap; }
#updateBanner .update-later { background: transparent; border-color: transparent; color: var(--ui-muted); }

/* Schließen-Knopf */
:is(dialog, #mapView) .point-close {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  border-color: transparent;
  color: var(--ui-muted);
}
:is(dialog, #mapView) .point-close:hover:not(:disabled) { background: var(--ui-raised); color: var(--ui-text); }

/* Abschnitte im Fundort-Fenster */
#pointDialog .point-quick-actions { gap: .5rem; margin-bottom: .75rem; }
#pointDialog .point-quick-actions button { min-height: 46px; font-size: .92rem; }
.point-secondary-actions { gap: .5rem; margin: .5rem 0 1rem; }
.point-secondary-actions button { font-size: .85rem; padding: .45rem .8rem; min-height: 38px; }
.spoiler-details, .personal-details { border-color: var(--ui-border); }
#pointDialog .personal-details { margin-top: 1rem; padding-top: 1rem; }
#pointDialog .personal-details label { display: grid; gap: .4rem; color: var(--ui-text); font-size: .88rem; font-weight: 550; }
#pointDialog .personal-details textarea { min-height: 72px; resize: vertical; }
#pointDialog .personal-details form { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
#pointDialog .personal-details form button { justify-self: start; }
#pointDialog .personal-details small { color: var(--ui-muted); font-size: .78rem; }
#pointDialog .point-hint {
  border: 1px solid var(--ui-border);
  border-left: 2px solid var(--ui-accent);
  border-radius: var(--ui-radius-sm);
  background: #ffffff05;
}
#pointDialog .point-photo { border-color: var(--ui-border); border-radius: var(--ui-radius-sm); background: var(--ui-field); }
.safe-details, .model-details, #accountControls, .guide-card, .guide-callout, .gate-install, .checklist-section, .friend-invite-card {
  background: #ffffff05;
  border-color: var(--ui-border);
}
.guide-card h3 { font-family: var(--ui-font); font-weight: 650; letter-spacing: 0; }
.safe-code { text-shadow: none; border-color: var(--ui-border-strong); color: #e8fbfb; }
.cheat-sequence kbd { background: var(--ui-raised); color: var(--ui-text); border: 1px solid var(--ui-border-strong); box-shadow: none; }

/* Seitenleiste „Kartentreffer“ und Listen */
#mapPanel li {
  background: #ffffff05;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
}
#mapPanel section+section { border-top-color: var(--ui-border); }
#mapPanel li small { color: var(--ui-muted); }
#mapChecklist button { border-color: var(--ui-border); }
#mapChecklist input, input[type=checkbox] { accent-color: var(--ui-accent); }
#mapChecklist .is-current-map-item { outline: 1px solid var(--ui-accent); outline-offset: -1px; }
.category-choice { background: transparent; border-color: var(--ui-border-strong); }
.category-choice:has(input:checked) {
  background: color-mix(in srgb, var(--category-color) 14%, transparent);
  border-color: color-mix(in srgb, var(--category-color) 60%, transparent);
  box-shadow: none;
}

/* Kartenknöpfe und Hinweise */
.map-tools button {
  background: var(--ui-surface-glass);
  border-color: var(--ui-border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 1px 2px #0006, 0 4px 12px -4px #0009;
  font-size: .85rem;
}
#mapMessage, #tourNext:not(:empty) {
  background: var(--ui-surface-glass);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text);
  font-family: var(--ui-font);
  font-size: .82rem;
}
.leaflet-control-attribution { background: #16121ecc !important; }

/* Kopfleiste und Fortschritt ohne Leuchten */
.tracker-bar { border-color: var(--ui-border); }
.tracker-bar::after { display: none; }
progress::-webkit-progress-value, #barProgress::-webkit-progress-value { background: var(--ui-accent); box-shadow: none; }
progress::-moz-progress-bar, #barProgress::-moz-progress-bar { background: var(--ui-accent); }
#count { font-family: var(--ui-font); font-weight: 650; letter-spacing: 0; }
@media (max-width: 719px) {
  #bottomNav button[aria-current=page] { color: var(--ui-text); background: #ff5c931f; text-shadow: none; }
  #pointDialog { border-radius: 16px 16px 0 0; }
}

/* Team-Bereich: Kennzahlen, Reiter und Rollenliste */
#teamDialog { width: min(94vw, 760px); }
#teamDialog #teamStatus:empty { display: none; }
.team-tabs { display: flex; gap: .25rem; padding: .25rem; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-field); overflow-x: auto; }
#teamDialog .team-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 38px; padding: .35rem .8rem; border-color: transparent; background: transparent; color: var(--ui-muted); }
#teamDialog .team-tabs button[aria-pressed=true] { background: var(--ui-raised); border-color: var(--ui-border-strong); color: var(--ui-text); }
.team-tab-count { min-width: 1.35rem; padding: 0 .4rem; border-radius: 999px; background: var(--ui-accent); color: var(--ui-on-accent); font-size: .72rem; font-weight: 700; line-height: 1.35rem; text-align: center; }
.team-panel { display: grid; gap: .6rem; min-width: 0; }
#teamContent .team-panel > h3 { margin: .6rem 0 0; }
.team-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.team-stat { display: grid; align-content: start; gap: .15rem; min-width: 0; padding: .75rem .85rem; border: 1px solid var(--ui-border); border-radius: 10px; background: #ffffff05; text-align: left; font: inherit; color: var(--ui-text); }
#teamDialog button.team-stat { cursor: pointer; background: #ffffff05; min-height: 0; }
#teamDialog button.team-stat:hover:not(:disabled) { background: var(--ui-raised); }
.team-stat strong { font-size: 1.6rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.team-stat span { color: var(--ui-muted); font-size: .8rem; line-height: 1.3; }
.team-stat small { color: var(--ui-muted); font-size: .72rem; }
.team-stat[data-attention] { border-color: #ff5c9366; }
#teamDialog button.team-stat[data-attention] { background: #ff5c9312; }
.team-stat[data-attention] strong { color: #ff8db4; }
.team-stats-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-stats-compact .team-stat { padding: .55rem .7rem; }
.team-stats-compact .team-stat strong { font-size: 1.2rem; }
.team-roles { display: grid; gap: .6rem; }
.team-roles h4 { margin: .6rem 0 0; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-muted); }
.team-role-add { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: end; gap: .5rem; padding: .75rem; border: 1px solid var(--ui-border); border-radius: 10px; background: #ffffff05; }
.team-role-add label { display: grid; gap: .3rem; min-width: 0; font-size: .78rem; color: var(--ui-muted); }
.team-role-add :is(input, select, button) { width: 100%; min-height: 40px; }
.team-role-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ui-border); border-radius: 10px; overflow: hidden; }
#teamDialog .team-role-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(220px, auto); align-items: center; gap: .75rem; margin: 0; padding: .6rem .75rem; border: 0; border-radius: 0; background: transparent; }
#teamDialog .team-role-list li + li { border-top: 1px solid var(--ui-border); }
.team-role-who { display: grid; min-width: 0; }
.team-role-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.team-role-who code { color: var(--ui-muted); font-size: .75rem; }
.team-role-badges { display: flex; gap: .3rem; }
.team-badge { padding: .1rem .45rem; border: 1px solid var(--ui-border-strong); border-radius: 6px; color: var(--ui-muted); font-size: .72rem; font-weight: 600; }
.team-role-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.team-role-controls :is(select, button) { min-height: 36px; }
.team-feedback:empty { display: none; }
@media (max-width: 560px) {
  .team-role-add { grid-template-columns: 1fr; }
  #teamDialog .team-role-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .team-role-controls { grid-column: 1 / -1; }
  .team-stats-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
#teamDialog .team-roles :is(input, select, button) { font-size: .88rem; }
#teamDialog .team-role-add :is(input, select, button) { height: 40px; min-height: 40px; padding-block: 0; }
#teamDialog .team-role-controls :is(select, button) { height: 36px; min-height: 36px; padding-block: 0; }
#teamDialog .team-roles button:disabled { opacity: .45; cursor: default; }
#teamDialog .team-role-who strong.is-unknown { color: var(--ui-muted); font-weight: 500; font-style: italic; }
#teamDialog {
  width: min(96vw, 1020px);
  max-height: 90dvh;
  padding: 0;
  border-radius: 20px;
  background: #15121e;
}
#teamDialog > .point-header {
  align-items: center;
  margin: 0;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid var(--ui-border);
  background: linear-gradient(110deg, #24182f, #171321 70%);
}
#teamDialog > .point-header h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.7rem); }
#teamStatus { margin: .75rem 1.25rem 0; color: var(--ui-muted); }
#teamContent { display: block; }
.team-workspace { display: grid; grid-template-columns: 178px minmax(0, 1fr); min-height: min(62dvh, 520px); }
#teamDialog .team-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .3rem;
  padding: .85rem .65rem;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
  background: #181424;
}
#teamDialog .team-tabs button { flex: 0 0 auto; justify-content: flex-start; padding-inline: .65rem; min-height: 44px; min-width: 0; }
#teamDialog .team-tabs button[aria-pressed=true] {
  background: #362441;
  border-color: #71496e;
  color: #fff4fb;
}
.team-nav-icon { width: 1.1rem; font-size: 1.08rem; text-align: center; color: #f4a4cc; }
.team-tab-count { margin-inline-start: auto; }
#teamContent .team-panel { align-content: start; gap: 1rem; padding: 1.2rem 1.25rem; }
#teamContent .team-panel > h3 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.42rem); color: var(--ui-text); }
.team-stats { gap: .6rem; }
.team-stat { min-height: 88px; }
#teamDialog button.team-stat { min-height: 88px; }
.team-empty { padding: clamp(1.1rem, 4vw, 2rem); border: 1px dashed #52455f; border-radius: 14px; background: #1a1627; text-align: center; }
.team-empty-icon { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto .5rem; border-radius: 50%; background: #4bd7ae1f; color: #88e3c3; }
.team-empty strong { color: var(--ui-text); }
.team-empty p { max-width: 42ch; margin: .35rem auto 0; color: var(--ui-muted); font-size: .84rem; }
.team-metrics { padding: .7rem .85rem; border: 1px solid var(--ui-border); border-radius: 12px; }
.team-metrics summary { cursor: pointer; font-weight: 600; }
.team-metrics h4 { margin: .85rem 0 .4rem; color: var(--ui-muted); }
.team-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
#teamDialog .team-filters button { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .35rem .6rem; font-size: .8rem; }
#teamDialog .team-filters button[aria-pressed=true] { border-color: #a377a5; background: #3a2844; color: #fff4fb; }
.team-filter-count { min-width: 1.2rem; padding: .05rem .3rem; border-radius: 5px; background: #ffffff14; color: inherit; }
.team-ban-list li { flex-wrap: wrap; }
.team-ban-list p { margin: .35rem 0 0; }
.team-ticket-head { padding: .75rem .85rem; border-radius: 12px; background: var(--ui-raised); }
.team-ticket-head h3 { margin: 0; overflow-wrap: anywhere; }
#teamContent > .team-ticket-head, #teamContent > .team-message, #teamContent > form { margin: .75rem 1rem; }
#teamContent > button { margin: 0 1rem 1rem; }
.team-message { padding: .65rem .85rem; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-field); }
.team-message p { margin: .35rem 0 0; }
.team-message-staff { border-left: 3px solid #b890e0; background: var(--ui-raised); }
@media (max-width: 720px) {
  #teamDialog { width: min(95vw, 620px); }
  .team-workspace { grid-template-columns: minmax(0, 1fr); min-height: min(60dvh, 470px); grid-template-rows: auto 1fr; }
  #teamDialog .team-tabs { flex-direction: row; padding: .45rem .6rem; border-right: 0; border-bottom: 1px solid var(--ui-border); }
  #teamDialog .team-tabs button { flex: 1 0 auto; width: auto; }
  #teamContent .team-panel { padding: .9rem .75rem; }
}
@media (max-width: 560px) {
  #teamDialog .team-tabs button { font-size: .82rem; gap: .3rem; }
  .team-nav-icon { display: none; }
  .team-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-stat strong { font-size: 1.35rem; }
}

/* ==========================================================================
   Checkliste: Suchleiste, Schnellfilter, Zeilen, Leer-Zustände, Rückmeldungen
   ========================================================================== */
.list-toolbar {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 62px);
  z-index: 1;
  display: grid;
  gap: .55rem;
  margin: 0 -4px .5rem;
  padding: .55rem 4px;
  background: linear-gradient(var(--vc-night) 78%, transparent);
}
.list-toolbar input { width: 100%; font-size: 16px; }
.chip-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  padding: .3rem .75rem;
  border: 1px solid var(--ui-border-strong, #ffffff29);
  border-radius: 999px;
  background: transparent;
  color: var(--ui-text, #f1edf6);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: none;
}
.chip-row .chip .category-icon { width: 15px; height: 15px; color: var(--category-color); }
.chip-row .chip[aria-pressed=true] {
  border-color: var(--ui-accent, #ff5c93);
  background: color-mix(in srgb, var(--ui-accent, #ff5c93) 18%, transparent);
  color: #fff;
}
.chip-row .chip-category[aria-pressed=true] {
  border-color: color-mix(in srgb, var(--category-color) 70%, transparent);
  background: color-mix(in srgb, var(--category-color) 16%, transparent);
}
.chip-row .chip-more { border-style: dashed; color: var(--ui-muted, #a69db4); }

li.item, div.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.item-check { display: grid; place-items: center; min-width: 32px; min-height: 40px; margin: 0; cursor: pointer; }
.item-check input { margin: 0; width: 20px; height: 20px; }
.item-main {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 600;
  box-shadow: none;
}
button.item-main:hover .item-name { text-decoration: underline; text-decoration-color: #ffffff55; }
.item-main small { font-weight: 400; overflow-wrap: anywhere; }
.item-name { overflow-wrap: anywhere; }
#mapChecklist .item-main, #entries .item-main { border: 0; }
.item-map { display: grid; place-items: center; width: 40px; min-height: 40px; padding: 0; color: var(--vc-teal, #2de2e6); }
.item-map .category-icon { width: 19px; height: 19px; }

.checklist-section summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.checklist-bar {
  flex-basis: 100%;
  height: 4px;
  margin-top: .45rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ui-accent, #ff5c93) var(--done), #ffffff14 var(--done));
}

.empty-state { display: grid; justify-items: center; gap: .35rem; padding: 1.6rem 1rem; text-align: center; color: var(--ui-muted, #a69db4); }
.empty-state-icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  margin-bottom: .25rem;
  border-radius: 50%;
  background: #ff5c931a;
  color: var(--ui-accent, #ff5c93);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state strong { color: var(--ui-text, #f1edf6); font-size: 1rem; }
.empty-state p { max-width: 34ch; margin: 0; font-size: .88rem; line-height: 1.45; }
.empty-state button { margin-top: .5rem; }
li.empty-row { display: block; padding: 0; background: transparent; border: 1px dashed var(--ui-border-strong, #ffffff29); }

.progress-toast {
  position: fixed;
  z-index: 1001;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 70px);
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: calc(100vw - 24px);
  padding: .55rem .95rem;
  border: 1px solid color-mix(in srgb, var(--category-color) 55%, transparent);
  border-radius: 999px;
  background: #16121ef5;
  color: var(--ui-text, #f1edf6);
  font-size: .9rem;
  font-weight: 650;
  box-shadow: 0 10px 30px #000a;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .2s ease, transform .2s ease;
}
.progress-toast .category-icon { color: var(--category-color); }
.progress-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.progress-toast.is-complete { background: linear-gradient(120deg, #ff4f8bf2, #ff9a3cf2); color: #1c0912; border-color: transparent; }
.progress-toast.is-complete .category-icon { color: #1c0912; }

/* Ladeplatzhalter für Forum, Freunde, Support und Guide */
.skeleton { display: grid; gap: .6rem; }
.skeleton span {
  display: block;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffffff08 0%, #ffffff14 45%, #ffffff08 90%) 0 0 / 300% 100%;
  animation: skeleton 1.3s ease-in-out infinite;
}
.skeleton span:nth-child(2) { width: 88%; }
.skeleton span:nth-child(3) { width: 72%; }
@keyframes skeleton { to { background-position: -150% 0; } }

@media (prefers-reduced-motion: reduce) {
  .progress-toast { transition: none; }
  .skeleton span { animation: none; }
}
@media (max-width: 719px) {
  .list-toolbar { top: calc(env(safe-area-inset-top) + 50px); }
  .progress-toast { top: auto; bottom: calc(var(--nav-space) + 8px); }
}

/* Benachrichtigungen, Tagesaufgabe, Fortschrittskarte, Neuigkeiten */
.tracker-bar .bell-button { position: relative; display: grid; place-items: center; width: 44px; padding: 0; }
.bell-button .nav-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bell-button:not([data-count=""])[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ui-accent, #ff5c93);
  color: var(--ui-on-accent, #1c0912);
  font-size: .7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
#notificationsDialog, #dailyDialog, #newsDialog { width: min(94vw, 520px); max-height: 86dvh; overflow: auto; }
.notification-list, .daily-entries { margin: .5rem 0 0; padding: 0; list-style: none; }
.notification-list li.notification { padding: 0; }
.notification button { width: 100%; padding: .7rem .85rem; border: 0; background: transparent; text-align: left; box-shadow: none; }
.notification strong { display: block; color: var(--ui-text, #f1edf6); }
.notification.is-unread { border-color: color-mix(in srgb, var(--ui-accent, #ff5c93) 60%, transparent); background: #ff5c9312; }
.notification.is-unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--ui-accent, #ff5c93); vertical-align: middle; }
#dailyBar { display: block; margin: 0 0 .75rem; }
#progressCardDialog { width: min(94vw, 460px); max-height: 92dvh; overflow: auto; }
.progress-card-image { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--ui-border, #ffffff14); background: var(--ui-field, #0f0c15); }
.progress-card-image:not([src]) { aspect-ratio: 1080 / 1350; }
.progress-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.progress-card-actions button { flex: 1 1 160px; }
.news-entry time { color: var(--ui-muted, #a69db4); font-size: .82rem; }
.news-entry h3 { margin: .2rem 0 .5rem; }
.news-entry ul { margin: 0; padding-left: 1.2em; }
.news-entry li { display: list-item; margin: .35rem 0; padding: 0; background: none; border: 0; line-height: 1.45; }
@media (max-width: 719px) {
  .tracker-bar .bell-button { width: 40px; min-height: 40px; }
}
.progress-toast[popover] { inset: auto; margin: 0; overflow: visible; left: 50%; top: calc(env(safe-area-inset-top) + 70px); }
@media (max-width: 719px) {
  .progress-toast[popover] { top: auto; bottom: calc(var(--nav-space) + 8px); }
}

.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--vc-teal, #2de2e6); font: inherit; text-decoration: underline; box-shadow: none; cursor: pointer; }

/* Premium */
#mainMenu .tracker-menu-links .premium-menu-button { border-color: var(--vc-gold); color: var(--vc-gold); font-weight: 750; }
.premium-benefits { margin: .4rem 0 1rem; padding-left: 1.2em; color: var(--vc-muted); line-height: 1.45; }
.premium-benefits li { display: list-item; background: none; border: 0; padding: 2px 0; margin: 4px 0; }
.premium-benefits li::marker { content: '★  '; color: var(--vc-gold); }
.premium-active { padding: 12px 14px; border: 1px solid var(--vc-gold); border-radius: 12px; background: #ffd27a14; color: var(--vc-text); }
.premium-active strong { color: var(--vc-gold); }
.premium-offer { padding: 14px; border: 1px solid var(--vc-line); border-radius: 14px; background: #ffffff08; }
.premium-offer h3 { margin: 0 0 4px; font-family: var(--vc-display); font-weight: 800; text-transform: uppercase; color: var(--vc-gold); }
.premium-offer button { width: 100%; margin-top: 8px; }
.premium-offer + .premium-offer { margin-top: 12px; }
.premium-code-form { display: grid; gap: 6px; margin-top: 8px; }
.premium-code-form[hidden] { display: none; }
.premium-code-form input, .premium-code-form select { width: 100%; min-width: 0; }
.premium-code-list { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; }
.premium-code-list li { display: grid; gap: 4px; }
.premium-code-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.premium-code-actions button { width: auto; margin-top: 0; }
#premiumDialog .premium-claim { background: var(--vc-sunset); color: #1b0f22; border: 0; font-weight: 800; }
#premiumDialog .premium-claim:disabled { opacity: .6; }
.premium-lock { border-style: dashed; border-color: #ffd27a66; }
.premium-lock h3 { color: var(--vc-gold); }
#premiumStatus:empty { display: none; }
.assistant-total { font-size: 1.05rem; font-weight: 750; color: var(--vc-text); }
.assistant-section { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--vc-line); }
.assistant-section h3 { margin: 0 0 .4rem; color: var(--vc-gold); }
.assistant-nearly { margin: 0; padding: 0; list-style: none; }
.assistant-nearly li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .6rem; padding: .5rem 0; border-bottom: 1px solid var(--vc-line); background: none; border-radius: 0; }
.assistant-nearly .assistant-bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--vc-gold) var(--done), #ffffff14 var(--done)); }
.assistant-nearly button { grid-column: 1 / -1; justify-self: start; }
.glitch-status { margin-top: .6rem; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--vc-line); background: #ffffff06; display: grid; gap: .2rem; }
.glitch-status[data-state=works] strong { color: #6ee7a8; }
.glitch-status[data-state=patched] strong { color: var(--vc-orange); }
.glitch-status small { color: var(--vc-muted); }
.glitch-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.premium-star { color: var(--vc-gold); font-weight: 800; margin-inline: .15em .3em; }
/* Sammel-Sterne im Stil der Fahndungssterne */
.star-count { display: inline-flex; align-items: center; gap: .2em; margin-inline-end: .4em; font-weight: 800; color: var(--vc-text); vertical-align: -0.15em; }
.star-count svg { width: 1.15em; height: 1.15em; filter: drop-shadow(0 1px 1px #000a); }
.star-count path { fill: #f4f4f4; stroke: #111; stroke-width: 1.6; stroke-linejoin: round; paint-order: stroke; }
.star-wallet { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 .8rem; padding: .7rem .9rem; border: 1px solid var(--vc-line); border-radius: 12px; background: #ffffff08; }
.star-wallet > .star-count { font-size: 1.6rem; margin: 0; }
.star-wallet > div { display: grid; gap: .15rem; }
.star-wallet small { color: var(--vc-muted); }
.star-wallet > button { margin-inline-start: auto; }
.star-wallet-large > .star-count { font-size: 2rem; }
.stars-heading { margin: 1.2rem 0 .4rem; color: var(--vc-gold); font-family: var(--vc-display); text-transform: uppercase; letter-spacing: .03em; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; margin-top: .6rem; }
.reward-card { display: grid; gap: .35rem; align-content: start; padding: .8rem; border: 1px solid var(--vc-line); border-radius: 12px; background: #ffffff08; }
.reward-card h3 { margin: 0; font-size: 1rem; }
.reward-card p { margin: 0; }
.reward-card.is-soon { border-style: dashed; }
.reward-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.reward-cost { font-weight: 800; color: var(--vc-muted); }
.reward-badge { padding: 2px 8px; border: 1px solid var(--vc-orange); border-radius: 999px; color: var(--vc-orange); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.star-history { margin: 0; padding: 0; list-style: none; }
.star-history li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--vc-line); background: none; border-radius: 0; }
.star-history li.is-link { cursor: pointer; }
.star-history li.is-link:hover { background: #ffffff0a; }
.star-history small { color: var(--vc-muted); }
.star-plus { font-weight: 800; color: #6ee7a8; }
.star-minus { font-weight: 800; color: var(--vc-orange); }
#starsStatus:empty { display: none; }

/* Trophäen & Erfolge */
.trophy-account { margin: .8rem 0; padding: .8rem .9rem; border: 1px solid var(--vc-line); border-radius: 12px; background: #ffffff08; }
.trophy-account h3 { margin: 0 0 .3rem; color: var(--vc-gold); }
.trophy-account p { margin-bottom: 0; }
.trophy-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.trophy-controls label, .trophy-list label { display: flex; align-items: start; gap: .6rem; cursor: pointer; }
.trophy-controls input, .trophy-list input { flex: none; accent-color: var(--vc-gold); }
.trophy-summary { margin: .8rem 0 .3rem; font-weight: 800; }
.trophy-progress { display: block; width: 100%; height: 8px; accent-color: var(--vc-gold); }
.trophy-list { margin: .6rem 0 0; padding: 0; list-style: none; }
.trophy-list li { padding: .65rem .2rem; border-bottom: 1px solid var(--vc-line); background: none; border-radius: 0; }
.trophy-list li.is-earned strong { color: var(--vc-gold); }
.trophy-list label span { display: grid; min-width: 0; gap: .2rem; }
.trophy-list small { color: var(--vc-muted); }
/* Premium content without premium: faded, grey, with a lock */
.premium-locked { opacity: .5; filter: grayscale(1); }
.premium-lock > :not(button) { opacity: .55; filter: grayscale(1); }
.premium-lock h3 { font-size: 1.05rem; }
.premium-placeholder { display: flex; align-items: center; gap: .8rem; min-height: 4.2rem; opacity: .35; filter: grayscale(1); border-style: dashed; pointer-events: none; user-select: none; }
.premium-placeholder-lock { font-size: 1.5rem; }
.premium-placeholder-lines { flex: 1; display: grid; gap: .45rem; }
.premium-placeholder-lines::before, .premium-placeholder-lines::after { content: ''; height: .7rem; border-radius: 999px; background: #ffffff26; }
.premium-placeholder-lines::before { width: 60%; }
.premium-placeholder-lines::after { width: 90%; }
