.oracle-guide {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100svh;
  color: #f7efe3;
  background:
    linear-gradient(160deg, rgba(3, 4, 12, 0.96), rgba(16, 9, 28, 0.96) 48%, rgba(3, 14, 19, 0.96)),
    url("/oracle/media/oracle-storybook-atlas.png?v=20260527-oracle5") center / cover no-repeat,
    #03040c;
  isolation: isolate;
}

.oracle-guide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.62;
  background:
    radial-gradient(circle at 18% 20%, rgba(141, 232, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(240, 204, 130, 0.16), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 42%, rgba(0, 0, 0, 0.35));
}

.oracle-guide-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(14px, 2.4vw, 28px);
  border-bottom: 1px solid rgba(240, 204, 130, 0.22);
  background: rgba(4, 5, 13, 0.72);
  backdrop-filter: blur(16px);
}

.guide-brand,
.guide-top-actions button,
.guide-top-actions a {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #f7efe3;
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
  cursor: pointer;
}

.guide-brand {
  display: inline-grid;
  grid-template-columns: 36px auto;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  font-weight: 950;
}

.guide-brand i {
  display: grid;
  width: 36px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #041016;
  background: linear-gradient(135deg, #ffe2a0, #8de8ff 58%, #d8b6ff);
  font-style: normal;
}

.guide-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.guide-progress span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(247, 239, 227, 0.68);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 850;
}

.oracle-guide[data-view="profile"] .guide-progress [data-progress="profile"],
.oracle-guide[data-view="menu"] .guide-progress [data-progress="menu"],
.oracle-guide[data-view="tarot"] .guide-progress [data-progress="reading"],
.oracle-guide[data-view="yesno"] .guide-progress [data-progress="reading"],
.oracle-guide[data-view="numerology"] .guide-progress [data-progress="reading"],
.oracle-guide[data-view="sources"] .guide-progress [data-progress="reading"],
.oracle-guide[data-view="human"] .guide-progress [data-progress="reading"] {
  color: #071018;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe2a0, #8de8ff);
}

.guide-top-actions {
  display: flex;
  gap: 8px;
}

.guide-top-actions button,
.guide-top-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
}

.guide-main {
  min-height: 0;
  overflow: auto;
  scroll-behavior: smooth;
}

.guide-panel {
  display: none;
  min-height: calc(100svh - 71px);
  padding: clamp(18px, 4vw, 48px);
}

.oracle-guide[data-view="profile"] [data-guide-panel="profile"],
.oracle-guide[data-view="menu"] [data-guide-panel="menu"],
.oracle-guide[data-view="tarot"] [data-guide-panel="tarot"],
.oracle-guide[data-view="yesno"] [data-guide-panel="yesno"],
.oracle-guide[data-view="numerology"] [data-guide-panel="numerology"],
.oracle-guide[data-view="sources"] [data-guide-panel="sources"],
.oracle-guide[data-view="human"] [data-guide-panel="human"] {
  display: grid;
}

.guide-page {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.guide-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(16px, 2.5vw, 30px);
  align-items: stretch;
}

.guide-hero,
.guide-box,
.guide-mode,
.guide-orb-box,
.guide-source-item {
  border: 1px solid rgba(240, 204, 130, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 244, 210, 0.09), rgba(141, 232, 255, 0.045)),
    rgba(5, 6, 16, 0.78);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

.guide-hero {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 450px;
  padding: clamp(22px, 4vw, 42px);
}

