/* ============================================================
   Edgewalker — Warm Sepia Theme — Mobile First
   ============================================================ */

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

:root {
  --bg:            #f2ead4;
  --surface:       #fdfaf0;
  --surface-el:    #e8dfc0;
  --surface-high:  #ddd4b0;
  --gold:          #b8820a;
  --gold-dim:      #8a6008;
  --teal:          #2e8b8a;
  --teal-dim:      #1d6b6a;
  --text:          #2a1e08;
  --text-sec:      #604010;
  --text-dim:      #8a7040;
  --border:        rgba(184,130,10,0.25);
  --border-bright: rgba(184,130,10,0.4);
  --red:           #c0392b;
  --yellow:        #c17f1a;
  --green:         #2d8a4e;
  --shadow:        0 2px 8px rgba(100,80,40,0.1);
  --shadow-lg:     0 4px 20px rgba(100,80,40,0.18);
  --radius:        10px;
  --radius-sm:     6px;
  --sidebar-w:     220px;
  --tab-h:         64px;
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* ── Typography scale ──────────────────────────────────── */
  --text-xs:   0.72rem;   /* labels, meta, tiny caps */
  --text-sm:   0.82rem;   /* secondary text, captions */
  --text-base: 0.92rem;   /* body / default */
  --text-md:   1.0rem;    /* slightly emphasised body */
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

img { max-width: 100%; }

/* ── Scrollbars ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ── Layout shell ────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar (desktop) ───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .app-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-logo .app-tagline {
  font-size: var(--text-xs);
  color: var(--text-sec);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-sec);
  font-size: var(--text-base);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-el);
  text-decoration: none;
}

.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

.nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* Sub-item indentation (replaces inline style) */
.nav-item-sub {
  padding-left: 2.2rem;
  font-size: var(--text-sm);
  opacity: 0.85;
}

/* Sidebar footer — hidden now that lang toggle moved to top-right */
.sidebar-footer {
  display: none;
}

.sidebar-lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  width: 100%;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-lang-btn:hover {
  border-color: var(--gold-dim);
  background: var(--surface-high);
}

/* ── Main content area ───────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Inner wrapper: centered, max-width constrained */
.page-inner {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 40px;
}

/* ── Mobile: hide sidebar, show bottom tabs ──────────────── */
@media (max-width: 767px) {
  .sidebar { display: none; }

  .main-content {
    margin-left: 0;
  }

  .page-inner {
    padding: 16px 16px calc(var(--tab-h) + 16px);
  }

  .bottom-tabs {
    display: flex !important;
  }
}

.bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 200;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bottom-tabs::-webkit-scrollbar { display: none; }

.tab-item {
  min-width: 64px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 4px;
  transition: color 0.15s;
  cursor: pointer;
}
.tab-item:hover { text-decoration: none; color: var(--text-sec); }
.tab-item.active { color: var(--gold); }
.tab-item .tab-icon { font-size: 1.3rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-body { padding: 18px 20px; }

/* ── Page headers ────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: var(--text-base);
  color: var(--text-sec);
}

/* ── Rune Symbol ─────────────────────────────────────────── */
.rune-symbol {
  color: var(--gold);
  font-size: 3.5rem;
  line-height: 1;
  display: inline-block;
  /* Base carved/engraved look for all rune symbols */
  text-shadow:
    1px 2px 3px rgba(80,50,15,0.7),
    -0.5px -0.5px 1px rgba(220,185,100,0.4);
}

/* Stone medallion for large rune display */
.rune-symbol.large {
  font-size: 4.5rem;
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #d0c0a0 0%, #9a8860 45%, #6e5c34 100%);
  box-shadow:
    inset 3px 4px 8px rgba(220,200,145,0.55),
    inset -3px -4px 8px rgba(40,25,5,0.68),
    0 6px 18px rgba(60,40,15,0.42),
    0 0 0 2px rgba(110,88,40,0.45),
    0 0 0 4px rgba(140,110,55,0.18);
  text-shadow:
    2px 3px 4px rgba(20,10,0,0.88),
    -1px -1px 1px rgba(215,178,80,0.45),
    0 0 14px rgba(80,50,0,0.22);
  animation: runeGlow 5s ease-in-out infinite;
}

@keyframes runeGlow {
  0%, 100% { box-shadow:
    inset 3px 4px 8px rgba(220,200,145,0.55),
    inset -3px -4px 8px rgba(40,25,5,0.68),
    0 6px 18px rgba(60,40,15,0.42),
    0 0 0 2px rgba(110,88,40,0.45),
    0 0 0 4px rgba(140,110,55,0.18),
    0 0 20px rgba(184,134,11,0.0); }
  50% { box-shadow:
    inset 3px 4px 8px rgba(220,200,145,0.55),
    inset -3px -4px 8px rgba(40,25,5,0.68),
    0 6px 18px rgba(60,40,15,0.42),
    0 0 0 2px rgba(110,88,40,0.45),
    0 0 0 4px rgba(140,110,55,0.18),
    0 0 28px rgba(184,134,11,0.18); }
}

.rune-symbol.small {
  font-size: 1.8rem;
  text-shadow:
    1px 1.5px 2px rgba(80,50,15,0.65),
    -0.5px -0.5px 1px rgba(220,185,100,0.35);
}

.rune-symbol.xs { font-size: 1.2rem; }

/* ── Mastery dots ────────────────────────────────────────── */
.mastery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.mastery-0 { background: #cec6b8; border: 1px solid #b0a898; }
.mastery-1 { background: var(--yellow); }
.mastery-2 { background: var(--gold); }
.mastery-3 { background: var(--green); }

.mastery-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Mood badge ──────────────────────────────────────────── */
.mood-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 700;
}
.mood-high  { background: rgba(80, 200, 120, 0.2); color: var(--green); }
.mood-mid   { background: rgba(240, 192, 64, 0.2); color: var(--yellow); }
.mood-low   { background: rgba(224, 92, 106, 0.2); color: var(--red); }

/* ── Tags ────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--surface-el);
  color: var(--text-sec);
  border: 1px solid var(--border);
}

.tag-teal  { background: rgba(78,205,196,0.12); color: var(--teal); border-color: rgba(78,205,196,0.3); }
.tag-gold  { background: rgba(201,168,76,0.12); color: var(--gold); border-color: rgba(201,168,76,0.3); }
.tag-theme { background: rgba(184,130,10,0.1); color: var(--gold-dim); border-color: rgba(184,130,10,0.25); }

/* ── Entry type pill ─────────────────────────────────────── */
.entry-type {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.type-thought  { background: rgba(78,205,196,0.12); color: var(--teal); }
.type-event    { background: rgba(201,168,76,0.12); color: var(--gold); }
.type-dream    { background: rgba(140,100,220,0.15); color: #b090e8; }
.type-insight  { background: rgba(80,200,120,0.12); color: var(--green); }
.type-daily_pull { background: rgba(201,168,76,0.15); color: var(--gold); }
.type-study    { background: rgba(78,205,196,0.12); color: var(--teal); }
.type-reflection { background: rgba(140,100,220,0.15); color: #b090e8; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--surface-el);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--text-base);
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238884a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--teal);
  color: #0d1a18;
  border-color: var(--teal);
}
.btn-primary:hover { opacity: 0.88; }

.btn-gold {
  background: var(--gold);
  color: #1a1200;
  border-color: var(--gold);
}
.btn-gold:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-el); color: var(--text); }

.btn-sm {
  padding: 6px 14px;
  font-size: var(--text-sm);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.daily-rune-card {
  background: linear-gradient(135deg, #e0d4b0 0%, #ede8d4 100%);
  border: 1px solid rgba(100,80,40,0.25);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .daily-rune-card { grid-column: span 1; }
}

.daily-rune-label {
  font-size: var(--text-xs);
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.daily-rune-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.daily-rune-meaning {
  font-size: var(--text-sm);
  color: var(--text-sec);
}

.daily-rune-core {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-style: italic;
  max-width: 240px;
}

/* ── Recent entries ──────────────────────────────────────── */
.entry-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-el);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.entry-card:hover { border-color: var(--border-bright); }

.entry-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.entry-card-time {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.entry-card-snippet {
  font-size: var(--text-sm);
  color: var(--text-sec);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Quick coach box ─────────────────────────────────────── */
.quick-coach {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.quick-coach input {
  flex: 1;
}

/* ── Week Rune Tab Bar (Layout 14) ──────────────────────── */
.week-rune-bar {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.week-rune-tabrow {
  background: var(--surface-el);
  display: flex;
  align-items: stretch;
}

.week-rune-label {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  gap: 5px;
}

.week-rune-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  color: var(--text-sec);
}

.week-rune-tab:last-of-type { border-right: none; }
.week-rune-tab:hover { background: rgba(201,168,76,0.07); }

.week-rune-tab.active {
  background: var(--surface);
  border-bottom-color: var(--gold);
}

.week-rune-tab-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}

.week-rune-tab-arrow {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.15s;
}

.week-rune-tab.active .week-rune-tab-arrow { opacity: 1; }

.week-rune-session-link {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  transition: color 0.15s;
}

.week-rune-session-link:hover { color: var(--gold); }

/* ── Rune glyph tiles (replaces photo stone icons) ───── */
.rune-stone-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.12s;
  cursor: pointer;
}

.rune-stone-tile:hover { background: rgba(201,168,76,0.07); }
.rune-stone-tile.active { background: rgba(201,168,76,0.14); }

.rune-glyph-box {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
  color: var(--gold);
  font-size: 26px;
  font-weight: 700;
  -webkit-text-stroke: 0.5px var(--gold);
  border: 1px solid rgba(100,80,40,0.12);
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.rune-stone-tile.active .rune-glyph-box {
  background: var(--gold);
  color: #1a1208;
  border-color: var(--gold);
}

.rune-stone-tile:hover .rune-glyph-box {
  border-color: var(--gold);
}

.rune-tile-name {
  font-size: 0.56rem;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  max-width: 50px;
  text-overflow: ellipsis;
}

.rune-stone-tile.active .rune-tile-name {
  color: var(--gold);
  font-weight: 700;
}

/* Large glyph hero in detail panel header */
.rune-glyph-hero {
  font-size: 5.5rem;
  font-weight: 700;
  -webkit-text-stroke: 1px var(--gold);
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  text-shadow:
    1px 3px 6px rgba(80,50,15,0.5),
    -0.5px -0.5px 1px rgba(220,185,100,0.3);
}

/* Glyph box in week rune tab bar */
.week-glyph-box {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 5px;
  color: var(--gold);
  font-size: 14px;
  border: 1px solid rgba(201,168,76,0.25);
  flex-shrink: 0;
  transition: background 0.15s;
}

.week-rune-tab.active .week-glyph-box {
  background: var(--gold);
  color: #1a1208;
}

.week-rune-strip {
  background: var(--surface);
  border-top: 1px solid rgba(100,74,22,0.2);
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .week-rune-tabrow { flex-wrap: wrap; }
  .week-rune-label { width: 100%; border-right: none; border-bottom: 1px solid rgba(201,168,76,0.12); padding: 7px 14px; }
  .week-rune-tab { border-bottom: 2px solid transparent; }
  .week-rune-session-link { border-left: none; border-top: 1px solid rgba(201,168,76,0.1); width: 100%; padding: 7px 14px; }
  .week-rune-strip { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Runes page ──────────────────────────────────────────── */
.runes-layout {
  display: grid;
  grid-template-columns: 224px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 600px) {
  .runes-layout {
    grid-template-columns: 1fr;
  }
  .rune-list-panel { max-height: 300px; overflow-y: auto; }
}

.rune-list-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.aett-header {
  padding: 6px 12px;
  background: var(--surface-el);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid var(--gold);
}

.rune-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.rune-list-item:hover  { background: var(--surface-el); text-decoration: none; }
.rune-list-item.active { background: rgba(201,168,76,0.1); }
.rune-list-item:last-child { border-bottom: none; }

.rune-list-symbol {
  color: var(--gold);
  font-size: 1.15rem;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 5px;
  background:
    radial-gradient(circle at 35% 30%, #c8b888 0%, #8a7848 55%, #6a5830 100%);
  box-shadow:
    inset 1px 2px 3px rgba(215,195,140,0.52),
    inset -1px -2px 3px rgba(40,25,5,0.55),
    0 2px 5px rgba(60,40,15,0.28);
  text-shadow:
    1px 1.5px 2px rgba(20,10,0,0.82),
    -0.5px -0.5px 0 rgba(200,165,70,0.35);
}

/* ── Stone photo icons ───────────────────────────────────── */
.rune-stone-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.15s, filter 0.15s;
}
.rune-list-item:hover .rune-stone-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px rgba(201,168,76,0.5));
}
.rune-list-item.active .rune-stone-icon {
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.75));
}

.rune-stone-large {
  width: 120px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
  animation: runeGlow 5s ease-in-out infinite;
}

.rune-list-name {
  font-size: var(--text-sm);
  font-weight: 500;
  flex: 1;
}

/* ── Rune detail panel ───────────────────────────────────── */
.rune-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rune-detail-header {
  padding: 28px 28px 20px;
  background: linear-gradient(135deg, #e0d4b0 0%, #ede8d4 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
}

.rune-detail-info h2 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 4px;
}

.rune-detail-meaning {
  font-size: var(--text-base);
  color: var(--text-sec);
  margin-bottom: 4px;
}

.rune-detail-core {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-style: italic;
}

.rune-detail-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.rune-detail-body { padding: 24px 28px; }

.rune-journal-list { margin-bottom: 24px; }

.rune-entry-item {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.rune-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.rune-entry-content {
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.55;
}

.ai-reflection-block {
  background: rgba(201,168,76,0.06);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-sec);
  line-height: 1.55;
}

.ai-reflection-block.teal-accent {
  background: rgba(78,205,196,0.06);
  border-left-color: var(--teal);
}

.ai-reflection-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* ── Entry form ──────────────────────────────────────────── */
.entry-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.entry-form-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Coach page ──────────────────────────────────────────── */
.coach-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  height: calc(100vh - 120px);
}

@media (max-width: 768px) {
  .coach-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .coach-sessions-panel { display: none; }
}

.coach-sessions-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.sessions-list {
  flex: 1;
  overflow-y: auto;
}

.session-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: var(--text);
}

.session-item:hover { background: var(--surface-el); text-decoration: none; }
.session-item.active { background: rgba(78,205,196,0.08); }

.session-item-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.session-item-date {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* ── Chat window ─────────────────────────────────────────── */
.chat-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  overflow: hidden;
}

@media (max-width: 768px) {
  .chat-window {
    height: calc(100vh - var(--tab-h) - 80px);
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-dim);
  padding: 40px 20px;
}

.chat-empty .empty-rune {
  font-size: 4rem;
  color: rgba(201,168,76,0.25);
  display: block;
  margin-bottom: 12px;
}

.chat-empty h3 {
  font-size: 1.1rem;
  color: var(--text-sec);
  margin-bottom: 6px;
}

.chat-empty p {
  font-size: var(--text-sm);
  color: var(--text-dim);
  max-width: 280px;
  margin: 0 auto;
}

/* ── Chat bubbles ────────────────────────────────────────── */
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-bubble-wrap.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-wrap.coach {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  padding: 0 4px;
}

.chat-bubble-wrap.user  .bubble-label { color: var(--teal-dim); }
.chat-bubble-wrap.coach .bubble-label { color: var(--gold-dim); }

.chat-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: var(--text-base);
  line-height: 1.6;
  word-break: break-word;
}

