@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;650&family=Instrument+Serif:ital@0;1&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color:#294654;background:#eff0e9;font-synthesis:none;--ink:#294654;--muted:#7b8c91;--line:#314b5817;--accent:#376077}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,summary{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:2px solid #407891;outline-offset:3px}input:focus-visible,select:focus-visible{outline:2px solid #407891;outline-offset:2px}[hidden]{display:none!important}
.lab-layout{height:100svh;min-height:620px;padding:16px;display:grid;grid-template-columns:310px minmax(0,1fr);gap:16px}.controls-panel{display:flex;flex-direction:column;min-height:0;background:#fbfbf6;border:1px solid #fff;border-radius:17px;box-shadow:0 5px 25px #273b4804;overflow:hidden}.panel-header{height:67px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 23px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:8px;font-size:19px;font-weight:600;letter-spacing:-.8px}.brand svg{width:26px;height:23px}.lab-badge{color:#8b999c;letter-spacing:.1em;font-size:8px}.controls-scroll{padding:0 23px;overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#b9c9cd75 transparent}.introduction{padding:29px 0 23px}.eyebrow,.section-label{font-size:8px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}h1{font-family:'Instrument Serif',Georgia,serif;font-size:47px;font-weight:400;letter-spacing:-.8px;line-height:.98;margin:14px 0}h1 em{font-weight:400;color:#71909c}.introduction p{font-size:10px;line-height:1.8;margin:0;color:var(--muted)}.presets{padding-bottom:21px}.preset-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:10px}.preset-button{background:#f0f3ef;border:1px solid transparent;border-radius:6px;font-size:10px;text-align:left;padding:11px 9px;display:flex;align-items:center;gap:7px}.preset-button:hover{background:#e9f0ef}.preset-button[aria-pressed=true]{border-color:#91aab6;background:#e8f0f0}.preset-dot{width:12px;height:12px;border-radius:50%;background:linear-gradient(150deg,#9dbfd3,#e9eef0);box-shadow:inset 0 0 0 1px #56778517}.preset-button:nth-child(2) .preset-dot{background:linear-gradient(150deg,#c1d4df,#f8f9ed)}.preset-button:nth-child(3) .preset-dot{background:linear-gradient(150deg,#748c9e,#d4bbaa)}.preset-button:nth-child(4) .preset-dot{background:linear-gradient(150deg,#a184a6,#eabc8d)}.preset-button:nth-child(5) .preset-dot{background:linear-gradient(150deg,#c7dee8,#f9fcfb)}.preset-button:nth-child(6) .preset-dot{background:linear-gradient(150deg,#5d879f,#d6e6e9)}.seed-field{padding:0 0 21px}.seed-field>label{display:block;font-size:9px;color:var(--muted);margin-bottom:7px}.seed-field>div{display:flex;background:white;border:1px solid var(--line);border-radius:6px;overflow:hidden}.seed-field input{border:0;outline:0;width:100%;min-width:0;font-size:10px;padding:10px;color:var(--ink);background:transparent}.seed-field button{border:0;border-left:1px solid var(--line);background:#f4f7f4;width:34px;font-size:19px;color:#628392}
.control-section{border-top:1px solid var(--line)}.control-section summary{padding:18px 0;cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:500;list-style:none}.control-section summary::-webkit-details-marker{display:none}.section-index{font-size:8px;color:#99a7aa;font-weight:400;display:flex;align-items:center;gap:12px}.section-index:after{content:'+';font-size:14px;color:#6a8792}.control-section[open] .section-index:after{content:'−'}.section-body{padding-bottom:11px}.slider-field{margin:0 0 18px}.slider-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.slider-label label{font-size:10px}.slider-value{display:flex;align-items:center;gap:4px;font-size:8px;color:var(--muted)}.slider-value input{font-size:10px;font-variant-numeric:tabular-nums;border:0;background:#edf1ee;border-radius:4px;color:#486676;width:53px;text-align:right;padding:3px 5px;appearance:textfield}.slider-value input::-webkit-inner-spin-button{appearance:none}.slider-field input[type=range]{appearance:none;display:block;width:100%;height:3px;border-radius:3px;outline:none;background:linear-gradient(to right,#698f9f var(--fill,35%),#dce4e1 var(--fill,35%));cursor:pointer;margin:8px 0 4px}.slider-field input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;background:#fcfdf9;border:2px solid #6e919f;border-radius:50%;box-shadow:0 1px 4px #29465420}.slider-field input[type=range]::-moz-range-thumb{width:9px;height:9px;background:#fcfdf9;border:2px solid #6e919f;border-radius:50%}.slider-field input[type=range]:focus-visible{outline:2px solid #7a9caa;outline-offset:6px}.control-help{font-size:8px;line-height:1.7;color:#8a9a9f;margin:7px 0 13px}.select-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:10px}.select-row select{border:1px solid var(--line);background:#f0f3ef;border-radius:5px;padding:6px;color:var(--ink);font-size:10px}.toggle-row{display:flex;align-items:center;justify-content:space-between;font-size:10px;margin:16px 0;cursor:pointer}.toggle-row input{appearance:none;width:28px;height:16px;background:#dce3df;border-radius:15px;position:relative;cursor:pointer;flex-shrink:0}.toggle-row input:after{content:'';position:absolute;left:3px;top:3px;width:10px;height:10px;border-radius:50%;background:#fff;transition:transform .15s}.toggle-row input:checked{background:#678b9c}.toggle-row input:checked:after{transform:translateX(12px)}.reset-button{font-size:9px;border:0;background:none;color:#708995;padding:16px 0;display:block;width:100%;text-align:left;border-top:1px solid var(--line)}.storage-note{font-size:8px;color:#91a0a4;line-height:1.6;margin:0 0 16px}.panel-footer{display:flex;gap:7px;padding:15px 18px;border-top:1px solid var(--line);flex-shrink:0;background:#fbfbf6}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;font-size:10px;border-radius:6px;padding:11px 12px;border:1px solid transparent;white-space:nowrap}.primary{background:#345b70;color:#fff}.primary:hover{background:#224c63}.secondary{background:#eef2ee;border-color:#547d8b24;color:#45616f}.secondary:hover{background:#e3eae6}.panel-footer>*{flex:1}
.stage{position:relative;min-width:0;min-height:0;border-radius:19px;overflow:hidden;background:#b6d3e1;border:1px solid #fff;isolation:isolate}#lab-scene{display:block;width:100%;height:100%;touch-action:none;cursor:grab;background:linear-gradient(#90b3cc,#dfe9e8)}#lab-scene.dragging{cursor:grabbing}.stage-header{position:absolute;left:29px;right:27px;top:28px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;pointer-events:none}.stage-header .eyebrow{font-size:8px;letter-spacing:.22em;color:#406b817d}.scene-title h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:39px;letter-spacing:-.5px;margin:8px 0 6px;color:#315469}.scene-title p{font-size:10px;line-height:1.7;margin:0;color:#547b8d}.back-link{pointer-events:auto;font-size:9px;color:#416b80;padding:8px 11px;border:1px solid #ffffff4f;border-radius:25px;background:#ffffff22}.back-link:hover{background:#ffffff60}.stage-tools{position:absolute;top:157px;left:29px;display:flex;gap:6px}.stage-tools button{font-size:15px;color:#3d647a;border:1px solid #ffffff6b;background:#f5fafb4f;backdrop-filter:blur(12px);padding:8px 11px;border-radius:7px;display:flex;gap:6px;align-items:center}.stage-tools button span{font-size:9px}.stage-tools button:hover{background:#f5fafbaa}.stage-tools button[aria-pressed=true]{background:#edf4eff0}.bake-status{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:10px;background:#f6f9f2b3;border:1px solid #ffffff8a;backdrop-filter:blur(12px);border-radius:12px;padding:15px 19px;display:grid;grid-template-columns:14px 1fr;gap:9px;align-items:center;box-shadow:0 10px 40px #31566c12;pointer-events:none}.bake-status progress{grid-column:1 / -1;width:180px;height:3px;appearance:none;border:0;border-radius:3px;background:#bed0d333}.bake-status progress::-webkit-progress-bar{background:#bed0d333;border-radius:3px}.bake-status progress::-webkit-progress-value{background:#7299a8;border-radius:3px}.spinner{width:11px;height:11px;border:1.5px solid #70909c44;border-top-color:#70909c;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.scene-footer{position:absolute;bottom:102px;left:27px;right:27px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}.navigation-note{font-size:9px;line-height:1.8;color:#487186;display:flex;align-items:center;gap:10px}.navigation-note small{font-size:8px;opacity:.75}.compass-mark{font-size:25px;color:#6b8a99}.move-buttons{display:flex;gap:4px;pointer-events:auto}.move-buttons button{border:1px solid #ffffff70;background:#ffffff60;width:29px;height:29px;border-radius:6px;color:#51768b}.move-buttons button:active{background:#fff}.performance{position:absolute;left:22px;right:22px;bottom:22px;display:flex;gap:25px;align-items:center;padding:17px 20px;border-radius:12px;border:1px solid #ffffff77;background:#f5f9f2a6;backdrop-filter:blur(18px);box-shadow:0 6px 30px #314d6207}.performance>div{min-width:80px}.stat-label{font-size:6px;letter-spacing:.14em;color:#6b8895;display:block;margin-bottom:6px}.performance strong{font-size:12px;font-weight:450;font-variant-numeric:tabular-nums;color:#3b5e72;white-space:nowrap}.performance>button{border:0;background:none;color:#476c7e}#benchmark{margin-left:auto;font-size:9px;padding:8px 0;white-space:nowrap}#benchmark span{margin-left:6px}#stats-toggle{font-size:15px;padding:4px}.stats-detail{position:absolute;bottom:103px;right:24px;max-width:265px;padding:12px 17px;background:#f7faf5ee;border:1px solid white;border-radius:10px;box-shadow:0 6px 30px #314d6215;color:#597582;font-size:9px;line-height:1.7}.stats-detail p{margin:5px 0}.renderer-error{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);max-width:380px;width:85%;padding:28px;background:#f8fbf3ed;border:1px solid white;border-radius:14px}.renderer-error h2{font-family:'Instrument Serif',Georgia,serif;font-size:32px;font-weight:400;margin:0 0 14px}.renderer-error p{font-size:12px;line-height:1.7}.renderer-error button{border:0;background:#31566d;color:white;padding:10px 15px;border-radius:6px}.toast{position:absolute;bottom:128px;left:50%;transform:translateX(-50%);font-size:10px;line-height:1.5;border:1px solid #ffffff99;background:#fafcf5df;backdrop-filter:blur(12px);padding:12px 17px;border-radius:10px;max-width:350px;text-align:center;pointer-events:none;box-shadow:0 6px 30px #314d6215}
body.immersed .lab-layout{grid-template-columns:1fr}body.immersed .controls-panel{display:none}dialog{border:1px solid white;border-radius:17px;padding:24px;max-width:min(760px,92vw);max-height:90svh;background:#f8faf4;color:var(--ink);box-shadow:0 15px 80px #1d394342}dialog::backdrop{background:#223c4b88;backdrop-filter:blur(8px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.dialog-heading h2,#link-dialog h2{font-family:'Instrument Serif',Georgia,serif;font-size:32px;font-weight:400;margin:7px 0}.dialog-heading button{background:none;border:0;font-size:25px;color:#738c95}.dialog-actions{display:flex;gap:10px;margin-top:15px}#export-image{display:block;max-height:64svh;max-width:100%;border-radius:9px}#link-dialog p{font-size:12px}#scene-link{width:100%;min-width:240px;padding:12px;border:1px solid #bacad1;border-radius:6px;color:var(--ink);margin-bottom:15px}
@media(min-width:1500px){.lab-layout{grid-template-columns:335px minmax(0,1fr);padding:22px;gap:20px}.controls-scroll{padding:0 28px}.panel-header{padding:0 28px}.stage-header{left:37px;top:35px}.stage-tools{left:37px;top:170px}.scene-title h2{font-size:46px}}
@media(max-width:1050px){.lab-layout{grid-template-columns:280px minmax(0,1fr);padding:10px;gap:10px}.controls-scroll{padding:0 18px}.panel-header{padding:0 18px}.panel-footer{padding:12px}.panel-footer>*{font-size:9px;padding:11px 9px}.performance{gap:13px;padding:15px;left:14px;right:14px;bottom:14px}.performance>div{min-width:63px}.performance strong{font-size:11px}.stat-label{font-size:5px}.stage-header{left:22px;right:20px}.stage-tools{left:22px}.stage-tools button{padding:8px}.stage-tools button span{font-size:8px}.scene-footer{left:20px;right:20px;bottom:91px}.back-link{font-size:8px}.scene-title p{max-width:220px;font-size:9px}}
@media(max-width:760px){.lab-layout{display:flex;flex-direction:column;height:auto;min-height:100svh;padding:10px;gap:10px}.stage{order:-1;height:66svh;min-height:480px;flex-shrink:0;border-radius:15px}.controls-panel{max-height:none;border-radius:15px}.panel-header{height:58px}.controls-scroll{overflow:visible;padding:0 22px}.introduction{padding:23px 0}.introduction h1{font-size:39px}.introduction h1 br{display:none}.introduction p{font-size:10px}.preset-grid{grid-template-columns:repeat(3,1fr)}.stage-header{top:23px;left:20px;right:17px}.scene-title h2{font-size:34px}.scene-title p{font-size:9px;max-width:230px}.back-link{padding:7px 9px}.stage-tools{top:137px;left:20px;gap:5px}.stage-tools button{padding:7px 9px;font-size:14px}.performance{gap:12px;padding:13px 11px;left:12px;right:12px;bottom:12px}.performance>div{min-width:56px}.performance strong{font-size:10px}.stat-label{font-size:5px;letter-spacing:.08em}#benchmark{font-size:8px;white-space:normal;text-align:left;max-width:65px}#benchmark span{display:none}#stats-toggle{font-size:13px;padding:0}.scene-footer{bottom:87px;left:18px;right:18px}.navigation-note{font-size:8px}.navigation-note small{font-size:7px}.move-buttons button{height:26px;width:24px}.compass-mark{font-size:20px}.panel-footer{padding:15px 20px}.panel-footer>*{font-size:11px}.slider-field{margin-bottom:23px}.slider-label label,.slider-value input{font-size:12px}.slider-field input[type=range]{height:4px;margin-top:15px}.slider-field input[type=range]::-webkit-slider-thumb{width:18px;height:18px}.slider-value input{width:62px}.control-section summary{font-size:13px}.control-help{font-size:10px}.control-section summary{padding:21px 0}.seed-field input{font-size:12px;padding:13px 10px}.toggle-row,.select-row{font-size:12px}.select-row select{font-size:12px}body.immersed .stage{height:calc(100svh - 20px)}.stats-detail{bottom:90px;right:14px}.toast{bottom:120px;font-size:9px;width:80%}}
@media(prefers-reduced-motion:reduce){*,*::after{transition:none!important}.spinner{animation:none}}
#export-image{max-height:min(64svh,calc(90svh - 180px))}
@media(max-width:760px){.introduction h1 em{margin-left:.15em}}
.new-tree{width:100%;display:flex;justify-content:space-between;border:1px solid #a4b69b55;border-radius:6px;background:#eaf0e4;color:#506c46;font-size:10px;padding:11px 13px;margin:8px 0 18px}.new-tree:hover{background:#dfe9d7}.meadow-mode .scene-footer .navigation-note{color:#f7f5e4;text-shadow:0 1px 5px #253718aa}.meadow-mode .compass-mark{color:#f4efcf}.meadow-mode .move-buttons button{background:#f8f6e0b3}.meadow-mode .performance{background:#f5f6e3c4}
.under-tree{border:0;background:none;color:#687d57;font-size:10px;padding:0 0 10px;cursor:pointer}
@media(max-width:760px){.stage-tools{gap:4px;left:15px}.stage-tools button{padding:7px 6px}.stage-tools button span{font-size:7px}}
@media(min-width:761px){
 .introduction{padding:20px 0 17px}.introduction h1{font-size:36px;margin:11px 0 0}.introduction p{display:none}
 .presets{padding-bottom:15px}.presets .section-label{display:none}.preset-grid{grid-template-columns:repeat(3,1fr);margin:0;gap:5px}
 .preset-button{padding:9px 6px;font-size:8px;gap:5px}.preset-dot{width:9px;height:9px;flex-shrink:0}
 .seed-field{padding-bottom:14px}.seed-field input{padding:8px 9px}.control-section summary{padding:16px 0}.slider-field{margin-bottom:17px}
}
.lifecycle-card{border:1px solid #aabaaa70;border-radius:10px;background:linear-gradient(135deg,#f1f4e9,#e9f0ed);padding:15px 13px;margin:0 0 20px}.life-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:13px}.life-heading h2{font-family:'Instrument Serif',Georgia,serif;font-size:25px;font-weight:400;margin:0;color:#456455}.life-heading>span{font-size:8px;color:#718371;white-space:nowrap}.life-target{display:flex;align-items:center;gap:7px;font-size:9px;color:#6e8374}.life-target select{border:1px solid #9eaf963b;background:#fff9;border-radius:5px;padding:5px 3px;color:#426551;font-size:9px;min-width:0}.life-target>button{margin-left:auto;background:none;border:0;font-size:9px;color:#527962;padding:7px 0;white-space:nowrap}.life-timeline{margin:15px 0}.life-timeline>label{display:flex;justify-content:space-between;font-size:10px;color:#516b5b}.life-timeline output{font-size:9px;font-variant-numeric:tabular-nums;color:#778d7a}.life-timeline input{appearance:none;display:block;width:100%;height:5px;margin:13px 0 10px;cursor:pointer;border-radius:6px;background:linear-gradient(90deg,#b9cdb9 0%,#729585 45%,#729585 60%,#d0dbd7 100%)}.life-timeline input::-webkit-slider-thumb{appearance:none;width:15px;height:15px;border:2px solid #627f68;background:#fffff4;border-radius:50%;box-shadow:0 2px 4px #31573f20}.life-timeline input::-moz-range-thumb{width:12px;height:12px;border:2px solid #627f68;background:#fffff4;border-radius:50%}.life-stages{display:flex;justify-content:space-between;font-size:7px;letter-spacing:.03em;color:#8a9a89}.life-actions{display:flex;gap:5px}.life-actions>button{flex:1;border:1px solid #aebfa250;border-radius:5px;background:#fffff5a6;color:#4c6c51;font-size:9px;padding:9px 4px}.life-actions>button:first-child{background:#587761;color:#fffff4;border-color:#587761}.life-actions>button:hover{filter:brightness(.97)}.life-timing{margin-top:12px;font-size:9px;color:#718575}.life-timing summary{cursor:pointer;padding:3px 0}.life-durations{display:flex;gap:10px;margin-top:13px}.life-durations label{display:flex;flex-direction:column;gap:6px;flex:1}.life-durations input{width:43px;border:1px solid #aebf9c60;background:#fff9;border-radius:4px;padding:4px;font-size:10px;color:#4c6c51}.life-timing .toggle-row{font-size:9px;margin-bottom:5px}.life-help{font-size:8px;color:#84927f;line-height:1.65;margin:12px 0 0}.life-caption{position:absolute;top:206px;left:29px;display:flex;align-items:center;gap:10px;color:#416550;background:#f4f7eeb8;border:1px solid #fff8;border-radius:20px;padding:7px 10px 7px 13px;font-size:9px;backdrop-filter:blur(10px);font-variant-numeric:tabular-nums}.life-caption button{background:none;border:0;border-left:1px solid #637d652d;font-size:11px;color:#4e7458;padding:0 2px 0 9px}.life-caption button:disabled{display:none}
@media(min-width:1500px){.life-caption{left:37px;top:220px}}
@media(max-width:1050px){.life-heading h2{font-size:23px}.life-heading>span{font-size:7px}.life-caption{left:22px}.life-target{gap:4px}.life-target>button{font-size:8px}}
@media(max-width:760px){.lifecycle-card{padding:18px;margin-bottom:23px}.life-heading h2{font-size:29px}.life-heading>span{font-size:10px}.life-target,.life-target select,.life-target>button{font-size:11px}.life-timeline>label{font-size:12px}.life-timeline output{font-size:11px}.life-timeline input{height:6px;margin:17px 0 13px}.life-timeline input::-webkit-slider-thumb{width:20px;height:20px}.life-stages{font-size:9px}.life-actions>button{font-size:11px;padding:11px 6px}.life-help,.life-timing{font-size:10px}.life-timing .toggle-row{font-size:11px}.life-caption{top:179px;left:15px;font-size:8px}.life-durations input{font-size:12px;width:50px}}
.life-isolate.toggle-row{font-size:9px;color:#718575;margin:10px 0 0}.life-isolate input{margin-right:0}
.life-progress-stage{display:none;width:90px;height:4px;accent-color:#688b72}.immersed .life-progress-stage{display:block}@media(max-width:760px){.life-caption{max-width:calc(100% - 30px);gap:8px}.life-progress-stage{display:block;min-width:45px;width:75px}}
