/* ============================================================
   Mapped by Stubbs – Bausteine „Tinte & Elfenbein" (seit 30.09.2026)
   Regeln: DESIGN.md. Gate: tests/design-system.test.js.

   Neue Screens bauen aus diesen Klassen:
   · genau EINE Hauptaktion je Screen → .btn-ink (auf Nacht: .btn-ivory)
   · Nebenaktionen leise → .btn-paper / .btn-ghost / .btn-link
   · Auswahl → .chip-ink / .tile-ink / .seg-ink (gewählt = Tinte, nie Grün)
   · Überzeilen → .eyebrow-ink, „Neu" → .label-new (Messing)
   · Spots auf Karten → .pin-sym (+ SpotSymbol aus js/spot-symbol.js)
   · Stubbs spricht → .stubbs-bubble (einzige Stelle für Orange + Caveat)
   Keine Verläufe auf Buttons, kein Glow, keine farbigen Kästen.
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────── */
.btn-ink, .btn-paper, .btn-ghost, .btn-ivory {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px;
  font: 600 15.5px/1.15 var(--font-sans); letter-spacing: .003em; text-align: center;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.btn-ink { background: var(--ink); color: #fff; box-shadow: var(--btn-shadow); }
.btn-ink:hover { background: #2d2e2b; }
.btn-paper { background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 1px 2px rgba(27, 28, 26, .06), inset 0 0 0 1px var(--hair); }
.btn-paper:hover { background: #fff; box-shadow: 0 1px 2px rgba(27, 28, 26, .06), inset 0 0 0 1px var(--hair-2); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn-ghost:hover { background: rgba(27, 28, 26, .04); }
.btn-ivory { background: var(--night-ink); color: var(--ink); }
.btn-ivory:hover { background: #fff; }
.btn-ink:active, .btn-paper:active, .btn-ghost:active, .btn-ivory:active { transform: scale(.98); }
.btn-ink[aria-disabled="true"], .btn-ink:disabled,
.btn-paper[aria-disabled="true"], .btn-paper:disabled { opacity: .38; cursor: default; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14.5px; gap: 8px; }
.btn-block { display: flex; width: 100%; }
.btn-ink .material-symbols-outlined, .btn-paper .material-symbols-outlined,
.btn-ghost .material-symbols-outlined, .btn-ivory .material-symbols-outlined { font-size: 20px; }

/* Textlink als Nebenaktion („Später", „Nochmal fliegen") */
.btn-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 4px; border: 0; background: none;
  font: 600 14.5px/1.2 var(--font-sans); color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn-link--mute { color: var(--ink-2); font-weight: 500; }
.btn-link--line { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--hair-2); }
.btn-link--danger { color: var(--danger); }

.btn-ink:focus-visible, .btn-paper:focus-visible, .btn-ghost:focus-visible, .btn-link:focus-visible,
.chip-ink:focus-visible, .tile-ink:focus-visible, .seg-ink > :focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
.btn-ivory:focus-visible, .night .btn-link:focus-visible { outline: 2px solid var(--night-ink); outline-offset: 3px; }

/* ── Schrift ─────────────────────────────────────────────── */
.eyebrow-ink { font: 600 11px/1.25 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.label-new { font: 600 10.5px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.display-ink { font-family: var(--font-display); font-weight: 400; line-height: .92; letter-spacing: .004em; color: var(--ink); }
.meta-ink { font-size: 13px; line-height: 1.45; color: var(--ink-3); }

/* ── Auswahl: Chip, Kachel, Segment ──────────────────────── */
.chip-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2);
  font: 500 14.5px/1 var(--font-sans); white-space: nowrap; cursor: pointer;
}
.chip-ink.is-active, .chip-ink.is-on, .chip-ink[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; font-weight: 600; }
.chip-ink--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
/* Eigene Regeln (wie bei .seg-ink): Chip als <label> um ein Radio/Checkbox — gewählt = Tinte */
.chip-ink:has(input:checked) { background: var(--ink); color: #fff; box-shadow: none; font-weight: 600; }
.chip-ink:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.tile-ink {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 20px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair); font: 600 14.5px/1.15 var(--font-sans); text-align: center; cursor: pointer;
}
.tile-ink.is-active, .tile-ink.is-on, .tile-ink[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tile-ink.is-off, .tile-ink:disabled { color: var(--ink-4); background: transparent; cursor: default; }
.tile-ink__tick {
  position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px;
}

.seg-ink { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 18px; background: var(--ivory-2); }
.seg-ink > * { padding: 12px 10px 13px; border-radius: 14px; text-align: center; color: var(--ink-2); font: 500 14.5px/1.25 var(--font-sans); cursor: pointer; }
.seg-ink > .is-active, .seg-ink > .is-on, .seg-ink > [aria-pressed="true"] {
  background: var(--paper); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(27, 28, 26, .08), 0 4px 14px rgba(27, 28, 26, .06);
}
/* Eigene Regel: ein unbekanntes :has() würde in alten Browsern die ganze Liste oben kippen */
.seg-ink > :has(input:checked) {
  background: var(--paper); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(27, 28, 26, .08), 0 4px 14px rgba(27, 28, 26, .06);
}

/* ── Listen, Zahlen, Linien ──────────────────────────────── */
.hairline { height: 1px; background: var(--hair); border: 0; }
.list-ink { list-style: none; margin: 0; padding: 0; }
.list-ink > li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hair); font: 500 15px/1.35 var(--font-sans); color: var(--ink); }
.list-ink > li:last-child { border-bottom: 1px solid var(--hair); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-grid > * { padding: 16px 0 15px; border-top: 1px solid var(--hair); }
.stat-grid > :nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--hair); }
.stat-grid > :nth-child(even) { padding-left: 20px; }
.stat-grid b { display: block; font: 400 36px/1 var(--font-display); color: var(--ink); letter-spacing: .01em; }
.stat-grid b small { font: 500 15px/1 var(--font-sans); margin-left: 4px; color: var(--ink-2); letter-spacing: 0; }

/* ── Spot-Symbole ────────────────────────────────────────── */
/* Im Fließtext (Chips, Listen): erbt die Textfarbe. SVG kommt aus SpotSymbol.svg(). */
svg.si { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -0.22em; }

/* Karten-Pin: weißer Kreis, Tinte-Ring, schwarzes Symbol, Nummer als Abzeichen.
   Ziel/aktiv = invertiert, erledigt = grau, klein = Überblick. */
.pin-sym {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 0 0 1.5px var(--ink), 0 3px 10px rgba(27, 28, 26, .24);
  transition: transform var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.pin-sym > svg { width: 18px; height: 18px; stroke-width: 1.9; }
.pin-sym__no {
  position: absolute; top: -6px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--ink); color: #fff; font: 700 9.5px/16px var(--font-sans); text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #fff;
}
.pin-sym.is-active {
  width: 46px; height: 46px; background: var(--ink); color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(27, 28, 26, .32), 0 0 0 13px rgba(27, 28, 26, .10);
}
.pin-sym.is-active > svg { width: 23px; height: 23px; }
.pin-sym.is-active .pin-sym__no { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.pin-sym.is-done { color: #9aa197; box-shadow: 0 0 0 1.5px #b3b8af, 0 3px 8px rgba(27, 28, 26, .15); }
.pin-sym.is-done .pin-sym__no { background: #b3b8af; }
.pin-sym.is-sm { width: 25px; height: 25px; box-shadow: 0 0 0 1.25px var(--ink), 0 2px 6px rgba(27, 28, 26, .22); }
.pin-sym.is-sm > svg { width: 13px; height: 13px; stroke-width: 2; }
.pin-sym.is-sm .pin-sym__no { top: -6px; right: -7px; min-width: 14px; height: 14px; padding: 0 3px; font-size: 8.5px; line-height: 14px; }
.pin-sym.is-sm.is-done { box-shadow: 0 0 0 1.25px #b3b8af, 0 2px 6px rgba(27, 28, 26, .15); }
/* Pausen (Café, Restaurant, Bar): leicht hervorgehoben in Karamell — einzige Kategorie mit Farbe (DESIGN.md §2).
   inaktiv: cremefarben mit Karamell-Ring; Ziel/aktiv: Karamell gefüllt; erledigt bleibt grau. */
.pin-sym.is-pause { background: var(--pause-soft); color: var(--pause); box-shadow: 0 0 0 1.5px var(--pause), 0 3px 10px rgba(27, 28, 26, .22); }
.pin-sym.is-pause .pin-sym__no { background: var(--pause); }
.pin-sym.is-pause.is-active { background: var(--pause); color: #fff; box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(27, 28, 26, .30), 0 0 0 13px rgba(154, 90, 36, .16); }
.pin-sym.is-pause.is-active .pin-sym__no { background: #fff; color: var(--pause-ink); box-shadow: 0 0 0 2px var(--pause); }
.pin-sym.is-pause.is-done { background: #fff; color: #9aa197; box-shadow: 0 0 0 1.5px #b3b8af, 0 3px 8px rgba(27, 28, 26, .15); }
.pin-sym.is-pause.is-done .pin-sym__no { background: #b3b8af; }
.pin-sym.is-pause.is-sm { box-shadow: 0 0 0 1.25px var(--pause), 0 2px 6px rgba(27, 28, 26, .2); }
.pin-sym.is-pause.is-sm.is-done { box-shadow: 0 0 0 1.25px #b3b8af, 0 2px 6px rgba(27, 28, 26, .15); }
/* Alternative einer Pause (Rundflug): gestrichelter Ring, ohne Nummer */
.pin-sym.is-pause.is-ghost { background: rgba(255, 255, 255, .9); box-shadow: 0 3px 10px rgba(27, 28, 26, .18); outline: 2px dashed var(--pause); outline-offset: -1px; }
.pin-sym.is-pause.is-ghost .pin-sym__no { display: none; }

/* ── Quellen (ⓘ) ─────────────────────────────────────────── */
/* Leiser Knopf „ⓘ Quellen" an Spot-Karte und Spot-Fenster; die Liste klappt darunter
   auf — Haarlinien, Tinte, kein farbiger Kasten. HTML: SourcesInfo.render() (js/sources-info.js). */
.src-info { margin-top: 12px; }
.src-info__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 12.5px/1.2 var(--font-sans); color: var(--ink-3);
  -webkit-tap-highlight-color: transparent;
}
.src-info__btn:hover { color: var(--ink-2); }
.src-info__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.src-info__i { width: 16px; height: 16px; flex: none; }
.src-info__list { list-style: none; margin: 6px 0 0; padding: 0; }
.src-info__list[hidden] { display: none; }
.src-info__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px;
  padding: 9px 0; border-top: 1px solid var(--hair);
  font: 400 12.5px/1.45 var(--font-sans); color: var(--ink-2);
}
.src-info__row:last-child { border-bottom: 1px solid var(--hair); }
.src-info__kind { font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.src-info__what { min-width: 0; overflow-wrap: anywhere; }
.src-info__what a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.src-info__meta { display: block; color: var(--ink-3); }

/* ── Stubbs ──────────────────────────────────────────────── */
/* Zylinder statt Taube (Nutzer 26.09.2026): assets/stubbs-hat-256.webp */
.stubbs-hat { width: 44px; height: 44px; object-fit: contain; flex: none; }
/* Die EINZIGE Stelle für Orange + Caveat. Richtung des Zipfels per Modifier. */
.stubbs-bubble {
  position: relative; display: inline-block; background: var(--stubbs); color: #fff;
  font: 700 21px/1.02 var(--font-voice); padding: 9px 15px 10px; border-radius: 16px;
  box-shadow: 0 8px 20px rgba(253, 139, 0, .22);
}
.stubbs-bubble::after { content: ''; position: absolute; width: 13px; height: 13px; background: var(--stubbs); border-radius: 3px; transform: rotate(45deg); }
.stubbs-bubble--left::after { left: -4px; top: calc(50% - 6.5px); }
.stubbs-bubble--right::after { right: -4px; top: calc(50% - 6.5px); }
.stubbs-bubble--down::after { left: 26px; bottom: -4px; }
.stubbs-bubble--up::after { left: 26px; top: -4px; }

/* ── Nachtkapitel ────────────────────────────────────────── */
.night { background: var(--night); color: var(--night-ink); }
.night .eyebrow-ink { color: var(--brass-night); }
.night .label-new { color: var(--brass-night); }
.night .display-ink { color: var(--night-ink); }
.night .meta-ink { color: var(--night-mute); }
.night .list-ink > li { border-color: var(--night-hair); color: var(--night-ink); }
.night .btn-link { color: var(--night-ink); }
.night .btn-ghost { color: var(--night-ink); box-shadow: inset 0 0 0 1px var(--night-hair); }

@media (prefers-reduced-motion: reduce) {
  .btn-ink, .btn-paper, .btn-ghost, .btn-ivory, .pin-sym { transition: none; }
}
