/* ============================================================
   Kellness Hub — Glassmorphism Reader
   - Light pastel mesh background
   - Frosted glass surfaces (cards, chips, header, mega-menu)
   - Two-row chip filter (categories + tags) for one-shot filtering
   - Bento, carousel, post detail, tag/category landing
   ============================================================ */

:root {
  --bg-base:     #fbf8f3;
  --text:        #1f2d24;
  --text-dim:    #4d5e51;
  --text-mute:   #7c8b80;
  --text-inv:    #ffffff;
  --accent:      #4a7c59;
  --accent-2:    #6fa074;
  --accent-soft: rgba(74, 124, 89, 0.14);

  --glass-bg:        rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-bg-dark:   rgba(20, 30, 25, 0.55);
  --glass-border:    rgba(255, 255, 255, 0.55);
  --glass-shadow:    0 8px 32px rgba(20, 35, 25, 0.08);
  --glass-shadow-lg: 0 18px 48px rgba(20, 35, 25, 0.14);

  /* Pastel tints for card colorways (used as semi-transparent overlays) */
  --c-sage:     rgba(174, 213, 142, 0.45);
  --c-cream:    rgba(241, 213, 156, 0.45);
  --c-lavender: rgba(189, 162, 230, 0.40);
  --c-peach:    rgba(245, 173, 137, 0.40);
  --c-sky:      rgba(140, 184, 220, 0.40);
  --c-mint:     rgba(160, 214, 187, 0.42);
  --c-sand:     rgba(216, 184, 138, 0.38);
  --c-rose:     rgba(236, 168, 168, 0.38);

  --header-h:   60px;
  --chip-row-h: 44px;
  --max-w:      1280px;
  --radius-lg:  22px;
  --radius-md:  16px;
  --radius-sm:  10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard",
               "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mesh gradient background — gives glassmorphism something to refract */
body::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -2;
  background:
    radial-gradient(at 12% 18%, rgba(216, 230, 205, 0.55), transparent 50%),
    radial-gradient(at 88% 22%, rgba(243, 230, 207, 0.55), transparent 50%),
    radial-gradient(at 50% 50%, rgba(227, 217, 240, 0.40), transparent 60%),
    radial-gradient(at 18% 80%, rgba(160, 214, 187, 0.40), transparent 55%),
    radial-gradient(at 82% 88%, rgba(214, 228, 238, 0.55), transparent 55%);
  filter: saturate(115%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(251, 248, 243, 0.0) 0%, rgba(251, 248, 243, 0.6) 100%);
  pointer-events: none;
}

button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.icon { width: 16px; height: 16px; vertical-align: -3px; flex: 0 0 auto; }
.hidden { display: none !important; }
img { max-width: 100%; display: block; }

.reader { min-height: 100vh; display: flex; flex-direction: column; }

/* ============================================================
   Glass surface utility
   ============================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* ============================================================
   Header (sticky, glass)
   ============================================================ */
.r-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.62);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 0 rgba(20, 35, 25, 0.04);
}
.r-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.r-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -0.3px; flex: 0 0 auto; }
.r-logo-mark { color: var(--accent); font-size: 20px; }

.r-nav { display: flex; gap: 2px; flex: 1; margin-left: 10px; position: relative; }
/* Always-rendered invisible hover bridge below the nav row.
   The previous .r-mega::before approach failed because pseudo-elements
   of a display:none parent are NOT rendered — so when the menu was
   closed, there was no bridge to catch the cursor between nav and mega.
   Putting the bridge on .r-nav (which is always rendered) fixes this:
   cursor moves down → enters .r-nav::after → still hovering .r-nav
   → mega opens and stays open. */
.r-nav::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
}
.r-nav-link {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative;
  transition: background .14s, color .14s;
}
.r-nav-link:hover { background: var(--accent-soft); color: var(--text); }
.r-nav-link.active { background: var(--text); color: var(--bg-base); }
.r-nav-link .icon { width: 14px; height: 14px; }

