/* ══════════════════════════════════════════════════
   Luminwell — Journal
   Design system: teal #2D9676 + blue #175d92
   Research: Hick's Law · low cognitive load · non-judgmental
   Pure CSS · no JavaScript
══════════════════════════════════════════════════ */

:root {
  /* Brand teal (Luminwell specification #2D9676) */
  --teal:        #2d9676;
  --teal-deep:   #1d6e55;
  --teal-pale:   #eaf5f1;
  --teal-mid:    #c2e8db;
  /* No purple — accent is teal + sidebar blue */
  --lavender:    #2d9676;   /* remapped → teal */
  --lavender-mid: #eaf5f1;  /* remapped → teal-pale */
  --lavender-pale:#eaf5f1;  /* remapped → teal-pale */
  /* Neutrals */
  --text:        #0c1929;
  --muted:       #64748b;
  --soft:        #94a3b8;
  --border:      rgba(12,25,41,.08);
  --border-soft: rgba(12,25,41,.05);
  --surface:     #ffffff;
  /* Sidebar (dark navy) */
  --sb-bg:       #175d92;
  --sb-deep:     #134a75;
  --sb-hover:    rgba(255,255,255,.10);
  --sb-active:   rgba(255,255,255,.18);
  --sb-line:     rgba(255,255,255,.12);
  --sb-text:     #f4f8fc;
  --sb-muted:    rgba(244,248,252,.55);
  --sb-width:    264px;
  --page-bg:     #f8f9fb;
  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(12,25,41,.06);
  --shadow:      0 2px 10px rgba(12,25,41,.07), 0 12px 32px rgba(12,25,41,.06);
  --shadow-card: 0 1px 3px rgba(12,25,41,.08), 0 6px 20px rgba(12,25,41,.06);
  /* Moods — gentle, non-clinical */
  --mood-pos:    #059669;  /* Positive = growth green */
  --mood-neu:    #475569;  /* Neutral  = calm slate */
  --mood-cha:    #d97706;  /* Challenging = warm amber, NOT red */
  /* Radius */
  --r:  14px;
  --rf: 9999px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; font-family: var(--font);
  font-size: 14px; color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
button { font-family: var(--font); cursor: pointer; }

/* State inputs (CSS-only interactivity) */
.state-input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }

/* ══════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════ */
.app { display: flex; min-height: 100dvh; }

