:root{color-scheme:light;--paper:#f5f5ef;--white:#fffefa;--ink:#142d2a;--muted:#5b7068;--line:#dfe5dc;--green:#165a4e;--mint:#dceee4;--shadow:0 12px 33px #23392b0b;--sans:"Inter","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;--serif:"Noto Serif CJK SC","Songti SC","STSong",serif}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.6 var(--sans)}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible{outline:2px solid #489e80;outline-offset:4px}
button:disabled{cursor:default;opacity:.35}
[hidden]{display:none!important}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.top{border-bottom:1px solid #e3e8df;background:#fbfbf5}
.top-inner{max-width:1510px;margin:auto;padding:0 42px;height:74px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.brand{display:inline-flex;align-items:center;justify-self:start;gap:11px;font-size:16px;font-weight:800;line-height:1.25;letter-spacing:.05em}
.brand-icon{display:grid;place-items:center;width:39px;height:39px;background:#164f46;color:#dcf9e7;border-radius:12px}
.brand-icon svg{width:25px;height:25px}
.brand small{display:block;font:700 8px/1.3 var(--sans);letter-spacing:.14em;color:#64796e;margin-top:4px}
.top nav{height:100%;display:flex;align-items:stretch;gap:31px}
.top nav :is(a,button){display:flex;position:relative;align-items:center;padding:0 2px;background:none;border:0;color:#5a6a62;font-size:13px;white-space:nowrap;font-weight:600}
.top nav :is(a,button):hover,.top nav .active{color:#15564a}
.top nav .active::after{content:"";height:2px;background:#398370;position:absolute;bottom:0;left:0;right:0}
.download{display:inline-flex;justify-self:end;align-items:center;gap:7px;padding:8px 13px;border:1px solid #cddcd2;background:#fafbf5;border-radius:9px;font-weight:700;font-size:13px;white-space:nowrap;color:#23564b}
.download:hover{background:#e6f1e7}
.download svg{width:17px;height:17px}
main{max-width:1510px;margin:auto;padding:33px 42px 18px}
.intro{margin-bottom:23px}
.eyebrow{display:flex;align-items:center;gap:8px;margin:0;color:#2b6c5c;font-size:11px;font-weight:800;letter-spacing:.12em}
.eyebrow>span{width:19px;height:1px;background:#48957e;margin-right:3px}
.eyebrow i,.scene-hint i{width:3px;height:3px;border-radius:50%;background:currentColor}
h1{font:800 clamp(33px,4vw,62px)/1.22 var(--serif);letter-spacing:.015em;margin:7px 0 10px}
.intro-text{color:#50665e;margin:0;font-size:14px}
.layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(285px,325px);gap:19px;align-items:start}
.viewer,.route,.observation{border:1px solid var(--line);box-shadow:var(--shadow);background:var(--white);border-radius:16px}
.viewer{overflow:hidden}
.viewport{height:clamp(390px,39vw,560px);position:relative;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 45% 10%,#278592 0%,#164d64 48%,#0d3347 82%,#0b2938 100%);color:#e9f9f6}
.viewport[data-chapter="1"],.viewport[data-chapter="2"]{background:radial-gradient(ellipse at 42% 4%,#227e8e,#0e4c68 52%,#092b44 100%)}
.viewport[data-chapter="3"]{background:radial-gradient(ellipse at 42% 4%,#388d94,#175365 54%,#0c334a 100%)}
.viewport[data-chapter="4"]{background:radial-gradient(ellipse at 36% 3%,#2b7186,#123c5a 48%,#0a2840 100%)}
.viewport::before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0px,transparent 39px,#c4eae909 40px,#c4eae909 41px),repeating-linear-gradient(90deg,transparent 0px,transparent 39px,#c4eae909 40px,#c4eae909 41px);mask-image:radial-gradient(ellipse at 50% 45%,transparent 26%,black 100%)}
.scene,.scene canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}
.scene canvas{cursor:grab}
.scene canvas:active{cursor:grabbing}
.scene:not(.rendered),.viewport.fallback .scene{background:url(./reef-preview.webp) center / contain no-repeat}
.scene-top,.scene-bottom{position:absolute;inset:15px 15px auto;display:flex;justify-content:space-between;align-items:center;pointer-events:none;gap:8px}
.scene-bottom{inset:auto 15px 14px}
.live,.scene-hint{display:flex;align-items:center;gap:8px;background:#092b40ba;color:#e2f6f1;padding:6px 10px;border:1px solid #9ee2df38;border-radius:7px;font-size:11px;white-space:nowrap}
.live>span:first-child{width:6px;height:6px;border-radius:50%;background:#91e3ae;box-shadow:0 0 11px #83f4bf93}
.view-controls,.scene-tools{display:flex;gap:3px;pointer-events:auto}
.view-controls{background:#0e3147bf;border:1px solid #9ee2df45;border-radius:9px;padding:3px}
.view-controls button,.scene-tools button{border:0;border-radius:6px;background:transparent;color:#d4eeef;display:flex;align-items:center;gap:5px;justify-content:center;min-height:33px;padding:0 9px;font-size:11px;white-space:nowrap}
.view-controls button svg,.scene-tools button svg{height:16px;width:16px}
.view-controls button[aria-pressed=true]{background:#d5f3e8;color:#114b48;font-weight:800}
.view-controls button:hover:not([aria-pressed=true]),.scene-tools button:hover{background:#3f727f}
.scene-tools{gap:6px}
.scene-tools button{border:1px solid #9ee2df45;background:#0e3147bf;width:35px;padding:0}
.stage-message{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;padding:9px 15px;border-radius:9px;background:#082c3bcc;color:white;font-size:13px;max-width:88%;pointer-events:none}
.porthole{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;overflow:hidden}
.porthole-glass{height:81%;width:min(82%,700px);border-radius:49%;border:clamp(7px,1vw,13px) solid #4c737b;outline:3px solid #113344;box-shadow:0 0 0 800px #071c28ec,inset 0 0 27px 4px #0a2e39b0;background:linear-gradient(148deg,#e7ffff20,transparent 22%,transparent 75%,#c2fcff14)}
.viewport:fullscreen,.viewport.expanded{height:100%;width:100%}
.viewport.expanded{position:fixed;inset:0;z-index:5}
.player{display:flex;align-items:center;gap:15px;padding:12px 14px}
.play,.step-buttons button{height:37px;display:flex;align-items:center;justify-content:center;border-radius:8px}
.play{flex:none;gap:5px;background:#18584d;border:1px solid #18584d;color:white;padding:0 11px;font-size:12px;font-weight:750;min-width:102px}
.play:hover{background:#246e5b}
.play svg{width:17px;height:17px}
.timeline-wrap{display:flex;gap:11px;align-items:center;flex:1;min-width:0}
.timeline{display:flex;gap:4px;flex:1}
.timeline button{height:27px;padding:0;background:none;border:0;flex:1;min-width:0;display:grid;align-items:center}
.timeline button::before{content:"";width:100%;height:4px;border-radius:8px;background:#dfe8e1}
.timeline button.done::before{background:#a8c9ba}
.timeline button[aria-current=true]::before{background:#28806b}
.timeline button:hover::before{background:#7fbaa7}
.progress{font-size:11px;color:#597068;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.05em}
.step-buttons{display:flex;gap:5px;flex:none}
.step-buttons button{width:34px;background:#f9faf5;border:1px solid #dfe8e0}
.step-buttons button:hover:enabled{background:#e7f1e9}
.step-buttons svg{width:17px;height:17px}
.side{display:grid;gap:13px}
.route{padding:14px}
.section-heading{display:flex;align-items:center;justify-content:space-between;margin:0 3px 9px}
.section-heading h2,.observation h2{font-size:16px;line-height:1.4;margin:0;font-weight:800}
.section-heading>span{font-size:11px;color:#4f685e;background:#edf3eb;padding:1px 8px;border-radius:20px}
.stations{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.station{width:100%;min-width:0;display:grid;grid-template-columns:34px 1fr auto;gap:9px;align-items:center;text-align:left;border:1px solid transparent;background:transparent;border-radius:10px;padding:6px 7px}
.station:hover{background:#f0f5ef}
.station[aria-current=step]{background:#e3f2e9;border-color:#c5e4d6}
.station-icon{display:grid;place-items:center;border-radius:8px;width:34px;height:34px;background:#edf5ee;color:#377966}
.station[aria-current=step] .station-icon{background:#287763;color:#f0fff7}
.station-icon svg{width:19px;height:19px}
.station strong,.station small{display:block}
.station strong{font-size:13px;line-height:1.4}
.station small{font-size:10.5px;color:#5d756a;line-height:1.4;margin-top:2px}
.station-number{font-size:11px;letter-spacing:.05em;color:#57756a;font-variant-numeric:tabular-nums}
.observation{background:#eef3ea;padding:15px 17px 16px;box-shadow:none;min-height:130px}
.observation .field-label{color:#33735f;font-size:10px;font-weight:850;letter-spacing:.13em;margin:0 0 5px;display:flex;align-items:center;gap:6px}
.field-label svg{width:13px;height:13px}
.observation p:last-of-type{font-size:12px;color:#4b6359;margin:6px 0 0}
.depth-key{display:flex;flex-wrap:wrap;gap:5px 9px;margin-top:9px}
.depth-key span{display:flex;align-items:center;gap:4px;color:#476159;font-size:10px;white-space:nowrap}
.depth-key b{width:8px;height:8px;border-radius:50%;background:var(--key);border:1px solid #234b442b}
footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 1px 0;color:#586f64;font-size:11px}
footer button{display:flex;align-items:center;gap:5px;border:0;background:none;padding:2px;color:#266452;font-weight:750;font-size:11px;white-space:nowrap}
footer svg{width:13px;height:13px}
dialog{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:17px;padding:22px;width:min(680px,calc(100% - 24px));max-height:85vh;overflow:auto;box-shadow:0 24px 85px #061b3260}
dialog::backdrop{background:#0b282ac0}
.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding-bottom:9px;margin-bottom:12px}
.dialog-top h2{font:800 24px/1.3 var(--serif);margin:0}
.dialog-close{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:#f3f7f0}
.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.guide-card{background:#edf5ee;border:1px solid #dae9de;border-radius:10px;padding:10px 12px;text-align:left}
.guide-card:hover{background:#dbeee3}
.guide-card strong{display:flex;gap:7px;align-items:center}
.guide-card p{font-size:12px;color:#4b6359;margin:5px 0 0}
.guide-card svg{width:16px;height:16px;color:var(--green)}
.sources{padding-left:1.4em}
.sources li{margin-bottom:7px}
.sources a{text-decoration:underline;text-underline-offset:3px;color:#146856}
#prompt-content{font-size:13px;margin-bottom:14px;white-space:pre-wrap}
#prompt-content h3{margin:10px 0 4px}
#prompt-content p{margin:0 0 10px}
@media(max-width:1050px){main{padding-inline:24px}.top-inner{padding-inline:24px}.layout{grid-template-columns:minmax(0,1fr) 277px;gap:13px}.route{padding:12px}.viewport{height:clamp(375px,45vw,500px)}}
@media(max-width:760px){main{padding:23px 14px 16px}.top-inner{padding:0 14px;grid-template-columns:1fr auto;height:auto;min-height:57px;row-gap:3px}.top nav{grid-row:2;grid-column:1/-1;justify-content:center;gap:24px;height:36px}.top nav :is(a,button){font-size:12px}.brand{font-size:14px;letter-spacing:0}.brand-icon{width:33px;height:33px}.brand-icon svg{width:22px;height:22px}.download{padding:5px 8px;font-size:12px}.intro{margin-bottom:16px}.intro-text{font-size:12px}.layout{grid-template-columns:minmax(0,1fr)}.viewport{height:clamp(330px,74vw,470px)}.side{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.observation{min-height:0}.player{gap:9px;padding:9px}.timeline-wrap{gap:5px}.step-buttons button{width:28px}.scene-hint{font-size:0}.scene-hint::before{content:"拖动旋转 · 双指缩放";font-size:10px}.scene-hint i{display:none}}
@media(max-width:460px){.side{grid-template-columns:minmax(0,1fr)}.guide-grid{grid-template-columns:1fr}.scene-top,.scene-bottom{left:9px;right:9px}.scene-top{top:9px}.scene-bottom{bottom:9px}.step-buttons button{width:27px}.play{min-width:89px;padding:0 6px}.timeline{gap:3px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.closeups{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.closeups button{display:flex;align-items:center;gap:4px;border:1px solid #cbded1;background:#fafbf6;color:#285e51;padding:3px 6px;border-radius:6px;font-size:10.5px;font-weight:700}
.closeups button svg{width:12px;height:12px}
.closeups button:hover,.closeups button[aria-pressed=true]{background:#d1e9dc;border-color:#97c8b3}
.viewport[data-chapter="1"]{background:linear-gradient(#05487930,#06365299),url('./assets/reef-003.webp') center/cover}
.viewport[data-chapter="2"]{background:linear-gradient(#073f7630,#032c5180),url('./assets/reef-001.webp') center/cover}
.viewport[data-chapter="1"]::after,.viewport[data-chapter="2"]::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(112deg,transparent 15%,#9beaff13 17%,transparent 23%,transparent 31%,#c2f4ff10 35%,transparent 43%);mix-blend-mode:screen}

.viewport[data-chapter="4"],.viewport[data-chapter="5"]{background:linear-gradient(#83bdd0 0%,#b8d7d8 45%,#368aa0 70%,#17617f 100%)}
.viewport[data-chapter="6"]{background:linear-gradient(#79b4c9,#b5d5d5 42%,#317e9c 68%,#114e72)}