.chat-bubble-wrap.user .chat-bubble {
  background: var(--teal-dim);
  color: #f0fffe;
  border-radius: 14px 14px 4px 14px;
}

.chat-bubble-wrap.coach .chat-bubble {
  background: var(--surface-el);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}

/* ── Thinking indicator ──────────────────────────────────── */
.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}

.thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-pulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* ── Chat input area ─────────────────────────────────────── */
.chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  resize: none;
  line-height: 1.5;
  padding: 10px 14px;
}

.chat-send-btn {
  height: 44px;
  width: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ── Therapy page ────────────────────────────────────────── */
.therapy-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 700px) {
  .therapy-layout { grid-template-columns: 1fr; }
}

.therapy-sessions-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.therapy-session-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
  border-left: 3px solid transparent;
}

.therapy-session-item:hover {
  background: var(--surface-el);
  text-decoration: none;
  border-left-color: rgba(184,130,10,0.3);
}
.therapy-session-item.active {
  background: rgba(184,130,10,0.07);
  border-left-color: var(--gold);
}
.therapy-session-item:last-child { border-bottom: none; }

.session-num {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1px;
  letter-spacing: 0.02em;
}

.session-date-str {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.therapy-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.therapy-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 700px) {
  .therapy-notes-grid { grid-template-columns: 1fr; }
}

