/* ═══════════════════════════════════════════════════
   FOUR KEYS COMPASS — Personal Edition
   Calm minimal aesthetic, mobile-first
═══════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Palette — Light */
  --bg:              #f8f6f1;
  --bg-2:            #f0ece3;
  --bg-3:            #e8e2d6;
  --surface:         #ffffff;
  --surface-2:       #f4f1ea;
  --border:          #ddd8cc;
  --border-light:    #eae6dd;
  --text-primary:    #2a2520;
  --text-secondary:  #6b6359;
  --text-muted:      #9c9488;
  --text-inverse:    #ffffff;

  /* Key colors */
  --awareness-hue:    210;
  --patience-hue:     155;
  --truth-hue:        40;
  --alleviation-hue:  280;

  --awareness:       hsl(210, 40%, 52%);
  --awareness-light: hsl(210, 50%, 94%);
  --awareness-mid:   hsl(210, 35%, 72%);

  --patience:        hsl(155, 38%, 44%);
  --patience-light:  hsl(155, 45%, 93%);
  --patience-mid:    hsl(155, 30%, 68%);

  --truth:           hsl(40, 65%, 48%);
  --truth-light:     hsl(40, 70%, 93%);
  --truth-mid:       hsl(40, 55%, 70%);

  --alleviation:     hsl(280, 32%, 52%);
  --alleviation-light: hsl(280, 40%, 94%);
  --alleviation-mid: hsl(280, 25%, 72%);

  /* UI */
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --radius-xl:  28px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.06);
  --transition: 220ms ease;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:      58px;
}

/* ── Dark mode variables ── */
body.dark-mode {
  --bg:              #141210;
  --bg-2:            #1c1916;
  --bg-3:            #242018;
  --surface:         #1f1c18;
  --surface-2:       #272320;
  --border:          #3a342c;
  --border-light:    #2e2924;
  --text-primary:    #ede8df;
  --text-secondary:  #a09488;
  --text-muted:      #6e6358;
  --text-inverse:    #141210;

  --awareness:       hsl(210, 50%, 62%);
  --awareness-light: hsl(210, 30%, 18%);
  --awareness-mid:   hsl(210, 40%, 40%);

  --patience:        hsl(155, 45%, 54%);
  --patience-light:  hsl(155, 25%, 16%);
  --patience-mid:    hsl(155, 30%, 36%);

  --truth:           hsl(40, 65%, 60%);
  --truth-light:     hsl(40, 40%, 16%);
  --truth-mid:       hsl(40, 50%, 40%);

  --alleviation:     hsl(280, 40%, 64%);
  --alleviation-light: hsl(280, 25%, 17%);
  --alleviation-mid: hsl(280, 28%, 38%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow:    0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img, svg { display: block; }
button { cursor: pointer; font-family: inherit; }
textarea, input { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Navigation ── */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
}

.nav-logo-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.4rem 0.2rem;
  transition: opacity var(--transition);
}
.nav-logo-btn:hover { opacity: 0.7; }

.nav-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.nav-btn:hover {
  background: var(--bg-2);
  color: var(--text-primary);
}

/* ── Screens ── */
.screen {
  display: none;
  padding-top: var(--nav-h);
  min-height: 100dvh;
}
.screen.active { display: block; }

.screen-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.4rem 4rem;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: calc(100dvh - var(--nav-h));
  justify-content: center;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.screen-header {
  margin-bottom: 2rem;
}

.step-indicator {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.screen-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.screen-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── HOME SCREEN ── */
.home-header {
  margin-bottom: 2.5rem;
}

.home-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.home-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── BREATHING ANIMATION ── */
.breathing-section {
  margin: 0 auto 2rem;
  width: 100%;
  max-width: 340px;
}

.breathing-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breathing-ring-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.breathing-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--bg-2), transparent 70%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  will-change: transform;
}

.breathing-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  opacity: 0.35;
  transition: opacity var(--transition);
}

.breathing-ring:hover {
  box-shadow: 0 0 24px rgba(0,0,0,0.08);
}

.breathing-ring.inhale {
  animation: breatheIn 4s ease-in-out forwards;
}
.breathing-ring.exhale {
  animation: breatheOut 4s ease-in-out forwards;
}
.breathing-ring.hold {
  animation: holdBreath 2s ease-in-out forwards;
}

