/* Finite feedback; the idle scene has no animation loop or promoted layer. */
.world-panel::backdrop{backdrop-filter:none;background:#050e0ab3}
.world-panel[open]{animation:polish-panel-in 180ms ease-out}
@keyframes polish-panel-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
#game button:not(:disabled):active,dialog button:not(:disabled):active{transform:translateY(1px) scale(.98);transition:transform 80ms ease-out}
.scene-object.is-empty>svg{opacity:.48;filter:none}
.scene-object.is-empty .object-tag{fill:#1b3027;stroke:#91a38b}
.scene-object.is-selected .object-tag{stroke:#e5efb9;stroke-width:.09}
.scene-object:focus-visible .object-tag{stroke:#fff;stroke-width:.14}
.scene-contact-shadow{fill:#020b07;opacity:.22;pointer-events:none}
.scene-risk-wash{position:absolute;inset:0;pointer-events:none;z-index:4;background:linear-gradient(90deg,#a977302e,transparent 18%,transparent 82%,#a977302e)}
.scene-risk-wash[data-risk=danger]{background:linear-gradient(90deg,#bd593a38,transparent 18%,transparent 82%,#bd593a38)}
.scene-stage[data-risk=attention] .scene-noise{color:#e4c087}
.scene-stage[data-risk=danger] .scene-noise{color:#efa68c}
.loot-reveal{filter:none;isolation:isolate;gap:16px}
.loot-reveal::before{content:'';position:absolute;inset:-24px;z-index:-1;background:radial-gradient(ellipse,#1b2e20ed 10%,#192a20ba 45%,transparent 72%);pointer-events:none}
.loot-find strong{font-size:18px;line-height:1.35;color:#f5f2db;text-shadow:0 2px 3px #000}
.map-first-tray.scene-tray,.world-panel{border-top-color:#b5c18a80}
.map-first-tray h2{color:#eee8cf}.scene-eyebrow{letter-spacing:1.5px}
@media(prefers-reduced-motion:reduce){.world-panel[open],.bag-pulse{animation:none!important}#game button:active,dialog button:active{transform:none!important;transition:none!important}}
html[data-game-hidden] .world-panel[open],html[data-game-hidden] .bag-pulse{animation:none!important}
/* Browser QA: keep the refuge title above its stock strip and reset page-banner bleed in the workshop sheet. */
.home-resource-hud.resource-hud{top:140px}
.map-first-stage:has(.home-resource-hud) .scene-map{top:182px}
.home-resource-hud.resource-hud{left:16px;right:16px;max-width:none;width:auto;justify-content:space-around;gap:4px;padding:7px 10px;border:1px solid #a3ad7950;border-radius:10px;background:#0b1814e8;}
.home-resource-hud.resource-hud>*{min-width:0;flex:1;justify-content:center}
.map-first-tray.scene-tray{max-height:34%;padding-top:10px}
.ranking-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:6px}
.ranking-list>li{padding:12px 14px;border:1px solid #80906a44;border-radius:8px;background:#0d1d17}
.ranking-list>li:not(.ranking-row){text-align:center;padding:22px 16px;color:#e1e5cb;font-size:16px;line-height:1.5}
.ranking-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ranking-tabs button{min-width:0;padding:10px;font-size:14px;line-height:1.3}
.detail-dialog:has(.ranking-list) .detail-note{font-size:12px;line-height:1.45}
.panel-screen .workshop-banner{margin:0;padding:8px 0 18px}
@media(max-height:650px){.home-resource-hud.resource-hud{top:124px}.map-first-stage:has(.home-resource-hud) .scene-map{top:166px}}
/* A short landscape viewport needs a side tray rather than stacking it below the room. */
@media(max-height:500px) and (min-width:600px){
 .game-shell.interior-mode .interior-screen{display:grid;grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr)}
 .map-first-stage.scene-stage{grid-column:1;grid-row:1;height:100%;min-width:0;min-height:0}
 .map-first-tray.scene-tray{grid-column:2;grid-row:1;align-self:end;width:calc(100% - 24px);margin:12px;max-height:calc(100dvh - 24px);padding:12px 12px 6px}
 .map-first-stage .scene-map{left:8px;right:8px}
 .map-first-top .scene-wordmark{display:none}
 .scene-location{left:16px;right:16px}
 .scene-dock-links{flex-wrap:wrap}.scene-dock-links button{flex:1 0 42%}
}

/* SVG controls must never receive the browser tap paint. */
[data-world-exit]{-webkit-tap-highlight-color:transparent;touch-action:manipulation;cursor:pointer;outline:none}
[data-world-exit]:focus-visible{outline:2px solid #c5d68e}
.ranking-rules{font:12px/1.5 system-ui;color:#adb699;margin-top:18px;border-top:1px solid #80906a44;padding-top:12px}.ranking-rules summary{min-height:44px;cursor:pointer}

.home-stage .scene-map{inset:128px 0 52px}.home-actions .scene-action-row{align-items:center}.home-actions .selected-state{margin:0;font-size:12px}.home-actions .scene-dock-links{display:flex;gap:6px;border-top:1px solid #7c896440;padding-top:8px}.home-actions .scene-dock-links button{flex:1;min-height:44px;font-size:12px}.home-actions.map-first-tray{margin:0 10px 10px;padding:10px 12px 4px;background:#102018;border:1px solid #71826644;border-radius:10px}.home-stage .scene-location h1{font-size:25px}.home-stage .scene-controls-plan{display:none}.home-stage .scene-floors{bottom:18px}.home-stage .scene-camera{bottom:18px}

/* Landing sound-trace language, with finite transform-only pulses in game. */
.game-sound-trace{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:30px;padding:4px 10px;border-left:2px solid #d6ac76;background:#111b14}
.game-sound-trace i{display:block;width:3px;height:22px;background:#c9ae83;transform:scaleY(.3);animation:game-footsteps 900ms ease-in-out 3}
.game-sound-trace i:nth-child(2n){animation-delay:150ms}.game-sound-trace i:nth-child(3){animation-delay:300ms}
.game-noise-warning{display:flex;align-items:center;gap:8px;margin-top:5px;font:11px/1.4 system-ui;letter-spacing:0;color:#e4bd91}
.noise-retreat-reason{padding:18px;border:1px solid #c58f61;border-left:4px solid #d6ac76;background:#281f17;margin-bottom:24px}.noise-retreat-reason h2{font-size:25px;margin:12px 0}.noise-retreat-reason strong{display:block;color:#d7deb1;margin-top:12px}.noise-retreat-reason .overline{color:#e8bc91}
@keyframes game-footsteps{0%,60%,100%{transform:scaleY(.3)}25%{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.game-sound-trace i{animation:none;transform:scaleY(.65)}}
html[data-game-hidden] .game-sound-trace i{animation:none}

/* Guild panels reuse the native dialog and remain static while idle. */
.guild-panel{clear:both}.guild-panel h2{font-size:30px;line-height:1.1;margin-bottom:16px}.guild-panel h3{font:23px Georgia,serif;margin:16px 0 10px}.guild-panel p{font-size:14px;line-height:1.6}.guild-panel section{border-top:1px solid #8b966344;padding-top:12px;margin-top:20px}.guild-panel label{display:grid;gap:7px;font:13px/1.4 system-ui;margin:14px 0}.guild-panel input,.guild-panel select{box-sizing:border-box;width:100%;min-height:44px;padding:10px;background:#0c1913;border:1px solid #8d987155;border-radius:5px;color:#e4e6cf;font:16px system-ui}.guild-panel .action{width:100%;margin:6px 0;min-height:44px}.guild-consent{grid-template-columns:24px 1fr;align-items:start}.guild-consent input{min-height:20px;width:20px}.guild-stats{display:flex;gap:16px;flex-wrap:wrap;font:12px system-ui;margin:14px 0}.guild-stats b{color:#d2daa3}.guild-primary{display:grid;grid-template-columns:1fr 1fr;gap:8px}.guild-primary .action{padding:10px;font-size:12px}.guild-refuge{background:linear-gradient(#253a2a,#112218);border:1px solid #9ca27655;border-radius:9px;overflow:hidden}.guild-refuge svg{display:block;width:100%;max-height:170px}.guild-refuge>span{display:block;font:13px Georgia,serif;text-align:center;padding:6px}.guild-refuge>div{display:flex;justify-content:center;gap:15px;padding:8px;background:#0f1d17}.guild-refuge small{font:11px system-ui;color:#87947d}.guild-refuge .is-built{color:#d1dd9d}.guild-cost{list-style:none;padding:0}.guild-cost li{display:grid;grid-template-columns:1fr auto;gap:6px;margin:12px 0;font:13px system-ui}.guild-cost progress{grid-column:1/-1;width:100%;height:5px;accent-color:#bcca85}.guild-project>small{display:block;font:11px/1.5 system-ui;color:#abb49d}.guild-members{margin:22px 0}.guild-members summary{min-height:44px;cursor:pointer}.guild-member{display:flex;gap:8px;align-items:center;border-bottom:1px solid #84906833;padding:8px 0;font-size:13px}.guild-member>span{flex:1;overflow-wrap:anywhere}.guild-member button{font-size:11px;min-height:44px;padding:6px;background:none;border:1px solid #84906855;border-radius:4px}.guild-error{color:#edb39a}.guild-panel .ranking-row small{display:block;font-size:10px;line-height:1.5;color:#acb69c}.guild-panel .ranking-row strong{font-size:11px;white-space:nowrap}.guild-share-card{border:1px solid #b9c488;background:#223223;padding:18px;text-align:center}.guild-share-card>b{font:26px Georgia,serif}.guild-share-card p{color:#c6d2a5}@media(max-width:359px){.guild-primary{grid-template-columns:1fr}.guild-member{flex-wrap:wrap}}
.guild-panel .guild-refuge>svg{height:auto;min-height:110px;max-height:none;max-width:none;width:100%;aspect-ratio:360/155}.guild-panel .text-button{display:block;width:100%;min-height:44px;padding:10px 0;text-align:left;font:13px/1.5 system-ui}.guild-panel .guild-refuge>svg path{vector-effect:non-scaling-stroke}
