/* GEOLY – Erscheinungsbild */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #1B2430;
  --ink-2: #3A4452;
  --muted: #5B6472;
  --line: #E4E0D7;
  --brand: #0F5C52;
  --brand-hover: #0B4A42;
  --brand-soft: #E4F0ED;
  --accent: #E4572E;
  --accent-ink: #B8401C;
  --danger: #B42318;
  --ok: #1E7A4F;
  --info-bg: #EEF3FB;
  --info-line: #CFDDF3;
  --warn-bg: #FFF6E5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 6px 20px rgba(27, 36, 48, .07);
  --shadow-lg: 0 2px 6px rgba(27, 36, 48, .08), 0 14px 36px rgba(27, 36, 48, .12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", -apple-system, "Segoe UI", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --header-h: 60px;
  --tap: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* kein Doppeltipp-Zoom */
}
body.in-game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 .9em; }
a { color: var(--brand); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

:focus-visible { outline: 3px solid #2F6BD8; outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------ Kopfzeile */
.topbar {
  position: fixed;
  z-index: 1000;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--header-h) + var(--sat));
  padding: var(--sat) calc(14px + var(--sar)) 0 calc(14px + var(--sal));
  background: rgba(246, 244, 239, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(27, 36, 48, .07);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-height: var(--tap);
  flex-shrink: 0;
}
.brand-mark { width: 46px; height: 39px; flex-shrink: 0; color: #111; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: -.01em; font-size: 1.02rem; }
.brand-copy { font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.hud {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.hud[hidden] { display: none; }
.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 58px;
}
.hud-label { font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-value { font-size: 1.15rem; line-height: 1.15; color: var(--ink); }
.status-pill {
  font-size: .8rem;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}
.status-pill.pulse { animation: pop .35s ease-out; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(27, 36, 48, .06); }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.icon-btn-small { width: 40px; height: 40px; }
.icon-btn[hidden] { display: none; }

/* ------------------------------------------------ Seiten */
main { padding-top: calc(var(--header-h) + var(--sat)); outline: none; }
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px calc(18px + var(--sar)) calc(32px + var(--sab)) calc(18px + var(--sal));
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5em;
}
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin: -10px 0 6px;
  font-weight: 600;
  text-decoration: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.hero {
  text-align: center;
  padding: 26px 0 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-mark { width: 118px; height: 100px; margin-bottom: 18px; color: #111; }
.hero .eyebrow { justify-content: center; }
.hero .lead { margin-inline: auto; }
.actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; margin: 14px auto 0; }
.actions-row { flex-direction: row; flex-wrap: wrap; max-width: none; margin: 4px 0 0; }
.results .actions { margin-bottom: 18px; }

.info-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.info-card { padding: 0; }
.info-card summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.info-card summary::-webkit-details-marker { display: none; }
.info-card summary h2 { margin: 0; font-size: 1.05rem; }
.info-card summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s;
  flex-shrink: 0;
}
.info-card[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.info-card > :not(summary) { margin-left: 22px; margin-right: 22px; }
.info-card > :last-child { margin-bottom: 20px; }
.plain-list { padding-left: 1.2em; margin: 0 0 1em; }
.plain-list li { margin-bottom: .3em; }
.score-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.score-table th, .score-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table th:last-child, .score-table td:last-child { text-align: right; }
.score-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.page-footer { display: flex; justify-content: center; padding: 18px 0 4px; }

/* UK-Monogramm-Plakette */
.uk-badge { display: inline-flex; align-items: center; gap: 8px; }
.uk-badge-mark { width: 36px; height: 30px; color: #111; }
.uk-badge-copy { font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.uk-badge-hero { flex-direction: column; gap: 4px; margin-bottom: 12px; }
.uk-badge-hero .uk-badge-mark { width: 76px; height: 64px; }

/* ------------------------------------------------ Buttons & Formulare */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s, opacity .15s;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: #B9D3CD; }
.btn-secondary:hover:not(:disabled) { background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(27, 36, 48, .06); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-large { min-height: 54px; font-size: 1.05rem; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: .88rem; font-weight: 650; color: var(--ink-2); }
.input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1.5px solid #D4CFC4;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* verhindert Auto-Zoom in iOS Safari */
}
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(15, 92, 82, .18); background: #fff; }
.input-code { font-family: var(--font-num); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* ------------------------------------------------ Hinweise */
.note {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--info-line);
  background: var(--info-bg);
  color: var(--ink-2);
}
.note-warn { background: var(--warn-bg); border-color: #F1D9A6; }
.note p:last-child { margin-bottom: 0; }
.install-hint { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin: 0 0 18px; }
.install-hint p { margin: 4px 0 0; font-size: .93rem; }
.kbd { font-weight: 700; color: var(--ink); white-space: nowrap; }
.badge {
  display: inline-block;
  font-size: .84rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  margin: 0 0 10px;
}
.badge-info { background: var(--info-bg); color: #284A7E; }
.tag { font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); padding: 2px 7px; border-radius: 6px; vertical-align: 2px; }
.empty { color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; }
.empty-state { text-align: center; padding: 34px 22px; margin-top: 24px; }

.loading { display: grid; place-items: center; gap: 14px; min-height: 60vh; color: var(--muted); text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
.noscript { padding: 100px 20px; text-align: center; }

/* ------------------------------------------------ Mit Freunden */
.mode-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 900px) { .mode-grid { grid-template-columns: 1.2fr 1fr; } #form-join { grid-column: 2; } #form-local { grid-row: span 2; } }
.mode-card { display: flex; flex-direction: column; gap: 4px; }
.mode-card > .btn { margin-top: 6px; }
.mode-card .note { margin-top: 14px; }
.players { border: 0; padding: 0; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.players legend { font-size: .88rem; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.player-row { display: flex; align-items: center; gap: 8px; }
.player-dot, .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pin); flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(27, 36, 48, .12); }
.dot { width: 10px; height: 10px; display: inline-block; }
#add-player { align-self: flex-start; }

/* ------------------------------------------------ Raum */
.room-code { font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: .14em; color: var(--brand); margin-bottom: .2em; }
.room .card { margin-top: 18px; }
.leaderboard { list-style: none; padding: 0; margin: 4px 0 14px; text-align: left; }
.leaderboard li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}
.leaderboard li:nth-child(odd) { background: var(--surface-2); }
.leaderboard li.is-me { background: var(--brand-soft); }
.rank { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; }
.leaderboard li:first-child .rank { background: #F6C445; border-color: #E2AC1A; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-score { font-size: 1.1rem; }

/* ------------------------------------------------ Spielfeld */
.game {
  position: fixed;
  inset: 0;
  top: calc(var(--header-h) + var(--sat));
}
.map {
  position: absolute;
  inset: 0;
  background: #EDEAE3;
  outline: none;
}
.map:focus-visible { box-shadow: inset 0 0 0 3px #2F6BD8; }
.crosshair {
  position: absolute;
  left: 50%; top: 50%;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  pointer-events: none;
  opacity: 0;
  z-index: 450;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
}
.map:focus-visible ~ .crosshair { opacity: .8; }

.map-tools {
  position: absolute;
  z-index: 500;
  top: 12px;
  right: calc(12px + var(--sar));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.map-btn:hover { background: #fff; }
.map-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }

.panel {
  position: absolute;
  z-index: 600;
  left: calc(12px + var(--sal));
  right: calc(12px + var(--sar));
  bottom: calc(12px + var(--sab));
  max-height: 58%;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}
.panel-inner {
  pointer-events: auto;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 16px 18px 18px;
  max-width: 560px;
  margin: 0 auto;
}
.panel-inner:empty { display: none; }
.street-name {
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  hyphens: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.line-swatch { width: 22px; height: 7px; border-radius: 4px; background: var(--brand); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15, 92, 82, .3); flex-shrink: 0; }
.hint { color: var(--muted); font-size: .94rem; margin: 2px 0 12px; }

.reveal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.reveal-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.stat-label { display: block; font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stat-value { font-size: 1.55rem; line-height: 1.2; }
.stat-accent { color: var(--brand); }
.meter { height: 8px; border-radius: 99px; background: #ECE8DF; overflow: hidden; margin-bottom: 10px; }
.meter span { display: block; height: 100%; width: var(--w); background: var(--brand); border-radius: inherit; animation: grow .8s cubic-bezier(.2, .8, .2, 1); transform-origin: left; }

.round-results { list-style: none; padding: 0; margin: 6px 0 12px; }
.round-results li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.round-results li:last-child { border-bottom: 0; }
.rr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rr-dist { color: var(--muted); font-size: .9rem; }
.rr-pts { min-width: 58px; text-align: right; color: var(--brand); }

.handoff {
  position: absolute;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: 20px calc(20px + var(--sar)) calc(20px + var(--sab)) calc(20px + var(--sal));
  background: rgba(246, 244, 239, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.handoff[hidden] { display: none; }
.handoff-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.handoff-card .eyebrow { justify-content: center; }
.handoff-card .btn { width: 100%; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--pin);
  color: #fff;
  font-family: var(--font-num);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.map-error {
  position: absolute;
  z-index: 700;
  top: 12px;
  left: calc(12px + var(--sal));
  right: calc(72px + var(--sar));
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #F1C7BF;
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: .92rem;
}

/* Querformat / große Bildschirme: Panel als Seitenkarte links */
@media (min-width: 760px) and (orientation: landscape), (min-width: 900px) {
  .panel {
    left: calc(16px + var(--sal));
    right: auto;
    top: 16px;
    bottom: auto;
    width: 380px;
    max-height: calc(100% - 32px - var(--sab));
  }
  .panel-inner { margin: 0; padding: 20px 22px 22px; }
}
/* Handy quer: wenig Höhe */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 52px; }
  .panel { left: calc(10px + var(--sal)); right: auto; top: 10px; bottom: calc(10px + var(--sab)); width: min(330px, 46vw); max-height: none; }
  .panel-inner { margin: 0; padding: 12px 14px 14px; }
  .street-name { font-size: 1.3rem; }
  .map-tools { top: 8px; gap: 6px; }
  .map-btn { width: 44px; height: 44px; }
}

/* Schmale Handys: Kopfzeile verdichten, Monogramm + © UK bleiben sichtbar */
@media (max-width: 520px) {
  body.in-game .brand-name { display: none; }
  .topbar { gap: 8px; padding-left: calc(10px + var(--sal)); padding-right: calc(6px + var(--sar)); }
  .hud { gap: 6px; }
  .hud-item { padding: 2px 9px; min-width: 50px; }
  .status-pill { display: none; }
}
@media (max-width: 360px) {
  .brand-mark { width: 40px; height: 34px; }
  .hud-item { min-width: 44px; padding: 2px 7px; }
  .hud-label { max-width: 64px; }
}

/* ------------------------------------------------ Leaflet-Anpassungen */
.leaflet-container { font: inherit; background: #EDEAE3; }
.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, .8) !important;
  border-radius: 8px 0 0 0;
  padding: 0 6px;
}
.leaflet-bottom.leaflet-right { margin-bottom: var(--sab); }
.game .leaflet-bottom.leaflet-right { right: var(--sar); }
.pin { background: none; border: 0; }
.pin-body { position: relative; width: 36px; height: 48px; filter: drop-shadow(0 3px 4px rgba(27, 36, 48, .3)); }
.pin-body svg { width: 36px; height: 48px; display: block; }
.pin-body path { fill: var(--pin); stroke: #fff; stroke-width: 2.5; }
.pin-body span {
  position: absolute;
  top: 9px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font: 800 13px/20px var(--font-num);
}
.pin-body span:empty::after {
  content: "";
  display: block;
  width: 10px; height: 10px;
  margin: 5px auto 0;
  border-radius: 50%;
  background: #fff;
}
.pin-drop .pin-body { animation: drop .42s cubic-bezier(.3, 1.4, .5, 1); transform-origin: 50% 100%; }
.round-label span {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font: 800 12px/1 var(--font-num);
  box-shadow: 0 0 0 2px #fff;
}
.street-line { animation: draw 1s ease-out; }

/* ------------------------------------------------ Ergebnis */
.result-hero { text-align: center; padding: 30px 22px; }
.result-hero .eyebrow { justify-content: center; }
.big-score { font-size: clamp(3rem, 14vw, 4.6rem); line-height: 1; color: var(--brand); margin: 6px 0 10px; }
.big-score .of { font-size: .32em; color: var(--muted); margin-left: 8px; font-weight: 700; }
.result-hero .leaderboard { max-width: 420px; margin: 18px auto 0; }
.results-map { height: 300px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
@media (min-width: 760px) { .results-map { height: 380px; } }
.round-list { list-style: none; padding: 0; margin: 0; }
.round-list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.round-list > li:last-child { border-bottom: 0; }
.rl-head { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rl-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .85rem; flex-shrink: 0; }
.rl-street { min-width: 0; overflow-wrap: anywhere; }
.rl-players { list-style: none; margin: 6px 0 0 36px; padding: 0; }
.rl-players li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.rl-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-dist { color: var(--muted); margin-right: auto; }
.rl-pname + .rl-dist { margin-right: 0; }
.rl-pts { min-width: 54px; text-align: right; }

/* ------------------------------------------------ Dialog & Toast */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27, 36, 48, .38);
  animation: fade .15s ease-out;
}
.dialog {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: rise .2s ease-out;
}
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.toast {
  position: fixed;
  z-index: 3000;
  left: 50%;
  top: calc(var(--header-h) + var(--sat) + 10px);
  transform: translate(-50%, -12px);
  width: max-content;
  max-width: min(92vw, 460px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: .94rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }
.toast-ok { background: var(--ok); }

/* ------------------------------------------------ Animationen */
.view-enter { animation: rise .3s ease-out; }
.round-enter { animation: settle .32s ease-out; }
@keyframes settle { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.05); } 100% { transform: none; } }
@keyframes drop { 0% { transform: translateY(-18px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.leaflet-tooltip.street-tip {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 4px 9px;
  font-weight: 700;
  font-size: .85rem;
  box-shadow: var(--shadow);
}
.leaflet-tooltip.street-tip::before { border-top-color: var(--brand); }
.map-btn[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.map-btn[hidden] { display: none; }

/* Wasserzeichen auf der Karte */
.watermark {
  position: absolute;
  z-index: 450;
  left: calc(12px + var(--sal));
  bottom: calc(10px + var(--sab));
  width: 64px;
  height: 54px;
  color: #111;
  opacity: .16;
  pointer-events: none;
}
.results-map { position: relative; }
.results-map .watermark { left: 10px; bottom: 8px; width: 48px; height: 40px; }

/* ------------------------------------------------ Spielart-Auswahl */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.variant-picker {
  border: 0;
  padding: 0;
  margin: 8px auto 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 460px;
}
.friends .variant-picker { margin: 4px 0 4px; }
.variant-option { position: relative; cursor: pointer; }
.variant-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variant-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  height: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  transition: border-color .15s, background-color .15s;
}
.variant-box svg { width: 26px; height: 26px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.variant-text { display: flex; flex-direction: column; line-height: 1.25; }
.variant-text strong { font-size: .95rem; }
.variant-text small { font-size: .78rem; color: var(--muted); }
.variant-option input:checked + .variant-box { border-color: var(--brand); background: var(--brand-soft); }
.variant-option input:checked + .variant-box svg { stroke: var(--brand); }
.variant-option input:focus-visible + .variant-box { outline: 3px solid #2F6BD8; outline-offset: 2px; }
@media (max-width: 360px) { .variant-box svg { display: none; } }
.sub-h { font-size: 1rem; margin: 18px 0 6px; }

/* ------------------------------------------------ Zeichenmodus */
.map-draw.leaflet-container { background: #F3F1EC; }
.map.pen-on.leaflet-container { cursor: crosshair; }
.draw-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.draw-actions .btn { padding: 0 10px; color: var(--ink-2); border-color: var(--line); }
.reveal-stats-3 { grid-template-columns: repeat(3, 1fr); }
.reveal-stats-3 .stat-value { font-size: 1.25rem; }
.stat-sub { display: block; font-size: .74rem; color: var(--muted); }
@media (max-width: 380px) { .reveal-stats-3 .stat-value { font-size: 1.05rem; } .reveal-stats-3 > div { padding: 8px; } }
.reveal-stats-3 { gap: 8px; }
.reveal-stats-3 > div { padding: 8px 10px; min-width: 0; }
.reveal-stats-3 .stat-label { font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reveal-stats-3 .stat-value { font-size: 1.12rem; white-space: nowrap; }
/* Hochformat: Panel liegt unten → Wasserzeichen oben links; breit/quer: Panel links oben → unten links */
.game .watermark { top: 12px; bottom: auto; }
@media (min-width: 760px) and (orientation: landscape), (min-width: 900px), (max-height: 500px) and (orientation: landscape) {
  .game .watermark { top: auto; bottom: calc(10px + var(--sab)); left: auto; right: calc(64px + var(--sar)); }
}

/* ------------------------------------------------ Ton-Schalter */
#btn-sound { margin-left: auto; }
.hud:not([hidden]) ~ #btn-sound { margin-left: 0; }
#btn-sound .mute { display: none; }
#btn-sound[aria-pressed="false"] .wave { display: none; }
#btn-sound[aria-pressed="false"] .mute { display: inline; }
#btn-sound[aria-pressed="false"] { color: var(--muted); }
@media (max-width: 360px) { #btn-sound, #btn-quit { width: 40px; } }

/* ------------------------------------------------ Tipps im Zeichenmodus */
.hint-shop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.hint-shop-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 2px; }
.hint-cost { color: var(--accent-ink); font-weight: 700; }
.leaflet-overlay-pane .hint-flash { animation: hintBlink 3s ease-in-out forwards; }
@keyframes hintBlink {
  0% { opacity: 0; } 10% { opacity: 1; } 25% { opacity: .35; } 40% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .leaflet-overlay-pane .hint-flash { animation: none !important; }
}
.hint-shop .toolbar-spacer { flex: 1; }
.icon-btn-tool { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.icon-btn-tool:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn-tool svg { width: 19px; height: 19px; stroke-width: 2; stroke-linejoin: round; }
@media (max-width: 440px) {
  .hint-shop-label { display: none; }
}

/* ------------------------------------------------ Rechtliches */
.page-footer { flex-direction: column; align-items: center; gap: 6px; }
.results .page-footer { padding-top: 0; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: .9rem; }
.legal-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); }
.legal-note { font-size: .8rem; color: var(--muted); margin: 0; text-align: center; }
.legal-card h3 { font-size: 1rem; margin: 18px 0 6px; }
.legal-card address { font-style: normal; margin-bottom: .9em; line-height: 1.6; }
.legal-card { scroll-margin-top: calc(var(--header-h) + var(--sat) + 12px); overflow-wrap: anywhere; }
.placeholder { color: var(--danger); font-weight: 600; }
.legal code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* ------------------------------------------------ Logo: nur klein neben dem Titel */
.brand-mark { width: 30px; height: 26px; }
.brand-copy { letter-spacing: .01em; font-weight: 600; }
.lockup { display: inline-flex; align-items: center; gap: 14px; margin: 6px auto 14px; text-align: left; }
.lockup-mark { width: 44px; height: 37px; color: #111; flex-shrink: 0; }
.lockup h1 { margin: 0; line-height: 1.05; }
.lockup-sub { margin: 4px 0 0; font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 380px) { .lockup { gap: 10px; } .lockup-mark { width: 34px; height: 29px; } }
/* Spiel auf schmalen Handys: nur das kleine Logo in der Kopfzeile */
@media (max-width: 520px) { body.in-game .brand-text { display: none; } }
@media (max-width: 360px) { .brand-mark { width: 28px; height: 24px; } }

/* ------------------------------------------------ Schalter (Musik & Ton, Spieloptionen) */
.switch { position: relative; width: 42px; height: 26px; border-radius: 99px; background: #CFC9BE; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
[aria-checked="true"] > .switch { background: var(--brand); }
[aria-checked="true"] > .switch::after { transform: translateX(16px); }

/* ------------------------------------------------ Tages-Challenge & Rangliste */
.btn-daily { flex-direction: column; gap: 0; line-height: 1.15; }
.btn-daily small { font-size: .74rem; font-weight: 600; color: var(--muted); }
.text-link { align-self: center; display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 18px; background: #ECE8DF; border-radius: 12px; }
.segmented a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; color: var(--ink-2); font-weight: 650; text-decoration: none; }
.segmented a[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(27,36,48,.1); }
.rank-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.rank-head h2 { margin: 0; }
.countdown { margin: 0; font-size: .86rem; font-weight: 600; color: var(--brand); }
.rank-list { margin-top: 12px; }
.ranking .card > .btn { margin-top: 6px; }
.winner-list { list-style: none; padding: 0; margin: 0; }
.winner-list li { display: flex; gap: 12px; align-items: baseline; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.winner-list li:last-child { border-bottom: 0; }
.winner-list .muted { min-width: 92px; font-size: .9rem; }
.form-error { color: var(--danger); font-weight: 600; margin: -6px 0 10px; }
.daily-rank { font-size: 1.05rem; }
.daily-rank .num { font-size: 1.4rem; color: var(--brand); margin-right: 4px; }
.loading-inline { min-height: 120px; }

/* ------------------------------------------------ Ortswahl */
.town-picker { border: 0; padding: 0; margin: 4px auto 14px; width: 100%; max-width: 680px; }
.town-legend { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 auto 8px; padding: 0; text-align: center; }
.ranking .town-legend, .ranking .town-picker { text-align: left; margin-left: 0; }
.town-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ranking .town-chips { justify-content: flex-start; }
.town-chip { position: relative; cursor: pointer; }
.town-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.town-chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 650; color: var(--ink-2); transition: background-color .15s, border-color .15s;
}
.town-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.town-chip input:focus-visible + span { outline: 3px solid #2F6BD8; outline-offset: 2px; }
.town-loading {
  position: fixed; inset: 0; z-index: 2500; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: rgba(246, 244, 239, .82); color: var(--ink-2); font-weight: 600;
}
.ranking h1 .muted { font-weight: 700; }

/* ------------------------------------------------ Ortswahl (Dropdown) & Titelzeile */
.brand-text { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 6px; }
.brand-copy { font-size: .9rem; color: var(--ink-2); }
.brand-copy::before { content: "– "; }
@media (max-width: 560px) {
  .brand-text { flex-direction: column; align-items: flex-start; }
  .brand-copy { font-size: .74rem; color: var(--muted); }
  .brand-copy::before { content: none; }
}
.town-select { position: relative; display: inline-flex; align-items: center; }
.town-select select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 1.5px solid #CFC8BB;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* kein Auto-Zoom in iOS Safari */
  font-weight: 700;
  cursor: pointer;
}
.town-select select:hover { border-color: var(--brand); }
.town-select select:focus-visible { outline: 3px solid #2F6BD8; outline-offset: 2px; }
.town-select-chevron { position: absolute; right: 12px; width: 18px; height: 18px; pointer-events: none; fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lockup-sub { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lockup-dash { font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.town-select-title select { font-size: 1.05rem; background: var(--brand-soft); border-color: #B9D3CD; color: var(--brand); }
.town-select-block { margin: 0 0 14px; }
.ranking .segmented { margin-top: 0; }
@media (min-width: 720px) {
  .lockup { gap: 16px; }
  .lockup-text { display: flex; align-items: center; flex-wrap: wrap; column-gap: 12px; }
  .lockup-sub { margin-top: 0; }
}

/* ------------------------------------------------ Startseite (aufgeräumt) */
body.on-home .brand-copy { display: none; }
.home { padding-top: 24px; }
.home-main {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.home-title {
  font-size: clamp(1.3rem, 5.75vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 8px 0 22px;
}
.town-select-home { display: flex; width: 100%; }
.town-select-home select {
  width: 100%;
  min-height: 58px;
  padding: 0 52px 0 20px;
  font-size: 1.2rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1.5px solid var(--brand);
  border-radius: 16px;
}
.town-select-home .town-select-chevron { right: 20px; width: 22px; height: 22px; }
.home-lead { color: var(--ink-2); font-size: 1.05rem; margin: 18px auto 20px; max-width: 36ch; }

.variant-picker-compact { max-width: none; margin: 0 0 20px; gap: 14px; }
.variant-picker-compact .variant-box {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 14px 10px;
  border-radius: 18px;
  text-align: center;
  border-width: 1.5px;
}
.variant-picker-compact .variant-box svg { width: 32px; height: 32px; stroke-width: 2.2; }
.variant-picker-compact .variant-text strong { font-size: 1.08rem; }
.variant-picker-compact .variant-option input:checked + .variant-box { border-color: var(--brand); }
@media (max-width: 360px) { .variant-picker-compact .variant-box svg { display: block; } }

.btn-xl { min-height: 64px; font-size: 1.28rem; border-radius: 16px; }
.home-main > .btn + .btn { margin-top: 12px; }
.home-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.home-pair .btn { min-height: 58px; padding: 0 10px; font-size: 1.05rem; border-radius: 14px; }
.home-link { margin-top: 14px; font-size: 1.05rem; }
.home-meta { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.home .install-hint { max-width: 460px; margin: 22px auto 0; }
.home .page-footer { margin-top: 28px; }
.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: .9rem;
  text-decoration: underline;
  cursor: pointer;
}
.dialog { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 360px) {
  .home-pair .btn { font-size: .92rem; padding: 0 6px; }
  .variant-picker-compact .variant-text strong { font-size: .98rem; }
}
@media (min-width: 640px) {
  .home-title { margin-left: -120px; margin-right: -120px; }
}


/* ------------------------------------------------ Start-Animation (Titel → Nadel → Ortsauswahl) */
html.intro-active, html.intro-active body { overflow: hidden; }
.intro {
  --nw: clamp(84px, 22vw, 140px);                 /* Breite der Nadel */
  --nh: calc(var(--nw) * 1.607);                  /* Höhe der Nadel (Seitenverhältnis 122:196) */
  --ph: clamp(58px, 15vw, 74px);                  /* Höhe der Ort-Pille */
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
  background: #F6F5F1;
  color: #111;
  transition: opacity .45s ease;
}
.intro-out { opacity: 0; pointer-events: none; }
.intro-main { display: flex; flex-direction: column; align-items: center; transform: translateY(-4vh); }
.intro-title {
  margin: 0;
  font: 900 clamp(64px, 22vw, 150px)/1 var(--font);
  letter-spacing: -.035em;
  white-space: nowrap;
  color: #111;
}
.intro-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em) scale(.94);
  filter: blur(10px);
}
.intro-title .sp { display: inline-block; width: .26em; }
.intro.run .intro-title .ch {
  animation: introChar .75s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--i) * 45ms + 80ms);
}
@keyframes introChar { to { opacity: 1; transform: none; filter: blur(0); } }
/* Zusatz unter dem Namen – nur in der Start-Animation */
.intro-tagline { margin: 4px 0 clamp(26px, 5vh, 54px); font: 750 clamp(19px, 5.6vw, 34px)/1.15 var(--font); letter-spacing: -.01em; color: #111; opacity: 0; transform: translateY(6px); }
.intro.run .intro-tagline { animation: introTag .5s ease-out .42s forwards; }
@keyframes introTag { to { opacity: 1; transform: none; } }
.intro.static .intro-tagline { opacity: 1; transform: none; animation: none; }

.intro-zone { position: relative; width: min(84vw, 460px); height: calc(var(--nh) + var(--nw) * .2); }
.intro-needle {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--nw);
  height: var(--nh);
  margin-left: calc(var(--nw) / -2);
  transform-origin: 50% 98%;
  opacity: 0;
}
.intro-needle svg, .intro-pill-icon { display: block; width: 100%; height: 100%; fill: #111; }
.intro-shadow {
  position: absolute;
  left: 50%;
  top: calc(var(--nh) * .98 - var(--nw) * .13);
  width: calc(var(--nw) * 1.15);
  height: calc(var(--nw) * .26);
  margin-left: calc(var(--nw) * -.575);
  fill: none;
  stroke: #111;
  stroke-width: 5;
  opacity: 0;
}
.intro.fall .intro-needle { opacity: 1; animation: introNeedle 1.1s both; }
.intro.fall .intro-shadow { animation: introShadowIn 1.1s both; }
@keyframes introNeedle {
  0% { transform: translateY(-115vh); animation-timing-function: cubic-bezier(.55, 0, .9, .5); }
  45% { transform: translateY(0); }
  52% { transform: scale(1.08, .86); }
  60% { transform: scale(1); }
  70% { transform: rotate(9deg); }
  82% { transform: rotate(-6deg); }
  92% { transform: rotate(2deg); }
  100% { transform: none; }
}
@keyframes introShadowIn {
  0%, 20% { opacity: 0; transform: scale(.3); }
  45% { opacity: 1; transform: scale(1); }
  52% { transform: scale(1.18); }
  60%, 100% { opacity: 1; transform: scale(1); }
}

/* Die Pille "Ort auswählen" – entsteht aus der Nadel */
.intro-pill {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--nh) * .316 - var(--ph) / 2);    /* auf Höhe des Nadelkopfs */
  height: var(--ph);
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.5vw, 18px);
  padding: 0 clamp(18px, 5vw, 26px) 0 clamp(22px, 6vw, 30px);
  border: 2.5px solid #111;
  border-radius: 999px;
  background: #F6F5F1;
  opacity: 0;
  clip-path: inset(0 calc(100% - var(--ph)) 0 0 round 999px);
  transition: clip-path .6s cubic-bezier(.65, 0, .35, 1), opacity .2s ease;
}
.intro-pill-icon { width: auto; height: 52%; flex-shrink: 0; opacity: 0; transition: opacity .15s; }
.intro-pill-text {
  flex: 1;
  font: 700 clamp(19px, 5.4vw, 26px)/1 var(--font);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .35s ease .35s, transform .35s ease .35s;
}
.intro-pill-chevron { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: #111; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .3s ease .45s; }
.intro-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  font-size: 16px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.intro-select:disabled { cursor: default; }
.intro.morph .intro-pill { opacity: 1; clip-path: inset(0 0 0 0 round 999px); }
.intro.morph .intro-pill-text, .intro.morph .intro-pill-chevron { opacity: 1; transform: none; }
.intro.morph .intro-shadow { opacity: 0; transition: opacity .3s; animation: none; }
.intro.picked .intro-pill { background: #fff; }
.intro-pill:focus-within { outline: 3px solid #2F6BD8; outline-offset: 4px; }
.intro.ready .intro-pill-icon { opacity: 1; }
.intro.ready .intro-needle { opacity: 0; transition: opacity .12s; animation: none; }

.intro-powered {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(4.5vh + var(--sab));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: 700 14px/1 var(--font);
  color: #111;
  opacity: 0;
  transition: opacity .6s ease .6s;
}
.intro-powered svg { width: 46px; height: 39px; color: #111; }
.intro.run .intro-powered { opacity: 1; }

/* Bewegung reduziert: Endzustand sofort */
.intro.static .intro-title .ch { opacity: 1; transform: none; filter: none; animation: none; }
.intro.static .intro-powered { opacity: 1; transition: none; }
.intro.static .intro-pill { opacity: 1; clip-path: none; transition: none; }
.intro.static .intro-pill-icon, .intro.static .intro-pill-text, .intro.static .intro-pill-chevron { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }

/* ------------------------------------------------ Menü (Startseite) */
.menu {
  --m-tile: #E8EDE8;
  --m-tile-on: #DCE6DE;
  --m-green: #2F5D4A;
  --m-green-soft: #5E8B6E;
  max-width: 480px;
  margin: 0 auto;
  padding-top: 18px;
  padding-bottom: 0;
}
body.on-home { background: #F6F5F1; }
body.on-home .topbar { background: rgba(246, 245, 241, .94); border-bottom-color: transparent; }
body.on-home .brand-mark { width: 44px; height: 37px; }
body.on-home .brand-name { font-size: 1.3rem; }

.menu-daily-icon { fill: none; stroke: var(--m-green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.menu-resume { margin-top: 12px; }
.menu-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 74px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--m-green);
  color: #fff;
  font: 800 clamp(1.5rem, 7vw, 1.9rem)/1 var(--font);
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 93, 74, .22);
  transition: background-color .15s, transform .1s;
}
.menu-play:hover { background: #264E3E; }
.menu-play:active { transform: scale(.98); }
.menu-play svg { width: 30px; height: 30px; fill: #fff; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 66px;
  padding: 0 6px 0 10px;
  border: 0;
  border-bottom: 1px solid #DDE0DA;
  background: none;
  color: var(--ink);
  font: 800 clamp(1.1rem, 5vw, 1.3rem)/1 var(--font);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.menu-row:hover { background: rgba(47, 93, 74, .05); }
.menu-row span { flex: 1; }
.menu-row-chevron { width: 24px; height: 24px; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.menu .page-footer { margin-top: 18px; padding-bottom: 0; }
.menu .legal-dot { color: var(--muted); }
.menu .install-hint { margin: 18px 0 0; }
.menu-skyline {
  display: block;
  width: calc(100% + 36px + var(--sal) + var(--sar));
  height: 76px;
  margin: 10px calc(-18px - var(--sar)) calc(-32px - var(--sab)) calc(-18px - var(--sal));
}
@media (min-width: 640px) { .menu-skyline { width: 100%; margin-left: 0; margin-right: 0; } }

.help-steps { padding-left: 1.2em; margin: 0 0 1em; }
.help-steps > li { margin-bottom: .6em; }
.help-steps .plain-list { margin: .4em 0 0; }
@media (max-width: 370px) {
}

/* ------------------------------------------------ Lob nach guter Runde (Stil wie Start-Animation) */
.celebrate {
  position: absolute;
  inset: 0;
  z-index: 750; /* über Karte und Rundenpanel, unter dem Weitergabe-Bildschirm */
  display: grid;
  place-items: center;
  background: rgba(246, 245, 241, .55);
  cursor: pointer;
  animation: celebrateIn .2s ease-out both;
  -webkit-tap-highlight-color: transparent;
}
.celebrate-out { opacity: 0; transition: opacity .25s ease; }
.celebrate-stage { position: relative; display: flex; flex-direction: column; align-items: center; transform: translateY(-8vh); }
.celebrate-pin {
  width: 64px;
  height: 103px;
  transform-origin: 50% 98%;
  animation: celebratePin .85s both;
}
.celebrate-pin svg { display: block; width: 100%; height: 100%; fill: #111; }
.celebrate-burst { position: absolute; left: 50%; top: 101px; width: 0; height: 0; }
.celebrate-ring {
  position: absolute;
  left: -46px;
  top: -14px;
  width: 92px;
  height: 28px;
  border: 3px solid var(--m-green, #2F5D4A);
  border-radius: 50%;
  opacity: 0;
  animation: celebrateRing .7s ease-out .4s both;
}
.celebrate-burst i {
  position: absolute;
  left: -4px;
  top: -6px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  animation: celebrateConfetti .9s cubic-bezier(.15, .7, .3, 1) calc(.4s + var(--d)) both;
}
.celebrate-text {
  margin: 22px 0 4px;
  font: 800 clamp(2rem, 9vw, 2.8rem)/1.05 var(--font);
  letter-spacing: -.03em;
  color: #111;
  opacity: 0;
  animation: celebrateText .45s cubic-bezier(.2, .9, .25, 1.25) .5s both;
}
.celebrate-sub {
  margin: 0;
  font-size: 1.05rem;
  color: var(--m-green, #2F5D4A);
  opacity: 0;
  animation: celebrateIn .3s ease-out .7s both;
}
@keyframes celebrateIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes celebratePin {
  0% { transform: translateY(-70vh); animation-timing-function: cubic-bezier(.55, 0, .9, .5); }
  47% { transform: translateY(0); }
  57% { transform: scale(1.1, .82); }   /* Aufprall: stauchen */
  68% { transform: translateY(-10px) scale(.96, 1.06); } /* strecken, kleines Nachfedern */
  80% { transform: translateY(0) scale(1.02, .97); }
  100% { transform: none; }
}
@keyframes celebrateRing { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes celebrateConfetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 40px)) rotate(var(--r)); }
}
@keyframes celebrateText { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
/* Bewegung reduziert: nur einfaches Einblenden, keine Bewegung */
@media (prefers-reduced-motion: reduce) {
  .celebrate-pin, .celebrate-text, .celebrate-sub { animation: celebrateIn .3s ease-out both !important; }
  .celebrate-burst { display: none; }
}

/* ------------------------------------------------ Menükopf: Logo klein neben dem Namen, Kopf flacher */
body.on-home { --header-h: 52px; }
body.on-home .brand { gap: 8px; }
body.on-home .brand-mark { display: block; width: 31px; height: 26px; } /* Seitenverhältnis 345:292 */
body.on-home .brand-name { font-size: 1.25rem; line-height: 1; }
body.on-home .brand-text { align-self: center; }

/* ------------------------------------------------ Logo als Signatur ganz unten (statt im Kopf) */
.brand-mark { display: none; }
.signature {
  display: flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  min-height: 44px;            /* Tippfläche */
  margin: 8px auto 0;
  padding: 6px 12px calc(10px + var(--sab));
  color: #111;
  opacity: .55;
  transition: opacity .15s;
}
.signature:hover, .signature:focus-visible { opacity: .9; }
.signature svg { width: 28px; height: 24px; display: block; } /* Seitenverhältnis 345:292 */
/* Startseite: Signatur auf dem grünen Boden der Ortssilhouette */
body.on-home .menu-skyline { margin-bottom: 0; }
body.on-home .signature {
  width: auto;
  margin: 0 calc(-1 * var(--sar)) 0 calc(-1 * var(--sal));
  background: #CFDED3;
}
body.on-home main { padding-bottom: 0; }
/* Spiel: eigener schmaler Streifen unter der Karte – überdeckt nichts */
/* Spiel: Karte bis zum unteren Rand. Quellenhinweis als dezente Zeile auf dem Kartenrand,
   Logo klein unten links in der Safe-Area – kein eigener Streifen. */
.game { bottom: 0; }
.signature-game {
  position: fixed; left: calc(4px + var(--sal)); bottom: calc(1px + var(--sab)); z-index: 900;
  width: auto; height: auto; min-height: 0; margin: 0; padding: 3px 5px; background: none; border: 0; opacity: 1;
}
.signature-game svg { width: 18px; height: 16px; opacity: .45; }
.game .leaflet-bottom.leaflet-right { margin-bottom: var(--sab); }
.game .leaflet-control-attribution { font-size: 9px; line-height: 1.6; padding: 0 5px; background: rgba(255, 255, 255, .72) !important; }
.game .panel { bottom: calc(20px + var(--sab)); max-height: 62%; }
@media (max-height: 500px) and (orientation: landscape) { .game .panel { bottom: calc(18px + var(--sab)); max-height: calc(100% - 24px); } }

/* ---------------------------------------------------------------- Ortssuche (js/search.js) */
.town-search-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px 0 16px;
  border: 1.5px solid #CFC8BB; border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.town-search-btn:hover { border-color: var(--brand); }
.town-search-btn:focus-visible { outline: 3px solid #2F6BD8; outline-offset: 3px; }
.town-search-btn .town-select-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.town-search-btn .town-select-chevron { position: static; }

.tsearch { position: fixed; inset: 0; z-index: 9500; }
.tsearch-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 32, .35); opacity: 0; transition: opacity .16s; }
.tsearch-panel {
  position: absolute; left: 0; right: 0; top: 0; max-height: 100%;
  margin: 0 auto; max-width: 560px; display: flex; flex-direction: column;
  padding: calc(10px + var(--sat)) calc(12px + var(--sar)) 0 calc(12px + var(--sal));
  background: var(--bg); border-radius: 0 0 22px 22px; box-shadow: 0 18px 40px rgba(17, 24, 32, .22);
  transform: translateY(-16px); opacity: 0; transition: transform .18s ease, opacity .16s ease;
}
/* Mit Bildschirmtastatur: Höhe an den sichtbaren Bereich koppeln (dvh), Liste scrollt */
@supports (height: 100dvh) { .tsearch-panel { max-height: 100dvh; } }
.tsearch.is-open .tsearch-backdrop { opacity: 1; }
.tsearch.is-open .tsearch-panel { transform: none; opacity: 1; }
.tsearch.is-leaving .tsearch-backdrop, .tsearch.is-leaving .tsearch-panel { opacity: 0; }
html.tsearch-open, html.tsearch-open body { overflow: hidden; }
.tsearch-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.tsearch-field {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px;
  border: 2px solid #111; border-radius: 999px; background: #fff;
}
.tsearch-field:focus-within { outline: 3px solid #2F6BD8; outline-offset: 2px; }
.tsearch-field svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #111; stroke-width: 2.4; stroke-linecap: round; }
.tsearch-field input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--ink);
  font: 700 18px/1 var(--font); outline: none; -webkit-appearance: none; appearance: none;
}
.tsearch-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.tsearch-field input::placeholder { color: #8A8F98; font-weight: 600; }
.tsearch-close { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.tsearch-close svg { width: 22px; height: 22px; fill: none; stroke: #111; stroke-width: 2.4; stroke-linecap: round; }
.tsearch-close:focus-visible { outline: 3px solid #2F6BD8; }
.tsearch-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(14px + var(--sab)); }
.tsearch-h { margin: 10px 6px 4px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tsearch-ul { list-style: none; margin: 0; padding: 0; }
.tsearch-item { display: flex; align-items: center; border-radius: 14px; }
.tsearch-item + .tsearch-item { border-top: 1px solid rgba(27, 36, 48, .07); }
.tsearch-opt {
  flex: 1; min-width: 0; min-height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.tsearch-opt:hover, .tsearch-opt:focus-visible { background: #fff; outline: none; box-shadow: inset 0 0 0 2px #2F6BD8; }
.tsearch-name { font-size: 1.05rem; font-weight: 800; }
.tsearch-plz { font-weight: 600; color: var(--muted); font-size: .9rem; }
.tsearch-sub { font-size: .85rem; color: var(--muted); }
.tsearch-item.is-current .tsearch-name::after { content: ' ✓'; color: var(--brand); }
.tsearch-fav { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.tsearch-fav svg { width: 22px; height: 22px; fill: none; stroke: #9AA0A8; stroke-width: 1.8; stroke-linejoin: round; }
.tsearch-fav[aria-pressed="true"] svg { fill: #E8B230; stroke: #C99412; }
.tsearch-fav:focus-visible { outline: 3px solid #2F6BD8; }
.tsearch-hint, .tsearch-empty { margin: 14px 8px; color: var(--muted); font-size: .92rem; }
.tsearch-empty { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .tsearch-panel, .tsearch-backdrop { transition: none; } }

/* ---------------------------------------------------------------- Musik & Ton (Bottom-Sheet, js/music-ui.js) */
#btn-sound.is-music .wave { stroke: var(--brand); }
#btn-sound.is-music { color: var(--brand); }
.msheet { position: fixed; inset: 0; z-index: 3500; }
.msheet-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 32, .4); opacity: 0; transition: opacity .2s; }
.msheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  max-height: min(86vh, 760px); display: flex; flex-direction: column; overflow: hidden;
  padding: 6px calc(14px + var(--sar)) calc(8px + var(--sab)) calc(14px + var(--sal));
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(17, 24, 32, .25);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
@supports (height: 100dvh) { .msheet-panel { max-height: min(86dvh, 760px); } }
.msheet.is-open .msheet-backdrop { opacity: 1; }
.msheet.is-open .msheet-panel { transform: none; }
.msheet.is-leaving .msheet-backdrop { opacity: 0; }
.msheet.is-leaving .msheet-panel { transform: translateY(100%); }
html.msheet-open, html.msheet-open body { overflow: hidden; }
.msheet-grip { width: 40px; height: 5px; margin: 4px auto 2px; border-radius: 3px; background: #CFC9BE; }
.msheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msheet-head h2 { margin: 0; font-size: 1.2rem; }
.msheet-head h2:focus { outline: none; }
.msheet-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.msheet-x svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.msheet-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 2px 0 8px; }
.msheet-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 10px;
  border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer;
}
.msheet-switch:disabled { opacity: .5; cursor: default; }
.msheet-vol { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 12px; background: var(--surface); font-weight: 650; }
.msheet-vol span { white-space: nowrap; }
.msheet-vol input { flex: 1; min-width: 0; height: 44px; accent-color: var(--brand); }
.msheet-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.msheet-chips::-webkit-scrollbar { display: none; }
.msheet-chip { flex-shrink: 0; min-height: 36px; padding: 0 14px; border: 1.5px solid #CFC8BB; border-radius: 99px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; }
.msheet-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.msheet-list { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 14px; background: var(--surface); }
.msheet-loading { padding: 16px; color: var(--muted); }
.msheet-row { display: flex; align-items: center; border-bottom: 1px solid rgba(27, 36, 48, .07); }
.msheet-row:last-child { border-bottom: 0; }
.msheet-pick { flex: 1; min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.msheet-check { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border: 2px solid #CFC8BB; border-radius: 50%; }
.msheet-check svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.is-selected .msheet-check { background: var(--brand); border-color: var(--brand); }
.is-selected .msheet-check svg { opacity: 1; }
.msheet-text { display: flex; flex-direction: column; min-width: 0; }
.msheet-title { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet-sub { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet-play { width: 44px; height: 44px; margin-right: 6px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2, #F1EEE7); cursor: pointer; }
.msheet-play svg { width: 18px; height: 18px; fill: var(--ink); }
.msheet-play.is-on { background: var(--brand); }
.msheet-play.is-on svg { fill: #fff; }
.msheet-pick:focus-visible, .msheet-play:focus-visible, .msheet-chip:focus-visible, .msheet-switch:focus-visible, .msheet-x:focus-visible { outline: 3px solid #2F6BD8; outline-offset: -3px; }
.msheet-foot { margin: 8px 0 0; text-align: center; }
.msheet-credits { position: absolute; inset: 0; padding: 6px calc(14px + var(--sar)) calc(14px + var(--sab)) calc(14px + var(--sal)); background: var(--bg); overflow-y: auto; }
.msheet-credit-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 370px) { .msheet-controls { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .msheet-panel, .msheet-backdrop { transition: none; } }
.msheet-chips, .msheet-controls, .msheet-head, .msheet-foot { flex-shrink: 0; }
.msheet-switch span:first-child { white-space: nowrap; font-size: .95rem; }

/* ---------------------------------------------------------------- Datums-Überraschungen (js/seasonal.js) */
.season { position: fixed; inset: 0; z-index: 2900; pointer-events: none; overflow: hidden; }
body.in-game .season { display: none; } /* im Spiel nichts, was vom Pin-Setzen ablenkt */
.season i { position: absolute; top: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0; animation: seasonBurst 1.8s ease-out var(--d) forwards; }
.season-snow i { background: #fff; box-shadow: 0 0 2px rgba(27, 36, 48, .3); }
.season-confetti i { background: var(--c); border-radius: 1px; width: calc(var(--s) * .6); }
.season-dots i { background: var(--c); }
.season-eggs i { height: calc(var(--s) * 1.3); border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: var(--c); }
@keyframes seasonBurst { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .8; } 80% { opacity: .6; } 100% { opacity: 0; transform: translate(14px, 38vh) rotate(160deg); } }
.season-greet {
  position: fixed; left: 50%; top: calc(var(--header-h) + var(--sat) + 8px); z-index: 2950; max-width: calc(100% - 32px); margin: 0; padding: 7px 14px;
  border-radius: 99px; background: var(--brand-soft, #E4EFEA); color: var(--brand); font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translateX(-50%); box-shadow: 0 2px 8px rgba(27, 36, 48, .12); animation: rise .25s ease-out both; transition: opacity .35s; pointer-events: none;
}
.season-greet.is-out { opacity: 0; }
/* Mütze bzw. Partyhut auf dem Pin (Karte, Lob-Animation, Start-Animation) */
.hat-santa .pin-body::after, .hat-party .pin-body::after,
.hat-santa .celebrate-pin::after, .hat-party .celebrate-pin::after,
.hat-santa .intro-needle::after, .hat-party .intro-needle::after {
  content: ""; position: absolute; left: 50%; top: -34%; width: 62%; height: 52%; transform: translateX(-38%) rotate(14deg);
  background: no-repeat center / contain; pointer-events: none;
}
.celebrate-pin { position: relative; }
.hat-santa .pin-body::after, .hat-santa .celebrate-pin::after, .hat-santa .intro-needle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M6 32 Q14 6 30 6 Q36 14 34 24 L32 30z' fill='%23D7263D'/%3E%3Crect x='3' y='29' width='32' height='8' rx='4' fill='%23fff'/%3E%3Ccircle cx='34' cy='24' r='4.5' fill='%23fff'/%3E%3C/svg%3E");
}
.hat-party .pin-body::after, .hat-party .celebrate-pin::after, .hat-party .intro-needle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M8 36 L20 4 L32 36z' fill='%232F6BD8'/%3E%3Cpath d='M12 26 L28 26 M15 18 L25 18' stroke='%23E8B04A' stroke-width='3'/%3E%3Ccircle cx='20' cy='4' r='3.5' fill='%23E4572E'/%3E%3C/svg%3E");
}
html.intro-active .season { z-index: 9100; } /* auch über der Start-Animation */

/* ---------------------------------------------------------------- Spieloptionen (Startseite + Sheet) */
.menu-options {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; margin: 14px 0 0; padding: 0 12px 0 16px;
  border: 1.5px solid var(--m-tile-on); border-radius: 16px; background: transparent; color: var(--ink);
  font: 700 1rem/1.2 var(--font); text-align: left; cursor: pointer;
}
.menu-options:hover { background: var(--m-tile); }
.menu-options:focus-visible { outline: 3px solid #2F6BD8; outline-offset: 3px; }
.menu-options span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-options-icon { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: var(--m-green); stroke-width: 2; stroke-linecap: round; }
.menu-options .menu-row-chevron { width: 20px; height: 20px; }
.menu-options + .menu-play { margin-top: 14px; }
.menu-hint { margin: 8px 4px 0; font-size: .9rem; color: var(--muted); }
.menu-hint .link-btn { font-weight: 700; }

.opts-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 6px; }
.opts-group { margin: 4px 0 14px; }
.opts-label { display: block; margin: 0 2px 6px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opts-seg { display: flex; margin: 0; }
.opts-seg button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 46px; padding: 4px 8px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 700 .98rem/1.1 var(--font); cursor: pointer;
}
.opts-seg button small { font-size: .74rem; font-weight: 600; color: var(--muted); }
.opts-seg button[aria-checked="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(27, 36, 48, .1); }
.opts-seg button:focus-visible { outline: 3px solid #2F6BD8; outline-offset: -2px; }
.opts-note { margin: 6px 2px 0; font-size: .86rem; color: var(--muted); }
.opts-chips { padding-bottom: 0; flex-wrap: wrap; }
.opts-switch { width: 100%; margin: 0 0 10px; text-align: left; }
.opts-switch small, .opts-nearby small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.opts-nearby { min-height: 58px; border: 0; border-radius: 12px; background: var(--surface); font-size: 1rem; padding: 0 10px 0 12px; }

/* ---------------------------------------------------------------- Herausforderung, perfektes Spiel */
.duel-intro h1 { margin: 6px 0 8px; }
.duel-intro .btn-large { margin-top: 12px; }
.duel-result { margin: 12px auto 0; padding: 12px 14px; max-width: 360px; border-radius: 14px; background: var(--surface-2); text-align: center; animation: rise .35s ease-out both; }
.duel-result span { display: inline-block; margin: 0 10px; font-weight: 650; }
.duel-result p { margin: 6px 0 0; font-weight: 800; color: var(--ink); }
.duel-won { background: var(--brand-soft, #E4EFEA); }
.duel-won p { color: var(--brand); }
.badge-perfect { background: #FFF1CF; color: #7A5300; }
.celebrate-perfect .celebrate-pin { animation: celebratePin .85s both, perfectLap 1.1s cubic-bezier(.5, 0, .3, 1) .85s both, perfectWave .5s ease-in-out 1.95s 2; transform-origin: 50% 90%; }
.celebrate-ring2 { animation-delay: .7s !important; }
@keyframes perfectLap { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes perfectWave { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-12deg); } 70% { transform: rotate(10deg); } }

/* ---------------------------------------------------------------- Spiele hier */
.nearby-map { height: min(52vh, 420px); margin: 12px 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.nearby-radius { margin-bottom: 12px; background: var(--surface); }
.nearby-radius output { min-width: 56px; text-align: right; font-weight: 700; }
.hint-cost { color: var(--danger, #B42318); font-weight: 700; }

/* ---------------------------------------------------------------- Pinnwand (js/board.js) */
.board { --t-neu: #E9E6DF; --t-bronze: #D9A066; --t-silber: #B4BEC8; --t-gold: #E8B830; --t-perfekt: #2F5D4A; }
.board-seg { display: flex; margin: 4px 0 12px; }
.board-seg button { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 700 1rem var(--font); cursor: pointer; }
.board-seg button[aria-checked="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(27, 36, 48, .1); }
.board-kreis { margin-bottom: 10px; }
.board-progress p { margin: 0 0 6px; }
.board-map { display: block; width: 100%; max-height: 58vh; margin: 12px 0 6px; }
.board-area { stroke: #fff; stroke-width: 160; stroke-linejoin: round; cursor: pointer; transition: filter .15s; fill: var(--t-neu); }
.board-area:hover, .board-area:focus-visible { filter: brightness(.92); outline: none; }
.board-area.is-active { stroke: var(--ink); stroke-width: 260; }
.tier-neu { fill: var(--t-neu); background: var(--t-neu); }
.tier-bronze { fill: var(--t-bronze); background: var(--t-bronze); }
.tier-silber { fill: var(--t-silber); background: var(--t-silber); }
.tier-gold { fill: var(--t-gold); background: var(--t-gold); }
.tier-perfekt { fill: var(--t-perfekt); background: var(--t-perfekt); color: #fff; }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0 0 12px; padding: 0; font-size: .85rem; color: var(--muted); }
.board-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.board-detail h2 { margin: 0 0 6px; }
.board-detail .actions { margin-top: 10px; }
.tier-chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 700; font-size: .88rem; }
.board-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board-badges li { display: flex; align-items: center; gap: 12px; opacity: .5; }
.board-badges li.has { opacity: 1; }
.board-badges svg { width: 34px; height: 34px; flex-shrink: 0; padding: 6px; border-radius: 50%; background: var(--surface-2); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board-badges li.has svg { background: #FFF1CF; stroke: #A87400; }
.board-badges span { display: flex; flex-direction: column; }
.board-badges small { color: var(--muted); font-size: .82rem; }

/* ---------------------------------------------------------------- Snake (js/snake.js) */
html.snake-open, html.snake-open body { overflow: hidden; overscroll-behavior: none; }
.snake { position: fixed; inset: 0; z-index: 9600; background: var(--bg); touch-action: none; user-select: none; -webkit-user-select: none; }
.snake-drop { position: absolute; left: 50%; top: 40%; width: 64px; height: 102px; margin-left: -32px; animation: snakeDrop .7s cubic-bezier(.4, 0, .6, 1) both; }
.snake-drop svg { width: 100%; height: 100%; fill: #111; }
.snake.is-ready .snake-drop { animation: snakeOut .25s ease-in both; }
@keyframes snakeDrop { from { transform: translateY(-60vh); } 80% { transform: translateY(6px) scaleY(.9); } to { transform: none; } }
@keyframes snakeOut { to { opacity: 0; transform: scale(1.4); } }
.snake-ui { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(8px + var(--sat)) calc(12px + var(--sar)) calc(8px + var(--sab)) calc(12px + var(--sal)); opacity: 0; transition: opacity .3s; }
.snake.is-ready .snake-ui { opacity: 1; }
.snake-bar { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.snake-score { display: flex; flex-direction: column; padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.1; }
.snake-score small { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.snake-score b { font-size: 1.15rem; }
.snake-bar .icon-btn:first-of-type { margin-left: auto; }
.snake-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin-top: 8px; }
.snake-stage canvas { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.snake-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 20px; text-align: center; background: rgba(245, 244, 237, .88); border-radius: 12px; }
.snake-big { margin: 0; font-size: 1.5rem; font-weight: 800; }
.snake-actions { display: flex; gap: 10px; margin-top: 10px; }
.snake-help { margin: 6px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .snake-drop { display: none; } }
.menu .menu-play { min-height: 64px; margin-top: 14px; }
.menu .menu-options { margin-top: 10px; min-height: 44px; border: 0; background: none; justify-content: center; color: var(--ink-2); font-weight: 650; font-size: .95rem; }
.menu .menu-options span { flex: 0 1 auto; }
.menu .menu-options:hover { background: var(--m-tile); }
.menu-daily-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; background: var(--m-tile); font-weight: 750; font-size: .95rem; }
.menu-daily-row > span { flex: 1; }
.menu-daily-row .menu-daily-icon { width: 24px; height: 24px; flex-shrink: 0; }
.menu-chip { min-height: 38px; min-width: 64px; padding: 0 12px; border: 1.5px solid var(--m-green); border-radius: 99px; background: #fff; color: var(--m-green); font: 750 .9rem var(--font); cursor: pointer; }
.menu-chip.is-done { border-color: transparent; background: var(--m-tile-on); }
.menu-chip:focus-visible { outline: 3px solid #2F6BD8; outline-offset: 2px; }
.menu-icons { display: flex; justify-content: space-around; margin: 14px 0 6px; }
.menu-icons a, .menu-icons button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; min-height: 52px; padding: 6px 4px;
  border: 0; border-radius: 12px; background: none; color: var(--ink-2); font: 650 .8rem var(--font); text-decoration: none; cursor: pointer;
}
.menu-icons a:hover, .menu-icons button:hover { background: var(--m-tile); }
.menu-icons svg { width: 26px; height: 26px; fill: none; stroke: var(--m-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu .page-footer { margin-top: 18px; }
@media (max-width: 370px) { }

/* ---------------------------------------------------------------- Spiel kompakt: Fragekarte, Tipps, Kartenmenü, Kopfzeile */
.panel-q { padding: 10px 14px 12px; border-radius: 18px; }
.q-row { display: flex; align-items: center; gap: 8px; }
.q-text { flex: 1; min-width: 0; }
.panel-q .eyebrow { margin: 0 0 1px; font-size: .72rem; }
.panel-q .street-name { margin: 0; font-size: clamp(1.3rem, 6vw, 1.7rem); line-height: 1.15; }
.q-note { margin: 6px 0 0; font-size: .86rem; color: var(--muted); }
.q-note[hidden], .btn-confirm[hidden] { display: none; }
.btn-confirm { min-height: 44px; margin-top: 10px; padding-top: 0; padding-bottom: 0; }
.panel-q .hint-shop { margin: 6px 0 0; flex-wrap: nowrap; gap: 4px; }
.q-row .hint-shop { margin: 0; }
.hint-wrap { position: relative; }
.hint-bulb { position: relative; width: 42px; height: 42px; border-radius: 50%; background: #FFF6E0; color: #8A6100; }
.hint-bulb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hint-bulb .hint-shop-label { position: absolute; top: -4px; right: -8px; margin: 0; padding: 1px 5px; border-radius: 99px; background: var(--danger, #B42318); color: #fff; font-size: .66rem; letter-spacing: 0; }
.hint-bulb .hint-shop-label:empty { display: none; }
.hint-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.hint-shop > .hint-wrap .hint-menu { left: 0; right: auto; } /* Zeichnen: Birne links */
.q-row .hint-shop > .hint-wrap .hint-menu { right: 0; left: auto; }
.hint-menu[hidden], .map-menu[hidden] { display: none; }
.hint-item, .map-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: 650 .95rem var(--font); text-align: left; cursor: pointer; white-space: nowrap;
}
.hint-item:hover, .map-menu button:hover, .hint-item:focus-visible, .map-menu button:focus-visible { background: var(--surface-2); outline: none; box-shadow: inset 0 0 0 2px #2F6BD8; }
.hint-item.bought { color: var(--brand); }
.hint-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; flex-shrink: 0; }
.map-menu-wrap { position: relative; }
.map-menu { position: absolute; right: calc(100% + 8px); top: 0; z-index: 5; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.map-menu [aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--brand); font-weight: 800; }
@media (pointer: coarse) { .map-btn-zoom { display: none; } } /* Handy: Zwei-Finger-Zoom */
body.in-game { --header-h: 48px; }
body.in-game .hud-item { padding: 1px 10px; min-width: 50px; border-radius: 10px; }
body.in-game .hud-label { font-size: .6rem; }
body.in-game .hud-value { font-size: 1rem; line-height: 1.1; }
.panel:has(.hint-menu:not([hidden])) { overflow: visible; } /* Tipp-Menü ragt nach oben aus der Karte */
.reveal-line { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 4px; font-size: 1.25rem; font-weight: 800; }
.meter-thin { height: 6px; margin: 0; }
.panel-q .round-results { margin: 6px 0 0; }
/* Ergebnis: Punkte und Aktionen auf einen Blick */
.result-hero { padding-top: 16px; padding-bottom: 16px; }
.result-hero h1 { margin: 2px 0 0; font-size: 1.45rem; }
.result-hero .big-score { margin: 4px 0 2px; }
.result-hero .badge { margin: 6px 4px 0; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.result-actions .btn { min-height: 46px; }
.opts-switch span:first-child { white-space: normal; min-width: 0; }
.opts-switch small { white-space: normal; }
.opts-body { overflow-x: hidden; }
body.on-home main { min-height: 100dvh; display: flex; flex-direction: column; }
body.on-home main > .menu { flex: 1; display: flex; flex-direction: column; width: 100%; }
body.on-home .menu .page-footer { margin-top: auto; padding-top: 18px; }
.q-note:empty { display: none; }

/* ---------------------------------------------------------------- Startseite: Ort im Kopf, quadratische Spielart-Kacheln */
.town-btn { display: none; width: 38px; height: 38px; margin-left: 2px; }
body.on-home .town-btn { display: grid; }
.town-btn svg { width: 21px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
body.on-home .brand-text { flex-direction: column; align-items: flex-start; }
body.on-home .brand-copy { display: block; font-size: .78rem; color: var(--muted); font-weight: 650; margin-top: 2px; }
body.on-home .brand-copy::before { content: none; }
body.on-home { --header-h: 56px; }
.menu-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.menu-tile { position: relative; display: block; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.menu-tile input { position: absolute; opacity: 0; pointer-events: none; }
.menu-tile-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1; max-height: 128px; width: 100%;
  border: 2px solid transparent; border-radius: 20px; background: var(--m-tile); color: var(--ink); font-weight: 800; font-size: .95rem; text-align: center;
  transition: background-color .15s, border-color .15s;
}
.menu-tile:hover .menu-tile-box { background: var(--m-tile-on); }
.menu-tile input:checked + .menu-tile-box { background: var(--m-tile-on); border-color: var(--m-green); }
.menu-tile input:focus-visible + .menu-tile-box, button.menu-tile:focus-visible .menu-tile-box { outline: 3px solid #2F6BD8; outline-offset: 2px; }
.menu-tile-icon { width: 36px; height: 36px; fill: none; stroke: var(--m-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-tile-icon circle[fill] { fill: var(--m-green); }
.menu .menu-daily-row { margin-top: 12px; }
@media (max-width: 370px) { .menu-tiles { gap: 8px; } .menu-tile-box { font-size: .86rem; gap: 6px; } .menu-tile-icon { width: 30px; height: 30px; } }

.brand-name { letter-spacing: .02em; }