.notes-col {
  padding: 20px;
  border-right: 1px solid var(--border);
}

.analysis-col {
  padding: 20px;
}

.notes-col:last-child,
.analysis-col { border-right: none; }

.col-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.raw-notes {
  font-size: var(--text-sm);
  color: var(--text-sec);
  line-height: 1.65;
  white-space: pre-wrap;
}

.analysis-text {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
}

.themes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

/* ── Journal page ────────────────────────────────────────── */
.journal-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .journal-layout {
    grid-template-columns: 1fr;
  }
  .journal-form-panel { order: -1; }
}

.journal-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.journal-entry-card {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}

.journal-entry-card:hover { border-color: var(--border-bright); }

.journal-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.journal-entry-content {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 6px;
}

.domain-badge {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* ── Form panel ──────────────────────────────────────────── */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 20px;
}

.form-panel-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Notification toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: var(--surface-high);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 280px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { border-color: var(--teal); }
.toast.error   { border-color: var(--red); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Utility ─────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-teal { color: var(--teal); }
.text-sec  { color: var(--text-sec); }
.text-dim  { color: var(--text-dim); }
.text-sm   { font-size: var(--text-sm); }
.text-xs   { font-size: var(--text-xs); }
.mt-auto   { margin-top: auto; }
.flex      { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.mt-16    { margin-top: 16px; }
.mt-8     { margin-top: 8px; }
.mb-16    { margin-bottom: 16px; }
.hidden   { display: none !important; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Analyzing state ─────────────────────────────────────── */
.analyzing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-style: italic;
}

/* ── Selection highlight ─────────────────────────────────── */
::selection {
  background: rgba(78,205,196,0.25);
  color: var(--text);
}

/* ── Misc page elements ──────────────────────────────────── */
.stat-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  flex: 1;
  min-width: 120px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Aett section ────────────────────────────────────────── */
.aett-section {
  margin-bottom: 4px;
}

/* ── New session button highlight ────────────────────────── */
.new-session-btn {
  width: 100%;
  margin-bottom: 12px;
  justify-content: center;
}

/* ── Responsive fine-tuning ──────────────────────────────── */
@media (max-width: 400px) {
  .page-inner { padding: 12px 12px calc(var(--tab-h) + 12px); }
  .rune-symbol.large { font-size: 3rem; width: 80px; height: 80px; }
  .chat-bubble { font-size: var(--text-sm); }
  .daily-rune-card { padding: 20px 16px; }
}

/* ── Rune detail sections ─────────────────────────────────────────────── */
.rune-section { margin-bottom: 20px; }
.rune-section-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.rune-section-text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-sec);
  margin: 0;
}

