:root {
  --site-nav-accent: #e65f75;
  --site-nav-ink: #242731;
  --site-nav-surface: rgba(252, 250, 247, .88);
  --site-nav-line: rgba(35, 38, 47, .1);
  --site-nav-ease: cubic-bezier(.22, 1, .36, 1);
}

.site-nav,
.site-nav * { box-sizing: border-box; }

.lg-mobile-dock { display: none; }

.site-nav {
  align-items: center;
  background: var(--site-nav-surface);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 23px;
  box-shadow: 0 18px 54px rgba(20, 24, 34, .13), inset 0 1px 0 rgba(255, 255, 255, .72);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(178px, auto) 1fr auto;
  height: 66px;
  left: 50%;
  max-width: 1180px;
  padding: 7px 9px 7px 15px;
  position: fixed;
  top: 14px;
  transform: translateX(-50%);
  transition: background .25s ease, border-color .25s ease, box-shadow .3s ease, height .35s var(--site-nav-ease), top .35s var(--site-nav-ease), max-width .35s var(--site-nav-ease);
  width: calc(100% - 32px);
  z-index: 2147480000;
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
}

.site-nav.is-compact {
  background: rgba(252, 250, 247, .96);
  box-shadow: 0 12px 40px rgba(20, 24, 34, .15), inset 0 1px 0 #fff;
  height: 58px;
  max-width: 1060px;
  top: 9px;
}

.site-nav :where(a, button) { text-decoration: none !important; }
.site-nav :where(a, button)::after { display: none !important; }

.site-nav__brand {
  align-items: center;
  color: var(--site-nav-ink) !important;
  display: inline-flex;
  gap: 11px;
  min-width: 0;
}

.site-nav__mark { align-items: center; display: flex; gap: 3px; }
.site-nav__mark i { background: var(--site-nav-line); height: 1px; width: 9px; }
.site-nav__mark b { color: var(--site-nav-accent); font-size: 14px; line-height: 1; }
.site-nav__names { display: grid; gap: 2px; min-width: 0; }
.site-nav__names strong { font: 700 13px/1.15 "Noto Serif SC", serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav__names small { color: #858995; font: 700 8px/1 system-ui, sans-serif; letter-spacing: .17em; }

.site-nav__links {
  align-items: center;
  display: flex;
  gap: 3px;
  justify-content: center;
  min-width: 0;
}

.site-nav__links a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #686c77 !important;
  display: inline-flex;
  font: 650 12px/1 system-ui, sans-serif;
  gap: 6px;
  height: 40px;
  justify-content: center;
  padding: 0 11px;
  transition: background .2s ease, color .2s ease, transform .24s var(--site-nav-ease), border-color .2s ease;
  white-space: nowrap;
}

.site-nav__links a i { font-size: 15px; }
.site-nav__links a:hover { background: rgba(41, 44, 54, .055); color: var(--site-nav-ink) !important; transform: translateY(-1px); }
.site-nav__links a.is-active {
  background: var(--site-nav-ink);
  border-color: var(--site-nav-ink);
  box-shadow: 0 8px 20px rgba(25, 28, 36, .17);
  color: #fff !important;
}

.site-nav__action {
  align-items: center;
  background: var(--site-nav-accent);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(210, 67, 92, .22);
  color: #fff !important;
  display: inline-flex;
  font: 700 12px/1 system-ui, sans-serif;
  gap: 7px;
  height: 46px;
  padding: 0 16px;
  transition: transform .24s var(--site-nav-ease), box-shadow .2s ease;
  white-space: nowrap;
}
.site-nav__action:hover { box-shadow: 0 13px 28px rgba(210, 67, 92, .28); transform: translateY(-1px); }
.site-nav__action:active { transform: scale(.97); }

/* Shared chapter identity: one quiet editorial marker across every story surface. */
.site-chapter-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 0 18px;
  max-width: 100%;
  width: 100%;
}
.site-chapter-line__identity { align-items: center; display: inline-flex; gap: 9px; min-width: 0; }
.site-chapter-line__identity > i {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 9px;
  display: inline-flex;
  font-size: 13px;
  height: 30px;
  justify-content: center;
  opacity: .82;
  width: 30px;
}
.site-chapter-line__identity strong { font: 750 12px/1 system-ui, sans-serif; white-space: nowrap; }
.site-chapter-line__identity small { font: 750 9px/1 system-ui, sans-serif; letter-spacing: .16em; opacity: .62; white-space: nowrap; }
.site-chapter-line > em {
  border-left: 1px solid currentColor;
  font: 700 10px/1.2 system-ui, sans-serif;
  font-style: normal;
  margin-left: 18px;
  opacity: .72;
  padding-left: 13px;
  white-space: nowrap;
}
.site-chapter-line.is-media { color: rgba(255, 255, 255, .9); }
.site-chapter-line.is-paper { color: var(--site-nav-ink); }

