/* ─────────────────────────────────────────────────────────
   LIVE LIFE HAPPY — Main Stylesheet
   Design System: Josefin Sans (logo) + Fraunces (display) + Inter (UI)
   Palette: Cool monochrome — #FAFAFA bg, #0D0D0D ink
───────────────────────────────────────────────────────── */

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

:root {
  --bg:      #FAFAFA;
  --surface: #FFFFFF;
  --sf2:     #F3F3F3;
  --ink:     #0D0D0D;
  --ink2:    #3A3A3A;
  --ink3:    #888888;
  --ink4:    #C0C0C0;
  --line:    #E4E4E4;
  --line2:   #EFEFEF;

  --serif: 'Fraunces', Georgia, serif;
  --logo:  'Josefin Sans', sans-serif;
  --sans:  'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --px:   20px;
  --max:  1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 68px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--sans); border: none; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--px); }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

/* ── REVEAL ── */
.r { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.r.v { opacity: 1; transform: none; }

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 56px; display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s;
}
.site-header.scrolled {
  background: rgba(250,250,250,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--px);
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 768px) { .header-inner { padding: 0 40px; } }

.logo {
  font-family: var(--logo);
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: opacity .2s;
}
.logo:hover { opacity: .6; }

.desk-nav { display: none; gap: 28px; }
@media (min-width: 768px) { .desk-nav { display: flex; } }
.desk-nav a { font-size: 13px; font-weight: 400; color: var(--ink3); letter-spacing: .01em; transition: color .15s; }
.desk-nav a:hover { color: var(--ink); }

.header-right { display: flex; align-items: center; gap: 2px; }

.ib {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; color: var(--ink2); transition: background .15s, color .15s;
}
.ib:hover { background: var(--sf2); color: var(--ink); }
.ib svg { width: 18px; height: 18px; }

.ham { display: flex; flex-direction: column; gap: 5px; padding: 9px; }
.ham span { display: block; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: all .25s; }
.ham.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 768px) { .ham { display: none; } }

/* Drawer */
.drawer {
  display: none; position: fixed; inset: 0; z-index: 290;
  background: var(--bg); flex-direction: column;
  padding: 76px 28px 32px;
}
.drawer.open { display: flex; animation: dfade .18s ease; }
@keyframes dfade { from { opacity: 0; } to { opacity: 1; } }
.drawer a {
  font-family: var(--serif); font-size: 34px; font-weight: 300;
  color: var(--ink); padding: 16px 0; border-bottom: 1px solid var(--line2);
  transition: color .15s;
}
.drawer a:hover { color: var(--ink3); }

