/* W21 functional component layer. No global/body/sitewide rules. */
.rune-preview .rune-stage { min-height: 270px; } /* board never depends on description height */
.rune-preview .rune-board { display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:clamp(6px,1.5vw,18px); }
.rune-preview .rune-tile { flex:0 0 clamp(86px,25%,145px);width:clamp(86px,25%,145px); }
.rune-preview .wave21-rune-reading { box-sizing:border-box;min-height:230px;border:1px solid var(--rune-border,#b99762);border-radius:13px;padding:clamp(16px,2vw,24px);margin:10px 0 16px;background:var(--rune-soft,rgba(217,176,111,.08)); }
.wave21-rune-reading h3 { margin:0 0 9px;font:500 clamp(1.25rem,2vw,1.8rem)/1.2 Georgia,serif;color:var(--rune-gold,#b99762); }
.wave21-rune-reading p { line-height:1.52;margin:9px 0;overflow-wrap:anywhere; }
.wave21-rune-reading small { opacity:.77;display:block;margin-top:12px; }
.wave21-rune-reading[data-status="waiting"] small,.wave21-rune-reading[data-status="locked"] small { display:none; }
.rune-preview .rune-tile[aria-current="true"] .rune-stone { outline:2px solid var(--rune-gold,#b99762);outline-offset:5px;border-radius:40%; }
.wave21-moon-practice { margin-top:1rem;padding:1.25rem;border:1px solid #c99b5a;border-radius:14px;background:rgba(202,153,89,.09); }
.wave21-moon-practice[hidden] { display:none!important; }
.wave21-moon-practice h3 { font:500 clamp(1.35rem,2.5vw,1.8rem)/1.2 Georgia,serif; }
.wave21-moon-practice p { line-height:1.55; }
/* Existing Pendulum result CSS owns final angles. New WAAPI owns processing. */
.experience[data-state="processing"] .arm-image { animation:none!important;transition:none!important; }
/* Oracle safe ink rectangle. Original roller and parchment SVG untouched. */
.os-stage .os-scroll-writing { inset:18% 16% 17%;gap:clamp(4px,1vh,10px);overflow:hidden; }
.os-stage .os-message-ink { max-width:100%;max-height:100%;overflow-wrap:break-word;hyphens:auto;font-size:var(--wave21-oracle-font,clamp(1.03rem,2.2vw,1.85rem));line-height:1.32; }
.os-stage[data-state="unrolling"] .os-scroll { height:clamp(335px,34vw,430px); }
.os-stage[data-state="unrolling"] .os-scroll-writing { opacity:0; }
.os-stage[data-state="unrolling"] #os-reveal,.os-stage[data-state="unrolling"] #os-again { pointer-events:none; }
@media(max-width:480px) {
 .rune-preview .rune-board{gap:1px;}.rune-preview .rune-tile{min-width:0;width:32%;flex:0 0 32%;}
 .rune-preview .rune-stage{min-height:250px;}
 .os-stage .os-scroll-writing{inset:20% 13% 19%;gap:4px;}
}
@media(prefers-reduced-motion: reduce){.os-stage .os-scroll,.os-stage .os-scroll-writing,.experience .arm-image{transition:none!important;animation:none!important;}}

/* #609 CLS (G): wave21-runes.mjs inserts #wave21RuneReading right after the stage once its meanings JSON has loaded
   (~1.7 s on Slow 4G), which pushed the cast-size switch, status and actions down by 244 px (CLS 0.024 desktop).
   Hold that space until the panel exists; the panel then takes it over. Measured: 244 px at every width. */
.rune-scene:not(:has(#wave21RuneReading)) .rune-controls { margin-bottom: 256px; }
.rune-stage:not(:has(+ #wave21RuneReading)):not(:has(+ .rune-controls)) { margin-bottom: 256px; }
/* #703 Pendulum optional topic + contextual answers. Scoped classes only; no motion (folding is an instant hidden toggle), so reduced motion needs nothing extra. */
.pendulum-topics { border:0;margin:6px 0 4px;padding:0;min-width:0; }
.pendulum-topics legend { padding:0;color:var(--muted);font-size:.95rem; }
.pendulum-topic-chips { display:flex;flex-wrap:wrap;gap:8px;margin-top:8px; }
.pendulum-topic-chip { min-height:44px;padding:8px 14px;border:1px solid var(--edge);border-radius:100px;background:transparent;color:var(--ink);font:inherit;font-size:.9rem;cursor:pointer;overflow-wrap:anywhere; }
.pendulum-topic-chip:hover { background:var(--panel2); }
.pendulum-topic-chip.is-selected,.pendulum-topic-chip[aria-pressed="true"] { border-color:var(--gold2);background:var(--panel2);font-weight:700; }
.pendulum-topic-chip:focus-visible,.pendulum-lens-toggle:focus-visible { outline:3px solid var(--gold2);outline-offset:2px; }
.pendulum-context { margin:16px 0 8px;text-align:start;max-width:62ch;margin-inline:auto; }
.pendulum-context h3 { font:600 1.05rem/1.4 Georgia,serif;margin:0 0 6px; }
.pendulum-context p { margin:0 0 10px;line-height:1.6;color:var(--ink); }
.pendulum-context .result-note,.pendulum-context-topic { color:var(--gold2);font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700; }
.pendulum-lens { border-top:1px solid var(--edge); }
.pendulum-lens h3 { margin:0; }
.pendulum-lens-toggle { display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px 2px;border:0;background:none;color:var(--ink);font:600 1rem/1.4 inherit;font-family:inherit;text-align:start;cursor:pointer; }
.pendulum-lens-toggle::after { content:"+";color:var(--gold2);font-size:1.2rem;flex:none; }
.pendulum-lens-toggle[aria-expanded="true"]::after { content:"\2212"; }
.pendulum-lens-body { padding:0 2px 6px; }
.pendulum-lens-body[hidden] { display:none; }

/* ===== First screen of the Explore experiences (owner 14.11, #609): the MAIN ACTION is on the first screen at 1440x800 and 390x844, one button row, the button system's tokens
   (docs/design/BUTTON_SYSTEM_SPEC.md, ui-kit.css). Runes: runes.css + wave21-runes.mjs (the controls move into the board). Crystal Ball: crystal-ball.css (art untouched). ===== */
/* The explore primary button = the system's primary (gold fill, dark ink, 44px, radius 12) on Pendulum, Oracle and Moon. */
main.layout #askButton.gold-button,
.os-actions .os-button:not(.os-button-secondary),
.moon-panel #ritualButton.primary-cta {
  min-height: var(--btn-h); padding: var(--btn-py) var(--btn-px); border: var(--btn-bw) solid var(--btn-primary-bg); border-radius: var(--btn-radius);
  background: var(--btn-primary-bg); color: var(--btn-primary-ink); font-size: var(--btn-fs); font-weight: var(--btn-fw); line-height: var(--btn-lh); box-shadow: none; filter: none;
}
main.layout #askButton.gold-button:hover:not(:disabled),
.os-actions .os-button:not(.os-button-secondary):hover:not(:disabled),
.moon-panel #ritualButton.primary-cta:hover:not(:disabled) { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); transform: none; filter: none; }
.os-actions .os-button-secondary { min-height: var(--btn-h); border: var(--btn-bw) solid var(--btn-secondary-line); border-radius: var(--btn-radius); font-size: var(--btn-fs); font-weight: var(--btn-fw); }
main.layout #askButton.gold-button:disabled, .os-actions .os-button:disabled, .moon-panel #ritualButton.primary-cta:disabled { opacity: .45; cursor: not-allowed; }
main.layout #askButton.gold-button:focus-visible, .os-actions .os-button:focus-visible, .moon-panel #ritualButton.primary-cta:focus-visible { outline: 3px solid var(--focus, var(--btn-primary-bg)); outline-offset: 3px; }

/* Pendulum: the pendulum stage no longer pushes "Ask the Pendulum" under the fold (a height that follows the window, 210-380px). A phone: title, lede and intro, THEN the pendulum with its button, then the steps and the note. */
@media (min-width: 851px) { main.layout .experience .stage-scene { max-height: clamp(210px, 36dvh, 380px); } }
@media (max-width: 850px) {
  main.layout > .intro { display: contents; }
  main.layout > .intro > * { order: 2; }
  main.layout > .intro > .eyebrow, main.layout > .intro > h1, main.layout > .intro > .lede, main.layout > .intro > .hairline, main.layout > .intro > .intro-copy { order: 0; }
  main.layout > .experience { order: 1; }
  /* cand8n7 regression (owner 14.11): the search copy (S-005, "How to use" + FAQ) has the default order 0, so it landed BETWEEN the intro and the pendulum and pushed "Ask the Pendulum" to y=2200 at 390px. It follows the steps and the note. */
  main.layout > .explore-seo-guide, main.layout > .explore-seo-faq { order: 3; }
  main.layout .experience .stage-scene { max-height: clamp(120px, 16dvh, 240px); } /* 24dvh -> 16dvh: the intro copy grew with S-005, the button must still be on the first screen */
  main.layout { gap: 8px; }
  main.layout > .intro > .hairline { display: none; }
  main.layout > .intro h1 { margin: 8px 0 4px; }
  main.layout > .intro .lede { margin: 0; }
  main.layout > .intro .intro-copy { margin: 4px 0 6px; }
  main.layout .experience { padding-block: 12px 14px; }
  main.layout .experience .stage-top { margin-bottom: 4px; }
  main.layout .experience .outcome-scale { margin: -4px auto 8px; }
  main.layout .experience .question-form > label { margin-top: 0; }
}

/* Moon: the eight phases are a choice, the ritual button is the action: it comes right under the phase name, the phases follow. The sky takes the height of the window, not a fixed 272px. */
.moon-panel { display: flex; flex-direction: column; }
.moon-panel > .panel-top { order: 0; } .moon-panel > .moon-sky { order: 1; } .moon-panel > #phaseTitle { order: 2; } .moon-panel > #phaseStatus { order: 3; }
.moon-panel > #ritualButton { order: 4; align-self: center; } .moon-panel > #ritualExplanation { order: 5; } .moon-panel > .phase-grid { order: 6; } .moon-panel > .astronomy-state { order: 7; }
@media (min-width: 961px) { .moon-panel .moon-sky { height: clamp(190px, 30dvh, 272px); } .moon-panel .moon-sky #mainMoon { height: 100%; width: auto; max-width: 100%; } }
@media (max-width: 960px) { .moon-panel .moon-sky { height: clamp(150px, 20dvh, 220px); } .moon-panel .moon-sky #mainMoon { height: 100%; width: auto; max-width: 100%; } }
@media (max-width: 600px) {
  .hero-layout .rule { display: none; }
  .hero-layout .tagline { font-size: 1.35rem; margin: 4px 0 6px; line-height: 1.25; }
  .hero-layout h1 { margin-block: 4px 6px; }
  .hero-layout { gap: 6px; }
  .moon-panel { padding-block: 14px 16px; }
}

/* S-005 search copy (How to use + FAQ): visible SSR sections under the experience, full row of the page grid. Scoped classes only. */
.explore-seo-guide,.explore-seo-faq { grid-column:1 / -1;box-sizing:border-box;width:100%;max-width:880px;margin:0 auto;padding:clamp(4px,1vw,12px) 4px;line-height:1.65;overflow-wrap:break-word; }
.explore-seo-guide h2,.explore-seo-faq h2 { font:500 clamp(1.5rem,2.6vw,2.1rem)/1.2 Georgia,"Times New Roman",serif;letter-spacing:-.02em;margin:0 0 14px; }
.explore-seo-guide p,.explore-seo-faq p { margin:0 0 14px; }
.explore-seo-steps { margin:0 0 16px;padding-inline-start:1.4em;display:grid;gap:10px; }
.explore-seo-steps strong { font-weight:750; }
.explore-seo-faq-item { border-top:1px solid color-mix(in srgb,currentColor 18%,transparent);padding-top:14px;margin-top:14px; }
.explore-seo-faq-item h3 { font:600 1.08rem/1.4 inherit;font-family:inherit;margin:0 0 6px; }

/* ===== Oracle first screen (owner 14.11 FAIL on cand8n7, #609): the action must be on the first screen at 1440 / 1148 / 768 / 428 / 390 / 320, Day and Dark, at ANY viewport height.
   The scroll art is tall (275-430 px) and the page copy is long, so the button sank below the fold. The status line + button now sit right under the stage header (CSS order only:
   the DOM, the tab order and the SEO text are unchanged), the scroll art stays below them untouched. The closed scroll gets a caption (below the seal) instead of an empty strip. ===== */
.os-stage .os-stage-top { order: 0; }
.os-stage .os-output { order: 1; margin: 18px 0 8px; }
.os-stage .os-illustration { order: 2; }
.os-stage .os-status { margin-bottom: 12px; }
/* idle: the status text moves onto the scroll as its caption; the live region stays in the page (screen-reader only), so there is no gap above the button */
.os-stage[data-state="idle"] .os-status { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.os-scroll-hint { display: none; position: absolute; z-index: 6; inset-inline: 7%; top: calc(50% + 48px); margin: 0; text-align: center; color: var(--os-muted); font: italic 400 clamp(.86rem, 1.1vw, 1rem)/1.35 Georgia, "Times New Roman", serif; text-wrap: balance; overflow-wrap: anywhere; pointer-events: none; }
.os-stage[data-state="idle"] .os-scroll-hint:not(:empty) { display: block; }
@media (max-width: 420px) { .os-scroll-hint { top: calc(50% + 40px); font-size: .86rem; } }