@keyframes breatheIn {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0,0.05); }
  100% { transform: scale(1.25); box-shadow: 0 0 40px rgba(0,0,0,0.1); }
}
@keyframes breatheOut {
  0%   { transform: scale(1.25); box-shadow: 0 0 40px rgba(0,0,0,0.1); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0,0.05); }
}
@keyframes holdBreath {
  0%, 100% { transform: scale(1.25); }
  50%       { transform: scale(1.22); }
}

.breathing-ring-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.breathing-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  transition: opacity 0.5s;
}

.breathing-instruction {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  min-height: 1.4em;
  transition: opacity 0.5s;
}

.breathing-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.4s, transform 0.4s;
}

.dot.active {
  background: var(--awareness);
  transform: scale(1.3);
}

.home-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  width: 100%;
  max-width: 300px;
}

.home-keys-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0 1rem;
}

.key-chip {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-xl);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.key-chip.awareness    { background: var(--awareness-light); color: var(--awareness); }
.key-chip.patience     { background: var(--patience-light);  color: var(--patience); }
.key-chip.truth        { background: var(--truth-light);     color: var(--truth); }
.key-chip.alleviation  { background: var(--alleviation-light); color: var(--alleviation); }

/* ── COMPASS LAYOUT ── */
.compass-layout {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.6rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 1.8rem;
}

.compass-north,
.compass-south {
  display: flex;
  justify-content: center;
}

.compass-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.compass-west, .compass-east {
  flex: 0 0 auto;
}

.compass-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  transition: transform var(--transition);
}
.compass-key-badge:hover { transform: scale(1.04); }

.compass-key-badge.awareness {
  background: var(--awareness-light);
  color: var(--awareness);
  border-color: var(--awareness-mid);
}
.compass-key-badge.patience {
  background: var(--patience-light);
  color: var(--patience);
  border-color: var(--patience-mid);
}
.compass-key-badge.truth {
  background: var(--truth-light);
  color: var(--truth);
  border-color: var(--truth-mid);
}
.compass-key-badge.alleviation {
  background: var(--alleviation-light);
  color: var(--alleviation);
  border-color: var(--alleviation-mid);
}

.ck-symbol {
  font-size: 0.9rem;
}

.compass-center-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
}

/* ── FIELD COMPONENTS ── */
.situation-block,
.key-answer-block,
.integration-block {
  margin-bottom: 1.75rem;
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

.field-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.65;
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.field-textarea:focus {
  border-color: var(--awareness);
  box-shadow: 0 0 0 3px hsla(210,40%,52%,0.12);
}
.field-textarea::placeholder { color: var(--text-muted); }
.field-textarea-large { min-height: 160px; }

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ── KEY SCREEN ── */
.key-icon-large {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.key-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
}

/* Key theme colors on key screen */
.screen-key-awareness .key-icon-large,
.screen-key-awareness .key-title { color: var(--awareness); }
.screen-key-patience .key-icon-large,
.screen-key-patience .key-title  { color: var(--patience); }
.screen-key-truth .key-icon-large,
.screen-key-truth .key-title     { color: var(--truth); }
.screen-key-alleviation .key-icon-large,
.screen-key-alleviation .key-title { color: var(--alleviation); }

/* Focus border per key */
.screen-key-awareness .field-textarea:focus { border-color: var(--awareness); box-shadow: 0 0 0 3px hsla(210,40%,52%,0.12); }
.screen-key-patience  .field-textarea:focus { border-color: var(--patience);  box-shadow: 0 0 0 3px hsla(155,38%,44%,0.12); }
.screen-key-truth     .field-textarea:focus { border-color: var(--truth);     box-shadow: 0 0 0 3px hsla(40,65%,48%,0.12); }
.screen-key-alleviation .field-textarea:focus { border-color: var(--alleviation); box-shadow: 0 0 0 3px hsla(280,32%,52%,0.12); }

/* ── PROMPTS LIST ── */
.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.prompt-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  transition: background var(--transition);
}

