/* Living World v2. Intro selectors above are deliberately left untouched. */
:root{--world-ink:#f5f2e9;--world-soft:#b7c3c2;--world-gold:#d0bb89;--world-panel:#111d20;}
.experience-shell{height:100svh;min-height:100svh;}
body.world-visible #world-canvas{filter:none;opacity:1;}
body.world-visible #experience-canvas{filter:none;opacity:0;}
body.world-visible .ambient-frame{background:radial-gradient(ellipse 48% 20% at 50% 42%,rgba(5,13,18,.29),rgba(5,13,18,.08) 64%,transparent 100%),linear-gradient(180deg,rgba(3,10,17,.06),transparent 28%,transparent 80%,rgba(2,10,13,.3));box-shadow:none;}
body.world-visible .identity{top:42%;width:96%;transform:translate(-50%,-50%);padding:0 1.4rem;}
body.world-visible .identity h1{font-size:clamp(3.1rem,8.65vw,10.25rem);font-weight:650;letter-spacing:-.057em;line-height:.96;gap:.23em;color:#f7f5ee;-webkit-text-fill-color:#f7f5ee;-webkit-text-stroke:0;background:none;text-shadow:0 2px 26px rgba(3,10,16,.38);}
body.world-visible .identity-kicker{color:rgba(233,234,225,.9);font-size:.62rem;font-weight:500;letter-spacing:.42em;margin-bottom:1.35rem;text-shadow:0 2px 9px rgba(0,0,0,.5);}
body.world-visible .slogan{color:#f0eee8;font-weight:350;font-size:clamp(1rem,1.36vw,1.44rem);letter-spacing:.015em;margin-top:1.55rem;text-shadow:0 2px 12px rgba(1,5,9,.6);}
body.world-visible .areas{color:#d4dbd8;font-size:clamp(.53rem,.61vw,.73rem);font-weight:500;letter-spacing:.21em;margin-top:1.15rem;text-shadow:0 1px 7px rgba(0,0,0,.85);}
body.world-visible .closing{bottom:max(5.5rem,calc(env(safe-area-inset-bottom) + 5rem));}
body.world-visible .next-part{color:#c1cecf;font-size:.55rem;letter-spacing:.25em;text-shadow:0 1px 8px #092125;}
body.world-visible .replay-button{min-height:44px;padding:.5rem 1.1rem;font-size:.56rem;letter-spacing:.13em;background:rgba(10,25,29,.32);backdrop-filter:blur(12px);border-color:rgba(203,222,224,.2);}
body.world-visible .progress-track{opacity:.22;}
body.world-visible .monogram{width:44px;height:44px;font-weight:500;border-color:rgba(220,236,233,.3);background:rgba(14,30,36,.13);backdrop-filter:blur(8px);}
body.world-visible .topbar{padding-top:1.5rem;padding-left:2rem;}
body.world-visible .experience-footer{right:2rem;left:2rem;bottom:1.3rem;}
body.world-visible .weather-credit{max-width:220px;bottom:.8rem;font-size:.53rem;line-height:1.55;color:#b2c4c5;opacity:.9;text-decoration:none;}
body.world-visible .weather-credit:hover{color:white;}
#living-ui{position:fixed;inset:0;z-index:30;pointer-events:none;color:var(--world-ink);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;visibility:hidden;opacity:0;transition:opacity 1.2s ease;}
#living-ui.is-available{visibility:visible;opacity:1;}
.world-coordinate{position:absolute;top:2.55rem;right:2.15rem;display:flex;gap:.75rem;align-items:center;letter-spacing:.16em;font-size:.57rem;color:#d8e4de;line-height:1.4;}
.world-coordinate-time{letter-spacing:.07em;color:#e0d9c4;margin-left:.45rem;font-variant-numeric:tabular-nums;}
.live-dot{display:inline-block;width:5px;height:5px;flex:none;border-radius:50%;background:#b3c797;box-shadow:0 0 10px rgba(195,207,163,.18);}
#living-ui[data-demo="true"] .world-coordinate:before{content:"DEMO";font-size:.5rem;border:1px solid rgba(221,210,175,.25);padding:.24rem .4rem;color:#d4c394;letter-spacing:.11em;}
.world-caption{position:absolute;left:2.4rem;bottom:6.8rem;text-shadow:0 2px 15px rgba(0,0,0,.55);}
.caption-index{display:block;font-size:.5rem;letter-spacing:.15em;color:#b6c9c4;margin-bottom:1rem;}
.caption-title{display:block;font-size:clamp(.95rem,1.1vw,1.4rem);font-weight:350;line-height:1.4;letter-spacing:.01em;color:#e1e7de;}
.caption-rule{display:block;width:31px;height:1px;background:#bdb590;margin:1rem 0 .8rem;opacity:.8;}
.caption-foot{font-size:.44rem;letter-spacing:.19em;color:#aebeb8;}
.world-toggle{position:absolute;right:max(2.1rem,calc(env(safe-area-inset-right) + 1rem));bottom:max(2rem,calc(env(safe-area-inset-bottom) + 1rem));pointer-events:auto;width:56px;height:56px;display:grid;place-items:center;border:1px solid rgba(211,227,223,.37);border-radius:50%;background:rgba(20,39,39,.62);backdrop-filter:blur(12px);color:#e5e2cf;cursor:pointer;transition:background .2s,border .2s,transform .2s;}
.world-toggle svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:.8;}
.world-toggle>span{position:absolute;right:67px;white-space:nowrap;font-size:.56rem;letter-spacing:.11em;font-weight:400;color:#dce3d9;}
.world-toggle:hover{background:rgba(35,60,57,.85);border-color:#ceccae;transform:rotate(-8deg);}
.world-toggle:hover>span{transform:rotate(8deg);}
.world-toggle:focus-visible,.world-panel :focus-visible{outline:2px solid #e5d1a0;outline-offset:3px;}
.world-toast{position:absolute;right:2rem;bottom:6.7rem;max-width:330px;padding:1rem 1.2rem;background:rgba(14,31,34,.94);border:1px solid rgba(209,219,202,.23);border-radius:12px;color:#e6ebde;font-size:.75rem;line-height:1.5;box-shadow:0 12px 35px rgba(0,0,0,.2);opacity:0;transform:translateY(8px);transition:opacity .2s,transform .2s;}
.world-toast.is-visible{opacity:1;transform:none;}
.world-scrim{position:absolute;inset:0;background:rgba(2,10,15,.28);pointer-events:auto;backdrop-filter:blur(2px);}
.world-panel{position:absolute;right:max(1rem,env(safe-area-inset-right));top:max(1rem,env(safe-area-inset-top));bottom:max(1rem,env(safe-area-inset-bottom));width:min(420px,calc(100vw - 2rem));display:flex;flex-direction:column;pointer-events:auto;background:linear-gradient(135deg,rgba(23,40,43,.98),rgba(10,24,29,.98));border:1px solid rgba(219,230,211,.18);border-radius:20px;box-shadow:-20px 10px 80px rgba(0,0,0,.32);overflow:hidden;backdrop-filter:blur(30px);animation:panel-in .3s ease;}
@keyframes panel-in{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.75rem 1.5rem .9rem;flex:none;}
.panel-eyebrow{margin:0 0 .55rem;font-size:.54rem;letter-spacing:.21em;color:#b7b795;}
.panel-head h2{margin:0;font-size:1.9rem;letter-spacing:-.04em;font-weight:450;line-height:1.1;color:#f4f3e6;}
.panel-close{width:44px;height:44px;border:1px solid rgba(220,234,219,.2);border-radius:50%;background:transparent;font-weight:200;font-size:1.6rem;line-height:1;color:#d7e1d6;cursor:pointer;flex:none;}
.panel-intro{margin:.2rem 1.5rem 1rem;font-size:.77rem;line-height:1.65;color:#bbc7c4;flex:none;}
.character-state{display:flex;gap:.6rem;align-items:center;margin:0 1.5rem 1.1rem;font-size:.68rem;color:#d7dfcd;flex:none;min-height:1rem;}
.panel-scroll{overflow-y:auto;overflow-x:hidden;padding:0 1.5rem 1rem;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#566b66 transparent;scroll-padding-block:1rem;}
.world-panel details{border-top:1px solid rgba(219,230,211,.12);}
.world-panel summary{display:flex;align-items:center;gap:.75rem;min-height:54px;cursor:pointer;list-style:none;font-size:.83rem;font-weight:400;color:#e0e7de;}
.world-panel summary::-webkit-details-marker{display:none;}
.world-panel summary>span{font-size:.5rem;font-variant-numeric:tabular-nums;color:#a0b7ad;letter-spacing:.08em;}
.world-panel summary:after{content:"+";margin-left:auto;color:#a6b7aa;font-size:1.1rem;font-weight:200;}
.world-panel details[open]>summary:after{content:"−";}
.world-panel summary small{font-size:.61rem;margin-left:auto;color:#aab99e;}
.world-panel summary:has(small):after{margin-left:.2rem;}
.section-body{padding:.2rem 0 1.1rem;}
.section-body>p{font-size:.73rem;color:#b5c5bd;line-height:1.5;margin:.2rem 0 .9rem;}
.option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;}
.option-grid button,.inline-actions button{min-height:44px;padding:.65rem .7rem;border:1px solid rgba(201,219,207,.17);border-radius:8px;background:rgba(86,111,97,.09);color:#e1e5d8;font-size:.72rem;text-align:left;cursor:pointer;transition:background .15s,border-color .15s;line-height:1.4;}
.option-grid button:hover,.inline-actions button:hover{background:rgba(132,155,123,.14);border-color:rgba(219,212,166,.46);}
.option-grid button[aria-pressed="true"]{background:rgba(191,185,128,.12);border-color:rgba(212,204,147,.55);color:#efe9c7;}
.plant-icon{color:#b9c49f;font-size:1.15rem;margin-right:.45rem;vertical-align:middle;}
.inline-actions{display:flex;gap:.4rem;margin:.7rem 0 .25rem;flex-wrap:wrap;}
.inline-actions button{flex:1;text-align:center;white-space:nowrap;}
.world-panel .small-note{font-size:.64rem;line-height:1.65;color:#a2b8ad;margin:.75rem 0 .25rem;}
.plant-progress{padding:.6rem 0;border-bottom:1px solid rgba(219,230,211,.09);font-size:.7rem;}
.plant-progress>div{display:flex;justify-content:space-between;gap:.3rem;margin-bottom:.35rem;}
.plant-progress small{color:#b7b493;font-size:.61rem;}
.plant-progress progress{width:100%;height:3px;border:0;display:block;background:#344541;accent-color:#b2bd8f;}
.plant-progress progress::-webkit-progress-bar{background:#344541;}.plant-progress progress::-webkit-progress-value{background:#b2bd8f;}
.switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:47px;font-size:.73rem;color:#d3ded1;}
.switch-row input{appearance:none;width:36px;height:22px;border-radius:20px;border:1px solid #57706a;background:#253b39;position:relative;cursor:pointer;flex:none;}
.switch-row input:after{content:"";position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#a7b6aa;transition:transform .2s;}
.switch-row input:checked{background:#596b4b;border-color:#b8ba8b;}.switch-row input:checked:after{transform:translateX(14px);background:#ede8bf;}
.select-label{display:block;font-size:.67rem;letter-spacing:.02em;color:#b9c9be;margin:.35rem 0 .6rem;}
.world-panel select{width:100%;min-height:45px;border-radius:8px;border:1px solid rgba(200,220,211,.25);color:#e5e9dc;background:#203535;padding:.5rem .75rem;font:inherit;font-size:.75rem;cursor:pointer;}
.world-panel input[type="range"]{width:100%;accent-color:#c2bd8c;min-height:32px;}
.privacy-note{padding:1rem 0 0;border-top:1px solid rgba(219,230,211,.1);font-size:.65rem;line-height:1.7;color:#b7c6bc;}
.queue-section{padding:1rem 0;border-top:1px solid rgba(219,230,211,.12);}.queue-section h3{font-size:.7rem;font-weight:400;letter-spacing:.06em;margin:0 0 .55rem;}
.command-row{display:flex;align-items:center;gap:.5rem;justify-content:space-between;border-bottom:1px solid rgba(219,230,211,.07);padding:.4rem 0;}
.command-row strong{display:block;font-size:.69rem;font-weight:400;line-height:1.5;}.command-row small{font-size:.61rem;color:#a8bbb2;line-height:1.6;}
.command-row button{min-width:44px;min-height:44px;background:transparent;color:#c0cec2;border:0;cursor:pointer;font-size:1.1rem;}
.reset-confirmation{border:1px solid #866d50;background:#40362a;margin-top:.8rem;padding:.9rem;border-radius:8px;}.reset-confirmation p{font-size:.72rem;line-height:1.6;margin:0;color:#e9dfcd;}
.panel-version{display:flex;justify-content:space-between;font-size:.46rem;letter-spacing:.13em;color:#8fa89e;margin:1rem 0 .5rem;}
body.world-panel-open .world-toggle{visibility:hidden;}
body.world-essential .experience-shell{background:linear-gradient(rgba(7,23,31,.1),rgba(4,15,19,.3)),url('../images/world-fallback.webp') center/cover no-repeat,#162e32;}
body.world-essential #world-canvas{display:none;}
body.world-essential .webgl-fallback-message{display:block;position:absolute;left:50%;top:auto;bottom:18%;width:min(80vw,430px);transform:translateX(-50%);padding:.7rem 1rem;background:rgba(7,24,29,.76);border:1px solid rgba(198,217,204,.2);border-radius:10px;text-align:center;z-index:8;}
body.world-essential .webgl-fallback-message p{font-size:.75rem;color:#e1e7d9;margin:0 0 .3rem;}
body.world-essential .webgl-fallback-message span{font-size:.65rem;color:#c4d1c6;line-height:1.5;}
body.world-reduced #world-canvas,body.world-reduced #living-ui{transition:none;}
body.world-reduced *,body.world-reduced *:before,body.world-reduced *:after{animation-duration:.001ms!important;transition-duration:.001ms!important;}
@media(min-width:2000px){.world-caption{left:3rem;bottom:8rem}.world-coordinate{right:3rem}.world-toggle{right:3rem}}
@media(max-width:900px){.world-caption{left:1.5rem;bottom:7rem}.caption-title{font-size:.93rem}.world-coordinate{right:1.5rem}.world-toggle{right:1.5rem}body.world-visible .identity h1{font-size:9.4vw}body.world-visible .areas{font-size:.51rem;letter-spacing:.12em}}
@media(max-width:600px){
 body.world-visible .identity{top:36%;padding:0 1.05rem;width:100%;}body.world-visible .identity h1{flex-direction:column;align-items:center;gap:.07em;font-size:17.2vw;line-height:.95;font-weight:650;letter-spacing:-.045em;}body.world-visible .identity-kicker{font-size:.48rem;letter-spacing:.29em;margin-bottom:1.25rem;}body.world-visible .slogan{font-size:.91rem;max-width:275px;line-height:1.5;margin-top:1.35rem;}body.world-visible .areas{font-size:.45rem;letter-spacing:.12em;line-height:2.05;max-width:265px;margin-top:.85rem;}body.world-visible .areas b{padding:0 .12em;}
 body.world-visible .topbar{padding:1.2rem 1.25rem;}body.world-visible .monogram{width:37px;height:37px;font-size:.65rem;}
 body.world-visible .ambient-frame{background:radial-gradient(ellipse 85% 26% at 50% 36%,rgba(4,15,23,.35),rgba(5,18,24,.08) 75%,transparent),linear-gradient(180deg,transparent 70%,rgba(2,17,22,.33));}
 .world-coordinate{top:2.05rem;right:1.25rem;font-size:.46rem;gap:.45rem;letter-spacing:.09em}.world-coordinate-time{margin-left:.1rem;font-size:.52rem}#living-ui[data-demo="true"] .world-coordinate:before{font-size:.41rem;padding:.16rem .3rem;}
 .world-caption{left:1.25rem;bottom:7.45rem}.caption-index{font-size:.4rem;letter-spacing:.11em;margin-bottom:.65rem}.caption-title{font-size:.81rem;line-height:1.35}.caption-rule{margin:.6rem 0;width:23px}.caption-foot{font-size:.36rem;letter-spacing:.12em}
 .world-toggle{width:49px;height:49px;right:1.1rem;bottom:max(1.25rem,calc(env(safe-area-inset-bottom) + .7rem));}.world-toggle svg{width:27px;height:27px}.world-toggle>span{display:none;}
 body.world-visible .experience-footer{left:1.1rem;right:1.1rem;bottom:max(1.25rem,calc(env(safe-area-inset-bottom) + .7rem));}body.world-visible .weather-credit{max-width:90px;font-size:.43rem;bottom:.64rem;line-height:1.45;}
 body.world-visible .replay-button{font-size:.45rem;min-height:44px;padding:.5rem .7rem;}body.world-visible .closing{bottom:max(5.3rem,calc(env(safe-area-inset-bottom) + 4.6rem));}body.world-visible .next-part{font-size:.44rem;letter-spacing:.18em;}
 .world-panel{right:0;left:0;top:auto;bottom:0;width:100%;max-height:88svh;max-height:88dvh;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom);animation:sheet-in .25s ease;}.panel-head{padding:1.4rem 1.3rem .8rem}.panel-intro{margin-left:1.3rem;margin-right:1.3rem;font-size:.75rem}.character-state{margin-left:1.3rem;margin-right:1.3rem}.panel-scroll{padding-left:1.3rem;padding-right:1.3rem}.panel-head h2{font-size:1.8rem;}
 .world-toast{right:1rem;left:1rem;bottom:5.5rem;max-width:none;font-size:.7rem}.world-panel-open .world-toast{z-index:5;bottom:1rem;left:1rem;right:1rem;background:#1d3837;border-color:#b8bf94;}
 body.world-essential .webgl-fallback-message{bottom:19%;}.world-panel-open .world-coordinate,.world-panel-open .world-caption{visibility:hidden;}
}
@keyframes sheet-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@media(max-height:650px) and (orientation:portrait){body.world-visible .identity{top:34%;}body.world-visible .identity h1{font-size:15vw;}body.world-visible .identity-kicker{margin-bottom:.9rem;}body.world-visible .slogan{margin-top:1rem;font-size:.84rem;}body.world-visible .areas{margin-top:.6rem}.world-caption{bottom:6.5rem}.caption-index,.caption-rule,.caption-foot{display:none}.caption-title{font-size:.7rem}.world-panel{max-height:95svh;}.panel-intro{display:none}.panel-head{padding-top:.8rem}.character-state{margin-bottom:.7rem}}
@media(max-height:600px) and (orientation:landscape){body.world-visible .identity{top:38%;}body.world-visible .identity h1{font-size:8.8vw;}body.world-visible .identity-kicker{margin-bottom:.7rem;font-size:.45rem;}body.world-visible .slogan{margin-top:.8rem;font-size:.87rem}body.world-visible .areas{margin-top:.55rem;font-size:.42rem}.world-caption{display:none}.world-coordinate{top:1.35rem}body.world-visible .topbar{padding-top:.7rem}.world-toggle{width:46px;height:46px;bottom:1rem}.world-panel{top:.6rem;bottom:.6rem}.panel-intro{display:none}.panel-head{padding-top:1rem}.world-toast{bottom:4.5rem}}
@media(prefers-reduced-motion:reduce){#living-ui,.world-toggle,.world-panel{animation:none;transition:none;}}
@media(prefers-contrast:more){body.world-visible .ambient-frame{background:rgba(0,8,14,.53)}.world-panel{background:#102024}.small-note,.caption-foot{color:#d9e4dc!important}}

.world-panel-open .world-toast{z-index:6;max-width:min(360px,calc(100vw - 40px));}

.source-links a { color: #c4d2c6; text-decoration: underline; text-underline-offset: 3px; }

/* World interaction remains below the established identity layer. */
body.world-visible .identity h1{pointer-events:auto;}
.world-object-hover{cursor:pointer;}
.world-explore-hint{position:absolute;z-index:3;display:flex;flex-direction:column;gap:.35rem;max-width:180px;padding:.5rem .65rem;pointer-events:none;color:#f1ecdc;background:rgba(8,21,25,.82);border-left:1px solid rgba(214,194,150,.65);text-shadow:0 1px 8px #061114;}
.world-explore-hint[hidden]{display:none;}
.world-explore-hint>span{font-size:.6rem;line-height:1.3;letter-spacing:.03em;}
.world-explore-hint>strong{font-size:.46rem;line-height:1.3;font-weight:500;letter-spacing:.16em;color:#d5c497;}
.world-room-links{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;margin:0 0 1rem;}
.world-room-links a,.world-room-links button{display:flex;justify-content:space-between;align-items:center;gap:.5rem;min-height:44px;padding:.65rem .6rem;background:transparent;border:0;border-bottom:1px solid rgba(206,219,204,.19);border-radius:0;color:#e3e7da;text-decoration:none;font:inherit;font-size:.7rem;line-height:1.5;text-align:left;cursor:pointer;}
.world-room-links a:hover,.world-room-links button:hover{color:#f2deaf;border-bottom-color:#c8b688;}
.world-room-links span{color:#b7b89b;}
@media(hover:none){.world-explore-hint{display:none;}}
@media(prefers-contrast:more){.world-explore-hint{background:#061114;border-color:#fff;color:#fff}.world-room-links a,.world-room-links button{color:#fff;border-color:#b7c9b5}}

/* The enhanced scene now provides the portal response. Keep link color,
   underline and focus styles; suppress only its old decorative miniatures. */
body.world-visible:not(.world-essential) .world-interactions-ready .portal-effect{visibility:hidden;}