/* ─────────────────────────────────────────────────────────
   BOTTOM NAV
───────────────────────────────────────────────────────── */
.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(250,250,250,.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 4px 0 env(safe-area-inset-bottom, 6px);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 0; color: var(--ink4);
  font-size: 9.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  transition: color .15s; -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.bn-item.active, .bn-item:hover { color: var(--ink); }
.bn-item svg { width: 20px; height: 20px; stroke-width: 1.6; }

/* ─────────────────────────────────────────────────────────
   HERO (homepage)
───────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px var(--px) 96px; text-align: center;
  background: var(--bg); position: relative; margin-top: 0;
}

.hero-label {
  font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink4); margin-bottom: 44px;
}

.quote-stage {
  width: 100%; max-width: 660px; overflow: hidden;
  margin-bottom: 28px; touch-action: pan-y; cursor: grab;
}
.quote-stage:active { cursor: grabbing; }
.quote-track { display: flex; transition: transform .42s var(--ease); will-change: transform; }
.quote-slide { flex: 0 0 100%; padding: 0 4px; display: flex; flex-direction: column; align-items: center; }

.q-open {
  font-family: var(--serif); font-size: 80px; font-weight: 300;
  line-height: .5; color: var(--line2); user-select: none; margin-bottom: 12px;
}
.quote-text {
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 300; font-style: italic;
  line-height: 1.52; color: var(--ink);
  margin-bottom: 18px; letter-spacing: -.01em;
}
.quote-author {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink3);
}

.dots { display: flex; gap: 7px; margin-bottom: 28px; }
.dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--line2);
  transition: background .15s, transform .15s; padding: 0;
}
.dot.active { background: var(--ink); transform: scale(1.3); }

.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.act-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  padding: 9px 16px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink2); transition: all .15s; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
}
.act-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.act-btn:hover { border-color: var(--ink3); color: var(--ink); }
.act-btn.saved { background: var(--ink); color: #fff; border-color: var(--ink); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--ink4); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  animation: nudge 2.8s ease-in-out infinite; pointer-events: none;
}
.scroll-hint svg { width: 16px; height: 16px; }
@keyframes nudge {
  0%,100% { opacity: .35; transform: translateX(-50%) translateY(0); }
  50% { opacity: .9; transform: translateX(-50%) translateY(6px); }
}

/* ─────────────────────────────────────────────────────────
   TOPIC BAR
───────────────────────────────────────────────────────── */
.topic-bar {
  position: sticky; top: 56px; z-index: 100;
  background: rgba(250,250,250,.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topic-scroll {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 9px 20px; scrollbar-width: none;
}
.topic-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .topic-scroll { padding: 9px 40px; } }
.topic-pill {
  flex-shrink: 0; font-size: 12px; font-weight: 500;
  padding: 7px 14px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink3);
  transition: all .15s; white-space: nowrap; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.topic-pill:hover, .topic-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ─────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────── */
section { padding: 64px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; }
.sec-title {
  font-family: var(--serif); font-size: clamp(24px, 3vw, 34px);
  font-weight: 400; letter-spacing: -.02em; color: var(--ink);
}
.see-all { font-size: 12px; font-weight: 500; color: var(--ink3); letter-spacing: .02em; transition: color .15s; white-space: nowrap; margin-left: 16px; }
.see-all:hover { color: var(--ink); }

/* ─────────────────────────────────────────────────────────
   QUOTE LIST (numbered rows)
───────────────────────────────────────────────────────── */
.quote-list { display: flex; flex-direction: column; }
.quote-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 0; border-bottom: 1px solid var(--line2);
}
.quote-row:first-child { border-top: 1px solid var(--line2); }
.qr-num {
  font-family: var(--serif); font-size: 11px; font-weight: 300; font-style: italic;
  color: var(--ink4); min-width: 24px; padding-top: 3px;
}
.qr-body { flex: 1; }
.qr-text { font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.6; color: var(--ink2); margin-bottom: 5px; }
.qr-meta { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.qr-meta a { color: var(--ink3); transition: color .15s; }
.qr-meta a:hover { color: var(--ink); }
.qr-actions { display: flex; gap: 2px; flex-shrink: 0; padding-top: 2px; }
.qrb {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; color: var(--ink4); transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.qrb:hover { background: var(--sf2); color: var(--ink); }
.qrb svg { width: 15px; height: 15px; }
.qrb.saved { color: var(--ink); }

.load-more-wrap { text-align: center; margin-top: 32px; }
.load-more-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; padding: 11px 24px;
  border-radius: 6px; border: 1px solid var(--line);
  color: var(--ink2); transition: all .15s;
}
.load-more-btn:hover { border-color: var(--ink3); color: var(--ink); }

/* ─────────────────────────────────────────────────────────
   QUOTE CARDS (grid)
───────────────────────────────────────────────────────── */
.quote-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 500px) { .quote-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px) { .quote-grid { grid-template-columns: repeat(3, 1fr); } }

.quote-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.quote-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); transform: translateY(-1px); }
.quote-card-link { display: flex; flex-direction: column; gap: 10px; flex: 1; text-decoration: none; }
.quote-card-tag { font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.quote-card-text { font-family: var(--serif); font-size: 17px; font-weight: 300; font-style: italic; line-height: 1.55; color: var(--ink); flex: 1; letter-spacing: -.005em; }
.quote-card-author { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }

.quote-card-actions { display: flex; gap: 4px; margin-top: 4px; }
.qca {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 5px; color: var(--ink4); transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.qca:hover { background: var(--sf2); color: var(--ink); }
.qca svg { width: 14px; height: 14px; }
.qca.saved { color: var(--ink); }

/* ─────────────────────────────────────────────────────────
   CATEGORY CARDS
───────────────────────────────────────────────────────── */
.cat-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 520px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

.cat-card {
  padding: 20px 16px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, box-shadow .2s, transform .2s;
  -webkit-tap-highlight-color: transparent; text-decoration: none;
}
.cat-card:hover { border-color: var(--ink3); box-shadow: 0 4px 12px rgba(0,0,0,.06); transform: translateY(-1px); }
.cat-name { font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--ink); letter-spacing: -.01em; }
.cat-count { font-size: 11px; font-weight: 400; color: var(--ink3); }

.cat-grid-large { display: grid; gap: 12px; }
@media (min-width: 560px) { .cat-grid-large { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .cat-grid-large { grid-template-columns: repeat(3, 1fr); } }
.cat-card-large {
  padding: 24px 20px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); display: flex; flex-direction: column; gap: 8px;
  transition: all .2s; text-decoration: none;
}
.cat-card-large:hover { border-color: var(--ink3); box-shadow: 0 4px 16px rgba(0,0,0,.07); transform: translateY(-1px); }
.cat-card-large .cat-name { font-size: 18px; }
.cat-desc { font-size: 13px; color: var(--ink3); line-height: 1.6; flex: 1; }
.cat-card-large .cat-count { font-size: 12px; font-weight: 500; color: var(--ink2); }

/* ─────────────────────────────────────────────────────────
   DARK STRIP
───────────────────────────────────────────────────────── */
.dark-strip {
  background: var(--ink); padding: 72px var(--px); text-align: center;
}
.dark-label { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.3); display: block; margin-bottom: 28px; }
.dark-strip blockquote {
  font-family: var(--serif); font-size: clamp(21px, 3.8vw, 38px);
  font-weight: 300; font-style: italic;
  color: #fff; line-height: 1.52; max-width: 720px; margin: 0 auto 18px; letter-spacing: -.01em;
}
.dark-strip cite { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.35); font-style: normal; }

