/* style.css – Gemeinsames Design. Mobile first: erst fürs Handy, dann größer.
   Stil: verspielt – kräftige Farben, runde Formen, "drückbare" Buttons,
   kleine Animationen. Alle Farben stehen oben als Variablen. */

:root {
  --color-bg: #fff8ee;
  --color-surface: #ffffff;
  --color-text: #2b2235;
  --color-muted: #6f6680;
  --color-primary: #ff5a5f;
  --color-primary-dark: #d93d43;
  --color-secondary: #2ec4b6;
  --color-secondary-dark: #1f9a8e;
  --color-accent: #ffbe0b;
  --color-accent-soft: #fff3c4;
  --color-success: #2a9d4b;
  --color-error: #d62839;
  --color-border: #eadfcf;
  --radius: 18px;
  --space: 16px;
  /* Runde Systemschrift, wo vorhanden (Apple) – sonst die normale.
     Bewusst keine Google Fonts: die würden Daten an Google schicken. */
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px; /* mind. 16 px – sonst zoomt das iPhone beim Tippen ins Feld */
  line-height: 1.5;
  color: var(--color-text);
  /* Zwei weiche Farbflecken im Hintergrund */
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 190, 11, 0.18), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(46, 196, 182, 0.16), transparent 45%),
    var(--color-bg);
  background-attachment: fixed;
  min-height: 100vh;
}

h1 {
  margin: 0 0 var(--space);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Kleine Inline-Icons (SVG) in Buttons und Überschriften */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* Schriftzug "Stadtjagd" */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space);
}

.screen[hidden] {
  display: none;
}

/* Text mit Zeilenumbrüchen aus der Eingabe anzeigen */
.text-block {
  white-space: pre-line;
  margin: 0;
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

/* Buttons sehen aus wie dicke Tasten: der dunkle Schatten unten ist die
   "Seite" der Taste. Beim Drücken rutscht der Button nach unten. */
.btn {
  --btn-shadow: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--btn-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--btn-shadow);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  --btn-shadow: var(--color-primary-dark);
  background: var(--color-primary);
  color: #fff;
}

.btn-secondary {
  --btn-shadow: var(--color-secondary-dark);
  background: var(--color-secondary);
  color: #fff;
}

.btn-ghost {
  --btn-shadow: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-link {
  background: none;
  color: var(--color-muted);
  font-weight: 400;
  text-decoration: underline;
  align-self: center;
  box-shadow: none;
}

.btn-link:active:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.btn[hidden] {
  display: none;
}

/* ---------- Spieler-Ansicht ---------- */

.play-header {
  position: sticky;
  top: 0;
  z-index: 1000; /* über der Leaflet-Karte */
  margin: calc(-1 * var(--space)) calc(-1 * var(--space)) 0;
  padding: 12px var(--space);
  background: var(--color-bg);
}

.play-header-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.clock {
  font-variant-numeric: tabular-nums; /* Ziffern gleich breit → Uhr wackelt nicht */
}

.progress-bar {
  height: 14px;
  margin-top: 8px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  /* Schräge Streifen wie bei einem Ladebalken */
  background: repeating-linear-gradient(
    -45deg,
    var(--color-secondary) 0 8px,
    var(--color-secondary-dark) 8px 16px
  );
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* schießt kurz über das Ziel hinaus */
}

.riddle {
  position: relative;
  padding: 28px var(--space) var(--space);
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 14px 0 4px; /* Platz für das Etikett oben */
  box-shadow: 5px 5px 0 var(--color-accent);
}

/* Kleines Etikett "Rätsel" oben links auf der Karte */
.riddle::before {
  content: "Rätsel";
  position: absolute;
  top: -14px;
  left: 14px;
  padding: 2px 12px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-form {
  display: flex;
  gap: 8px;
}

.answer-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--color-surface);
}

.answer-form input:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.feedback {
  min-height: 1.5em;
  margin: 0;
  font-weight: 700;
  text-align: center;
}

.feedback.is-success {
  color: var(--color-success);
}

.feedback.is-error {
  color: var(--color-error);
}

.hint {
  display: flex;
  gap: 10px;
  padding: 12px var(--space);
  background: var(--color-accent-soft);
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius);
}

.hint[hidden],
.notice[hidden] {
  display: none;
}

.map-wrap {
  position: relative;
}

