/* v11 — production-oriented visual pass: scene fidelity, camera grading, restrained UI. */
:root{--night:#101a20;--navy:#172930;--gold:#d4b783;--cream:#f6f5f1;--dim:#b8c5c4;--font:Inter,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif}
body{background:#0d1419}body.webgl-ready .world{background:linear-gradient(180deg,#192d36 0%,#425963 52%,#263e49 100%)}
body[data-scene="rural"].webgl-ready .world{background:linear-gradient(180deg,#89978c 0%,#b2b5a2 60%,#777c70 100%)}
body[data-scene="factory"].webgl-ready .world{background:linear-gradient(180deg,#1b2930 0%,#2f4a53 55%,#1a2e33 100%)}
body.webgl-ready .world::after{background:linear-gradient(90deg,rgba(7,13,17,.30),transparent 32%,transparent 72%,rgba(7,13,17,.15)),radial-gradient(ellipse at 51% 48%,transparent 33%,rgba(4,12,15,.27) 96%);mix-blend-mode:multiply}
body.webgl-ready #real3D{image-rendering:auto;filter:contrast(1.045) saturate(.91) brightness(1.08)}
/* Use subtle film texture, not uniform screen noise. */
.grain{opacity:.040;mix-blend-mode:soft-light}
.topbar{min-height:64px;padding:10px clamp(18px,3.2vw,52px);background:rgba(14,24,30,.91);border-color:rgba(190,201,199,.14);backdrop-filter:blur(20px)}
.brand{font-weight:550;letter-spacing:.025em}.brand small{letter-spacing:.13em;opacity:.6}
.iconbtn{font-size:12px;min-height:36px;border-radius:7px;transition:background .2s ease,border-color .2s ease}
.iconbtn:hover{background:rgba(214,227,227,.10)}
.main{height:calc(100dvh - 64px)}
.scene-title{font-family:var(--font)}body.webgl-ready .scene-title{top:16%;left:clamp(22px,4.6vw,73px);max-width:410px}body.webgl-ready .scene-title span{font-size:clamp(31px,3.1vw,49px);font-weight:550;letter-spacing:-.035em;text-wrap:balance}
body.webgl-ready .scene-title small{font-size:14px;line-height:1.75;max-width:300px;color:#e0e6e2;letter-spacing:0}
.scene-meta{font-size:12px;letter-spacing:.04em}
.spatial-hint{max-width:310px;background:rgba(17,29,33,.82);border-left:3px solid #dfc59a;border-radius:0 10px 10px 0;padding:12px 15px;box-shadow:0 14px 40px rgba(0,0,0,.24)}
.spatial-hint b{color:#ffe5b5;font-size:13px;margin-bottom:5px}.spatial-hint span{font-size:12px;line-height:1.7}.spatial-hint small{font-size:11px;line-height:1.6}
.spatial-hint kbd{border-radius:4px;font-size:11px}
body.webgl-ready .hotspot{background:rgba(16,31,34,.90);border-color:rgba(245,211,159,.88);border-radius:10px;box-shadow:0 10px 35px rgba(3,7,9,.35)}
/* Real-world AI health-service UI: distinct status bar, easy to read replies and tap targets. */
.chat-screen{background:linear-gradient(105deg,rgba(10,19,23,.46),rgba(11,26,30,.77));backdrop-filter:blur(4px)}
.chat-box{background:#f5f6f4;border:1px solid rgba(221,225,222,.95);border-radius:15px;box-shadow:0 24px 75px rgba(0,0,0,.36),0 2px 8px rgba(0,0,0,.12);overflow:hidden}
.chat-header{background:#fff;border-bottom:1px solid #e5e9e8;padding:15px 22px;min-height:74px}
.chat-brand strong{font-family:var(--font);font-size:17px;color:#203333;font-weight:650;letter-spacing:-.015em}
.chat-brand small{font-size:11px;color:#748381;letter-spacing:0}
.ai-orb{background:linear-gradient(145deg,#2d7e83,#1c525d);color:#f5fbf6;box-shadow:0 3px 12px rgba(41,115,114,.24)}
.chat-messages{background:linear-gradient(180deg,#f7f8f5,#f1f4f2);padding:22px 28px;scrollbar-color:#c6d2cf transparent}
.bubble{border-radius:14px;font-size:14px;line-height:1.76;box-shadow:0 1px 4px rgba(18,47,49,.035)}
.chat-interaction{background:#fff;border-top:1px solid #e1e8e6;padding:14px 21px 18px}
.step-task{color:#30494a;font-size:14px;font-weight:550;margin-bottom:12px}
.reply-chip{font-size:13px;line-height:1.6;border-radius:9px;border:1px solid #dce5e3;box-shadow:none;padding:11px 13px;min-height:44px}
.reply-chip:hover{border-color:#5b8989;background:#f2f7f5}
.write-line input{font-size:13px;min-height:44px;background:#f9faf9;border:1px solid #dce5e3;border-radius:8px}
.write-line button{border-radius:8px;min-height:44px}
.chat-hint{font-size:11px;color:#748784;line-height:1.5}
.chat-context{background:rgba(13,27,29,.53);border:1px solid rgba(196,215,207,.15);padding:18px;border-radius:14px;backdrop-filter:blur(12px)}
/* Evidence as an authentic case file, not a floating developer modal. */
.panel-overlay{background:rgba(8,16,19,.72);backdrop-filter:blur(10px)}
.sheet,.sheet:has(.audit-lede){background:#f6f5f1;color:#263a3b;border:1px solid #edece5;border-radius:14px;box-shadow:0 28px 90px rgba(0,0,0,.35);font-family:var(--font)}
.sheet h2{font-family:var(--font);font-weight:640;letter-spacing:-.025em}
.sheet p,.sheet:has(.audit-lede) p{line-height:1.68}
.sheet button{min-height:42px}
.audit-person{border-radius:10px}
.audit-score>b{font-weight:650;font-variant-numeric:tabular-nums}
/* Scene-specific foreground separation. */
body.webgl-ready .factory-controls{background:rgba(17,32,37,.93);border:1px solid rgba(155,177,180,.23);border-radius:12px;backdrop-filter:blur(18px);box-shadow:0 14px 50px rgba(0,0,0,.45)}
body.webgl-ready .factory-story{top:12%;left:clamp(18px,5vw,72px);max-width:370px}
body.webgl-ready .factory-story h2{font-family:var(--font);font-weight:560;letter-spacing:-.03em;text-shadow:0 2px 20px rgba(0,0,0,.4)}
body.webgl-ready .factory-status{background:rgba(20,35,40,.87);border:1px solid rgba(177,191,190,.16);border-radius:10px}
.f-btn{min-height:42px;font-size:13px;line-height:1.5;border-radius:8px}
.f-fine{font-size:11px;line-height:1.6}
.intro-inner h1{letter-spacing:-.035em;text-wrap:balance}
.role-card{border-radius:13px;backdrop-filter:blur(12px)}
.role-card h3{letter-spacing:-.02em}
/* Mobile-first: maintain evidence readability instead of compressing to tiny type. */
@media(max-width:860px){.chat-screen{background:#eef2f0;backdrop-filter:none}.chat-box{height:100%;width:100%;border:0;border-radius:0;box-shadow:none}.chat-header{min-height:68px}.chat-messages{padding:17px 17px 23px}.chat-interaction{padding:12px 15px max(15px,env(safe-area-inset-bottom))}.topbar{min-height:58px}.main{height:calc(100dvh - 58px)}}
@media(max-width:600px){body.webgl-ready .scene-title{left:18px;top:13%}body.webgl-ready .scene-title span{font-size:29px}body.webgl-ready .scene-title small{font-size:12px;max-width:65vw;line-height:1.6}.scene-meta{font-size:11px}.spatial-hint{padding:10px 12px;max-width:190px}.spatial-hint span{font-size:11px}.spatial-hint small{font-size:10px}.chat-brand strong{font-size:16px}.chat-brand small{font-size:11px}.bubble{font-size:13px}.step-task{font-size:13px}.reply-chip{font-size:13px;min-height:44px}.chat-hint{font-size:11px}.write-line input{font-size:12px}.sheet:has(.audit-lede){border-radius:0}.sheet:has(.audit-lede) .audit-person .audit-record{font-size:11px}.sheet:has(.audit-lede) .audit-route strong{font-size:12px}body.webgl-ready .factory-story{left:16px;top:9%;max-width:78vw}body.webgl-ready .factory-story h2{font-size:25px}.f-btn{font-size:12px;min-height:43px}}
@media(prefers-reduced-motion:reduce){body.webgl-ready #real3D{filter:none}}