.prompt-item.awareness    { border-left-color: var(--awareness); }
.prompt-item.patience     { border-left-color: var(--patience); }
.prompt-item.truth        { border-left-color: var(--truth); }
.prompt-item.alleviation  { border-left-color: var(--alleviation); }

.prompt-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 18px;
  padding-top: 0.1em;
}

.prompt-text {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── INTEGRATION SCREEN ── */
.summary-section {
  margin-bottom: 2rem;
}

.summary-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.summary-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-sm);
}

.summary-card.awareness    { border-left-color: var(--awareness); }
.summary-card.patience     { border-left-color: var(--patience); }
.summary-card.truth        { border-left-color: var(--truth); }
.summary-card.alleviation  { border-left-color: var(--alleviation); }
.summary-card.situation    { border-left-color: var(--border); }

.summary-card-key {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.summary-card.awareness    .summary-card-key { color: var(--awareness); }
.summary-card.patience     .summary-card-key { color: var(--patience); }
.summary-card.truth        .summary-card-key { color: var(--truth); }
.summary-card.alleviation  .summary-card-key { color: var(--alleviation); }
.summary-card.situation    .summary-card-key { color: var(--text-muted); }

.summary-card-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.summary-card-empty {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Key selector */
.key-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.key-select-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}

.key-select-btn.awareness:hover,
.key-select-btn.awareness.selected {
  background: var(--awareness-light);
  border-color: var(--awareness);
  color: var(--awareness);
}
.key-select-btn.patience:hover,
.key-select-btn.patience.selected {
  background: var(--patience-light);
  border-color: var(--patience);
  color: var(--patience);
}
.key-select-btn.truth:hover,
.key-select-btn.truth.selected {
  background: var(--truth-light);
  border-color: var(--truth);
  color: var(--truth);
}
.key-select-btn.alleviation:hover,
.key-select-btn.alleviation.selected {
  background: var(--alleviation-light);
  border-color: var(--alleviation);
  color: var(--alleviation);
}

/* ── COMPLETION SCREEN ── */
.complete-animation {
  margin-bottom: 1.5rem;
}

.complete-star {
  font-size: 4rem;
  color: var(--awareness);
  animation: completeStar 1.2s ease-out forwards;
}

@keyframes completeStar {
  0%   { transform: scale(0.4) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(5deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.complete-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.complete-message {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.complete-summary-pill {
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-xl);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: none;
}
.complete-summary-pill.awareness    { background: var(--awareness-light);    color: var(--awareness); }
.complete-summary-pill.patience     { background: var(--patience-light);     color: var(--patience); }
.complete-summary-pill.truth        { background: var(--truth-light);        color: var(--truth); }
.complete-summary-pill.alleviation  { background: var(--alleviation-light);  color: var(--alleviation); }

.complete-action-block {
  max-width: 320px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  min-height: 0;
}

/* ── HISTORY SCREEN ── */
.history-controls {
  margin-bottom: 1.5rem;
}

.search-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}
.search-input:focus {
  border-color: var(--awareness);
  box-shadow: 0 0 0 3px hsla(210,40%,52%,0.1);
}
.search-input::placeholder { color: var(--text-muted); }

.filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xl);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip.active,
.filter-chip:hover {
  border-color: var(--awareness);
  color: var(--awareness);
  background: var(--awareness-light);
}

.filter-chip[data-filter="awareness"].active  { border-color: var(--awareness);   color: var(--awareness);   background: var(--awareness-light); }
.filter-chip[data-filter="patience"].active   { border-color: var(--patience);    color: var(--patience);    background: var(--patience-light); }
.filter-chip[data-filter="truth"].active      { border-color: var(--truth);       color: var(--truth);       background: var(--truth-light); }
.filter-chip[data-filter="alleviation"].active { border-color: var(--alleviation); color: var(--alleviation); background: var(--alleviation-light); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-entry {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.history-entry::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.history-entry.awareness::before    { background: var(--awareness); }
.history-entry.patience::before     { background: var(--patience); }
.history-entry.truth::before        { background: var(--truth); }
.history-entry.alleviation::before  { background: var(--alleviation); }

.history-entry:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.entry-date {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.03em;
}

.entry-situation {
  font-size: 0.96rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.4rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.entry-key-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.entry-key-pill.awareness    { background: var(--awareness-light);    color: var(--awareness); }
.entry-key-pill.patience     { background: var(--patience-light);     color: var(--patience); }
.entry-key-pill.truth        { background: var(--truth-light);        color: var(--truth); }
.entry-key-pill.alleviation  { background: var(--alleviation-light);  color: var(--alleviation); }

.entry-action-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.history-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}
.history-empty-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── ENTRY DETAIL ── */
.entry-detail-header {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.entry-detail-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.entry-detail-situation {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.entry-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  border-left: 3px solid transparent;
}
.detail-section.awareness    { border-left-color: var(--awareness); }
.detail-section.patience     { border-left-color: var(--patience); }
.detail-section.truth        { border-left-color: var(--truth); }
.detail-section.alleviation  { border-left-color: var(--alleviation); }
.detail-section.integration  { border-left-color: var(--border); background: var(--bg-2); }

.detail-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.detail-section.awareness  .detail-section-label { color: var(--awareness); }
.detail-section.patience   .detail-section-label { color: var(--patience); }
.detail-section.truth      .detail-section-label { color: var(--truth); }
.detail-section.alleviation .detail-section-label { color: var(--alleviation); }
.detail-section.integration .detail-section-label { color: var(--text-muted); }

.detail-section-text {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-section-empty {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── SETTINGS ── */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.settings-group {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.settings-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1.1rem 0.4rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border-light);
  gap: 1rem;
}

.settings-info {
  flex: 1;
}

.settings-name {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.settings-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 25px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 25px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 19px; height: 19px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--awareness);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(19px);
}

/* Segmented control */
.segmented-control {
  display: flex;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border);
}

.seg-btn {
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.seg-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.settings-about {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 1rem;
}
.about-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto 0.4rem;
}
.about-version {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-xl);
  font-size: 0.93rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--awareness);
  color: white;
  box-shadow: 0 2px 8px hsla(210,40%,52%,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: hsl(210, 45%, 44%);
  box-shadow: 0 4px 14px hsla(210,40%,52%,0.35);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary.btn-save {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  border-radius: var(--radius);
}
.btn-outline:hover {
  border-color: var(--awareness);
  color: var(--awareness);
}

.btn-danger {
  background: #e05252;
  color: white;
}
.btn-danger:hover {
  background: #c94444;
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  color: #e05252;
  border: 1.5px solid #e05252;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  border-radius: var(--radius);
}
.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #c94444;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  border-radius: var(--radius);
}

.screen-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text-primary);
  color: var(--bg);
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-xl);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 3rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.modal-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

/* ── SCREEN TRANSITIONS ── */
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen.active {
  animation: screenFadeIn 0.32s ease-out forwards;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .screen-title { font-size: 1.9rem; }
  .home-title   { font-size: 2.2rem; }
  .breathing-ring { width: 140px; height: 140px; }
  .key-selector { grid-template-columns: 1fr 1fr; }
  .compass-layout { max-width: 100%; }
  .compass-key-badge { font-size: 0.75rem; padding: 0.45rem 0.7rem; }
  .modal-actions { flex-direction: column; }
  .nav-title { font-size: 0.9rem; }
}

@media (min-width: 600px) {
  .screen-actions {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
  }
  .home-actions {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }
  .btn-save {
    width: auto;
    padding: 0.85rem 2rem;
  }
}

/* ── PROGRESS BAR ── */
.session-progress-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  height: 3px;
  background: var(--border-light);
  z-index: 99;
  display: none;
}
.session-progress-bar.visible { display: block; }
.session-progress-fill {
  height: 100%;
  background: var(--awareness);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 3px 3px 0;
}

