/* ══════════════════════════════════════════════════
   Voice Todos — Styles
   ══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f4f0; --surface: #fff; --border: #e0ddd8; --text: #1a1a1a; --muted: #888;
  --primary: #5b4cdb; --primary-h: #4a3cca; --danger: #e53935;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-border: #fcd34d;
  --cal: #1a7f4b; --cal-bg: #f0fdf4; --ok: #166534; --ok-bg: #dcfce7;
  --shop: #e67e22; --shop-bg: #fef5ec; --shop-border: #f5cba7;
  --content: #2ecc71; --content-bg: #eafaf1; --content-border: #a9dfbf;
  --journal: #3498db; --journal-bg: #ebf5fb; --journal-border: #aed6f1;
  --r: 12px; --shadow: 0 2px 12px rgba(0,0,0,.08);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
.app { max-width: 600px; margin: 0 auto; padding: 16px; }

/* ── Header ─────────────────────────────────────── */
header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 20px; }
header h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.5px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.backup-indicator { font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; cursor: pointer; border: none; transition: background .15s; }
.backup-indicator.ok  { background: var(--ok-bg); color: var(--ok); }
.backup-indicator.warn{ background: var(--warn-bg); color: var(--warn); }
.backup-indicator.off { background: var(--border); color: var(--muted); }
.settings-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background .15s; }
.settings-btn:hover { background: var(--border); }
.install-btn { display: none; background: var(--primary); color: #fff; border: none; border-radius: 20px; padding: 5px 13px; font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .15s; white-space: nowrap; }
.install-btn:hover { background: var(--primary-h); }
.offline-badge { display: none; font-size: .75rem; font-weight: 700; background: var(--warn-bg); color: var(--warn); border-radius: 20px; padding: 3px 9px; }
.server-status { font-size: 1rem; cursor: default; }

/* ── Settings ───────────────────────────────────── */
.settings-panel { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.settings-panel.open { display: block; }
.settings-section { margin-bottom: 18px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; display: block; }
.settings-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.api-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; outline: none; transition: border-color .15s; }
.api-input:focus { border-color: var(--primary); }
.settings-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.backup-status-text { font-size: .85rem; color: var(--muted); }
.backup-status-text.ok   { color: var(--ok); }
.backup-status-text.warn { color: var(--warn); }

/* ── Error / Info ───────────────────────────────── */
.error { display: none; background: #fdecea; border: 1px solid #f5c6c3; color: var(--danger); padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; align-items: center; justify-content: space-between; font-size: .9rem; }
.error.show { display: flex; }
.error-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--danger); padding: 0 4px; }
.info { display: none; background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; align-items: center; justify-content: space-between; font-size: .9rem; }
.info.show { display: flex; }
.info-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #1d4ed8; padding: 0 4px; }