/* Runic poem */
.rune-poem-block {
  background:
    radial-gradient(ellipse at 38% 28%, rgba(215,200,158,0.55) 0%, transparent 55%),
    linear-gradient(155deg, #cfc0a0 0%, #b0a078 45%, #c4b07e 100%);
  border-top: 1px solid rgba(200,178,112,0.55);
  border-bottom: 2px solid rgba(70,50,15,0.38);
  border-left: 3px solid rgba(100,74,22,0.65);
  border-right: 1px solid rgba(80,60,20,0.25);
  border-radius: 3px 8px 8px 3px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow:
    inset 1px 2px 4px rgba(215,195,140,0.42),
    inset -1px -2px 3px rgba(50,35,10,0.32),
    0 3px 8px rgba(80,60,20,0.18);
}
.rune-poem-text {
  font-size: var(--text-sm);
  font-style: italic;
  color: #4a3010;
  line-height: 1.65;
  text-shadow: 0.5px 0.5px 1px rgba(200,165,80,0.3);
}

/* Loki block */
/* ── Hand Mudra ─────────────────────────────────────────── */
.rune-mudra-section { margin-bottom: 20px; }
.mudra-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  min-height: 100px;
}
.mudra-img {
  max-width: 240px;
  max-height: 300px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: var(--surface-el);
  object-fit: contain;
  display: block;
}
.mudra-image-wrap.mudra-missing .mudra-placeholder { display: flex !important; }
.mudra-placeholder {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 24px;
  border: 1px dashed var(--border-bright);
  border-radius: 10px;
  width: 100%;
  max-width: 260px;
  background: var(--surface);
}
.mudra-placeholder code {
  font-family: monospace;
  font-size: 0.75rem;
  background: var(--surface-el);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--gold-dim);
}
/* ── Loki block ──────────────────────────────────────────── */
.loki-block {
  background: #f0e4cc;
  border: 1px solid rgba(120,80,160,0.2);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.loki-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.loki-icon { font-size: 1.2rem; }
.loki-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #7a5a8a;
  font-weight: 700;
}
.loki-story-text {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--text-sec);
  margin: 0 0 16px;
}
.loki-question-block {
  background: #1a1026;
  border-radius: 6px;
  padding: 12px 14px;
}
.loki-question-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8866aa;
  display: block;
  margin-bottom: 4px;
}
.loki-question-text {
  font-size: var(--text-sm);
  color: #d4b8f0;
  font-style: italic;
  line-height: 1.6;
}