/* Header mega-menu (hover) — drops directly into related tags */
.r-mega {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;            /* gap removed — kept open by ::before bridge */
  width: 880px; max-width: 92vw;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow-lg);
  padding: 14px;
  display: none;
  z-index: 60;
}
.r-nav:hover .r-mega,
.r-nav:focus-within .r-mega,
.r-mega:hover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.r-mega-col {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.r-mega-cat-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text);
  padding: 2px 6px;
  margin: 0 -6px 2px;
  border-radius: var(--radius-sm);
}
.r-mega-cat-link .icon { color: var(--accent); width: 16px; height: 16px; }
.r-mega-cat-link:hover { background: rgba(74, 124, 89, 0.10); color: var(--accent); }
.r-mega-short {
  font-size: 11.5px; color: var(--text-mute); margin: 0 0 8px;
  padding-left: 22px;
}
.r-mega-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.r-mega-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 35, 25, 0.06);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all .12s;
}
.r-mega-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-base);
}

/* Language switcher (small dropdown) */
.r-lang { position: relative; }
.r-lang summary {
  list-style: none; cursor: pointer;
  padding: 0 10px;
  width: auto;
  min-width: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.r-lang summary::-webkit-details-marker { display: none; }
.r-lang[open] summary { background: var(--accent-soft); color: var(--text); }
.r-lang-current { font-size: 13px; }
.r-lang-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 4px;
  min-width: 130px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow-lg);
  padding: 4px;
  z-index: 100;
}
.r-lang-item {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.r-lang-item:hover { background: rgba(255,255,255,0.7); }
.r-lang-item.active { background: var(--text); color: var(--bg-base); font-weight: 600; }

.r-header-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.r-icon-btn {
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: background .14s, color .14s;
}
.r-icon-btn:hover { background: var(--accent-soft); color: var(--text); }

/* ============================================================
   Two-row chip system (categories + tags)
   ============================================================ */
.r-chips-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(251, 248, 243, 0.55);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding: 6px 0;
}
.r-chips-row {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}
.r-chips {
  display: flex; gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 32px;
  align-items: center;
  height: var(--chip-row-h);
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
}
.r-chips::-webkit-scrollbar { display: none; }
.r-chip { scroll-snap-align: start; }

/* Glass chip */
.r-chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .14s ease;
  cursor: pointer;
}
.r-chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.95); }
.r-chip.active {
  background: var(--text);
  color: var(--bg-base);
  border-color: var(--text);
}
.r-chip .icon { width: 13px; height: 13px; opacity: 0.85; }
.r-chip-count {
  margin-left: 4px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-mute);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.r-chip.active .r-chip-count { background: rgba(255,255,255,0.18); color: var(--bg-base); }

/* Category chips slightly stronger */
.r-chip-cat { font-weight: 600; }
.r-chip-cat .icon { color: var(--accent); opacity: 1; }
.r-chip-cat.active .icon { color: var(--bg-base); }

/* Sliding arrows */
.r-chips-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(20, 35, 25, 0.08);
  transition: opacity .15s, background .15s, color .15s, transform .15s;
  opacity: 0;
  pointer-events: none;
}
.r-chips-arrow.prev { left: 0; }
.r-chips-arrow.next { right: 0; }
.r-chips-arrow.show { opacity: 1; pointer-events: auto; }
.r-chips-arrow:hover { background: var(--text); color: var(--bg-base); border-color: var(--text); }
.r-chips-arrow:active { transform: translateY(-50%) scale(0.94); }
.r-chips-arrow .icon { width: 13px; height: 13px; }

/* Active filter summary */
.r-filter-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6px 32px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--text-mute);
  border-top: 1px dashed rgba(20, 35, 25, 0.06);
}
.r-filter-bar.empty { display: none; }
.r-filter-bar .summary { font-weight: 500; color: var(--text-dim); }
.r-filter-clear {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

/* ============================================================
   Section heads
   ============================================================ */
.r-main { flex: 1; padding: 8px 0 60px; }
.r-section, .carousel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 8px;
}
.r-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.r-section-head h2,
.carousel-head h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin: 0;
}
.r-section-sub { color: var(--text-mute); font-size: 13px; }

