  :root {
    --bg: #f5f1ea;
    --bg-elevated: #faf7f1;
    --surface: #ffffff;
    --ink: #2a2622;
    --ink-soft: #5c544c;
    --ink-muted: #7a6f64;
    --line: #e6dfd3;
    --line-soft: #efeae0;
    --accent: #6b5d4f;
    --accent-soft: #8a7c6e;
    --warm: #c9b89f;
    --danger: #a85541;
    --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;
  }

  /* ───── Globaler Fokus-Indikator (Keyboard-Navigation) ───── */
  /* outline:none entfernt den Browser-Standard — wir ersetzen ihn gezielt
     nur für Tastatur-Nutzer (:focus-visible), nicht für Maus-Klicks (:focus). */
  :focus { outline: none; }
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
  }

  /* ───── Animationen respektieren System-Präferenz ───── */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter Tight', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
  }

  .display {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  /* ───── App-Shell ───── */
  #app {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* ───── Header ───── */
  .header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
    padding-top: calc(20px + var(--safe-top));
  }

  .header-back {
    width: 44px;
    height: 44px;
    margin-left: -10px;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 22px;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .header-back:active { background: var(--line-soft); }
  .header-back.hidden { display: none; }

  .header-title {
    flex: 1;
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .header-step {
    font-size: 13px;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }

  /* ───── Progress ───── */
  .progress {
    height: 2px;
    background: var(--line-soft);
    position: relative;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
  }

  /* ───── Content-Bereich ───── */
  .content {
    flex: 1;
    padding: 32px 24px 140px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .step-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    margin-bottom: 12px;
    font-weight: 500;
  }

  .step-question {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 8px;
  }

  .step-hint {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 28px;
    font-style: italic;
    font-family: 'Fraunces', serif;
    font-weight: 300;
  }

  /* ───── Form-Felder ───── */
  textarea, input[type="text"], input[type="datetime-local"] {
    width: 100%;
    min-height: 52px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-elevated);
    color: var(--ink);
    font-family: inherit;
    font-size: 17px;
    line-height: 1.5;
    resize: none;
    -webkit-appearance: none;
    transition: border-color 200ms, background 200ms;
  }

  textarea {
    min-height: 140px;
    line-height: 1.6;
  }

  textarea:focus, input:focus {
    outline: none; /* globales :focus-visible greift hier nicht, da wir border stattdessen nutzen */
    border-color: var(--accent-soft);
    background: var(--surface);
  }
  textarea:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
  }

  textarea::placeholder, input::placeholder {
    color: var(--ink-muted);
    font-style: italic;
  }

  /* ───── Rich-Text-Editor ───── */
  .rich-editor {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-elevated);
    overflow: hidden;
    transition: border-color 200ms, background 200ms;
  }
  .rich-editor:focus-within {
    border-color: var(--accent-soft);
    background: var(--surface);
  }
  .rich-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--bg);
  }
  .rich-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 4px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 120ms, color 120ms;
  }
  .rich-btn:active,
  .rich-btn.active {
    background: var(--line);
    color: var(--ink);
  }
  .rich-content {
    width: 100%;
    min-height: 140px;
    padding: 16px 18px;
    color: var(--ink);
    font-family: inherit;
    font-size: 17px;
    line-height: 1.6;
    outline: none;
    word-break: break-word;
  }
  .rich-content:empty::before {
    content: attr(data-placeholder);
    color: var(--ink-muted);
    font-style: italic;
    pointer-events: none;
  }
  .rich-content ul {
    margin: 4px 0;
    padding-left: 22px;
  }
  .rich-content li {
    margin: 2px 0;
  }
  .thought-rich {
    min-height: 90px;
  }

  /* ───── Slider ───── */
  .slider-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px 20px 20px;
  }

  .slider-value {
    font-family: 'Fraunces', serif;
    font-size: 56px;
    font-weight: 300;
    text-align: center;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
  }

  .slider-label-current {
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 22px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-height: 16px;
  }

  input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 48px;
    background: transparent;
    margin: 0;
  }
  input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(to right, var(--accent) var(--val, 50%), var(--line) var(--val, 50%));
    border-radius: 2px;
  }
  input[type="range"]::-moz-range-track {
    height: 4px;
    background: var(--line);
    border-radius: 2px;
  }
  input[type="range"]::-moz-range-progress {
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
    cursor: pointer;
    margin-top: -12px;
    box-shadow: 0 2px 8px rgba(42, 38, 34, 0.12);
  }
  input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(42, 38, 34, 0.12);
  }

  .slider-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  /* ───── Chip-Selektor (Gefühle) ───── */
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  .chip {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 180ms ease;
    display: inline-flex;
    align-items: center;
  }
  .chip:active { transform: scale(0.96); }
  .chip.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
  }

  /* ───── Wahl-Karten (Wer beginnt?) ───── */
  .choice-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .choice-card {
    padding: 22px 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    color: var(--ink);
    font-family: inherit;
    font-size: 17px;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .choice-card:active { transform: scale(0.98); background: var(--surface); }
  .choice-card.choice-active {
    background: var(--surface);
    border-color: var(--ink);
    border-width: 1.5px;
  }
  .choice-card.choice-active .choice-icon {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
  }
  .choice-card .choice-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
    border: 1px solid var(--line);
  }
  .choice-card .choice-text {
    flex: 1;
  }
  .choice-card .choice-title {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
  }
  .choice-card .choice-sub {
    font-size: 13px;
    color: var(--ink-muted);
  }

  /* ───── Bottom-Bar ───── */
  .bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 560px;
    padding: 16px 24px calc(16px + var(--safe-bottom));
    background: linear-gradient(to top, var(--bg) 70%, rgba(245, 241, 234, 0));
    display: flex;
    gap: 10px;
    z-index: 20;
  }

  .btn {
    flex: 1;
    height: 56px;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: all 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .btn:active { transform: scale(0.97); }

  .btn-primary {
    background: var(--ink);
    color: var(--bg);
  }
  .btn-primary:disabled {
    background: var(--line);
    color: var(--ink-muted);
    cursor: not-allowed;
  }

  .btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
  }

  .btn-ghost {
    background: transparent;
    color: var(--ink-soft);
  }

  .btn-danger-text {
    color: var(--danger);
  }

  /* ───── Übersichts-Liste ───── */
  .home-hero {
    padding: 48px 24px 36px;
    border-bottom: 1px solid var(--line);
  }
  .home-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }
  .settings-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 12px;
    color: var(--ink-soft);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: -4px -8px 0 0;
    letter-spacing: 0.1em;
  }
  .settings-btn:active { background: var(--line-soft); }
  .sync-pill {
    margin-top: 18px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
  }
  .sync-pill:active { background: var(--surface); }
  .sync-pill .sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-muted);
    flex-shrink: 0;
  }
  .sync-pill.sync-pill-ok .sync-dot {
    background: #6b9a6e;
  }
  .home-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    font-weight: 500;
    margin-bottom: 12px;
  }
  .home-title {
    font-family: 'Fraunces', serif;
    font-size: 38px;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
  }
  .home-title em {
    font-style: italic;
    font-weight: 400;
  }
  .home-subtitle {
    font-size: 15px;
    color: var(--ink-soft);
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
  }

  .list-wrap {
    padding: 24px 24px 140px;
  }
  .list-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    font-weight: 500;
    margin: 8px 0 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .select-mode-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    text-transform: none;
    letter-spacing: 0;
  }
  .select-mode-btn:active { opacity: 0.6; }
  .list-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--ink-muted);
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
  }
  .list-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 24px;
    color: var(--accent-soft);
  }

  .analysis-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 200ms ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .analysis-card:active { transform: scale(0.98); background: var(--surface); }
  .analysis-card.selected {
    border-color: var(--accent);
    background: rgba(107, 93, 79, 0.06);
  }
  .analysis-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }
  .analysis-card-date {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  .analysis-card-meta {
    font-size: 12px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
  }
  .analysis-card-title {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
  }
  .analysis-card-snippet {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .analysis-card-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
  }
  .analysis-card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .analysis-card-stat strong {
    color: var(--ink-soft);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  /* ───── Draft-Badge ───── */
  .draft-badge {
    background: rgba(201, 184, 159, 0.25);
    color: var(--accent);
    border: 1px solid var(--warm);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }

  /* ───── Auswahl-Modus ───── */
  .card-select-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--bg);
    flex-shrink: 0;
    align-self: flex-start;
    margin-bottom: 4px;
    transition: all 160ms ease;
  }
  .card-select-circle.checked {
    background: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 3 7-7' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 10px;
  }
  .selection-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 14px 20px calc(14px + var(--safe-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 30;
    box-shadow: 0 -4px 20px rgba(42,38,34,0.08);
  }
  .selection-count {
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 500;
  }
  .selection-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .selection-bar-btn {
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 140ms ease;
  }
  .selection-bar-btn:active { opacity: 0.7; }
  .selection-bar-btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
  }
  .selection-bar-btn-primary:disabled {
    background: var(--line);
    border-color: var(--line);
    color: var(--ink-muted);
    cursor: default;
  }
  .selection-bar-btn-danger {
    color: var(--danger);
    border-color: rgba(168, 85, 65, 0.3);
  }
  .selection-bar-btn-danger:disabled {
    color: var(--ink-muted);
    border-color: var(--line);
    cursor: default;
  }

  .fab-add {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: 50%;
    transform: translateX(280px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(42, 38, 34, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease;
  }
  @media (max-width: 600px) {
    .fab-add { right: 24px; transform: none; }
    .fab-add:active { transform: scale(0.92); }
  }
  .fab-add:active { transform: translateX(280px) scale(0.94); }

  /* ───── Runden-Übersicht ───── */
  .round-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
  }
  .round-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
  }
  .round-summary-title {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 500;
  }
  .round-summary-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--bg);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
  }
  .round-summary-row {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: 8px;
  }
  .round-summary-row strong {
    color: var(--ink);
    font-weight: 500;
    font-family: 'Fraunces', serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 2px;
  }
  .round-edit-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .round-delete-btn {
    color: var(--danger);
    border-color: var(--danger);
  }

  /* ───── Detail-Ansicht (read-only) ───── */
  .detail-section {
    margin-bottom: 32px;
  }
  .detail-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 400;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
  }
  .detail-row {
    margin-bottom: 16px;
  }
  .detail-row-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    margin-bottom: 4px;
    font-weight: 500;
  }
  .detail-row-value {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    white-space: pre-wrap;
  }
  .detail-row-value.muted {
    color: var(--ink-muted);
    font-style: italic;
  }
  .detail-divider {
    height: 1px;
    background: var(--line);
    margin: 24px 0;
  }
  .detail-thought {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
  .detail-thought:last-child { margin-bottom: 0; }
  .detail-thought-num {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    margin-bottom: 4px;
    font-weight: 500;
  }
  .detail-thought-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre-wrap;
  }
  .detail-thought-text.muted {
    color: var(--ink-muted);
    font-style: italic;
  }
  .detail-thought-feelings {
    margin-top: 6px;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }

  /* ───── Gedanken-Karten ───── */
  .thought-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px 18px;
  }
  .thought-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  .thought-card-num {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    font-weight: 500;
  }
  .thought-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1;
  }
  .thought-remove:active { background: var(--line-soft); }
  .thought-text {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    -webkit-appearance: none;
  }
  .thought-text:focus { outline: none; border-color: var(--accent-soft); }
  .thought-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  .thought-feel-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    margin: 14px 0 8px;
    font-weight: 500;
  }
  .chips-compact .chip {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }
  .thought-other {
    width: 100%;
    margin-top: 10px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    background: var(--surface);
    font-family: inherit;
    font-size: 15px;
    -webkit-appearance: none;
  }
  .thought-other:focus { outline: none; border-color: var(--accent-soft); }
  .thought-other:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }

  /* ───── Modal / Sheet ───── */
  .sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(42, 38, 34, 0.4);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }
  .sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 560px;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    z-index: 101;
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
    padding: 12px 24px calc(24px + var(--safe-bottom));
    max-height: 85vh;
    overflow-y: auto;
  }
  .sheet.open {
    transform: translateX(-50%) translateY(0);
  }
  .sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 0 auto 18px;
  }
  .sheet-title {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
  }
  .sheet-text {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0 0 24px;
  }
  .sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .sheet-action {
    height: 54px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .sheet-action:active { transform: scale(0.98); }
  .sheet-action.danger { color: var(--danger); }

  .settings-legal-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 0 4px;
    font-size: 13px;
    color: var(--ink-muted);
  }
  .settings-legal-links a {
    color: var(--ink-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .settings-legal-links a:hover { color: var(--ink-soft); }

  /* ───── Settings & Setup ───── */
  .settings-section {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 4px 16px;
    margin-bottom: 18px;
  }
  .settings-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .settings-row:last-child { border-bottom: none; }
  .settings-row-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    margin-bottom: 4px;
    font-weight: 500;
  }
  .settings-row-value {
    font-size: 14px;
    color: var(--ink);
    word-break: break-word;
  }
  .setup-steps {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .setup-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
  }
  .setup-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    font-family: 'Fraunces', serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
  }
  .setup-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
  }
  .setup-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .setup-text code {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--ink);
    word-break: break-all;
  }
  input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-elevated);
    color: var(--ink);
    font-family: inherit;
    font-size: 17px;
    -webkit-appearance: none;
  }
  input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-soft);
    background: var(--surface);
  }
  input[type="password"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
  }

  /* ───── Toast ───── */
  .toast {
    position: fixed;
    bottom: calc(100px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: var(--bg);
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 280ms ease;
    box-shadow: 0 8px 28px rgba(42, 38, 34, 0.25);
  }
  .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* ───── Animationen ───── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .fade-in {
    animation: fadeUp 320ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ───── Tag-Input (eigene Gefühle) ───── */
  .tag-input-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elevated);
    min-height: 48px;
    cursor: text;
    transition: border-color 200ms, background 200ms;
  }
  .tag-input-wrap:focus-within {
    border-color: var(--accent-soft);
    background: var(--surface);
  }
  .tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 999px;
    padding: 4px 8px 4px 12px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
  }
  .tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--bg);
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 150ms;
  }
  .tag-remove:hover { background: rgba(255, 255, 255, 0.38); }
  .tag-input-field {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    min-width: 140px;
    flex: 1;
    padding: 0;
    min-height: 28px;
  }
  .tag-input-field::placeholder { color: var(--ink-muted); font-style: italic; }

  /* ───── Eigene-Gefühle-Verwaltung (Sheet) ───── */
  .cf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .cf-name {
    flex: 1;
    font-size: 15px;
    cursor: pointer;
    color: var(--ink);
    border-bottom: 1px dashed transparent;
    transition: border-color 150ms;
  }
  .cf-name:hover { border-bottom-color: var(--accent-soft); }
  .cf-delete {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 150ms;
  }
  .cf-delete:hover { background: var(--line-soft); color: var(--danger); }

  /* ───── Hilfsklassen ───── */
  .hidden { display: none !important; }
  .stack { display: flex; flex-direction: column; gap: 12px; }
  .field-group { margin-bottom: 16px; }
  .field-label {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 6px;
    font-weight: 500;
    display: block;
  }
  .field-label + .field-label,
  .field-label.mt { margin-top: 14px; }
  .text-muted-sm { font-size: 13px; color: var(--ink-muted); font-family: 'Inter Tight', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 400; }

  /* ───── Fokus-Indikator (WCAG 2.4.7) ───── */
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  button:focus { outline: none; }
  button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  textarea:focus, input:focus { outline: none; }
  textarea:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
  }
  .rich-editor:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent-soft);
  }

  /* ───── Onboarding Overlay ───── */
  .onboarding-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .onboarding-slides {
    max-width: 360px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .onboarding-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
  }

  .onboarding-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
  }

  .onboarding-text {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0;
  }

  .onboarding-dots {
    display: flex;
    gap: 8px;
    margin: 8px 0;
  }

  .onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-soft);
    transition: background 0.2s;
  }

  .onboarding-dot.active {
    background: var(--accent);
  }

  .onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
  }

  .onboarding-btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
  }

  .onboarding-btn-primary:hover {
    background: var(--accent-dark, var(--accent));
    opacity: 0.9;
  }

  .onboarding-btn-skip {
    background: none;
    border: none;
    color: var(--ink-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
  }

  .onboarding-btn-skip:hover { color: var(--ink-soft); }

