/* ═══════════════════════════════════════════════════════════
   app.css — complete self-contained styles for all app pages
   Does NOT depend on styles.css (landing page CSS).
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS — dark mode (default) ───────────────────────── */
:root {
  --bg:          #0a0908;
  --bg-mid:      #111009;
  --bg-light:    #e8e4da;
  --ink:         #f2ede3;
  --ink-soft:    rgba(242, 237, 227, 0.58);
  --ink-faint:   rgba(242, 237, 227, 0.22);
  --soil:        #1c1a16;
  --soil-line:   rgba(242, 237, 227, 0.10);
  --cream:       #ede8dc;
  --cream-dim:   rgba(237, 232, 220, 0.82);
  --amber:       #c4602e;
  --shell:       1140px;
  --r:           6px;
  /* Component tokens */
  --header-bg:   rgba(10, 9, 8, 0.72);
  --prose-text:  rgba(242, 237, 227, 0.52);
  --border-ui:   rgba(242, 237, 227, 0.28);
  --border-soft: rgba(242, 237, 227, 0.14);
  --border-focus:rgba(242, 237, 227, 0.32);
}

/* ─── TOKENS — light mode ─────────────────────────────────── */
html[data-theme="light"] {
  --bg:          #f5f0e8;
  --bg-mid:      #ede8dc;
  --bg-light:    #ffffff;
  --ink:         #1a1614;
  --ink-soft:    rgba(26, 22, 16, 0.62);
  --ink-faint:   rgba(26, 22, 16, 0.34);
  --soil:        #e4dfd4;
  --soil-line:   rgba(26, 22, 16, 0.10);
  --cream:       #1a1614;
  --cream-dim:   rgba(26, 22, 16, 0.82);
  /* Component tokens */
  --header-bg:   rgba(245, 240, 232, 0.88);
  --prose-text:  rgba(26, 22, 16, 0.56);
  --border-ui:   rgba(26, 22, 16, 0.16);
  --border-soft: rgba(26, 22, 16, 0.08);
  --border-focus:rgba(26, 22, 16, 0.28);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --bg:          #f5f0e8;
    --bg-mid:      #ede8dc;
    --bg-light:    #ffffff;
    --ink:         #1a1614;
    --ink-soft:    rgba(26, 22, 16, 0.62);
    --ink-faint:   rgba(26, 22, 16, 0.34);
    --soil:        #e4dfd4;
    --soil-line:   rgba(26, 22, 16, 0.10);
    --cream:       #1a1614;
    --cream-dim:   rgba(26, 22, 16, 0.82);
    /* Component tokens */
    --header-bg:   rgba(245, 240, 232, 0.88);
    --prose-text:  rgba(26, 22, 16, 0.56);
    --border-ui:   rgba(26, 22, 16, 0.16);
    --border-soft: rgba(26, 22, 16, 0.08);
    --border-focus:rgba(26, 22, 16, 0.28);
  }
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; padding: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin: 0 auto;
}

/* ─── WELCOME BANNER ────────────────────────────────────────── */
.welcome-banner {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(196, 96, 46, 0.12);
  border-bottom: 1px solid rgba(196, 96, 46, 0.3);
}
.welcome-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.welcome-banner__text {
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.welcome-banner__text strong {
  color: var(--amber);
  font-weight: 600;
}
.welcome-banner__close {
  flex: none;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 120ms;
}
.welcome-banner__close:hover { color: var(--ink-soft); }

/* ─── HEADER ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--soil-line);
}

.site-header__brand {
  display: flex;
  align-items: center;
}

.site-header__mark { display: none; }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto; /* Always hug the right edge, even when the left slot is empty */
}

