/* ==========================================================================
   Schattenjagd — Oberfläche im Organic-Designsystem
   --------------------------------------------------------------------------
   Drei Schritte, eine Karte: Linie wählen, Richtung wählen, Antwort lesen.
   Kein Streckenband über der Antwort, keine Uhrzeitwahl, keine 3D-Grafik —
   das alles stand im ersten Wurf ("Schattenjagd v1") und ging in der
   Überarbeitung bewusst raus. Was blieb bzw. dazukam: Symbol bei der
   Richtung, speicherbare Lieblingsrouten samt Gegenrichtung, ein kleines
   optionales Detail zu Einstieg und Streckenverlauf.

   Farben, Schriften, Abstände, Radien und Schatten kommen ausschliesslich
   aus den Tokens unten — sie sind aus dem Organic-Designsystem übernommen
   (siehe Claude-Design-Handoff), nicht neu erfunden.
   ========================================================================== */

/* Caprasimo/Figtree selbst gehostet statt per Google-Fonts-CDN geladen —
   die harte CSP dieser Seite erlaubt ohnehin nur 'self', und so bleibt es
   bei "rein clientseitig, ohne Tracking". */
@import url("fonts/fonts.css");

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;

  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  /* Die zwei Leitfarben der Sonnenrechnung — dieselbe Bedeutung wie überall
     im Projekt: warm ist Sonne, kühl ist Schatten. */
  --sun-tint: #f6a06b;
  --shade-tint: #3d472b;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--color-bg); }
body {
  color: var(--color-text); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; margin: 0; }
button, select { font: inherit; color: inherit; border: 0; background: none; }
button { cursor: pointer; }
a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@keyframes rise { from { transform: translateY(14px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes bounceIn { 0% { transform: scale(.7) rotate(-3deg); opacity: 0 } 55% { transform: scale(1.06) rotate(1deg); opacity: 1 } 100% { transform: scale(1) rotate(0) } }
@keyframes nudge { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(214,127,72,.55) } 50% { box-shadow: 0 0 0 10px rgba(214,127,72,0) } }

/* ------------------------------------------------------------- Gerüst --- */
.page {
  min-height: 100dvh; display: flex; justify-content: center;
  padding: var(--space-6) var(--space-4) var(--space-8);
  padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
  padding-top: calc(var(--space-6) + env(safe-area-inset-top));
}
.wrap { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: var(--space-6); }

/* --------------------------------------------------------------- Kopf --- */
.kopf { display: flex; align-items: center; gap: var(--space-2); }
.kopf .sonnenpunkt {
  width: 26px; height: 26px; border-radius: 999px; background: var(--sun-tint);
  animation: nudge 3.5s ease-in-out infinite; flex: none;
}
.kopf .marke { font-family: var(--font-heading); font-size: 21px; letter-spacing: -0.015em; }
.kopf .status {
  margin-left: auto; display: flex; align-items: center; gap: var(--space-2);
  font-size: 13px; font-weight: 600; color: var(--color-neutral-700);
}
.kopf .grad {
  padding: 3px 10px; border-radius: 999px; background: var(--color-accent-200); color: var(--color-accent-800);
}

/* --------------------------------------------------------------- Schritt */
.schritt { display: flex; flex-direction: column; gap: var(--space-4); animation: rise .3s ease both; }
.schritt h2 { font-size: 32px; line-height: 1.12; letter-spacing: -0.015em; }

/* ---------------------------------------------------------- Favoriten --- */
.favoriten { display: flex; flex-direction: column; gap: var(--space-2); }
.favoriten-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--color-neutral-600); }
.fav-zeile { display: flex; align-items: center; gap: var(--space-2); }
.fav-gehe {
  flex: 1; display: flex; align-items: center; gap: var(--space-2); min-height: 56px; padding: 10px 16px;
  border-radius: 999px; background: var(--color-surface); text-align: left;
  transition: transform .14s ease, background .14s ease;
}
.fav-gehe:hover { background: var(--color-neutral-300); }
.fav-gehe:active { transform: scale(.97); }
.fav-marke {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 9px;
  border-radius: 999px; font-family: var(--font-heading); font-size: 15px; flex: none;
}
.fav-ziel { font-size: 16px; font-weight: 700; }
.fav-dreh {
  width: 48px; height: 48px; border-radius: 999px; background: var(--color-accent-200); color: var(--color-accent-800);
  font-size: 19px; font-weight: 700; transition: background .14s ease; flex: none;
}
.fav-dreh:hover { background: var(--color-accent-300); }
.fav-entfernen {
  width: 40px; height: 48px; border-radius: 999px; color: var(--color-neutral-600); font-size: 18px; flex: none;
}
.fav-entfernen:hover { color: var(--color-text); }