/* ─────────────────────────────────────────────────────────
   STORIES
───────────────────────────────────────────────────────── */
.stories-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .stories-grid { grid-template-columns: repeat(3, 1fr); } }

.story-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--surface); text-decoration: none; display: block;
  transition: box-shadow .2s, transform .2s;
}
.story-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); transform: translateY(-2px); }
.story-img {
  aspect-ratio: 16/9; background: var(--sf2);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
}
.story-img span {
  font-family: var(--serif); font-size: 13px; font-style: italic;
  color: var(--ink3); line-height: 1.5;
}
.story-body { padding: 18px; }
.story-tag { font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); display: block; margin-bottom: 7px; }
.story-title { font-family: var(--serif); font-size: 16px; font-weight: 400; color: var(--ink); line-height: 1.45; margin-bottom: 7px; letter-spacing: -.01em; }
.story-excerpt { font-size: 13px; color: var(--ink3); line-height: 1.6; }

/* ─────────────────────────────────────────────────────────
   NEWSLETTER
───────────────────────────────────────────────────────── */
.newsletter-section {
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 64px var(--px); text-align: center;
}
.nl-label { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); display: block; margin-bottom: 14px; }
.nl-title { font-family: var(--serif); font-size: clamp(24px, 3.5vw, 38px); font-weight: 400; letter-spacing: -.02em; margin-bottom: 10px; color: var(--ink); }
.nl-desc { font-size: 14px; color: var(--ink3); max-width: 380px; margin: 0 auto 28px; line-height: 1.7; }
.nl-form { display: flex; flex-direction: column; gap: 10px; max-width: 400px; margin: 0 auto; }
@media (min-width: 460px) { .nl-form { flex-direction: row; } }
.nl-input { flex: 1; font-family: var(--sans); font-size: 14px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); outline: none; transition: border-color .15s; }
.nl-input::placeholder { color: var(--ink4); }
.nl-input:focus { border-color: var(--ink3); }
.nl-submit { font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 11px 22px; background: var(--ink); color: #fff; border-radius: 6px; white-space: nowrap; transition: opacity .15s; letter-spacing: .02em; }
.nl-submit:hover { opacity: .8; }
.nl-note { font-size: 11px; color: var(--ink4); margin-top: 8px; }

/* ─────────────────────────────────────────────────────────
   PAGE HERO (inner pages)
───────────────────────────────────────────────────────── */
.page-hero {
  padding: 96px var(--px) 48px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-title { font-family: var(--serif); font-size: clamp(32px, 5vw, 52px); font-weight: 300; letter-spacing: -.02em; margin-bottom: 10px; }
.page-desc { font-size: 15px; color: var(--ink3); max-width: 560px; line-height: 1.7; }

/* ─────────────────────────────────────────────────────────
   QUOTE PAGE
───────────────────────────────────────────────────────── */
.quote-page { padding-top: 56px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink3);
  padding: 20px var(--px);
  max-width: var(--max); margin: 0 auto;
}
@media (min-width: 768px) { .breadcrumb { padding: 20px 40px; } }
.breadcrumb a { color: var(--ink3); transition: color .15s; }
.breadcrumb a:hover { color: var(--ink); }

.qp-hero {
  text-align: center;
  padding: 48px var(--px) 56px;
  max-width: 800px; margin: 0 auto;
}
.qp-category-tag a {
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink3); border: 1px solid var(--line); padding: 5px 12px; border-radius: 4px;
  transition: all .15s; display: inline-block; margin-bottom: 28px;
}
.qp-category-tag a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.qp-open { font-family: var(--serif); font-size: 80px; font-weight: 300; line-height: .5; color: var(--line2); user-select: none; margin-bottom: 12px; }
.qp-text { font-family: var(--serif); font-size: clamp(22px, 4vw, 40px); font-weight: 300; font-style: italic; line-height: 1.5; color: var(--ink); margin-bottom: 20px; letter-spacing: -.01em; }
.qp-author { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); font-style: normal; display: block; margin-bottom: 32px; }
.qp-author a { color: var(--ink3); transition: color .15s; }
.qp-author a:hover { color: var(--ink); }
.qp-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.qp-reflection {
  padding: 48px var(--px);
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) { .qp-reflection { padding: 56px 40px; } }
.qp-reflection h2 { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 16px; letter-spacing: -.01em; }
.qp-reflection p { font-size: 15px; color: var(--ink2); line-height: 1.75; max-width: 700px; margin-bottom: 14px; }
.qp-reflection a { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color .15s; }
.qp-reflection a:hover { border-color: var(--ink); }

