/* r8 lower world. All visual rules scoped to .world-story;
   only the existing header gets body.world-active overrides. */
.world-story {
  --world-bg: #0b0e12;
  --world-fg: #d9dee4;
  --world-muted: #a9b2bd;
  --world-accent: #7fd3e6;
  --world-surface: #171d25;
  --world-edge: rgba(217,222,228,.23);
  --world-margin: clamp(24px,4vw,64px);
  position: relative;
  isolation: isolate;
  width: 100%;
  color: var(--world-fg);
  background: var(--world-bg);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  overflow: clip;
}
.world-story[data-world-tone="light"] {
  --world-bg: #f1f3f5;
  --world-fg: #161b21;
  --world-muted: #465463;
  --world-accent: #136b7d;
  --world-surface: #e3e8ed;
  --world-edge: rgba(22,27,33,.22);
}
.world-story *, .world-story *::before, .world-story *::after { box-sizing: border-box; }
.world-story [hidden] { display: none !important; }
.world-story button, .world-story a { -webkit-tap-highlight-color: transparent; }
.world-story button {
  appearance: none;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.world-story button:focus-visible, .world-story a:focus-visible {
  outline: 3px solid var(--world-accent);
  outline-offset: 4px;
}
.world-story button:active { transform: translateY(1px); }
.world-story button:disabled { opacity: .5; cursor: default; }
.world-story button[aria-pressed="true"] { color: var(--world-accent); }
.world-story a { color: inherit; text-decoration: none; }
.world-story .world-pin { position: relative; width: 100%; }
.world-story #worldCanvas, .world-story .world-scrim,
.world-story .world-labels, .world-story .world-scroll-track,
.world-story .world-chapters { display: none; }
.world-story .world-panel {
  position: relative;
  min-height: 0;
  padding: 112px var(--world-margin);
  scroll-margin-top: 76px;
}
.world-story .world-drawer {
  display: grid;
  grid-template-columns: minmax(260px,.85fr) minmax(0,1.15fr);
  align-items: center;
  gap: clamp(48px,8vw,144px);
}
.world-story .world-copy { min-width: 0; }
.world-story h2 {
  max-width: 11em;
  margin: 0;
  color: var(--world-fg);
  font-size: clamp(38px,4.65vw,70px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.world-story h3 { margin: 0; font-size: clamp(20px,1.7vw,25px); font-weight: 600; line-height: 1.35; }
.world-story p { margin: 0; }
.world-story .world-lead {
  max-width: 26em;
  margin-top: 24px;
  font-size: clamp(16px,1.3vw,19px);
  line-height: 1.65;
  text-wrap: pretty;
}
.world-story .world-note { margin-top: 16px; color: var(--world-muted); font-size: 16px; line-height: 1.5; }
.world-story .world-response { margin-top: 20px; max-width: 28em; line-height: 1.65; }
.world-story .world-interaction { min-width: 0; }
.world-story .world-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 6px 0;
  color: var(--world-fg);
  font-weight: 550;
}
.world-story .world-link:hover { color: var(--world-accent); }
.world-story .world-link-primary { padding: 11px 22px; color: #0b0e12; background: #d9dee4; }
.world-story .world-link-primary:hover { color: #0b0e12; background: #7fd3e6; }

/* The six tools have different structures; none is a feature-card grid. */
.world-story .world-feedback { display: flex; align-items: baseline; gap: 14px; margin-top: 24px; }
.world-story .world-feedback output { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.world-story .world-question-stack { display: grid; gap: 10px; }
.world-story .world-question {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 16px;
  width: 100%;
  min-height: 86px;
  padding: 16px 20px;
  color: #202830;
  background: #d9dee4;
}
.world-story .world-question:nth-child(2) { margin-left: 18px; width: calc(100% - 18px); background: #b9c4ce; }
.world-story .world-question:nth-child(3) { margin-left: 36px; width: calc(100% - 36px); background: #e8edf1; }
.world-story .world-q-prompt { font-size: 18px; font-weight: 600; }
.world-story .world-q-answer { display: block; grid-column: 1/-1; font-size: 16px; line-height: 1.5; }
.world-story .world-q-action { grid-column: 2; grid-row: 1; font-size: 16px; }
.world-story .world-question[aria-pressed="true"] { color: #123c47; background: #c7e4eb; }
.world-story .world-question[aria-pressed="true"] .world-q-action { visibility: hidden; }
.world-story .world-topic-picks, .world-story .world-news-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.world-story .world-topic-picks button, .world-story .world-news-picks button {
  flex: 1;
  min-width: max(76px,22%);
  padding: 10px 13px;
  white-space: nowrap;
  background: var(--world-surface);
}
.world-story .world-topic-picks button[aria-pressed="true"],
.world-story .world-news-picks button[aria-pressed="true"] {
  background: var(--world-accent);
  color: #0b0e12;
}
.world-story .world-path-steps { display: flex; gap: 16px; padding: 0; list-style: none; }
.world-story .world-path-steps li { flex: 1; color: var(--world-muted); font-size: 16px; }
.world-story .world-path-steps li.is-active,
.world-story .world-path-steps li[aria-current="step"] { color: var(--world-accent); }
.world-story .world-news-reader { padding: 24px; background: rgba(23,29,37,.9); }
.world-story .world-news-brief { display: grid; gap: 22px; margin: 24px 0 0; }
.world-story .world-news-brief div { display: grid; grid-template-columns: 6em 1fr; gap: 16px; }
.world-story .world-news-brief dt { font-size: 16px; font-weight: 550; color: var(--world-accent); }
.world-story .world-news-brief dd { margin: 0; font-size: 16px; line-height: 1.6; }
.world-story .world-guide-picks { display: flex; align-items: flex-end; gap: 12px; }
.world-story .world-guide-picks button { flex: 1; padding: 14px 12px; background: var(--world-surface); }
.world-story .world-guide-picks button span { display: block; font-size: 16px; color: var(--world-muted); }
.world-story .world-guide-picks button strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 550; }
.world-story .world-guide-picks button[aria-pressed="true"] { background: #20333e; }
.world-story .world-guide-steps { display: grid; gap: 12px; margin: 24px 0 0; padding-left: 1.4em; }
.world-story .world-guide-steps li { padding-left: 4px; font-size: 16px; line-height: 1.5; }
.world-story .world-guide-steps li::marker { color: var(--world-accent); }
.world-story .world-chip-tray { display: flex; flex-wrap: wrap; gap: 10px; }
.world-story .world-chip-tray button {
  flex: 1;
  min-width: 100px;
  padding: 11px 12px;
  background: #aebdc9;
  color: #101b24;
  cursor: grab;
}
.world-story .world-chip-tray button[aria-pressed="true"] { background: var(--world-accent); color: #0b0e12; box-shadow: 0 0 20px rgba(127,211,230,.18); }
.world-story .world-chip-tray button:active { cursor: grabbing; }
.world-story .world-slot-tray { display: flex; gap: 12px; margin-top: 24px; }
.world-story .world-slot-tray button {
  flex: 1;
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  text-align: center;
  background: var(--world-surface);
  box-shadow: inset 0 0 0 1px var(--world-edge);
}
.world-story .world-slot-tray button span { display: block; font-size: 16px; color: var(--world-muted); }
.world-story .world-slot-tray button strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 550; }
.world-story .world-slot-tray button.is-filled,
.world-story .world-slot-tray button[data-filled="true"] { box-shadow: inset 0 0 0 2px var(--world-accent); }
.world-story .world-slot-tray button.is-drop-target { background: #263f4b; }
.world-story .world-tool-result { margin-top: 24px; padding: 20px; background: rgba(23,29,37,.92); }
.world-story .world-result-label { margin-bottom: 10px; font-size: 16px; color: var(--world-accent); }
.world-story [data-tool-output] { font-size: 16px; line-height: 1.6; }
.world-story .world-reset { display: inline-flex; align-items: center; margin-top: 12px; padding: 6px 0; color: var(--world-muted); background: transparent; }
.world-story .world-reset:hover { color: var(--world-fg); }
.world-story .world-club-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; }
.world-story .world-footer { align-self: end; }
.world-story .world-wordmark { display: inline-block; margin-bottom: 20px; font-size: clamp(34px,4vw,58px); font-weight: 650; letter-spacing: -.04em; }
.world-story .world-wordmark span { font-weight: 400; }
.world-story .world-footer p { color: var(--world-muted); font-size: 16px; line-height: 1.6; }

/* Enhancement is opt-in. No WebGL / no script keeps every article visible above. */
.world-story.is-enhanced { height: var(--world-route,1050svh); overflow: visible; }
.world-story.is-enhanced .world-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.world-story.is-enhanced #worldCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.world-story.is-enhanced .world-scrim {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background: linear-gradient(90deg,rgba(11,14,18,.75),transparent 44%),linear-gradient(0deg,rgba(11,14,18,.72),transparent 35%);
}
.world-story.is-enhanced .world-labels { position: absolute; inset: 0; display: block; pointer-events: none; z-index: 2; }
.world-story.is-enhanced .world-labels > * { position: absolute; left: 0; top: 0; font-size: 16px; white-space: nowrap; color: var(--world-fg); }
.world-story.is-enhanced .world-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 0;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.world-story.is-enhanced .world-panel.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.world-story.is-enhanced .world-drawer { display: contents; }
.world-story.is-enhanced .world-copy { position: absolute; left: var(--world-margin); top: 49%; transform: translateY(-50%); width: min(35vw,470px); }
.world-story.is-enhanced .world-interaction { position: absolute; right: var(--world-margin); bottom: 16svh; width: min(39vw,560px); }
.world-story.is-enhanced .world-notes .world-interaction { width: min(29vw,410px); bottom: 15svh; }
.world-story.is-enhanced .world-question { min-height: 70px; }
.world-story.is-enhanced .world-q-answer { display: none; }
.world-story.is-enhanced .world-question[aria-pressed="true"] .world-q-answer { display: block; }
.world-story.is-enhanced .world-core .world-copy { top: 47%; }
.world-story.is-enhanced .world-path-readout { bottom: 12svh; width: min(41vw,600px); }
.world-story.is-enhanced .world-news .world-copy { top: 39%; }
.world-story.is-enhanced .world-news-reader { bottom: 14svh; }
.world-story.is-enhanced .world-guides .world-copy { top: 36%; }
.world-story.is-enhanced .world-guide-library { bottom: 13svh; width: min(43vw,620px); }
.world-story.is-enhanced .world-tools .world-copy { top: 38%; }
.world-story.is-enhanced .world-workbench { bottom: 14svh; width: min(43vw,620px); }
.world-story.is-enhanced .world-club .world-copy { top: 42%; width: min(40vw,530px); }
.world-story.is-enhanced .world-footer { position: absolute; right: var(--world-margin); bottom: 16svh; width: min(40vw,580px); }
.world-story.is-enhanced .world-scroll-track { position: absolute; inset: 0 0 100svh; display: grid; grid-template-rows: repeat(6,1fr); pointer-events: none; z-index: -1; }
.world-story.is-enhanced .world-chapters {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: max(16px,env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(11,14,18,.78);
  backdrop-filter: blur(12px);
}
.world-story .world-chapters button { padding: 8px 16px; background: transparent; color: #a9b2bd; white-space: nowrap; }
.world-story .world-chapters button[aria-current="step"] { color: #0b0e12; background: #d9dee4; }

body.world-active .topbar { color: #d9dee4; background: linear-gradient(#0b0e12 25%,rgba(11,14,18,0)); }
body.world-active .topbar .logo { color: #d9dee4; }
body.world-active .topbar .nav a:hover,
body.world-active .topbar .nav a:focus-visible { color: #fff; }
body.world-active .topbar .join { color: #d9dee4; border-color: rgba(217,222,228,.6); background: transparent; }
body.world-active .topbar .join:hover { color: #0b0e12; background: #d9dee4; }

@media (max-width: 760px) {
  .world-story { --world-margin: 20px; }
  .world-story .world-panel { padding: 80px 20px; }
  .world-story .world-drawer { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .world-story h2 { font-size: 34px; line-height: 1.15; }
  .world-story h3 { font-size: 20px; }
  .world-story .world-lead { margin-top: 16px; }
  .world-story .world-news-brief div { grid-template-columns: 1fr; gap: 5px; }
  .world-story .world-question-stack { gap: 8px; }
  .world-story .world-question, .world-story .world-question:nth-child(2), .world-story .world-question:nth-child(3) { width: 100%; margin-left: 0; }
  .world-story .world-guide-picks { gap: 6px; }
  .world-story .world-guide-picks button { padding: 10px 6px; }
  .world-story .world-guide-picks button strong { font-size: 18px; }
  .world-story .world-chip-tray { gap: 6px; }
  .world-story .world-chip-tray button { min-width: 0; padding: 10px 5px; }
  .world-story .world-slot-tray { gap: 6px; margin-top: 16px; }
  .world-story .world-slot-tray button { padding: 10px 5px; }
  .world-story .world-club-actions { gap: 16px; }
  .world-story .world-footer { margin-top: 16px; }
  .world-story .world-wordmark { font-size: 34px; }

  .world-story.is-enhanced .world-scrim { background: linear-gradient(0deg,rgba(11,14,18,.85),transparent 54%); }
  .world-story.is-enhanced .world-drawer {
    position: absolute;
    inset: auto 0 calc(72px + env(safe-area-inset-bottom));
    display: block;
    max-height: 42svh;
    padding: 16px 20px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #70808e transparent;
    background: rgba(11,14,18,.82);
    backdrop-filter: blur(12px);
  }
  .world-story.is-enhanced .world-panel .world-copy,
  .world-story.is-enhanced .world-panel .world-interaction,
  .world-story.is-enhanced .world-panel .world-footer {
    position: static;
    width: auto;
    max-width: none;
    transform: none;
  }
  .world-story.is-enhanced h2 { max-width: none; font-size: 28px; line-height: 1.15; letter-spacing: -.04em; }
  .world-story.is-enhanced h2 br { display: none; }
  .world-story.is-enhanced .world-lead { margin-top: 9px; font-size: 16px; line-height: 1.5; }
  .world-story.is-enhanced .world-note { margin-top: 8px; font-size: 16px; }
  .world-story.is-enhanced .world-interaction { margin-top: 14px; }
  .world-story.is-enhanced .world-notes .world-copy { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
  .world-story.is-enhanced .world-notes .world-copy h2 { grid-column: 1; font-size: 26px; }
  .world-story.is-enhanced .world-notes .world-copy .world-lead { display: none; }
  .world-story.is-enhanced .world-notes .world-feedback { grid-column: 2; grid-row: 1; display: block; margin: 0; font-size: 16px; text-align: right; }
  .world-story.is-enhanced .world-notes .world-feedback output { display: block; margin-top: 4px; font-size: 22px; }
  .world-story.is-enhanced .world-notes .world-note { grid-column: 1/-1; margin-top: 2px; }
  .world-story.is-enhanced .world-question { min-height: 48px; padding: 10px 14px; gap: 3px 10px; }
  .world-story.is-enhanced .world-q-prompt { font-size: 16px; }
  .world-story.is-enhanced .world-topic-picks,
  .world-story.is-enhanced .world-news-picks { margin-top: 12px; gap: 6px; }
  .world-story.is-enhanced .world-response { margin-top: 10px; line-height: 1.5; }
  .world-story.is-enhanced .world-link { margin-top: 10px; }
  .world-story.is-enhanced .world-path-steps { gap: 8px; }
  .world-story.is-enhanced .world-path-steps li { white-space: nowrap; }
  .world-story.is-enhanced .world-news-reader { padding: 16px; }
  .world-story.is-enhanced .world-news-brief { gap: 14px; margin-top: 16px; }
  .world-story.is-enhanced .world-guide-steps { gap: 8px; margin-top: 16px; }
  .world-story.is-enhanced .world-tool-result { margin-top: 16px; padding: 14px; }
  .world-story.is-enhanced .world-chapters { bottom: max(10px,env(safe-area-inset-bottom)); width: calc(100% - 28px); justify-content: space-between; gap: 3px; padding: 4px; }
  .world-story.is-enhanced .world-chapters button { flex: 1; min-width: 44px; padding: 8px 4px; font-size: 16px; }
  .world-story.is-enhanced .world-footer { margin-top: 20px; }
  .world-story.is-enhanced .world-footer .world-wordmark { font-size: 28px; margin-bottom: 8px; }
}

/* Static class and media gate both restore the full semantic story.
   JS must also remove inactive-panel inert/aria-hidden when entering this mode. */
.world-story.is-static { height: auto; overflow: clip; }
.world-story.is-static .world-pin { position: relative; height: auto; overflow: visible; }
.world-story.is-static #worldCanvas, .world-story.is-static .world-scrim,
.world-story.is-static .world-labels, .world-story.is-static .world-scroll-track,
.world-story.is-static .world-chapters { display: none; }
.world-story.is-static .world-panel { position: relative; inset: auto; padding: 80px var(--world-margin); visibility: visible; opacity: 1 !important; pointer-events: auto; transform: none !important; }
.world-story.is-static .world-drawer { display: grid; position: static; max-height: none; overflow: visible; padding: 0; background: none; backdrop-filter: none; }
.world-story.is-static .world-copy, .world-story.is-static .world-interaction,
.world-story.is-static .world-footer { position: static; width: auto; transform: none; }
.world-story.is-static .world-q-answer { display: block; }
@media (prefers-reduced-motion: reduce), (max-height: 700px) {
  .world-story.is-enhanced { height: auto; overflow: clip; }
  .world-story.is-enhanced .world-pin { position: relative; height: auto; overflow: visible; }
  .world-story.is-enhanced #worldCanvas, .world-story.is-enhanced .world-scrim,
  .world-story.is-enhanced .world-labels, .world-story.is-enhanced .world-scroll-track,
  .world-story.is-enhanced .world-chapters { display: none; }
  .world-story.is-enhanced .world-panel { position: relative; inset: auto; padding: 72px var(--world-margin); visibility: visible; opacity: 1 !important; pointer-events: auto; transform: none !important; }
  .world-story.is-enhanced .world-drawer { position: static; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 32px; max-height: none; padding: 0; overflow: visible; background: none; backdrop-filter: none; }
  .world-story.is-enhanced .world-panel .world-copy, .world-story.is-enhanced .world-panel .world-interaction,
  .world-story.is-enhanced .world-panel .world-footer { position: static; width: auto; transform: none; }
  .world-story.is-enhanced .world-q-answer { display: block; }
  .world-story.is-enhanced .world-notes .world-copy { display: block; }
  .world-story.is-enhanced .world-notes .world-copy .world-lead { display: block; }
  .world-story.is-enhanced .world-notes .world-feedback { display: flex; margin-top: 16px; text-align: left; }
  .world-story.is-enhanced .world-notes .world-feedback output { display: inline; margin: 0; }
  .world-story * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 760px) {
  .world-story.is-static .world-drawer { display: flex; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .world-story.is-enhanced .world-drawer { display: flex; flex-direction: column; gap: 28px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .world-story.is-enhanced .world-drawer { display: flex; flex-direction: column; gap: 28px; }
}

/* Canvas remains directly operable through the semantic overlay. */
.world-story.is-enhanced .world-panel.is-active{pointer-events:none}
.world-story.is-enhanced .world-copy,.world-story.is-enhanced .world-interaction,.world-story.is-enhanced .world-footer{pointer-events:auto}
.world-story.is-paper{--world-fg:#16242c;--world-muted:#40535f;--world-surface:#e1e9ed;--world-accent:#236d80}
.world-story.is-paper .world-scrim{opacity:0}
.world-story.is-ending{--world-fg:#16242c;--world-muted:#40535f;--world-accent:#236d80}
.world-story.is-ending .world-scrim{opacity:0}
@media(max-width:760px){.world-story.is-enhanced .world-drawer{pointer-events:auto}.world-story.is-enhanced.is-paper .world-drawer{background:rgba(242,246,248,.86)}}
.world-story.is-static .world-panel::before{content:'';display:block;grid-column:1/-1;width:min(90%,700px);height:180px;margin:0 auto 36px;background:radial-gradient(ellipse at center,transparent 24%,rgba(127,211,230,.3) 24.5%,transparent 25.5%,transparent 39%,rgba(127,211,230,.15) 39.5%,transparent 40.5%),repeating-linear-gradient(35deg,transparent 0 27px,rgba(127,211,230,.10) 28px,transparent 29px 55px);border-radius:50%}

.world-story .world-path-more summary{min-height:44px;cursor:pointer;padding:10px 0;color:var(--world-accent)}
@media(min-width:761px){
.world-story .world-path-more summary{display:none}
.world-story.is-enhanced.card-only .world-question-stack{opacity:0;pointer-events:none}
.world-story.is-enhanced.card-only .world-question-stack:focus-within{opacity:1;pointer-events:auto}
.world-story.is-enhanced.is-paper .world-copy{mix-blend-mode:difference}
.world-story.is-enhanced.is-paper .world-copy :is(h2,p,output,span){color:white}
}
@media(max-width:760px){
.world-story.is-enhanced.is-paper{--world-fg:#d9dee4;--world-muted:#a9b2bd;--world-accent:#7fd3e6}
.world-story.is-enhanced.is-paper .world-drawer{background:rgba(11,14,18,.72);backdrop-filter:blur(8px)}
.world-story.is-enhanced .world-core .world-drawer{max-height:42svh}
.world-story.is-enhanced .world-path-steps{display:flex;white-space:nowrap;margin:0}
.world-story.is-enhanced .world-path-readout .world-note{display:none}
.world-story.is-enhanced .world-core .world-note{font-size:14px}
}

.world-story .world-guide-steps .is-active{color:var(--world-accent)}
.world-story .world-guide-steps [aria-current=step]{font-weight:650}
/* r8 tools/club: existing world-active cleanup gates the silver ending header. */
body.world-active.world-light .topbar { color:#16242c; background:linear-gradient(rgba(244,247,249,.98) 25%,rgba(244,247,249,0)); }
body.world-active.world-light .topbar .logo { color:#16242c; }
body.world-active.world-light .topbar .nav a:hover,
body.world-active.world-light .topbar .nav a:focus-visible { color:#16242c; }
body.world-active.world-light .topbar .join { color:#16242c; border-color:rgba(22,36,44,.6); background:transparent; }
body.world-active.world-light .topbar .join:hover { color:#f4f7f9; background:#16242c; }
/* Keep desktop reading on the left; the three-dimensional nodes stay visible on the right. */
@media (min-width:761px) and (min-height:701px){
 .world-story.is-enhanced .world-news .world-copy{top:27%;width:min(35vw,470px)}
 .world-story.is-enhanced .world-news-reader{left:var(--world-margin);right:auto;bottom:12svh;width:min(35vw,470px);max-height:40svh;overflow:auto;padding:18px;background:rgba(11,14,18,.72);backdrop-filter:blur(8px)}
 .world-story.is-enhanced .world-news-reader h3{font-size:20px}
 .world-story.is-enhanced .world-news-brief{gap:14px;margin-top:16px}
 .world-story.is-enhanced .world-news-brief div{grid-template-columns:6em 1fr;gap:12px}
}
.world-story .world-news-brief .is-active{color:var(--world-accent)}
/* r8 final-act review: keep the star map clear; reveal the footer in the silver close. */
@media (min-height:701px){
 .world-story.is-enhanced:not(.is-ending) .world-club .world-copy{top:100px;transform:none;width:min(78vw,900px)}
 .world-story.is-enhanced:not(.is-ending) .world-club h2{max-width:none;font-size:clamp(26px,2.7vw,40px);line-height:1.2}
 .world-story.is-enhanced:not(.is-ending) .world-club h2 br{display:none}
 .world-story.is-enhanced:not(.is-ending) .world-club :is(.world-lead,.world-club-actions,.world-note){display:none}
 .world-story.is-enhanced:not(.is-ending) .world-club .world-footer{display:none;pointer-events:none}
 .world-story.is-enhanced.is-ending .world-club .world-footer{display:block;pointer-events:auto}
 .world-story.is-enhanced.is-ending .world-chapters{background:rgba(243,247,249,.94)}
 .world-story.is-enhanced.is-ending .world-chapters button{color:#40535f}
 .world-story.is-enhanced.is-ending .world-chapters button[aria-current=step]{color:#f4f7f9;background:#16242c}
}
@media (max-width:760px) and (min-height:701px){
 .world-story.is-enhanced:not(.is-ending) .world-club .world-drawer{bottom:calc(78px + env(safe-area-inset-bottom));max-height:18svh;padding:12px 20px;background:transparent;backdrop-filter:none;overflow:visible}
 .world-story.is-enhanced:not(.is-ending) .world-club .world-copy{position:static;width:auto;transform:none}
 .world-story.is-enhanced:not(.is-ending) .world-club h2{font-size:24px;color:#d9dee4}
 .world-story.is-enhanced.is-ending .world-club .world-drawer{background:rgba(244,247,249,.94);color:#16242c;backdrop-filter:blur(8px);max-height:42svh}
 .world-story.is-enhanced.is-ending .world-club h2{font-size:26px;color:#16242c}
 .world-story.is-enhanced.is-ending .world-club .world-lead{color:#16242c}
 .world-story.is-enhanced.is-ending .world-club :is(.world-note,.world-footer p){color:#40535f}
 .world-story.is-enhanced.is-ending .world-club .world-link{color:#16242c}
 .world-story.is-enhanced.is-ending .world-club .world-link-primary{color:#f4f7f9;background:#16242c}
 .world-story.is-enhanced.is-ending .world-club .world-footer{margin-top:12px}
 .world-story.is-enhanced.is-ending .world-club .world-footer .world-wordmark{display:none}
}

/* Keep the assembly itself visible above its compact desktop controls. */
.world-story .world-output-details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;margin:0}
.world-story .world-output-details[open]>summary{margin-bottom:10px}
@media(min-width:761px) and (min-height:701px){
 .world-story.is-enhanced .world-workbench{bottom:10svh}
 .world-story.is-enhanced .world-slot-tray{margin-top:8px}
 .world-story.is-enhanced .world-slot-tray button{min-height:44px;padding:9px}
 .world-story.is-enhanced .world-slot-tray button span{display:none}
 .world-story.is-enhanced .world-slot-tray button strong{margin:0}
 .world-story.is-enhanced .world-tool-result{margin-top:8px;padding:8px 14px}
 .world-story.is-enhanced .world-output-details[open]{max-height:26svh;overflow:auto}
}
.world-story .world-slot-tray button.is-drop-target{background:#24414c;box-shadow:inset 0 0 0 2px var(--world-accent)}

/* r8 entry only. Append AFTER current world.css; do not replace existing rules.
   JS contract: act 0 + .is-entry-reading through p=.18;
   .is-entry-flight through at least p=.35; clear both before later acts.
   --entry-reveal: 0 during reading, then 0→1 over p=.18→.30.
   body.world-entry is visible act 0 only, with --world-entry-shade set on body.
   The light reading surface may remain for act 0; other changes are phase-gated. */
@media (min-height:701px){
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight){--world-bg:#fff;--world-fg:#161b21;--world-muted:#465463;--world-accent:#236d80;--world-surface:#eef2f5;background:#fff}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-scrim{opacity:0;background:none}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-copy{color:#161b21;mix-blend-mode:normal;background:rgba(255,255,255,.96);padding:18px 20px}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes h2{color:#161b21}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-lead{display:block;color:#26343f;font-size:clamp(15px,1.35vw,18px);line-height:1.5}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight){
  --world-bg:#fff;--world-fg:#161b21;--world-muted:#465463;
  --world-accent:#236d80;--world-surface:#eef2f5;--world-edge:rgba(22,27,33,.2);
  background:#fff;
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-pin{background:#fff}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) #worldCanvas{
  /* 160px white feather during reading; its alpha disappears continuously in flight. */
  -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,var(--entry-reveal,0)) 0,#000 160px);
  mask-image:linear-gradient(to bottom,rgba(0,0,0,var(--entry-reveal,0)) 0,#000 160px);
  clip-path:inset(0 calc(16px * (1 - var(--entry-reveal,0))) 0 round calc(18px * (1 - var(--entry-reveal,0))));
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-scrim{opacity:0;background:none}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-copy{
  top:clamp(104px,20svh,200px);transform:none;width:min(34vw,440px);
  color:#161b21;mix-blend-mode:normal;background:transparent;
  opacity:1!important;visibility:visible;
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes h2{
  color:#161b21;font-size:clamp(36px,4.05vw,52px);line-height:1.14;
  max-width:10em;letter-spacing:-.035em;opacity:1!important;
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-lead{
  display:block;color:#26343f;font-size:clamp(15px,1.35vw,18px);
  line-height:1.5;margin-top:14px;max-width:24em;opacity:1!important;
 }
 /* These controls belong to the subsequent quiz stage, which starts after the reading/flight classes. */
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes :is(.world-feedback,.world-note,.world-question-stack){display:none}
 .world-story.is-enhanced.is-entry-flight[data-world-act="0"] .world-notes .world-copy{padding:18px 20px;background:rgba(255,255,255,.96)}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters{background:color-mix(in srgb,#fff,#0b0e12 calc(var(--entry-reveal,0) * 100%));backdrop-filter:none}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button{color:color-mix(in srgb,#465463,#a9b2bd calc(var(--entry-reveal,0) * 100%));background:transparent}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button[aria-current=step]{color:color-mix(in srgb,#fff,#0b0e12 calc(var(--entry-reveal,0) * 100%));background:color-mix(in srgb,#26343f,#d9dee4 calc(var(--entry-reveal,0) * 100%))}
}
@media (max-width:760px) and (min-height:701px){
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-drawer{background:rgba(255,255,255,.96);backdrop-filter:none;color:#161b21}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-copy{padding:0;background:transparent;mix-blend-mode:normal}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes h2{color:#161b21;font-size:clamp(26px,7.2vw,30px);line-height:1.15}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-lead{display:block;color:#26343f;font-size:15px;line-height:1.45;margin-top:8px}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-drawer{
  bottom:calc(72px + env(safe-area-inset-bottom));max-height:24svh;
  padding:12px 20px;overflow:auto;background:rgba(255,255,255,.96);
  backdrop-filter:none;color:#161b21;pointer-events:none;
 }
 .world-story.is-enhanced.is-entry-reading[data-world-act="0"] .world-notes .world-drawer{background:transparent}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-copy{
  display:block;position:static;width:auto;padding:0;transform:none;
  background:transparent;mix-blend-mode:normal;pointer-events:auto;
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes h2{
  max-width:none;font-size:clamp(26px,7.2vw,30px);line-height:1.15;
  color:#161b21;letter-spacing:-.035em;
 }
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes h2 br{display:none}
 .world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-notes .world-lead{
  display:block;margin-top:8px;max-width:none;font-size:15px;line-height:1.45;
  color:#26343f;white-space:normal;overflow:visible;
 }
 /* JS/DOM should shorten the lead to: 先自己作答，再回原文核对。
    Do not truncate the existing three sentences with line-clamp or ellipsis. */
}
/* No delayed transition: these values follow the same continuous shader reveal.
   Root must remove world-entry when leaving visible act 0, including scroll-back. */
body.world-entry{
 --entry-header-ink:color-mix(in srgb,#16171a,#d9dee4 calc(var(--world-entry-shade,0) * 100%));
 --entry-header-bg:color-mix(in srgb,#fff,#0b0e12 calc(var(--world-entry-shade,0) * 100%));
}
body.world-entry .topbar{color:var(--entry-header-ink);background:linear-gradient(var(--entry-header-bg) 55%,transparent)}
body.world-entry .topbar .logo,
body.world-entry .topbar .nav a,
body.world-entry .topbar .nav a:hover,
body.world-entry .topbar .nav a:focus-visible{color:var(--entry-header-ink)}
body.world-entry .topbar .join{color:var(--entry-header-ink);border-color:var(--entry-header-ink);background:var(--entry-header-bg)}
body.world-entry .topbar .join:hover{color:var(--entry-header-bg);background:var(--entry-header-ink)}

/* The entry stays white and readable when motion/WebGL is unavailable, too. */
.world-story:not(.is-enhanced) .world-notes {
 --world-fg:#161b21;--world-muted:#465463;--world-accent:#236d80;
 --world-surface:#e8eef2;--world-edge:rgba(22,27,33,.2);
 color:#161b21;background:#fff;padding-bottom:240px;
}
.world-story:not(.is-enhanced) .world-notes::after {
 content:'';position:absolute;bottom:0;left:0;right:0;height:160px;
 pointer-events:none;background:linear-gradient(#fff,#0b0e12);
}

/* Director's final note: let the phone reading drawer join the revealed dark world. */
@media(max-width:760px) and (min-height:701px){
 .world-story.is-enhanced.is-entry-flight[data-world-act="0"] .world-notes .world-drawer{
  background:color-mix(in srgb,rgba(255,255,255,.96),rgba(11,14,18,.82) calc(var(--entry-drawer-tone,0) * 100%));
  backdrop-filter:blur(calc(8px * var(--entry-drawer-tone,0)));
 }
 /* Switch ink at the middle-luminance threshold, never fade the readable text away. */
 .world-story.is-enhanced.is-entry-flight.is-entry-dark-copy[data-world-act="0"] .world-notes :is(h2,.world-lead){color:#d9dee4}
}

/* Keep navigation and reading ink legible at the middle of the colour transition. */
body.world-entry{--entry-header-ink:#000}
body.world-entry.world-entry-light-ink{--entry-header-ink:#fff}
.world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button{color:#000}
.world-story.is-enhanced[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button[aria-current=step]{color:#fff;background:#26343f}
.world-story.is-enhanced.is-entry-light-ui[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button{color:#fff}
.world-story.is-enhanced.is-entry-light-ui[data-world-act="0"]:is(.is-entry-reading,.is-entry-flight) .world-chapters button[aria-current=step]{color:#000;background:#d9dee4}
@media(max-width:760px) and (min-height:701px){
 .world-story.is-enhanced.is-entry-flight[data-world-act="0"] .world-notes :is(h2,.world-lead){color:#000}
 .world-story.is-enhanced.is-entry-flight.is-entry-dark-copy[data-world-act="0"] .world-notes :is(h2,.world-lead){color:#fff}
}