.map-wrap[hidden] {
  display: none;
}

.map {
  height: 40vh;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Hinweis über der Karte, solange noch kein Standort da ist */
.map-status {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--space);
  text-align: center;
  color: var(--color-muted);
  background: var(--color-surface);
  border-radius: var(--radius);
}

.map-status[hidden] {
  display: none;
}

.notice {
  margin: 0;
  padding: 12px var(--space);
  color: var(--color-muted);
  background: var(--color-surface);
  border-radius: var(--radius);
}

/* ---------- Intro und Geschafft ---------- */

#screen-intro,
#screen-finished,
#screen-error {
  min-height: 100vh;
  justify-content: center;
  text-align: center;
}

#screen-intro .brand {
  align-self: center;
}

#screen-intro .btn,
#screen-finished .btn {
  margin-top: 8px;
}

/* Großes rundes Bild-Abzeichen (Karte, Pokal, Fragezeichen) */
.badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 112px;
  height: 112px;
  border: 4px solid var(--color-text);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 5px 5px 0 var(--color-primary);
  color: var(--color-text);
}

.badge-icon svg {
  width: 60px;
  height: 60px;
}

.finished-title {
  margin: 0;
  font-size: 1.2rem;
}

.finished-time {
  align-self: center;
  margin: 0;
  padding: 12px 28px;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--color-secondary);
}

.finished-time strong {
  font-size: 2.4rem;
  display: block;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Animationen ---------- */

/* Falsche Antwort: Eingabe wackelt "nein" */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

/* Neues Rätsel / Erfolg: springt kurz auf */
@keyframes pop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

/* Pokal und Abzeichen: schaukeln einmal hin und her */
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg) scale(1.05); }
  75% { transform: rotate(10deg) scale(1.05); }
}

.is-shaking {
  animation: shake 0.4s ease;
}

.is-popping {
  animation: pop 0.45s ease-out;
}

.badge-icon {
  animation: wiggle 0.9s ease-in-out 0.2s;
}

/* Konfetti-Zeichenfläche liegt über allem, fängt aber keine Klicks ab */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  pointer-events: none;
}

/* Wer im System "Bewegung reduzieren" eingestellt hat: keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Ersteller-Ansicht ---------- */

h2 {
  margin: 12px 0 0;
  font-size: 1.3rem;
}

.count {
  color: var(--color-muted);
  font-weight: 400;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
}

.field[hidden] {
  display: none;
}

.field label,
.field legend {
  font-weight: 700;
  padding: 0;
}

.field-inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field-inline input {
  width: 22px;
  height: 22px;
  accent-color: var(--color-secondary);
}

.optional,
.field-help {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 0.9rem;
  margin: 0;
}

.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--color-surface);
  color: inherit;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.field .is-invalid,
.field input.is-invalid {
  border-color: var(--color-error);
}

.field-error {
  margin: 0;
  color: var(--color-error);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-error[hidden] {
  display: none;
}

.map-create {
  height: 45vh;
}

.map-help {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Nummerierte Marker auf der Karte */
.station-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.station-marker.is-new {
  background: var(--color-muted);
}

/* Stationsliste */
.station-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.station-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--color-surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 2px 0 var(--color-border);
}

.station-item.is-invalid {
  border-color: var(--color-error);
}

.station-item.sortable-ghost {
  opacity: 0.4;
}

.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 48px;
  flex-shrink: 0;
  color: var(--color-muted);
  cursor: grab;
  touch-action: none; /* Wischen am Griff zieht die Station statt die Seite */
}

