/* Capture the Map — spielspezifische Stile. Basis aus game-base.css. */

:root { --gold: #ffc83d; }

.ctm {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 0 56px;
}

/* ---------- Start ---------- */
.ctm-titel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.9rem);
  margin: 10px 0 8px;
}
.ctm-unter { margin: 0 0 26px; color: var(--ink-muted); max-width: 54ch; }

.optionen { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; }
.gruppe {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  padding: 14px 16px 16px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gruppe legend {
  padding: 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-muted);
}
.wahl { cursor: pointer; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-weight: 600;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.wahl em { font-style: normal; color: var(--ink-muted); font-weight: 400; }
.wahl input:checked + span {
  border-color: var(--akzent);
  background: color-mix(in srgb, var(--akzent) 18%, var(--bg));
}
.wahl input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 45%, transparent); }
.wahl.aus { opacity: 0.45; cursor: default; }

.btn-gross { font-size: 1.1rem; padding: 14px 28px; }
.btn-leise { background: var(--bg-panel); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }

/* ---------- Spiel ---------- */
.ctm-spiel { padding-top: 10px; }
.spiel-leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.fortschritt { font-weight: 700; color: var(--ink); }
.punkte strong { color: var(--ink); }

.aufgabe { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.a-flagge {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.a-land {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  margin: 0;
  line-height: 1.1;
}
.a-hinweis { margin: 4px 0 0; color: var(--ink-muted); }

.karte-rahmen {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #15122a;
}
.karte {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68dvh;
  cursor: crosshair;
  touch-action: none;          /* Ziehen & Pinch übernimmt das Spiel selbst */
  user-select: none;
  -webkit-user-select: none;
}
.karte.fertig { cursor: grab; }
.karte.zieht  { cursor: grabbing; }

/* Linien bleiben beim Zoomen gleich dünn */
.netz, .andere path, .ziel, .ziel-glow { vector-effect: non-scaling-stroke; }

/* Zoom-Knöpfe */
.zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zoom-btn {
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.zoom-btn:hover:not(:disabled) { border-color: var(--gold); background: var(--bg-panel-2); }
.zoom-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 50%, transparent); }
.zoom-btn:disabled { opacity: 0.4; cursor: default; }
.zoom-reset { font-size: 1.1rem; }
.zoom-tipp {
  position: absolute;
  left: 12px;
  bottom: 10px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  color: var(--ink-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.meer  { fill: #15122a; }
.netz  { fill: none; stroke: rgba(167, 162, 207, 0.08); stroke-width: 0.8; }
.andere path {
  fill: #2c2852;
  stroke: #3d3870;
  stroke-width: 0.8;
  stroke-linejoin: round;
}
.ziel {
  fill: color-mix(in srgb, var(--gold) 16%, #2c2852);
  stroke: var(--gold);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.ziel-glow {
  fill: none;
  stroke: var(--gold);
  stroke-width: 9;
  stroke-opacity: 0.22;
  stroke-linejoin: round;
  filter: blur(3px);
}
.ring { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 4; }

/* Flagge des Spielers */
.fahne-schatten { fill: rgba(0, 0, 0, 0.45); }
.fahne-stange   { stroke: #f3f1ff; stroke-width: 2.4; stroke-linecap: round; }
.fahne-tuch     { fill: #fff; stroke: rgba(0, 0, 0, 0.35); stroke-width: 1; }
.fahne-knauf    { fill: var(--gold); }

/* Auflösung */
.linie { stroke: #f3f1ff; stroke-width: 2; stroke-dasharray: 6 5; opacity: 0.75; }
.ziel-punkt { fill: var(--mint); stroke: #15122a; stroke-width: 2; }
.ziel-puls { fill: none; stroke: var(--mint); stroke-width: 2; opacity: 0.6; }
.ziel-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  fill: #f3f1ff;
  paint-order: stroke;
  stroke: #15122a;
  stroke-width: 4px;
  stroke-linejoin: round;
}

/* Ergebnis und Capture/Next-Knopf mittig untereinander unter der Karte */
.spiel-fuss {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  min-height: 48px;
}
.ergebnis { margin: 0; font-size: 1.1rem; text-align: center; }
.ergebnis .urteil { font-family: var(--font-display); font-weight: 700; margin-right: 4px; }
.ergebnis.gut .urteil     { color: var(--mint); }
.ergebnis.mittel .urteil  { color: var(--amber); }
.ergebnis.schlecht .urteil { color: var(--coral); }
.spiel-fuss .btn { font-size: 1.15rem; padding: 15px 28px; min-width: min(100%, 280px); }

/* ---------- Ende ---------- */
.ende { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 16px; }
.ende-titel { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0; }
.ende-score { margin: 0; font-size: 1.3rem; }
.ende-score strong { color: var(--gold); font-size: 1.6rem; }
.ende-schnitt { margin: 0 0 8px; color: var(--ink-muted); }
.ende-schnitt strong { color: var(--ink); }

.end-liste { list-style: none; margin: 6px 0 14px; padding: 0; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.end-liste li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.end-liste img { width: 26px; height: 19px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); flex: none; }
.el-land { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.el-land small { color: var(--ink-muted); }
.el-km { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.el-pkt { font-weight: 800; min-width: 2.4em; text-align: right; font-variant-numeric: tabular-nums; }
.el-pkt.gut { color: var(--mint); } .el-pkt.mittel { color: var(--amber); } .el-pkt.schlecht { color: var(--coral); }

.aktionen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 560px) {
  .a-flagge { width: 52px; height: 39px; }
}
@media (prefers-reduced-motion: reduce) { .wahl span, .zoom-btn { transition: none; } }
@media (max-width: 560px) { .zoom-btn { width: 36px; height: 36px; } .zoom-tipp { display: none; } }

/* ---------- Daily-Modus (daily.html) ---------- */
.daily-marke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  font-size: 0.85rem;
  font-weight: 700;
}
.daily-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent);
}
.ende .daily-marke { margin: 0; }

/* 6 Felder für die Runden des Tages */
.d-fortschritt {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 0 0 26px;
  padding: 0;
}
.d-feld {
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.d-feld.gut      { background: var(--mint);  border-color: transparent; }
.d-feld.mittel   { background: var(--amber); border-color: transparent; }
.d-feld.schlecht { background: var(--coral); border-color: transparent; }

.d-naechste { margin: 4px 0 6px; color: var(--ink-muted); }
.d-naechste strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.aktionen a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.teilen-status { min-height: 1.3em; margin: 4px 0 0; color: var(--mint); font-weight: 600; }
.teilen-text {
  width: 100%;
  max-width: 360px;
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  resize: none;
}