/* ══════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════ */
.sidebar {
  width: var(--sb-width); flex-shrink: 0;
  background: var(--sb-bg); color: var(--sb-text);
  display: flex; flex-direction: column;
  padding: 16px 14px 14px; overflow: hidden;
}
.sidebar__head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 6px 18px; margin-bottom: 4px;
  border-bottom: 1px solid var(--sb-line);
}
.sidebar__logo-img { width: 30px; height: 30px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.sidebar__logo { font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.sidebar__block { margin-bottom: 18px; }
.sidebar__block--fill { flex: 1; display: flex; flex-direction: column; min-height: 0; margin-bottom: 0; }
.sidebar__label { padding: 0 8px 8px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sb-muted); }
.sidebar__new {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: rgba(255,255,255,.06); color: var(--sb-text);
  font-size: 13px; font-weight: 600; transition: background .15s;
}
.sidebar__new:hover { background: rgba(255,255,255,.14); }
.sidebar__new svg { width: 16px; height: 16px; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--sb-text); font-size: 13px; font-weight: 500;
  transition: background .15s;
}
.sb-nav__link:hover     { background: var(--sb-hover); }
.sb-nav__link.is-active { background: var(--sb-active); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.sb-nav__icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .9; }
.sb-recent { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-bottom: 4px; }
.sb-recent__btn {
  width: 100%; padding: 8px 10px; border: none; border-radius: 8px;
  background: transparent; color: inherit; cursor: pointer; text-align: left;
  font-family: var(--font); transition: background .15s;
}
.sb-recent__btn:hover { background: var(--sb-hover); }
.sb-recent__title { font-size: 12px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-recent__meta  { font-size: 11px; color: var(--sb-muted); margin-top: 2px; }
.sidebar__foot {
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid var(--sb-line);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.sidebar__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar__avatar svg { width: 17px; height: 17px; }
.sidebar__name    { font-size: 13px; font-weight: 700; }
.sidebar__credits { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--sb-muted); margin-top: 1px; }
.sidebar__credits svg { width: 12px; height: 12px; }

/* ══════════════════════════════════════════════════
   MAIN + TOPBAR
══════════════════════════════════════════════════ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; padding: 0 24px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar__left  { display: flex; align-items: center; gap: 10px; }
.topbar__logo-img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.topbar__title { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.topbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar__crisis {
  padding: 5px 12px; border-radius: var(--rf);
  background: rgba(239,68,68,.09); color: #b91c1c;
  font-size: 12px; font-weight: 700; border: none;
  transition: background .14s;
}
.topbar__crisis:hover { background: rgba(239,68,68,.15); }
.topbar__icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .14s, color .14s;
}
.topbar__icon-btn:hover { background: rgba(12,25,41,.05); color: var(--text); }
.topbar__icon-btn svg { width: 17px; height: 17px; }

/* ══════════════════════════════════════════════════
   JOURNAL PAGE LAYOUT
══════════════════════════════════════════════════ */
.jnl-page {
  flex: 1; overflow-y: auto;
  background: var(--page-bg);
  padding: 0;
}

.jnl-inner {
  padding: 28px 28px 48px;
  display: flex; flex-direction: column; gap: 24px;
}

/* ── Page header ─────────────────────────────────── */
.jnl-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.jnl-header__text { display: flex; flex-direction: column; }
.jnl-header__title {
  font-size: 26px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--text); line-height: 1.15;
}
.jnl-header__sub {
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-top: 5px;
}
.jnl-header__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-lock {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: all .14s; text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn-lock:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-pale); }
.btn-lock svg { width: 14px; height: 14px; }
.btn-new-entry {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px;
  background: var(--teal); color: #fff;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  border: none; cursor: pointer; text-decoration: none;
  transition: background .14s, box-shadow .14s;
  box-shadow: 0 2px 8px rgba(45,150,118,.3);
}
.btn-new-entry:hover { background: var(--teal-deep); box-shadow: 0 4px 14px rgba(45,150,118,.38); }
.btn-new-entry svg { width: 14px; height: 14px; }

/* ── Inline new-entry form (CSS-only toggle) ─────── */
.quick-form-wrap { display: none; }
html:has(#show-form:checked) .quick-form-wrap { display: block; animation: form-in .22s ease both; }
@keyframes form-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quick-form {
  background: var(--surface); border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.quick-form__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.quick-form__title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.quick-form__title svg { width: 17px; height: 17px; color: var(--teal); }
.quick-form__close {
  width: 28px; height: 28px; border-radius: 7px; border: none;
  background: var(--page-bg); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .14s;
}
.quick-form__close:hover { background: rgba(244,63,94,.1); color: #b91c1c; }
.quick-form__close svg { width: 14px; height: 14px; }

.quick-form__body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; }

/* Mood row */
.quick-form__label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.quick-mood-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-mood-radio { display: none; }
.quick-mood-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: var(--rf);
  border: 1.5px solid var(--border); background: var(--page-bg);
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .14s; user-select: none;
}
.quick-mood-pill:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-pale); }
#qm-pos:checked ~ .quick-mood-row label[for="qm-pos"] { background: rgba(5,150,105,.1);  border-color: var(--mood-pos); color: var(--mood-pos); }
#qm-neu:checked ~ .quick-mood-row label[for="qm-neu"] { background: rgba(71,85,105,.1);  border-color: var(--mood-neu); color: var(--mood-neu); }
#qm-cha:checked ~ .quick-mood-row label[for="qm-cha"] { background: rgba(217,119,6,.1);  border-color: var(--mood-cha); color: var(--mood-cha); }