.site-nav__link {
  padding: 8px 14px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.site-nav__link:hover {
  color: var(--ink);
  border-color: var(--border-soft);
  background: rgba(242, 237, 227, 0.04);
}
.site-nav__link:focus-visible {
  outline: none;
  color: var(--ink);
  border-color: var(--border-ui);
  background: rgba(242, 237, 227, 0.06);
}
button.site-nav__back {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

/* User initial badge */
.site-header__user {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(237, 232, 220, 0.14);
  border: 1px solid rgba(242, 237, 227, 0.22);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  margin-left: 6px;
  flex: none;
  transition: background 160ms ease, border-color 160ms ease;
}
.site-header__user:hover {
  background: rgba(237, 232, 220, 0.22);
  border-color: rgba(242, 237, 227, 0.36);
}

/* ─── FOLLOWING FEED — SHOW MORE ─────────────────────────── */
.following-feed__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}
.following-feed__more:hover {
  border-color: var(--border-ui);
  color: var(--ink);
  background: rgba(242, 237, 227, 0.04);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .following-feed__more:hover {
  background: rgba(26, 22, 16, 0.04);
}
.following-feed__more:disabled { opacity: 0.6; cursor: wait; }
.following-feed__more-icon {
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 200ms ease;
}
.following-feed__more:hover .following-feed__more-icon {
  transform: translateY(2px);
}
.following-feed .shell { display: flex; flex-direction: column; align-items: stretch; }
.following-feed__more { align-self: center; }

/* ─── SESSION FORM — MISSION CHIP + PICKER ───────────────── */
.session-form__mission-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 4px;
}
.session-form__mission {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(196,96,46,0.45);
  background: rgba(196,96,46,0.08);
  color: var(--amber);
  font-size: 0.84rem;
  font-weight: 500;
}
/* Explicit display:inline-flex beats the [hidden] attribute's default
   user-agent display:none — add the guard so hidden actually hides. */
.session-form__mission[hidden] { display: none; }
.session-form__mission-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.78;
}
.session-form__mission-body strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-right: 2px;
}
.session-form__mission-body span {
  color: var(--ink);
  font-weight: 500;
}
.session-form__mission-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--amber);
  opacity: 0.7;
  cursor: pointer;
  font-size: 0.78rem;
  transition: opacity 140ms ease, background 140ms ease;
}
.session-form__mission-clear:hover {
  opacity: 1;
  background: rgba(196,96,46,0.15);
}
.session-form__mission-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.session-form__mission-picker[hidden] { display: none; }
.session-form__mission-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.session-form__mission-picker-icon {
  color: var(--amber);
  opacity: 0.7;
  font-size: 0.85rem;
  line-height: 1;
}
.session-form__mission-input {
  width: 110px;
  padding: 7px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border-ui);
  /* Cream background + dark ink text in BOTH themes, so the typed number
     always has strong contrast (cream-on-cream was invisible in dark mode). */
  background: #f2ede3;
  color: #1a1614;
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.02em;
  transition: border-color 140ms ease, background 140ms ease;
  /* Strip the native spinners — they eat space and hurt readability.
     Users can type freely or arrow through with the keyboard. */
  -moz-appearance: textfield;
  appearance: textfield;
}
.session-form__mission-input::-webkit-outer-spin-button,
.session-form__mission-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.session-form__mission-input::placeholder {
  color: rgba(26, 22, 16, 0.38);
  font-weight: 400;
}
.session-form__mission-input:focus {
  outline: none;
  border-color: var(--amber);
  background: #fff;
}
.session-form__mission-picker-status {
  font-size: 0.74rem;
  color: var(--ink-faint);
  min-height: 1em;
}
.session-form__mission-picker-status[data-state="success"] { color: #5a8c4d; }
.session-form__mission-picker-status[data-state="error"]   { color: var(--amber); }

/* Custom-type text input (revealed by "+ Other" pill) */
.session-form__type-custom {
  margin-top: 10px;
}
.session-form__type-custom[hidden] { display: none; }
.type-pill--other {
  border-style: dashed !important;
  color: var(--ink-faint);
}

/* ─── MISSION CARD (editorial daily prompt) ──────────────── */
.mission-section {
  padding: 34px 0 18px;
}

.mission-card {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 0;
  padding: 34px 38px 32px;
  background:
    radial-gradient(1200px 380px at 0% 0%, rgba(196, 96, 46, 0.10), transparent 60%),
    linear-gradient(180deg, #141210 0%, #0f0d0b 100%);
  color: #f2ede3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
}
/* Light mode — warm cream paper with a subtle amber corner glow
   instead of the dark darkroom treatment. Typography inverts to ink. */
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card {
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(196, 96, 46, 0.12), transparent 62%),
    linear-gradient(180deg, #fbf7ef 0%, #f1ebdd 100%);
  color: #1a1614;
  border: 1px solid rgba(26, 22, 16, 0.08);
  box-shadow: 0 18px 54px rgba(26, 22, 16, 0.08), 0 2px 8px rgba(26, 22, 16, 0.06);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__frame {
  background: repeating-linear-gradient(
    to bottom,
    rgba(26, 22, 16, 0.16) 0 6px,
    transparent 6px 14px
  );
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__side {
  border-right-color: rgba(26, 22, 16, 0.10);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__number {
  color: #1a1614;
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__of {
  color: rgba(26, 22, 16, 0.38);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__focus-tag {
  background: rgba(196, 96, 46, 0.08);
  border-color: rgba(196, 96, 46, 0.42);
  color: #b55429;
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__title {
  color: #1a1614;
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__desc {
  color: rgba(26, 22, 16, 0.66);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__btn--shuffle {
  color: rgba(26, 22, 16, 0.68);
  border-color: rgba(26, 22, 16, 0.22);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__btn--shuffle:hover {
  color: #1a1614;
  border-color: rgba(26, 22, 16, 0.44);
  background: rgba(26, 22, 16, 0.04);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__btn--start {
  color: #fff;
  box-shadow: 0 10px 22px rgba(196, 96, 46, 0.22);
}
@media (max-width: 720px) {
  :is(html[data-theme="light"], html:not([data-theme="dark"])) .mission-card__side {
    border-right: 0;
    border-bottom-color: rgba(26, 22, 16, 0.10);
  }
}

/* Decorative film-perforation strip running the left edge */
.mission-card__frame {
  position: absolute;
  top: 10px; bottom: 10px;
  left: 12px;
  width: 3px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(242,237,227,0.10) 0 6px,
      transparent 6px 14px
    );
  pointer-events: none;
}

/* Left column — big mission number */
.mission-card__side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 16px;
  border-right: 1px solid rgba(242,237,227,0.10);
  padding-right: 24px;
}
.mission-card__eyebrow {
  margin: 0 0 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.mission-card__number {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  line-height: 1;
  /* Reserve vertical space so the "OF 1000" line never clips into the digits */
  padding: 2px 0 6px;
  color: #f2ede3;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: block;
  /* animated on shuffle */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms cubic-bezier(0.22,1,0.36,1), transform 420ms cubic-bezier(0.22,1,0.36,1);
}
.mission-card__of {
  display: block;
  margin: 10px 0 16px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,227,0.38);
  font-variant-numeric: tabular-nums;
}
.mission-card__focus-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px 5px 10px;
  border-radius: 100px;
  border: 1px solid rgba(196,96,46,0.5);
  background: rgba(196,96,46,0.10);
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.mission-card__focus-tag::before {
  content: "◉";
  font-size: 0.6rem;
  line-height: 1;
}

/* Right column — headline + description + actions */
.mission-card__main {
  padding-left: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.mission-card__title {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #f2ede3;
  /* animated on shuffle */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 460ms cubic-bezier(0.22,1,0.36,1) 40ms, transform 460ms cubic-bezier(0.22,1,0.36,1) 40ms;
}
.mission-card__desc {
  margin: 0 0 22px;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgba(242,237,227,0.78);
  max-width: 60ch;
  /* animated on shuffle */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 500ms cubic-bezier(0.22,1,0.36,1) 80ms, transform 500ms cubic-bezier(0.22,1,0.36,1) 80ms;
}

/* Fade-in class added by JS after a new mission renders */
.mission-section--in .mission-card__number,
.mission-section--in .mission-card__title,
.mission-section--in .mission-card__desc {
  opacity: 1;
  transform: translateY(0);
}

/* Editorial action buttons */
.mission-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.mission-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.mission-card__btn-icon {
  display: inline-flex;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 220ms ease;
}
.mission-card__btn--shuffle {
  background: transparent;
  color: rgba(242,237,227,0.8);
  border-color: rgba(242,237,227,0.18);
}
.mission-card__btn--shuffle:hover {
  color: #f2ede3;
  border-color: rgba(242,237,227,0.42);
  background: rgba(242,237,227,0.04);
}
.mission-card__btn--shuffle:hover .mission-card__btn-icon {
  transform: rotate(-180deg);
}
.mission-card__btn--start {
  background: var(--amber);
  color: #18140f;
  border-color: var(--amber);
  box-shadow: 0 10px 24px rgba(196,96,46,0.28);
}
.mission-card__btn--start:hover {
  background: #d56a32;
  border-color: #d56a32;
  transform: translateY(-1px);
}
.mission-card__btn--start:hover .mission-card__btn-icon--end {
  transform: translateX(3px);
}

@media (max-width: 720px) {
  .mission-card {
    grid-template-columns: 1fr;
    padding: 26px 22px 24px;
  }
  .mission-card__side {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid rgba(242,237,227,0.10);
    padding: 0 0 16px 12px;
    margin-bottom: 18px;
  }
  .mission-card__eyebrow { order: 0; }
  .mission-card__number  { order: 1; font-size: 2.4rem; }
  .mission-card__of      { order: 2; margin: 0; }
  .mission-card__focus-tag { order: 3; margin-left: auto; }
  .mission-card__main { padding-left: 0; }
  .mission-card__title { font-size: 1.7rem; }
  .mission-card__desc  { font-size: 1rem; }
}
@media (max-width: 680px) {
  .mission-section { padding: 20px 0 10px; }
}

/* ─── NAV HOME (left-edge back-to-journal icon) ──────────── */
.nav-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}
.nav-home:hover {
  background: rgba(242, 237, 227, 0.06);
  color: var(--ink);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .nav-home:hover {
  background: rgba(26, 22, 16, 0.06);
}

/* When authenticated, the header is just HOME ___ BURGER MODE.
   Hide every inline nav anchor on the right; the hamburger covers them.
   Match both body.is-logged-in (set statically on authed HTML) and
   body.is-authenticated (added by theme.js after /api/me) so this fires
   regardless of script load order. */
body.is-logged-in .site-header__nav > .site-nav__link,
body.is-logged-in .site-header__nav > .site-header__user,
body.is-authenticated .site-header__nav > .site-nav__link,
body.is-authenticated .site-header__nav > .site-header__user {
  display: none !important;
}
/* Also zero-out the old brand link: the logo img is hidden, so the anchor
   is just invisible clickable space — keep it collapsed. */
.site-header__brand { width: 0; padding: 0; margin: 0; }

/* ─── NAV MENU (hamburger, all sizes) ─────────────────────── */
/* Visible on every authenticated page so the header chrome stays
   consistent. Pre-existing per-link "desktop" anchors next to it
   continue to render at >680px; below that, the hamburger covers
   everything via the @media block further down. */
.nav-menu {
  position: relative;
  display: block;
}

.nav-menu__trigger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px 8px;
  border-radius: var(--r);
  transition: background 160ms ease;
}
.nav-menu__trigger:hover { background: rgba(242, 237, 227, 0.06); }
.nav-menu__trigger span {
  display: block;
  height: 1.5px;
  background: var(--ink-soft);
  border-radius: 2px;
  transition: background 160ms ease;
}
.nav-menu__trigger[aria-expanded="true"] span { background: var(--ink); }

.nav-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: clamp(280px, 34vw, 340px);
  max-width: calc(100vw - 24px);
  background: var(--soil);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 200;
  animation: menu-in 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nav-menu__dropdown[hidden] { display: none; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-menu__item {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 140ms ease, color 140ms ease;
}
/* The bare `hidden` attribute uses the UA display:none rule, which loses
 * to the class selector above. Restore it explicitly so items we inject
 * as hidden (e.g. the inbox/Notes shortcut) actually stay hidden until
 * app code reveals them. */
.nav-menu__item[hidden] { display: none; }
.nav-menu__item:hover {
  background: rgba(242, 237, 227, 0.06);
  color: var(--ink);
}
.nav-menu__item--logout { color: var(--ink-faint); }

/* Group label inside the dropdown — small uppercase eyebrow */
.nav-menu__group-label {
  margin: 4px 0 2px;
  padding: 6px 14px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  pointer-events: none;
}
.nav-menu__group-label:first-child { margin-top: 2px; }
.nav-menu__divider {
  height: 1px;
  margin: 6px 8px;
  background: var(--border-soft);
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.button:hover { transform: translateY(-1px); }

.button--cream {
  background: var(--cream-dim);
  color: #18160f;
  border: 1px solid transparent;
}
.button--cream:hover { background: var(--cream); }

.button--outline {
  border: 1px solid var(--soil-line);
  color: var(--ink-soft);
  font-weight: 500;
}
.button--outline:hover {
  border-color: var(--border-ui);
  color: var(--ink);
}

/* ─── JOURNAL TOP (replaces hero) ────────────────────────── */
.journal-top {
  background: var(--bg-mid);
  padding-top: 62px;
  border-bottom: 1px solid var(--soil-line);
}

.journal-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 30px;
  width: min(calc(100% - 56px), var(--shell));
  margin: 0 auto;
}

.public-profile-summary {
  align-items: flex-start;
}

.public-profile-summary > div:first-child {
  max-width: min(980px, calc(100% - 240px));
}

.public-profile-summary .follow-btn {
  align-self: flex-start;
  margin-top: 6px;
}

.journal-summary > div:first-child {
  display: flex;
  flex-direction: column;
}

.journal-kicker {
  margin: 0 0 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.06rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.journal-name {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 6.2vw, 5.1rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.journal-name em {
  font-style: normal;
  color: var(--amber);
  margin-left: 0.18em;
}
.journal-greeting {
  margin: 0 0 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.06rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--prose-text);
}

.journal-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.stat-dot { opacity: 0.35; }

/* ─── KEEPER FILMSTRIP ────────────────────────────────────── */
.keeper-strip {
  border-top: 1px solid rgba(242, 237, 227, 0.06);
  background: rgba(4, 3, 2, 0.9);
}

.keeper-strip__top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 28px 0;
}

.keeper-strip__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.keeper-strip__count {
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.keeper-reel {
  width: 100%;
  overflow-x: auto;
  display: flex;
  gap: 2px;
  padding: 10px 0 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.keeper-reel::-webkit-scrollbar { display: none; }

.keeper-thumb {
  flex: none;
  width: 108px;
  height: 72px;
  position: relative;
  overflow: hidden;
  background: #080706;
  cursor: zoom-in;
}
.keeper-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.8);
  transition: filter 200ms ease, transform 220ms ease;
  display: block;
}
.keeper-thumb:hover img {
  filter: contrast(1.12) saturate(1.15);
  transform: scale(1.06);
}
/* Film sprocket strip below each thumb */
.keeper-thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 10px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 4px,
      rgba(242, 237, 227, 0.08) 4px, rgba(242, 237, 227, 0.08) 10px,
      transparent 10px, transparent 14px
    );
  pointer-events: none;
}
.keeper-thumb__num {
  position: absolute;
  top: 5px; left: 7px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(242,237,227,0.35);
  font-family: "Inter", monospace;
  pointer-events: none;
}
.keeper-thumb--new {
  animation: reel-in 320ms ease both;
}
@keyframes reel-in {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.keeper-thumb .keeper-thumb__star {
  position: absolute;
  top: 4px; right: 6px;
  font-size: 0.58rem;
  color: var(--amber);
  opacity: 0.8;
  pointer-events: none;
}

/* ─── SESSIONS ────────────────────────────────────────────── */
.sessions-wrap {
  padding: 64px 0 100px;
  background: var(--bg);
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── SESSION DEEP-LINK HIGHLIGHT ───────────────────────── */
@keyframes session-highlight {
  0%   { box-shadow: 0 0 0 3px rgba(196, 168, 122, 0.0); }
  20%  { box-shadow: 0 0 0 3px rgba(196, 168, 122, 0.55); }
  100% { box-shadow: 0 0 0 3px rgba(196, 168, 122, 0.0); }
}
.session-card--highlight {
  animation: session-highlight 2.4s ease forwards;
}

/* Copy link button in session actions */
.share-link-btn {
  margin-left: auto;
  font-size: 0.78rem;
}

/* ─── ONBOARDING EMPTY STATE ─────────────────────────────── */
.onboarding-cta {
  text-align: center;
  padding: 56px 20px 80px;
}
.onboarding-cta__label {
  margin: 0 0 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.onboarding-cta h3 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}
.onboarding-cta__body {
  margin: 0 auto 32px;
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 42ch;
}

.sessions-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}

.section-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.section-anchor {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.sessions-title {
  max-width: 18ch;
}

.sessions-sub {
  margin: 12px 0 0;
  max-width: 60ch;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-soft);
}


.session-card {
  background: var(--soil);
  border: 1px solid var(--soil-line);
  border-radius: 10px;
  overflow: hidden;
}

.session-card__actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--soil-line);
}

.session-card__title-row {
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--soil-line);
}
.session-card__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}

.session-card__header {
  border-bottom: 1px solid var(--soil-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-card__controls {
  display: flex;
  gap: 6px;
  padding-right: 20px;
  flex: none;
}

.session-card__meta {
  margin: 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.meta-dot { opacity: 0.4; }

.session-tag {
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--soil-line);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

/* ─── SESSION INTENT ──────────────────────────────────────── */
.session-intent {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--soil-line);
  background: rgba(255, 255, 255, 0.015);
}

.session-intent__label {
  flex: none;
  margin-top: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  min-width: 40px;
}

.session-intent p {
  flex: 1;
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--prose-text);
}

.session-intent p[contenteditable="true"] {
  outline: 1px solid rgba(242,237,227,0.18) !important;
  border-radius: 4px;
  padding: 6px 8px !important;
  caret-color: var(--ink);
  cursor: text;
  color: rgba(242, 237, 227, 0.72);
}

.edit-inline {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-faint);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--soil-line);
  transition: color 160ms ease, border-color 160ms ease;
}
.edit-inline:hover {
  color: var(--ink-soft);
  border-color: rgba(242, 237, 227, 0.22);
}
.edit-inline--danger:hover {
  color: #f5a88a;
  border-color: rgba(245, 168, 138, 0.35);
}
.share-toggle { margin-left: 0; }
.share-toggle--on {
  color: var(--amber);
  border-color: rgba(196, 96, 46, 0.4);
}
.share-toggle--on:hover {
  color: var(--amber);
  border-color: rgba(196, 96, 46, 0.7);
}
.community-toggle {
  font-size: 0.78rem;
}
.community-toggle--on {
  color: #7ec8a0;
  border-color: rgba(126, 200, 160, 0.35);
}
.community-toggle--on:hover {
  color: #7ec8a0;
  border-color: rgba(126, 200, 160, 0.6);
}

/* ─── CONTACT SHEET ───────────────────────────────────────── */
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  background: #050404;
}

.frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d0c0a;
  margin: 0;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: filter 220ms ease, transform 220ms ease;
}
.frame:hover img {
  filter: brightness(1.06);
  transform: scale(1.02);
}
/* Upload states */
.frame--uploading img { opacity: 0.5; }
.frame__upload-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--ink-soft);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
.frame--upload-failed img { opacity: 0.3; }
.frame--upload-failed .frame__upload-indicator { color: #f5a88a; animation: none; }

.frame--keeper img {
  filter: brightness(1.05) contrast(1.03);
}

.frame__num {
  position: absolute;
  bottom: 6px; left: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(242, 237, 227, 0.42);
  font-family: "Inter", monospace;
  pointer-events: none;
}

.frame__keeper-mark {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 0.7rem;
  color: var(--amber);
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.frame__like-mark {
  position: absolute;
  top: 6px; left: 8px;
  font-size: 0.7rem;
  color: rgba(242, 237, 227, 0.7);
  pointer-events: none;
  opacity: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  transition: opacity 160ms ease;
}
.frame--liked .frame__like-mark { opacity: 1; }

/* Frame action overlay — neutralized in favor of persistent corner buttons.
   Use display:contents so the wrapper is invisible but the child .frame-action
   button still renders (otherwise display:none would hide it). */
.frame__hover {
  display: contents;
}

/* Corner keeper toggle — replaces the centered .frame-action button.
   Always visible at low opacity so the affordance is discoverable;
   brightens on hover. */
.frame-action {
  pointer-events: auto;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(8, 7, 6, 0.62);
  color: #fff;
  font-size: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.78;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transition: opacity 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
  cursor: pointer;
}
/* Render only the star glyph */
.frame-action::before {
  content: "★";
  font-size: 0.92rem;
  line-height: 1;
}
body.is-logged-in .frame:hover .frame-action,
body.is-logged-in .frame:focus-within .frame-action {
  opacity: 1;
}
.frame-action:hover {
  background: #000;
  border-color: #fff;
  transform: scale(1.06);
}
.frame-action--keeper {
  opacity: 1;
  color: #fff;
  border-color: var(--amber);
  background: rgba(196, 96, 46, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}
.frame-action--keeper:hover {
  background: #d56a32;
}
/* When a frame IS a keeper, hide the duplicate ★ decoration to avoid two stars */
.frame--keeper .frame__keeper-mark { display: none; }
.frame-action--like.is-active {
  color: var(--ink);
  border-color: rgba(242, 237, 227, 0.38);
}

/* ─── SESSION REFLECTION ──────────────────────────────────── */
.session-reflection {
  margin: 0;
  padding: 28px 24px;
  border-top: 1px solid var(--soil-line);
}

.session-reflection p {
  margin: 0 0 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.7;
  color: rgba(242, 237, 227, 0.78);
  max-width: 64ch;
}

.session-reflection__footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-reflection cite {
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* 4-column contact sheet variant */
.contact-sheet--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* ─── INSIGHTS ────────────────────────────────────────────── */
.insights-section {
  background: var(--bg-mid);
  padding: 72px 0 80px;
  border-top: 1px solid var(--soil-line);
  border-bottom: 1px solid var(--soil-line);
}

.insights-header {
  margin-bottom: 36px;
}

.insights-title {
  margin-top: 2px;
}

.insights-summary {
  margin: 12px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(242, 237, 227, 0.62);
  max-width: 52ch;
}

.insights-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── YOUR EYE canvas-analysis layout ─────────────────────── */
.eye-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 56px;
}

.eye-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

.eye-progress__bar {
  height: 2px;
  background: rgba(242,237,227,0.10);
  border-radius: 2px;
  overflow: hidden;
}

.eye-progress__bar span {
  display: block;
  height: 100%;
  background: rgba(242,237,227,0.45);
  border-radius: 2px;
  transition: width 400ms ease;
}

.eye-progress__label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.eye-palette-row {
  margin-top: 8px;
}

.eye-palette {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.eye-swatch {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  display: block;
  border: 1px solid rgba(242,237,227,0.07);
  flex-shrink: 0;
}

.insights-group__label {
  margin: 0 0 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.insights-grid {
  display: grid;
  gap: 14px;
  max-width: 480px;
}

.insight {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 16px;
}

.insight-label {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.insight-bar {
  height: 1px;
  background: rgba(242,237,227,0.10);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
.insight-bar span {
  display: block;
  height: 100%;
  background: rgba(242, 237, 227, 0.48);
  border-radius: 1px;
}

.insight-pct {
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── FOLLOW BUTTON ──────────────────────────────────────── */
.follow-btn {
  align-self: center;
  flex: none;
  min-width: 96px;
  color: var(--ink-soft);
  border: 1px solid var(--border-ui);
  border-radius: var(--r);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.follow-btn:hover {
  color: var(--cream);
  border-color: rgba(244, 240, 232, 0.5);
  background: rgba(244, 240, 232, 0.06);
}
.follow-btn--on {
  color: var(--amber);
  border-color: rgba(196, 96, 46, 0.5);
  background: rgba(196, 96, 46, 0.08);
}
.follow-btn--on:hover {
  color: var(--amber);
  border-color: rgba(196, 96, 46, 0.7);
  background: rgba(196, 96, 46, 0.13);
}

/* ─── FOLLOWING FEED ─────────────────────────────────────── */
.following-feed {
  padding: 56px 0 64px;
  border-top: 1px solid var(--soil-line);
  border-bottom: 1px solid var(--soil-line);
  background: var(--bg-mid);
}
.following-feed__header {
  margin-bottom: 32px;
}
.following-feed__title {
  margin: 0;
}
.following-feed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.feed-card {
  background: var(--soil);
  border: 1px solid var(--soil-line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease;
}
.feed-card:hover { border-color: rgba(242, 237, 227, 0.22); }
.feed-card__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  transition: background 160ms ease;
}
.feed-card__profile:hover { background: rgba(255,255,255,0.03); }
:is(html[data-theme="light"], html:not([data-theme="dark"])) .feed-card__profile:hover {
  background: rgba(26,22,16,0.04);
}
.feed-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soil);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  flex: none;
}
.feed-card__profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feed-card__handle {
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.feed-card__session {
  display: block;
  text-decoration: none;
  color: inherit;
}
.feed-card__cover {
  aspect-ratio: 4 / 3;
  background: #0d0c0a;
  overflow: hidden;
}
.feed-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}
.feed-card:hover .feed-card__cover img { transform: scale(1.03); }
.feed-card__cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 2rem;
}
.feed-card__body {
  padding: 14px 16px 16px;
}
.feed-card__owner {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 4px;
}
.feed-card__location {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
}
.feed-card__meta {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ─── COMMUNITY ───────────────────────────────────────────── */
.community-section {
  background: var(--bg);
  padding: 72px 0 96px;
}

.community-header {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
  align-items: end;
}
.community-header__left {
  min-width: 0;
}

.community-title {
  margin: 0;
}

.community-sub {
  margin: 0 0 5px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: none;
  line-height: 1.6;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #050404;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--soil-line);
}

.community-card {
  background: var(--soil);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.community-frame {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex: none;
}

.community-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(0.82);
  transition: filter 200ms ease, transform 240ms ease;
}

.community-card:hover .community-frame img {
  filter: contrast(1.1) saturate(1.05);
  transform: scale(1.03);
}

.community-body {
  flex: 1;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--soil-line);
}

.community-reflection {
  margin: 0;
}

.community-reflection p {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(242, 237, 227, 0.70);
}

.community-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-author {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(196, 96, 46, 0.15);
  border: 1px solid rgba(196, 96, 46, 0.3);
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-meta {
  flex: 1;
  min-width: 0;
}

.community-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.2;
}
a.community-author,
a.community-name--link {
  text-decoration: none;
  cursor: pointer;
}
a.community-author:hover,
a.community-name--link:hover {
  color: var(--ink);
}
.community-author__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.community-loc {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── COMMUNITY ACTIONS ROW ───────────────────────────────── */
.community-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.community-feedback-btn {
  flex: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--soil-line);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.community-feedback-btn:hover {
  border-color: var(--border-ui);
  background: rgba(242, 237, 227, 0.05);
}
.community-feedback-btn.is-open {
  color: var(--ink);
  border-color: var(--border-ui);
}

/* ─── FEEDBACK PANEL ──────────────────────────────────────── */
.feedback-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease;
  border-top: 0px solid var(--soil-line);
}
.feedback-panel.is-open {
  max-height: 400px;
  border-top-width: 1px;
}

.feedback-notes {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.feedback-notes:not(:empty) {
  border-bottom: 1px solid var(--soil-line);
}

.feedback-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--soil-line);
}

.feedback-note__author {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(196, 96, 46, 0.15);
  border: 1px solid rgba(196, 96, 46, 0.3);
  color: var(--amber);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.feedback-note__text {
  flex: 1;
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(242, 237, 227, 0.68);
}
.feedback-note__text[contenteditable="true"] {
  outline: none;
  border-bottom: 1px solid var(--amber);
  color: var(--ink);
}

.feedback-note__actions {
  display: flex;
  gap: 6px;
  flex: none;
  align-self: center;
}

.feedback-note__btn {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
  transition: color 140ms, border-color 140ms;
}
.feedback-note__btn:hover { color: var(--ink-soft); border-color: rgba(242,237,227,0.25); }
.feedback-note__btn--delete:hover { color: #f5a88a; border-color: rgba(245,168,138,0.3); }

.feedback-form {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--soil-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 160ms ease;
  caret-color: var(--ink);
}
.feedback-textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}
.feedback-textarea:focus {
  border-color: var(--border-ui);
}

.feedback-form__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.feedback-cancel {
  padding: 8px 14px;
  border-radius: var(--r);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-faint);
  transition: color 160ms ease;
}
.feedback-cancel:hover { color: var(--ink-soft); }

.feedback-submit {
  padding: 9px 20px;
  border-radius: var(--r);
  background: var(--cream-dim);
  color: #18160f;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 160ms ease, transform 160ms ease;
}
.feedback-submit:hover {
  background: var(--cream);
  transform: translateY(-1px);
}

.community-resonate-btn {
  flex: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--soil-line);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.community-resonate-btn:hover {
  color: var(--ink-soft);
  border-color: rgba(242, 237, 227, 0.24);
  background: rgba(242, 237, 227, 0.04);
}

.community-resonate-btn.is-active {
  color: var(--amber);
  border-color: rgba(196, 96, 46, 0.32);
  background: rgba(196, 96, 46, 0.06);
}

/* ─── INBOX BADGE (nav) ───────────────────────────────────── */
.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 20px;
  background: var(--amber);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
/* Empty badge (no pending count) should not render the amber dot. */
.inbox-badge:empty { display: none; }

.site-nav__link--inbox {
  color: var(--amber);
}

/* ─── FEEDBACK INBOX SECTION ──────────────────────────────── */
.feedback-inbox {
  padding: 48px 0 56px;
  border-top: 2px solid rgba(196, 96, 46, 0.25);
  background: rgba(196, 96, 46, 0.03);
}

.feedback-inbox__header {
  margin-bottom: 40px;
}

.feedback-inbox__title {
  margin: 0;
}

.feedback-inbox__sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.feedback-inbox__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── INBOX NOTE CARD ─────────────────────────────────────── */
.inbox-note {
  display: flex;
  gap: 20px;
  background: var(--soil);
  border: 1px solid rgba(242, 237, 227, 0.10);
  border-radius: 10px;
  overflow: hidden;
  align-items: flex-start;
}

.inbox-note__thumb {
  flex: none;
  width: 120px;
  align-self: stretch;
  overflow: hidden;
  position: relative;
  min-height: 100px;
}

.inbox-note__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inbox-note__body {
  flex: 1;
  padding: 20px 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-note__who {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-note__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(242, 237, 227, 0.08);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  flex: none;
}

.inbox-note__text {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}

.inbox-note__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.inbox-note__btn {
  padding: 7px 16px;
  border-radius: var(--r);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  color: var(--ink-faint);
  transition: color 140ms, border-color 140ms, background 140ms;
}

.inbox-note__btn:hover {
  color: var(--ink-soft);
  border-color: var(--border-ui);
}

.inbox-note__btn--approve {
  color: var(--ink-soft);
  border-color: rgba(196, 96, 46, 0.35);
  background: rgba(196, 96, 46, 0.07);
}

.inbox-note__btn--approve:hover {
  color: var(--ink);
  border-color: var(--amber);
  background: rgba(196, 96, 46, 0.14);
}

@media (max-width: 680px) {
  .inbox-note__thumb { width: 80px; }
  .inbox-note__body  { padding: 14px 14px 14px 0; }
}

/* ─── PHOTO LIGHTBOX ─────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.92);
  cursor: pointer;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 7, 6, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.lightbox__close:hover {
  background: #000;
  border-color: #fff;
  transform: scale(1.05);
}
@media (max-width: 680px) {
  .lightbox__close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.1rem; }
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  max-width: min(calc(100vw - 48px), 1100px);
  max-height: calc(100vh - 48px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--soil);
  border: 1px solid var(--soil-line);
}

.lightbox__figure {
  margin: 0;
  overflow: hidden;
  max-height: calc(100vh - 48px);
}
.lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 48px);
  object-fit: cover;
}

.lightbox__body {
  width: 280px;
  flex-shrink: 0;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  border-left: 1px solid var(--soil-line);
}

.lightbox__frame {
  margin: 0 0 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}

.lightbox__quote {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.lightbox__meta {
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* Lightbox — portrait: stack image above text */
@media (orientation: portrait) {
  .lightbox__panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    max-width: min(calc(100vw - 32px), 560px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
  .lightbox__figure {
    max-height: 55vw;
  }
  .lightbox__img {
    max-height: 55vw;
  }
  .lightbox__body {
    width: auto;
    border-left: none;
    border-top: 1px solid var(--soil-line);
    padding: 24px 20px;
  }
}

/* Make card photo clickable */
.community-frame { cursor: zoom-in; }

.community-sentinel { height: 1px; }
.community-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--ink-faint);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

/* ─── NEW SESSION MODAL ───────────────────────────────────── */
.session-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.session-modal[hidden] { display: none; }

.session-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.session-modal__panel {
  position: relative;
  width: min(100%, 560px);
  background: var(--soil);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  animation: modal-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  scrollbar-width: none;
}
.session-modal__panel::-webkit-scrollbar { display: none; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.session-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.session-modal__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.session-modal__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--soil-line);
  font-size: 0.78rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 160ms ease, border-color 160ms ease;
}
.session-modal__close:hover {
  color: var(--ink-soft);
  border-color: var(--border-ui);
}

/* ─── SESSION FORM ────────────────────────────────────────── */
.session-form {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.session-form__row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.session-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-form__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.session-form__hint {
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.session-form__input,
.session-form__textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--soil-line);
  border-radius: var(--r);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 160ms ease;
  caret-color: var(--ink);
}
.session-form__input {
  height: 44px;
  padding: 0 14px;
}
.session-form__input--stacked {
  margin-top: 6px;
}
.session-form__input--short { max-width: 140px; }
.session-form__textarea {
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1rem;
}
.session-form__input::placeholder,
.session-form__textarea::placeholder { color: var(--ink-faint); }
.session-form__input:focus,
.session-form__textarea:focus { border-color: rgba(242, 237, 227, 0.30); }

/* date input arrow */
.session-form__input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}

/* ─── TYPE PILLS ──────────────────────────────────────────── */
.session-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.type-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--soil-line);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.type-pill:hover {
  border-color: var(--border-ui);
  color: var(--ink);
}
.type-pill.is-selected {
  background: rgba(196, 96, 46, 0.12);
  border-color: rgba(196, 96, 46, 0.42);
  color: var(--amber);
}

/* ─── SESSION FORM FOOTER ─────────────────────────────────── */
.session-form__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.button--ghost-dark {
  padding: 10px 18px;
  border-radius: var(--r);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-faint);
  border: 1px solid transparent;
  transition: color 160ms ease;
}
.button--ghost-dark:hover { color: var(--ink-soft); }

/* ─── EMPTY CONTACT SHEET ─────────────────────────────────── */
.contact-sheet--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: rgba(4, 3, 2, 0.4);
}

/* ─── ADD-FRAMES TILE (always last in the contact sheet grid) ─ */
.frame--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed rgba(242, 237, 227, 0.12);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 160ms, border-color 160ms, background 160ms;
  aspect-ratio: 4 / 3;
}
.frame--add:hover {
  color: var(--ink-soft);
  border-color: var(--border-ui);
  background: rgba(242, 237, 227, 0.03);
}
.frame--add__icon {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}
.frame--add__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ─── CORNER DELETE BUTTON ────────────────────────────────── */
/* Top-left so it never overlaps the keeper star in the top-right.
   Persistent at low opacity so the action is discoverable. */
.frame__delete-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(8, 7, 6, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transition: opacity 140ms, background 140ms, color 140ms, border-color 140ms, transform 140ms;
  cursor: pointer;
}
.frame:hover .frame__delete-btn,
.frame:focus-within .frame__delete-btn {
  opacity: 1;
}
.frame__delete-btn:hover {
  background: rgba(196, 96, 46, 0.92);
  border-color: #fff;
  color: #fff;
  transform: scale(1.06);
}

/* ─── SESSION NOTES (community notes linked to a session) ──── */
.session-notes {
  border-top: 1px solid var(--soil-line);
  padding: 0;
}

.session-notes:empty { display: none; }

.session-like-count {
  margin: 0;
  padding: 12px 24px;
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.02em;
}

.session-notes__label {
  margin: 0;
  padding: 14px 24px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.session-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 24px 10px;
  border-top: 1px solid var(--soil-line);
}

.session-note__mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(196, 96, 46, 0.12);
  border: 1px solid rgba(196, 96, 46, 0.25);
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.session-note__text {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ─── INBOX SESSION PICKER ────────────────────────────────── */
.inbox-note__session-picker {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 140ms;
}
.inbox-note__session-picker:focus {
  border-color: var(--border-ui);
}
.inbox-note__session-picker option {
  background: #1c1a16;
  color: var(--ink);
}

/* Empty reflection prompt */
.session-reflection--empty p {
  color: var(--ink-faint);
  font-style: italic;
}

/* ─── FAB ─────────────────────────────────────────────────── */
.fab-wrap {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
}

.fab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 100px;
  background: var(--cream-dim);
  color: #18160f;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.22);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
  border: none;
}
.fab:hover {
  transform: translateY(-2px);
  background: var(--cream);
  box-shadow: 0 14px 40px rgba(0,0,0,0.52), 0 2px 8px rgba(0,0,0,0.22);
}
.fab__icon { font-size: 1.25rem; font-weight: 300; line-height: 1; }

/* ─── CONTENT-EDITABLE REFLECTION ────────────────────────── */
.session-reflection p[contenteditable="true"] {
  outline: 1px solid rgba(242,237,227,0.18) !important;
  border-radius: 4px;
  padding: 8px 10px !important;
  caret-color: var(--ink);
  cursor: text;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .eye-row { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .contact-sheet { grid-template-columns: repeat(3, 1fr); }
  .contact-sheet--4col { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }

  /* Header */
  .site-header { padding: 12px 14px; }
  .site-header__mark { width: 26px; height: 26px; }
  .site-header__nav { gap: 0; }
  .site-nav__link { padding: 6px 8px; font-size: 0.8rem; }
  .site-header__user { width: 26px; height: 26px; font-size: 0.68rem; margin-left: 4px; }

  /* Journal top */
  .journal-top { padding-top: 56px; }
  .journal-summary { padding-top: 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .journal-kicker { font-size: 0.98rem; margin-bottom: 10px; }
  /* Hide decorative call-to-action buttons in the journal-top, but keep the Follow button visible on mobile profiles */
  .journal-summary .button:not(.follow-btn) { display: none; }
  .journal-summary .follow-btn { align-self: stretch; text-align: center; }
  .public-profile-summary > div:first-child { max-width: 100%; }
  .journal-name { font-size: 2.6rem; }
  .journal-stats { font-size: 0.82rem; gap: 6px; }
  .section-anchor { font-size: clamp(1.7rem, 7.2vw, 2.3rem); }
  .sessions-sub { font-size: 0.9rem; }

  /* Desktop nav items hidden on mobile — hamburger covers them */
  .site-nav__link--desktop { display: none !important; }
  .nav-menu { display: block; }

  /* Sessions header */
  .sessions-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Frames */
  .contact-sheet { grid-template-columns: repeat(2, 1fr); }
  .contact-sheet--4col { grid-template-columns: repeat(2, 1fr); }

  /* Session card — prevent controls overflowing header */
  .session-card__header { flex-wrap: wrap; gap: 0; }
  .session-card__meta { padding-right: 0; }
  /* Lay actions out on a tidy 3-column grid so the row never wraps into a mess */
  .session-card__controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 14px 12px;
    width: 100%;
  }
  .session-card__controls > * {
    width: 100%;
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Session intent */
  .session-intent { flex-direction: column; gap: 8px; }

  /* Community */
  .community-grid { grid-template-columns: 1fr; }
  .community-header { grid-template-columns: 1fr; }
}

/* ─── MOBILE (≤ 480px) — extra tight ──────────────────────── */
@media (max-width: 480px) {
  /* Session form — stack split row */
  .session-form__row--split { grid-template-columns: 1fr; }

  /* Session card header — stack vertically */
  .session-card__header { flex-direction: column; align-items: flex-start; }
  .session-card__controls { padding: 0 14px 12px; }

  /* Session modal — bottom sheet */
  .session-modal { padding: 0; align-items: flex-end; }
  .session-modal__panel { width: 100%; border-radius: 14px 14px 0 0; max-height: 92svh; }

  /* Community actions */
  .community-actions { flex-wrap: wrap; gap: 6px; }

  /* Insights — tighter on small screens */
  .insights-section { padding: 48px 0 56px; }
  .eye-palette { gap: 6px; }
  .eye-swatch { width: 36px; height: 36px; }
}

/* ─── TOUCH DEVICES — corner actions always visible ──────── */
@media (hover: none) {
  body.is-logged-in .frame-action,
  .frame__delete-btn {
    opacity: 1;
  }
  /* Slightly larger tap targets on touch */
  .frame-action,
  .frame__delete-btn {
    width: 32px;
    height: 32px;
  }
  .frame-action::before { font-size: 0.95rem; }
  .frame__delete-btn { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .frame img, .frame__hover, .fab { transition: none; transform: none; }
}

/* ─── INVITE CARD (settings → invite page) ───────────────── */
.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 10px;
  border: 1px solid rgba(196, 96, 46, 0.28);
  background: rgba(196, 96, 46, 0.06);
  text-decoration: none;
  transition: background 160ms, border-color 160ms;
}
.invite-card:hover {
  background: rgba(196, 96, 46, 0.10);
  border-color: rgba(196, 96, 46, 0.45);
}
.invite-card__text { flex: 1; min-width: 0; }
.invite-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 6px;
}
.invite-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.2;
}
.invite-card__hint {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.invite-card__arrow {
  font-size: 1.4rem;
  color: var(--amber);
  flex: none;
}

/* ─── SETTINGS PAGE ───────────────────────────────────────── */
.settings-wrap {
  padding: 80px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-page-header {
  padding: 40px 0 32px;
}

.settings-title {
  margin: 6px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.settings-section {
  border-top: 1px solid var(--soil-line);
  padding: 32px 0;
}
.settings-section--muted { background: rgba(255,255,255,0.015); }

.settings-section > .shell {
  width: min(calc(100% - 48px), var(--shell));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Inline settings link row (Privacy/Terms) */
.settings-links {
  margin: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.92rem;
}
.settings-link {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}
.settings-link:hover {
  color: var(--ink);
  border-bottom-color: var(--border-ui);
}
.settings-links__sep {
  color: var(--ink-faint);
}

/* Section heading — PROFILE / ACCOUNT */
.settings-section-label {
  margin: 0 0 24px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Row: label on left, input on right */
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: start;
  gap: 16px 32px;
  padding: 20px 0;
}
.settings-row--static { align-items: center; }

.settings-row__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 10px;
}

.settings-field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.settings-field-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.settings-url {
  color: var(--amber);
  font-size: 0.75rem;
}

.settings-divider {
  height: 1px;
  background: var(--soil-line);
}

.settings-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--soil);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 160ms ease;
}
.settings-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  grid-column: 2;
}

.settings-status {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Avatar upload */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-upload__btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}
.avatar-upload__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--amber-dim, #5c3a1e);
  overflow: hidden;
  font-family: "Inter", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--amber);
}
.avatar-upload__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-upload__overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(6,5,4,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 160ms ease;
}
.avatar-upload__btn:hover .avatar-upload__overlay { opacity: 1; }
.settings-status[data-state="success"] { color: rgba(160,220,140,0.9); }
.settings-status[data-state="error"]   { color: #f5a88a; }

.settings-static-value {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (max-width: 680px) {
  .settings-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 0;
  }
  .settings-row__label { padding-top: 0; }
  .settings-actions { grid-column: 1; }
}

/* ─── LOGIN PAGE ───────────────────────────────────────────── */
.auth-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-main {
  width: 100%;
  min-height: 100svh;
  padding: calc(var(--header-height) + 18px) 24px 32px;
  display: flex;
  align-items: center;
}

.auth-panel {
  max-width: 400px;
  margin: 0 auto;
}

.auth-eyebrow {
  margin: 0 0 28px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.auth-panel h1 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 500;
  line-height: 0.95;
  color: var(--ink);
}

.auth-text {
  margin: 0 0 28px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid var(--soil-line);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  font-size: 0.96rem;
  font-family: inherit;
  outline: none;
  transition: border-color 160ms ease;
  box-sizing: border-box;
}
.auth-form input::placeholder { color: var(--ink-faint); }
.auth-form input:focus { border-color: rgba(242,237,227,0.32); }
.auth-form button[type="submit"] { align-self: flex-start; min-width: 140px; }

.auth-hint {
  margin: 20px 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

.auth-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  transition: color 160ms ease;
}
.auth-back:hover { color: var(--ink-soft); }

.auth-links {
  margin: 16px 0 0;
  font-size: 0.85rem;
}
.auth-link {
  color: var(--ink-faint);
  transition: color 160ms ease;
}
.auth-link:hover { color: var(--ink-soft); }

/* Landing page waitlist form: input + button side by side */
.signup-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

/* Auth pages (login, signup, reset): stack everything vertically */
.signup-form.auth-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.signup-form.auth-form .signup-form__button {
  align-self: flex-start;
  min-width: 140px;
}

.signup-form__input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid var(--soil-line);
  background: rgba(255,255,255, 0.04);
  color: var(--ink);
  font-size: 0.96rem;
  font-family: inherit;
  outline: none;
  transition: border-color 160ms ease;
}
.signup-form__input::placeholder { color: var(--ink-faint); }
.signup-form__input:focus { border-color: var(--border-focus); }