/* Galdr block */
.galdr-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.galdr-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  flex-shrink: 0;
}
.galdr-text {
  font-size: var(--text-sm);
  color: var(--gold);
  font-style: italic;
  letter-spacing: 0.05em;
}

/* ── Language switching ────────────────────────────────────── */

/* Default: hide Russian content */
.lang-ru { display: none !important; }

/* When Russian is active — show RU, hide EN, explicit per element type */
[data-lang="ru"] .lang-en { display: none !important; }
[data-lang="ru"] span.lang-ru,
[data-lang="ru"] a.lang-ru     { display: inline !important; }
[data-lang="ru"] p.lang-ru,
[data-lang="ru"] div.lang-ru,
[data-lang="ru"] ul.lang-ru,
[data-lang="ru"] ol.lang-ru,
[data-lang="ru"] li.lang-ru    { display: block !important; }

/* Language toggle button — hidden on desktop (sidebar handles it), fixed on mobile */
.reload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  width: 30px;
  height: 30px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.reload-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  transform: rotate(180deg);
}
@media (max-width: 767px) {
  .reload-btn { display: none; }
}

.lang-toggle-btn {
  display: flex;
  position: fixed;
  top: 14px;
  right: 54px;   /* sits left of the 30px reload btn + 10px gap */
  z-index: 9999;
  align-items: center;
  gap: 4px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 10px;
  height: 30px;
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.lang-toggle-btn:hover {
  border-color: var(--gold-dim);
  background: var(--surface-high);
}
.lt-en, .lt-ru {
  color: var(--text-dim);
  transition: color 0.2s;
}
.lt-sep {
  color: var(--border-bright);
}
[data-lang="en"] .lt-en { color: var(--gold); }
[data-lang="ru"] .lt-ru { color: var(--gold); }

@media (max-width: 767px) {
  .lang-toggle-btn {
    top: calc(var(--safe-top) + 10px);
    right: 12px;
  }
}

/* ── PWA / iPhone safe areas ─────────────────────────────── */
:root {
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.bottom-tabs {
  padding-bottom: calc(8px + var(--safe-bottom));
  height: auto;
  min-height: var(--tab-h);
}

/* Smooth momentum scrolling everywhere */
.main-content,
.rune-list-panel,
.coach-sessions-panel,
.chat-messages,
.therapy-sessions-list {
  -webkit-overflow-scrolling: touch;
}

/* Prevent text size adjustment on rotation — already set above, reinforce */
html { -webkit-text-size-adjust: 100%; }

/* Tap highlight */
a, button { -webkit-tap-highlight-color: rgba(201, 168, 76, 0.15); }

/* Pull-to-refresh containment */
body { overscroll-behavior-y: contain; }

/* ── Page transitions ─────────────────────────────────────── */
.main-content { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Card hover lift */
.card, .rune-detail-card, .daily-rune-card {
  transition: box-shadow 0.2s;
}

/* ── Card sections ───────────────────────────────────────── */
.card-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-section:last-child { border-bottom: none; }

.card-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* ── Button row utilities ────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-row-end { justify-content: flex-end; }

/* ── Health module styles ─────────────────────────────────── */
.health-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .health-layout {
    grid-template-columns: 1fr;
  }
}

.health-log-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.health-log-form {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.health-log-list {
  flex: 1;
  overflow-y: auto;
  max-height: 480px;
}

.health-log-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.health-log-item:last-child { border-bottom: none; }

.health-log-type {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 4px;
}
.log-type-symptom   { background: rgba(224,92,106,0.15); color: var(--red); }
.log-type-workout   { background: rgba(80,200,120,0.15); color: var(--green); }
.log-type-sleep     { background: rgba(78,205,196,0.12); color: var(--teal); }
.log-type-supplement { background: rgba(201,168,76,0.12); color: var(--gold); }
.log-type-note      { background: rgba(184,130,10,0.1); color: var(--gold-dim); }
.log-type-energy    { background: rgba(240,192,64,0.15); color: var(--yellow); }

.health-log-content {
  font-size: var(--text-sm);
  color: var(--text-sec);
  line-height: 1.5;
}
.health-log-date {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: 4px;
}

/* Health chat window reuses .chat-window but teal accent */
.health-chat-window .chat-bubble-wrap.coach .bubble-label { color: var(--teal-dim); }

/* ── Books module styles ──────────────────────────────────── */
.books-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .books-layout {
    grid-template-columns: 1fr;
  }
}

.books-list-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.books-status-group {
  border-bottom: 1px solid var(--border);
}
.books-status-group:last-child { border-bottom: none; }

.books-status-header {
  padding: 8px 14px;
  background: var(--surface-el);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}

.book-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.book-list-item:hover { background: var(--surface-el); text-decoration: none; }
.book-list-item.active { background: rgba(201,168,76,0.08); }
.book-list-item:last-child { border-bottom: none; }

.book-list-emoji { font-size: 1.2rem; flex-shrink: 0; }

.book-list-info { flex: 1; min-width: 0; }
.book-list-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-list-author {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.book-stars {
  font-size: var(--text-xs);
  color: var(--gold);
  flex-shrink: 0;
}

/* Book detail panel */
.book-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.book-detail-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #e0d4b0 0%, #ede8d4 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.book-detail-emoji {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
}

.book-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.book-detail-author { font-size: var(--text-base); color: var(--text-sec); margin-bottom: 8px; }

.book-status-select {
  background: var(--surface-el);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--text-sm);
  cursor: pointer;
}

/* Book tabs */
.book-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-el);
}

