/* ICON-ZENTRIERUNG (Vermerk 08.07.2026): Unicode-Glyphen/Emoji (↻ ✎ 🔔 ✉ ᚺ …)
   sitzen NICHT mittig in ihrer eigenen Zeichen-Box — Fonts geben ihnen
   asymmetrische Seitenränder. `display:grid/flex + place-items/align:center`
   zentriert nur die BOX, nicht die sichtbare Tinte; das Symbol wirkt dann
   verschoben, obwohl die CSS-Zentrierung „korrekt" ist. Für präzise Mitte:
   Inline-SVG mit symmetrischem, quadratischem viewBox (geometrisch zentrierbar)
   statt Glyph — oder ein bewusster, am gerenderten Bild verifizierter
   per-Glyph-Nudge (transform: translate). Blind gesetzte Nudges sind Raten.
   Gilt auch fürs PWA-App-Icon (icon.svg, Rune ᚺ mit y="52%"-Handnudge). */
:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1c212c;
  --border: #272d38;
  --text: #e9ebf0;
  --muted: #868f9e;
  --faint: #5b6573;
  --accent: #d4b366;       /* gedämpftes Gold — germanisch, nicht grell */
  --gold: #d4b366;
  --gold-bright: #f0d493;
  --gold-dim: #6e5d33;
  --danger: #c66;
  --ok: #6cab7a;
  /* Prioritäten */
  --prioA: #e8a13c;
  --prioB: #5aa6c4;
  --prioC: #6a7484;
  --prioD: #4a5260;
  /* Wyrd-Netz */
  --thread: rgba(212, 179, 102, 0.14);
  --star: rgba(212, 179, 102, 0.42);
  --pent: rgba(212, 179, 102, 0.10);
  --node-border: #2c3340;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 44%, rgba(212, 179, 102, 0.08), transparent 55%),
    radial-gradient(140% 120% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.6));
}

.screen { position: relative; z-index: 1; min-height: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); }

/* ---------- Login ---------- */
#login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
}
.rune { font-size: 56px; color: var(--gold); line-height: 1; font-family: Georgia, "Times New Roman", serif; }
.rune-sm { font-size: 22px; color: var(--gold); }
.login-card h1 { margin: 10px 0 4px; font-weight: 600; letter-spacing: 0.5px; }
#login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

input,
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
}
input:focus,
textarea:focus { border-color: var(--gold-dim); }

/* iOS: Safari zoomt beim Fokussieren eines Eingabefelds NUR, wenn dessen
   Schriftgröße < 16px ist. Alle fokussierbaren Felder (auch <select> und die
   kleineren .f-input/.sortsearch-input) hart auf 16px → kein Auto-Zoom mehr. */
input,
textarea,
select { font-size: 16px !important; }

button {
  background: var(--gold);
  color: #14110a;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.ghost {
  background: transparent;
  color: var(--faint);
  font-size: 18px;
  padding: 6px 10px;
}
button.back { font-size: 26px; line-height: 1; color: var(--muted); }
/* Inline-SVG-Icon: als Block auf em-Größe — der quadratische viewBox zentriert
   sich exakt in der bereits flex/grid-zentrierten Schaltfläche (08.07.2026). */
.ic { display: block; }  /* Größe kommt aus den width/height-Attributen (iOS-robust) */

/* ========== Hub: Wyrd-Netz ========== */
#hub { display: flex; flex-direction: column; height: 100%; }
.hub-top {
  position: relative;
  display: flex;
  align-items: center;
  padding: calc(16px + var(--safe-top)) 18px 4px;
}
.hub-spacer { width: 34px; flex: 0 0 auto; } /* balanciert das Zahnrad rechts */
.hail {
  flex: 1;
  text-align: center;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}
.hail b { color: var(--gold); font-weight: 600; }

/* Einstellungs-Menü (Zahnrad-Dropdown) */
.settings-menu {
  position: absolute;
  top: calc(48px + var(--safe-top));
  right: 14px;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.menu-item:active { background: var(--surface-2); }
.menu-item .mi-icon { font-size: 15px; width: 18px; text-align: center; color: var(--muted); }
.menu-item.on { color: var(--gold); }
.menu-item.on .mi-icon { color: var(--gold); }

.net { position: relative; flex: 1; }
svg.threads { position: absolute; inset: 0; width: 100%; height: 100%; }

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}
.disc {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #1b202b, var(--surface));
  border: 1px solid var(--node-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 0 14px rgba(212, 179, 102, 0.05);
}
.disc .rune { font-size: 27px; color: var(--gold); font-family: Georgia, "Times New Roman", serif; line-height: 1; }
.node .lbl { font-size: 11.5px; letter-spacing: 0.4px; color: var(--muted); }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #14110a;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.badge.warn { background: var(--gold-bright); }

/* Zentrum: Helgi */
.core {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}
.core-disc {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #2a2415, #15171e 70%);
  box-shadow: 0 0 44px rgba(212, 179, 102, 0.28), 0 0 14px rgba(212, 179, 102, 0.4),
    inset 0 0 26px rgba(212, 179, 102, 0.12);
}
.core-disc .rune {
  font-size: 56px;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  text-shadow: 0 0 18px rgba(240, 212, 147, 0.6);
}
/* Kreisende Not-Runen um den Kern. Der Container dreht sich, jede Rune
   gegenrotiert mit gleicher Dauer → das Glyph bleibt aufrecht. */
.orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 156px;
  height: 156px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}
/* Pro Rune ein eigener „Arm", der um den Kern rotiert (eigene Dauer/Phase →
   organische Drift). Die Rune im Arm gegenrotiert gleich schnell = aufrecht. */
.orbit-arm {
  position: absolute;
  inset: 0;
  animation: orbit-spin 90s linear infinite;
}
.orbit-rune {
  position: absolute;
  left: 50%;
  display: block;
  transform: translate(-50%, -50%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
  opacity: 0.42; /* deutlich transparenter */
  text-shadow: 0 0 6px currentColor, 0 0 13px currentColor; /* leichtes Glühen */
  animation: orbit-spin-rev 90s linear infinite;
}
@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}
@keyframes orbit-spin-rev {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Reward-Feedback: ein abgearbeitetes Not-Item — also eine Rune, die gerade um
   den Kern kreiste — leuchtet an ihrer letzten Position grün auf und löst sich
   auf. Die Marker liegen absolut im #net (Position beim Verschwinden gemessen). */
.orbit-dissolve {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10; /* über Kern + Kategorie-Knoten, damit der Puls sicher sichtbar ist */
}
/* Phase 1: aus der Mitte an den symmetrischen Platz fliegen + einrasten. */
.reward-item {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1;
  color: #7ee29a;
  text-shadow: 0 0 12px rgba(126, 226, 154, 0.85);
  animation: reward-fly 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes reward-fly {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--fdx, 0px)), calc(-50% + var(--fdy, 0px))) scale(0.3);
  }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* Phase 2: nacheinander „explodieren". */