.signup-form__button { min-width: 120px; }
.signup-form__button[disabled] { opacity: 0.65; cursor: wait; }

.button--primary {
  background: var(--cream-dim);
  color: #18160f;
  border: 1px solid transparent;
}
.button--primary:hover { background: var(--cream); }

.signup-feedback {
  min-height: 1.4rem;
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.signup-feedback[data-state="error"]   { color: #f5a88a; }
.signup-feedback[data-state="success"] { color: rgba(242, 237, 227, 0.86); }

/* ─── THEME TOGGLE ────────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ink-faint);
  font-size: 0.88rem;
  line-height: 1;
  transition: color 160ms, background 160ms;
}
.theme-toggle:hover {
  color: var(--ink-soft);
  background: rgba(128, 120, 100, 0.12);
}

/* ─── UPDATE PILL — surfaced when /version.json reports a newer build ─ */
.hf-update-pill {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 320;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  background: rgba(20, 17, 14, 0.96);
  color: #f2ede3;
  border: 0;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.42),
    0 2px 8px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(6px);
}
.hf-update-pill::before {
  content: "↻";
  color: var(--amber);
  font-size: 1rem;
  line-height: 1;
}
.hf-update-pill em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--amber);
}
.hf-update-pill--show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
@media (max-width: 680px) {
  .hf-update-pill { bottom: 92px; }
}