.book-tab {
  padding: 12px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-family: var(--font);
}
.book-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.book-tab:hover:not(.active) { color: var(--text-sec); }

.book-tab-content { padding: 20px 24px; }
.book-tab-panel { display: none; }
.book-tab-panel.active { display: block; }

/* Quote card */
.quote-card {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 10px 14px 8px;
  margin-bottom: 8px;
  position: relative;
}
.quote-text {
  font-size: var(--text-sm);
  font-weight: 500;
  font-style: italic;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 4px;
  /* collapsed: 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.quote-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  margin-bottom: 8px;
}
.quote-expand-btn {
  background: none;
  border: none;
  color: var(--gold-dim);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 0 4px 0;
  opacity: 0.7;
  letter-spacing: 0.02em;
  display: block;
}
.quote-expand-btn:hover { opacity: 1; color: var(--gold); }
/* Details section: hidden until expanded */
.quote-details {
  display: none;
  margin-top: 6px;
}
.quote-details.expanded { display: block; }
.quote-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-dim);
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.quote-reflection {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-sec);
  line-height: 1.55;
}
.quote-ai-reflection {
  background: rgba(184,130,10,0.07);
  border-left: 2px solid var(--gold-dim);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--text-sec);
  line-height: 1.6;
}
.quote-delete-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-sec);
  font-size: var(--text-sm);
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 3px;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.quote-delete-btn:hover { opacity: 1; color: #c0503a; background: rgba(192,80,58,0.1); }
.quote-add-panel {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 16px;
}

/* Add book form */
.add-book-form {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* Dashboard health/books quick cards */
.quick-stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.quick-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 500;
}
.quick-stat-pill.teal { background: rgba(78,205,196,0.12); color: var(--teal); border: 1px solid rgba(78,205,196,0.25); }
.quick-stat-pill.gold { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.25); }
.quick-stat-pill.green { background: rgba(80,200,120,0.12); color: var(--green); border: 1px solid rgba(80,200,120,0.25); }