/* Textarea */
.quick-textarea {
  width: 100%; min-height: 100px; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--page-bg); font-family: var(--font);
  font-size: 14px; color: var(--text); line-height: 1.65;
  resize: vertical; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.quick-textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(45,150,118,.1); }
.quick-textarea::placeholder { color: var(--soft); }

/* Save button */
.quick-save {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px;
  background: var(--text); color: #fff;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: background .14s;
}
.quick-save:hover { background: #1e293b; }

.quick-form__foot {
  padding: 12px 22px 14px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.quick-form__foot-link {
  font-size: 12px; font-weight: 600; color: var(--teal);
  transition: opacity .14s;
}
.quick-form__foot-link:hover { opacity: .7; }
.quick-form__foot-note { font-size: 11px; color: var(--soft); display: flex; align-items: center; gap: 5px; }
.quick-form__foot-note svg { width: 12px; height: 12px; }

/* Mood-aware page tint removed — clean neutral background always */

/* ── "Journal Reflections" session notes section ──── */
.reflections-section { display: flex; flex-direction: column; }
.section-title {
  font-size: 17px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 4px;
}
.section-sub {
  font-size: 12px; font-weight: 600; color: var(--teal);
  margin-bottom: 14px;
}
.reflections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.reflection-card {
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .18s, transform .18s;
}
.reflection-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.reflection-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.reflection-card__date {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.reflection-card__date svg { width: 14px; height: 14px; color: var(--teal); }
.reflection-card__badge {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: var(--rf);
  border: 1px solid var(--border); color: var(--muted);
  background: var(--page-bg);
}
.reflection-card__text {
  font-size: 13px; line-height: 1.65; color: var(--muted);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════
   STICKY SEARCH + FILTER TOOLBAR
══════════════════════════════════════════════════ */
.jnl-toolbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(248,249,251,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex; flex-direction: column; gap: 10px;
  margin: 0 -28px; /* bleed to page edges */
}

/* Filter popup styles → journal-filter.css */

/* Row 1: search + view toggle */
.jnl-toolbar__top {
  display: flex; align-items: center; gap: 10px;
}

/* Search bar */
.jnl-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0 14px; height: 40px;
  flex: 1;
  transition: border-color .14s, box-shadow .14s;
}
.jnl-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,150,118,.1); }
.jnl-search svg { width: 15px; height: 15px; color: var(--soft); flex-shrink: 0; }
.jnl-search__input {
  border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 14px; color: var(--text); flex: 1; min-width: 0;
}
.jnl-search__input::placeholder { color: var(--soft); }

/* View toggle */
.view-toggle { display: flex; gap: 3px; flex-shrink: 0; }
.view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--soft); cursor: pointer; transition: all .14s; user-select: none;
}
.view-btn svg { width: 15px; height: 15px; }
html:has(#view-grid:checked) label[for="view-grid"],
html:has(#view-list:checked) label[for="view-list"] {
  background: var(--sb-bg); color: #fff; border-color: var(--sb-bg);
}

/* Row 2: filter chips */
.jnl-toolbar__filters {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.filter-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--soft);
  margin-right: 4px; white-space: nowrap;
}
.filter-sep {
  width: 1px; height: 18px; background: var(--border);
  margin: 0 6px; flex-shrink: 0;
}