.guide-kicker {
  margin: 0;
  color: #8de8ff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.guide-hero h1,
.guide-hero h2,
.guide-box h2,
.guide-mode strong,
.guide-orb-result strong {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}

.guide-hero h1,
.guide-hero h2 {
  max-width: 780px;
  color: #fff7dd;
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.guide-hero p,
.guide-box p,
.guide-mode p,
.guide-source-item p {
  margin: 0;
  color: rgba(229, 225, 241, 0.78);
  line-height: 1.56;
}

.guide-box {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.profile-step {
  display: none;
  gap: 16px;
}

.profile-step.is-active {
  display: grid;
}

.guide-fields {
  display: grid;
  gap: 13px;
}

.guide-field {
  display: grid;
  gap: 7px;
}

.guide-field span {
  color: rgba(247, 239, 227, 0.74);
  font-size: 0.82rem;
  font-weight: 900;
}

.guide-field input,
.guide-field textarea,
.guide-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 12px 13px;
  color: #f7efe3;
  background: rgba(2, 4, 12, 0.64);
  outline: none;
}

.guide-field textarea {
  min-height: 118px;
  resize: vertical;
}

.guide-field input:focus,
.guide-field textarea:focus,
.guide-field select:focus {
  border-color: rgba(141, 232, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(141, 232, 255, 0.12);
}

.guide-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-primary,
.guide-secondary,
.guide-chip,
.spread-chip {
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0 16px;
  color: #f7efe3;
  font-weight: 950;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.guide-primary {
  color: #041016;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe2a0, #8de8ff 58%, #d8b6ff);
  box-shadow: 0 18px 54px rgba(141, 232, 255, 0.18);
}

.guide-secondary {
  color: #d9f6ff;
}

.guide-chips,
.guide-spreads {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.guide-chip.is-active,
.spread-chip.is-active {
  color: #071018;
  border-color: transparent;
  background: linear-gradient(135deg, #8dffca, #8de8ff);
}

.guide-mini-note {
  color: rgba(247, 239, 227, 0.62);
  font-size: 0.84rem;
  line-height: 1.45;
}

.guide-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-content: stretch;
}

.guide-mode {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 212px;
  padding: 18px;
  color: #f7efe3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.guide-mode strong {
  color: #fff2bf;
  font-size: 1.38rem;
  line-height: 1.04;
}

.guide-mode span {
  display: inline-flex;
  width: 44px;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #061018;
  background: linear-gradient(135deg, #ffe2a0, #8de8ff);
  font-weight: 950;
}

.guide-reading-layout {
  display: grid;
  gap: 18px;
  width: min(1480px, 100%);
  margin: 0 auto;
}

.guide-tarot-controls {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.22fr);
  gap: 16px;
  align-items: stretch;
}

.guide-stage-mount,
.guide-report-mount {
  min-width: 0;
}

.guide-stage-mount .stage-wrap {
  width: 100%;
  min-height: min(760px, calc(100svh - 170px));
  border-radius: 14px;
}

.guide-stage-mount .three-stage {
  min-height: min(670px, calc(100svh - 240px));
}

.guide-stage-mount .stage-prompt {
  top: 70px;
}

.guide-report-mount .report-panel {
  width: 100%;
  max-height: none;
  border-radius: 14px;
  overflow: visible;
}

.guide-report-mount .drawn-card-gallery {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.guide-report-mount .drawn-card img,
.guide-report-mount .strip-card img,
.oracle-guide .modal-card-image {
  object-fit: contain;
  object-position: center;
  width: 100%;
  max-height: 520px;
}

.guide-orb-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: center;
}

.guide-orb-box {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 42px);
}

.guide-orb {
  display: grid;
  width: min(320px, 72vw);
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #051018;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.18) 20%, transparent 34%),
    radial-gradient(circle at 54% 58%, #8de8ff, rgba(158, 124, 255, 0.68) 48%, rgba(7, 11, 28, 0.9) 74%);
  box-shadow:
    inset 0 -34px 54px rgba(7, 11, 28, 0.5),
    0 0 42px rgba(141, 232, 255, 0.48),
    0 30px 84px rgba(0, 0, 0, 0.44);
}

.guide-orb.is-spinning {
  animation: guide-orb-spin 0.78s linear infinite;
}

.guide-orb span {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 7vw, 4.4rem);
  font-weight: 950;
}

.guide-orb-result {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.guide-orb-result strong {
  color: #8de8ff;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.95;
}

.guide-orb-result.is-yes strong {
  color: #8dffca;
}

.guide-orb-result.is-no strong {
  color: #ff8fa8;
}

.guide-number-grid,
.guide-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide-source-item {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.guide-source-item strong {
  color: #fff2bf;
}

.guide-source-item a {
  color: #8de8ff;
  font-weight: 900;
  text-decoration: none;
}

body.oracle-guide-active {
  overflow: hidden;
}

body.oracle-guide-active .oracle-shell {
  min-height: 0;
}

body.oracle-guide-active .oracle-shell > .v3-left {
  position: fixed !important;
  left: -120vw !important;
  top: 0 !important;
  width: 380px !important;
  height: 100svh !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.guide-error {
  min-height: 24px;
  color: #ffb2c0;
  font-size: 0.86rem;
  font-weight: 850;
}

@keyframes guide-orb-spin {
  0% {
    transform: rotate(0deg) scale(1);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
    filter: hue-rotate(42deg);
  }
  100% {
    transform: rotate(360deg) scale(1);
    filter: hue-rotate(0deg);
  }
}

@media (max-width: 980px) {
  .oracle-guide-top {
    grid-template-columns: 1fr;
  }

  .guide-progress {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .guide-top-actions {
    overflow-x: auto;
  }

  .guide-split,
  .guide-tarot-controls,
  .guide-orb-wrap {
    grid-template-columns: 1fr;
  }

  .guide-menu-grid,
  .guide-number-grid,
  .guide-source-grid {
    grid-template-columns: 1fr;
  }

  .guide-hero {
    min-height: 300px;
  }

  .guide-stage-mount .stage-wrap {
    min-height: 580px;
  }

  .guide-stage-mount .three-stage {
    min-height: 440px;
  }
}

@media (max-width: 620px) {
  .guide-panel {
    padding: 12px;
  }

  .guide-two {
    grid-template-columns: 1fr;
  }

  .guide-mode {
    min-height: 168px;
  }

  .guide-brand span {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