/* ── PRINT / FOCUS ── */
.btn:focus-visible,
.toggle-switch input:focus-visible + .toggle-slider,
.field-textarea:focus-visible,
.search-input:focus-visible {
  outline: 2px solid var(--awareness);
  outline-offset: 2px;
}

/* ── BREATHING RING CURSOR ── */
.breathing-ring.idle-cursor { cursor: pointer; }

/* ── SMALL REFINEMENTS ── */
.key-answer-block .field-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}

.prompt-item {
  cursor: default;
  user-select: text;
}

/* Highlight when prompt tapped on mobile */
.prompt-item:active {
  background: var(--bg-2);
}



/* Complete screen layout tweak */
.center-content .screen-actions {
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

@media (min-width: 600px) {
  .center-content .screen-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════
   DAILY KEY MODE
══════════════════════════════════════════════ */

/* ── Mode Switcher (Home) ── */
.mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 1.75rem;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.mode-btn:hover {
  border-color: var(--awareness);
  background: var(--awareness-light);
}
.mode-btn.active {
  border-color: var(--awareness);
  background: var(--awareness-light);
  box-shadow: var(--shadow-sm);
}
.mode-btn-icon {
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.15rem;
}
.mode-btn.active .mode-btn-icon { color: var(--awareness); }
.mode-btn-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}
.mode-btn-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1;
}