/* ─── TOAST (keeper prompt) ──────────────────────────────── */
/* Editorial pill: dark ink, amber accent dot, serif italic for the keyword */
.hf-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  max-width: calc(100vw - 28px);
  background: rgba(20, 17, 14, 0.96);
  color: #f2ede3;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.4;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.42),
    0 2px 8px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 300;
  backdrop-filter: blur(6px);
}
.hf-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.hf-toast__text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Amber ★ before the message — visual anchor that ties to the keeper action */
.hf-toast__text::before {
  content: "★";
  color: var(--amber);
  font-size: 0.95rem;
  line-height: 1;
}
.hf-toast__text em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--amber);
  margin: 0 1px;
}
.hf-toast__dismiss {
  background: transparent;
  color: rgba(242, 237, 227, 0.45);
  border: 0;
  font-size: 0.8rem;
  padding: 4px 8px;
  margin-right: -2px;
  border-radius: 50%;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}
.hf-toast__dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 680px) {
  .hf-toast { bottom: 92px; font-size: 0.82rem; padding: 11px 12px 11px 16px; }
}

/* ─── AVATAR CROP MODAL ──────────────────────────────────── */
.avatar-crop {
  position: fixed; inset: 0;
  z-index: 350;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.avatar-crop[hidden] { display: none; }
.avatar-crop__backdrop {
  position: absolute; inset: 0;
  background: rgba(8,7,6,0.7);
  backdrop-filter: blur(4px);
}
.avatar-crop__panel {
  position: relative;
  background: var(--bg-mid);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px;
  width: min(360px, 100%);
  text-align: center;
}
.avatar-crop__title {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
}
.avatar-crop__hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.avatar-crop__stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 14px;
  overflow: hidden;
  background: var(--soil);
  border-radius: 12px;
  cursor: grab;
  touch-action: none;
}
.avatar-crop__stage:active { cursor: grabbing; }
.avatar-crop__img {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  max-width: none;
  width: auto;
  height: auto;
}
.avatar-crop__mask {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 0 49%, rgba(8,7,6,0.55) 50% 100%);
  border-radius: 12px;
}
.avatar-crop__zoom {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.avatar-crop__zoom-label {
  font-size: 0.74rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.avatar-crop__zoom input[type="range"] {
  flex: 1;
  accent-color: var(--amber);
}
.avatar-crop__footer {
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ─── LIGHTBOX — COMMUNITY ACTIONS (Like + Feedback) ──────── */
.lightbox__community {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lightbox__community-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lightbox__owner-chip {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}
.lightbox__owner-chip:hover { border-color: var(--border-ui); color: var(--ink); }
.lightbox__like-btn,
.lightbox__feedback-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.lightbox__like-btn:hover,
.lightbox__feedback-toggle:hover { border-color: var(--border-ui); color: var(--ink); }
.lightbox__like-btn--on {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(196, 96, 46, 0.08);
}
.lightbox__like-icon { font-size: 1rem; line-height: 1; }
.lightbox__like-count {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.8;
}
.lightbox__feedback-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lightbox__feedback-form .feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  color: var(--ink);
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}
.lightbox__feedback-form .feedback-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .lightbox__feedback-form .feedback-textarea {
  background: rgba(26,22,16,0.04);
}
.lightbox__feedback-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lightbox__feedback-status {
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.lightbox__feedback-status[data-state="success"] { color: #5a8c4d; }
.lightbox__feedback-status[data-state="error"]   { color: var(--amber); }

/* ─── COMMUNITY FEEDBACK — KIND TYPES ────────────────────── */
.feedback-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.feedback-kind__chip {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.feedback-kind__chip:hover { border-color: var(--border-ui); color: var(--ink); }
.feedback-kind__chip--on {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(196, 96, 46, 0.08);
}
.feedback-note__kind {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 100px;
  border: 1px solid currentColor;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  opacity: 0.75;
}
.feedback-note__kind--worked { color: #5a8c4d; }
.feedback-note__kind--almost { color: var(--amber); }

/* ─── LIGHTBOX EXIF LINE ─────────────────────────────────── */
.lightbox__exif {
  margin: 6px 0 0;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", "Cascadia Code", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* ─── EYE — TAG FREQUENCY ─────────────────────────────────── */
.eye-tags-row { margin-top: 18px; }
.eye-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.eye-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.eye-tag:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(196, 96, 46, 0.06);
}
.eye-tag__pct {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
}
.eye-tag:hover .eye-tag__pct { color: var(--amber); }

/* ─── LIGHTBOX TAGS ──────────────────────────────────────── */
.lightbox__tags {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lightbox__tags-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lightbox__tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lightbox__tag-chip {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.lightbox__tag-chip:hover { border-color: var(--border-ui); color: var(--ink); }
.lightbox__tag-chip--on {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(196, 96, 46, 0.08);
}

/* ─── LIGHTBOX KEEPER NOTE ───────────────────────────────── */
.lightbox__keeper-note {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lightbox__keeper-note-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.lightbox__keeper-note-input {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  color: var(--ink);
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 160ms ease, background 160ms ease;
}
.lightbox__keeper-note-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(255,255,255,0.06);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .lightbox__keeper-note-input {
  background: rgba(26,22,16,0.04);
}
:is(html[data-theme="light"], html:not([data-theme="dark"])) .lightbox__keeper-note-input:focus {
  background: rgba(26,22,16,0.06);
}

/* ─── 404 / NOT FOUND ─────────────────────────────────────── */
.not-found {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 24px 160px;
  text-align: center;
}
.not-found__code {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 500;
  line-height: 1;
  color: var(--amber);
  letter-spacing: 0.02em;
}
.not-found__title {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  color: var(--ink);
}
.not-found__lede {
  margin: 0 0 36px;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.not-found__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}

/* ─── PROSE PAGES (privacy, terms) ───────────────────────── */
.prose-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}
.prose-page h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 8px;
}
.prose-page .updated {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 0 48px;
  letter-spacing: 0.04em;
}
.prose-page h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin: 40px 0 12px;
}
.prose-page p,
.prose-page li {
  font-size: 0.96rem;
  line-height: 1.78;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.prose-page ul {
  padding-left: 20px;
  margin: 0 0 14px;
}
.prose-page a {
  color: var(--amber);
  text-underline-offset: 3px;
}
.prose-page a:hover { opacity: 0.8; }
.prose-divider {
  border: none;
  border-top: 1px solid var(--soil-line);
  margin: 48px 0;
}

/* ─── INVITE PAGE ─────────────────────────────────────────── */
.invite-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.invite-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 24px 60px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.invite-hero__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 16px;
}
.invite-hero__heading {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 20px;
}
.invite-hero__body {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 48px;
  max-width: 40ch;
}
.invite-box {
  background: rgba(128, 120, 100, 0.06);
  border: 1px solid var(--soil-line);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.invite-box__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.invite-box__link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.invite-box__input {
  flex: 1;
  min-width: 0;
  background: rgba(128, 120, 100, 0.06);
  border: 1px solid var(--soil-line);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-family: "Inter", sans-serif;
  cursor: text;
}
.invite-box__copy {
  flex: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--amber);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 160ms;
}
.invite-box__copy:hover { opacity: 0.88; }
.invite-box__copy:disabled { opacity: 0.5; cursor: default; }
.invite-box__expiry {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0;
}
.invite-box__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.invite-box__status { font-size: 0.84rem; }
.invite-box__status[data-state="success"] { color: rgba(160, 220, 140, 0.9); }
.invite-box__status[data-state="error"]   { color: #f5a88a; }
.invite-empty {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — COMPONENT OVERRIDES
   Fixes hardcoded dark-palette colours that don't use vars
   ═══════════════════════════════════════════════════════════ */

/* Reusable :is() shorthand for both explicit + OS preference */
:is(html[data-theme="light"],
    html:not([data-theme="dark"])[class]) {
  /* fallback handled via @media below */
}

/* All overrides defined once via a shared utility selector */
html[data-theme="light"] .session-reflection p,
html[data-theme="light"] .session-intent p,
html[data-theme="light"] .session-intent p[contenteditable="true"],
html[data-theme="light"] .insights-summary,
html[data-theme="light"] .community-reflection p,
html[data-theme="light"] .feedback-note__text,
html[data-theme="light"] .feed-card__text {
  color: var(--ink-soft);
}

html[data-theme="light"] .follow-btn {
  border-color: rgba(26, 22, 16, 0.20);
  color: var(--ink-soft);
}
html[data-theme="light"] .follow-btn:hover {
  border-color: rgba(26, 22, 16, 0.35);
  background: rgba(26, 22, 16, 0.05);
  color: var(--ink);
}

html[data-theme="light"] .edit-inline:hover,
html[data-theme="light"] .invite-box__input {
  border-color: rgba(26, 22, 16, 0.22);
}

html[data-theme="light"] .session-intent p[contenteditable="true"] {
  outline-color: rgba(26, 22, 16, 0.18) !important;
}

html[data-theme="light"] .nav-menu__item:hover {
  background: rgba(26, 22, 16, 0.06);
}

html[data-theme="light"] .nav-menu__dropdown {
  border-color: rgba(26, 22, 16, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .feed-card:hover {
  border-color: rgba(26, 22, 16, 0.22);
}

html[data-theme="light"] .feedback-note__btn:hover {
  border-color: rgba(26, 22, 16, 0.22);
  color: var(--ink-soft);
}

html[data-theme="light"] .feedback-textarea:focus,
html[data-theme="light"] .signup-form__input:focus,
html[data-theme="light"] .auth-form input:focus {
  border-color: var(--border-focus);
}

/* The keeper strip, contact sheet & individual frames are intentionally  */
/* kept dark — they represent film/darkroom aesthetic in both modes.      */

/* OS-level preference (no explicit data-theme set) */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .session-reflection p,
  html:not([data-theme="dark"]) .session-intent p,
  html:not([data-theme="dark"]) .session-intent p[contenteditable="true"],
  html:not([data-theme="dark"]) .insights-summary,
  html:not([data-theme="dark"]) .community-reflection p,
  html:not([data-theme="dark"]) .feedback-note__text,
  html:not([data-theme="dark"]) .feed-card__text {
    color: var(--ink-soft);
  }

  html:not([data-theme="dark"]) .follow-btn {
    border-color: rgba(26, 22, 16, 0.20);
    color: var(--ink-soft);
  }
  html:not([data-theme="dark"]) .follow-btn:hover {
    border-color: rgba(26, 22, 16, 0.35);
    background: rgba(26, 22, 16, 0.05);
    color: var(--ink);
  }

  html:not([data-theme="dark"]) .edit-inline:hover,
  html:not([data-theme="dark"]) .invite-box__input {
    border-color: rgba(26, 22, 16, 0.22);
  }

  html:not([data-theme="dark"]) .session-intent p[contenteditable="true"] {
    outline-color: rgba(26, 22, 16, 0.18) !important;
  }

  html:not([data-theme="dark"]) .nav-menu__item:hover {
    background: rgba(26, 22, 16, 0.06);
  }

  html:not([data-theme="dark"]) .nav-menu__dropdown {
    border-color: rgba(26, 22, 16, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  }

  html:not([data-theme="dark"]) .feed-card:hover {
    border-color: rgba(26, 22, 16, 0.22);
  }

  html:not([data-theme="dark"]) .feedback-note__btn:hover {
    border-color: rgba(26, 22, 16, 0.22);
    color: var(--ink-soft);
  }
}

/* ─── LIGHT MODE — surface overrides for dark stubs ───────── */
/* Keeper strip, contact sheet seams, empty states, add-frames tile, FAB */
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .keeper-strip {
  background: var(--bg-mid);
  border-top-color: rgba(26, 22, 16, 0.08);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .keeper-thumb {
  background: var(--soil);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .contact-sheet {
  background: rgba(26, 22, 16, 0.08);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .frame {
  background: var(--soil);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .contact-sheet--empty {
  background: rgba(26, 22, 16, 0.04);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .frame--add {
  border-color: rgba(26, 22, 16, 0.18);
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink-soft);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .frame--add:hover {
  border-color: rgba(26, 22, 16, 0.32);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .fab,
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--cream,
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--primary {
  background: #b45a2d;
  color: #fff;
  box-shadow: 0 8px 22px rgba(196, 96, 46, 0.24),
              0 2px 6px rgba(26, 22, 16, 0.08);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .fab:hover,
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--cream:hover,
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--primary:hover {
  background: #c4602e;
  color: #fff;
  box-shadow: 0 12px 28px rgba(196, 96, 46, 0.28),
              0 2px 6px rgba(26, 22, 16, 0.08);
}

/* Ghost/outline buttons — keep readable ink in light mode */
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--outline {
  border-color: rgba(26, 22, 16, 0.22);
  color: var(--ink-soft);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--outline:hover {
  border-color: rgba(26, 22, 16, 0.40);
  color: var(--ink);
  background: rgba(26, 22, 16, 0.04);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--ghost-dark {
  color: var(--ink-soft);
}
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .button--ghost-dark:hover {
  color: var(--ink);
}

:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .site-nav__link:hover,
:is(html[data-theme="light"],
    html:not([data-theme="dark"])) .site-nav__link:focus-visible {
  background: rgba(26, 22, 16, 0.04);
}