/* All filter radio/chips */
.mood-radio { display: none; }
.mood-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--rf);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .14s; user-select: none; white-space: nowrap;
}
.mood-pill:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-pale); }
/* Active states */
html:has(#mood-all:checked) label[for="mood-all"] { background: var(--sb-bg); color: #fff; border-color: var(--sb-bg); }
html:has(#mood-pos:checked) label[for="mood-pos"] { background: rgba(5,150,105,.1);  border-color: var(--mood-pos); color: var(--mood-pos); }
html:has(#mood-neu:checked) label[for="mood-neu"] { background: rgba(71,85,105,.08); border-color: var(--mood-neu); color: var(--mood-neu); }
html:has(#mood-cha:checked) label[for="mood-cha"] { background: rgba(217,119,6,.1);  border-color: var(--mood-cha); color: var(--mood-cha); }

/* Tag filter chips */
.tag-radio { display: none; }
.tag-filter-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: var(--rf);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .14s; user-select: none; white-space: nowrap;
}
.tag-filter-pill:hover { border-color: var(--sb-bg); color: var(--sb-bg); background: rgba(23,93,146,.05); }
html:has(#tag-study:checked)   label[for="tag-study"]   { background: rgba(23,93,146,.08); border-color: var(--sb-bg); color: var(--sb-bg); }
html:has(#tag-gratitude:checked) label[for="tag-gratitude"] { background: rgba(23,93,146,.08); border-color: var(--sb-bg); color: var(--sb-bg); }
html:has(#tag-session:checked) label[for="tag-session"] { background: rgba(23,93,146,.08); border-color: var(--sb-bg); color: var(--sb-bg); }
html:has(#tag-sleep:checked)   label[for="tag-sleep"]   { background: rgba(23,93,146,.08); border-color: var(--sb-bg); color: var(--sb-bg); }
html:has(#tag-rest:checked)    label[for="tag-rest"]    { background: rgba(23,93,146,.08); border-color: var(--sb-bg); color: var(--sb-bg); }

/* Entry card filtering */
html:has(#mood-pos:checked) .entry-card:not([data-mood="pos"]) { display: none; }
html:has(#mood-neu:checked) .entry-card:not([data-mood="neu"]) { display: none; }
html:has(#mood-cha:checked) .entry-card:not([data-mood="cha"]) { display: none; }

/* ── My entries header ────────────────────────────── */
.entries-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.entries-header__count {
  font-size: 11px; font-weight: 600; color: var(--soft);
  padding: 4px 10px; border-radius: var(--rf);
  background: var(--surface); border: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════
   ENTRY CARDS
══════════════════════════════════════════════════ */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
html:has(#view-list:checked) .entry-grid { display: flex; flex-direction: column; gap: 10px; }

.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.entry-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* Mood top stripe */
.entry-card::before { content: ''; display: block; height: 3px; }
.entry-card[data-mood="pos"]::before { background: linear-gradient(90deg,#059669,#34d399); }
.entry-card[data-mood="neu"]::before { background: linear-gradient(90deg,#475569,#94a3b8); }
.entry-card[data-mood="cha"]::before { background: linear-gradient(90deg,#d97706,#fbbf24); }

.entry-card__body { padding: 16px 18px 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.entry-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.entry-date {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.entry-date svg { width: 13px; height: 13px; color: var(--teal); }
.entry-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: var(--rf);
  border: 1px solid var(--border); color: var(--muted); background: var(--page-bg);
}
.entry-badge[data-type="session"] { border-color: rgba(45,150,118,.25); color: var(--teal); background: var(--teal-pale); }

.entry-mood-chip {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--rf);
}
.entry-mood-chip[data-mood="pos"] { background: rgba(5,150,105,.1);   color: #065f46; }
.entry-mood-chip[data-mood="neu"] { background: rgba(71,85,105,.1);   color: #334155; }
.entry-mood-chip[data-mood="cha"] { background: rgba(217,119,6,.1);   color: #92400e; }

.entry-title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.3;
}
.entry-preview {
  font-size: 13px; line-height: 1.65; color: var(--muted);
  font-weight: 400;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.entry-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.entry-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--rf);
  background: rgba(12,25,41,.04); border: 1px solid var(--border); color: var(--soft);
}
/* Affirmation (low-load, gentle, per the doc) */
.entry-affirmation {
  font-size: 11px; font-weight: 700; color: var(--teal);
  display: flex; align-items: center; gap: 4px;
  padding-top: 6px; border-top: 1px dashed var(--border);
}

.entry-card__foot {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.entry-meta { font-size: 11px; color: var(--soft); display: flex; align-items: center; gap: 4px; }
.entry-meta svg { width: 11px; height: 11px; }
.btn-read {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 8px;
  background: var(--teal-pale); color: var(--teal);
  font-size: 12px; font-weight: 700; font-family: var(--font);
  border: 1px solid rgba(45,150,118,.2);
  transition: all .14s; text-decoration: none;
}
.btn-read:hover { background: var(--teal); color: #fff; }
.btn-read svg { width: 11px; height: 11px; }

/* ── List view ────────────────────────────────────── */
html:has(#view-list:checked) .entry-card { flex-direction: row; border-radius: 12px; position: relative; }
html:has(#view-list:checked) .entry-card::before { width: 3px; height: auto; position: absolute; left: 0; top: 0; bottom: 0; border-radius: 12px 0 0 12px; }
html:has(#view-list:checked) .entry-card__body { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px 12px 22px; flex-wrap: wrap; }
html:has(#view-list:checked) .entry-date { white-space: nowrap; }
html:has(#view-list:checked) .entry-preview { -webkit-line-clamp: 1; line-clamp: 1; flex: 1; min-width: 120px; }
html:has(#view-list:checked) .entry-tags, html:has(#view-list:checked) .entry-affirmation { display: none; }
html:has(#view-list:checked) .entry-card__foot { border-top: none; border-left: 1px solid var(--border-soft); padding: 0 16px; flex-shrink: 0; }
html:has(#view-list:checked) .entry-meta { display: none; }

/* ── Gentle crisis banner (low-load, non-alarming) ── */
.crisis-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(239,68,68,.05);
  border: 1.5px solid rgba(239,68,68,.15);
}
.crisis-banner__body { flex: 1; min-width: 200px; }
.crisis-banner__title { font-size: 13px; font-weight: 700; color: #b91c1c; }
.crisis-banner__text  { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.crisis-banner__links { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.crisis-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: background .14s;
}
.crisis-link--call { background: #b91c1c; color: #fff; }
.crisis-link--call:hover { background: #991b1b; }
.crisis-link--text { background: rgba(239,68,68,.1); color: #b91c1c; border: 1.5px solid rgba(239,68,68,.2); }
.crisis-link--text:hover { background: rgba(239,68,68,.17); }
.crisis-link svg { width: 12px; height: 12px; }

/* ── Empty state ─────────────────────────────────── */
.jnl-empty { display: none; flex-direction: column; align-items: center; text-align: center; padding: 48px 20px; gap: 12px; }
html:has(#mood-pos:checked) .entry-grid:not(:has(.entry-card[data-mood="pos"])) ~ .jnl-empty,
html:has(#mood-neu:checked) .entry-grid:not(:has(.entry-card[data-mood="neu"])) ~ .jnl-empty,
html:has(#mood-cha:checked) .entry-grid:not(:has(.entry-card[data-mood="cha"])) ~ .jnl-empty { display: flex; }
.jnl-empty__icon  { font-size: 36px; opacity: .4; }
.jnl-empty__title { font-size: 16px; font-weight: 700; color: var(--text); }
.jnl-empty__sub   { font-size: 13px; color: var(--muted); max-width: 280px; line-height: 1.6; }

/* ── Privacy note (subtle, builds trust) ─────────── */
.jnl-privacy {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--teal-pale); border: 1px solid rgba(45,150,118,.18);
  font-size: 12px; font-weight: 600; color: var(--teal);
}
.jnl-privacy svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 680px) {
  .jnl-inner { padding: 16px 16px 40px; gap: 18px; }
  .jnl-toolbar { margin: 0 -16px; padding: 10px 16px; }
  .jnl-header { flex-direction: column; }
  .entry-grid { grid-template-columns: 1fr; }
  html:has(#view-list:checked) .entry-card__body { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .sidebar { display: none; }
  .jnl-toolbar__filters { gap: 5px; }
}