/* ============================================================
   Bento grid (glass tiles with subtle color tint)
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 14px;
  grid-template-areas:
    "hero hero checkin meditation"
    "hero hero exercise meditation"
    "meal meal inspiration inspiration";
}
.bento-hero        { grid-area: hero; }
.bento-checkin     { grid-area: checkin; }
.bento-meditation  { grid-area: meditation; }
.bento-exercise    { grid-area: exercise; }
.bento-meal        { grid-area: meal; }
.bento-inspiration { grid-area: inspiration; }

.bento-item {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  color: var(--text);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.bento-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-lg);
}

/* Color-tinted glass: a soft pastel layer behind the glass */
.bento-item::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--tint, transparent);
}
.c-sage     { --tint: var(--c-sage); }
.c-cream    { --tint: var(--c-cream); }
.c-lavender { --tint: var(--c-lavender); }
.c-peach    { --tint: var(--c-peach); }
.c-sky      { --tint: var(--c-sky); }
.c-mint     { --tint: var(--c-mint); }
.c-sand     { --tint: var(--c-sand); }
.c-rose     { --tint: var(--c-rose); }

.bento-cat {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 8px;
}
.bento-cat .icon { width: 13px; height: 13px; }
.bento-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--text); }
.bento-title-lg { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.7px; line-height: 1.2; color: var(--text); }
.bento-summary { margin: 12px 0 0; font-size: 14px; color: var(--text-dim); line-height: 1.55; max-width: 92%; }
.bento-meta {
  margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
}
.bento-meta .icon { width: 12px; height: 12px; }
.bento-mark {
  position: absolute;
  right: -16px; bottom: -16px;
  width: 130px; height: 130px;
  color: rgba(20, 35, 25, 0.12);
  pointer-events: none;
}
.bento-hero .bento-mark { width: 200px; height: 200px; right: -32px; bottom: -32px; }

.quote {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 17px; font-style: italic; color: var(--text); line-height: 1.45;
}
.quote-attr { margin-top: 8px; font-size: 12px; color: var(--text-dim); }

/* ============================================================
   Carousels
   ============================================================ */
.carousel { padding-top: 24px; }
.carousel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.carousel-nav { display: flex; align-items: center; gap: 4px; }
.carousel-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(8px);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .14s;
}
.carousel-arrow:hover { background: var(--text); color: var(--bg-base); border-color: var(--text); }
.carousel-arrow .icon { width: 14px; height: 14px; }
.carousel-all {
  margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 4px;
}
.carousel-all:hover { color: var(--text); }
.carousel-all .icon { width: 12px; height: 12px; }

.carousel-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 14px;
  scrollbar-width: none;
}
.carousel-rail::-webkit-scrollbar { display: none; }

/* ============================================================
   Feed card (glass + image + hover overlay)
   ============================================================ */
.feed-card {
  position: relative;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.feed-card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-lg); }
.feed-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--tint, transparent);
  pointer-events: none;
}

.feed-art {
  flex: 1; position: relative; overflow: hidden;
  z-index: 1;
}
.feed-art img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.feed-card:hover .feed-art img { transform: scale(1.04); }
.feed-art-icon {
  position: absolute;
  right: -22px; bottom: -22px;
  width: 150px; height: 150px;
  color: rgba(20, 35, 25, 0.12);
}
.feed-art-icon.no-image {
  /* When there's no image, show centered icon on tinted glass */
  position: static;
  margin: auto;
  width: 80px; height: 80px;
  color: rgba(20, 35, 25, 0.32);
  opacity: 0.85;
}