.station-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.station-body {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.station-riddle {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis; /* lange Rätsel mit "…" abschneiden */
}

.station-riddle.is-empty {
  color: var(--color-muted);
  font-style: italic;
}

.station-meta {
  display: block;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.station-errors {
  display: block;
  color: var(--color-error);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Formular-Blatt für eine Station */
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  margin: auto auto 0; /* unten am Bildschirm */
  padding: var(--space);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.sheet::backdrop {
  background: rgba(43, 34, 53, 0.5);
}

.sheet form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet h2 {
  margin: 0;
}

.answer-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-row {
  display: flex;
  gap: 8px;
}

.answer-row input {
  flex: 1;
}

.btn-icon {
  width: 48px;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  color: var(--color-muted);
  border: 2px solid var(--color-border);
}

.btn-small {
  min-height: 40px;
  padding: 8px 14px;
  align-self: flex-start;
}

.sheet-actions {
  display: flex;
  gap: 8px;
}

.sheet-actions .btn {
  flex: 1;
}

.btn-danger {
  color: var(--color-error);
}

/* Ab Tablet-Breite: Blatt mittig statt unten */
@media (min-width: 600px) {
  .sheet {
    margin: auto;
    border-radius: var(--radius);
  }
}

/* ---------- Entwurf und Ergebnis ---------- */

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.title-row h1 {
  margin: 0;
}

.title-row .btn-link {
  min-height: auto;
  padding: 4px 0;
}

.draft-status {
  margin: -8px 0 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Kopf des Ergebnis-Bildschirms mittig, passend zum Abzeichen */
#screen-result > h1,
#screen-result > h1 + p {
  text-align: center;
}

.qr-code {
  align-self: center;
  width: min(100%, 280px);
  padding: 12px;
  background: #fff; /* QR-Codes brauchen hellen Hintergrund zum Scannen */
  border-radius: var(--radius);
}

.qr-code:empty {
  display: none;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.button-row {
  display: flex;
  gap: 8px;
}

.button-row .btn {
  flex: 1;
}

.edit-link-box {
  margin-top: 12px;
  padding: var(--space);
  background: #fff3c4;
  border-radius: var(--radius);
}

.field input[readonly] {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ---------- Startseite ---------- */

#screen-home {
  min-height: 100vh;
  justify-content: center;
  text-align: center;
}

#screen-home .brand {
  align-self: center;
}

/* Link als Button: Unterstreichung weg */
a.btn {
  text-decoration: none;
}

.draft-info {
  margin: -4px 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.draft-info[hidden] {
  display: none;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding: var(--space);
  text-align: left;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--color-secondary);
}

.home-card h2 {
  margin: 0;
}

.privacy-note {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

a.brand {
  align-self: flex-start;
  text-decoration: none;
}

.intro-text {
  margin: 0;
}

/* ---------- Ladehinweis ---------- */

/* Normal versteckt. Ohne CSS greift diese Regel nicht → Hinweis sichtbar.
   Ohne JavaScript setzt das Prüf-Skript "load-failed" → Hinweis sichtbar. */
.load-warning {
  display: none;
}

.load-failed .load-warning,
.load-warning-noscript {
  display: block;
  margin: var(--space);
  padding: var(--space);
  background: var(--color-accent-soft);
  border: 3px solid var(--color-error);
  border-radius: var(--radius);
}

.load-failed .load-warning a {
  color: var(--color-error);
  font-weight: 800;
}

/* ---------- Probelauf ---------- */

/* Leiste unten am Bildschirm, damit man den Probelauf nicht vergisst */
.probe-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  margin: 0;
  padding: 10px var(--space);
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-accent);
  border-top: 3px solid var(--color-text);
}

.probe-banner[hidden] {
  display: none;
}

/* Platz lassen, damit die Leiste nichts verdeckt */
.probe-banner:not([hidden]) ~ .screen {
  padding-bottom: 72px;
}

/* ---------- Ersteller: Spalten-Layout ---------- */

.editor-columns,
.editor-map-col,
.editor-side-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ab Laptop-Breite: Karte links (bleibt beim Scrollen stehen), Liste rechts */
@media (min-width: 960px) {
  #screen-editor {
    max-width: 1180px;
  }

  .editor-columns {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 24px;
    align-items: start;
  }

  .editor-map-col {
    position: sticky;
    top: var(--space);
  }

  .map-create {
    height: calc(100vh - 180px);
    min-height: 420px;
  }

  .editor-side-col h2:first-child {
    margin-top: 0;
  }
}

/* ---------- Teams ---------- */

/* Teamfarbe kommt per JavaScript als Variable --team-color */
.team-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--team-color, var(--color-secondary));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); /* lesbar auch auf hellem Gelb */
}

.team-badge[hidden] {
  display: none;
}

.team-badge-big {
  align-self: center;
  margin: 0;
  padding: 6px 18px;
  font-size: 1.1rem;
  border: 3px solid var(--color-text);
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.finale-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space);
  text-align: left;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--color-primary);
}

.finale-box[hidden],
.finale-solved[hidden] {
  display: none;
}

.finale-box h2 {
  margin: 0;
}