.reward-item.burst { animation: reward-burst 0.62s ease-out forwards; }
@keyframes reward-burst {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  35% {
    transform: translate(-50%, -50%) scale(1.6);
    text-shadow: 0 0 24px rgba(126, 226, 154, 1);
    opacity: 1;
  }
  100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}
/* Schockwellen-Ring, der von der Explosion ausgeht (klein, nicht zu groß). */
.reward-shock {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 3px solid rgba(126, 226, 154, 1);
  box-shadow: 0 0 10px rgba(126, 226, 154, 0.7);
  animation: reward-shock 0.78s ease-out forwards;
}
@keyframes reward-shock {
  0% { width: 6px; height: 6px; opacity: 1; }
  100% { width: 70px; height: 70px; opacity: 0; border-width: 1px; }
}

/* Druck-O-Meter: dezente Aura um den Kern, Farbton aus --press-hue
   (grün bei Ruhe → rot bei Verzug). Das goldene Zeichen bleibt unberührt. */
.core-disc::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 30px 5px hsl(var(--press-hue, 212) 70% 45% / 0.4);
  transition: box-shadow 0.8s ease;
}
.ring {
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 179, 102, 0.35);
  animation: spin 38s linear infinite;
}
.ring.two {
  inset: -20px;
  border-style: dotted;
  border-color: rgba(212, 179, 102, 0.16);
  animation: spin 60s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 179, 102, 0.4);
  animation: pulse 3.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.55); opacity: 0; } }
.core .lbl { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }

/* ========== Kategorie-Detail ========== */
#category { display: flex; flex-direction: column; height: 100%; }

.jump { display: flex; gap: 8px; padding: calc(12px + var(--safe-top)) 10px 12px; justify-content: space-around; }
/* Tab-Navi im Chat-Header: kompakte Icons rechts neben dem „Helgi"-Schriftzug
   (09.06.2026 — spart Platz ggü. der früheren vollen Leiste). */
.chat-nav {
  display: flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
}
.cn-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0;
}
.cn-rune {
  font-size: 16px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}
.cn-bdg {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--gold);
  color: #14110a;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cn-bdg.warn { background: var(--gold-bright); }
.jb {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.jb .d {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: var(--muted);
  font-family: Georgia, serif;
}
.jb .t { font-size: 11px; color: var(--faint); }
.jb.active .d {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: #1f2230;
  box-shadow: 0 0 14px rgba(212, 179, 102, 0.25);
}
.jb.active .t { color: var(--gold); }
.jb .bdg {
  position: absolute;
  top: -3px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #14110a;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.head { padding: 4px 14px 12px; display: flex; align-items: baseline; gap: 8px; }
.head .back { align-self: center; margin-left: -6px; }
.head .rune { font-size: 22px; color: var(--gold); font-family: Georgia, serif; }
.head h1 { margin: 0; font-size: 19px; font-weight: 600; flex: 1; }
.head .c { color: var(--faint); font-size: 14px; }

#category .view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 104px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 2px 12px; }
.chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}
.chip.on { color: var(--gold-bright); border-color: var(--gold); background: #1f2230; }
.chip.dim { color: var(--faint); border-style: dashed; }
/* Geteilt-Toggle: abgesetzt am rechten Rand, eigenes An/Aus */
.chip.toggle { margin-left: auto; }
.chip.toggle::before { content: "◍ "; opacity: 0.7; }
.chip.toggle.on::before { content: "◉ "; }

/* Sortier-Leiste — dezenter als die Filter-Chips, eine Stufe leiser */
.sortbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 2px 12px;
}
.sort-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 2px;
}
.sortchip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}
/* Einkauf: Sortierleiste einzeilig halten (Chips brechen nicht um). */
.sortbar.nowrap { flex-wrap: nowrap; overflow-x: auto; }
/* Schnellwahl-Chips: gefüllt mit Anthrazit-Hintergrund (wie das frühere
   Design), Gold-Text, „+"-Akzent. Lange Namen werden mit … gekürzt, damit
   die Zeile nicht überläuft. */
.sortchip.shopquick {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--gold);
  flex: 0 0 auto;
  max-width: 9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sortchip.shopquick::before { content: "+ "; opacity: 0.7; }