/* ------------------------------------------------------------ Linien --- */
.linien-raster { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.linie-btn {
  min-height: 92px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  font-family: var(--font-heading); font-size: 34px; letter-spacing: -0.01em;
  transition: transform .14s ease;
}
.linie-btn:hover { transform: translateY(-2px); }
.linie-btn:active { transform: scale(.94); }
.linie-btn--breit { grid-column: 1 / span 2; }

/* --------------------------------------------------------- Richtungen --- */
.richtung-kopf { display: flex; align-items: center; gap: var(--space-3); }
.richtung-linie {
  width: 46px; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 20px; flex: none;
}
.richtungen { display: grid; gap: var(--space-3); }
.richtung-btn {
  display: flex; align-items: center; gap: var(--space-3); text-align: left; min-height: 78px; padding: 14px 22px;
  border-radius: 999px; background: var(--color-surface); color: var(--color-text);
  transition: transform .14s ease, background .14s ease;
}
.richtung-btn:hover { background: var(--color-neutral-300); }
.richtung-btn:active { transform: scale(.97); }
.richtung-btn svg { flex: none; }
.richtung-text { display: flex; flex-direction: column; gap: 2px; }
.richtung-label { font-size: 20px; font-weight: 700; line-height: 1.15; }
.richtung-von { font-size: 13px; font-weight: 600; color: var(--color-neutral-700); }

.zurueck-link {
  align-self: flex-start; color: var(--color-neutral-700); font-size: 15px; font-weight: 600; padding: 8px 0;
}

/* ------------------------------------------------------------ Antwort --- */
.antwort-kopf { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 600; color: var(--color-neutral-700); }
.antwort-linie {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 999px; font-family: var(--font-heading); font-size: 16px; flex: none;
}
.fav-umschalten {
  margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; transition: transform .14s ease;
}
.fav-umschalten:active { transform: scale(.95); }

.karte {
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-4) var(--space-4);
  background: var(--shade-tint); color: var(--color-neutral-100); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.antwort-wort {
  font-family: var(--font-heading); font-size: clamp(58px, 19vw, 96px); line-height: .9; letter-spacing: -0.02em;
  animation: bounceIn .5s cubic-bezier(.2,.9,.3,1.2) both;
}
.antwort-sub { font-size: 19px; font-weight: 700; }

/* -------------------------------------------------------------- Plan --- */
.plan { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.plan-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; opacity: .6; }
.plan-raster {
  width: 100%; display: grid; grid-template-columns: 7px 1fr 1fr 26px 1fr 1fr 7px; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: rgba(249,244,237,.08);
}
.plan-schiene { grid-row: 1 / span 2; border-radius: 999px; }
.plan-schiene--links { grid-column: 1; background: rgba(249,244,237,.55); }
.plan-schiene--rechts { grid-column: 7; background: rgba(249,244,237,.55); }
.plan-gang { grid-column: 4; grid-row: 1 / span 2; border-radius: 999px; background: rgba(249,244,237,.14); }
.sitz {
  aspect-ratio: 1/1; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.plan-fuss-links { grid-column: 1 / span 3; grid-row: 3; font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: .65; }
.plan-fuss-gang { grid-column: 4; grid-row: 3; font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .65; text-align: center; }
.plan-fuss-rechts { grid-column: 5 / span 3; grid-row: 3; font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: .65; text-align: right; }

.naechste-fahrt {
  align-self: center; padding: 14px 26px; border-radius: 999px; background: var(--color-accent); color: var(--color-accent-100);
  font-size: 16px; font-weight: 700; box-shadow: var(--shadow-md); transition: transform .14s ease, background .14s ease;
}
.naechste-fahrt:hover { background: var(--color-accent-600); }
.naechste-fahrt:active { transform: scale(.96); }

/* ------------------------------------------------------------- Detail --- */
.detail-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.detail-umschalten { align-self: center; color: var(--color-neutral-600); font-size: 12px; font-weight: 600; padding: 4px 0; }
.detail {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface); font-size: 12px; color: var(--color-neutral-800); animation: rise .25s ease both;
}
.detail label { display: flex; flex-direction: column; gap: 6px; }
.detail label span { font-weight: 700; letter-spacing: .08em; }
.detail select {
  font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--color-divider);
  background: var(--color-neutral-100); color: var(--color-text); cursor: pointer;
}
.band { display: flex; gap: 3px; height: 26px; }
.band i { border-radius: 6px; display: block; }
.band-beine { display: flex; justify-content: space-between; font-weight: 600; color: var(--color-neutral-700); }
.detail-text { line-height: 1.5; }
.legende { display: flex; flex-wrap: wrap; gap: var(--space-3); color: var(--color-neutral-700); }
.legende span { display: flex; align-items: center; gap: 5px; }
.legende i { width: 11px; height: 11px; border-radius: 999px; display: block; }

/* -------------------------------------------------------------- Fuss --- */
.zurueck-fuss {
  display: block; text-align: center; padding: 11px; border-radius: var(--radius-md);
  color: var(--color-neutral-700); font-size: 14px; font-weight: 700;
  background: var(--color-surface); border: 1px solid var(--color-divider); box-shadow: var(--shadow-sm);
}
.zurueck-fuss:hover { color: var(--color-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
