@font-face{font-family:'Della Respira';src:url('assets/della-respira.woff2') format('woff2');font-display:swap}
@font-face{font-family:'Josefin Sans';src:url('assets/josefin-sans.woff2') format('woff2');font-display:swap}
:root{--sea:#123f88;--deep:#092b69;--paper:#f6f1de;--powder:#a8c8ed;--body:'Josefin Sans',sans-serif;--display:'Della Respira',serif;--ease:cubic-bezier(.16,1,.3,1);color-scheme:dark}
*{box-sizing:border-box}html{background:var(--sea);scrollbar-width:thin;scrollbar-color:#7fa6dd var(--deep)}body{margin:0;color:var(--paper);font-family:var(--body);font-size:18px;overflow-x:hidden}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}a{color:inherit;text-underline-offset:5px}button:focus-visible,a:focus-visible{outline:2px solid #fff6d5;outline-offset:7px}::selection{background:#f6f1de;color:#123f88}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}
#painted-world{position:fixed;inset:0;display:block;width:100%;height:100%;background:#123f88;z-index:0}
.water-vignette{position:fixed;inset:0;pointer-events:none;z-index:1;background:linear-gradient(180deg,rgba(2,25,65,.40),transparent 18%,transparent 81%,rgba(2,25,65,.35));transition:opacity .45s}
.header{position:fixed;left:0;right:0;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:25px 36px;pointer-events:none}.header>*{pointer-events:auto}
.wordmark{text-decoration:none;font-size:18px;letter-spacing:.16em;font-weight:500;line-height:1.2;text-shadow:0 2px 8px rgba(0,0,0,.24)}
.tools{display:flex;align-items:center;gap:13px}.languages{display:flex;gap:3px;margin-right:9px}.languages button{min-width:42px;min-height:42px;padding:10px 8px;border:1px solid transparent;background:rgba(5,37,88,.34);font-size:13px;letter-spacing:.10em}.languages button[aria-pressed=true]{color:var(--deep);background:var(--paper);border-color:var(--paper)}.languages button:hover{border-color:var(--paper)}
.icon-button{width:42px;height:42px;border:1px solid rgba(246,241,222,.65);border-radius:50%;background:rgba(5,37,88,.34);display:grid;place-items:center;padding:10px}.icon-button:hover{background:rgba(5,37,88,.7)}svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sound-waves,.play-icon{display:none}body[data-sound=on] .sound-waves,body[data-paused=true] .play-icon{display:block}body[data-sound=on] .sound-muted,body[data-paused=true] .pause-icon{display:none}
#experience{position:fixed;inset:0;z-index:3;pointer-events:none}#scene{position:absolute;inset:0;isolation:isolate}.scene-copy{position:absolute;left:7vw;top:19vh;width:min(470px,39vw);pointer-events:auto;opacity:var(--copy-opacity,1)}
.scene-copy::before{content:'';position:absolute;inset:-55px -65px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse closest-side,rgba(6,37,85,.57),rgba(6,37,85,.2) 51%,transparent 75%)}
h1{font-family:var(--display);font-weight:400;font-size:clamp(42px,4.6vw,70px);line-height:1.10;letter-spacing:-.022em;text-wrap:balance;margin:0 0 24px;max-width:17ch}.scene-copy p{font-size:21px;line-height:1.5;text-wrap:pretty;max-width:34ch;margin:0 0 22px;text-shadow:0 2px 6px rgba(0,0,0,.22)}
.primary{display:inline-flex;align-items:center;justify-content:space-between;gap:35px;padding:20px 25px;min-width:264px;min-height:64px;background:var(--paper);border:1px solid var(--paper);color:var(--deep);font-size:18px;text-decoration:none;line-height:1.25;transition:background .2s,transform .2s}.primary:hover{background:#fffaf0;transform:translateY(-2px)}.intro-hint{font-size:13px!important;line-height:1.5!important;max-width:33ch!important;margin:18px 0 0!important;color:#e7edfb}
.scene-animal .scene-copy{top:19vh;width:min(380px,30vw)}.scene-animal h1{font-size:clamp(35px,3.4vw,49px);max-width:17ch}.scene-animal p{font-size:20px;max-width:29ch}
.scene-formation .scene-copy{left:62vw;top:16vh;width:31vw;color:var(--deep)}.scene-formation .scene-copy::before{background:radial-gradient(ellipse closest-side,rgba(246,241,222,.89),rgba(246,241,222,.53) 50%,transparent 76%);inset:-32px -40px}.scene-formation h1{font-size:clamp(31px,2.8vw,42px);line-height:1.15;max-width:21ch;margin-bottom:18px}.scene-formation .scene-copy p{font-size:20px;line-height:1.48;text-shadow:none;max-width:34ch}
.scene-bivalve .scene-copy{left:64vw;top:22vh;width:29vw}.scene-bivalve h1{font-size:clamp(34px,3.1vw,46px);line-height:1.15;max-width:19ch}.scene-bivalve .scene-copy p{max-width:29ch}
.footer{position:fixed;z-index:10;left:36px;right:36px;bottom:24px;display:flex;align-items:center;justify-content:space-between;gap:24px;pointer-events:none}.footer>*{pointer-events:auto}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:9px 13px;border:0;background:rgba(3,31,77,.65);color:var(--paper);font-size:14px;line-height:1.25;text-decoration:none}.text-button:hover{background:rgba(3,31,77,.92)}.next-button{min-width:122px;justify-content:space-between}.footer svg{width:19px;height:19px}
#progress{display:flex;gap:8px;align-items:center}#progress a{position:relative;display:grid;place-items:center;width:28px;height:36px;text-decoration:none}#progress a::before{content:'';display:block;width:7px;height:7px;border:1px solid rgba(246,241,222,.85);border-radius:50%;transition:background .2s,transform .2s}#progress a[aria-current=step]::before{background:var(--paper);transform:scale(1.3)}#progress a:hover::after{content:attr(aria-label);position:absolute;bottom:38px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:12px;padding:6px 9px;background:var(--deep)}
#anatomy-labels{position:fixed;inset:0;z-index:4;pointer-events:none;opacity:var(--labels-opacity,0)}.anatomy-label{position:absolute;max-width:180px;padding:5px 9px;transform:translate(-50%,-50%);font-size:14px;line-height:1.3;text-align:center;text-wrap:balance;color:var(--deep);background:rgba(246,241,222,.82)}.anatomy-label.dark{color:var(--paper);background:rgba(8,40,96,.86)}
#model-note{position:fixed;z-index:4;left:7vw;bottom:95px;font-size:12px;line-height:1.4;max-width:40ch;color:var(--deep);background:rgba(246,241,222,.84);padding:7px 10px;margin:0;pointer-events:none}
#load-notice{position:fixed;z-index:11;bottom:90px;left:50%;transform:translateX(-50%);padding:13px 18px;background:var(--deep);max-width:calc(100vw - 44px);font-size:15px;line-height:1.5;box-shadow:0 6px 20px rgba(0,0,0,.12)}#retry{font:inherit;display:block;margin-top:8px;border:1px solid var(--paper);background:var(--paper);color:var(--deep);padding:8px 14px}
.scene-ending .scene-copy{left:0;top:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;opacity:1;pointer-events:none}.scene-ending .scene-copy::before{display:none}.ending-signature{font-family:var(--body);font-size:clamp(25px,3.3vw,45px);font-weight:400;letter-spacing:.18em;text-decoration:none;text-shadow:0 2px 10px rgba(0,0,0,.22);pointer-events:auto;animation:signature 1.8s .2s both var(--ease)}.end-actions{display:flex;gap:22px;margin-top:27px;pointer-events:auto;animation:signature 1.2s .85s both ease-out}body[data-scene=ending] .header .wordmark{visibility:hidden}body[data-scene=ending] #advance{visibility:hidden}.scene-ending .scene-copy h1{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@keyframes signature{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
body[data-scene=formation] .water-vignette{opacity:.35}body[data-scene=formation] .footer .text-button{background:rgba(6,36,84,.88)}body[data-scene=formation] #progress a::before{border-color:var(--deep)}body[data-scene=formation] #progress a[aria-current=step]::before{background:var(--deep)}
dialog{width:min(800px,calc(100vw - 36px));max-height:85svh;margin:auto;padding:48px 48px 40px;color:var(--paper);background:#0b326e;border:1px solid rgba(246,241,222,.5);font-family:var(--body);box-shadow:none}dialog::backdrop{background:rgba(0,17,49,.75)}dialog h1{font-size:35px;line-height:1.2;max-width:25ch;margin-bottom:22px}dialog h2{font-family:var(--display);font-weight:400;font-size:23px;line-height:1.3;margin:30px 0 16px}dialog p{font-size:18px;line-height:1.6;max-width:62ch}dialog .source-links{display:grid;gap:15px;font-size:16px;line-height:1.4}dialog .credit{font-size:13px;margin-top:32px;color:#cadcf4}.close-button{position:absolute;right:16px;top:16px;background:none;border:0;padding:5px;color:inherit}.close-button svg{width:24px;height:24px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.no-script{position:fixed;inset:30% 10%;z-index:20;padding:26px;background:var(--deep);line-height:1.5}
@media(max-width:1000px) and (min-width:700px){.header{padding:22px 26px}.scene-copy{left:6vw;width:42vw;top:20vh}h1{font-size:49px}.scene-copy p{font-size:19px}.scene-formation .scene-copy{left:58vw;width:36vw;top:16vh}.scene-formation h1{font-size:30px}.scene-formation .scene-copy p{font-size:18px}.scene-bivalve .scene-copy{left:62vw;width:33vw}.scene-bivalve h1{font-size:34px}}
@media(max-width:699px){
 .header{padding:20px 20px;gap:10px}.wordmark{font-size:13px;letter-spacing:.12em}.tools{gap:7px}.languages{gap:0;margin-right:2px}.languages button{min-width:30px;min-height:33px;padding:7px 5px;font-size:11px}.icon-button{width:32px;height:32px;padding:7px}.icon-button svg{width:18px;height:18px}#fullscreen{display:none}#sound{display:none}
 .scene-copy{left:23px;top:115px;width:calc(100% - 46px)}.scene-copy::before{inset:-30px -35px}h1{font-size:clamp(34px,9vw,43px);line-height:1.10;max-width:18ch;margin-bottom:19px}.scene-copy p{font-size:17px;line-height:1.45;max-width:36ch;margin-bottom:20px}.primary{min-width:238px;min-height:56px;font-size:17px;padding:16px 20px}.intro-hint{font-size:12px!important;max-width:32ch!important;margin-top:14px!important}
 .scene-animal .scene-copy{top:108px;left:23px;width:calc(100% - 46px)}.scene-animal h1{font-size:32px;max-width:20ch}.scene-animal p{font-size:17px;max-width:33ch}
 .scene-formation .scene-copy{left:23px;top:108px;width:calc(100% - 46px);color:var(--deep)}.scene-formation .scene-copy::before{inset:-18px -24px;background:radial-gradient(ellipse closest-side,rgba(246,241,222,.93),rgba(246,241,222,.65) 55%,transparent 80%)}.scene-formation h1{font-size:28px;line-height:1.17;max-width:25ch;margin-bottom:12px}.scene-formation .scene-copy p{font-size:16px;line-height:1.45;max-width:37ch}
 .scene-bivalve .scene-copy{left:23px;top:108px;width:calc(100% - 46px)}.scene-bivalve h1{font-size:31px;max-width:23ch}.scene-bivalve .scene-copy p{font-size:17px;max-width:34ch}
 .footer{left:19px;right:19px;bottom:20px;gap:6px}.text-button{font-size:12px;padding:10px;gap:7px}.next-button{min-width:92px}.footer svg{width:16px;height:16px}#progress{gap:1px}#progress a{width:21px;height:34px}#progress a::before{width:6px;height:6px}
 .anatomy-label{font-size:11px;line-height:1.25;max-width:125px;padding:4px 6px}#model-note{left:23px;bottom:84px;max-width:calc(100% - 46px);font-size:10px;padding:6px 8px}
 .end-actions{gap:18px;margin-top:24px}.ending-signature{font-size:26px}.end-actions .text-button{font-size:14px}dialog{padding:52px 25px 30px}dialog h1{font-size:29px}dialog p{font-size:16px}dialog .source-links{font-size:14px}
}
@media(max-width:699px) and (max-height:740px){.scene-copy{top:98px}h1{font-size:32px;max-width:20ch;margin-bottom:14px}.scene-copy p{font-size:15px;line-height:1.4;margin-bottom:15px}.primary{min-height:50px;font-size:16px;padding:14px 18px}.intro-hint{font-size:11px!important;margin-top:11px!important}.scene-animal .scene-copy,.scene-formation .scene-copy,.scene-bivalve .scene-copy{top:94px}.scene-animal h1,.scene-bivalve h1{font-size:27px}.scene-formation h1{font-size:25px}.scene-animal p,.scene-bivalve .scene-copy p,.scene-formation .scene-copy p{font-size:15px;line-height:1.4}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
body[data-paused=true] .ending-signature,body[data-paused=true] .end-actions{animation:none}

/* Controls retain contrast when the camera fills the view with ivory shell. */
.wordmark{padding:8px 10px;margin-left:-10px;background:rgba(7,36,85,.82)}
body[data-scene=formation] .tools .languages button:not([aria-pressed=true]),body[data-scene=formation] .icon-button,body[data-scene=animal] .icon-button,body[data-scene=animal] .tools .languages button:not([aria-pressed=true]){background:rgba(7,36,85,.90)}
.scene-start h1{font-size:clamp(43px,4.15vw,63px)}
@media(max-width:699px){.scene-start h1{font-size:clamp(34px,9vw,43px)}}
@media(max-width:699px) and (max-height:740px){.scene-start h1{font-size:32px}}
/* Keep the instruction readable over the light shell on narrow screens. */
@media(max-width:699px){.intro-hint{display:table;padding:6px 8px;background:rgba(7,36,85,.88)}}
/* A phone turned sideways needs a compact composition, not desktop type. */
@media(min-width:700px) and (max-height:500px){
 .header{padding:12px 22px}.wordmark{font-size:14px}.tools{gap:8px}.languages button{min-height:34px;min-width:34px;padding:7px}.icon-button{width:34px;height:34px;padding:7px}
 .scene-copy,.scene-animal .scene-copy{top:76px;left:5vw;width:43vw}.scene-start h1{font-size:30px;line-height:1.08;margin-bottom:10px}.scene-copy p,.scene-animal p,.scene-bivalve .scene-copy p{font-size:15px;line-height:1.35;margin-bottom:12px}.primary{min-height:44px;min-width:220px;padding:11px 15px;font-size:15px}.intro-hint{font-size:11px!important;margin-top:9px!important;line-height:1.3!important}.scene-animal h1,.scene-bivalve h1{font-size:28px;margin-bottom:12px}
 .scene-formation .scene-copy{top:76px;left:59vw;width:36vw}.scene-formation h1{font-size:25px;margin-bottom:10px}.scene-formation .scene-copy p{font-size:14px;line-height:1.35}.scene-bivalve .scene-copy{top:76px;left:62vw;width:33vw}.footer{left:22px;right:22px;bottom:10px}#model-note{bottom:64px;font-size:10px}.anatomy-label{font-size:11px;max-width:145px}
}
/* Preserve contrast as the whole animal painting moves behind its caption. */
.scene-animal .scene-copy::before{background:radial-gradient(ellipse closest-side,rgba(6,37,85,.94),rgba(6,37,85,.82) 52%,transparent 77%)}
@media(min-width:700px) and (max-height:500px){.scene-start .scene-copy{top:70px}.scene-start .intro-hint{max-width:none!important;font-size:10px!important}.scene-start .scene-copy p{margin-bottom:9px}.scene-start h1{font-size:28px}}

.scene-start .project-name{display:block;font-family:var(--body);font-size:18px;line-height:1.3;letter-spacing:.04em;margin-bottom:12px}
@media(max-width:699px){.scene-start .project-name{font-size:15px;margin-bottom:9px}}
@media(min-width:700px) and (max-height:500px){.scene-start .project-name{font-size:14px;margin-bottom:6px}}