.sortchip.on { color: var(--gold-bright); border-color: var(--gold); background: #1f2230; }
/* Reports-Unterauswahl (Abendreport / Wochenreport) */
.report-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
/* Claim-Filter rechts in der Sortier-Leiste, optisch abgesetzt (grün). */
.sortchip.claim { margin-left: auto; border-color: var(--ok); color: var(--ok); }
.sortchip.claim.on { background: #1f2a22; border-color: var(--ok); color: var(--ok); }
.sortchip.notfilter { border-color: var(--gold); color: var(--gold-bright); background: #1f2230; }

/* Sortier-Button (öffnet die Popup-Liste) */
.sortbtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.sortbtn-ic { color: var(--gold); font-size: 13px; }
.sortbtn-car { color: var(--faint); font-size: 10px; }

/* Dezente Lupe + ausklappbares Mini-Suchfeld in der Sortier-Leiste */
.sortsearch { display: inline-flex; align-items: center; gap: 6px; }
.sortsearch-ic {
  width: 32px; height: 30px; padding: 0;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
}
.sortsearch-ic.active { color: var(--gold-bright); border-color: var(--gold); }
.sortsearch-ic svg { display: block; }
.sortsearch-input {
  width: 124px; padding: 6px 11px; font-size: 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--gold-dim); color: var(--text);
}

/* Popup-Liste: Sortier-Optionen + Not-Filter */
.sortpop {
  position: fixed; z-index: 60; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.sortpop-h {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--faint); padding: 6px 10px 4px;
}
.sortpop-i {
  display: block; width: 100%; text-align: left;
  font-size: 14px; padding: 9px 11px; border-radius: 8px;
  background: transparent; border: none; color: var(--text); cursor: pointer;
}
.sortpop-i:hover, .sortpop-i.on { background: var(--surface-2); }
.sortpop-i.on { color: var(--gold-bright); }
.sortpop-i.toggle.on { color: var(--gold-bright); }
.sortpop-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* Innenkarte-Akkordeon */
.acc { display: block; }
.acc + .acc { border-top: 1px solid var(--surface-2); }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  font-weight: 400;
  cursor: pointer;
  text-align: left;
}
.acc-head .text { flex: 1; min-width: 0; }
.acc-head .title { display: block; font-size: 15px; line-height: 1.25; }
.acc-head .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.acc-chevron {
  flex-shrink: 0;
  color: var(--gold-dim);
  font-size: 13px;
  transition: transform 0.18s ease;
}
.acc.open .acc-chevron { transform: rotate(90deg); color: var(--gold); }
.acc-body { display: none; padding: 0 14px 14px 36px; }
.acc.open .acc-body { display: block; }
.acc-body-inner {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.acc-more {
  margin-top: 8px;
  padding: 2px 0;
  background: none;
  border: none;
  color: var(--gold-dim);
  font-size: 12px;
  cursor: pointer;
}
.acc-more:hover { color: var(--gold); }

.sec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  padding: 4px 4px 8px;
}
.sec-label + .list { margin-bottom: 8px; }

/* Ein-/ausklappbare Innenkarte-Abteilungen (zu am Start). */
.coll { margin-bottom: 10px; }
.coll-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.coll-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
}
.coll-chev {
  color: var(--accent);
  transition: transform 0.18s ease;
  font-size: 13px;
}
.coll.open .coll-chev { transform: rotate(90deg); }
.coll.open .coll-head { border-radius: 14px 14px 0 0; border-bottom: none; }
.coll-body { display: none; padding-top: 8px; }
.coll.open .coll-body { display: block; }

.list { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; position: relative; }
.row + .row { border-top: 1px solid var(--surface-2); }
.row .text { flex: 1; min-width: 0; }
.row .title { display: block; font-size: 15px; line-height: 1.25; }
.row .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Prioritäts-Kennzeichnung: Farbkante + farbiges Tag */
.row .bar { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.A .bar { background: var(--prioA); box-shadow: 0 0 9px rgba(232, 161, 60, 0.55); }
.B .bar { background: var(--prioB); }
.C .bar { background: var(--prioC); }
.D .bar { background: var(--prioD); }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.A .tag { background: rgba(232, 161, 60, 0.16); color: var(--prioA); border: 1px solid rgba(232, 161, 60, 0.4); }
.B .tag { background: rgba(90, 166, 196, 0.14); color: var(--prioB); border: 1px solid rgba(90, 166, 196, 0.38); }
.C .tag { background: rgba(106, 116, 132, 0.14); color: var(--prioC); border: 1px solid rgba(106, 116, 132, 0.34); }
.D .tag { background: rgba(74, 82, 96, 0.14); color: var(--faint); border: 1px dashed rgba(106, 116, 132, 0.34); }

.check {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--gold-dim);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.empty { padding: 16px 14px; color: var(--faint); font-size: 13px; text-align: center; }

/* Helgi-FAB unten mittig -> Chat */
.helgi-fab {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: radial-gradient(circle at 50% 38%, #2a2415, #15171e 72%);
  box-shadow: 0 0 26px rgba(212, 179, 102, 0.30), 0 6px 20px rgba(0, 0, 0, 0.55),
    inset 0 0 16px rgba(212, 179, 102, 0.10);
}
.helgi-fab .rune { font-size: 30px; color: var(--gold-bright); font-family: Georgia, serif; line-height: 1; text-shadow: 0 0 12px rgba(240, 212, 147, 0.55); }
.helgi-fab .pulse { border-color: rgba(212, 179, 102, 0.4); animation: fabpulse 3.4s ease-out infinite; }
@keyframes fabpulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ========== Chat ========== */
/* position:fixed + 100dvh lockt den Chat auf die sichtbare Viewport-Höhe,
   sodass NUR der Chat-Verlauf scrollt und die Kopfzeile (mit Zurück-Knopf)
   garantiert oben bleibt — auch auf Mobil-Browsern, die sonst die ganze
   Seite scrollen. */
#chat {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100dvh; /* Fallback; JS bindet Höhe/Top an visualViewport (Tastatur) */
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0; /* Kopfzeile bleibt fix oben, schrumpft nie weg */
}
.topbar .greeting { flex: 1; font-weight: 600; }
.chat-log {
  flex: 1 1 0;
  min-height: 0; /* KRITISCH: erlaubt dem Verlauf zu schrumpfen, damit NUR er
                    scrollt — sonst wächst er über die Höhe und alles scrollt. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble.user { align-self: flex-end; background: var(--gold-dim); color: #fff; border-bottom-right-radius: 4px; }
.bubble.helgi { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.pending { opacity: 0.6; font-style: italic; }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0; /* Eingabezeile bleibt fix unten */
  position: relative; /* Anker fuer den ausklappenden Mic-Hinweis */
}
.chat-form { align-items: flex-end; } /* Buttons unten bündig, Textarea wächst nach oben */
.chat-form input,
.chat-form #chat-input { flex: 1; }
#chat-input {
  flex: 1;
  resize: none;
  line-height: 1.35;
  max-height: 4.4em; /* wächst auf ~2 Zeilen, dann scrollt der Inhalt */
  overflow-y: auto;
  font-family: inherit;
}
/* Kombinierter Chat-Knopf: Mikrofon / Senden / Aufnahme(-eingerastet). */
.chat-action {
  width: 46px;
  height: 46px;
  padding: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--gold);
  font-size: 24px;
  transition: background 0.15s ease, color 0.15s ease;
  /* Halten + Hochziehen darf keine Text-Selektion auf dem Knopf ausloesen. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.chat-action.send {
  background: var(--gold);
  color: #14110a;
  border-color: var(--gold);
  font-size: 19px;
}
.chat-action.rec {
  background: var(--gold);
  color: #14110a;
  border-color: var(--gold);
  animation: micpulse 1.2s ease-in-out infinite;
}
.chat-action.locked {
  background: var(--gold);
  color: #14110a;
  border-color: var(--gold-bright);
  font-size: 18px;
  animation: none;
  box-shadow: 0 0 0 3px rgba(212, 179, 102, 0.3);
}
@keyframes micpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 179, 102, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(212, 179, 102, 0); }
}

/* Ausklappender Hinweis ueber dem Mic: Pfeil = hochziehen zum Einrasten,
   Schloss = eingerastet. */