.qp-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--px) 48px; }
@media (min-width: 768px) { .qp-tags { padding: 0 40px 56px; } }
.tag-chip {
  font-size: 11px; font-weight: 500; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 4px; color: var(--ink3);
  transition: all .15s; text-decoration: none;
}
.tag-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.qp-related { padding-top: 0; }

/* ─────────────────────────────────────────────────────────
   AUTHORS
───────────────────────────────────────────────────────── */
.authors-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .authors-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .authors-grid { grid-template-columns: repeat(4, 1fr); } }

.author-card {
  padding: 18px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); text-decoration: none; display: flex; flex-direction: column; gap: 4px;
  transition: all .2s;
}
.author-card:hover { border-color: var(--ink3); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.author-name { font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--ink); }
.author-count { font-size: 11px; color: var(--ink3); }

/* ─────────────────────────────────────────────────────────
   SAVED SECTION
───────────────────────────────────────────────────────── */
.saved-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.saved-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.saved-chip {
  font-family: var(--serif); font-size: 13px; font-style: italic;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink2);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: border-color .15s;
}
.saved-chip:hover { border-color: var(--ink3); }

/* ─────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 36px; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 620px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand .logo { font-size: 12px; display: block; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--ink3); line-height: 1.7; max-width: 230px; }
.footer-col h4 { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 13px; color: var(--ink2); transition: color .15s; }
.footer-col ul li a:hover { color: var(--ink); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 460px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-bottom p, .footer-bottom a { font-size: 12px; color: var(--ink4); }
.footer-bottom a:hover { color: var(--ink3); }
.footer-links { display: flex; gap: 16px; }

/* ─────────────────────────────────────────────────────────
   TOAST
───────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%);
  z-index: 500; font-size: 12px; font-weight: 500; padding: 9px 18px;
  background: var(--ink); color: #fff; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap;
}
.toast.show { opacity: 1; }
@media (min-width: 768px) { .toast { bottom: 28px; } }

/* ─────────────────────────────────────────────────────────
   QUOTE COUNT
───────────────────────────────────────────────────────── */
.quote-count { font-size: 13px; color: var(--ink3); }