/* Book reading chip */
.reading-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.reading-chip:hover { background: rgba(201,168,76,0.1); text-decoration: none; }
.reading-chip-emoji { font-size: 1.1rem; }
.reading-chip-title { color: var(--gold); font-weight: 600; }
.reading-chip-author { color: var(--text-dim); font-size: var(--text-xs); }

/* Suggested prompts (health / book chat) */
.suggested-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.suggested-prompt-btn {
  background: var(--surface-el);
  border: 1px solid var(--border);
  color: var(--text-sec);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: var(--text-xs);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.suggested-prompt-btn:hover {
  background: var(--surface-high);
  color: var(--text);
  border-color: var(--border-bright);
}

/* ── Dashboard quick actions grid ──────────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-sec);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
}
.quick-action-item:hover {
  background: var(--surface-high);
  color: var(--text);
  border-color: var(--border-bright);
  text-decoration: none;
}
.quick-action-icon { font-size: 1.4rem; }

/* ── Rune list panel — dark stone sidebar ───────────────────── */
.rune-list-panel {
  background: var(--surface);
  border-color: var(--border);
}

.rune-list-panel .aett-header {
  background: var(--surface-el);
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  text-shadow: none;
  box-shadow: none;
}

.rune-list-panel .rune-list-item {
  color: #b8a878;
  border-bottom-color: rgba(201,168,76,0.08);
}
.rune-list-panel .rune-list-item:hover {
  background: rgba(201,168,76,0.07);
}
.rune-list-panel .rune-list-item.active {
  background: rgba(201,168,76,0.13);
  border-left: 2px solid rgba(201,168,76,0.55);
}
.rune-list-panel .rune-list-name { color: #b8a878; }

/* ── Voice Widget Modal (shared across all modules) ─────────── */
.vw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40,28,8,0.62);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: vw-fade-in .15s ease;
}
@keyframes vw-fade-in { from{opacity:0} to{opacity:1} }
.vw-modal {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.vw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}
.vw-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.05rem;
  padding: .1rem .3rem;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s;
}
.vw-close:hover { color: var(--text); }
.vw-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.vw-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .4rem .65rem;
  font-size: .88rem;
  font-family: var(--font);
}
.vw-record-row {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.vw-btn-record {
  background: #8a2515;
  border: none;
  color: #fff;
  padding: .42rem .95rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background .2s;
}
.vw-btn-record:hover { background: #a03020; }
.vw-btn-record.recording {
  background: #c04030;
  animation: pulse-rec 1s infinite;
}
.vw-timer {
  font-size: .8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.vw-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s;
}
.vw-drop.drag-over {
  border-color: var(--gold);
  background: rgba(184,130,10,.05);
}
.vw-drop input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.vw-drop p {
  margin: 0;
  font-size: .82rem;
  color: var(--text-dim);
  pointer-events: none;
}
.vw-fname {
  color: var(--gold) !important;
  font-weight: 600;
  margin-top: .25rem !important;
  font-size: .84rem !important;
}
.vw-progress {
  background: var(--bg);
  border-radius: 8px;
  padding: .65rem .85rem;
}
.vw-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: .45rem;
}
.vw-progress-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width .35s;
}
.vw-progress p {
  margin: 0;
  font-size: .76rem;
  color: var(--text-dim);
  text-align: center;
}
.vw-btn-upload {
  background: var(--gold);
  border: none;
  color: #000;
  padding: .6rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  width: 100%;
  font-family: var(--font);
  transition: opacity .2s;
}
.vw-btn-upload:disabled { opacity: .42; cursor: not-allowed; }