.mic-hint {
  position: absolute;
  right: 11px;
  bottom: calc(var(--safe-bottom) + 68px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 23px;
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  animation: michint-bob 1s ease-in-out infinite;
}
.mic-hint.locked {
  animation: none;
  color: var(--gold-bright);
  border-color: var(--gold);
}
@keyframes michint-bob {
  0%, 100% { transform: translateY(2px); opacity: 0.65; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Waehrend der Aufnahme keine Text-Selektion (Hochziehen markiert sonst den
   Chat-Verlauf statt einzurasten). */
body.rec-noselect, body.rec-noselect * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 30;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ========== Anklickbare Zeilen + Todo-Badges ========== */
.row.clickable { cursor: pointer; }
.row.clickable:active { background: var(--surface-2); }

.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.pill {
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-2);
}
.pill.geteilt { color: var(--gold); border-color: var(--gold-dim); }
.pill.privat { color: var(--faint); }

/* Zuweisungs-Chip: Avatar (Initiale) + Name, auf den ersten Blick lesbar. */
.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 2px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.assignee-chip .av {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #14110a;
}
/* a1 = Tobias (gold), a2 = Amelie (blau), offen = auffälliges Amber, gestrichelt */
.assignee-chip.a1 { color: var(--gold-bright); border-color: var(--gold-dim); }
.assignee-chip.a1 .av { background: var(--gold); }
.assignee-chip.a2 { color: #8ecae6; border-color: rgba(90, 166, 196, 0.5); }
.assignee-chip.a2 .av { background: var(--prioB); }
.assignee-chip.open { color: var(--prioA); border: 1px dashed rgba(232, 161, 60, 0.55); background: rgba(232, 161, 60, 0.08); }
.assignee-chip.open .av { background: var(--prioA); color: #14110a; }
.assignee-chip.tappable { cursor: pointer; }
.assignee-chip.tappable:active { filter: brightness(1.25); }

/* Druck-Marker: kleine Nauthiz-Rune (ᚾ) an Einträgen, die zum Druck-O-Meter
   beitragen — passt zum germanischen Runen-Look der App. */
.pressure-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1;
  color: var(--prioA);
  flex-shrink: 0;
  opacity: 0.85;
}

/* Kontakt-Suche — dezent, leise */
.contact-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.contact-search::placeholder { color: var(--faint); }
.contact-search:focus { border-color: var(--gold-dim); }

/* Not-Übersicht (Long-Press aufs Helgi-Symbol) */
.pressure-head {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.pressure-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}
.pressure-score { font-size: 18px; font-weight: 600; color: var(--text); }
.pressure-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pressure-weight {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--prioA);
  flex-shrink: 0;
}

/* Überfällige Kontakte hervorheben (Farbkante links + roter Subtext) */
.row.overdue::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--prioA);
  border-radius: 0 3px 3px 0;
}
.row.overdue .sub { color: var(--prioA); }

/* ========== Druck-Punkt am Helgi-FAB ========== */
.press-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: hsl(120 70% 48%);
  border: 1.5px solid var(--bg);
  transition: background 0.8s ease, box-shadow 0.8s ease;
}
/* Ungelesen-Zahl am zentralen Helgi-Symbol nach oben-LINKS — sonst überlagert
   sie den Druck-Punkt (oben-rechts). */
.core-voicebadge {
  right: auto;
  left: -5px;
  top: -5px;
  border: 1.5px solid var(--bg);
}

/* ========== Detail-Sheet ========== */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.sheet-panel {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.22s ease;
}
@keyframes sheet-up { from { transform: translateY(16px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }
.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(12px + var(--safe-top)) 16px 10px;
  border-bottom: 1px solid var(--border);
}
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; min-width: 0; }
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(20px + var(--safe-bottom));
}

.fields {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.field { display: flex; gap: 12px; padding: 9px 0; }
.field + .field { border-top: 1px solid var(--border); }
.f-label { flex: 0 0 36%; color: var(--muted); font-size: 13px; }
.f-value { flex: 1; font-size: 14px; word-break: break-word; }

.sheet-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin: 6px 2px 8px;
}
.sheet-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 12px;
}