/* ─────────────────────────────────────────────────────────
   ARTICLES / STORIES
───────────────────────────────────────────────────────── */

/* Stories intro section */
.stories-intro { padding: 32px 0 0; }
.prose p {
  font-family: var(--sans); font-size: 16px; line-height: 1.75;
  color: var(--ink2); margin-bottom: 18px; max-width: 700px;
}
.prose p:last-child { margin-bottom: 0; }

/* Stories grid — listing page */
.stories-grid-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 40px 0 0;
}
@media (min-width: 640px) {
  .stories-grid-full { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .stories-grid-full { grid-template-columns: repeat(3, 1fr); }
}

/* Story card — listing */
.story-card-full {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 24px; text-decoration: none;
  color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.story-card-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
}
.story-cat {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink3);
}
.story-title {
  font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.3;
  color: var(--ink);
}
.story-desc {
  font-family: var(--sans); font-size: 14px; line-height: 1.65; color: var(--ink2);
  flex: 1;
}
.story-cta {
  font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink3);
  margin-top: 4px;
}

/* Story card — compact (used in related section) */
.stories-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; padding-top: 32px;
}
@media (min-width: 640px) { .stories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .stories-grid { grid-template-columns: repeat(3, 1fr); } }

.story-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px; text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Article body */
.article-body { padding: 48px 0 64px; }
.article-content {
  max-width: 680px; margin: 0 auto;
  font-family: var(--sans); font-size: 17px; line-height: 1.8; color: var(--ink2);
}
.article-content h2 {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  color: var(--ink); margin: 40px 0 16px; line-height: 1.3;
}
.article-content h3 {
  font-family: var(--serif); font-weight: 400; font-size: 20px;
  color: var(--ink); margin: 32px 0 12px;
}
.article-content p { margin-bottom: 20px; }
.article-content p:last-child { margin-bottom: 0; }
.article-content strong { font-weight: 600; color: var(--ink); }
.article-content em { font-style: italic; color: var(--ink3); }
.article-content blockquote {
  margin: 32px 0; padding: 20px 24px; border-left: 3px solid var(--line);
  background: var(--sf2); border-radius: 0 8px 8px 0;
  font-family: var(--serif); font-size: 19px; font-weight: 300;
  font-style: italic; color: var(--ink2); line-height: 1.6;
}
.article-content ul, .article-content ol {
  margin: 0 0 20px 24px; display: flex; flex-direction: column; gap: 8px;
}
.article-content li { line-height: 1.7; }
.article-content hr {
  border: none; border-top: 1px solid var(--line); margin: 40px 0;
}

