/* ═══════════════════════════════════════════════════════════════════
   THE KEEP — design v5 shell (loaded LAST; the revert switch)
   ─────────────────────────────────────────────────────────────────────
   The site becomes the building: a forged-iron RAIL of labeled doors
   (desktop) / a DOCK (mobile), the guild PULSE strip, rooms that
   morph while the shell stays pinned, and the quiet UNDERCROFT.

   Sections: 1 shell frame · 2 rail · 3 topbar+dock · 4 pulse ·
   5 room + plaque · 6 undercroft · 7 wayfinder · 8 keep sheet ·
   9 stamp + view transitions · 10 zone hues per room ·
   11 placards · 12 kill-switches
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. SHELL FRAME ───────────────────────────────────────────────── */
:root {
  --rail-w: 88px;
  --pulse-h: 38px;
  --dock-h: calc(64px + env(safe-area-inset-bottom, 0px));
}
/* the old chrome dies */
.mb-header, .mb-drawer, .mb-scrim, .mb-conveyor, .v4-footer .mb-footer__mark { }
.mb-header, .mb-drawer, .mb-scrim, .mb-conveyor { display: none !important; }

body { min-height: 100svh; }

.keep-main {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.keep-room { flex: 1 0 auto; }

@media (min-width: 1024px) {
  .keep-main { margin-left: var(--rail-w); }
  .keep-topbar { display: none; }
  .keep-dock { display: none; }
}
@media (max-width: 1023.98px) {
  .keep-rail { display: none; }
  .keep-main { padding-bottom: var(--dock-h); }
}

/* the old header offset padding is dead — rooms own their spacing */
.site-main { padding-top: 0; }

/* ── 2. THE RAIL ──────────────────────────────────────────────────── */
.keep-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background:
    linear-gradient(to bottom, rgba(26, 18, 10, 0.5), rgba(10, 7, 5, 0.7)),
    url('/img/textures/forged-512.webp') repeat,
    #14100b;
  border-right: 1px solid rgba(201, 168, 76, 0.28);
  view-transition-name: keep-rail;
}
.keep-rail__sigil {
  display: grid; place-items: center;
  padding: 14px 0 10px;
}
.keep-rail__sigilmark { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(240, 180, 69, 0.35)); }
.keep-rail__sigil:hover .keep-rail__sigilmark { filter: drop-shadow(0 0 14px rgba(240, 180, 69, 0.6)); }

.keep-rail__rooms {
  flex: 1;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  padding: 4px 0;
}
.keep-rail__rooms::-webkit-scrollbar { display: none; }

.keep-rail__grouplabel {
  display: block;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7a6c58;
  margin: 12px 0 3px;
}
.keep-rail__slot { position: relative; }
.keep-door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px;
  margin: 2px 8px;
  border-radius: 8px;
  color: #b7a88f;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color var(--dur-3, 200ms) var(--ease-out-quart),
              background-color var(--dur-3, 200ms) var(--ease-out-quart),
              border-color var(--dur-3, 200ms) var(--ease-out-quart);
}
.keep-ico { width: 22px; height: 22px; }
.keep-door__label {
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}
.keep-door:hover { color: #f0e2c4; background: rgba(201, 168, 76, 0.08); }
.keep-door.is-current {
  color: var(--au-solid, #e7c86a);
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: inset 0 0 14px rgba(232, 123, 30, 0.12);
}
.keep-door__ember {
  position: absolute;
  top: 4px; right: 10px;
  min-width: 15px; height: 15px;
  padding: 0 4px;
  display: grid; place-items: center;
  font-family: var(--font-ui);
  font-size: 0.6rem; font-weight: 700; font-style: normal;
  color: #180c04;
  background: linear-gradient(to bottom, #ffb347, #e8641e);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(232, 123, 30, 0.7);
}

/* flyouts */
.keep-flyout {
  position: absolute;
  left: calc(100% + 6px);
  top: 0;
  min-width: 230px;
  padding: 10px;
  background: rgba(16, 12, 8, 0.97);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity var(--dur-3, 200ms) var(--ease-out-quart),
              transform var(--dur-3, 200ms) var(--ease-out-quart),
              visibility 0s var(--dur-3, 200ms);
  z-index: 70;
}
.keep-rail__slot:hover .keep-flyout,
.keep-rail__slot:focus-within .keep-flyout,
.keep-flyout.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur-3, 200ms) var(--ease-out-quart),
              transform var(--dur-3, 200ms) var(--ease-out-quart);
}
.keep-flyout__plaque { margin: 0 0 6px; padding: 0 6px 8px; border-bottom: 1px solid rgba(201, 168, 76, 0.2); }
.dual { display: block; }
.dual b {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--au-solid, #e7c86a);
}
.dual span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: #9b8d78;
}
.keep-flyout a {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #d6c7ab;
  text-decoration: none;
}
.keep-flyout a:hover { background: rgba(201, 168, 76, 0.1); color: #fff3da; }

/* rail foot: find, user chip, THE join door */
.keep-find {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 6px 8px;
  padding: 9px 4px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.06);
  color: #d6c7ab;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  cursor: pointer;
}
.keep-find:hover { color: #fff3da; border-color: rgba(201, 168, 76, 0.6); }
.keep-rail__foot { padding: 0 8px 12px; display: grid; gap: 6px; }
.keep-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 4px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  background: none;
  color: #b7a88f;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  text-decoration: none;
  cursor: pointer;
}
.keep-chip:hover { color: #f0e2c4; border-color: rgba(201, 168, 76, 0.5); }
.keep-chip__mark { color: var(--au-solid, #e7c86a); font-size: 0.8rem; }
.keep-join {
  display: grid;
  place-items: center;
  padding: 10px 4px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1d0f05;
  background: linear-gradient(to bottom, #ffb347, #e8641e);
  box-shadow: 0 0 16px rgba(232, 123, 30, 0.45);
  animation: join-glow 3.6s var(--ease-inout, ease-in-out) infinite;
}
@keyframes join-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(232, 123, 30, 0.35); }
  50%      { box-shadow: 0 0 22px rgba(232, 123, 30, 0.7); }
}
.keep-join:hover { filter: brightness(1.12); }

/* ── 3. TOPBAR + DOCK (mobile) ────────────────────────────────────── */
.keep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  background:
    linear-gradient(to bottom, rgba(26, 18, 10, 0.6), rgba(10, 7, 5, 0.8)),
    url('/img/textures/forged-512.webp') repeat,
    #14100b;
  border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}
.keep-topbar__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--au-solid, #e7c86a);
  text-decoration: none;
}
.keep-topbar__sigil { width: 26px; height: 26px; }
.keep-chip--top { flex-direction: row; gap: 5px; padding: 5px 10px; font-size: 0.78rem; }

