:root {
  color-scheme: dark;
  --ink: #f1f3e5;
  --soft: #b7c7bb;
  --muted: #839e91;
  --acid: #d5ef94;
  --acid-dark: #182c1b;
  --line: rgba(203, 225, 201, .17);
  --panel: rgba(12, 30, 25, .95);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #061510; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; font-weight: 400; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: transparent; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .33; }
a { color: inherit; }
[hidden] { display: none !important; }
/* Present for screen readers, invisible on the projector. Must never use
   display:none or visibility:hidden, which would drop it from the
   accessibility tree and silence the live region. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
h1, h2, h3, p { margin: 0; }
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
#world { position: fixed; inset: 0; }
#world canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-shade { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 20, 15, .92) 0%, rgba(5, 20, 15, .55) 22%, rgba(5, 20, 15, .04) 52%, rgba(5, 20, 15, .1) 100%), linear-gradient(180deg, rgba(4, 15, 12, .7) 0%, transparent 22%, transparent 61%, rgba(4, 17, 12, .62) 85%, #061510 100%); }
#interface { position: fixed; inset: 0; pointer-events: none; }
#interface button, #interface a, #interface summary, #interface .drawer, #interface details, #interface .branch-callout { pointer-events: auto; }
.site-header { height: 96px; position: absolute; top: 0; left: 48px; right: 48px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border: 1px solid rgba(198, 222, 171, .12); border-radius: 13px; }
.brand span { font-size: 19px; letter-spacing: .12em; font-weight: 500; line-height: 1.35; }
.brand small { display: block; font-family: system-ui, sans-serif; font-size: 9px; letter-spacing: .22em; color: var(--muted); margin-top: 6px; font-weight: 500; }
.header-nav { display: flex; align-self: stretch; gap: 38px; margin-left: 20px; }
.header-tab { position: relative; font-size: 13px; color: var(--muted); letter-spacing: .07em; padding: 0 2px; }
.header-tab.is-active { color: var(--ink); }
.header-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acid); }
.header-tab span { display: inline-block; font-family: ui-monospace, monospace; font-size: 10px; margin-left: 6px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; }
.header-right { display: flex; align-items: center; gap: 24px; }
.local-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #b2c5b4; letter-spacing: .03em; }
.local-status i, .ready-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px rgba(213, 239, 148, .25); }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; color: var(--soft); border: 1px solid var(--line); border-radius: 7px; transition: background .18s, color .18s; }
.icon-button:hover { background: rgba(222, 241, 198, .08); color: var(--ink); }
.icon-button .icon { width: 17px; height: 17px; }
.scene-topline { position: absolute; top: 122px; left: 50px; right: 50px; display: flex; align-items: center; justify-content: space-between; color: #7d9c89; font-size: 10px; letter-spacing: .13em; }
.scene-topline span:last-child { font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .12em; }
.story { position: absolute; top: 21.5%; left: 5.4%; width: min(37vw, 540px); max-height: calc(100vh - 340px); }
.eyebrow { text-transform: uppercase; font-size: 11px; color: var(--acid); letter-spacing: .17em; font-weight: 500; }
.intro-eyebrow { display: flex; align-items: center; gap: 12px; }
.short-line { height: 1px; width: 24px; background: var(--acid); }
.welcome-title { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: clamp(42px, 4.6vw, 78px); line-height: 1.28; font-weight: 500; letter-spacing: .02em; margin-top: 25px; text-wrap: nowrap; }
.title-dot { color: var(--acid); }
.welcome-question { margin-top: 17px; font-size: clamp(21px, 2vw, 33px); letter-spacing: .12em; color: #d6e6c9; font-family: "Songti SC", "STSong", serif; }
.welcome-description { font-size: clamp(13px, 1.08vw, 17px); line-height: 2.1; margin-top: 28px; color: var(--soft); letter-spacing: .03em; }
.welcome-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
.welcome-actions > span { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.meta-dot { margin: 0 9px; color: #728b75; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 15px 22px; min-height: 48px; border-radius: 6px; background: var(--acid); color: var(--acid-dark); border: 1px solid var(--acid); font-size: 13px; font-weight: 600; letter-spacing: .05em; transition: background .18s, box-shadow .18s; white-space: nowrap; }
.primary-button:hover { background: #e1f8ab; box-shadow: 0 4px 28px rgba(213, 239, 148, .14); }
.primary-button .icon { order: 2; width: 18px; height: 18px; }
.welcome-enter { min-height: 52px; min-width: 178px; }
.welcome-note { display: flex; gap: 8px; align-items: center; margin-top: 34px; color: #829d8a; font-size: 10px; letter-spacing: .04em; }
.welcome-note .icon { width: 15px; height: 15px; }
.lesson-story { top: 20%; width: min(29vw, 410px); left: 4%; }
.lesson-title { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: clamp(29px, 2.65vw, 45px); line-height: 1.45; letter-spacing: .01em; font-weight: 500; margin-top: 18px; text-wrap: balance; }
.lesson-question { font-size: clamp(15px, 1.28vw, 20px); line-height: 1.85; margin-top: 15px; color: #d5dfcc; letter-spacing: .02em; }
.story-rule { width: 38px; height: 1px; background: #7d9c67; margin: 25px 0 20px; }
.note-label { display: block; font-size: 10px; letter-spacing: .1em; color: var(--acid); line-height: 1.7; }
.story-copy { color: var(--soft); font-size: clamp(12px, 1.02vw, 16px); line-height: 1.95; margin-top: 10px; }
.lesson-story { max-height: calc(100vh - 340px); overflow-y: auto; padding-right: 12px; scrollbar-width: thin; scrollbar-color: #455e3e transparent; pointer-events: auto; }
.story-more { margin-top: 12px; }
.story-more summary { font-size: 10px; color: #b9ce9b; list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.story-more summary::-webkit-details-marker { display: none; }
.story-more summary .icon { width: 12px; height: 12px; }
.story-more[open] summary .icon { transform: rotate(90deg); }
.story-more p { font-size: 12px; line-height: 1.95; color: #b7c7bb; white-space: pre-line; margin-top: 12px; }
.scope-details { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); max-width: 350px; }
.scope-details summary { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #a3bba3; list-style: none; cursor: pointer; }
.scope-details summary::-webkit-details-marker { display: none; }
.scope-details summary .icon { width: 14px; height: 14px; }
.scope-details summary .icon:last-child { margin-left: auto; }
.scope-details[open] summary .icon:last-child { transform: rotate(90deg); }
.scope-details p { font-size: 12px; color: var(--soft); line-height: 1.9; padding-top: 10px; }
.sample-tag { margin-top: 22px; font-size: 10px; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; line-height: 1.8; }
.sample-square { display: inline-block; width: 5px; height: 5px; margin-top: 6px; background: #86a88d; }
.model-note { padding: 14px 18px; margin-top: 20px; border-left: 1px solid #bbd38a; background: linear-gradient(90deg, rgba(169, 203, 126, .08), transparent); }
.model-note p { font-size: 13px; line-height: 1.8; color: #d3dfc6; margin-top: 5px; }
.intro-prompt { margin-top: 20px; font-size: 12px; line-height: 1.9; color: #90ab94; }
.completion-lead { font-size: 22px; line-height: 1.7; color: #d3e8bd; margin-top: 20px; }
.scene-caption { position: absolute; left: 54%; bottom: 27.5%; display: flex; align-items: center; gap: 16px; color: #d5e2c8; font-size: 11px; letter-spacing: .1em; max-width: 360px; }
.caption-line { width: 43px; height: 1px; background: linear-gradient(90deg, transparent, #c4d692); }
.scene-caption small { display: block; color: #96ad8c; font-size: 9px; margin-top: 7px; line-height: 1.6; letter-spacing: .04em; }
.scene-readout { position: absolute; right: 4%; top: 21%; width: 230px; padding: 20px 22px; border-top: 1px solid #829c63; background: linear-gradient(120deg, rgba(14, 37, 29, .9), rgba(11, 32, 23, .54)); backdrop-filter: blur(14px); border-radius: 0 0 8px 8px; }
.readout-kicker { display: block; font-size: 10px; color: #b0c59b; line-height: 1.8; letter-spacing: .05em; }
.count-large { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 34px; line-height: 1.2; color: #edf5d0; margin: 13px 0 15px; font-weight: 300; }
.count-large small { display: inline-block; font-family: var(--font); margin-left: 8px; font-size: 10px; color: var(--muted); }
.stat-triple { display: flex; gap: 15px; justify-content: space-between; }
.stat-triple span { display: block; font-size: 9px; color: #91ac93; white-space: nowrap; }
.stat-triple b { display: block; color: #cedec0; font-family: ui-monospace, monospace; font-size: 17px; font-weight: 400; margin-bottom: 7px; }
.readout-text { margin-top: 13px; font-size: 11px; line-height: 1.9; color: #a9bfa5; }
.signal-label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 15px; color: #9aac9c; }
.signal-label i { width: 6px; height: 6px; background: #607260; border-radius: 50%; }
.signal-label.has-signal { color: #e2f3b7; }
.signal-label.has-signal i { background: #d5ef94; }
.signal-meter { width: 100%; height: 5px; border-radius: 3px; margin-top: 17px; background: #243d2c; overflow: hidden; }
.signal-meter i { display: block; height: 100%; background: #cce790; border-radius: inherit; }
.spectrum-strip { width: 100%; position: relative; height: 43px; background: #020605; margin-top: 16px; border: 1px solid #26362e; }
.spectrum-strip i { position: absolute; top: 5px; bottom: 5px; width: 2px; background: var(--line-color); box-shadow: 0 0 5px var(--line-color); }
.nuclide-name { color: #e0eacb; font-size: 22px; margin: 12px 0 20px; }
.director-bar { position: absolute; left: 48px; right: 48px; bottom: 87px; min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 22px; border: 1px solid rgba(173, 205, 158, .2); border-radius: 8px; background: linear-gradient(110deg, rgba(20, 43, 31, .86), rgba(8, 26, 18, .9)); backdrop-filter: blur(20px); box-shadow: 0 16px 50px rgba(0, 0, 0, .18); pointer-events: auto; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.tool-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 12px; font-size: 11px; color: #bfceaf; border: 1px solid transparent; border-radius: 5px; white-space: nowrap; transition: background .18s, border-color .18s; }
.tool-button .icon { width: 16px; height: 16px; }
.tool-button:hover:not(:disabled), .tool-button[aria-expanded="true"] { background: rgba(190, 221, 148, .08); border-color: var(--line); }
.phase-track { display: flex; align-items: center; gap: 13px; }
.phase-step { font-size: 9px; display: flex; align-items: center; gap: 5px; color: #728b73; white-space: nowrap; }
.phase-step i { font-family: ui-monospace, monospace; font-size: 9px; font-style: normal; color: #557054; }
.phase-step.is-current { color: #ddedbd; }
.phase-step.is-current i { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid rgba(213, 239, 148, .55); border-radius: 50%; color: #c2d88d; }
.phase-step.is-past { color: #9cb48c; }
.welcome-bar { min-height: 54px; padding: 15px 21px; bottom: 93px; background: rgba(18, 39, 28, .67); }
.ready-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #d1dfbd; }
.ready-note small { font-size: 10px; color: #8ea281; margin-left: 21px; letter-spacing: .02em; }
.welcome-bar-right { display: flex; align-items: center; gap: 12px; color: #9eb28e; font-size: 10px; }
.welcome-bar-right .icon { width: 16px; height: 16px; }
.act-map { position: absolute; left: 55px; right: 55px; bottom: 27px; display: flex; justify-content: space-between; gap: 12px; }
.act-node { display: flex; align-items: center; gap: 9px; color: #5e795f; font-size: 10px; min-width: 0; }
.act-node.is-active { color: #e1edc4; }
.act-node.is-finished { color: #a9bf97; }
.act-number { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #2b4430; color: #688362; border-radius: 50%; font-family: ui-monospace, monospace; font-size: 8px; flex: 0 0 auto; }
.act-node.is-active .act-number { border-color: #a1be71; color: #d5ef94; background: rgba(197, 224, 150, .07); }
.act-node.is-finished .act-number { border-color: #4e6b46; color: #9ebb83; }
.act-number .icon { width: 12px; height: 12px; }
.act-node small { font-size: 8px; color: #6b875f; padding-left: 6px; }
.pause-banner { position: absolute; top: 113px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: #e1ddab; font-size: 11px; background: #303624; padding: 9px 16px; border: 1px solid #666848; border-radius: 50px; }
.pause-banner .icon { width: 13px; height: 13px; }
.pause-banner small { color: #acb28c; font-size: 9px; margin-left: 4px; }
.drawer { position: absolute; right: 38px; top: 157px; bottom: 185px; width: min(375px, 32vw); border: 1px solid rgba(181, 209, 158, .25); border-radius: 11px; background: var(--panel); backdrop-filter: blur(24px); box-shadow: -12px 12px 70px rgba(0, 0, 0, .3); overflow: hidden; display: flex; flex-direction: column; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 23px 25px 21px; border-bottom: 1px solid var(--line); }
.drawer-header .eyebrow { font-size: 8px; letter-spacing: .18em; color: #7e9977; }
.drawer-header h2 { font-size: 20px; font-weight: 500; margin-top: 8px; letter-spacing: .06em; }
.drawer-header .icon-button { border-color: transparent; }
.drawer-body { padding: 22px 25px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #536845 transparent; flex: 1; min-height: 0; }
.drawer-intro { font-size: 12px; line-height: 1.9; color: #c4d1b7; margin-bottom: 25px; }
.drawer-intro span { color: #81987b; }
.control-list { display: flex; flex-direction: column; gap: 22px; }
.control-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.control-field legend { padding: 0; font-size: 11px; color: #bbcca8; margin-bottom: 10px; }
.segmented { display: flex; gap: 4px; padding: 4px; border: 1px solid #304832; background: #0b2115; border-radius: 6px; flex-wrap: wrap; }
.segmented button { flex: 1; font-size: 11px; padding: 9px 7px; color: #8ea17f; border-radius: 3px; white-space: nowrap; min-height: 35px; }
.segmented button[aria-pressed="true"] { color: #e5f1c4; background: #30472a; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.segmented button:hover:not(:disabled) { background: #243c22; color: #dfedba; }
.experiment-action { display: flex; justify-content: center; align-items: center; gap: 10px; border: 1px solid #597247; border-radius: 5px; padding: 12px 16px; color: #cbe0a3; font-size: 12px; width: 100%; }
.experiment-action:hover:not(:disabled) { background: #283f22; }
.experiment-action .icon { width: 15px; height: 15px; }
.secondary-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 21px; }
.secondary-actions .tool-button { padding: 8px 9px; border: 1px solid #344a30; font-size: 10px; flex: 1; }
.instrument-readout { padding: 18px; margin-top: 24px; border: 1px solid #2a422b; border-radius: 6px; background: #0b2015; }
.instrument-readout .count-large { font-size: 28px; }
.simulation-note { font-size: 10px; line-height: 1.9; color: #859a79; margin-top: 20px; }
.inline-notice { border-left: 2px solid #a3b973; background: rgba(176, 194, 135, .06); padding: 12px 13px; margin-bottom: 18px; color: #becba4; font-size: 11px; line-height: 1.8; }
.branch-options { display: flex; flex-direction: column; gap: 10px; }
.branch-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 14px; border: 1px solid #384f30; border-radius: 5px; font-size: 12px; line-height: 1.7; color: #c5d8ad; }
.branch-option:hover, .branch-option.is-selected { background: #273e22; border-color: #728d51; }
.branch-option .icon { width: 16px; height: 16px; }
.director-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.director-section .secondary-actions { margin-top: 10px; }
.director-section > .segmented { margin-top: 12px; }
.branch-callout { position: absolute; right: 4%; top: 19%; width: min(330px, 28vw); padding: 23px; border: 1px solid #8fa864; background: rgba(21, 42, 26, .97); border-radius: 7px; box-shadow: 0 15px 60px rgba(0, 0, 0, .2); }
.branch-kicker { color: #c5df96; font-size: 10px; letter-spacing: .04em; }
.branch-callout h3 { font-size: 17px; font-weight: 500; margin: 14px 0; line-height: 1.8; color: #e0eacc; }
.branch-callout p { font-size: 12px; line-height: 1.95; color: #b6c5a6; }
.branch-callout > div:last-child { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 15px; }
.branch-callout .tool-button { border: 1px solid #526f3d; }
.has-drawer .scene-readout, .has-drawer .branch-callout { visibility: hidden; }
.archive-empty { padding: 35px 4px; text-align: center; color: #8a9f7f; }
.archive-empty > .icon { width: 33px; height: 33px; color: #bed395; margin-bottom: 20px; }
.archive-empty h3 { font-size: 16px; font-weight: 400; color: #d0dfbb; }
.archive-empty p { font-size: 12px; line-height: 2; margin-top: 14px; }
.evidence-list { display: flex; flex-direction: column; gap: 13px; }
.evidence-entry { border: 1px solid #344a30; background: rgba(20, 40, 24, .45); border-radius: 5px; }
.evidence-title { display: flex; align-items: flex-start; gap: 11px; text-align: left; padding: 15px 12px; width: 100%; font-size: 12px; color: #d9e7c1; line-height: 1.7; }
.record-index { color: #90af6b; font-size: 10px; font-family: ui-monospace, monospace; line-height: 2; }
.evidence-title .icon { margin-left: auto; width: 15px; height: 15px; margin-top: 4px; }
.evidence-title:hover { background: #233b20; }
.evidence-entry summary { list-style: none; font-size: 10px; color: #8da87b; padding: 0 14px 14px 35px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.evidence-entry summary::-webkit-details-marker { display: none; }
.evidence-entry summary .icon { width: 12px; height: 12px; }
.evidence-entry details[open] summary .icon { transform: rotate(90deg); }
.evidence-detail { padding: 6px 16px 20px; }
.evidence-detail p { font-size: 11px; color: #bdcdae; line-height: 1.9; margin: 8px 0 18px; }
.source-links { padding-top: 12px; border-top: 1px solid #33492c; display: flex; flex-direction: column; gap: 10px; }
.source-links > span { font-size: 9px; color: #788f6c; }
.source-links a { font-size: 10px; line-height: 1.6; color: #a2bb83; text-decoration: none; }
.source-links a:hover { color: #e0efb5; }
.source-links .icon { width: 11px; height: 11px; margin-left: 3px; }
.comparison-saved { font-size: 10px; color: #b3cf8b; margin-top: 17px; line-height: 1.7; }
.comparison-panel { margin-top: 20px; padding-top: 3px; border-top: 1px dashed #506044; opacity: .9; }
.comparison-parameters { font-size: 9px; line-height: 1.8; color: #8a9f7d; margin: 7px 0 14px; }
.comparison-panel .count-large { font-size: 23px; }
.reference-note { padding-top: 16px; margin-top: 17px; border-top: 1px solid #465b37; max-height: 230px; overflow-y: auto; pointer-events: auto; scrollbar-width: thin; }
.reference-note > p { font-size: 10px; line-height: 1.9; color: #b5c4a4; margin: 9px 0 14px; }
.toast { position: absolute; top: 111px; left: 50%; transform: translateX(-50%); max-width: 470px; padding: 12px 20px; border: 1px solid #738859; border-radius: 6px; background: #203a24; color: #e4ebcd; font-size: 12px; line-height: 1.8; box-shadow: 0 12px 45px rgba(0,0,0,.3); z-index: 12; }
.boot { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: center; flex-direction: column; background: radial-gradient(ellipse at center, #173126, #061710 70%); padding: 40px; text-align: center; gap: 18px; }
.boot img { margin-bottom: 10px; }
.boot .eyebrow { font-size: 9px; color: #acc58d; }
.boot h1 { font-family: "Songti SC", "STSong", serif; font-size: 32px; font-weight: 500; letter-spacing: .08em; }
.boot > p:not(.eyebrow) { color: #a1b394; font-size: 12px; line-height: 2; max-width: 560px; }
.boot-line { width: 150px; height: 1px; margin-top: 12px; background: linear-gradient(90deg, transparent, #d5ef94, transparent); }
.boot-error .error-detail { color: #ba9f83 !important; font-family: ui-monospace, monospace; }
.fatal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 40px; background: #0b2118; }
.fatal h1 { font-size: 28px; margin-bottom: 20px; }
.fatal p { line-height: 2; color: var(--soft); }
@media (min-width: 1800px) {
  .site-header { left: 64px; right: 64px; height: 110px; }
  .scene-topline { left: 66px; right: 66px; top: 139px; font-size: 11px; }
  .brand span { font-size: 21px; }
  .header-tab { font-size: 14px; }
  .lesson-story { top: 23%; }
  .lesson-title { font-size: 48px; }
  .lesson-question { font-size: 22px; }
  .story-copy { font-size: 17px; }
  .note-label { font-size: 11px; }
  .scope-details summary { font-size: 13px; }
  .scope-details p { font-size: 14px; }
  .sample-tag { font-size: 12px; }
  .director-bar { left: 64px; right: 64px; bottom: 110px; min-height: 90px; }
  .tool-button { font-size: 13px; min-height: 45px; }
  .toolbar-actions { gap: 14px; }
  .primary-button { font-size: 15px; min-height: 52px; padding: 16px 24px; }
  .phase-step { font-size: 12px; gap: 8px; }
  .phase-track { gap: 21px; }
  .act-map { left: 70px; right: 70px; bottom: 42px; }
  .act-node { font-size: 12px; }
  .act-number { width: 30px; height: 30px; font-size: 10px; }
  .act-node small { font-size: 10px; }
  .drawer { top: 176px; bottom: 223px; right: 55px; width: 425px; }
  .drawer-body { padding: 25px 28px; }
  .drawer-intro { font-size: 14px; }
  .control-field legend, .segmented button, .branch-option { font-size: 13px; }
  .scene-readout { width: 265px; }
  .branch-callout { width: 370px; }
  .branch-callout h3 { font-size: 20px; }
  .branch-callout p { font-size: 14px; }
}
@media (max-width: 1250px) {
  .site-header { left: 28px; right: 28px; height: 83px; }
  .scene-topline { top: 104px; left: 30px; right: 30px; }
  .header-nav { gap: 24px; }
  .local-status { display: none; }
  .story { left: 4%; }
  .welcome-title { font-size: 47px; }
  .welcome-actions { gap: 12px; flex-wrap: wrap; }
  .welcome-description { font-size: 13px; }
  .welcome-note { margin-top: 22px; }
  .lesson-story { width: 30%; }
  .lesson-title { font-size: 29px; }
  .story-copy { font-size: 12px; line-height: 1.85; }
  .lesson-question { font-size: 15px; }
  .story-rule { margin: 18px 0; }
  .director-bar { left: 26px; right: 26px; padding: 13px 15px; gap: 12px; bottom: 70px; }
  .phase-track { gap: 9px; }
  .phase-step:not(.is-current) span { display: none; }
  .toolbar-actions { gap: 4px; }
  .toolbar-actions .tool-button { padding: 8px; font-size: 10px; }
  .toolbar-actions .primary-button { padding: 12px 14px; font-size: 11px; }
  .act-map { left: 32px; right: 32px; bottom: 23px; gap: 7px; }
  .act-node { font-size: 9px; gap: 6px; }
  .act-node small { display: none; }
  .drawer { top: 135px; bottom: 165px; right: 26px; width: 325px; }
  .drawer-header { padding: 19px 20px; }
  .drawer-body { padding: 19px 20px; }
  .scene-readout { top: 19%; right: 3%; width: 198px; padding: 16px; }
  .count-large { font-size: 29px; }
  .stat-triple { gap: 9px; }
  .stat-triple span { font-size: 8px; }
  .scene-caption { left: 55%; bottom: 26%; }
  .pause-banner { top: 96px; }
}
@media (max-height: 800px) and (min-width: 900px) {
  .story { top: 22%; }
  .welcome-title { font-size: clamp(35px, 4vw, 56px); margin-top: 18px; }
  .welcome-question { margin-top: 12px; font-size: 23px; }
  .welcome-description { margin-top: 19px; line-height: 1.9; }
  .welcome-actions { margin-top: 23px; }
  .welcome-note { margin-top: 22px; }
  .lesson-story { top: 20%; }
  .lesson-title { margin-top: 12px; font-size: 30px; }
  .lesson-question { margin-top: 10px; font-size: 15px; line-height: 1.75; }
  .story-copy { font-size: 12px; line-height: 1.85; }
  .story-rule { margin: 14px 0; }
  .scope-details { margin-top: 12px; padding-top: 12px; }
  .sample-tag { margin-top: 12px; }
  .model-note { margin-top: 12px; padding: 10px 15px; }
}
@media (max-width: 899px) {
  .site-header { height: 75px; left: 18px; right: 18px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 16px; }
  .brand small { font-size: 7px; }
  .header-nav { gap: 16px; margin-left: 0; }
  .header-tab { font-size: 11px; }
  .header-right { gap: 0; }
  .scene-topline { left: 21px; right: 21px; top: 92px; font-size: 8px; }
  .scene-topline span:last-child { font-size: 8px; }
  .story, .lesson-story { left: 5%; top: 18%; width: 48%; }
  .welcome-title { font-size: clamp(29px, 5.4vw, 44px); }
  .welcome-question { font-size: 21px; }
  .welcome-description { font-size: 12px; }
  .welcome-actions > span, .welcome-note { display: none; }
  .welcome-enter { min-width: 152px; font-size: 12px; }
  .lesson-title { font-size: 27px; }
  .lesson-question { font-size: 13px; }
  .story-copy { font-size: 11px; }
  .scope-details p { font-size: 11px; }
  .scene-readout { top: auto; bottom: 205px; right: 4%; width: 190px; }
  .scene-caption { left: 55%; bottom: 39%; max-width: 180px; font-size: 9px; }
  .scene-caption small { font-size: 8px; }
  .caption-line { width: 20px; }
  .director-bar { left: 17px; right: 17px; bottom: 68px; flex-wrap: wrap; gap: 12px; }
  .phase-track { justify-content: center; width: 100%; }
  .phase-step:not(.is-current) span { display: inline; }
  .toolbar-actions { justify-content: center; width: 100%; gap: 8px; }
  .toolbar-actions .tool-button { font-size: 10px; }
  .toolbar-actions .primary-button { font-size: 10px; min-height: 39px; }
  .welcome-bar { bottom: 78px; }
  .ready-note small, .welcome-bar-right { display: none; }
  .act-map { left: 20px; right: 20px; bottom: 22px; }
  .act-node { font-size: 8px; gap: 4px; flex-direction: column; }
  .act-number { width: 19px; height: 19px; font-size: 7px; }
  .drawer { right: 18px; top: 125px; bottom: 200px; width: min(340px, 56vw); }
  .branch-callout { top: auto; bottom: 205px; right: 4%; width: 44vw; }
  .branch-callout h3 { font-size: 14px; }
  .branch-callout p { font-size: 11px; }
  .pause-banner { top: 118px; font-size: 9px; }
  .pause-banner small { display: none; }
  .toast { top: 94px; font-size: 10px; }
}
@media (max-width: 560px) {
  .brand span { font-size: 13px; }
  .brand img { width: 28px; height: 28px; }
  .header-nav { gap: 12px; }
  .header-tab { font-size: 10px; }
  .header-right .icon-button { width: 29px; height: 29px; }
  .scene-topline span:first-child { display: none; }
  .scene-topline { justify-content: flex-end; }
  .story, .lesson-story { top: 17%; width: 77%; }
  .welcome-title { font-size: 39px; }
  .welcome-description { width: 80%; }
  .lesson-title { font-size: 27px; }
  .story-copy { font-size: 11px; }
  .scene-caption { display: none; }
  .scene-readout { width: 164px; padding: 12px; bottom: 199px; }
  .scene-readout .count-large { font-size: 24px; margin: 8px 0; }
  .scene-readout .readout-text { font-size: 9px; }
  .drawer { width: calc(100vw - 36px); bottom: 196px; }
  .branch-callout { width: calc(100vw - 38px); right: 19px; }
  .toolbar-actions { flex-wrap: wrap; gap: 3px; }
  .toolbar-actions > .primary-button { flex: 1; min-width: 138px; }
  .toolbar-actions .tool-button { font-size: 9px; gap: 4px; padding: 8px 5px; }
  .toolbar-actions .tool-button .icon { width: 13px; height: 13px; }
  .phase-step { font-size: 8px; }
  .act-node { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .lesson-story, .drawer-body, .reference-note { scroll-behavior: auto !important; }
}