/* Voice input button (sits alongside other chat input buttons) */
.btn-voice-input {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: .35rem .7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.btn-voice-input:hover {
  border-color: var(--gold);
  color: var(--gold);
}


/* ── Travel Agent ──────────────────────────────────────────────────────────── */

.travel-chat-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.travel-bubble {
  white-space: pre-wrap;
  line-height: 1.7;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.quick-chip:hover {
  border-color: var(--gold-dim);
  background: var(--surface-el);
  color: var(--gold);
}

.dest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 10px 5px 14px;
  font-size: 0.8rem;
  position: relative;
}
.dest-chip-del {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.dest-chip-del:hover { opacity: 1; color: #c0503a; }

/* ── Brain panel tabs ── */
.brain-tab {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.brain-tab:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}
.brain-tab.active {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  color: var(--surface);
  font-weight: 600;
}
.brain-textarea {
  background: var(--surface-el) !important;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace !important;
  font-size: 0.78rem !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* ── Travel deal tiles grid ── */
.deal-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 700px) {
  .deal-tiles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .deal-tiles-grid { grid-template-columns: 1fr; }
}

.deal-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 13px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.2s, border-color 0.15s;
  position: relative;
}
.deal-tile:hover { border-color: var(--gold-dim); }
.deal-tile-dismiss {
  position: absolute;
  top: 8px; right: 9px;
  background: none; border: none;
  color: var(--text-dim); font-size: 0.75rem;
  cursor: pointer; opacity: 0.35; padding: 0; line-height: 1;
}
.deal-tile-dismiss:hover { opacity: 0.7; }
.deal-tile-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  padding-right: 14px;
}
.deal-tile-body {
  font-size: 0.72rem;
  color: var(--text-sec);
  line-height: 1.4;
  flex: 1;
}
.deal-tile-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
}
.deal-tile-book {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--surface);
  background: var(--gold-dim);
  border-radius: 5px;
  padding: 3px 11px;
  text-decoration: none;
  white-space: nowrap;
}
.deal-tile-src {
  font-size: 0.62rem;
  color: var(--text-dim);
  opacity: 0.5;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Travel alert cards (legacy, kept for compat) ── */
.alert-card {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: opacity 0.2s;
}
.alert-card:hover {
  border-color: var(--gold-dim);
}

/* ── Discovery page ── */
.disc-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.disc-tab:hover { color: var(--text); }
.disc-tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

.disc-tab-panel {}

.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 600px) {
  .disc-grid { grid-template-columns: 1fr; }
}

.disc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, opacity 0.2s;
}
.disc-card:hover { border-color: var(--border-bright); }
.disc-card.liked { border-color: #7ecba360; }
.disc-card.disliked { opacity: 0.45; }

.disc-cat-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.66rem;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.cat-chip {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.76rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-chip:hover { border-color: var(--gold-dim); color: var(--text); }
.cat-chip.active { background: var(--gold-dim); border-color: var(--gold-dim); color: var(--surface); font-weight: 600; }

/* Calendar */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
@media (max-width: 600px) {
  .cal-grid { grid-template-columns: repeat(2, 1fr); }
}
.cal-month-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.cal-month-card.current { border-color: var(--gold-dim); background: color-mix(in srgb, var(--surface) 85%, var(--gold-dim) 15%); }
.cal-month-header {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  gap: 4px;
}
.cal-disc-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 0;
  cursor: pointer;
  border-radius: 4px;
}
.cal-disc-item:hover { opacity: 0.8; }
.cal-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.cal-cat-dot[data-cat="wildlife"]            { background: #7ecba3; }
.cal-cat-dot[data-cat="hiking"]              { background: #b8820a; }
.cal-cat-dot[data-cat="unique-stay"]         { background: #8b7fd4; }
.cal-cat-dot[data-cat="activity"]            { background: #e87d4a; }
.cal-cat-dot[data-cat="destination"]         { background: #5b9bd5; }
.cal-cat-dot[data-cat="cultural"]            { background: #c7956c; }
.cal-cat-dot[data-cat="natural-phenomenon"]  { background: #e85d75; }

/* ── Travel hub ── */
.hub-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 500px) { .hub-nav-grid { grid-template-columns: repeat(2, 1fr); } }

.hub-nav-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.hub-nav-card:hover { border-color: var(--gold-dim); background: var(--surface-el); }
.hub-nav-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.hub-nav-label { font-size: 0.84rem; font-weight: 600; color: var(--text); line-height: 1.2; }

/* ── Travel sub-nav ── */
.travel-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.subnav-back {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 10px 4px 0;
  border-right: 1px solid var(--border);
  margin-right: 6px;
  white-space: nowrap;
}
.subnav-back:hover { color: var(--text); }
.subnav-items {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1;
}
.subnav-item {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s;
}
.subnav-item:hover { background: var(--surface-el); color: var(--text); }
.subnav-item.active { background: var(--surface-el); color: var(--gold); font-weight: 600; }