/* Article byline / category on page-hero */
.article-category {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink3);
  margin-bottom: 8px;
}
.article-byline {
  font-family: var(--sans); font-size: 13px; color: var(--ink3); margin-top: 8px;
}

/* Article actions (copy/share) */
.article-actions {
  display: flex; gap: 10px; padding-top: 32px; margin-top: 40px;
  border-top: 1px solid var(--line); max-width: 680px; margin-left: auto; margin-right: auto;
}

/* Stories CTA block */
.cta-block { text-align: center; padding: 40px 0; }
.cta-desc {
  font-family: var(--sans); font-size: 16px; color: var(--ink2);
  margin: 16px auto 28px; max-width: 500px; line-height: 1.7;
}
.cta-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; padding: 12px 28px; background: var(--ink); color: #fff;
  border-radius: 7px; font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-secondary {
  display: inline-block; padding: 12px 28px; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; font-family: var(--sans);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: var(--ink); background: var(--sf2); }

/* Empty saved state */
.empty-saved {
  font-family: var(--sans); font-size: 15px; color: var(--ink3);
  text-align: center; padding: 60px 0; line-height: 1.8;
}

/* Search */
.search-empty {
  font-family: var(--sans); font-size: 15px; color: var(--ink3);
  text-align: center; padding: 40px 0;
}