.feed-body {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.feed-cat {
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px;
}
.feed-title {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 700; line-height: 1.35;
  letter-spacing: -0.2px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-meta {
  font-size: 12px; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 4px;
}
.feed-meta .icon { width: 12px; height: 12px; }

.feed-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(15, 25, 20, 0.4), rgba(15, 25, 20, 0.92));
  backdrop-filter: blur(8px);
  color: var(--text-inv);
  padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0;
  transform: translateY(12%);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.feed-card:hover .feed-overlay,
.feed-card:focus-within .feed-overlay,
.feed-card.tapped .feed-overlay {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.overlay-cat {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  font-weight: 700; color: rgba(255,255,255,0.78); margin-bottom: 6px;
}
.overlay-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.overlay-summary {
  margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.85);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.overlay-meta { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.overlay-meta .icon { width: 12px; height: 12px; }
.overlay-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.overlay-tag {
  font-size: 11px; background: rgba(255,255,255,0.18);
  padding: 2px 8px; border-radius: 999px; color: rgba(255,255,255,0.95);
}
.overlay-cta {
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; color: white;
}
.overlay-cta .icon { width: 13px; height: 13px; }

.feed-card.filtered-out { display: none; }

.r-empty { text-align: center; color: var(--text-mute); padding: 40px 24px; font-size: 14px; }
.r-meta { text-align: center; color: var(--text-mute); font-size: 12px; margin: 30px 0 10px; }

/* ============================================================
   Footer
   ============================================================ */
.r-footer {
  margin-top: 48px;
  padding: 36px 24px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.r-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}
.r-footer-brand {
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  display: inline-flex; align-items: center; gap: 6px;
}
.r-footer-cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.r-footer-cols h4 {
  margin: 0 0 10px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-mute); font-weight: 700;
}
.r-footer-cols a {
  display: block; font-size: 13.5px; color: var(--text-dim); padding: 3px 0;
}
.r-footer-cols a:hover { color: var(--text); }
.r-footer-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(20, 35, 25, 0.08);
  margin-top: 16px; padding-top: 16px;
  font-size: 12px; color: var(--text-mute); text-align: center;
}

/* ============================================================
   Post detail page
   ============================================================ */
.post-view .r-main { padding-bottom: 80px; }

.post-cover {
  position: relative;
  width: 100%;
  height: clamp(280px, 42vh, 480px);
  overflow: hidden;
  margin-bottom: -80px; /* the article frame slides up onto it */
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover-fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 25, 20, 0) 40%, rgba(251, 248, 243, 0.98) 100%);
}

.post-frame {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 28px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-lg);
  border-radius: var(--radius-lg);
}

.post-meta-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 8px;
}
.post-cat-pill {
  background: var(--accent);
  color: var(--bg-base);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.post-cat { color: var(--text-dim); font-weight: 500; }
.post-meta-sep { color: var(--text-mute); }

.post-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin: 6px 0 12px;
  color: var(--text);
}
.post-summary {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 24px;
  font-weight: 400;
}

.post-byline {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(20, 35, 25, 0.08);
  border-bottom: 1px solid rgba(20, 35, 25, 0.08);
  padding: 14px 0;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}
.post-author { display: flex; align-items: center; gap: 10px; }
.post-author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.post-author-avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.post-author-name { font-weight: 700; color: var(--text); font-size: 14px; }
.post-author-title { font-size: 12px; color: var(--text-mute); }
.post-meta-right { display: inline-flex; gap: 6px; align-items: center; }
.post-meta-right .icon { width: 13px; height: 13px; }

/* Body content (article prose) */
.post-body {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text);
}
.post-body > * + * { margin-top: 14px; }
.post-body h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.3px;
  margin: 36px 0 12px;
  color: var(--text);
  scroll-margin-top: 120px;
}
.post-body h3 {
  font-size: 18px; font-weight: 700;
  margin: 28px 0 10px;
}
.post-body p { margin: 0 0 12px; }
.post-body ul, .post-body ol { margin: 12px 0 14px; padding-left: 24px; }
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body em { font-style: italic; color: var(--text-dim); }
.post-body a {
  color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.post-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}
