/* PRICE · price.css
   Nur der Akzent wird aus tokens.css ueberschrieben, alles andere lebt in .stage.
   Farbe: gedecktes Flaschengruen (Geld, amtlich, ruhig) statt Familien-Orange. */

:root { --hue: 178; }

/* ---- Topbar-Zusatz: Streak ------------------------------------------- */
.streak {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: var(--s2);
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2);
}
.streak svg { width: 12px; height: 12px; fill: var(--accent); }

/* ---- Runde: der eine Bildschirm -------------------------------------- */
.round {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; flex: 1 1 auto; min-height: 0; gap: var(--s3);
}

/* ---- Piktogramm ------------------------------------------------------- */
.good { position: relative; flex: 0 0 auto; }
.good__art svg {
  width: 96px; height: 96px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.good__art svg .ac  { fill: var(--accent); stroke: none; }
.good__art svg .acs { stroke: var(--accent); }
/* Echte Umrisse (#718): gefuellte Silhouette statt Strich-Icon */
.good__art svg.foodfill { fill: var(--ink); stroke: none; color: var(--ink); }

.good__badge {
  position: absolute; right: -14px; bottom: -4px;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Ware, Ort, Zeitpunkt: drei ruhige Elemente ----------------------- */
.prompt { flex: 0 0 auto; margin: 0; }

/* Ort und Zeitpunkt sind die halbe Frage (#724: im Live-Test uebersehen).
   Esteban, zweite Runde: «zu cluttert». Darum GENAU zwei Zeilen ueber dem
   Lineal: der Name und darunter «Switzerland · July 2026» in voller Tinte,
   ohne Ortsmarke, ohne dritte Zeile. Die Menge traegt das Chip am Bild
   (1 kg), die Sorten-Zeile (.spec) ist raus. */
.stamp {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  margin: calc(-1 * var(--s1)) 0 0;
  font-size: var(--t-md); font-weight: 500; color: var(--ink);
}
.stamp__sep { width: 3px; height: 3px; border-radius: var(--r-full); background: var(--ink-3); }
.stamp__when { font-variant-numeric: tabular-nums; }
.spec { display: none; }

/* ---- Tipp-Reihe: nur da, wenn die Ware wirklich einen Anker hat -------- */
.aid {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 0;
}
.aid:empty { display: none; }
.hint { flex: 0 0 auto; margin: 0; max-width: 34ch; text-wrap: pretty; }

/* ---- Das Zieh-Feld ---------------------------------------------------- */
.dial {
  position: relative;
  width: 100%; flex: 1 1 auto; min-height: 176px;
  touch-action: none;
  cursor: ns-resize;
  -webkit-user-select: none; user-select: none;
}
.dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--r-md); }

/* Lineal rechts: die Achse verraet nichts ueber die Antwort (fester Bereich) */
.ruler { position: absolute; inset: 0 0 0 auto; width: 58px; pointer-events: none; }
.ruler::before {                          /* die Achse selbst */
  content: ""; position: absolute; left: 0; top: 26px; bottom: 26px;
  width: 1px; background: var(--line);
}
.tick {
  position: absolute; left: 0; right: 0; transform: translateY(-50%);
  display: flex; align-items: center; gap: 7px;
  font-size: var(--t-xs); color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
  white-space: nowrap;
}
.tick::before { content: ""; width: 5px; height: 1px; background: var(--line); flex: 0 0 auto; }
.tick--major::before { width: 10px; background: var(--line-strong); }
.tick--major { color: var(--ink-2); font-weight: 600; }

/* Die Grenze der Waehrungseinheit (#724): eine Linie beim Wert 1 (CHF, $)
   bzw. 100 p, quer durch das Zieh-Feld bis zur Achse, dort setzt die
   Hauptmarke sie fort. Beschriftung rechts, weil die grosse Zahl links
   sitzt und die Linie dort ohnehin ueberdeckt, sobald der Griff nah ist.
   Tinte 2 statt Haarlinie: sie muss auch beim Blinzeln stehen. */