#pjax-container :where(.echo-hero__topline, .track-story-hero__top, .goal-hero__top) { top: 96px !important; }
#pjax-container :where(.echo-hero__topline, .track-story-hero__top, .goal-hero__top) .site-chapter-line { margin: 0; }
.inner-hero-copy > .site-chapter-line { max-width: 360px; }
.moment-story-feature__content > .site-chapter-line { margin-bottom: 16px; max-width: 340px; }
.moment-detail-hero__copy > .site-chapter-line { margin-bottom: 18px; max-width: 360px; }
.album-story-cover-copy > .site-chapter-line { margin-bottom: 20px; max-width: 420px; }
.album-story-library-copy > .site-chapter-line { margin-bottom: 22px; max-width: 420px; }

.moment-story-tools {
  display: flex;
  position: fixed;
  right: max(20px, calc((100vw - 1180px) / 2));
  top: 92px;
  z-index: 80;
}
.moment-story-tools .moment-story-search-toggle {
  background: rgba(31, 32, 36, .76);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
  color: #fff;
  min-height: 42px;
  padding: 0 15px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.moment-detail-tools { top: 92px !important; width: min(1080px, calc(100% - 36px)) !important; }

@media (max-width: 1040px) {
  .site-nav { gap: 10px; grid-template-columns: auto 1fr auto; }
  .site-nav__names { display: none; }
  .site-nav__links a { padding: 0 8px; }
  .site-nav__action span { display: none; }
  .site-nav__action { justify-content: center; padding: 0; width: 46px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .site-nav { display: none !important; }
  .moment-story-tools { right: 14px; top: 14px; }
  .moment-detail-tools { top: 14px !important; width: calc(100% - 28px) !important; }
  #pjax-container :where(.echo-hero__topline, .track-story-hero__top, .goal-hero__top) { top: max(20px, env(safe-area-inset-top)) !important; }
  .site-chapter-line__identity small { display: none; }
  .site-chapter-line__identity > i { border-radius: 8px; height: 28px; width: 28px; }
  .site-chapter-line > em { font-size: 9px; }

  #pjax-container > .lg-mobile-dock {
    align-items: center !important;
    background: rgba(252, 250, 247, .92) !important;
    border: 1px solid rgba(255, 255, 255, .72) !important;
    border-radius: 22px !important;
    bottom: calc(9px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 16px 42px rgba(20, 24, 34, .17), inset 0 1px 0 #fff !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    left: 10px !important;
    margin: 0 !important;
    padding: 5px !important;
    position: fixed !important;
    right: 10px !important;
    width: auto !important;
    z-index: 2147480800 !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.35) !important;
    backdrop-filter: blur(24px) saturate(1.35) !important;
  }

  #pjax-container > .lg-mobile-dock :where(a, button) {
    align-items: center !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: none !important;
    color: #747984 !important;
    display: flex !important;
    flex-direction: column !important;
    font: 650 10px/1 system-ui, sans-serif !important;
    gap: 4px !important;
    height: 51px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    transform: none !important;
  }

  #pjax-container > .lg-mobile-dock :where(a, button)::after { display: none !important; }
  #pjax-container > .lg-mobile-dock :where(a, button) i { font-size: 19px !important; font-style: normal !important; }
  #pjax-container > .lg-mobile-dock :where(a, button).is-active {
    background: #252832 !important;
    box-shadow: 0 8px 20px rgba(24, 27, 35, .2) !important;
    color: #fff !important;
  }
  #pjax-container > .lg-mobile-dock :where(a, button):active { transform: scale(.92) !important; }
}