.keep-dock {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--dock-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background:
    linear-gradient(to top, rgba(10, 7, 5, 0.9), rgba(26, 18, 10, 0.7)),
    url('/img/textures/forged-512.webp') repeat,
    #14100b;
  border-top: 1px solid rgba(201, 168, 76, 0.3);
  view-transition-name: keep-dock;
}
.keep-dock__st {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #b7a88f;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.keep-dock__st.is-current { color: var(--au-solid, #e7c86a); }
.keep-dock__st .keep-door__ember { top: 6px; right: calc(50% - 22px); }
.keep-dock__sigil { width: 24px; height: 24px; }
.keep-dock__find .keep-ico {
  width: 30px; height: 30px;
  padding: 4px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(201, 168, 76, 0.1);
}

/* ── 4. THE PULSE ─────────────────────────────────────────────────── */
.keep-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--pulse-h);
  padding: 5px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(12, 9, 6, 0.85);
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  view-transition-name: keep-pulse;
}
.keep-pulse::-webkit-scrollbar { display: none; }
.keep-pulse__sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.pulse-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 11px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: #c9baa2;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s linear, border-color var(--dur-3, 200ms);
}
.pulse-chip:hover { border-color: rgba(201, 168, 76, 0.55); color: #f0e2c4; }
.pulse-chip--live { border-color: rgba(255, 75, 75, 0.5); color: #ffd9c9; }
.pulse-chip--live b { color: #ff6b57; font-weight: 700; }
.pulse-chip--dim { opacity: 0.65; }
.pulse-chip.is-swapping { opacity: 0; }

/* ── 5. THE ROOM + PLAQUE ─────────────────────────────────────────── */
.keep-room {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(14px, 2.5vw, 36px) var(--space-2xl, 4rem);
}
.room-plaque {
  position: relative;
  margin: 0 0 var(--space-l, 2rem);
  padding: clamp(1.8rem, 4.5vh, 3.2rem) 0 1.1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.28);
}
.room-plaque__name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--track-caps-bold, 0.06em);
  font-size: var(--step-4, 2.4rem);
  color: var(--au-solid, #e7c86a);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.room-plaque__plain {
  margin: 0.3rem 0 0;
  font-family: var(--font-ui);
  font-size: var(--step-0, 1.05rem);
  color: #a5967f;
}
.room-plaque--art { border-bottom: 0; }
.room-plaque--art::before {
  content: '';
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background-size: cover;
  background-position: center 45%;
  background-image: inherit;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
/* the pgart-- background lands on the plaque itself; ::before inherits
   it and the element hides its own copy */
.room-plaque--art { background-size: 0 0 !important; }

/* the 12-col room grid */
.room-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 899px) { .room-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }

/* ── 6. THE UNDERCROFT ────────────────────────────────────────────── */
.keep-undercroft {
  margin-top: var(--space-2xl, 4rem);
  padding: var(--space-l, 2rem) clamp(14px, 2.5vw, 36px) var(--space-l, 2rem);
  border-top: 1px solid rgba(201, 168, 76, 0.18);
  background: #0a0705;
}
.keep-undercroft__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-style: italic;
  color: #9b8d78;
  margin-bottom: 1rem;
}
.keep-undercroft__sigil { width: 30px; height: 30px; }
.keep-undercroft__rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px 20px;
  margin-bottom: 1rem;
}
.keep-undercroft__rooms a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: #8d7f6c;
  text-decoration: none;
  padding: 3px 0;
}
.keep-undercroft__rooms a b { color: #bba87f; font-weight: 600; }
.keep-undercroft__rooms a:hover, .keep-undercroft__rooms a:hover b { color: var(--au-solid, #e7c86a); }
.keep-undercroft__legal { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 0.6rem; }
.keep-undercroft__legal a { font-family: var(--font-ui); font-size: 0.78rem; color: #77695a; text-decoration: none; }
.keep-undercroft__legal a:hover { color: #bba87f; }
.keep-undercroft__copy { margin: 0; font-family: var(--font-ui); font-size: 0.74rem; color: #665a4c; }

/* home keeps the v4 second-hero footer as the Great Hall's back wall */
[data-room="hall"] .v4-footer { z-index: 0; }

/* ── 7. THE WAYFINDER ─────────────────────────────────────────────── */
.wf-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 3, 2, 0.7);
  backdrop-filter: blur(3px);
}
.wayfinder {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: grid;
  place-items: start center;
  padding: clamp(8px, 10vh, 90px) 12px 12px;
  pointer-events: none;
}
.wayfinder__frame {
  pointer-events: auto;
  position: relative;
  width: min(660px, 100%);
  background: #120d08;
  padding: 20px;
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
}
.wayfinder__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #a5967f;
  margin-bottom: 8px;
}
.wayfinder__input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: #f4e9d2;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
}
.wayfinder__input:focus { outline: 2px solid rgba(232, 123, 30, 0.55); outline-offset: 1px; }
.wayfinder__chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 4px; }
.wayfinder__chips button {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: none;
  color: #c9baa2;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  cursor: pointer;
}
.wayfinder__chips button:hover { border-color: rgba(201, 168, 76, 0.6); color: #f0e2c4; }
.wayfinder__results { overflow-y: auto; margin-top: 8px; }
.wayfinder__results .wf-group {
  font-family: var(--font-head);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a6c58;
  margin: 10px 4px 3px;
}
.wayfinder__results a {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: #d6c7ab;
  text-decoration: none;
}
.wayfinder__results a:hover, .wayfinder__results a.is-active {
  background: rgba(201, 168, 76, 0.12);
  color: #fff3da;
}
.wayfinder__empty { font-family: var(--font-ui); color: #a5967f; margin: 10px 4px 2px; }
.wayfinder__close {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: none;
  color: #c9baa2;
  cursor: pointer;
}

/* ── 8. THE KEEP SHEET (mobile rooms) ─────────────────────────────── */
.keep-sheet__scrim { position: fixed; inset: 0; z-index: 90; background: rgba(5, 3, 2, 0.7); }
.keep-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 91;
  max-height: 86svh;
  overflow-y: auto;
  background: #120d08;
  border-top: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 16px 16px 0 0;
  padding: 6px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}
.keep-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 2px;
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--au-solid, #e7c86a);
}
.keep-sheet__head button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(201,168,76,.3); background: none; color: #c9baa2; }
.keep-sheet__row {
  display: block;
  padding: 11px 8px;
  border-radius: 8px;
  text-decoration: none;
}
.keep-sheet__row b { display: block; font-family: var(--font-head); font-size: 0.92rem; letter-spacing: 0.05em; color: #e3d3ae; }
.keep-sheet__row span { display: block; font-family: var(--font-ui); font-size: 0.78rem; color: #9b8d78; }
.keep-sheet__row:active, .keep-sheet__row:hover { background: rgba(201, 168, 76, 0.09); }
.keep-sheet__join {
  display: block;
  margin: 12px 4px 4px;
  padding: 13px;
  text-align: center;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1d0f05;
  background: linear-gradient(to bottom, #ffb347, #e8641e);
}

/* ── 9. STAMP + VIEW TRANSITIONS ──────────────────────────────────── */
.keep-stamp {
  position: fixed;
  right: 18px;
  bottom: calc(var(--dock-h) + 8px);
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(201, 168, 76, 0.0);   /* invisible at rest; visible only inside the morph */
  pointer-events: none;
  z-index: 80;
  view-transition-name: room-stamp;
}
@media (min-width: 1024px) { .keep-stamp { bottom: 14px; } }
::view-transition-group(keep-rail),
::view-transition-group(keep-dock),
::view-transition-group(keep-pulse) { animation: none; }
::view-transition-old(keep-rail), ::view-transition-new(keep-rail),
::view-transition-old(keep-dock), ::view-transition-new(keep-dock),
::view-transition-old(keep-pulse), ::view-transition-new(keep-pulse) { animation: none; }
::view-transition-group(room-stamp) { animation-duration: 320ms; }

/* the room morph: exhale down, inhale up */
::view-transition-old(root) { animation: keep-out 200ms cubic-bezier(0.65, 0, 0.35, 1) both; }
::view-transition-new(root) { animation: keep-in 350ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes keep-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes keep-in  { from { opacity: 0; transform: translateY(-12px); } }

/* ── 10. ZONE HUES PER ROOM (the building re-lights as you move) ──── */
body[data-room="hall"]       { --zh-room: 32 80% 50%; }
body[data-room="hearth"]     { --zh-room: 20 92% 50%; }
body[data-room="company"]    { --zh-room: 40 72% 52%; }
body[data-room="almanac"]    { --zh-room: 212 42% 52%; }
body[data-room="archive"]    { --zh-room: 36 30% 58%; }
body[data-room="codex"]      { --zh-room: 258 45% 48%; }
body[data-room="tavern"]     { --zh-room: 30 78% 46%; }
body[data-room="threshold"]  { --zh-room: 26 88% 54%; }
body[data-room="saga"]       { --zh-room: 38 55% 45%; }
body[data-room="undercroft"] { --zh-room: 30 12% 40%; }
body[data-room] .keep-main {
  background:
    radial-gradient(110% 60% at 50% 0%, hsl(var(--zh-room, 24 90% 48%) / 0.075), transparent 62%),
    transparent;
}
/* room hue also drives the ambient zone default inside this room */
body[data-room] .zone { --zh: var(--zh-room); }

/* ── 11. PLACARDS (G1 — "Explain everything") ─────────────────────── */
.placard {
  display: none;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: #9b8d78;
  margin-top: 2px;
}
html.u-placards .placard { display: block; }

/* ── 12. KILL-SWITCHES ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .keep-join { animation: none; box-shadow: 0 0 14px rgba(232, 123, 30, 0.45); }
  .pulse-chip { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
html.u-calm .keep-join { animation: none; box-shadow: 0 0 14px rgba(232, 123, 30, 0.45); }
html.t-low .keep-rail, html.t-low .keep-dock, html.t-low .keep-topbar { background-image: none; background-color: #14100b; }

/* ── full-bleed corrections: the viewport now starts after the rail ── */
.keep-main { --bleed: 100vw; }
@media (min-width: 1024px) { .keep-main { --bleed: calc(100vw - var(--rail-w)); } }
.keep-main .v4hero,
.keep-main .page-header--art,
.keep-main .banner-marquee {
  width: var(--bleed);
  margin-left: calc(50% - var(--bleed) / 2);
}
.room-plaque--art::before { inset: 0 calc(50% - var(--bleed) / 2); }
/* the hero no longer hides under a fixed header — it starts at the pulse */
.keep-main .v4hero { margin-top: 0; padding-top: var(--space-xl, 3rem); }
.keep-main .v4hero--after-flash { margin-top: 0; }

/* ── the Atlas page ─────────────────────────────────────────────── */
.atlas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.atlas__group h2 { font-size: 0.72rem; margin: 0 0 8px; }
.atlas__row {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: #c9baa2;
  text-decoration: none;
}
.atlas__row:hover { background: rgba(201, 168, 76, 0.09); color: #fff3da; }

/* ── responsive arbitration (must be last: wins the cascade) ──────── */
@media (min-width: 1024px) {
  .keep-dock, .keep-topbar { display: none; }
}
@media (max-width: 1023.98px) {
  .keep-rail { display: none; }
  .keep-dock { display: grid; }
  .keep-topbar { display: flex; }
}

/* ── room components ─────────────────────────────────────────────── */
.pstat { display: inline-grid; gap: 1px; padding: 10px 16px; border: 1px solid rgba(201,168,76,.3); border-radius: 6px; background: linear-gradient(to bottom, rgba(26,20,12,.9), rgba(14,11,7,.9)); }
.pstat b { font-family: var(--font-head); font-size: var(--step-2, 1.5rem); color: var(--au-solid, #e7c86a); font-variant-numeric: tabular-nums; }
.pstat span { font-family: var(--font-ui); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #9b8d78; }
.pstat--dim { opacity: .6; }

.live-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid rgba(255,75,75,.4); border-radius: 999px; font-family: var(--font-ui); font-size: .84rem; color: #ffd9c9; text-decoration: none; }
.live-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4b4b; box-shadow: 0 0 8px rgba(255,75,75,.8); }
.live-chip b { color: #fff; font-weight: 600; }
.live-chip span { color: #d9a99a; font-size: .76rem; }

.next-hearth { display: block; padding: 10px 14px; border-left: 2px solid rgba(232,123,30,.6); font-family: var(--font-body); font-size: 1.02rem; color: #cbbc9e; text-decoration: none; }
.next-hearth b { color: var(--au-solid, #e7c86a); }
.next-hearth:hover { background: rgba(201,168,76,.06); }

.almanac-line { font-family: var(--font-body); font-style: italic; font-size: var(--step-0, 1.06rem); color: #b3a488; margin: .4rem 0 0; }

.deed { list-style: none; font-family: var(--font-body); font-size: .98rem; color: #cbbc9e; padding: 6px 0; border-bottom: 1px solid rgba(201,168,76,.12); }
.deed time { font-family: var(--font-ui); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8d7f6c; margin-right: 8px; }
.deed a { color: inherit; text-decoration: none; }
.deed a:hover { color: #f0e2c4; }

.door { position: relative; display: block; min-height: 150px; padding: 16px; border: 1px solid rgba(201,168,76,.28); border-radius: 10px; overflow: clip; text-decoration: none; background-size: cover; background-position: center bottom; }
.door::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,7,5,.94) 25%, rgba(10,7,5,.45)); }
.door > * { position: relative; }
.door h3 { margin: 90px 0 2px; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .05em; text-transform: uppercase; color: #e3d3ae; }
.door p { margin: 0; font-family: var(--font-ui); font-size: .8rem; color: #a5967f; }
.door:hover { border-color: rgba(201,168,76,.6); }
.door:hover h3 { color: var(--au-solid, #e7c86a); }

.bstrip { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 1px solid rgba(201,168,76,.2); border-radius: 8px; margin-bottom: 8px; text-decoration: none; background: rgba(20,16,11,.6); }
.bstrip__time { font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--au-solid, #e7c86a); min-width: 74px; }
.bstrip__title { font-family: var(--font-ui); font-size: .92rem; color: #e0d2b6; flex: 1; }
.bstrip__who { font-family: var(--font-ui); font-size: .78rem; color: #9b8d78; }
.bstrip:hover { border-color: rgba(201,168,76,.5); }
.bstrip.is-live { border-color: rgba(255,75,75,.45); }


/* ═══════════ v5 ROOM CSS (merged from room fan-out) ═══════════ */

/* ═══ GREAT HALL — THE HERALD (v5 §3.3): state kicker + cover lines ═══ */
.hp-herald__kicker { margin: 0 0 0.45rem; font-size: 0.95rem; letter-spacing: 0.22em; color: var(--gold-bright, #e7c869); }
.hp-herald__kicker--live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ember-2, #ffb347); }
.hp-covers { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; margin-top: 1.6rem; }
.hp-cover { font-size: 0.78rem; letter-spacing: 0.16em; text-decoration: none; padding: 0.2rem 0.6rem; color: #8f8069; transition: color 0.2s ease; }
.hp-cover::before { content: '\2726  '; color: var(--ember-1, #ff4d00); opacity: 0.7; }
.hp-cover:hover, .hp-cover:focus-visible { color: var(--ember-2, #ffb347); }
.hp-herald--event .v4hero__title { font-size: clamp(2rem, 6vw, 4.2rem); }
@media (max-width: 640px) { .hp-covers { margin-top: 1.2rem; } .hp-cover { font-size: 0.72rem; letter-spacing: 0.12em; } }
body.u-calm .hp-cover, html.u-calm .hp-cover { transition: none; }

/* ─── THE HEARTH (/live) room extras — design v5 §4.2 ─── */
body[data-room="hearth"] .hearth-pstats { display: flex; flex-wrap: wrap; gap: 10px; margin: .5rem 0 .35rem; }
body[data-room="hearth"] .hearth-chip-rail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 22px; }
body[data-room="hearth"] .hearth-chip-rail__label { font-family: var(--font-ui); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #9b8d78; }
body[data-room="hearth"] .hearth-banked-panel { position: relative; overflow: hidden; border: 1px solid rgba(201,168,76,.22); border-radius: 8px; padding: clamp(20px, 4vw, 36px); background: linear-gradient(to bottom, rgba(26,20,12,.92), rgba(14,11,7,.95)); }
body[data-room="hearth"] .hearth-banked-panel.pgart--hearth::before { content: ""; position: absolute; inset: 0; background-position: center 30%; background-size: cover; opacity: .14; filter: saturate(.55) brightness(.7); pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
body[data-room="hearth"] .hearth-banked-panel > * { position: relative; }
body[data-room="hearth"] .hearth-next-list { display: grid; gap: 8px; margin-top: 14px; max-width: 560px; }

/* ── ROOM: THE ALMANAC (/schedule + /events/:key) — group: almanac ── */
.alm-plain {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: #9b8d78;
  margin: -0.2rem 0 1rem;
  max-width: 62ch;
}

/* NOW / NEXT strip under the plaque */
.alm-next { margin: 1.8rem 0 2.4rem; }
.alm-next .bstrip__time { min-width: 128px; }
.alm-next .bstrip__time time { font-variant-numeric: tabular-nums; }

/* #campaigns — the Events shelf (absorbed /events index) */
.alm-campaigns { margin-top: 3.2rem; scroll-margin-top: 84px; }
.alm-campaigns .hp-event-grid { margin-top: 0.4rem; }
.alm-past { margin-top: 1.6rem; }
.alm-past summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9b8d78;
  padding: 8px 2px;
}
.alm-past summary:hover { color: var(--au-solid, #e7c86a); }
.alm-past[open] summary { margin-bottom: 0.8rem; }

/* Campaign detail — engraved meta plaques (timestamps run long) */
.alm-metaplaques { display: flex; flex-wrap: wrap; gap: 12px; margin: 0.4rem 0 0.8rem; }
.alm-metaplaques .pstat b { font-size: 1.02rem; letter-spacing: 0.02em; }
.alm-rewards {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: #b3a488;
  margin: 0.6rem 0 0;
}

/* The Muster Roll — parchment sign-up panel; form guts untouched */
.muster {
  margin-top: 2rem;
  padding: 18px 20px 20px;
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(to bottom, rgba(46, 37, 24, 0.55), rgba(24, 19, 12, 0.7)),
    rgba(20, 16, 11, 0.6);
}
.muster .engraved { margin-top: 0; }
.muster__plain {
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: #9b8d78;
  margin: 0.2rem 0 0.8rem;
}
.muster__count {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: #cbbc9e;
  margin: 0 0 0.9rem;
}
.muster__count b {
  font-family: var(--font-head);
  color: var(--au-solid, #e7c86a);
  font-variant-numeric: tabular-nums;
}

/* ═══ ROOM CSS — THE ARCHIVE (§4.7) + THE CHRONICLE (§4.8) ═══ */

/* vote buttons: 0.97 press-scale (§4.7.1) — chrome only, forms untouched */
body[data-room="archive"] .hp-vote { transition: transform .12s ease; }
body[data-room="archive"] .hp-vote:active { transform: scale(.97); }

/* Clip-of-the-Month podium: 7/5 asymmetric split — blessed-frame stage + engraved stat plaques */
.arch-podium__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.arch-podium__stats { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
@media (max-width: 899px) {
  .arch-podium__grid { grid-template-columns: minmax(0, 1fr); }
  .arch-podium__stats { flex-direction: row; flex-wrap: wrap; }
}

/* deep shelves (#vods) + Chronicle teaser: hairline-ruled quiet bands */
.arch-vods, .arch-chronicle { border-top: 1px solid rgba(201, 168, 76, .14); padding-top: 24px; }
.arch-chronicle__list { list-style: none; margin: 0; padding: 0; max-width: 70ch; }

/* THE CHRONICLE — the reading room */
.chron-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; align-items: start; max-width: 1100px; }
@media (max-width: 899px) { .chron-grid { grid-template-columns: minmax(0, 1fr); } }

.chron-entry { padding: 28px 0; border-bottom: 1px solid rgba(201, 168, 76, .14); max-width: 70ch; }
.chron-entries .chron-entry:first-child { padding-top: 8px; }
.chron-entry__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.chron-entry__date { font-family: var(--font-ui, Inter, sans-serif); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #8d7f6c; }
.chron-entry__title { font-family: var(--font-head, Cinzel, serif); font-size: var(--step-2, 1.5rem); color: #f0e2c4; margin: 0; }
.chron-entry__pin { margin-left: 10px; vertical-align: middle; }
.chron-entry__image { max-width: 100%; border-radius: 8px; border: 1px solid rgba(201, 168, 76, .2); margin: 0 0 14px; }
.chron-entry__body { font-family: var(--font-body, 'Crimson Pro', serif); font-size: 1.08rem; line-height: 1.65; color: #cbbc9e; white-space: pre-line; margin: 0; }
.chron-entry__body::first-letter { font-family: var(--font-head, Cinzel, serif); font-size: 3.1em; line-height: .85; float: left; padding: 4px 10px 0 0; color: var(--au-solid, #e7c86a); }

.chron-side { position: sticky; top: 84px; border: 1px solid rgba(201, 168, 76, .18); border-radius: 8px; background: linear-gradient(to bottom, rgba(26, 20, 12, .7), rgba(14, 11, 7, .7)); padding: 18px 20px; }
.chron-side__title { font-family: var(--font-head, Cinzel, serif); font-size: 1rem; letter-spacing: .06em; color: #e7c86a; margin: 0 0 2px; }
.chron-side__plain { font-family: var(--font-ui, Inter, sans-serif); font-size: .8rem; color: #9b8d78; margin: 0 0 10px; }
.chron-side__deeds { list-style: none; margin: 0 0 14px; padding: 0; }
.chron-side__door { display: block; font-family: var(--font-ui, Inter, sans-serif); font-size: .85rem; color: #cbbc9e; text-decoration: none; border-top: 1px solid rgba(201, 168, 76, .14); padding-top: 12px; }
.chron-side__door b { color: #e7c86a; }
.chron-side__door:hover { color: #f0e2c4; }
@media (max-width: 899px) { .chron-side { position: static; } }

/* ═══ ROOM: THE CODEX (/world) — bestiary gallery, places plates,
   legends wing, how-to (codex room group) ═══ */

/* plaque jump-nav (Monsters · Places · Top players · How to play) */
.codex-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.codex-jump__link { font-family: var(--font-ui); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: #cbb87e; padding: 6px 12px; border: 1px solid rgba(201,168,76,.35); border-radius: 999px; background: rgba(14,11,7,.55); }
.codex-jump__link:hover { color: var(--au-solid, #e7c86a); border-color: rgba(201,168,76,.65); }

/* wings + deep-link anchors clear the pinned pulse */
.codex-wing { padding: 28px 0 8px; }
[data-room="codex"] .codex-wing, [data-room="codex"] .codex-mon { scroll-margin-top: 64px; }
.codex-wing__title { margin-bottom: 4px; }
.codex-wing__plain { margin: 0 0 18px; font-family: var(--font-ui); color: #a5967f; font-size: .95rem; max-width: 62ch; }

/* bestiary gallery — asymmetric: bosses take the wide frames */
.codex-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.codex-gallery > .codex-page { grid-column: span 4; }
.codex-gallery > .codex-page--boss { grid-column: span 6; }
.codex-gallery > .codex-page:nth-child(6n+1):not(.codex-page--boss) { grid-column: span 5; }
@media (max-width: 1100px) {
  .codex-gallery > .codex-page, .codex-gallery > .codex-page:nth-child(6n+1):not(.codex-page--boss) { grid-column: span 6; }
  .codex-gallery > .codex-page--boss { grid-column: span 12; }
}
@media (max-width: 640px) {
  .codex-gallery > .codex-page, .codex-gallery > .codex-page--boss, .codex-gallery > .codex-page:nth-child(6n+1):not(.codex-page--boss) { grid-column: span 12; }
}

/* engraved stat plate inside a bestiary card (placard captions in .pstat) */
.codex-page__plate { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.codex-page__plate .pstat { padding: 6px 10px; }
.codex-page__plate .pstat b { font-size: 1.02rem; }
.codex-mon__reward .placard { display: block; white-space: normal; }

/* places wing — roam chips link into the bestiary anchors */
.codex-roam { display: flex; flex-wrap: wrap; gap: 8px; }
.codex-roam__chip { font-family: var(--font-ui); font-size: .82rem; text-decoration: none; color: #d8c9a6; padding: 6px 12px; border: 1px solid rgba(201,168,76,.3); border-radius: 6px; background: rgba(20,16,10,.6); }
.codex-roam__chip:hover { color: var(--au-solid, #e7c86a); border-color: rgba(201,168,76,.6); }

/* legends wing — signed-in viewer's own row, torch-marked */
[data-room="codex"] .lgd-table tr.is-you td { background: rgba(201,168,76,.12); }
[data-room="codex"] .lgd-table tr.is-you td:first-child { box-shadow: inset 3px 0 0 var(--au-solid, #e7c86a); }
[data-room="codex"] .lgd-spot.is-you { outline: 1px solid rgba(201,168,76,.55); outline-offset: 4px; }

/* how-to wing — three plain steps */
.codex-howto { padding-bottom: 34px; }
.codex-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; max-width: 640px; }
.codex-steps__step { display: flex; align-items: flex-start; gap: 14px; font-family: var(--font-body); font-size: 1.02rem; color: #cbbc9e; }
.codex-steps__step strong { color: #f0e2c4; }
.codex-steps__num { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.05rem; color: var(--au-solid, #e7c86a); border: 1px solid rgba(201,168,76,.45); border-radius: 50%; background: rgba(20,16,10,.7); }

/* ═══ v5 rooms: tavern-hall group (Tavern /merch · Hall /community · Company /creators · Threshold /join) ═══ */

/* — THE TAVERN (/merch): wallet row inside the room plaque + #earn panel — */
.tav-plaque-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.tav-login { font-family: var(--font-ui); font-size: .85rem; color: var(--au-solid, #e7c86a); text-decoration: underline; text-underline-offset: 3px; }
.tav-earn-link { font-family: var(--font-ui); font-size: .8rem; color: #a5967f; text-decoration: none; }
.tav-earn-link:hover, .tav-earn-link:focus-visible { color: var(--au-solid, #e7c86a); }
.tav-earn { max-width: 720px; margin: 48px auto 40px; padding: 24px 28px; border: 1px solid rgba(201,168,76,.28); border-radius: 10px; background: linear-gradient(to bottom, rgba(26,20,12,.92), rgba(14,11,7,.92)); }
.tav-earn h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: #e3d3ae; }
.tav-earn__plain { margin: 0 0 12px; font-family: var(--font-ui); font-size: .9rem; color: #a5967f; }
.tav-earn__list { margin: 0 0 16px; padding-left: 18px; font-family: var(--font-body); font-size: .95rem; line-height: 1.6; color: #c9bda6; }
.tav-earn__list b { color: var(--au-solid, #e7c86a); font-weight: 600; }
.tav-earn__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* — THE HALL (/community): six-door grid + spotlight plaque + props feed — */
.co-doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 8px 0 28px; }
.co-doors .door { min-height: 190px; }
.co-band { max-width: 760px; margin-inline: auto; }
.co-plain { margin: 4px 0 16px; text-align: center; font-family: var(--font-ui); font-size: .9rem; color: #a5967f; }
.co-plain b { color: var(--au-solid, #e7c86a); font-weight: 600; }
.co-spot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px; padding: 18px 22px; border: 1px solid rgba(201,168,76,.35); border-radius: 8px; background: linear-gradient(to bottom, rgba(26,20,12,.9), rgba(14,11,7,.9)); }
.co-spot__mark { color: var(--au-solid, #e7c86a); }
.co-spot__name { font-family: var(--font-head); font-size: 1.2rem; color: var(--au-solid, #e7c86a); }
.co-spot__line { font-family: var(--font-body); color: #c9bda6; }
.co-deeds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* — THE COMPANY (/creators): live-first roster, live badge + rim — */
.hp-creator .co-live-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(232,100,30,.5); background: rgba(232,100,30,.12); font-family: var(--font-ui); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #f2a03d; }
.co-live-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 6px #ff5a3c; }
.hp-creator.is-live { border-color: rgba(232,100,30,.55); box-shadow: 0 0 18px rgba(232,100,30,.18); }

/* ══ SAGA + UNDERCROFT rooms (group: saga-undercroft) ══════════════ */

/* /about — prologue + plain sub-lines */
.saga-prologue { max-width: 68ch; }
.saga-plain { margin: -0.4rem 0 1.2rem; font-family: var(--font-ui); font-size: .92rem; color: #a5967f; }
.saga-crosslink { margin: -0.6rem 0 1.4rem; font-family: var(--font-ui); font-size: .88rem; color: #9b8d78; }
.saga-crosslink a { color: #cbb56a; }

/* the vertical rule-draw guild timeline with era plaques */
.saga-timeline { position: relative; margin: 0; padding: 0 0 0 28px; list-style: none; max-width: 62ch; }
.saga-timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, rgba(201,168,76,.55), rgba(201,168,76,.06)); }
.saga-mile { position: relative; padding: 10px 0 20px; }
.saga-mile::before { content: ''; position: absolute; left: -24px; top: 16px; width: 9px; height: 9px; transform: rotate(45deg); background: #0e0b07; border: 1px solid rgba(201,168,76,.6); }
.saga-mile__title { margin: 0 0 3px; font-family: var(--font-head); font-size: 1rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--au-solid, #e7c86a); }
.saga-mile__text { margin: 0; font-family: var(--font-body); font-size: 1rem; color: #cbbc9e; }

/* #founders — the Founders' Roll: engraved portrait plaques */
.saga-roll__group { margin: 0 0 1.6rem; }
.saga-roll__label { margin: 0 0 .7rem; font-family: var(--font-ui); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #9b8d78; }
.saga-roll__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.saga-founder { display: grid; justify-items: center; gap: 8px; padding: 18px 12px 14px; text-align: center; text-decoration: none; border: 1px solid rgba(201,168,76,.3); border-radius: 8px; background: linear-gradient(to bottom, rgba(26,20,12,.9), rgba(14,11,7,.92)); transition: border-color .2s ease, transform .2s ease; }
.saga-founder:hover { border-color: rgba(201,168,76,.6); transform: translateY(-2px); }
.saga-founder--gold { border-color: rgba(201,168,76,.55); box-shadow: inset 0 0 24px rgba(201,168,76,.06); }
.saga-founder__pfp { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(201,168,76,.4); }
.saga-founder__pfp--initial { display: grid; place-items: center; font-family: var(--font-head); font-size: 1.6rem; color: #e7c86a; background: #1a140c; }
.saga-founder__name { font-family: var(--font-head); font-size: .98rem; letter-spacing: .04em; color: #e3d3ae; }
.saga-founder__role { font-family: var(--font-ui); font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; color: #9b8d78; }
.saga-roll__empty, .saga-roll__more { font-family: var(--font-ui); font-size: .9rem; color: #9b8d78; }
.saga-roll__more a, .saga-roll__empty a { color: #cbb56a; }

/* the quiet "want in?" band */
.saga-invite__line { margin: 0 0 1rem; font-family: var(--font-body); font-style: italic; font-size: 1.08rem; color: #cbbc9e; }

/* ── the undercroft ledger nav (contact + policies cross-link) ── */
.uc-ledger { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: var(--space-l, 2rem) 0 0; padding-top: 14px; border-top: 1px solid rgba(201,168,76,.16); font-family: var(--font-ui); font-size: .85rem; letter-spacing: .04em; }
.uc-ledger a { color: #9b8d78; text-decoration: none; }
.uc-ledger a:hover { color: var(--au-solid, #e7c86a); }
.uc-ledger span[aria-current] { color: var(--au-solid, #e7c86a); }

/* ── policy pages: engraved meta line + drop-cap clauses ── */
.uc-policy .policy-meta { font-family: var(--font-ui); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: #8d7f6c; margin-bottom: var(--space-m, 1.25rem); }
.uc-policy .policy-body { max-width: 72ch; font-family: var(--font-body); font-size: 1.02rem; line-height: 1.65; color: #cbbc9e; }
.uc-policy .policy-body > p:first-of-type::first-letter { float: left; font-family: var(--font-head); font-size: 3.1em; line-height: .82; padding: .06em .12em 0 0; color: var(--au-solid, #e7c86a); }
.uc-policy .policy-history { margin-top: var(--space-m, 1.25rem); font-family: var(--font-ui); font-size: .88rem; color: #9b8d78; }
.uc-policy .policy-history summary { cursor: pointer; color: #cbb56a; }

/* ═══ URGENT FIXES (owner review round 1) ═══════════════════════════ */

/* 1. dialogs start CLOSED: the [hidden] attribute must always win —
      our display rules were overriding it, leaving the Wayfinder stuck
      open on every page */
.wayfinder[hidden], .wf-scrim[hidden],
.keep-sheet[hidden], .keep-sheet__scrim[hidden],
.keep-flyout[hidden] { display: none !important; }

/* 2. the v4 sticky under-reveal footer is structurally impossible
      inside the Keep's flex column — on home it floated over the whole
      page. It is now the room's static back wall. */
.keep-main .v4-footer {
  position: static;
  min-height: 0;
  padding-top: var(--space-2xl, 4rem);
}
.keep-main.site-over::after { display: none; }
.keep-main .v4-footer__motto { font-size: clamp(2.2rem, 7vw, 6rem); }

/* the room owns its stacking — content always above decorative layers */
.keep-room { position: relative; z-index: 1; }

/* ── the 404 signpost ─────────────────────────────────────────────── */
.signpost { max-width: 640px; margin: 0 auto; padding: var(--space-xl, 3rem) 0; text-align: center; }
.signpost__sigil { width: 56px; height: 56px; margin: 0 auto var(--space-s, 1rem); display: block; filter: drop-shadow(0 0 14px rgba(240,180,69,.4)); }
.signpost__title { font-family: var(--font-head); font-size: var(--step-3, 1.9rem); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .6rem; }
.signpost__lede { font-family: var(--font-ui); color: #a5967f; margin: 0 0 1.4rem; }
.signpost__extra { margin: 0 0 1.2rem; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.signpost__rooms { display: grid; gap: 4px; text-align: left; margin-bottom: 1.6rem; }
.signpost__row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid rgba(201,168,76,.18); border-radius: 8px; text-decoration: none; }
.signpost__row b { font-family: var(--font-head); font-size: .9rem; letter-spacing: .05em; color: #e3d3ae; white-space: nowrap; }
.signpost__row span { font-family: var(--font-ui); font-size: .82rem; color: #9b8d78; text-align: right; }
.signpost__row:hover { border-color: rgba(201,168,76,.5); }
.signpost__row:hover b { color: var(--au-solid, #e7c86a); }
