/* As The Crow Flies — spielspezifische Stile. Basis aus game-base.css;
   Karte im Look von Capture the Map, Auswahl-Chips wie bei GeoFill.
   Wird auch vom Weekly Game (weekly/index.html) mitbenutzt. */

:root { --gold: #ffc83d; --crow: #C9966B; --crow-tief: #8B5A2B; --luecke: #ff6b6b; }
:root[data-theme="light"] { --crow: #8B5A2B; --luecke: #e0453f; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

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

/* Start: Text links, großes Krähen-Bild rechts */
.start-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.start-bild {
  position: relative; display: grid; place-items: center; aspect-ratio: 400 / 300;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(60% 55% at 55% 45%, color-mix(in srgb, var(--crow) 26%, transparent), transparent 70%),
    radial-gradient(120% 100% at 0% 100%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%),
    var(--bg-panel);
  border: 1px solid color-mix(in srgb, var(--crow) 35%, var(--line));
  overflow: hidden;
}
.start-bild::before {          /* feines Gradnetz im Hintergrund */
  content: ""; position: absolute; inset: 0; opacity: .35;
  background:
    repeating-linear-gradient(90deg, transparent 0 39px, color-mix(in srgb, var(--crow) 30%, transparent) 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, color-mix(in srgb, var(--crow) 30%, transparent) 39px 40px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 75%);
          mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 75%);
}
.start-bild img { position: relative; width: 92%; height: auto; animation: crow-schweben 6s ease-in-out infinite; }
:root[data-theme="light"] .start-bild .bild-dunkel { display: none; }
@keyframes crow-schweben { 50% { transform: translateY(-8px) rotate(-1deg); } }
.start-aktion { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.start-aktion .hinweis { margin: 0; max-width: 30ch; }

/* Hinweis auf das Weekly Game */
.weekly-teaser {
  margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 16%, var(--bg-panel)), var(--bg-panel) 60%);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  transition: transform .15s ease, border-color .15s ease;
}
.weekly-teaser:hover { transform: translateY(-2px); border-color: var(--gold); }
.weekly-teaser:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 50%, transparent); }
.wt-schild { padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #1e1b34; font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.wt-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.wt-text strong { font-family: var(--font-display); font-size: 1.1rem; }
.wt-text span { color: var(--ink-muted); font-size: .9rem; }
.wt-status { font-weight: 800; font-size: .85rem; color: var(--gold); }
:root[data-theme="light"] .wt-status { color: #b07800; }
.wt-status.fertig { color: var(--mint); }
.wt-pfeil { font-size: 1.3rem; color: var(--gold); }

.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;
}
.gruppe legend { padding: 0 6px; font-family: var(--font-display); font-weight: 600; color: var(--ink-muted); }
.wahl-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl { cursor: pointer; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 15px;
  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(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--bg)); }
.wahl input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }

.btn-gross { font-size: 1.1rem; padding: 14px 28px; }
.btn-leise { background: var(--bg-panel); color: var(--ink); border: 1px solid var(--line); }
.hinweis { margin: 18px 0 0; color: var(--ink-muted); font-size: 0.9rem; }

/* ---------- Spiel ---------- */
.crow-spiel { padding-top: 10px; }
.spiel-leiste {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.s-paar { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); flex: 1; }
.s-stand { font-variant-numeric: tabular-nums; }
/* Fortschritts-Punkte (eingefärbt nach Ergebnis) */
.s-reihe { display: inline-flex; gap: 4px; flex-wrap: wrap; max-width: 260px; }
.s-reihe i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--ink-muted) 30%, transparent); }
.s-reihe i.jetzt { background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
.s-reihe i.gut { background: var(--mint); } .s-reihe i.mittel { background: var(--amber); } .s-reihe i.schlecht { background: var(--coral); }
.s-punkte {
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  font-weight: 700;
}
.s-punkte strong { color: var(--gold); font-variant-numeric: tabular-nums; }

.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: 60dvh;
  cursor: grab;
  touch-action: none;          /* Ziehen & Pinch übernimmt das Spiel selbst */
  user-select: none;
  -webkit-user-select: none;
}
.karte.zieht { cursor: grabbing; }
.netz, .grenzen, .ziel-land, .rand { vector-effect: non-scaling-stroke; }

