/* @practice/library — CSS. Ported 1:1 from fold/src/styles/screens.css:4906–5490
   + components.css:158–186 (values in docs/source-read-report.md). App-shell
   tokens with fallbacks so the package renders (degraded) without @practice/app-shell.
   Class names kept 1:1 from Fold (source-first — a new prefix would cause the
   cross-app drift the checklist warns about). Domain adaptation: the ranked row
   drops Fold's leading emoji column (Reverie meditations have no emoji). */

/* ── Tabs (components.css:158) ───────────────────────────────────────── */
.segmented {
  display: flex;
  border: 1px solid var(--border, rgba(24,23,20,0.14));
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.segmented button {
  flex: 1;
  padding: 7px 8px;
  font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 11px;
  color: var(--fg-dim, rgba(24,23,20,0.5));
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--t-fast, .18s ease), color var(--t-fast, .18s ease);
  /* border/outline explizit zurücksetzen, BEVOR border-right gesetzt wird.
     In Fold kommt das aus dem globalen Reset (base.css:57 `button, input,
     textarea { border:none; outline:none; background:none }`) — Reverie hat
     KEINEN globalen button-Reset (stylt jeden Button einzeln), also überlebt
     dort der UA-Default `2px outset` und zeichnet sichtbare Kanten in den
     Strip (2026-07-15 in der App gemessen). Ein Package muss für die
     Elemente, die es selbst erzeugt, autark sein und darf sich nicht auf den
     Reset der App-Shell verlassen — sonst sieht es je nach Consumer anders aus. */
  border: none;
  outline: none;
  border-right: 1px solid var(--border, rgba(24,23,20,0.14));
}
.segmented button:last-child { border-right: none; }
.segmented button.is-active {
  background: var(--gold-faint, rgba(200,169,110,0.16));
  color: var(--gold, #c8a96e);
}

/* Tab-Strip-Maß (screens.css:1972–1988). Ohne diese Regel dehnt sich die
   `.segmented`-Leiste (display:flex, button{flex:1}) über die volle
   Container-Breite — in Reverie gemessen 756px statt 220px. Fold zentriert
   den Strip über `.header-slot-center` (position:absolute; left:50%) — das
   ist App-Shell-Chrome und gehört nicht ins Package, daher hier
   `margin-inline:auto` als Äquivalent des sichtbaren Ergebnisses. */
.section-tabs {
  width: 220px;
  max-width: 40vw;
  margin-inline: auto;
}
/* Mobile: 40vw klippt das längste Label auf 375px (fold-Kommentar
   screens.css:1977–1983). */
@media (max-width: 600px) {
  .section-tabs { max-width: 70vw; }
}

/* ── Shell wrappers (this package) ───────────────────────────────────── */
/* Scroll-Modell 1:1 aus Fold: der Screen ist eine Flex-Spalte (base.css:97
   `.screen`), der Tab-Strip bleibt fix, und NUR der Body scrollt
   (`.browse-body` screens.css:1990: flex:1 + overflow-y:auto). Ohne das
   scrollt die Library in Reverie gar nicht — reverie.css:118 setzt
   `html,body{overflow:hidden}` (Canvas-App), d.h. es gibt keinen
   Dokument-Scroll als Fallback: Inhalt über der Viewport-Höhe wird
   schlicht abgeschnitten und ist unerreichbar.
   `min-height:0` ist Pflicht — ohne das weigert sich ein Flex-Child, unter
   seine Content-Höhe zu schrumpfen, und overflow-y:auto greift nie.
   Bewusst NICHT geportet: `.browse-body`s `max-width:700px` + padding.
   `.library-content` hostet auch die Consumer-Panes (Reveries Practice-/
   Worlds-Grids) — ein erzwungenes Maß würde fremdes Layout beschneiden.
   Höhe/Maß gehören dem Consumer-Screen. */
.library-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.library-content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.library-pane.hidden { display: none; }

/* ── Overview (screens.css:4906) ─────────────────────────────────────── */
.library-overview { display: flex; flex-direction: column; gap: 28px; padding-top: var(--space-sm, 8px); }

.library-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(64px, 14vh, 120px) 24px; text-align: center; gap: 10px; }
.library-empty-line { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-weight: 400; color: var(--fg-dim, rgba(24,23,20,0.5)); margin: 0; }
.library-empty-line-1 { font-size: clamp(1.25rem, 3vw, 1.6rem); color: var(--fg, rgba(24,23,20,0.82)); }
.library-empty-line-2 { font-size: 1rem; }
.library-empty-line-3 { font-size: 1rem; margin-top: 14px; }
.library-empty-status { margin-top: 30px; }