.finale-part {
  margin: 0;
  font-size: 1.1rem;
}

.finale-part strong {
  display: inline-block;
  padding: 2px 12px;
  background: var(--color-accent);
  border: 2px solid var(--color-text);
  border-radius: 10px;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
}

.finale-solved {
  margin: 0;
  padding: 12px var(--space);
  background: var(--color-accent);
  border: 3px solid var(--color-text);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.15rem;
}

/* ---------- Ersteller: Teams ---------- */

.teams-panel,
.finale-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teams-panel {
  padding: var(--space);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
}

.teams-panel[hidden],
.finale-fields[hidden] {
  display: none;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--color-border);
  border-left: 8px solid var(--team-color);
  border-radius: var(--radius);
  font: inherit;
  background: var(--color-surface);
}

.team-row input:focus {
  outline: none;
  border-color: var(--color-secondary);
  border-left-color: var(--team-color);
}

.team-dot {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--color-text);
  border-radius: 50%;
  background: var(--team-color);
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Team-Auswahl im Stations-Formular */
.team-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ".field .team-option": schlägt die allgemeine Regel ".field label { padding: 0 }" */
.field .team-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--team-color);
  border-radius: 999px;
  background: var(--color-surface);
  font-weight: 700;
  cursor: pointer;
}

.team-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--team-color);
}

.field-inline input[type="checkbox"] {
  flex-shrink: 0;
}

/* Ziel-Station: gelb statt rot, "Z" statt Nummer */
.station-marker.is-goal,
.station-number.is-goal {
  background: var(--color-accent);
  color: var(--color-text);
}

.station-marker.is-goal {
  width: 36px;
  height: 36px;
  border-color: var(--color-text);
}

/* ---------- Ergebnis: Karten ---------- */

.result-cards {
  display: grid;
  gap: 16px;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space);
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
}

.result-card.is-team {
  border-color: var(--team-color);
  box-shadow: 5px 5px 0 var(--team-color);
}

.result-card .result-team {
  margin-bottom: 4px;
}

.result-card .play-link {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-bg);
}

/* Mehrere Teams am großen Bildschirm: Karten nebeneinander */
@media (min-width: 760px) {
  #screen-result.has-teams {
    max-width: 1100px;
  }

  #screen-result.has-teams .result-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.probe-info {
  margin: 0;
  padding: 10px var(--space);
  background: var(--color-accent-soft);
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
}

.probe-info[hidden] {
  display: none;
}

/* ---------- Drucken ---------- */

.print-only {
  display: none;
}

/* Beim Drucken nur die QR-Karten zeigen: groß, mit Teamname, ohne Buttons */
@media print {
  body {
    background: #fff;
  }

  body > *:not(#screen-result),
  #screen-result > *:not(.result-cards):not(.print-title),
  .result-card .play-link,
  .result-card .button-row,
  .result-card .btn-probe,
  .result-card .length-warning,
  .load-warning {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .print-title {
    margin: 0 0 12mm;
    font-size: 20pt;
    font-weight: 800;
    text-align: center;
  }

  #screen-result {
    max-width: none;
    padding: 0;
  }

  /* Zwei Karten nebeneinander, keine Karte über den Seitenrand zerschneiden */
  #screen-result .result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10mm;
  }

  .result-card {
    break-inside: avoid;
    align-items: center;
    padding: 8mm;
    box-shadow: none !important;
    border-width: 2mm;
    border-style: dashed; /* Schnittlinie */
    print-color-adjust: exact; /* Teamfarben mitdrucken */
    -webkit-print-color-adjust: exact;
  }

  .result-card .qr-code {
    width: 60mm;
  }

  .print-hint {
    margin: 0;
    font-size: 11pt;
    text-align: center;
  }
}

/* ---------- Orte und automatische Jagd ---------- */

.btn[aria-pressed="true"] {
  --btn-shadow: var(--color-secondary-dark);
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--color-surface);
  color: inherit;
}

.field .radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 600;
}

.radio-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-secondary);
}

.privacy-box {
  margin: 0;
  padding: 10px 14px;
  background: var(--color-surface);
  border-left: 4px solid var(--color-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Vorschlags-Punkte auf der Karte */
.place-marker {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #8338ec;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.place-popup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  font-family: var(--font);
}

.place-popup strong {
  font-size: 1rem;
}

.place-popup .btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.9rem;
}