.post-body table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm); overflow: hidden;
  font-size: 14.5px;
}
.post-body th, .post-body td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid rgba(20, 35, 25, 0.08);
}
.post-body th {
  background: rgba(74, 124, 89, 0.08);
  font-weight: 700; font-size: 13px;
  color: var(--text);
}
.post-body img {
  border-radius: var(--radius-md);
  margin: 18px 0;
  width: 100%;
  height: auto;
}
.post-body figcaption {
  font-size: 12.5px; color: var(--text-mute);
  text-align: center; margin-top: -10px;
}

/* TLDR / answer-block (AEO friendly) */
.post-tldr {
  margin: 0 0 22px;
  padding: 16px 18px;
  background: rgba(74, 124, 89, 0.08);
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: var(--radius-md);
}
.post-tldr-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--accent); font-weight: 700; margin-bottom: 6px;
}
.post-tldr-body {
  font-size: 15px; color: var(--text); line-height: 1.6; margin: 0;
}

/* FAQ block */
.post-faq {
  margin-top: 36px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.post-faq h2 {
  margin: 0 0 16px;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.post-faq details {
  border-top: 1px solid rgba(20, 35, 25, 0.08);
  padding: 12px 0;
}
.post-faq details:first-of-type { border-top: 0; }
.post-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 4px 0;
  color: var(--text);
  list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.post-faq summary::before {
  content: "Q.";
  color: var(--accent); font-weight: 800;
}
.post-faq details[open] summary { color: var(--accent); }
.post-faq details > p {
  margin: 8px 0 4px 22px;
  font-size: 14.5px; color: var(--text-dim);
  line-height: 1.65;
}

/* Tags + share row */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 24px; }

/* Author card */
.post-author-card {
  display: flex; gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}
.post-author-card .post-author-bio {
  margin: 6px 0 0;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.55;
}

/* Related */
.post-related-title { font-size: 18px; margin: 8px 0 14px; letter-spacing: -0.3px; }
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.post-related-grid .feed-card { height: 280px; }

/* ============================================================
   Tag / Category landing pages
   ============================================================ */
.tag-hero, .category-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 12px;
}
.tag-hero-inner, .category-hero-inner {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--glass-shadow);
}
.tag-hero-cat, .category-hero-cat {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--accent); font-weight: 700; margin-bottom: 6px;
}
.tag-hero-title, .category-hero-title {
  margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.6px;
  font-weight: 800; color: var(--text);
}
.tag-hero-meta, .category-hero-blurb {
  margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.55;
}

.category-related-tags {
  margin-top: 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 170px;
    grid-template-areas:
      "hero hero"
      "checkin meditation"
      "exercise meditation"
      "meal meal"
      "inspiration inspiration";
  }
  .bento-title-lg { font-size: 22px; }
  .r-nav { display: none; }
  .carousel-rail { grid-auto-columns: 220px; }
  .post-frame { margin: 0 16px; padding: 22px 18px; border-radius: var(--radius-md); }
  .post-cover { margin-bottom: -40px; height: clamp(220px, 32vh, 320px); }
}
@media (max-width: 600px) {
  .r-header-inner { padding: 0 16px; gap: 8px; }
  .r-section, .carousel, .r-chips { padding-left: 16px; padding-right: 16px; }
  .bento { grid-auto-rows: 150px; }
  .feed-card { height: 280px; }
  .post-title { font-size: 26px; }
  .post-summary { font-size: 15px; }
}

/* ============================================================
   AdSense slots
   ============================================================ */
.ad-slot {
  position: relative;
  max-width: var(--max-w);
  margin: 24px auto;
  padding: 12px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-height: 100px;
}
.ad-slot-label {
  position: absolute; top: 4px; right: 12px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  opacity: 0.6;
}
.ad-slot-banner    { min-height: 110px; }
.ad-slot-rect      { min-height: 280px; max-width: 360px; }
.ad-slot-inFeed    { min-height: 200px; }
.ad-slot-inArticle { min-height: 280px; margin: 24px 0; padding: 8px; }

/* Dark glass adjustment for users that prefer it (optional later) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