.unit {
  position: absolute; left: 0; right: 58px; height: 0;
  border-top: 1px solid var(--ink-2);
  pointer-events: none;
}
.unit__hi, .unit__lo {
  position: absolute; right: var(--s3); z-index: 1;   /* ueber der Marker-Linie, unter dem Wahrheits-Marker */
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-3);
  line-height: 1; white-space: nowrap;
}
.unit__hi { bottom: 5px; }
.unit__lo { top: 6px; }

/* Marker: die Zahl reitet auf ihrer Linie */
.mk {
  position: absolute; left: 0; right: 58px;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}
.mk__num { display: flex; align-items: baseline; gap: 6px; flex: 0 0 auto; }
.mk__cur {
  font-style: normal; font-size: var(--t-sm); font-weight: 500;
  letter-spacing: 0; color: var(--ink-3);
}
.mk .mega { font-size: calc(var(--t-mega) * .72); }
.mk__line { flex: 1 1 auto; height: 2px; border-radius: 2px; }

.mk--guess .mk__line { background: var(--accent); }
.mk--guess .mega     { color: var(--ink); transition: font-size var(--d-mid) var(--ease), color var(--d-mid) var(--ease); }
.dial[data-locked] .mk--guess .mega { font-size: var(--t-lg); color: var(--ink-3); }
.dial[data-locked] .mk--guess .mk__cur { color: var(--ink-3); opacity: .6; }
.dial[data-locked] .mk--guess .mk__line { background: var(--accent-line); }

.mk--truth { z-index: 2; }
.mk--truth .mk__line { background: var(--ink); }
.mk--truth .mega { color: var(--ink); }