/* Zoom-Knöpfe (wie Capture the Map / GeoFill) */
.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;
}
.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.6; }
.land path { fill: #2c2852; }
.grenzen { fill: none; stroke: #3d3870; stroke-width: 0.5; stroke-linejoin: round; }
.ziel-land { fill: color-mix(in srgb, var(--gold) 34%, #2c2852); stroke: var(--gold); stroke-width: 1; stroke-linejoin: round; }
.rand { fill: none; stroke: #2e2a52; stroke-width: 1; }

.marke { fill: var(--gold); stroke: #15122a; stroke-width: 1.4; }
.marke-puls { fill: none; stroke: var(--gold); stroke-width: 1.1; opacity: 0.55; }
.marke-stadt, .marke-land, .route-km {
  paint-order: stroke;
  stroke: #15122a;
  stroke-linejoin: round;
}
.marke-stadt { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; fill: #f3f1ff; stroke-width: 3px; }
.marke-land { font-size: 8.5px; fill: #a7a2cf; stroke-width: 2.4px; }
.route-linie {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0.1 5.5;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--gold) 60%, transparent));
}
.route-km { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; fill: var(--gold); stroke-width: 3px; }

/* Auflösung: Krähe, Tipp-Strecke, Landestelle des Tipps */
/* Krähe wie im Logo: dunkler Körper, Goldkontur mit weichem Leuchten, feine Federlinien */
.kraehe { filter: drop-shadow(0 0 1.5px rgba(241, 220, 196, .7)) drop-shadow(0 0 9px rgba(214, 166, 121, .55)); pointer-events: none; }
.kraehe .k { fill: #2b2340; stroke: url(#crow-gold); stroke-width: 6.5; stroke-linejoin: round; }
.kraehe .k-linie { fill: none; stroke: #e7c9a5; stroke-opacity: .55; stroke-width: 2.6; stroke-linecap: round; }
.kraehe .k-auge { fill: var(--gold); }
:root[data-theme="light"] .kraehe { filter: drop-shadow(0 2px 4px rgba(60, 40, 20, .3)); }
:root[data-theme="light"] .kraehe .k { fill: #3d2b1f; stroke: #8B5A2B; }
:root[data-theme="light"] .kraehe .k-linie { stroke: #d9b58c; }
.tipp-luecke { fill: none; stroke: var(--luecke); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 7 5; }
.tipp-ring { fill: none; stroke: var(--luecke); stroke-width: 2; }
.tipp-kern { fill: var(--luecke); }
.tipp-marke { animation: tipp-auf .35s ease-out; transform-box: fill-box; }
@keyframes tipp-auf { from { opacity: 0; } }
.tipp-text, .luecke-text { font-family: var(--font-display); font-weight: 700; paint-order: stroke; stroke: #15122a; stroke-linejoin: round; stroke-width: 3px; }
.tipp-text { font-size: 11px; fill: #ffb0b0; }
.luecke-text { font-size: 12px; fill: var(--luecke); }
:root[data-theme="light"] .tipp-text, :root[data-theme="light"] .luecke-text { stroke: #fff; }
:root[data-theme="light"] .tipp-text { fill: #b3261e; }

.frage { margin-top: 16px; }
.frage-text {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3.4vw, 1.55rem);
  margin: 0 0 10px;
}
/* Eingabe 60 %, Guess/Next 40 % der Zeile (nur einer der beiden Knöpfe ist sichtbar) */
.eingabe-reihe { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; align-items: stretch; }
.eingabe-feld { position: relative; display: flex; min-width: 0; }
.eingabe-reihe .btn { width: 100%; white-space: nowrap; font-size: 1.05rem; }
.eingabe {
  font: inherit;
  font-size: 1.15rem;
  width: 100%;
  padding: 12px 52px 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.eingabe:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.eingabe:disabled { opacity: 0.7; }
.einheit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-weight: 700;
  pointer-events: none;
}

.ergebnis { min-height: 1.5em; margin: 12px 0 0; font-size: 1.05rem; }
.ergebnis.info { color: var(--ink-muted); }
/* Ergebniskarte nach dem Tipp */
.karte-ergebnis {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 24px;
  padding: 14px 18px; border-radius: var(--radius); background: var(--bg-panel);
  border: 1px solid var(--line); animation: erg-auf .35s ease-out;
}
@keyframes erg-auf { from { opacity: 0; transform: translateY(6px); } }
.karte-ergebnis.gut { border-color: color-mix(in srgb, var(--mint) 55%, var(--line)); }
.karte-ergebnis.mittel { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }
.karte-ergebnis.schlecht { border-color: color-mix(in srgb, var(--coral) 55%, var(--line)); }
.erg-kopf { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.urteil { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.gut .urteil { color: var(--mint); } .mittel .urteil { color: var(--amber); } .schlecht .urteil { color: var(--coral); }
:root[data-theme="light"] .mittel .urteil { color: #b07800; }
.erg-pkt { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
:root[data-theme="light"] .erg-pkt { color: #b07800; }
.erg-pkt small { font-size: .75rem; color: var(--ink-muted); font-weight: 600; }
.erg-verlust { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--coral); }
.erg-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.erg-zahlen div { min-width: 0; }
.erg-zahlen dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.erg-zahlen dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.erg-zahlen dd small { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--ink-muted); font-weight: 600; }
.erg-balken { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink-muted) 20%, transparent); overflow: hidden; }
.erg-balken i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--amber) 50%, var(--mint)); background-size: 1000px 100%; animation: balken-auf .7s ease-out; }
@keyframes balken-auf { from { width: 0 !important; } }

/* ---------- Ende ---------- */
.ende { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 16px; }
.e-titel { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.e-score { margin: 0; font-size: 1.3rem; }
.e-score strong { color: var(--gold); font-size: 1.6rem; }
:root[data-theme="light"] .e-score strong { color: #b07800; }
.e-balken { width: min(100%, 360px); height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink-muted) 22%, transparent); overflow: hidden; }
.e-balken i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--crow), var(--gold)); transition: width .9s ease-out; }
.e-schnitt { margin: 0; color: var(--ink-muted); }
.e-schnitt strong { color: var(--ink); }
.e-rekord {
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 16%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  font-weight: 700;
}
.e-liste { list-style: none; margin: 8px 0 14px; padding: 0; width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.e-liste li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 11px;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.e-liste img { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); vertical-align: -3px; }
.el-paar { flex: 1; line-height: 1.5; }
.el-pfeil { color: var(--gold); margin: 0 6px; }
.el-werte { color: var(--ink-muted); font-size: 0.85rem; text-align: right; font-variant-numeric: tabular-nums; }
.el-pkt { font-weight: 800; min-width: 3em; 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); }
.el-nr { width: 1.6em; text-align: right; color: var(--ink-muted); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.el-mini { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.el-mini i { display: block; height: 100%; opacity: .75; }
.el-mini i.gut { background: var(--mint); } .el-mini i.mittel { background: var(--amber); } .el-mini i.schlecht { background: var(--coral); }
.aktionen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 820px) {
  .start-hero { grid-template-columns: 1fr; gap: 18px; }
  .start-bild { order: -1; max-height: 230px; aspect-ratio: auto; height: 210px; }
  .start-bild img { width: auto; height: 100%; }
}
@media (max-width: 560px) {
  .s-reihe { display: none; }
  .karte-ergebnis { grid-template-columns: 1fr; padding: 12px 14px; }
  .erg-kopf { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .erg-zahlen dd { font-size: 1rem; }
  .tipp-text { font-size: 17px; stroke-width: 4px; }
  .luecke-text { font-size: 18px; stroke-width: 4px; }
  .weekly-teaser { flex-wrap: wrap; }
  .wt-status { margin-left: auto; }
  .zoom-btn { width: 34px; height: 34px; }
  .zoom-tipp { display: none; }
  .marke-stadt { font-size: 19px; stroke-width: 4.5px; }
  .marke-land { display: none; }
  .route-km { font-size: 19px; stroke-width: 4.5px; }
  .marke { r: 5.5; }
  .marke-puls { r: 10; }
  .e-liste li { flex-wrap: wrap; }
  .el-werte { width: 100%; text-align: left; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .wahl span, .weekly-teaser, .e-balken i { transition: none; }
  .start-bild img, .karte-ergebnis, .erg-balken i, .tipp-marke { animation: none; }
}
