:root{font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#263e39;background:#d4d6cc;font-synthesis:none;--ink:#263e39;--paper:rgba(250,248,239,.94);--gold:#a48143;--line:rgba(51,70,59,.13)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}button{font:inherit;cursor:pointer;color:inherit;border:0;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #c19857;outline-offset:3px}button:disabled{opacity:.35;cursor:default}button[hidden],[hidden]{display:none!important}canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}h1,h2,p{margin:0}button,nav{touch-action:manipulation}body{user-select:none;-webkit-user-select:none}.topbar{position:absolute;top:calc(22px + env(safe-area-inset-top));left:28px;right:28px;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;gap:8px}.brand{display:flex;gap:13px;align-items:center;text-shadow:0 1px 12px #f6f1df}.brand-icon{font-size:43px;line-height:1;color:#8c713f}.eyebrow{font-size:9px;letter-spacing:2.1px;font-weight:600;color:#728075}.brand h1{font-family:"Songti SC","SimSun",serif;font-weight:500;font-size:29px;letter-spacing:5px;margin-top:3px}.brand p{font-size:11px;letter-spacing:2px;margin-top:5px;color:#617067}.brand p span{padding:0 5px}.top-actions{display:flex;gap:8px;align-items:center;pointer-events:auto}.connection{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--paper);padding:10px 13px;border-radius:30px;font-size:11px;white-space:nowrap}.connection i{height:6px;width:6px;background:#4d8e6d;border-radius:100%}.connection.pending i{background:#ba9653}.connection.offline i{background:#b26455}.round{height:34px;width:34px;border-radius:100%;background:var(--paper);border:1px solid var(--line)}.location-label{position:absolute;left:30px;top:151px;display:flex;gap:10px;align-items:center;pointer-events:none}.location-label>span{font:italic 26px Georgia,serif;color:var(--gold);border-right:1px solid #a6ab99;padding-right:10px}.location-label>div{font:16px "SimSun",serif;letter-spacing:2px}.location-label small{display:block;font:10px system-ui;letter-spacing:1px;color:#728075;margin-top:6px}.view-tools{position:absolute;right:24px;top:140px;display:flex;flex-direction:column;gap:8px}.view-tools button{width:44px;height:44px;background:var(--paper);border:1px solid var(--line);border-radius:14px;font-size:12px}.view-tools button:first-child{font-size:28px}.bottom-ui{position:absolute;bottom:calc(14px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(560px,calc(100% - 28px));pointer-events:none}.bottom-ui button,.interaction,.niche-list{pointer-events:auto}.niche-list{display:grid;grid-template-columns:repeat(3,1fr);background:var(--paper);border:1px solid rgba(255,255,255,.5);border-radius:18px;padding:9px;box-shadow:0 4px 24px #2c3c3520;gap:3px}.niche{display:flex;align-items:center;text-align:left;gap:9px;padding:10px 12px;background:transparent;border-radius:12px;min-height:61px}.niche.selected{background:#e2e7dc}.niche small{display:block;font:10px Georgia,serif;letter-spacing:2px;color:#829084;margin-bottom:5px}.niche strong{font-size:13px;font-weight:500;white-space:nowrap}.niche-icon{color:#7f9184;font-size:25px;width:24px;text-align:center}.niche.lit .niche-icon{color:#bf8b36}.niche.empty .niche-icon{opacity:.4}.niche-arrow{margin-left:auto;color:#a2ac9f;font-size:14px}.hint{display:flex;justify-content:space-between;margin:11px 3px 0;font-size:10px;letter-spacing:.5px;color:#455c50;text-shadow:0 1px 5px #fff}.prototype{opacity:.6}.touch-hint{display:none}.interaction{background:var(--paper);border:1px solid #ffffff90;border-radius:18px;margin:0 0 10px;padding:15px 18px;box-shadow:0 4px 24px #2c3c3518}.interaction-heading{display:flex;justify-content:space-between;align-items:center}.interaction-heading>div{display:flex;align-items:center;gap:12px}.interaction-heading strong{font-size:15px;font-weight:500}.interaction-heading button,.dialog-heading button{background:transparent;font-size:24px;width:32px;height:30px;color:#899487}.interaction p{font-size:11px;color:#768578;margin:3px 0 13px}.state-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.state-actions button{padding:11px 0;border:1px solid #d6dcd0;background:#edf0e7;border-radius:9px;font-size:13px}.state-actions button.light-action{background:var(--ink);color:#f5ebd6;border-color:var(--ink)}.state-actions button.active{box-shadow:inset 0 0 0 1px var(--gold)}#world-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.world-label{position:absolute;left:0;top:0;display:flex;gap:7px;align-items:center;background:#f8f5e6e8;padding:6px 10px;border:1px solid #ffffff80;border-radius:7px;font-size:10px;white-space:nowrap;will-change:transform}.world-label b{font-weight:500;font-family:Georgia,serif;letter-spacing:1px}.world-label i{width:5px;height:5px;background:#8c9e8e;border-radius:50%}.world-label.lit i{background:#cf922d}.world-label.extinguished i{background:#898579}#toast{position:absolute;left:50%;top:24%;transform:translateX(-50%);background:#263e39ed;color:#f8f4e8;padding:11px 20px;border-radius:20px;font-size:12px;opacity:0;transition:opacity .2s;pointer-events:none;width:max-content;max-width:90%;text-align:center}#toast.show{opacity:1}.screen-overlay{position:absolute;inset:0;background:#e9e9de;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:10;gap:20px}.loading-mark{font-size:60px;color:#aa8b50}.screen-overlay h2{font:24px "SimSun",serif;letter-spacing:4px}.screen-overlay p{font-size:13px;color:#7d897d;max-width:80%;text-align:center}.screen-overlay button{background:var(--ink);color:#fff;padding:13px 25px;border-radius:10px}dialog{padding:25px;border:1px solid #ffffff90;border-radius:20px;background:#f4f4e9;color:var(--ink);width:min(430px,calc(100% - 32px));box-shadow:0 20px 80px #1d332d40}dialog::backdrop{background:#283c3255}.dialog-heading{display:flex;align-items:center;justify-content:space-between}dialog h2{font:26px "SimSun",serif;margin:16px 0 24px}dialog p{font-size:13px;line-height:1.9;margin:15px 0;color:#627165}dialog b{color:#2d4b3c}.dialog-foot{border-top:1px solid #d9ded2;padding-top:16px;font-size:11px;color:#8a9589;margin-top:20px}
@media(pointer:coarse){.touch-hint{display:inline}.desktop-hint{display:none}}
@media(max-width:600px){.topbar{top:calc(16px + env(safe-area-inset-top));left:18px;right:16px}.brand{gap:7px}.brand-icon{font-size:33px}.brand h1{font-size:24px;letter-spacing:3px}.brand .eyebrow{font-size:7px;letter-spacing:1.4px}.brand p{font-size:9px;letter-spacing:1.4px}.connection{font-size:10px;padding:9px 10px}.round{height:31px;width:31px}.location-label{left:20px;top:128px}.location-label small{font-size:9px}.location-label>div{font-size:13px}.location-label>span{font-size:21px}.view-tools{right:16px;top:123px}.view-tools button{width:37px;height:37px;border-radius:12px;font-size:11px}.niche-list{padding:6px;border-radius:15px}.niche{padding:8px 7px;gap:6px;min-height:59px}.niche-icon{font-size:22px;width:20px}.niche strong{font-size:12px}.niche-arrow{font-size:12px}.hint{font-size:9px;letter-spacing:0}.interaction{padding:12px 14px}.state-actions button{padding:12px 0}.bottom-ui{bottom:calc(12px + env(safe-area-inset-bottom))}}
@media(max-height:500px){.location-label{display:none}.topbar{top:12px}.brand p,.brand .eyebrow{display:none}.view-tools{top:75px}.bottom-ui{width:420px;bottom:8px}.niche-list{padding:3px}.niche{min-height:45px;padding:5px 10px}.interaction{padding:8px 13px;margin-bottom:5px}.interaction p{margin:0 0 5px}.state-actions button{padding:6px}.hint{margin-top:5px}}

.light-toolbar{pointer-events:auto;display:flex;align-items:center;gap:12px;background:var(--paper);padding:16px 20px;border-radius:18px;box-shadow:0 4px 24px #2c3c3520}.light-toolbar>div{flex:1}.light-toolbar strong{font-size:15px;font-weight:500}.light-toolbar p{font-size:11px;color:#768578;margin-top:6px}.light-toolbar button{padding:13px 26px;border-radius:12px;background:#263e39;color:#fff}.light-toolbar #cancel-light{background:#e3e7da;color:#263e39;padding:13px}

/* Quiet, ivory overlay matching the reference composition. */
.topbar{top:calc(26px + env(safe-area-inset-top));left:24px;right:24px;color:#fff1d9}.brand{text-shadow:0 2px 12px #38261980}.brand h1{font:600 30px "Songti SC","SimSun",serif;letter-spacing:2px;margin:0 0 5px}.connection{padding:0;border:0;background:none;color:#fff1d9;font-size:14px;border-radius:0}.room-switch{pointer-events:auto;align-self:flex-start;border:1px solid #ead5ae;border-radius:30px;padding:8px 15px;background:#45362466;color:#fff0d6;font-size:15px;white-space:nowrap}.room-switch>span{font-size:21px;vertical-align:-1px;margin-right:5px}.location-label,.view-tools{display:none}.bottom-ui{bottom:calc(40px + env(safe-area-inset-bottom));width:min(480px,92%);color:#ffefd7;text-shadow:0 2px 10px #3f2a1c70}.scene-hint>span{font-size:27px;display:block;margin-bottom:6px}.scene-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.scene-actions button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:0;background:transparent;color:#ffefd7;font-size:16px;min-height:86px}.action-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#5b412d44;border:1px solid #f6dfb21f}.action-icon svg{width:35px;height:35px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.scene-actions button:hover .action-icon{background:#7c563a88}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#cancel-light{display:block;margin:12px auto 0;background:#4d382a99;color:#ffefd7;border-radius:20px;padding:8px 16px}.bottom-ui::before{content:"";position:fixed;z-index:-1;bottom:-60px;left:50%;transform:translateX(-50%);width:100vw;height:220px;background:linear-gradient(transparent,#38251833);pointer-events:none}@media(max-width:380px){.topbar{left:16px;right:16px}.brand h1{font-size:26px}.room-switch{font-size:13px;padding:7px 11px}}@media(max-height:550px){.bottom-ui{bottom:12px}.scene-actions button{min-height:60px}.action-icon{width:40px;height:40px}}

#offering-dialog{position:fixed;margin:auto;width:min(320px,calc(100% - 32px));padding:26px 20px 18px;text-align:center;border:1px solid #d6c2a0;border-radius:18px;color:#493622;background:#f8f1e6}
#offering-dialog h2{margin:4px 0 16px;font-size:24px}
#offering-dialog img{display:block;margin:auto;max-width:100%;height:auto;border-radius:6px}
#offering-dialog p{margin:12px 0 0;color:#78644e}
.offering-close{position:absolute;top:8px;right:8px;width:40px;height:40px;background:transparent;font-size:23px}
/* Compact activities sit close to the bottom safe area. */
.bottom-ui{bottom:calc(12px + env(safe-area-inset-bottom));width:min(360px,88%)}
.scene-actions{gap:10px}
.scene-actions button{min-height:66px;gap:6px;font-size:14px}
.scene-actions .action-icon{width:42px;height:42px}
.scene-actions .action-icon svg{width:27px;height:27px}
@media(max-height:550px){.bottom-ui{bottom:calc(8px + env(safe-area-inset-bottom))}.scene-actions button{min-height:56px}.scene-actions .action-icon{width:36px;height:36px}.scene-actions .action-icon svg{width:24px;height:24px}}
.corner-actions{display:flex;align-items:center;gap:9px;pointer-events:auto}
.corner-actions button{display:grid;place-items:center;width:40px;height:40px;padding:9px;border:1px solid #ead5ae88;border-radius:50%;background:#45362455;color:#fff0d6;cursor:default}
.corner-actions svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.corner-actions #support-candle{cursor:pointer}
.corner-actions svg.colored-candle{stroke:none;filter:drop-shadow(0 0 4px #ffbf5266)}
.corner-actions #support-candle:hover{background:#795b3680}
@media(max-width:480px){.corner-actions{gap:7px}.corner-actions button{width:34px;height:34px;padding:7px}.corner-actions svg{width:20px;height:20px}}
.angel-blessing {
  position: fixed;
  z-index: 8;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid rgba(255, 226, 163, .45);
  border-radius: 18px;
  color: #fff2d2;
  background: radial-gradient(ellipse, rgba(85, 61, 29, .88), rgba(43, 32, 24, .78));
  box-shadow: 0 0 28px rgba(255, 207, 119, .25);
  text-shadow: 0 0 12px rgba(255, 216, 140, .7);
  font: 500 16px/1.8 "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