/* ── Daily Hero ── */
.daily-hero {
  padding: 1.75rem 0 0.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

.daily-date-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.daily-key-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  animation: keyReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes keyReveal {
  0%   { opacity: 0; transform: scale(0.75) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.daily-key-symbol {
  font-size: 3.2rem;
  line-height: 1;
  transition: color var(--transition);
}
.daily-key-name {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.1;
  transition: color var(--transition);
}

/* colour the key symbol & name per key */
.daily-hero.awareness .daily-key-symbol,
.daily-hero.awareness .daily-key-name { color: var(--awareness); }
.daily-hero.patience  .daily-key-symbol,
.daily-hero.patience  .daily-key-name  { color: var(--patience); }
.daily-hero.truth     .daily-key-symbol,
.daily-hero.truth     .daily-key-name  { color: var(--truth); }
.daily-hero.alleviation .daily-key-symbol,
.daily-hero.alleviation .daily-key-name { color: var(--alleviation); }

.daily-key-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto;
}

/* Done-today banner */
.daily-done-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: var(--patience-light);
  border: 1.5px solid var(--patience-mid);
  border-radius: var(--radius);
  font-size: 0.84rem;
  color: var(--patience);
  font-weight: 500;
}
.daily-done-icon { font-size: 1rem; }
.daily-done-view {
  background: none;
  border: none;
  color: var(--patience);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Reroll row ── */
.daily-reroll-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn-reroll {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-reroll:hover {
  border-color: var(--awareness);
  color: var(--awareness);
  background: var(--awareness-light);
}
.btn-reroll svg {
  flex-shrink: 0;
  transition: transform 0.4s ease;
}
.btn-reroll:hover svg { transform: rotate(180deg); }
.btn-reroll:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Daily prompts ── */
.daily-prompts { margin-bottom: 1.5rem; }

/* ── Daily journal ── */
.daily-journal-block { margin-bottom: 1.25rem; }

/* ── Mood input ── */
.daily-mood-block { margin-bottom: 1.75rem; }

.field-optional {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.field-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field-input:focus {
  border-color: var(--awareness);
  box-shadow: 0 0 0 3px hsla(210,40%,52%,0.1);
}
.field-input::placeholder { color: var(--text-muted); }

/* ── Week link ── */
.daily-week-link {
  margin-top: 1.5rem;
  text-align: center;
}
.btn-week-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0.3rem 0;
}
.btn-week-link:hover { color: var(--awareness); }

/* ══════════════════════════════════════════════
   WEEKLY VIEW
══════════════════════════════════════════════ */

/* ── Week navigator ── */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.week-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.week-nav-btn:hover {
  background: var(--awareness-light);
  border-color: var(--awareness);
  color: var(--awareness);
}
.week-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.week-nav-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  flex: 1;
}

/* ── 7-day grid ── */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}
.week-day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.25rem 0.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  cursor: default;
  transition: all var(--transition);
  min-width: 0;
}
.week-day-cell.has-entry {
  cursor: pointer;
  border-color: var(--border);
}
.week-day-cell.has-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.week-day-cell.today {
  border-color: var(--awareness);
  background: var(--awareness-light);
}
.week-day-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.week-day-cell.today .week-day-name { color: var(--awareness); }
.week-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.week-day-cell.today .week-day-num { color: var(--awareness); font-weight: 700; }