/* ── MOOD SEARCH ─────────────────────────────────────────────────────────── */
.mood-section {
  padding: 64px 0 56px;
  background: var(--sf);
  border-bottom: 1px solid var(--line);
}
.mood-header { text-align: center; margin-bottom: 28px; }
.mood-title {
  font-family: var(--serif); font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 400; color: var(--ink); margin: 0 0 10px;
}
.mood-sub {
  font-family: var(--sans); font-size: 15px; color: var(--ink3);
  margin: 0; max-width: 460px; margin-inline: auto; line-height: 1.6;
}
.mood-input-wrap {
  display: flex; align-items: center; max-width: 540px; margin: 0 auto 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s;
}
.mood-input-wrap:focus-within {
  border-color: var(--ink2); box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.mood-input {
  flex: 1; padding: 16px 20px; font-family: var(--sans); font-size: 16px;
  color: var(--ink); background: transparent; border: none; outline: none;
}
.mood-input::placeholder { color: var(--ink4); }
.mood-search-btn {
  padding: 0 20px; height: 100%; background: var(--ink); color: #fff;
  border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; min-width: 52px; min-height: 52px;
  transition: opacity .15s;
}
.mood-search-btn:hover { opacity: .85; }
.mood-search-btn svg { width: 18px; height: 18px; stroke: #fff; }

/* Mood chips */
.mood-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 600px; margin: 0 auto 32px;
}
.mood-chip {
  padding: 7px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--sans); font-size: 13px; color: var(--ink2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.mood-chip:hover, .mood-chip.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

/* Results */
.mood-results {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.mood-result-row {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface); border: 1px solid var(--line2);
  border-radius: 8px; padding: 16px 20px;
  animation: moodFadeIn .3s ease both;
}
@keyframes moodFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mrr-body { flex: 1; min-width: 0; }
.mrr-text {
  font-family: var(--serif); font-size: 16px; font-style: italic;
  font-weight: 300; color: var(--ink); line-height: 1.6; margin: 0 0 6px;
}
.mrr-author {
  font-family: var(--sans); font-size: 13px; color: var(--ink3);
}
.mrr-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.mrr-link {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: .05em;
  text-transform: uppercase; white-space: nowrap;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px;
  transition: background .12s, border-color .12s;
}
.mrr-link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.mood-loading, .mood-empty {
  text-align: center; max-width: 700px; margin: 12px auto 0;
  font-family: var(--sans); font-size: 15px; color: var(--ink3);
}
.mood-loading span {
  display: inline-flex; align-items: center; gap: 8px;
}
.mood-loading span::after {
  content: ''; display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--line); border-top-color: var(--ink3);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mood-empty a { color: var(--ink); text-decoration: underline; }

@media (max-width: 600px) {
  .mood-section { padding: 48px 0 40px; }
  .mood-result-row { flex-direction: column; gap: 12px; }
  .mrr-actions { align-self: flex-start; }
  .mood-chips { gap: 6px; }
  .mood-chip { font-size: 12px; padding: 6px 12px; }
}

/* ── QUOTE CARD PREVIEW (on quote pages) ────────────────────────────────── */
.qp-card-preview {
  padding: 40px 0 0;
  text-align: center;
}
.qp-card-label {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink3);
  margin: 0 0 20px;
}
.qp-card-wrap {
  max-width: 320px; margin: 0 auto 16px;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.qp-card-img {
  display: block; width: 100%; height: auto;
}
.qp-card-hint {
  font-family: var(--sans); font-size: 13px; color: var(--ink3);
  margin: 0; line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — comprehensive layout & alignment pass
   Tested viewport: 320px – 768px
═══════════════════════════════════════════════════════════ */

/* ── Prevent horizontal scroll ─────────────────────────── */
html, body { overflow-x: hidden; }

/* ── Word-break for very long quotes ───────────────────── */
.quote-text, .qp-text, .quote-card-text, .mrr-text,
.dark-strip blockquote, .story-title, .story-card .story-title {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── iOS input zoom prevention (font-size ≥ 16px on mobile) */
@media (max-width: 767px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ── HEADER ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Ensure logo doesn't overflow with very long site name */
  .logo { font-size: 11px; letter-spacing: 0.24em; }
  .header-inner { gap: 8px; }
}

/* ── HERO ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero { padding: 72px var(--px) 80px; }
  .hero-label { margin-bottom: 32px; }
  .q-open { font-size: 60px; }
  /* Tighter action buttons on small screens */
  .hero-actions { gap: 6px; }
  .act-btn { padding: 9px 12px; font-size: 11px; gap: 5px; }
  .act-btn svg { width: 13px; height: 13px; }
}

/* ── TOPIC BAR ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .topic-pill { font-size: 11px; padding: 6px 11px; }
}

/* ── SECTION HEADER ─────────────────────────────────────── */
@media (max-width: 440px) {
  /* Prevent title + see-all from colliding on narrow screens */
  .sec-header { flex-wrap: wrap; gap: 4px; align-items: flex-start; }
  .see-all { margin-left: 0; align-self: flex-end; }
  .sec-title { font-size: clamp(20px, 7vw, 28px); }
}

/* ── QUOTE LIST ROWS ────────────────────────────────────── */
@media (max-width: 400px) {
  .quote-row { gap: 10px; padding: 16px 0; }
  .qr-text { font-size: 15px; }
  /* Hide action buttons on very small screens to save space */
  .qr-actions { display: none; }
}

/* ── QUOTE CARDS ────────────────────────────────────────── */
@media (max-width: 499px) {
  /* Single column below 500px (grid already handles 2col at 500+) */
  .quote-card { padding: 18px 16px 14px; }
  .quote-card-text { font-size: 16px; }
}

/* ── DARK STRIP ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .dark-strip { padding: 56px var(--px); }
}

/* ── NEWSLETTER ─────────────────────────────────────────── */
@media (max-width: 459px) {
  .newsletter-section { padding: 52px var(--px); }
  .nl-submit { width: 100%; padding: 13px; justify-content: center; }
}

/* ── PAGE HERO (inner pages) ────────────────────────────── */
@media (max-width: 767px) {
  .page-hero { padding: 80px var(--px) 36px; }
  .page-title { font-size: clamp(26px, 8vw, 42px); }
  .page-desc { font-size: 14px; }
  /* Breadcrumb: hide middle steps on very narrow */
  .breadcrumb { gap: 5px; padding: 16px var(--px); font-size: 11px; }
}

/* ── QUOTE PAGE ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .qp-hero { padding: 36px var(--px) 44px; }
  .qp-text { font-size: clamp(19px, 5.5vw, 34px); }
  .qp-actions { gap: 6px; justify-content: center; }
  .qp-actions .act-btn { padding: 9px 12px; font-size: 11px; }
  .qp-reflection { padding: 36px var(--px); }
  .qp-tags { padding: 0 var(--px) 40px; }
  .qp-card-wrap { max-width: 100%; }
}

/* ── AUTHOR PAGE ────────────────────────────────────────── */
@media (max-width: 400px) {
  .authors-grid { grid-template-columns: 1fr; }
}

/* ── ARTICLE BODY ───────────────────────────────────────── */
@media (max-width: 767px) {
  .article-body { padding: 36px 0 52px; }
  .article-content { font-size: 16px; line-height: 1.75; }
  .article-content h2 { font-size: 21px; margin: 32px 0 12px; }
  .article-content h3 { font-size: 18px; }
  .article-content blockquote {
    padding: 16px 18px; font-size: 17px;
    margin: 24px 0;
  }
  .article-actions { gap: 8px; padding-top: 24px; margin-top: 32px; }
}

/* ── CATEGORY PAGE ──────────────────────────────────────── */
@media (max-width: 380px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { padding: 16px 14px 13px; }
}

/* ── FOOTER ─────────────────────────────────────────────── */
@media (max-width: 619px) {
  .site-footer { padding: 44px 0 28px; }
  .footer-grid { gap: 28px; }
  .footer-brand p { max-width: 100%; }
  /* Stack footer columns cleanly */
  .footer-col { min-width: 120px; }
}
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { gap: 6px; }
  .footer-links { gap: 12px; }
}

/* ── BOTTOM NAV — safe area on iPhone home bar ──────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  @media (min-width: 768px) { body { padding-bottom: 0; } }
}

/* ── TOAST position above bottom nav on mobile ──────────── */
@media (max-width: 767px) {
  .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ── ABOUT PAGE STAT ROW ────────────────────────────────── */
@media (max-width: 480px) {
  .about-stat-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .about-stat { padding: 16px 10px; }
  .about-stat-num { font-size: 26px; }
  .about-stat-label { font-size: 10px; letter-spacing: 0.08em; }
}

/* ── CONTACT PAGE ───────────────────────────────────────── */
@media (max-width: 767px) {
  .contact-page { padding: 80px var(--px) 60px; }
  .contact-form { padding: 24px 20px; }
  /* CAPTCHA question + input + button in a tighter row */
  .captcha-math { flex-wrap: wrap; gap: 8px; }
  .captcha-question { font-size: 18px; }
}

/* ── MOOD SEARCH ────────────────────────────────────────── */
@media (max-width: 480px) {
  .mood-input { padding: 14px 16px; font-size: 15px; }
  .mood-search-btn { min-width: 48px; min-height: 50px; }
  .mood-result-row { flex-direction: column; gap: 10px; padding: 14px 16px; }
  .mrr-actions { width: 100%; justify-content: flex-start; }
}

/* ── 404 PAGE ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .not-found { padding: 80px var(--px) 60px; }
  .nf-actions { flex-direction: column; align-items: center; }
  .nf-btn { width: 100%; max-width: 280px; text-align: center; display: block; padding: 13px 24px; }
}

/* ── PRIVACY / ABOUT TEXT PAGES ─────────────────────────── */
@media (max-width: 767px) {
  .about-page, .privacy-page { padding: 80px var(--px) 60px; }
  .about-page ul, .privacy-page ul { padding-left: 18px; }
}