.note-edit { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-input {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}
.note-save { align-self: flex-end; padding: 9px 18px; }
.note-save.full { align-self: stretch; width: 100%; margin-bottom: 14px; }
/* Notiz-Verlauf (Anhäng-Notizen) — chronologischer, scrollbarer Block */
.note-log {
  white-space: pre-wrap; word-wrap: break-word;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  font-size: 13.5px; line-height: 1.45; color: var(--text);
  max-height: 220px; overflow-y: auto;
}

/* Erledigt-Archiv */
.archive-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.archive-back {
  background: var(--surface); border: 1px solid var(--border); color: var(--gold-bright);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer;
}
.archive-title { color: var(--muted); font-size: 13px; }
.archive-group { margin-bottom: 8px; }
.archive-entries { margin: 4px 0 2px 14px; border-left: 2px solid var(--surface-2); padding-left: 12px; }
.archive-entry { padding: 6px 0; }
.ae-when { font-size: 12px; color: var(--gold); }
.ae-body { font-size: 13px; color: var(--muted); white-space: pre-wrap; margin-top: 2px; }

/* Kontaktverlauf */
.log-box { display: flex; flex-direction: column; gap: 8px; }
.log-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
}
.log-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.log-when { font-size: 13px; color: var(--text); }
.log-meta { font-size: 11.5px; color: var(--muted); }
.log-note { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* ===========================================================================
   Kalender (Termine-Tab) — portiert aus Amsi, Helgi-Style (dunkel/gold).
   =========================================================================== */
.cal { display: block; }
.cal-head { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.cal-navrow { display: flex; align-items: center; gap: 8px; }
.cal-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--gold-bright); font-size: 1.2rem;
  display: grid; place-items: center; flex: 0 0 auto; cursor: pointer;
  /* ‹ › (Guillemets) sitzen schriftbedingt tief im Em-Quadrat → line-height
     normalisieren, damit sie mittig im Kreis wirken. */
  line-height: 1;
  padding: 0;
}
.cal-title {
  flex: 1; text-align: center; font-weight: 700;
  color: var(--gold-bright); font-size: 1rem; background: none;
  border: none; cursor: pointer;
}
.cal-today {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: var(--accent); color: #0b0d12; font-size: 0.8rem;
  font-weight: 700; border: none; cursor: pointer;
}
.cal-month-btn {
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--gold-dim);
  color: var(--gold-bright); font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.cal-month-btn.on { background: #1f2230; border-color: var(--gold); }
.mg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.cal-days { display: flex; flex-direction: column; gap: 9px; }
.cal-day {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px 13px; cursor: pointer;
}
.cal-day.today { border-color: var(--gold); background: #181c27; }
.cal-day-head { display: flex; align-items: baseline; gap: 8px; }
.cd-wd { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cd-num { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.cal-day.today .cd-num { color: var(--gold-bright); }
.cd-note { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-dim); margin-left: auto; align-self: center; }
.cal-day-items {
  display: flex; flex-direction: column; gap: 4px; margin-top: 7px;
  /* Inhaltsabhängige Größe (kompakt wie früher) — leere/kleine Tage bleiben
     klein. Nur bei viel Inhalt deckelt max-height und der Rest scrollt. */
  max-height: 7em;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cal-note {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.35;
}
/* Notiz-Log im Tag-Sheet: fortlaufende Liste der Einträge. */
.note-log {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 40vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.note-log-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.92rem;
  white-space: pre-wrap;
  line-height: 1.4;
}
.cal-empty { color: var(--faint); font-size: 0.9rem; }
.cal-item { display: flex; gap: 8px; align-items: baseline; font-size: 0.9rem; }
.cal-item .ci-t { flex: 0 0 auto; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 38px; }
.cal-item.td .ci-t { color: var(--prioC); }
.cal-item .ci-x { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inline-Monatsuebersicht */
.cal-month {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 10px 12px; margin-bottom: 14px;
}
.cal-month .mg-head { margin-bottom: 8px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mg-wd { text-align: center; font-size: 0.66rem; color: var(--muted); padding: 3px 0; text-transform: uppercase; }
.mg-cell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-radius: 9px; background: transparent; border: none; color: var(--text);
  font-size: 0.82rem; cursor: pointer;
}
.mg-cell.empty { visibility: hidden; }
.mg-cell.today { background: #1f2230; box-shadow: inset 0 0 0 1px var(--gold); }
.mg-num { line-height: 1; }
.mg-dots { display: flex; gap: 2px; height: 5px; align-items: center; }
.mg-dot { width: 4px; height: 4px; border-radius: 50%; }
.mg-dot.ev { background: var(--gold); }
.mg-dot.td { background: var(--prioB); }
.mg-dot.nt { background: var(--gold-dim); }

/* Tag-Detail: Kontakt-Chips + Reschedule-Select */
.day-contacts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.day-chip {
  padding: 6px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); font-size: 0.85rem; cursor: pointer;
}
.day-chip.add { border-style: dashed; color: var(--gold); }
.day-add { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; }
.day-add input { flex: 1; min-width: 0; }
.day-add .day-select {
  flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 0.9rem;
}
.day-add .note-save { flex: 0 0 auto; align-self: stretch; }

/* ========== Zustimmungs-Workflow (2026-06-05) ========== */

/* Glocke (Hub oben links + Kategorie-Kopfzeile). Das Symbol ist IMMER sichtbar
   (kein Auftauchen/Verschwinden) — gedämpft im Ruhezustand, gold + sanfter Puls
   + Zahl-Badge, sobald offene Anfragen da sind. */
.bell {
  position: relative;
  flex: 0 0 auto;
  font-size: 18px;
  padding: 2px 4px;
  line-height: 0;
}
.bell .bell-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* gleicher Durchmesser wie der "+"-Button */
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.bell.has .bell-glyph {
  border-color: var(--gold);
  color: var(--gold-bright);
  animation: bell-pulse-glyph 2.2s ease-in-out infinite;
}
.bell .bell-dot {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: #20170a;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  visibility: hidden; /* Zahl nur bei offenen Anfragen */
}
.bell.has .bell-dot { visibility: visible; }
/* Kategorie-Kopfzeilen-Glocke: kompakt, mittig zur Titelzeile. Immer present. */
.cat-bell { width: auto; align-self: center; padding: 4px 6px; }
@keyframes bell-pulse-glyph {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 212, 147, 0); }
  50% { box-shadow: 0 0 9px 1px rgba(240, 212, 147, 0.55); }
}

/* Neue-Aufgabe-Knopf neben dem Tab-Titel */
.cat-add {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  background: var(--surface);
  color: var(--gold-bright);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cat-add:active { background: var(--surface-2); }

/* Editierbare Felder im Detail-Sheet */
.field.edit { align-items: center; }
.f-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.f-input:focus { border-color: var(--gold-dim); outline: none; }
.f-input:disabled { opacity: 0.5; }
.f-input.small { flex: 0 0 auto; width: 11em; }

/* Titel-Editor (Stift → Inline-Input) */
.title-edit { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.title-text { flex: 1; font-size: 18px; font-weight: 600; color: var(--text); word-break: break-word; }
.title-pen {
  flex: 0 0 auto; background: transparent; border: none; color: var(--gold);
  font-size: 16px; cursor: pointer; padding: 4px 6px;
}
.title-input {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--gold-dim); background: var(--surface); color: var(--text);
  font-size: 17px; font-weight: 600; font-family: inherit;
}
.title-ok {
  flex: 0 0 auto; background: var(--gold); color: #20170a; border: none;
  border-radius: 10px; padding: 8px 14px; font-size: 16px; cursor: pointer;
}
.create-btn { align-self: stretch; width: 100%; margin-top: 4px; }

/* Zustimmungs-Panel (Sheet) */
.appr-bulk { display: flex; gap: 8px; margin-bottom: 14px; }
.appr-all {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.appr-all.yes { border-color: var(--gold-dim); color: var(--gold-bright); }
.appr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title acts" "sub acts";
  gap: 2px 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.appr-title { grid-area: title; font-size: 15px; font-weight: 600; color: var(--text); }
.appr-sub { grid-area: sub; font-size: 12px; color: var(--muted); }
.appr-acts { grid-area: acts; display: flex; gap: 8px; }
.appr-yes, .appr-no {
  width: 38px; height: 38px; border-radius: 999px; font-size: 17px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2);
}
.appr-yes { color: var(--gold-bright); border-color: var(--gold-dim); }
.appr-no { color: var(--muted); }

/* Pinnwand — gemeinschaftlicher Feed (15.07.2026) */
.pn-ic { margin-right: 6px; font-size: 12px; opacity: 0.9; }
/* Neu-Übersicht: Sprung-Chips pro Kategorie mit neuen Karten */
.pinn-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pinn-newchip {
  display: inline-flex; align-items: center;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--gold-dim); background: var(--surface-2); color: var(--gold-bright);
}
.pinn-newchip:active { background: var(--surface); }
/* Filterbar: Kategorien an/abwählen */
/* Kopf-Leiste: Filter-Dropdown links, Refresh rechts */
.pinn-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.pinn-refresh {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.pinn-refresh .ic { width: 15px; height: 15px; }
.pinn-refresh:active { background: var(--surface); }
/* Filter-Dropdown */
.pinn-filterwrap { position: relative; }
.pinn-filterbtn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.pinn-filterbtn.active { border-color: var(--gold-dim); color: var(--gold-bright); font-weight: 600; }
.pinn-caret { font-size: 10px; opacity: 0.7; }
.pinn-fbackdrop { position: fixed; inset: 0; z-index: 40; }
.pinn-filtermenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
  min-width: 210px; max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.pinn-fitem {
  display: flex; align-items: center; gap: 4px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  border: none; background: transparent; color: var(--text); font-size: 13px;
}
.pinn-fitem:active { background: var(--surface-2); }
.pinn-fitem.on { color: var(--gold-bright); }
.pinn-check { width: 1.1em; flex: 0 0 auto; color: var(--gold-bright); }
/* Feed + Karten */
.pinn-feed { display: flex; flex-direction: column; gap: 10px; }
.pinn-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.pinn-card.neu { border-color: var(--gold-dim); box-shadow: inset 3px 0 0 0 var(--gold); }
.pinn-card.flash { animation: pinn-flash 1.2s ease-out; }
@keyframes pinn-flash {
  0% { box-shadow: 0 0 0 2px var(--gold-bright); }
  100% { box-shadow: inset 3px 0 0 0 var(--gold); }
}
.pinn-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 5px;
}
.pinn-cat {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--gold);
}
.pinn-meta { font-size: 11px; color: var(--faint); white-space: nowrap; }
.pinn-body { font-size: 14px; color: var(--text); word-break: break-word; }
.pinn-acts { display: flex; gap: 8px; margin-top: 10px; }
.pinn-qacts { flex-wrap: wrap; }
.pinn-opt {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13px;
  border: 1px solid var(--gold-dim); background: var(--surface-2); color: var(--gold-bright);
}
.pinn-opt:active { background: var(--surface); }
.pinn-status { margin-top: 8px; font-size: 12px; color: var(--muted); }
.pinn-status.approved { color: var(--gold-bright); }
/* Composer (Notiz/Frage posten) */
.pinn-compose-btn {
  width: 100%; margin-bottom: 14px; padding: 11px; cursor: pointer;
  border-radius: 12px; border: 1px dashed var(--gold-dim);
  background: var(--surface-2); color: var(--gold-bright); font-size: 14px; font-weight: 600;
}
.pinn-cseg { display: flex; gap: 8px; margin-bottom: 12px; }
.pinn-cseg-btn {
  flex: 1; padding: 9px; cursor: pointer; border-radius: 10px; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.pinn-cseg-btn.on { border-color: var(--gold-dim); color: var(--gold-bright); background: var(--surface-2); }
.pinn-cinput {
  width: 100%; box-sizing: border-box; padding: 11px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 14px; font-family: inherit; resize: vertical;
}
.pinn-coptions { margin-top: 12px; }
.pinn-clabel { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pinn-cline {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 14px; font-family: inherit;
}
.pinn-cactions { display: flex; gap: 8px; margin-top: 16px; }
.pinn-cbtn {
  flex: 1; padding: 11px; cursor: pointer; border-radius: 12px; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.pinn-cbtn.primary { border: none; background: var(--gold); color: #20170a; font-weight: 700; }
/* Etappe 3: Footer (👍 + Kommentare) + Faden */
.pinn-foot { display: flex; gap: 8px; margin-top: 10px; }
.pinn-like, .pinn-ctoggle {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.pinn-like.on { border-color: var(--gold-dim); color: var(--gold-bright); }
.pinn-likec { font-weight: 700; }
.pinn-thread {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 7px;
}
.pinn-comment { font-size: 13px; color: var(--text); }
.pinn-cauthor { font-weight: 700; color: var(--gold); margin-right: 6px; }
.pinn-crow { display: flex; gap: 6px; margin-top: 4px; }
.pinn-csm {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 13px; font-family: inherit;
}
.pinn-csend {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: none; background: var(--gold); color: #20170a; font-size: 13px; font-weight: 700;
}

/* Inline-Zuweisungs-Dropdown (Tap auf den Zuweisungs-Chip in der Liste) */
.assign-menu {
  position: fixed;
  z-index: 60;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.assign-opt {
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.assign-opt:active { background: var(--surface-2); }
.assign-opt.on { color: var(--gold-bright); }
.assign-opt.on::after { content: " ✓"; }

/* #1 Cross-User-Dedup-Dialog (06.06.2026) */
.dedup-info { padding: 4px 2px 10px; line-height: 1.5; }
.dedup-existing { font-weight: 700; }
.dedup-info .faint { color: var(--faint, #888); font-size: 13px; }
.sheet-body .create-btn + .create-btn { margin-top: 8px; }

/* #10 Einkaufs-Archiv — Schnell-Hinzufügen-Palette (06.06.2026) */
.shop-archive { margin-bottom: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
}

.shop-recent { margin-top: 16px; }

/* --- Erinnerungen (Sprint Erinnerungen, 10.06.2026) --- */
.reminders { margin-top: 20px; }
.rem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.rem-title { font-weight: 600; color: var(--text); }
.rem-add {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 12px;
}
.rem-list { display: flex; flex-direction: column; gap: 6px; }
.rem-row { display: flex; align-items: center; gap: 10px; }
.rem-row.off { opacity: 0.5; }
.rem-toggle {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1;
}
.rem-toggle.on { color: var(--ok); border-color: var(--ok); }
.rem-del {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--faint);
  font-size: 0.85rem;
}
.wd-field { align-items: flex-start; }
.wd-col { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wd-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-preset {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 4px 10px;
}
.wd-pick { display: flex; gap: 5px; flex-wrap: wrap; }
.wd-btn {
  width: 38px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.wd-btn.on { background: var(--accent); border-color: var(--accent); color: #15171d; }
/* "+"-Auswahl Termin/Erinnerung im Termine-Tab */
.new-choice { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}
.choice-ic { font-size: 1.3rem; }
.done-today { margin-top: 4px; }
.done-check { color: var(--ok); font-weight: 700; margin-right: 2px; }

/* ===== Stimmen-Inbox (Messenger-Integration, 2026-06-18) ===== */
/* Umschalter Helgi | Stimmen oben im Chat-Tab */
.seg { display: flex; gap: 0; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; margin: 8px 16px 4px; flex-shrink: 0; }
.seg button { flex: 1; background: transparent; border: none; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 8px 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--gold); color: #14110a; }
.seg .bdg { background: var(--gold); color: #14110a; border-radius: 999px; font-size: 11px;
  font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex;
  align-items: center; justify-content: center; }
.seg button.on .bdg { background: rgba(20, 17, 10, 0.15); }

/* Stimmen-Container ersetzt chat-log+chat-form im Stimmen-Modus */
.voices { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
/* hidden-Attribut muss das display der Klasse schlagen (sonst bleibt sichtbar) */
#chat-log[hidden], #chat-form[hidden], #voices[hidden] { display: none !important; }

/* Fäden-Liste */
.v-view { flex: 1; overflow-y: auto; padding: 14px 14px 0; }
.v-list { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; margin-bottom: 14px; }
.trow { display: flex; align-items: center; gap: 11px; padding: 13px 14px; cursor: pointer;
  /* Long-Press darf keine Text-Markierung/Callout auf der Zeile auslösen. */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.trow + .trow { border-top: 1px solid var(--surface-2); }
.trow:active { background: var(--surface-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.on { background: var(--gold); box-shadow: 0 0 8px rgba(212, 179, 102, 0.6); }
.dot.off { background: transparent; border: 1px solid var(--faint); }
.tav { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #14110a; }
.tav.unknown { background: #4a5260; color: #aab; }
.tbody { flex: 1; min-width: 0; }
.tname { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.tname .ch { font-size: 11px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }
.tsnip { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.tmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.twhen { font-size: 11px; color: var(--faint); }
.tcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: #14110a; font-size: 11px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; }
.lock { font-size: 10px; color: var(--gold-dim); }
.v-empty { text-align: center; color: var(--faint); font-size: 13px; padding: 48px 24px;
  line-height: 1.6; }

/* Faden-Ansicht: Kopfzeile + Log + Composer */
.v-back { display: flex; align-items: center; gap: 9px; padding: 10px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border); background: var(--surface); }
.v-back .b { background: none; border: none; color: var(--muted); font-size: 24px;
  cursor: pointer; line-height: 1; padding: 0; }
.v-back .vt { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.v-back .vsub { font-size: 11px; color: var(--faint); flex-shrink: 0; }
.v-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column;
  gap: 10px; }
.daydiv { align-self: center; font-size: 11px; color: var(--faint); letter-spacing: 0.04em;
  text-transform: uppercase; margin: 2px 0; }
.bubble .who { font-size: 10.5px; letter-spacing: 0.4px; display: block; margin-bottom: 3px;
  opacity: 0.8; }
.bubble.inc { align-self: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; }
.bubble.inc .who { color: var(--gold); }
.bubble.out { align-self: flex-end; background: var(--gold-dim); color: #fff;
  border-bottom-right-radius: 4px; }
.bubble.out .who { color: rgba(240, 212, 147, 0.8); }
.bubble.mail { max-width: 92%; max-height: 340px; overflow-y: auto; }
.bubble.mail .subj { font-size: 12px; color: var(--gold-bright); font-weight: 600;
  margin-bottom: 4px; }
.bubble.hin { align-self: flex-start; background: #171a23; border: 1px solid var(--gold-dim);
  border-left: 2px solid var(--gold); border-bottom-left-radius: 4px; }
.bubble.hin .who { color: var(--gold-bright); }

/* Medien-Anhänge in der Sprechblase (24h ephemer, aufs Handy speicherbar) */
.att { position: relative; margin-top: 8px; max-width: 260px; }
.att-img, .att-video { display: block; width: 100%; max-height: 320px; border-radius: 10px;
  object-fit: cover; background: var(--surface-2); min-height: 42px; }
.att-audio { width: 240px; max-width: 100%; }
.att-file { font-size: 13px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); }
.att.att-gone { opacity: 0.45; }
.att-dl { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(20, 17, 10, 0.72); color: var(--gold-bright); border: none; font-size: 16px;
  cursor: pointer; line-height: 1; }

/* Composer mit Ziel-Wähler */
.v-composer { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface);
  padding: 9px 12px calc(12px + var(--safe-bottom, 0px)); }
.targets { display: flex; gap: 6px; margin-bottom: 9px; align-items: center; flex-wrap: wrap; }
.tlabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--faint); margin-right: 2px; }
.tg { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted); cursor: pointer; display: inline-flex;
  gap: 5px; align-items: center; }
.tg.on { background: #1f2230; border-color: var(--gold); color: var(--gold-bright); }
.tg.helgi.on { background: #241f12; border-color: var(--gold); color: var(--gold-bright); }
.tg .r { font-family: Georgia, serif; }
.v-crow { display: flex; gap: 8px; align-items: flex-end; }
.v-crow .inp { flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px; padding: 11px 13px; font-size: 14px;
  min-height: 44px; max-height: 120px; resize: none; font-family: inherit; line-height: 1.35;
  overflow-y: auto; }
/* Kombinierter Stimmen-Knopf: 🎤 (leer) / ↑ (Text) / Aufnahme(-eingerastet) —
   dieselbe Mechanik wie der Haupt-Chat (attachMic). */
.v-crow .send { width: 44px; height: 44px; border-radius: 12px; background: var(--gold);
  color: #14110a; border: none; font-size: 18px; flex-shrink: 0; cursor: pointer;
  display: grid; place-items: center; line-height: 1;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.v-crow .send.mic { background: var(--surface-2); color: var(--gold);
  border: 1px solid var(--border); font-size: 21px; }
.v-crow .send.rec { background: var(--gold); color: #14110a; font-size: 21px;
  animation: micpulse 1.2s ease-in-out infinite; }
.v-crow .send.locked { background: var(--gold); color: #14110a; font-size: 17px; animation: none;
  box-shadow: 0 0 0 3px rgba(212, 179, 102, 0.3); }
.v-crow .send:disabled { opacity: 0.4; }
/* Diktier-Hinweis über dem Stimmen-Knopf (relativ zum Composer positioniert). */
.v-composer { position: relative; }
.v-michint { right: 12px; bottom: calc(60px + var(--safe-bottom, 0px)); }
/* Kontakt-Suche + Aktualisieren-Knopf in der Stimmen-Liste. */
.v-searchrow { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.v-search { flex: 1; min-width: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; font-size: 14px;
  color: var(--text); font-family: inherit; }
.v-search::placeholder { color: var(--faint); }
/* Aktualisieren-Knopf (↻): in der Liste eigenständig, im Faden-Header rechts. */
.v-refresh { flex: 0 0 auto; position: relative; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--gold);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
/* Absolut zentriert (App-eigenes, iOS-erprobtes Runen-Muster) — Flex/Grid
   verschieben SVGs auf iOS Safari nach unten-rechts (08.07.2026). */
.v-refresh > svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.v-refresh:active { background: var(--surface-2); }
.v-refresh.thread { width: 34px; height: 34px; border-radius: 50%; font-size: 17px;
  background: var(--surface-2); }
.v-refresh.spin { animation: vspin 0.6s linear infinite; }
@keyframes vspin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
/* Kleines, unauffälliges Sprung-Icon in den Stimmen-Faden (Kontakte-Tab). */
.row-chat { flex: 0 0 auto; position: relative; width: 33px; height: 33px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--gold);
  font-size: 15px; cursor: pointer; opacity: 0.72;
  display: inline-flex; align-items: center; justify-content: center; }
.row-chat > svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.row-chat:active { background: var(--surface); opacity: 1; }
/* Stummschaltung: 🔕-Marker am Namen + gedimmte Zeile. */
.vmute { font-size: 12px; margin-left: 5px; opacity: 0.7; }
.trow.muted .tname { color: var(--muted); }
/* Faden-Aktionsmenü (Long-Press) im Sheet. */
.v-actions { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.v-action { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%;
  text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; }
.v-action:active { background: var(--surface); }
.v-action.danger .va-t { color: #e0736a; }
.v-action.subtle { background: transparent; color: var(--muted); border-color: transparent; }
.va-t { font-size: 15px; }
.va-s { font-size: 12px; color: var(--faint); }

/* Unbekannt-Sender-Banner (als Kontakt anlegen / verknüpfen / ignorieren) */
.v-unknown { flex-shrink: 0; margin: 10px 14px 0; padding: 11px 13px; border-radius: 12px;
  background: #1a1710; border: 1px solid var(--gold-dim); }
.vu-q { font-size: 12.5px; color: var(--gold-bright); margin-bottom: 8px; }
.vu-row { display: flex; gap: 7px; flex-wrap: wrap; }
.vu-btn { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-family: inherit; }
.vu-btn.primary { background: var(--gold); color: #14110a; border-color: var(--gold); }
.vu-btn.danger { color: #d98a8a; border-color: #5a3a3a; }
.vu-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 9px 11px; font-size: 14px; margin-bottom: 8px;
  font-family: inherit; box-sizing: border-box; }
.vu-results { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
  max-height: 180px; overflow-y: auto; }
.vu-person { text-align: left; font-size: 13px; padding: 8px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-family: inherit; }
.vu-empty2 { font-size: 12px; color: var(--faint); padding: 4px 2px; }
/* Kategorie-Wähler im Kontakt-Anlegen */
.vu-cats { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.vu-cat { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted); cursor: pointer; }
.vu-cat.on { background: var(--gold); color: #14110a; border-color: var(--gold); }

/* Gruppen-Faden-Avatar + Kategorie-Chip in der Liste */
.tav.grp { background: #3a3320; color: var(--gold-bright); }
.catchip { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #2a2515;
  color: var(--gold-bright); margin-left: 6px; vertical-align: middle; }

/* Avatar-Farben (Hash über den Namen) */
.av-0 { background: #c9a24a; } .av-1 { background: #5aa6c4; } .av-2 { background: #6cab7a; }
.av-3 { background: #c98a6a; } .av-4 { background: #9a8ac4; } .av-5 { background: #c46a8a; }

/* ===========================================================================
   Voicebox — Walkie-Talkie-Sprachmodus (Stufe 2c, 15.07.2026)
   =========================================================================== */

/* Knopf unten links im Composer: Tippen = Vorlesen an/aus, Halten+Hochziehen
   = Walkie-Talkie. „speaking" = Vorlesen aktiv (gefüllt gold). */
.chat-walkie {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  align-self: flex-end;
  touch-action: none; /* damit das Hochziehen nicht scrollt */
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.chat-walkie .wk-ic {
  display: block; /* SVG mittig im viewBox → exakt zentriert, keine Baseline */
  filter: drop-shadow(0 0 5px rgba(212, 179, 102, 0.4));
}
.chat-walkie:hover {
  border-color: var(--gold-dim);
  color: var(--gold-bright);
}
.chat-walkie.speaking {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(212, 179, 102, 0.55);
}
.chat-walkie.speaking .wk-ic {
  filter: none;
  animation: wk-rune-pulse 1.5s ease-in-out infinite;
}
@keyframes wk-rune-pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

/* Vollbild-Overlay. */
.walkie {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(120% 90% at 50% 40%, #12151d 0%, var(--bg) 70%);
  text-align: center;
}
.walkie[hidden] {
  display: none;
}

/* Der Walkie-Knopf sitzt LINKS — der Hinweis (erbt .mic-hint = rechts) wird
   deshalb nach links umgehängt. */
#walkie-hint {
  right: auto;
  left: 11px;
}

/* Orb-Zone: großzügiger Canvas, damit der Schein nicht am Rand abgeschnitten
   wird (kein „schwarzer Kasten"). Der Glow verläuft weich im Canvas aus. */
.walkie-orb {
  width: min(94vw, 480px);
  height: min(94vw, 480px);
  max-height: 62vh;
}

.walkie-state {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  min-height: 1.2em;
}
.walkie-caption {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  min-height: 3em;
}
.walkie-caption .wc-me {
  color: var(--text);
}

.walkie-exit {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.walkie-exit:hover {
  color: var(--text);
  border-color: var(--gold-dim);
}