.week-day-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.week-day-dot.empty {
  background: var(--bg-2);
  color: transparent;
}
.week-day-dot.awareness    { background: var(--awareness-light);    color: var(--awareness); border: 1.5px solid var(--awareness); }
.week-day-dot.patience     { background: var(--patience-light);     color: var(--patience); border: 1.5px solid var(--patience); }
.week-day-dot.truth        { background: var(--truth-light);        color: var(--truth); border: 1.5px solid var(--truth); }
.week-day-dot.alleviation  { background: var(--alleviation-light);  color: var(--alleviation); border: 1.5px solid var(--alleviation); }

.week-day-mood {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
  font-style: italic;
}

/* ── Frequency bars ── */
.week-chart-section {
  margin-bottom: 1.75rem;
}
.week-chart-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.week-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.week-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.week-bar-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.week-bar-symbol { font-size: 0.9rem; }
.week-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-2);
  border-radius: 5px;
  overflow: hidden;
}
.week-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.week-bar-fill.awareness    { background: var(--awareness); }
.week-bar-fill.patience     { background: var(--patience); }
.week-bar-fill.truth        { background: var(--truth); }
.week-bar-fill.alleviation  { background: var(--alleviation); }

.week-bar-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 16px;
  text-align: right;
}
.week-bar-count.leading { color: var(--text-primary); }

.week-dominant-callout {
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: center;
}
.week-dominant-callout.awareness    { background: var(--awareness-light);    color: var(--awareness); }
.week-dominant-callout.patience     { background: var(--patience-light);     color: var(--patience); }
.week-dominant-callout.truth        { background: var(--truth-light);        color: var(--truth); }
.week-dominant-callout.alleviation  { background: var(--alleviation-light);  color: var(--alleviation); }
.week-dominant-callout.none         { background: var(--bg-2);               color: var(--text-muted); }

/* ── Weekly entries list ── */
.week-entries-section { margin-bottom: 1rem; }
.week-entries-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.week-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.week-entry-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.week-entry-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.week-entry-card.awareness::before    { background: var(--awareness); }
.week-entry-card.patience::before     { background: var(--patience); }
.week-entry-card.truth::before        { background: var(--truth); }
.week-entry-card.alleviation::before  { background: var(--alleviation); }
.week-entry-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.week-entry-key-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  min-width: 42px;
}
.week-entry-symbol {
  font-size: 1.3rem;
  line-height: 1;
}
.week-entry-card.awareness  .week-entry-symbol { color: var(--awareness); }
.week-entry-card.patience   .week-entry-symbol { color: var(--patience); }
.week-entry-card.truth      .week-entry-symbol { color: var(--truth); }
.week-entry-card.alleviation .week-entry-symbol { color: var(--alleviation); }

.week-entry-day-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.week-entry-content { flex: 1; min-width: 0; }
.week-entry-key-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.week-entry-card.awareness  .week-entry-key-name { color: var(--awareness); }
.week-entry-card.patience   .week-entry-key-name { color: var(--patience); }
.week-entry-card.truth      .week-entry-key-name { color: var(--truth); }
.week-entry-card.alleviation .week-entry-key-name { color: var(--alleviation); }

.week-entry-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.week-entry-mood {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.week-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.week-empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
  opacity: 0.4;
}

/* ── Daily entry detail (reuse existing detail styles + override) ── */
.detail-section.daily-key { border-left-width: 3px; }
.detail-section.daily-key.awareness  { border-left-color: var(--awareness); }
.detail-section.daily-key.patience   { border-left-color: var(--patience); }
.detail-section.daily-key.truth      { border-left-color: var(--truth); }
.detail-section.daily-key.alleviation{ border-left-color: var(--alleviation); }

/* ── responsive daily ── */
@media (max-width: 400px) {
  .week-grid { gap: 0.25rem; }
  .week-day-cell { padding: 0.45rem 0.15rem 0.4rem; }
  .week-day-name { font-size: 0.58rem; }
  .week-day-dot { width: 16px; height: 16px; font-size: 0.55rem; }
  .week-bar-label { width: 80px; font-size: 0.76rem; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── SELECTION ── */
::selection { background: hsla(30, 50%, 48%, 0.2); }