/* ── Buttons ────────────────────────────────────── */
.btn { padding: 11px 20px; border-radius: 10px; border: none; font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-h); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: #d4d1cc; }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn-record { background: var(--primary); color: #fff; font-size: 1.05rem; padding: 14px 28px; }
.btn-record:hover:not(:disabled) { background: var(--primary-h); }
.btn-stop { background: var(--danger); color: #fff; font-size: 1.05rem; padding: 14px 28px; display: inline-flex; align-items: center; gap: 10px; }
.btn-groq { background: #059669; color: #fff; font-size: 1.05rem; padding: 14px 28px; }
.btn-groq:hover:not(:disabled) { background: #047857; }
.btn-cal { background: var(--cal-bg); color: var(--cal); border: 1px solid #86efac; font-size: .82rem; padding: 5px 10px; border-radius: 7px; font-weight: 600; cursor: pointer; transition: background .15s; white-space: nowrap; }
.btn-cal:hover { background: #dcfce7; }
.icon-btn { background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 1rem; transition: background .15s; }
.icon-btn:hover { background: var(--border); }
.find-dupes-btn { font-size: .8rem; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--warn-border); background: var(--warn-bg); color: var(--warn); font-weight: 600; cursor: pointer; transition: background .15s; white-space: nowrap; }
.find-dupes-btn:hover { background: #fef3c7; }
.find-dupes-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Recording ──────────────────────────────────── */
.dot { width: 10px; height: 10px; background: #fff; border-radius: 50%; animation: pulse 1s infinite; display: inline-block; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }

/* ── Mode Toggle ────────────────────────────────── */
.mode-toggle { display: flex; gap: 0; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.mode-btn { flex: 1; padding: 10px; border: none; background: none; font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.mode-btn.active { background: var(--primary); color: #fff; }

/* ── Voice Section ──────────────────────────────── */
.voice-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); text-align: center; }
.btn-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.loading { display: none; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0; color: var(--muted); }
.loading.show { display: flex; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
.mobile-pulse { display: none; align-items: center; justify-content: center; gap: 10px; padding: 10px 0; }
.mobile-pulse.show { display: flex; }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: pulse-dot 1s ease-in-out infinite; }
.pulse-dot:nth-child(2) { animation-delay: .15s; }
.pulse-dot:nth-child(3) { animation-delay: .3s; }
@keyframes pulse-dot { 0%,100%{transform:scale(.6);opacity:.4} 50%{transform:scale(1.2);opacity:1} }
.pulse-label { font-size: .82rem; color: var(--danger); font-weight: 600; }
.transcript-box { display: none; margin-top: 20px; text-align: left; background: var(--bg); border-radius: 10px; padding: 16px; }
.transcript-box.show { display: block; }
.transcript-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.transcript-text { font-size: .95rem; line-height: 1.6; margin-bottom: 14px; }
.interim { color: var(--muted); font-style: italic; }
.transcript-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Text Section ───────────────────────────────── */
.text-section { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.text-section.show { display: block; }
.text-hint { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.text-area { width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: .95rem; line-height: 1.6; font-family: inherit; resize: vertical; outline: none; transition: border-color .15s; }
.text-area:focus { border-color: var(--primary); }
.text-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── Review ─────────────────────────────────────── */
.review-panel { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.review-panel.show { display: block; }
.review-panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.review-hint { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.review-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.review-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--bg); border-radius: 10px; border: 1px solid transparent; transition: border-color .15s; }
.review-item:hover { border-color: var(--border); }
.review-item.unchecked { opacity: .45; }
.review-item.has-dupe { border-color: var(--warn-border); background: var(--warn-bg); }
.review-cb { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.review-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.review-text { font-size: .95rem; line-height: 1.4; }
.review-edit-input { border: 1px solid var(--primary); border-radius: 6px; padding: 4px 8px; font-size: .95rem; outline: none; width: 100%; }
.dupe-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 8px; padding: 8px 10px; font-size: .82rem; color: var(--warn); display: flex; flex-direction: column; gap: 6px; }
.dupe-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-dupe { font-size: .8rem; padding: 4px 10px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; transition: background .12s; }
.btn-dupe-merge { background: var(--warn); color: #fff; }
.btn-dupe-merge:hover { background: #92400e; }
.btn-dupe-keep { background: var(--border); color: var(--text); }
.btn-dupe-keep:hover { background: #d4d1cc; }
.date-time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-badge, .time-badge { display: inline-flex; align-items: center; gap: 4px; background: #ede9ff; color: var(--primary); border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 600; }
.date-badge input[type="date"], .time-badge input[type="time"] { border: none; background: transparent; color: var(--primary); font-size: .8rem; font-weight: 600; outline: none; cursor: pointer; padding: 0; }
.cal-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--cal); cursor: pointer; user-select: none; }
.cal-toggle input { accent-color: var(--cal); cursor: pointer; }
.review-actions { display: flex; gap: 2px; flex-shrink: 0; }
.review-footer { display: flex; gap: 10px; justify-content: flex-end; }

/* Review: Mobile-Layout */
@media (max-width: 480px) {
  .review-item { flex-wrap: wrap; }
  .review-body { min-width: calc(100% - 36px); }
  .review-actions { width: 100%; justify-content: flex-end; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border); }
  .review-category-select { flex: 1; }
  .date-time-row { flex-direction: column; align-items: flex-start; }
}

/* ── Review: Category Badge ─────────────────────── */
.review-category-badge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.review-category-badge.cat-todo     { background: #ede9ff; color: var(--primary); }
.review-category-badge.cat-shopping { background: var(--shop-bg); color: var(--shop); }
.review-category-badge.cat-content  { background: var(--content-bg); color: var(--content); }
.review-category-badge.cat-journal  { background: var(--journal-bg); color: var(--journal); }
.review-category-select { font-size: .75rem; padding: 2px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }

/* ── Dupe Panel ─────────────────────────────────── */
.dupe-panel { display: none; background: var(--surface); border: 1px solid var(--warn-border); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.dupe-panel.show { display: block; }
.dupe-panel h3 { font-size: 1rem; font-weight: 700; color: var(--warn); margin-bottom: 4px; }
.dupe-panel-hint { font-size: .83rem; color: var(--muted); margin-bottom: 14px; }
.dupe-pair { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.dupe-pair-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: .9rem; }

/* ── Todo List ──────────────────────────────────── */
.list-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.list-header-title { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.todo-group { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.todo-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 10px; background: var(--bg); transition: background .15s; }
.todo-item:hover { background: #eceae5; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-cb { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.todo-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.todo-text { font-size: .95rem; line-height: 1.4; }
.todo-link-btn { font-size: .85rem; text-decoration: none; margin-left: 4px; opacity: .6; transition: opacity .15s; }
.todo-link-btn:hover { opacity: 1; }
.todo-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-date { font-size: .78rem; color: var(--primary); font-weight: 500; }
.brk-btn { opacity: 0; font-size: 1rem; color: var(--muted); transition: opacity .15s; flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 0 2px; margin-right: 2px; }
.todo-item:hover .brk-btn { opacity: 1; }
.del-btn { opacity: 0; font-size: 1.3rem; color: var(--muted); transition: opacity .15s; flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 0 2px; }
.todo-item:hover .del-btn { opacity: 1; }
.done-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.list-empty { text-align: center; padding: 24px; color: var(--muted); font-size: .95rem; }
.unsupported { color: var(--muted); font-size: .9rem; padding: 12px; }

/* ── Breakdown Modal ────────────────────────────── */
.bd-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: flex-end; justify-content: center; }
.bd-overlay.show { display: flex; }
@media (min-width: 520px) { .bd-overlay { align-items: center; padding: 20px; } }
.bd-modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 88vh; border-radius: var(--r) var(--r) 0 0; overflow-y: auto; box-shadow: 0 -8px 40px rgba(0,0,0,.22); }
@media (min-width: 520px) { .bd-modal { border-radius: var(--r); } }
.bd-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.bd-title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; flex: 1; }
.bd-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.bd-icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 5px 7px; font-size: .95rem; border-radius: 6px; transition: background .15s; line-height: 1; }
.bd-icon-btn:hover { background: var(--bg); color: var(--text); }
.bd-cached-badge { font-size: .7rem; font-weight: 700; background: #d1fae5; color: #065f46; border-radius: 20px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.bd-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); padding: 0 4px; flex-shrink: 0; line-height: 1; }
.bd-close:hover { color: var(--text); }
.bd-body { padding: 14px 20px 28px; }
.bd-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 0; color: var(--muted); font-size: .95rem; }
.bd-total { background: #ede9ff; color: var(--primary); border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: .95rem; margin-bottom: 16px; display: inline-block; }
.bd-section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 16px 0 8px; }
.bd-steps { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.bd-step { display: flex; align-items: flex-start; gap: 10px; background: var(--bg); border-radius: 9px; padding: 10px 12px; }
.bd-step-num { font-weight: 700; color: var(--primary); min-width: 22px; font-size: .9rem; flex-shrink: 0; }
.bd-step-body { flex: 1; }
.bd-step-text { font-size: .93rem; line-height: 1.4; }
.bd-step-dur { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.bd-materials { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-material { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn); border-radius: 6px; padding: 4px 10px; font-size: .82rem; font-weight: 500; }
.bd-tipp { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 9px; padding: 10px 14px; font-size: .88rem; color: #1d4ed8; line-height: 1.5; margin-top: 16px; }

/* ── Category Buttons ───────────────────────────── */
.category-buttons { display: flex; gap: 8px; margin: 12px 0; }
.category-btn { flex: 1; padding: 12px 8px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--shadow); }
.category-btn:hover { border-color: var(--muted); }
.category-btn.active { border-width: 2px; }
.cat-btn-shopping.active { border-color: var(--shop); background: var(--shop-bg); }
.cat-btn-content.active  { border-color: var(--content); background: var(--content-bg); }
.cat-btn-journal.active  { border-color: var(--journal); background: var(--journal-bg); }
.category-badge { font-size: .7rem; padding: 1px 7px; border-radius: 10px; font-weight: 700; color: #fff; }
.cat-btn-shopping .category-badge { background: var(--shop); }
.cat-btn-content  .category-badge { background: var(--content); }
.cat-btn-journal  .category-badge { background: var(--journal); }

/* ── Category Panels ────────────────────────────── */
.category-panel { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); margin-bottom: 12px; }
.category-panel.show { display: block; }
.category-panel-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.store-label { font-size: .8rem; font-weight: 600; color: var(--shop); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .05em; }

/* Content Items */
.content-item { background: var(--bg); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.content-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.content-platform-badge { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--content-bg); color: var(--content); }
.content-text { font-size: .95rem; line-height: 1.5; }

/* Journal Items */
.journal-item { background: var(--bg); border-radius: 10px; padding: 12px; margin-bottom: 8px; position: relative; }
.journal-date { font-size: .75rem; color: var(--muted); font-weight: 600; }
.journal-text { font-size: .95rem; line-height: 1.5; margin-top: 4px; }

/* Always-visible delete */
.del-btn.always-visible { opacity: .5; }
.del-btn.always-visible:hover { opacity: 1; }

/* Content Item Actions */
.content-item-actions { display: flex; align-items: center; gap: 6px; }
.btn-write { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--content-border); background: var(--content-bg); color: var(--content); cursor: pointer; transition: background .15s; white-space: nowrap; }
.btn-write:hover { background: #d5f5e3; }
.btn-archive { font-size: .78rem; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: background .15s; }
.btn-archive:hover { background: var(--border); }
.content-cached { font-size: .75rem; color: var(--content); font-weight: 500; margin-top: 4px; }

/* ── Artikel-Modal ──────────────────────────────── */
.art-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: flex-end; justify-content: center; }
.art-overlay.show { display: flex; }
@media (min-width: 520px) { .art-overlay { align-items: center; padding: 20px; } }
.art-modal { background: var(--surface); width: 100%; max-width: 640px; max-height: 90vh; border-radius: var(--r) var(--r) 0 0; overflow-y: auto; box-shadow: 0 -8px 40px rgba(0,0,0,.22); }
@media (min-width: 520px) { .art-modal { border-radius: var(--r); } }
.art-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.art-title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; flex: 1; }
.art-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.art-icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 5px 7px; font-size: .95rem; border-radius: 6px; transition: background .15s; line-height: 1; }
.art-icon-btn:hover { background: var(--bg); color: var(--text); }
.art-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); padding: 0 4px; flex-shrink: 0; line-height: 1; }
.art-close:hover { color: var(--text); }
.art-body { padding: 14px 20px 28px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.7; }
.art-h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 16px; line-height: 1.3; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.art-h3 { font-size: 1.1rem; font-weight: 700; margin: 22px 0 8px; line-height: 1.3; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.art-h4 { font-size: .95rem; font-weight: 700; margin: 18px 0 6px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.art-p { font-size: .95rem; margin: 0 0 6px; }
.art-li { font-size: .95rem; margin: 0 0 4px; padding-left: 16px; }

/* Artikel: Plattform-Auswahl */
.art-platform-grid { display: flex; flex-direction: column; gap: 8px; }
.art-platform-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; transition: all .15s; }
.art-platform-btn:hover { border-color: var(--muted); }
.art-platform-btn.selected { border-color: var(--primary); background: #f0eeff; }
.art-plat-icon { font-size: 1.5rem; flex-shrink: 0; }
.art-plat-name { font-size: .95rem; font-weight: 700; display: block; }
.art-plat-desc { font-size: .8rem; color: var(--muted); display: block; }
.art-initial-notes { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; font-family: inherit; line-height: 1.5; resize: vertical; outline: none; }
.art-initial-notes:focus { border-color: var(--primary); }

/* Artikel: Feedback-Bereich */
.art-feedback-area { padding: 12px 20px 20px; border-top: 1px solid var(--border); }
.art-feedback-row { display: flex; gap: 8px; align-items: flex-end; }
.art-feedback-input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; font-family: inherit; line-height: 1.4; resize: none; outline: none; }
.art-feedback-input:focus { border-color: var(--primary); }
.art-feedback-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.art-feedback-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: .85rem; color: #1d4ed8; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Feedback: Mobile-Layout */
@media (max-width: 480px) {
  .art-feedback-row { flex-direction: column; gap: 10px; }
  .art-feedback-input { width: 100%; }
  .art-feedback-row .btn { width: 100%; }
}

/* ── Archiv ────────────────────────────────────── */
.archive-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s; white-space: nowrap; }
.archive-btn:hover { background: var(--surface); color: var(--text); border-color: var(--muted); }

.arch-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.5); display: none; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.arch-overlay.show { display: flex; }
.arch-modal { background: var(--surface); border-radius: var(--r); width: 100%; max-width: 640px; box-shadow: 0 8px 32px rgba(0,0,0,.18); margin: auto 0; }
.arch-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.arch-title { font-size: 1.15rem; font-weight: 700; }
.arch-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); padding: 0 4px; line-height: 1; }
.arch-body { padding: 16px 20px 20px; max-height: 70vh; overflow-y: auto; }
.arch-section { margin-bottom: 20px; }
.arch-section:last-child { margin-bottom: 0; }
.arch-section-title { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.arch-section-count { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--border); border-radius: 10px; padding: 1px 7px; }
.arch-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.arch-item:last-child { border-bottom: none; }
.arch-item-body { flex: 1; min-width: 0; }
.arch-item-text { font-size: .9rem; line-height: 1.45; word-break: break-word; }
.arch-item-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.arch-item-date { font-size: .75rem; color: var(--muted); }
.arch-item-badge { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.arch-item-badge.art { background: var(--content-bg); color: var(--content); }
.arch-item-badge.plat { background: #f0eeff; color: var(--primary); }
.arch-item-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.arch-icon-btn { background: none; border: none; font-size: .95rem; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: background .15s; }
.arch-icon-btn:hover { background: var(--border); }
.arch-empty { color: var(--muted); font-size: .88rem; text-align: center; padding: 24px 0; }

/* Archive-Button im Done-Bereich */
.done-header { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.done-header .done-label { margin: 0; }
.archive-done-btn { background: none; border: none; font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all .15s; }
.archive-done-btn:hover { background: var(--border); color: var(--text); }

/* Archiv-Badges auf Content-Items */
.content-archived-badge { font-size: .72rem; font-weight: 600; color: var(--ok); background: var(--ok-bg); border-radius: 6px; padding: 2px 7px; }

/* ── Edit-Modal ──────────────────────────────────── */
.edit-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 16px; }
.edit-overlay.show { display: flex; }
.edit-modal { background: var(--surface); border-radius: var(--r); max-width: 520px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.edit-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.edit-title { font-weight: 700; font-size: 1.05rem; }
.edit-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); line-height: 1; padding: 0 4px; }
.edit-close:hover { color: var(--text); }
.edit-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.edit-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; line-height: 1.45; outline: none; resize: none; min-height: 90px; background: var(--surface); color: var(--text); }
.edit-textarea:focus { border-color: var(--primary); }
.edit-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* Mobile: Fullscreen-Modal */
@media (max-width: 600px) {
  .edit-overlay { padding: 0; }
  .edit-overlay.show { align-items: stretch; justify-content: stretch; }
  .edit-modal { max-width: none; width: 100%; max-height: none; height: 100vh; border-radius: 0; }
  .edit-textarea { min-height: 140px; }
}

.edit-btn { background: none; border: none; font-size: .95rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--muted); }
.edit-btn:hover { background: var(--border); color: var(--text); }

/* ── Edit-Modal (geteilt für alle Kategorien) ───── */
.edit-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 16px; -webkit-overflow-scrolling: touch; }
.edit-overlay.show { display: flex; }
.edit-modal { background: var(--surface); border-radius: var(--r); max-width: 520px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.edit-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.edit-title { font-weight: 700; font-size: 1.05rem; }
.edit-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); line-height: 1; padding: 0 4px; }
.edit-close:hover { color: var(--text); }
.edit-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.edit-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 6px; }
.edit-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; line-height: 1.45; outline: none; resize: none; min-height: 90px; background: var(--surface); color: var(--text); transition: border-color .15s; }
.edit-textarea:focus { border-color: var(--primary); }
.edit-section { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.edit-section summary { font-size: .92rem; font-weight: 600; cursor: pointer; padding: 4px 0; list-style: none; user-select: none; }
.edit-section summary::-webkit-details-marker { display: none; }
.edit-section summary::before { content: '▸ '; display: inline-block; transition: transform .15s; color: var(--muted); }
.edit-section[open] summary::before { transform: rotate(90deg); }
.edit-section[open] summary { margin-bottom: 10px; }
.edit-ai-prompt { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: .92rem; font-family: inherit; line-height: 1.4; outline: none; resize: vertical; min-height: 52px; margin-bottom: 8px; background: var(--surface); color: var(--text); }
.edit-ai-prompt:focus { border-color: var(--primary); }
.edit-ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.edit-ai-loading { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.spinner-sm { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.edit-hint { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.edit-copy-row { display: flex; flex-wrap: wrap; gap: 6px; }
.edit-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* Mobile: Fullscreen-Modal damit die Tastatur nicht mit dem Dialog kämpft */
@media (max-width: 600px) {
  .edit-overlay { padding: 0; }
  .edit-overlay.show { align-items: stretch; justify-content: stretch; }
  .edit-modal { max-width: none; width: 100%; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; }
  .edit-textarea { min-height: 120px; font-size: 1rem; }
}

/* Edit-Button in Listen */
.edit-btn { background: none; border: none; font-size: 1rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; transition: background .15s; color: var(--muted); flex-shrink: 0; opacity: .7; }
.edit-btn:hover { background: var(--border); color: var(--text); opacity: 1; }

/* Edit-Modal: Refine-Button */
.btn-refine { margin-top: 10px; background: #f3f0ff; color: var(--primary); border: 1px solid #d9d2ff; font-size: .9rem; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background .15s; }
.btn-refine:hover:not(:disabled) { background: #e8e1ff; }
.btn-refine:disabled { opacity: .6; cursor: wait; }
.edit-refine-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; min-height: 1em; }

/* Edit-Modal: Kopieren nach Kategorie */
.edit-copy-row { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.edit-copy-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 8px; }
.edit-copy-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-copy-target { background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: .88rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; transition: all .15s; }
.btn-copy-target:hover { background: var(--surface); border-color: var(--muted); }

/* ── Login-Overlay ─────────────────────────────── */
.login-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 16px; }
.login-overlay.show { display: flex; }
.login-modal { background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 28px 24px; width: 100%; max-width: 380px; }
.login-title { margin: 0 0 4px; font-size: 1.3rem; color: var(--text); text-align: center; }
.login-sub { margin: 0 0 18px; font-size: .9rem; color: var(--muted); text-align: center; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-input { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 1rem; background: var(--bg); color: var(--text); }
.login-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 77, 255, .15); }
.login-message { font-size: .85rem; color: #c62828; text-align: center; min-height: 1em; margin: 4px 0 0; }
.login-forgot { margin: 8px 0 0; text-align: center; font-size: .85rem; }
.login-forgot a { color: var(--muted); text-decoration: underline; }
.login-forgot a:hover { color: var(--primary); }

/* ── Admin-Panel (Phase C Block 2) ─────────────── */
.admin-btn { background: none; border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; font-size: .95rem; cursor: pointer; transition: background .15s; }
.admin-btn:hover { background: var(--border); }

.admin-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9998; display: none; align-items: center; justify-content: center; padding: 16px; }
.admin-overlay.show { display: flex; }
.admin-modal { background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.admin-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.admin-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.admin-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--border); }
.admin-tab { background: none; border: none; padding: 8px 14px; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-body { padding: 16px 20px; overflow-y: auto; }
.admin-hint { color: var(--muted); font-size: .88rem; }
.admin-hint-inline { color: var(--muted); font-size: .8rem; }
.admin-err { color: #c62828; font-size: .88rem; }
.admin-label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.admin-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .92rem; background: var(--bg); color: var(--text); }

.admin-user-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-user-row:last-child { border-bottom: none; }
.admin-user-main { flex: 1; min-width: 0; }
.admin-user-email { font-weight: 600; color: var(--text); word-break: break-all; }
.admin-user-meta { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.admin-user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-badge { display: inline-block; background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }

.btn-danger { background: #c62828; color: #fff; border: none; }
.btn-danger:hover { background: #a91b1b; }

.admin-invite-create { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.admin-invite-form { display: flex; gap: 8px; margin-top: 4px; }
.admin-invite-form .admin-input { flex: 1; }
.admin-invite-result { margin-top: 10px; font-size: .85rem; }
.admin-invite-mail-toggle { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--muted); cursor: pointer; }
.admin-invite-mail-toggle input { cursor: pointer; }
.admin-invite-created { display: flex; flex-direction: column; gap: 6px; }
.admin-invite-link { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-family: monospace; font-size: .78rem; background: #fff; }
.admin-invite-list-header { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 6px 0; }
.admin-invite-row { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--bg); }
.admin-invite-open { border-color: #86efac; }
.admin-invite-redeemed { opacity: .6; }
.admin-invite-expired { opacity: .5; }

/* ── BYO-Key + Usage (Phase C Block 3) ──────────── */
.api-key-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.api-key-badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 10px; }
.api-key-badge-ok   { background: #dcfce7; color: #15803d; }
.api-key-badge-none { background: #fef3c7; color: #92400e; }
.api-key-masked { font-family: monospace; font-size: .82rem; color: var(--muted); }
.api-key-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: .88rem; font-family: monospace; background: var(--bg); color: var(--text); }
.api-key-input:focus { outline: none; border-color: var(--primary); }
.api-key-hint { font-size: .78rem; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.api-key-hint a { color: var(--primary); text-decoration: none; }
.api-key-hint a:hover { text-decoration: underline; }

.usage-box { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: .82rem; }
.usage-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.usage-line span { color: var(--muted); }
.usage-line strong { color: var(--text); font-weight: 600; }
.usage-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.usage-bar-fill { height: 100%; transition: width .3s; }

.admin-budget-label { font-size: .8rem; color: var(--muted); }
.admin-budget-input { width: 70px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; background: var(--bg); }

/* ── Startguthaben + Rate-Limit (Phase C Block 4) ─ */
.usage-warn { font-size: .8rem; color: #c62828; margin: 8px 0 0; padding: 6px 8px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; }
.invite-credit-hint { font-size: .82rem; color: var(--muted); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 10px; margin: 4px 0 14px; line-height: 1.4; }
.admin-credit-actions { display: flex; flex-direction: column; gap: 4px; }
.admin-credit-row { display: flex; gap: 4px; align-items: center; }

/* ── Hub + Views (Phase B.0) ─────────────────────── */
.view-hub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.hub-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1 / 1;
  padding: 16px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font-family: inherit;
  color: var(--text);
}
.hub-tile:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(91,76,219,.12); transform: translateY(-1px); }
.hub-tile:active { transform: translateY(0); }
.hub-tile-icon  { font-size: 2rem; line-height: 1; }
.hub-tile-label { font-size: .95rem; font-weight: 600; text-align: center; }
.hub-tile-count {
  position: absolute; top: 10px; right: 10px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 700;
  border-radius: 11px;
}
.hub-tile-news { grid-column: 1 / -1; aspect-ratio: auto; padding: 18px; flex-direction: row; gap: 14px; justify-content: flex-start; }
.hub-tile-news .hub-tile-icon { font-size: 1.6rem; }

.view { margin-top: 8px; }
.view-header {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 12px;
}
.view-back {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 12px; font-size: .88rem; cursor: pointer; color: var(--text); font-family: inherit;
}
.view-back:hover { border-color: var(--primary); color: var(--primary); }
.view-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.view-body { margin-top: 4px; }

/* ── News (Phase B.1) ────────────────────────────── */
.news-day-label { margin: 18px 0 8px; font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.news-group { display: flex; flex-direction: column; gap: 10px; }
.news-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.news-item.news-prio-high { border-left: 3px solid var(--primary); }
.news-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.news-cat { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eef2ff; color: #4338ca; text-transform: uppercase; letter-spacing: .04em; }
.news-rated-badge { font-size: .9rem; }
.news-dupe-badge { font-size: .7rem; padding: 2px 7px; border-radius: 10px; background: #f3f4f6; color: #6b7280; font-weight: 500; white-space: nowrap; }
.news-title { font-size: .98rem; font-weight: 600; color: var(--text); line-height: 1.3; flex: 1 1 auto; }
.news-summary { margin: 4px 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.news-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.news-btn { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 1rem; line-height: 1; cursor: pointer; color: var(--text); font-family: inherit; transition: transform .1s ease, border-color .1s ease; }
.news-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.news-btn-active-up   { background: #dcfce7; border-color: #86efac; }
.news-btn-active-down { background: #fee2e2; border-color: #fca5a5; }
.news-zone-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.news-zone-title { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.news-zone-count { font-size: .75rem; font-weight: 700; background: var(--primary); color: #fff; border-radius: 10px; padding: 1px 8px; }
.news-zone { margin-bottom: 8px; }
.news-all-done { font-size: .9rem; color: var(--muted); text-align: center; padding: 20px 0 12px; }
.news-archive-bar { margin: 20px 0 4px; }
.news-archive-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.news-archive-toggle:hover { border-color: var(--primary); color: var(--text); }
.news-archive-arrow { font-size: 1.1rem; font-weight: 400; transition: transform .15s ease; }

/* ── Second Brain Suche ──────────────────────────── */
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-box input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 1rem; padding: 12px 16px; outline: none; font-family: inherit; }
.search-box input:focus { border-color: var(--primary); }
.search-box input::placeholder { color: var(--muted); }
.search-box button { background: var(--primary); color: #fff; border: none; border-radius: 12px; padding: 12px 20px; font-size: .95rem; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.search-box button:hover { opacity: .88; }
.search-box button:disabled { opacity: .4; cursor: default; }
#searchStatus { font-size: .85rem; color: var(--muted); min-height: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.search-spinner { width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .55s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
#searchResults { display: flex; flex-direction: column; gap: 10px; }
.search-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.search-card:hover { border-color: var(--primary); }
.search-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.search-badge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em; }
.search-badge-art { background: #eef2ff; color: #4338ca; }
.search-badge-hl  { background: #fef3c7; color: #92400e; }
.search-score { font-size: .75rem; color: var(--muted); margin-left: auto; }
.search-card-title { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.search-card-title a { color: var(--text); text-decoration: none; }
.search-card-title a:hover { color: var(--primary); }
.search-hl-text { font-size: .9rem; color: #1663b1; border-left: 3px solid var(--primary); padding-left: 10px; font-style: italic; margin-bottom: 4px; line-height: 1.5; }
.search-card-summary { font-size: .85rem; color: var(--muted); line-height: 1.5; margin-bottom: 4px; }
.search-card-url { font-size: .75rem; color: var(--muted); }
.search-card-url a { color: inherit; text-decoration: none; }
.search-card-url a:hover { color: var(--primary); }
.search-intent-pill { display: inline-block; font-size: .72rem; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 2px 8px; margin-top: 6px; }
.search-empty { text-align: center; color: var(--muted); font-size: .9rem; padding: 32px 0; }
.hub-tile-search { grid-column: 1 / -1; aspect-ratio: auto; padding: 18px; flex-direction: row; gap: 14px; justify-content: flex-start; background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.hub-tile-search .hub-tile-icon { font-size: 1.6rem; }
.news-archive-zone { margin-top: 8px; }
.news-btn-brain { color: #6d28d9; }
