:root { --site-chrome-header-space: 90px; --site-chrome-footer-space: 76px; }
html[data-oracle-chrome] { scrollbar-gutter: stable; }
html[data-oracle-chrome] body { position: relative; min-height: 100svh; }
.oracle-site-header, .oracle-site-footer {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  color: #e9d9b9; box-sizing: border-box; text-shadow: 0 2px 12px #02060dc9;
}
.oracle-site-header {
  position: fixed; top: calc(20px + env(safe-area-inset-top, 0px)); left: 3.25vw; right: 3.25vw;
  z-index: 400; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 48px; pointer-events: none; isolation: isolate;
}
/* Clip scrolling text below navigation; the chamber background stays untouched. */
html[data-oracle-chrome] .sample-main,
html[data-oracle-chrome] .auth-main,
html[data-oracle-chrome] .library-main,
html[data-oracle-chrome] .collection-main,
html[data-oracle-chrome] body[data-site-page='info'] > .standalone-info {
  -webkit-clip-path: inset(var(--site-chrome-content-clip-top, 0px) -100vw -100vh -100vw);
  clip-path: inset(var(--site-chrome-content-clip-top, 0px) -100vw -100vh -100vw);
}
html[data-oracle-chrome] .standalone-info .info-folio section {
  scroll-margin-top: calc(var(--site-chrome-header-space) + env(safe-area-inset-top, 0px));
}
.oracle-site-header a, .oracle-site-footer a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.oracle-site-header a { pointer-events: auto; }
body[data-card-dialog='true'] > .oracle-site-header,
body[data-card-dialog='true'] > .oracle-site-footer,
.oracle-site-header[hidden], .oracle-site-footer[hidden] { display: none !important; }
.oracle-site-wordmark { display: inline-flex; align-items: center; gap: 12px; color: #eed19b !important; font-size: clamp(16px, 1.5vw, 24px); letter-spacing: .12em; white-space: nowrap; }
.oracle-site-seal { flex: 0 0 auto; display: block; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 5px #01040970); }
.oracle-site-brand-name { line-height: 1.2; }
.oracle-site-navigation { display: grid; grid-template-columns: 80px 90px 150px; align-items: center; gap: 0; }
.oracle-site-link { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 12px; font-size: 15px; line-height: 1.3; white-space: nowrap; }
.oracle-site-link:last-child { padding-right: 0; }
.oracle-site-link + .oracle-site-link::before { content: ''; position: absolute; left: 0; top: 14px; height: 16px; width: 1px; background: #b99c6357; }
.oracle-back-arrow { font-size: 23px; line-height: 1; color: #d5b779; }
.oracle-site-link:hover, .oracle-site-footer a:hover { color: #fff0cc; }
.oracle-site-link[aria-current='page'] { color: #edc888; }
.oracle-site-link[aria-disabled='true'] { opacity: .48; cursor: wait; }
.oracle-reading-count { display: none; }
.oracle-reading-count[hidden] { display: none; }
.oracle-site-header a:focus-visible, .oracle-site-footer a:focus-visible { outline: 1px solid #e7c78c; outline-offset: 4px; }
.oracle-site-footer {
  position: absolute; bottom: calc(13px + env(safe-area-inset-bottom, 0px)); right: 3.25vw; z-index: 400;
  display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 0 17px;
  max-width: calc(100% - 6.5vw); padding: 5px 12px; background: #08121ac4; border-top: 1px solid #b5975438;
}
.oracle-site-footer a { position: relative; padding: 8px 0; font-size: 11px; line-height: 1.5; }
.oracle-site-footer a + a::before { content: '·'; position: absolute; left: -10px; color: #b69660; }
.oracle-site-footer a[aria-current='page'] { color: #f1cd8a; }
.oracle-account-strip { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 12px auto 8px; color: #d6c5a5; text-shadow: 0 2px 8px #020509; }
.oracle-account-strip p { margin: 0; max-width: 650px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.oracle-account-strip a { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; color: #e4c68e; font-size: 13px; border-bottom: 1px solid #b5945659; }
.oracle-account-strip a:hover { color: #fff0cc; }
body[data-stage='casket'] > .oracle-site-footer,
body[data-stage='reading'] > .oracle-site-footer,
body[data-reader-open='true'] > .oracle-site-footer { position: fixed; }
/* Keep the legacy hooks for their controllers, with one visible navigation. */
html[data-oracle-chrome] .brand-bar,
html[data-oracle-chrome] .casket-navigation,
html[data-oracle-chrome] .library-header,
html[data-oracle-chrome] .library-footer,
html[data-oracle-chrome] #numbers-stage > .back-button,
html[data-oracle-chrome] #numbers-stage > .number-new-reading,
html[data-oracle-chrome] .stage-header,
html[data-oracle-chrome] .reader-nav,
html[data-oracle-embedded] .reader-nav,
html[data-oracle-chrome] .result-nav,
html[data-oracle-embedded] .result-nav,
html[data-oracle-chrome] #reading-back-to-card,
html[data-oracle-embedded] #reading-back-to-card,
html[data-oracle-chrome] #continuation-return-button,
html[data-oracle-embedded] #continuation-return-button { display: none !important; }
html[data-oracle-chrome] .library-shell { padding-top: calc(var(--site-chrome-header-space) + env(safe-area-inset-top, 0px)); padding-bottom: var(--site-chrome-footer-space); }
html[data-oracle-chrome] .library-heading { margin-top: 12px; }
html[data-oracle-chrome] .library-list { max-height: min(660px, max(340px, calc(100svh - 356px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)))); }
html[data-oracle-chrome] .reader-main,
html[data-oracle-embedded] .reader-main { padding-top: calc(var(--site-chrome-header-space) - 24px + env(safe-area-inset-top, 0px)); padding-bottom: var(--site-chrome-footer-space); }
html[data-oracle-chrome] .three-card-result,
html[data-oracle-embedded] .three-card-result { padding-top: calc(var(--site-chrome-header-space) + env(safe-area-inset-top, 0px)); padding-bottom: var(--site-chrome-footer-space); }
html[data-oracle-chrome] #topics-stage { padding-bottom: calc(var(--site-chrome-footer-space) + env(safe-area-inset-bottom, 0px)); }
html[data-oracle-chrome] .chamber-notes { margin-bottom: 8px; }
html[data-oracle-chrome] #numbers-stage { padding-bottom: calc(var(--site-chrome-footer-space) + env(safe-area-inset-bottom, 0px)); }
html[data-oracle-chrome] .ritual-continuation-page,
html[data-oracle-embedded] .ritual-continuation-page { top: calc(var(--site-chrome-header-space) + env(safe-area-inset-top, 0px)); padding-bottom: var(--site-chrome-footer-space); }
html[data-oracle-chrome] .card-reading-page,
html[data-oracle-embedded] .card-reading-page { top: calc(var(--site-chrome-header-space) + env(safe-area-inset-top, 0px)); padding-top: 0; padding-bottom: var(--site-chrome-footer-space); }
html[data-oracle-chrome] .casket-unseal-footer,
html[data-oracle-embedded] .casket-unseal-footer { bottom: calc(var(--site-chrome-footer-space) + 12px + env(safe-area-inset-bottom, 0px)); }
html[data-oracle-chrome] .card-display-footer,
html[data-oracle-embedded] .card-display-footer { bottom: var(--site-chrome-footer-space); }
@media (min-width: 601px) and (max-width: 900px) {
  .oracle-site-header { gap: 12px; }
  .oracle-site-wordmark { gap: 9px; font-size: 16px; letter-spacing: .105em; }
  .oracle-site-seal { width: 38px; height: 38px; }
  .oracle-site-navigation { grid-template-columns: 60px 67px 119px; }
  .oracle-site-link { padding-inline: 8px; font-size: 13px; }
}
@media (max-width: 600px) {
  :root { --site-chrome-header-space: 112px; --site-chrome-footer-space: 92px; }
  .oracle-site-header { top: calc(15px + env(safe-area-inset-top, 0px)); left: 18px; right: 18px; flex-wrap: wrap; gap: 5px; }
  .oracle-site-wordmark { width: 100%; gap: 10px; font-size: 15px; letter-spacing: .12em; }
  .oracle-site-seal { width: 34px; height: 34px; }
  .oracle-site-navigation { margin-left: auto; grid-template-columns: 53px 60px 113px; }
  .oracle-site-link { font-size: 12px; padding: 6px 8px; gap: 4px; }
  .oracle-site-link:last-child { padding-right: 0; }
  .oracle-back-arrow { font-size: 20px; }
  .oracle-site-footer { right: 15px; max-width: calc(100% - 30px); bottom: calc(9px + env(safe-area-inset-bottom, 0px)); gap: 0 14px; padding: 4px 9px; }
  .oracle-site-footer a { font-size: 10px; padding: 6px 0; }
  .oracle-site-footer a + a::before { left: -9px; }
  html[data-oracle-chrome] #topics-stage { padding-top: calc(var(--site-chrome-header-space) + 8px + env(safe-area-inset-top, 0px)); }
  html[data-oracle-chrome] .library-list { max-height: max(350px, calc(100svh - 395px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); }
  .oracle-account-strip { flex-direction: column; gap: 0; margin-block: 9px 5px; text-align: center; }
  .oracle-account-strip p { font-size: 12px; }
  .oracle-account-strip a { font-size: 12px; min-height: 40px; }
}
@media (max-width: 350px) { .oracle-site-navigation { grid-template-columns: 43px 49px 99px; } .oracle-site-link { padding-inline: 5px; font-size: 11px; } .oracle-site-wordmark { font-size: 14px; } }