.library-aggregate-hint { text-align: center; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-weight: 400; font-size: 1rem; color: var(--fg-dim, rgba(24,23,20,0.5)); margin-top: 12px; }
.library-aggregate-header { text-align: center; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-weight: 400; font-size: 14px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.01em; height: 18px; line-height: 18px; margin-bottom: 4px; }
.library-aggregate { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-weight: 400; font-size: 17px; line-height: 1.55; text-align: center; color: var(--fg-strong, rgba(24,23,20,0.9)); letter-spacing: 0.01em; padding: 4px 0; margin: 0; }
.library-aggregate .line-2 { color: var(--fg, rgba(24,23,20,0.82)); }
.library-aggregate-since { text-align: center; font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); margin-top: 6px; height: 14px; line-height: 14px; }

.library-block-title { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-weight: 400; font-size: 18px; color: var(--fg-strong, rgba(24,23,20,0.9)); letter-spacing: 0.02em; margin-bottom: 12px; }

.library-when { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.library-stats { display: flex; flex-direction: column; align-items: center; gap: 28px; }

/* 24h donut */
.library-day-wheel { width: 240px; height: 240px; display: block; flex: none; }
.library-day-wheel .wheel-ring { fill: none; stroke: var(--border-soft, rgba(24,23,20,0.10)); stroke-width: 0.6; }
.library-day-wheel .wheel-numeral { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; fill: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; pointer-events: none; }
.library-day-wheel path[data-hour] { transition: opacity var(--t-fast, .18s ease), stroke-width var(--t-fast, .18s ease); cursor: pointer; }
.library-day-wheel path[data-hour].is-empty { pointer-events: none; cursor: default; }
.library-day-wheel path[data-hour].is-selected { stroke: var(--fg-strong, rgba(24,23,20,0.9)); stroke-width: 1.4; }
.library-day-wheel .reset-disc { fill: var(--bg, #f4f0e8); stroke: var(--gold, #c8a96e); stroke-width: 0.8; cursor: pointer; transition: fill var(--t-fast, .18s ease), stroke var(--t-fast, .18s ease); }
.library-day-wheel .reset-disc:hover { fill: var(--gold-faint, rgba(200,169,110,0.16)); }
.library-day-wheel .reset-text { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; fill: var(--fg, rgba(24,23,20,0.82)); letter-spacing: 0.08em; pointer-events: none; text-transform: uppercase; }

/* Record inspector (right container) */
.library-rc { height: 240px; border: 1px solid var(--border-soft, rgba(24,23,20,0.10)); border-radius: 4px; background: var(--bg-surface, #f8f5ee); display: flex; flex-direction: column; overflow: hidden; }
.library-rc-header { flex: none; padding: 12px 16px; border-bottom: 1px solid var(--border-soft, rgba(24,23,20,0.10)); font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); }
.library-rc-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.library-rc-empty { display: flex; align-items: center; justify-content: center; flex: 1; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-size: 15px; color: var(--fg-dim, rgba(24,23,20,0.5)); text-align: center; padding: 20px; letter-spacing: 0.01em; }

/* Record tile (inspector + expanded groups) */
.library-dialog-tile { appearance: none; background: transparent; border: none; text-align: left; display: block; width: 100%; padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--border-soft, rgba(24,23,20,0.10)); transition: background-color var(--t-fast, .18s ease), color var(--t-fast, .18s ease); color: inherit; font: inherit; }
.library-dialog-tile:last-child { border-bottom: none; }
.library-dialog-tile:hover { background: var(--gold-faint, rgba(200,169,110,0.16)); color: var(--fg-strong, rgba(24,23,20,0.9)); }
.library-dialog-tile-title { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-size: 14px; letter-spacing: 0.01em; color: var(--fg, rgba(24,23,20,0.82)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-bottom: 4px; }
.library-dialog-tile-meta { display: flex; align-items: center; gap: 8px; font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 11px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.02em; }
.library-dialog-tile-part { color: var(--fg, rgba(24,23,20,0.82)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.library-dialog-tile-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--part-color, var(--fg-dim, rgba(24,23,20,0.5))); flex: none; }
.library-dialog-tile-length { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; color: var(--fg, rgba(24,23,20,0.82)); letter-spacing: 0.04em; flex: none; white-space: nowrap; margin-left: auto; }
.library-dialog-tile-stats { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; flex: none; white-space: nowrap; }
.library-dialog-tile-stats .sep { opacity: 0.5; margin: 0 4px; }

/* Rhythm */
.library-rhythm-chart { display: flex; gap: 8px; }
.library-rhythm-yaxis { position: relative; width: 14px; height: 70px; flex: none; }
.library-rhythm-ytick { position: absolute; right: 0; transform: translateY(50%); font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 7px; line-height: 1; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; }
.library-rhythm-body { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--gold-dim, rgba(200,169,110,0.5)) transparent; }
.library-rhythm-body::-webkit-scrollbar { height: 4px; }
.library-rhythm-body::-webkit-scrollbar-track { background: transparent; }
.library-rhythm-body::-webkit-scrollbar-thumb { background: var(--gold-dim, rgba(200,169,110,0.5)); border-radius: 2px; }
.library-rhythm-body.can-left, .library-rhythm-body.can-right { cursor: grab; }
.library-rhythm-body.is-dragging { cursor: grabbing; user-select: none; }
.library-rhythm-body.can-left { -webkit-mask-image: linear-gradient(90deg, transparent 4px, #000 48px); mask-image: linear-gradient(90deg, transparent 4px, #000 48px); }
.library-rhythm-body.can-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 4px)); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 4px)); }
.library-rhythm-body.can-left.can-right { -webkit-mask-image: linear-gradient(90deg, transparent 4px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 4px)); mask-image: linear-gradient(90deg, transparent 4px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 4px)); }
.library-rhythm-scroll { min-width: 100%; }
.library-rhythm-gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--fg-muted, rgba(24,23,20,0.32)); pointer-events: none; }
.library-daily-timeline { position: relative; height: 70px; display: flex; align-items: flex-end; gap: 1px; border-bottom: 1px solid var(--border-soft, rgba(24,23,20,0.10)); padding-bottom: 2px; }
.library-day-col { flex: 1 0 5px; background: var(--gold, #c8a96e); border-radius: 1px; min-height: 0; cursor: pointer; transition: height var(--t-fast, .18s ease), background-color var(--t-fast, .18s ease), opacity var(--t-fast, .18s ease); }
.library-day-col.empty { background: transparent; height: 0; cursor: default; }
.library-day-col.is-faded { opacity: 0.25; }
.library-day-col.is-selected { opacity: 1; outline: 1px solid var(--fg-strong, rgba(24,23,20,0.9)); outline-offset: 1px; }
.library-weekly-markers { display: flex; gap: 1px; height: 16px; margin-top: 1px; }
.library-weekly-markers > div { flex: 1 0 5px; display: flex; flex-direction: column; align-items: center; position: relative; }
.library-weekly-markers > div.is-monday::before { content: ''; display: block; width: 1px; height: 4px; background: var(--fg-dim, rgba(24,23,20,0.5)); flex: none; }
.library-weekly-markers > div.is-monday::after { content: 'MO'; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 7px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; margin-top: 1px; white-space: nowrap; position: absolute; top: 5px; }
.library-daily-axis { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; }

/* Ranked list */
.library-parts-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.library-part-list { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 0; margin: 0; }
.library-part-item { border-bottom: 1px solid var(--border-soft, rgba(24,23,20,0.10)); }
.library-part-item:last-child { border-bottom: none; }
.library-part-row { appearance: none; background: transparent; border: none; text-align: left; color: inherit; font: inherit; display: grid; grid-template-columns: 1fr 28px 16px; gap: 12px; align-items: center; width: 100%; padding: 8px 0; cursor: pointer; transition: background-color var(--t-fast, .18s ease); }
.library-part-row:hover { background: var(--gold-faint, rgba(200,169,110,0.16)); }
.library-part-row .part-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.library-part-row .part-name { color: var(--fg, rgba(24,23,20,0.82)); font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-weight: 400; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-part-row .part-bar-track { position: relative; height: 2px; background: var(--fg-faint, rgba(24,23,20,0.08)); border-radius: 1px; overflow: hidden; }
.library-part-row .part-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--part-color, var(--fg-strong, rgba(24,23,20,0.9))); border-radius: 1px; }
.library-part-row .part-count { text-align: right; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; color: var(--fg-dim, rgba(24,23,20,0.5)); letter-spacing: 0.04em; }
.library-part-row .part-chevron { text-align: center; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 11px; color: var(--fg-dim, rgba(24,23,20,0.5)); transition: transform var(--t-fast, .18s ease); }
.library-part-item.is-expanded .part-chevron { transform: rotate(90deg); color: var(--fg, rgba(24,23,20,0.82)); }
.library-part-dialogs { display: none; background: var(--bg-surface, #f8f5ee); border-radius: 3px; margin: 0 0 8px 40px; padding: 4px 0; }
.library-part-item.is-expanded .library-part-dialogs { display: block; }

/* Sort UI (minimal — degraded-functional; Fold styles .browse-sort at screens.css:3427) */
.browse-sort-wrap { display: inline-flex; align-items: center; gap: 6px; }
.browse-sort { font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 11px; color: var(--fg-dim, rgba(24,23,20,0.5)); background: transparent; border: 1px solid var(--border, rgba(24,23,20,0.14)); border-radius: 4px; padding: 3px 6px; cursor: pointer; }
.browse-sort-dir { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 12px; color: var(--fg-dim, rgba(24,23,20,0.5)); background: transparent; border: none; cursor: pointer; }

/* Responsive (screens.css @media 600px) */
@media (max-width: 600px) {
  .library-stats { gap: 5px; }
  .library-when { grid-template-columns: 1fr; gap: 16px; }
  .library-day-wheel { width: 200px; height: 200px; margin: 0 auto; }
  .library-rc { height: 180px; }
}

/* ══ view-pair — Moods · Meditations (view-pair.js) ═══════════════════════
   Wort-Navigation statt weiterer Tab-Leiste (Reverie-Spec 2026-07-24 §4):
   kursive Serif-Wörter, das aktive aufrecht mit Gold-Unterstreichung.
   Wechsel = voller Swipe (480ms, 60% Versatz + Fade); die alte Body liegt
   währenddessen absolut. Werte 1:1 aus mood-placement.html. */
.library-view-pair { }
.library-view-words { display: flex; justify-content: center; align-items: baseline; gap: 14px; margin: 2px 0 var(--space-lg, 24px); }
.library-view-words .sep { color: var(--fg-muted, rgba(24,23,20,0.32)); }
.library-view-words button { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-size: 1.15rem; color: var(--fg-dim, rgba(24,23,20,0.5)); transition: color var(--t-fast, .15s ease); }
.library-view-words button:hover { color: var(--fg, rgba(24,23,20,0.75)); }
.library-view-words button.is-on { color: var(--fg-strong, rgba(24,23,20,0.92)); font-style: normal; text-decoration: underline; text-decoration-color: var(--gold, #c8a96e); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.library-view-stage { position: relative; overflow-x: clip; }
.library-view-body { }
.library-view-body.hidden { display: none; }
.library-view-body.swipe-anim { transition: opacity .48s ease, transform .48s cubic-bezier(.22,.61,.36,1); }
.library-view-body.swipe-in-right { transform: translateX(60%); opacity: 0; }
.library-view-body.swipe-in-left { transform: translateX(-60%); opacity: 0; }
.library-view-body.swipe-gone-left { transform: translateX(-60%); opacity: 0; }
.library-view-body.swipe-gone-right { transform: translateX(60%); opacity: 0; }
.library-view-body.swipe-out { position: absolute; top: 0; left: 0; width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .library-view-body.swipe-anim { transition: none; }
}

/* ══ Mood-Meter (mood-overview.js) ════════════════════════════════════════
   Struktur + Maße hier, Werte 1:1 aus mood-placement.html / mood-overview.html.
   Der Feld-GRADIENT ist HOST-Sache (Reverie liefert seinen .mood-field-
   Verlauf via Override) — Fallback ist die flache Kartenfarbe, damit das
   Package ohne Host lesbar degradiert. */
.library-mood { display: flex; flex-direction: column; }

/* Scope-Filter als Mono-Caps-Wortzeile (RESET/SKIP-Vokabular), nicht als
   weiteres Boxen-Segmented — sonst stapeln sich die Kasten-Leisten. */
.library-mood-scope { display: flex; justify-content: center; gap: 18px; margin-bottom: var(--space-md, 16px); }
.library-mood-scope button { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); transition: color var(--t-fast, .15s ease); }
.library-mood-scope button:hover { color: var(--fg, rgba(24,23,20,0.75)); }
.library-mood-scope button.is-on { color: var(--gold, #c8a96e); }

.library-mood-controls { display: flex; justify-content: center; gap: var(--space-sm, 8px); margin-bottom: var(--space-lg, 24px); }
.library-mood-cat { padding: 5px 10px; background: var(--control-bg, rgba(24,23,20,0.05)); border: 1px solid var(--control-border, rgba(24,23,20,0.18)); border-radius: var(--radius-md, 4px); color: var(--fg, rgba(24,23,20,0.75)); font-size: 0.78rem; font-family: inherit; cursor: pointer; max-width: 45%; }

/* Orte-Picker: Trigger in Control-Optik, Papier-Panel mit Gruppen,
   Aktivitäts-Zahlen und Tipp-Filter ab >10 Einträgen. */
.library-mood-place { position: relative; }
.library-mood-trigger { padding: 5px 10px; background: var(--control-bg, rgba(24,23,20,0.05)); border: 1px solid var(--control-border, rgba(24,23,20,0.18)); border-radius: var(--radius-md, 4px); color: var(--fg, rgba(24,23,20,0.75)); font-size: 0.78rem; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.library-mood-trigger .pp-caret { font-size: 0.58rem; color: var(--fg-dim, rgba(24,23,20,0.5)); }
.library-mood-panel { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: min(280px, calc(100vw - 32px)); max-height: 340px; overflow-y: auto; background: var(--bg-surface, rgba(244,240,232,0.95)); border: 1px solid var(--gold-dim, rgba(200,169,110,0.5)); border-radius: 6px; box-shadow: 0 2px 10px rgba(24,23,20,0.15); z-index: 6; padding: 4px 0 6px; text-align: left; }
.library-mood-panel.hidden { display: none; }
.library-mood-panel .pp-search { display: block; width: calc(100% - 24px); margin: 6px 12px 4px; padding: 4px 0; background: none; border: none; border-bottom: 1px solid var(--border, rgba(24,23,20,0.12)); font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 0.8rem; color: var(--fg, rgba(24,23,20,0.75)); }
.library-mood-panel .pp-search:focus { outline: none; border-bottom-color: var(--gold, #c8a96e); }
.library-mood-panel .pp-search::placeholder { color: var(--fg-muted, rgba(24,23,20,0.32)); }
.library-mood-panel .pp-group { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted, rgba(24,23,20,0.32)); padding: 9px 12px 3px; }
.library-mood-panel .pp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; background: none; border: none; cursor: pointer; padding: 6px 12px; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-size: 0.95rem; color: var(--fg, rgba(24,23,20,0.75)); text-align: left; transition: background-color var(--t-fast, .15s ease); }
.library-mood-panel .pp-row:hover { background: var(--gold-faint, rgba(200,169,110,0.16)); }
.library-mood-panel .pp-row.is-on { color: var(--gold, #c8a96e); }
.library-mood-panel .pp-count { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; color: var(--fg-dim, rgba(24,23,20,0.5)); }
.library-mood-panel .pp-empty { padding: 10px 12px; font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-size: 0.9rem; color: var(--fg-dim, rgba(24,23,20,0.5)); }

/* Bühne: Phasen-Donut links, Feld-Spalte rechts; wrappt auf schmalen
   Screens untereinander. Das Rad richtet sich an der FELD-Mitte aus
   (Legende 15px + 10px Abstand + Feld 380px → SVG-Mitte bei 132+85). */
.library-mood-stage { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-xl, 40px); flex-wrap: wrap; }
.library-mood-wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm, 8px); margin-top: 148px; }   /* Rad-Mitte = Feld-Mitte (Legende ist jetzt zweizeilig) */
.library-mood-wheel { width: 170px; height: 170px; }
.library-mood-wheel .wheel-ring { fill: none; stroke: var(--border, rgba(24,23,20,0.12)); stroke-width: 1; }
.library-mood-wheel .wheel-numeral { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; letter-spacing: 0.08em; fill: var(--fg-dim, rgba(24,23,20,0.5)); }
.library-mood-wheel path { cursor: pointer; transition: opacity var(--t-fast, .15s ease); }
.library-mood-wheel path:hover { opacity: 1; }
/* Leere Phasen: sichtbar als Form, aber tot — wie is-empty im Stunden-Rad. */
.library-mood-wheel path.is-empty { pointer-events: none; cursor: default; }
/* Reset wie im Stunden-Rad: die GANZE innere Kreisfläche ist das Ziel,
   der Text liegt nur darauf. */
.library-mood-wheel .reset-disc { fill: var(--bg, #f4f0e8); stroke: var(--gold, #c8a96e); stroke-width: 0.8; cursor: pointer; transition: fill var(--t-fast, .15s ease); }
.library-mood-wheel .reset-disc:hover { fill: var(--gold-faint, rgba(200,169,110,0.16)); }
.library-mood-wheel .reset-text { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; letter-spacing: 0.12em; fill: var(--fg, rgba(24,23,20,0.75)); pointer-events: none; text-transform: uppercase; }
.library-mood-caption { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); min-height: 1.2em; }

/* Feld-Spalte: Legende ÜBER dem Feld (einzeilig auf der Feld-Achse, darf
   seitlich überstehen), Spiegel-Satz UNTER dem Feld — mittig zum Feld,
   nicht zur Bühne. */
.library-mood-field-col { display: flex; flex-direction: column; align-items: center; width: min(380px, 100%); }
.library-mood-legend { display: flex; justify-content: center; gap: var(--space-lg, 24px); font-size: 0.72rem; color: var(--fg-dim, rgba(24,23,20,0.5)); margin: 0 0 3px; flex-wrap: wrap; width: max-content; max-width: calc(100vw - 48px); align-self: center; }
.library-mood-legend span { display: flex; align-items: center; gap: 6px; }
.library-mood-legend .lg-ring { width: 12px; height: 12px; border-radius: 50%; border: 1.1px solid rgba(24,23,20,0.65); opacity: 0.9; }
.library-mood-legend .lg-ring.is-before { border-width: 0.8px; opacity: 0.55; }   /* wie die Feld-Ringe */
.library-mood-legend .lg-needle { width: 18px; height: 0; border-top: 2px solid var(--gold, #c8a96e); }
.library-mood-legend-hint { color: var(--fg-muted, rgba(24,23,20,0.32)); font-size: 0.72rem; text-align: center; margin: 0 0 10px; }

.library-mood-field { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border, rgba(24,23,20,0.12)); overflow: hidden; background: var(--practice-card-bg, #f6f3ec); }
.library-mood-center { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); pointer-events: none; }
.library-mood-center::before, .library-mood-center::after { content: ""; position: absolute; background: rgba(24,23,20,0.20); }
.library-mood-center::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.library-mood-center::after { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.library-mood-pole { position: absolute; font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-size: 0.66rem; letter-spacing: 0.05em; color: var(--fg-dim, rgba(24,23,20,0.5)); pointer-events: none; z-index: 2; }
.library-mood-pole.is-top { top: 9px; left: 0; right: 0; text-align: center; }
.library-mood-pole.is-bottom { bottom: 9px; left: 0; right: 0; text-align: center; }
.library-mood-pole.is-left { left: 2px; top: 0; bottom: 0; width: 22px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); }
.library-mood-pole.is-right { right: 2px; top: 0; bottom: 0; width: 22px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; }
.library-mood-field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* pointer-events:all — sonst trifft man einen fill:none-Ring nur auf seiner
   0.5px-Linie; so zählt die ganze Kreisfläche als Ziel. */
.library-mood-field svg .mark { cursor: pointer; pointer-events: all; }
.library-mood-field svg .needle, .library-mood-field svg .sel-path { pointer-events: none; }

/* Hover-Karte */
.library-mood-tip { position: absolute; z-index: 5; width: 220px; padding: 10px 12px; background: var(--bg-surface, rgba(244,240,232,0.95)); border: 1px solid var(--gold-dim, rgba(200,169,110,0.5)); border-radius: 6px; box-shadow: 0 2px 10px rgba(24,23,20,0.15); pointer-events: none; opacity: 0; transition: opacity var(--t-fast, .15s ease); }
.library-mood-tip.show { opacity: 1; }
.library-mood-tip .t-date { font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); }
.library-mood-tip .t-name { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-size: 1.02rem; color: var(--fg-strong, rgba(24,23,20,0.92)); margin: 2px 0; }
.library-mood-tip .t-shift { font-size: 0.74rem; color: var(--fg, rgba(24,23,20,0.75)); line-height: 1.45; }
.library-mood-tip .t-shift b { font-weight: 500; }
.library-mood-tip .t-music { font-size: 0.7rem; color: var(--fg-dim, rgba(24,23,20,0.5)); margin-top: 3px; }

/* Spiegel-Satz + Session-Auswahl */
.library-mood-mirror { font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif); font-style: italic; font-size: 1.05rem; color: var(--fg, rgba(24,23,20,0.75)); text-align: center; margin-top: var(--space-lg, 24px); line-height: 1.5; min-height: 2.6em; width: 100%; }
.library-mood-mirror b { font-style: normal; font-weight: 500; }
.library-mood-mirror .n { color: var(--fg-dim, rgba(24,23,20,0.5)); }
/* Lösen der Auswahl — dort, wo sie erscheint (an ihrer Zeile), in der
   RESET/SKIP-Vokabel. × RESET im Donut löst NUR den Phasen-Filter. */
.library-mood-mirror .sel-close { background: none; border: none; padding: 0; margin-left: 18px; cursor: pointer; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-style: normal; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.5)); vertical-align: 1px; transition: color var(--t-fast, .15s ease); }
.library-mood-mirror .sel-close:hover { color: var(--fg, rgba(24,23,20,0.75)); }
/* Notizen der ausgewählten Session: Lese-Absätze, nicht Zitatzeilen — die
   Texte sind multiline und können lang werden. Linksbündig auf Lesebreite,
   Zeilenumbrüche erhalten, nach 4 Zeilen leise geklammert („more"). */
/* Der SATZ bleibt unter dem Mood-Meter (er beschreibt dessen zwei Punkte);
   nur die NOTIZEN nehmen die Bühnenbreite — vorher lagen sie in der 380px-
   Feld-Spalte und klebten an deren linker Kante, während der Donut 200px
   weiter links begann (Chris 2026-08-01). Dazwischen deutlich Luft. */
/* Bühne und Notizen teilen sich EINEN Block, der auf die natürliche Breite der
   Bühne schrumpft — nur so beginnen die Notizen exakt an der Donut-Kante
   (Chris 2026-08-01). Eine feste max-width traf sie nur zufällig: bei 1280px
   stimmte es, bei anderer Fensterhöhe/Pane-Breite lag sie 90px daneben. */
/* Breite RECHNEN statt aus dem Inhalt ableiten: `fit-content` traf die Summe
   der Reihe auf den Pixel genau (170 Donut + 40 Gap + 380 Feld), und beim
   Runden kippte die Reihe um — der Donut sprang über das Feld, sichtbar genau
   dann, wenn nichts ausgewählt war und der Notiz-Bereich leer blieb (Chris
   2026-08-01). Mit min() ist es deterministisch: passt die Reihe, steht sie
   nebeneinander; ist es enger, klappt sie wie vorgesehen. */
.library-mood-block {
  width: min(100%, calc(170px + var(--space-xl, 40px) + 380px));
  margin: 0 auto;
  /* Als Flex-Kind hätte er `min-width: auto` und würde von der Notiz-Grid
     wieder aufgezogen (gemessen: 582 ohne Auswahl, 637 mit). */
  min-width: 0;
}
/* Schrift wie im Spiegel: die Notizen ERBTEN sie von dort, solange sie in ihm
   lagen. Der eigene Behälter erbt sie nicht — ohne diese Zeile wechselten sie
   beim Umzug still von Serif-Kursiv auf die UI-Schrift (Chris 2026-08-01:
   „dazu gab es keinen Auftrag"). */
.library-mood-notes {
  width: 100%; margin: 34px 0 0;
  /* Serif wie der Satz darüber, aber AUFRECHT: der Satz ist eine Formulierung
     der App (kursiv, wie ein Zitat), die Notiz ist der eigene Fließtext des
     Users — den liest man aufrecht besser (Chris 2026-08-01). */
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-style: normal; color: var(--fg, rgba(24,23,20,0.75)); line-height: 1.5;
}
.library-mood-notes .note-cols {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg, 24px);
  text-align: left;
}
/* Jede Notiz als eigene Karte (Chris 2026-08-01: „das würde es elevaten") —
   Rahmen-Werte 1:1 aus dem gerahmten Kleintext der Anweisungskarte, damit es
   dasselbe Papier IST und nicht nur so aussieht. */
.library-mood-notes .note-block {
  margin: 0; text-align: left; min-width: 0;
  border: 1px solid var(--border-strong, rgba(24,23,20,0.2)); border-radius: 8px;
  padding: 0.95rem 1.1rem; background: var(--control-bg, rgba(24,23,20,0.03));
  box-sizing: border-box;
  /* Spalte, damit die Knöpfe unten ankern: beide Karten sind gleich hoch
     (Grid), und ihre Knopfreihen stehen damit auf einer Linie. */
  display: flex; flex-direction: column;
  /* Feste Mindesthöhe = das bekannte Maximum: acht Textzeilen (die Klammer
     oben) + Etikett + Knopfreihe + Polster. Damit ändert das Umschalten auf
     „edit" die Höhe NIE, und das Feld hat immer Platz (Chris 2026-08-01:
     „wenn wir wissen, es ist maximal 8 Zeilen hoch, wissen wir die maximale
     Länge der Karte"). 1.4725rem = 0.95rem × 1.55 Zeilenhöhe. */
  min-height: calc(8 * 1.4725rem + 94px);
}
.library-mood-notes .note-view { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
/* `display` schlägt das hidden-Attribut — beide Zustände brauchen es explizit,
   sonst stehen Ansicht UND Editor gleichzeitig da (gesehen 2026-08-01). */
.library-mood-notes .note-view[hidden], .library-mood-notes .note-edit[hidden] { display: none; }
/* Bearbeiten/Löschen — leise, in der Zeile darunter; erst beim Lesen der
   Notiz relevant, deshalb kein Gewicht. */
/* Bottom-bound: die Knöpfe hängen nicht am Text, sondern am Fuß der Karte
   (Chris 2026-08-01) — sonst wandern sie mit jeder Notizlänge. */
.library-mood-notes .note-acts { display: flex; gap: var(--space-md, 16px); margin-top: auto; padding-top: 12px; }
.library-mood-notes .note-act {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-style: normal;
  font-size: 0.72rem; color: var(--fg-dim, rgba(24,23,20,0.5));
  text-decoration: underline; text-underline-offset: 3px;
}
.library-mood-notes .note-act:hover { color: var(--gold, #c8a96e); }
.library-mood-notes .note-act.is-del:hover { color: var(--fav-color, #c0705f); }
/* Editieren: dieselbe Gestalt wie im Check-in — Feld, darunter × und ✓. */
.library-mood-notes .note-edit { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
/* Die Karte IST der Editor: das Feld sitzt rahmenlos in ihr, sonst stünde ein
   Kasten im Kasten. Den Fokus zeigt die Karte selbst (unten). */
/* Das Feld füllt die Karte — beim Umschalten auf „edit" darf ihre Höhe sich
   nicht ändern (Chris 2026-08-01). Längere Texte scrollen im Feld. */
.library-mood-notes .note-ta {
  width: 100%; box-sizing: border-box; resize: none; flex: 1; min-height: 0; overflow-y: auto;
  background: transparent; border: none; padding: 0;
  font-family: inherit; font-style: inherit; font-size: 0.95rem; line-height: 1.55;
  color: var(--fg, rgba(24,23,20,0.82));
}
.library-mood-notes .note-ta:focus { outline: none; }
/* Fokus-Rahmen nach INNEN: außen legte er sich über die Kante des Scrollers
   und wurde links angeschnitten (Chris 2026-08-01, an seinem Screenshot). */
.library-mood-notes .note-block:has(.note-ta:focus) {
  border-color: var(--gold, #c8a96e); box-shadow: inset 0 0 0 1px var(--gold, #c8a96e);
}
/* Dieselbe Reihe, derselbe Platz wie „edit · delete": links, am Fuß. Zwei
   Zustände derselben Karte sollen ihre Knöpfe nicht von links nach rechts
   springen lassen. Werte der Knöpfe 1:1 aus dem Check-in (.checkin-note-ok /
   .checkin-note-x): ✓ trägt grün, × wird beim Hover rot. */
.library-mood-notes .note-edit-acts {
  display: flex; gap: 18px; justify-content: flex-start; margin-top: auto; padding-top: 12px;
}
.library-mood-notes .note-x, .library-mood-notes .note-ok {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: none; border: 1px solid var(--border-strong, rgba(24,23,20,0.2));
  font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-style: normal;
  font-size: 15px; line-height: 1; color: var(--fg-dim, rgba(24,23,20,0.5));
  transition: color var(--t-fast, .15s ease), border-color var(--t-fast, .15s ease), background-color var(--t-fast, .15s ease);
}
.library-mood-notes .note-ok { color: var(--confirm-color, #7ab08a); }
.library-mood-notes .note-ok:hover { border-color: var(--confirm-color, #7ab08a); background: rgba(122, 176, 138, 0.10); }
.library-mood-notes .note-x:hover { color: var(--fav-color, #b0564a); border-color: var(--fav-color, #b0564a); }
/* Fuß: leise Trennlinie, darunter das Löschen des ganzen Eintrags. */
.library-mood-notes .entry-foot {
  margin-top: 22px; padding-top: 14px; text-align: center;
  border-top: 1px solid var(--border, rgba(24,23,20,0.12));
}
/* Rot und lesbar (Chris 2026-08-01): es ist die einzige Stelle der Karte, die
   etwas wegnimmt — sie soll nicht wie ein Schatten aussehen. */
.library-mood-notes .entry-delete {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-style: normal;
  font-size: 0.76rem; letter-spacing: 0.02em; color: var(--fav-color, #b0564a);
}
.library-mood-notes .entry-delete:hover { color: var(--fav-color, #b0564a); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .library-mood-notes .note-cols { grid-template-columns: 1fr; }
}
/* Etikett einen Tick kräftiger als der Rest der Kleinschrift (Chris
   2026-08-01) — es benennt die Spalte, das darf man lesen können. */
.library-mood-notes .note-k { display: block; font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace); font-style: normal; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim, rgba(24,23,20,0.55)); margin-bottom: 6px; }
/* Acht Zeilen, dann erst „more" (Chris 2026-08-01) — vier schnitten schon
   kurze Gedanken ab. */
.library-mood-notes .note-text { font-size: 0.95rem; color: var(--fg, rgba(24,23,20,0.75)); line-height: 1.55; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; }
.library-mood-notes .note-block.is-open .note-text { display: block; -webkit-line-clamp: none; }
.library-mood-notes .note-more { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-ui, 'DM Sans', system-ui, sans-serif); font-style: normal; font-size: 0.72rem; color: var(--fg-dim, rgba(24,23,20,0.5)); text-decoration: underline; text-underline-offset: 3px; }
.library-mood-notes .note-more:hover { color: var(--gold, #c8a96e); }

@media (max-width: 640px) {
  .library-mood-stage { gap: var(--space-lg, 24px); }
  .library-mood-wheel-wrap { margin-top: 0; }
}

/* Auswahl: konkrete Zustands-Wörter (Check-in-Vokabular) als leise zweite
   Zeile — Optik wie die Intensitäts-Zeile des Check-in-Spiegels. */
.library-mood-mirror .sel-words { font-size: 0.92rem; color: var(--fg-dim, rgba(24,23,20,0.5)); margin-top: 2px; }