/* Der Abstand zwischen beiden Markern IST die Botschaft */
.gap { position: absolute; right: 58px; width: 0; }
.gap__bar {
  position: absolute; left: -2px; top: 0; width: 4px; height: 100%;
  border-radius: 2px; background: var(--accent);
  transform-origin: top;
}
.gap__tag {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* Zieh-Hinweis ohne ein Wort Text: der Griff sitzt an der Zahl, nicht irgendwo */
.nudge {
  flex: 0 0 auto; width: 20px; height: 34px;
  color: var(--ink-3); opacity: .55;
  animation: bob 2.4s var(--ease) infinite;
}
.nudge svg { width: 20px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dial[data-touched] .nudge { opacity: .2; animation: none; }
.dial[data-locked] .nudge { opacity: 0; animation: none; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ---- Zahleneingabe neben der Geste ------------------------------------ */
/* Zweiter Weg zum selben Wert. Sie sitzt UNTER der Achse, weil sie der
   Praezisions-Weg ist und die Geste der Kern bleibt. */
.numrow {
  flex: 0 0 auto;
  display: flex; align-items: baseline; justify-content: center; gap: var(--s2);
  padding-top: var(--s1);
}
.numrow__lab {
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-3);
}
.numrow .numfield { padding-block: 4px; }
.numrow .numfield__in { font-size: var(--t-lg); }
.numrow .numfield__in:disabled { color: var(--ink-3); }

/* ---- Reveal-Sheet ----------------------------------------------------- */
/* Das Sheet haengt an .stage, unter der Buehne liegt aber noch das Dock:
   ohne das hier wuerde es im geschlossenen Zustand dort hineinragen. */
.sheet:not([data-open]) { visibility: hidden; pointer-events: none; }
.sheet {
  transition: transform var(--d-slow) var(--ease-o), visibility 0s linear var(--d-slow);
  display: flex; flex-direction: column;
  max-height: 100%;                 /* die Taste bleibt IMMER sichtbar */
  /* .stage ist der Bezug, nicht .app: ohne das stuende das Blatt als Karte
     in der Karte, mit Rand auf beiden Seiten. */
  left: calc(var(--s5) * -1); right: calc(var(--s5) * -1);
  bottom: calc(max(var(--s4), env(safe-area-inset-bottom)) * -1);
}
.sheet[data-open] { transition: transform var(--d-slow) var(--ease-o), visibility 0s; }
.sheet__body {
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Der Faktor ist die Kopfzeile des Reveals, nicht mehr eine Punktzahl. */
.factor { margin: 0 0 var(--s1); }
.sheet__verdict { margin: 0 0 var(--s1); font-variant-numeric: tabular-nums; }
/* Die Einordnung sitzt direkt ueber dem Simulations-Hinweis, damit die
   Beschriftung beide Aussagen traegt. */
.beat { margin: var(--s1) 0 0; font-variant-numeric: tabular-nums; }
.napkin p { margin: 0; }
.sheet__rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 var(--s3); }
.sheet__note {
  margin: 0 0 var(--s2); font-size: var(--t-xs); color: var(--ink-3); line-height: 1.45;
  max-width: 42ch;
}
.sheet__lic, .sheet__note, .sheet__rule { display: none !important; }
.sheet .btn { width: 100%; }

/* ---- Tagesabschluss ---------------------------------------------------- */
.day {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; gap: var(--s4);
}
.day .label { margin: 0; }

/* Alle fuenf Runden auf einen Blick: was es war, wie weit daneben, wohin.
   Das loest den alten Balken-Chart ab, der zwar die Richtung zeigte, aber
   nie verriet, WELCHE Ware man verfehlt hat. */
.srow__what small {
  display: block; margin-top: 1px;
  font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums;
}

/* Der Tageswert ist ein FAKTOR, keine Punktzahl. Das Mal-Zeichen gehoert
   darum in dieselbe Groessenordnung wie die Zahl, nicht als Fussnote daneben,
   und "kleiner ist besser" muss einmal dastehen. */
.total {
  margin: 0; text-align: center;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.total__x {
  font-size: calc(var(--t-mega) * .52); font-weight: 700;
  letter-spacing: var(--tight); color: var(--ink-2);
}
.totalblock { display: flex; flex-direction: column; align-items: center; }
.totalcap {
  margin: 2px 0 0; max-width: 30ch; text-align: center; text-wrap: balance;
  font-size: var(--t-xs); color: var(--ink-3); line-height: 1.4;
}
.quip {
  margin: 0; max-width: 26ch; text-align: center; text-wrap: balance;
  font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5;
}

/* ---- Kurze Buehne ------------------------------------------------------
   Die Runde traegt seit #703 zwei Reihen mehr (Tipp und Zahleneingabe).
   Der Ring gibt in dieser Reihenfolge nach: Bild, Achse, Zwischenraum. */
@media (max-height: 760px) {
  .good__art svg { width: 78px; height: 78px; }
  .dial { min-height: 148px; }
  .srow { padding-block: var(--s2); }
}
@media (max-height: 700px) {
  .good__art svg { width: 68px; height: 68px; }
  .dial { min-height: 132px; }
  .round { gap: var(--s2); }
  .day { gap: var(--s3); }
  /* Das Piktogramm ist jetzt schmaler als die Mengen-Plakette. Ueber Eck
     gelegt wuerde sie die Ware verdecken, also stellt sie sich daneben. */
  .good { display: flex; align-items: center; gap: var(--s2); }
  .good__badge { position: static; }
}
@media (max-height: 620px) {
  .good__art svg { width: 54px; height: 54px; }
  .mk .mega { font-size: var(--t-xl); }
  .dial { min-height: 112px; }
  .round { gap: 6px; }
  .numrow { padding-top: 0; }
  .numrow .numfield__in { font-size: var(--t-md); }
  .srow { padding-block: 5px; }
  /* Ort und Zeitpunkt bleiben stehen: ohne sie waeren zwei Reihen desselben
     Guts aus verschiedenen Epochen nicht zu unterscheiden ("Milk" 1914 gegen
     "Milk" 2025). Der Platz dafuer ist auch auf der kurzen Buehne da. */
  .srow__what { font-size: var(--t-xs); }
  .srow__what small { font-size: var(--t-xs); }
  /* Der Ring ist auf 6px geschrumpft: die Menge/Sorte rueckt nicht mehr
     in die Ort-Datum-Zeile hinein. */
  .totalcap { font-size: var(--t-xs); }
  /* Der Tipp wird enger, aber NIE ausgeblendet: wer ihn geholt hat, muss ihn
     auch lesen koennen. Die Menge im Badge bleibt aus demselben Grund stehen,
     sie ist Teil der Frage (Kilo oder Stueck). */
  .hint { padding: var(--s2) var(--s3); font-size: var(--t-xs); max-width: 40ch; }
}

/* Fallback, falls color-mix fehlt: --accent-line waere sonst orange */
