/** @format */

/* ============================================================
   Standalone Oracle Navigation Shell
   Shared chrome for every standalone module inside
   ClairvoyantOracle.com/<Module>/index.html.

   Design notes:
   - Imported as a classic stylesheet; not @imported by main.css.
   - Each module inlines the <nav> HTML (robust, no JS required).
   - The enhancer script marks the current module active when JS runs.
   - The palette matches the Fortune Timeline menu (plum-violet glass,
     gold Pirata One lettering, Chinese-symbol accent color).
   ============================================================ */

/* ---------- shared tokens + canonical fortune block (sync with main.css) ---------- */
:root {
  /* Shared typographic scale (2026-10-10) */
  --fs-h1: 2rem;
  --fs-h2: 1.5rem;
  --fs-h3: 1.2rem;
  --fs-body: 1rem;
  --fs-body2: 0.9rem;
  --fs-fine: 0.75rem;
  --fs-fine-2: 0.68rem;
  /* Canonical Flux Revelation parchment (2026-10-10) */
  --flux-paper: #f3e9d2;
  --flux-ink: #2a2013;
  --flux-rule: rgba(120, 96, 50, 0.05);
  --flux-border: #b9a06c;
}
.flux-revelation {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  flex-wrap: wrap;
  margin: 24px auto 10px;
  padding: 24px 24px 26px;
  max-width: 880px;
  border: 1px solid var(--flux-border) !important;
  border-radius: 3px !important;
  background:
    radial-gradient(140% 100% at 50% 0%, rgba(255, 250, 235, 0.5) 0%, rgba(243, 233, 210, 0) 55%),
    repeating-linear-gradient(
      115deg,
      var(--flux-rule) 0px,
      var(--flux-rule) 3px,
      rgba(120, 96, 50, 0) 3px,
      rgba(120, 96, 50, 0) 6px
    ),
    linear-gradient(180deg, var(--flux-paper) 0%, #e8dcbd 100%) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65), inset 0 0 40px rgba(133, 105, 54, 0.14) !important;
  color: var(--flux-ink) !important;
}
.flux-revelation-title {
  display: block;
  width: 100%;
  flex: 1 0 100%;
  margin: 0 0 14px;
  text-align: center;
  font-family: "Pirata One", "Noto Serif KR", serif;
  font-size: var(--fs-h2) !important;
  letter-spacing: 0.14em;
  text-transform: none;
  color: #fffdf7 !important;
  -webkit-text-stroke: 0.8px #140f06 !important;
  paint-order: stroke fill;
  text-decoration: underline;
  text-decoration-color: rgba(184, 115, 51, 0.92);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  text-shadow:
    0 0 6px rgba(212, 175, 55, 0.95),
    0 0 14px rgba(184, 115, 51, 0.8),
    0 0 26px rgba(255, 138, 0, 0.5) !important;
}
.flux-revelation-title::before { content: "✦ "; color: #d4af37; }
.flux-revelation-title::after { content: " ✦"; color: #d4af37; }
.flux-divider {
  height: 1px; margin: 14px 0;
  background: linear-gradient(90deg, transparent, rgba(184, 115, 51, 0.6), transparent);
}
/* 2026-10-10: readable ink for all Flux-box text on the cream parchment. */
.flux-revelation:not(.omikuji-slip) :where(div, span, p, li, em, strong, i, b, small, td, th, dt, dd, a):not(.duke-seal):not(.flux-revelation-title) {
  color: var(--flux-ink) !important;
}

/* Standard collapsible (2026-10-10) */
.oracle-details {
  margin-top: 16px;
  border: 1px solid rgba(184, 115, 51, 0.5) !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.22) !important;
  overflow: hidden;
}
.oracle-details > summary {
  cursor: pointer;
  padding: 9px 14px !important;
  font-size: var(--fs-body2) !important;
  letter-spacing: 0.06em;
  color: #d9c79a !important;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.oracle-details > summary::-webkit-details-marker { display: none; }
.oracle-details > summary::after {
  content: "▾";
  color: #b87333;
  transition: transform 0.2s;
}
.oracle-details[open] > summary::after { transform: rotate(180deg); }
.oracle-details > :not(summary) { font-size: var(--fs-fine) !important; }

/* 2026-10-10: every module stage title renders at Header 1 (visibly equal). */
.confucius-heading,
.duke-heading,
.tarot-heading,
.zodiac-stage-header,
.thoth-title,
.nostradamus-heading,
.voodoo-heading,
.cloud9-heading,
.periodic-heading,
.birthstone-heading,
.mayan-heading,
.nsk-title,
.ff-oracle-title,
.omikuji-heading {
  font-size: var(--fs-h1) !important;
}

/* ---------- page reset + wrapper ---------- */
html.standalone-shell-open,
html.standalone-shell-open body {
  margin: 0;
  padding: 0;
}

.standalone-shell {
  --shell-gold: #d8c58a;
  --shell-bright-gold: #ffd700;
  --shell-violet: #9a7bff;
  --shell-plum: #1a1226;
  --shell-deep: #0e0918;
  --shell-ink: #e9e2d0;

  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(72, 45, 117, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #120a1f 0%, #08050f 100%);
  color: var(--shell-ink);
}

/* ---------- shared module page wrapper ---------- */
.standalone-module-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.2rem 4rem;
}

/* ---------- navigation menu ---------- */
.standalone-menu {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  padding: 10px 18px 12px;
  background:
    radial-gradient(ellipse at 50% -80%, rgba(154, 123, 255, 0.22), transparent 65%),
    radial-gradient(ellipse at 15% 120%, rgba(255, 215, 0, 0.12), transparent 50%),
    linear-gradient(180deg, #1a1226 0%, #0e0918 60%, #070510 100%);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, rgba(154, 123, 255, 0.9), #d4af37, rgba(154, 123, 255, 0.9)) 1;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 26px rgba(154, 123, 255, 0.12);
  font-family: 'Pirata One', 'Liberation Serif', serif;
}

.standalone-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 5px);
}

.standalone-menu-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 auto;
  max-width: 980px;
  justify-content: center;
  align-items: center;
  gap: 6px 22px;
  position: relative;
  z-index: 10;
}

.standalone-menu-link,
.standalone-menu-toggle {
  font-family: inherit;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  letter-spacing: 1.5px;
  line-height: 1.15;
  white-space: nowrap;
  text-decoration: none;
  color: var(--shell-gold);
  padding: 3px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.25s, text-shadow 0.25s, background 0.25s;
}

.standalone-menu-link:hover,
.standalone-menu-dropdown:focus-within .standalone-menu-toggle,
.standalone-menu-dropdown:hover .standalone-menu-toggle {
  color: var(--shell-bright-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
  background: rgba(154, 123, 255, 0.12);
}

.standalone-menu-active {
  color: var(--shell-bright-gold) !important;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #9a7bff, #ffd700) 1;
  border-radius: 0;
}

.standalone-menu-zh {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--shell-violet);
}

.standalone-menu-dropdown {
  position: relative;
}

.standalone-menu-dropdown-list {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 230px;
  margin: 0;
  padding: 14px 0 8px;
  list-style: none;
  display: none;
  z-index: 60;
  background: linear-gradient(180deg, #171022 0%, #08050f 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 18px rgba(154, 123, 255, 0.18);
}

.standalone-menu-dropdown:hover .standalone-menu-dropdown-list,
.standalone-menu-dropdown.standalone-menu-open .standalone-menu-dropdown-list,
.standalone-menu-dropdown:focus-within .standalone-menu-dropdown-list {
  display: block;
}

.standalone-menu-dropdown-list li {
  margin: 0;
}

.standalone-menu-dropdown-list .standalone-menu-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 16px;
  font-size: 14.5px;
  letter-spacing: 1px;
}

.standalone-menu-dropdown-list .standalone-menu-link:hover {
  color: var(--shell-bright-gold);
  background: rgba(154, 123, 255, 0.16);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.45);
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .standalone-menu {
    padding: 8px 8px 10px;
  }

  .standalone-menu-list {
    gap: 4px 10px;
  }

  .standalone-menu-link,
  .standalone-menu-toggle {
    font-size: 13.5px;
    letter-spacing: 1px;
    padding: 2px 6px;
  }

  .standalone-menu-dropdown-list {
    min-width: 190px;
  }
}

/* Accessibility & SEO utility for screen readers and search crawlers */
.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;
}