@media (min-width: 761px) {
  body .quick-message-float { display: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root { --site-nav-ink: #f2eee8; --site-nav-surface: rgba(29, 32, 40, .9); --site-nav-line: rgba(255, 255, 255, .12); }
  .site-nav { border-color: rgba(255, 255, 255, .1); box-shadow: 0 18px 54px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08); }
  .site-nav.is-compact { background: rgba(29, 32, 40, .96); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
  .site-nav__links a { color: #b9bdc7 !important; }
  .site-nav__links a:hover { background: rgba(255, 255, 255, .07); color: #fff !important; }
  .site-nav__links a.is-active { background: #f1ede7; border-color: #f1ede7; color: #20232b !important; }
  @media (max-width: 760px) {
    #pjax-container > .lg-mobile-dock { background: rgba(29, 32, 40, .94) !important; border-color: rgba(255, 255, 255, .1) !important; box-shadow: 0 16px 42px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08) !important; }
    #pjax-container > .lg-mobile-dock :where(a, button) { color: #b4b8c2 !important; }
    #pjax-container > .lg-mobile-dock :where(a, button).is-active { background: #f1ede7 !important; color: #20232b !important; }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav, .lg-mobile-dock { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .site-nav { background: #fcfaf7; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav, .site-nav *, .lg-mobile-dock, .lg-mobile-dock * { transition-duration: 1ms !important; }
}

/* R32: shared owner maintenance launcher. The component exists only in an authenticated admin session. */
:root {
  --site-owner-ink: #252831;
  --site-owner-muted: #6b707c;
  --site-owner-surface: #fff;
  --site-owner-line: rgba(37, 40, 49, .12);
  --site-owner-accent: #d94f6a;
  --site-owner-night: #252934;
  --site-layer-owner: 2147480901;
}
.site-owner-tools { bottom: 22px; position: fixed; right: 22px; z-index: var(--site-layer-owner); }
.site-owner-tools a,
.site-owner-tools a:hover,
.site-empty-story a,
.site-empty-story a:hover { color: inherit; text-decoration: none; }
.site-owner-tools__trigger {
  align-items: center;
  background: var(--site-owner-night);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 15px;
  box-shadow: 0 16px 44px rgba(26, 29, 38, .23);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: 800 12px/1 system-ui, sans-serif;
  gap: 8px;
  min-height: 46px;
  padding: 0 15px;
}
.site-owner-tools__trigger > i { color: #ff90a3; font-size: 17px; }
.site-owner-tools__trigger:hover { transform: translateY(-2px); }
.site-owner-tools__trigger:focus-visible,
.site-owner-tools__panel :where(a, button):focus-visible { outline: 3px solid rgba(217, 79, 106, .52); outline-offset: 3px; }
.site-owner-tools__panel {
  background: var(--site-owner-surface);
  border: 1px solid var(--site-owner-line);
  border-radius: 24px;
  bottom: 58px;
  box-shadow: 0 30px 86px rgba(26, 29, 38, .24);
  color: var(--site-owner-ink);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(10px) scale(.98);
  transform-origin: right bottom;
  transition: opacity .18s ease, transform .24s cubic-bezier(.16, 1, .3, 1);
  width: min(370px, calc(100vw - 28px));
}
.site-owner-tools.is-open .site-owner-tools__panel { opacity: 1; pointer-events: auto; transform: none; }
.site-owner-tools__panel > header { align-items: flex-start; border-bottom: 1px solid var(--site-owner-line); display: flex; justify-content: space-between; padding: 19px 16px 17px 20px; }
.site-owner-tools__panel > header > div { display: grid; gap: 4px; }
.site-owner-tools__panel > header small { color: var(--site-owner-accent); font-size: 10px; font-weight: 800; }
.site-owner-tools__panel > header strong { font-size: 17px; letter-spacing: -.025em; }
.site-owner-tools__panel > header span { color: var(--site-owner-muted); font-size: 11px; }
.site-owner-tools__panel > header button { align-items: center; background: transparent; border: 0; border-radius: 11px; color: var(--site-owner-muted); cursor: pointer; display: flex; flex: 0 0 40px; height: 40px; justify-content: center; }
.site-owner-tools__panel > header button:hover { background: rgba(37, 40, 49, .06); color: var(--site-owner-ink); }
.site-owner-tools__panel nav { display: grid; padding: 7px; }
.site-owner-tools__panel nav a { align-items: center; border-radius: 15px; display: grid; gap: 11px; grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 64px; padding: 8px 11px; transition: background-color .18s ease, transform .18s ease; }
.site-owner-tools__panel nav a:hover { background: rgba(37, 40, 49, .05); transform: translateX(2px); }
.site-owner-tools__panel nav a > i { align-items: center; background: rgba(37, 40, 49, .07); border-radius: 12px; color: var(--site-owner-ink); display: flex; font-size: 18px; height: 40px; justify-content: center; width: 40px; }
.site-owner-tools__panel nav a.is-current-page > i { background: rgba(217, 79, 106, .11); color: var(--site-owner-accent); }
.site-owner-tools__panel nav a > span { display: grid; gap: 4px; min-width: 0; }
.site-owner-tools__panel nav strong { font-size: 13px; }
.site-owner-tools__panel nav small { color: var(--site-owner-muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-owner-tools__panel nav b { background: rgba(217, 79, 106, .11); border-radius: 8px; color: var(--site-owner-accent); font-size: 9px; padding: 5px 7px; white-space: nowrap; }
.site-owner-tools__panel > footer { border-top: 1px solid var(--site-owner-line); padding: 12px 18px; }
.site-owner-tools__panel > footer a { align-items: center; color: var(--site-owner-accent); display: inline-flex; font-size: 12px; font-weight: 800; gap: 6px; min-height: 32px; }

/* R32: one empty-state grammar, with page-specific icon and copy instead of repeated blank cards. */
.site-empty-story {
  align-items: center;
  border-bottom: 1px solid var(--site-owner-line);
  border-top: 1px solid var(--site-owner-line);
  color: var(--site-owner-ink);
  display: grid;
  justify-items: center;
  margin: 46px auto;
  max-width: 780px;
  min-height: 360px;
  padding: clamp(52px, 8vw, 82px) 24px;
  text-align: center;
  width: 100%;
}
.site-empty-story,
.site-empty-story * { box-sizing: border-box; }
.site-empty-story__mark { align-items: center; color: var(--site-owner-accent); display: grid; grid-template-columns: minmax(54px, 108px) 44px minmax(54px, 108px); width: min(100%, 270px); }
.site-empty-story__mark > span { border-top: 1px solid currentColor; opacity: .35; position: relative; }
.site-empty-story__mark > span::after { background: currentColor; border-radius: 50%; content: ""; height: 5px; position: absolute; right: -2px; top: -3px; width: 5px; }
.site-empty-story__mark > span:last-child::after { left: -2px; right: auto; }
.site-empty-story__mark > i { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: flex; font-size: 20px; height: 44px; justify-content: center; }
.site-empty-story__copy { margin-top: 25px; max-width: 570px; }
.site-empty-story__copy h2 { color: inherit; font: 850 clamp(28px, 4.2vw, 46px)/1.08 system-ui, sans-serif; letter-spacing: -.045em; margin: 0; text-wrap: balance; }
.site-empty-story__copy p { color: var(--site-owner-muted); font: 400 14px/1.78 system-ui, sans-serif; margin: 16px auto 0; max-width: 48ch; text-wrap: pretty; }
.site-empty-story__actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 27px; }
.site-empty-story__actions a { align-items: center; border: 1px solid var(--site-owner-line); border-radius: 12px; display: inline-flex; font: 800 12px/1 system-ui, sans-serif; gap: 7px; min-height: 44px; padding: 0 16px; }
.site-empty-story__actions a.is-owner-action { background: var(--site-owner-night); border-color: var(--site-owner-night); color: #fff; }
.site-empty-story.is-compact { margin: 0; min-height: 250px; padding: 38px 18px; }
.site-empty-story.is-compact .site-empty-story__copy { margin-top: 18px; }
.site-empty-story.is-compact .site-empty-story__copy h2 { font-size: clamp(23px, 3vw, 32px); }

@media (max-width: 640px) {
  .site-owner-tools { bottom: calc(78px + env(safe-area-inset-bottom)); left: 12px; right: auto; }
  .site-owner-tools__trigger { min-height: 44px; padding-inline: 13px; }
  .site-owner-tools__panel { bottom: 54px; left: 0; max-height: min(570px, calc(100dvh - 158px)); overflow-y: auto; right: auto; transform-origin: left bottom; width: min(370px, calc(100vw - 24px)); }
  .site-empty-story { margin: 32px auto; min-height: 330px; padding: 52px 18px; }
  .site-empty-story__copy h2 { font-size: clamp(30px, 9.2vw, 39px); }
  .site-empty-story__copy p { font-size: 13px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-owner-ink: #f2f3f7;
    --site-owner-muted: #a6abb6;
    --site-owner-surface: #222630;
    --site-owner-line: rgba(255, 255, 255, .11);
    --site-owner-accent: #ef7790;
    --site-owner-night: #e96b84;
  }
  .site-owner-tools__panel nav a:hover,
  .site-owner-tools__panel > header button:hover { background: rgba(255, 255, 255, .06); }
  .site-empty-story__actions a.is-owner-action { color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  .site-owner-tools__trigger,
  .site-owner-tools__panel,
  .site-owner-tools__panel nav a { transition: none; }
}
