/* The common room is a PixiJS scene; HTML keeps its readable, keyboard controls. */
#guild-room:has(.shared-scene){padding:0;background:#102627;border-top:0;color:#e2e6d5;overflow:visible}
#guild-room:has(.shared-scene)>.guild-header{padding:18px 26px;border-color:#a2ae8733}
#guild-room:has(.shared-scene)>.guild-header .guild-preview-label{color:#a1b39a}
#guild-room:has(.shared-scene)>.guild-header .guild-back{color:#d7e2cd;border-color:#7d927c}
#guild-room .guild-room:has(.shared-scene){position:relative}
#guild-room .guild-room:has(.shared-scene)>.guild-pane-head{position:absolute;left:38px;bottom:28px;z-index:2;padding:0;max-width:52%;pointer-events:none}
#guild-room .guild-room:has(.shared-scene) .guild-kicker{color:#b4bc98;font-size:9px}
#guild-room .guild-room:has(.shared-scene) .guild-title{color:#e4e6d0;font:500 clamp(18px,1.8vw,24px)/1.4 'Malgun Gothic',sans-serif}
#guild-room .guild-room:has(.shared-scene)>.guild-intro{display:none}
#guild-room .shared-scene{height:clamp(500px,calc(100dvh - 155px),780px);margin:0;border:0;background:#112728;position:relative;overflow:hidden;border-radius:0}
#guild-room .shared-scene:before,#guild-room .shared-scene:after{display:none}
.shared-scene>canvas{display:block;width:100%;height:100%;touch-action:pan-y}
.shared-scene>.scene-hero-likeness{position:absolute;z-index:2;display:block;object-fit:contain;pointer-events:none;filter:none;transform:translate(-50%,-50%);will-change:transform}
.shared-scene>.scene-hero-likeness[hidden]{display:none}
#guild-room .shared-scene[data-scene-composition=portrait-hall] .scene-destination{min-width:0;width:43%;padding:6px 5px;gap:3px;line-height:1.25}
#guild-room .shared-scene[data-scene-composition=portrait-hall] .scene-destination strong{font-size:15px}
#guild-room .shared-scene[data-scene-composition=portrait-hall] .scene-destination[data-destination=board]{transform:translate(-50%,calc(-100% - 10px))}
#guild-room .guild-room:has(.shared-scene[data-scene-composition=portrait-hall])>.guild-pane-head{width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
.scene-destinations{position:absolute;inset:0;pointer-events:none;z-index:3}
#guild-room .scene-destination{position:absolute;transform:translate(-50%,-12px);width:19%;min-width:130px;max-width:230px;display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center;padding:10px 6px;border:0;background:transparent;color:#e7e5cd;pointer-events:auto;cursor:pointer;box-shadow:none;border-radius:0;font:13px/1.5 'Malgun Gothic',sans-serif;text-shadow:0 2px 8px #061313}
#guild-room .scene-destination strong{font-size:16px;letter-spacing:-.03em;font-weight:500}
#guild-room .scene-destination span{font-size:10px;color:#a8b89a}
#guild-room .scene-destination[data-destination=battle]{background:linear-gradient(90deg,transparent,#102727ed 18% 82%,transparent)}
#guild-room .scene-destination.scene-hover{background:#d9d1a80c;color:#fff8d8}
#guild-room .scene-destination:focus-visible{outline:2px solid #e8cea0;outline-offset:5px}
#guild-room .scene-status{position:absolute;bottom:5px;left:25px;right:25px;font-size:10px;color:#9cac93;text-align:center;pointer-events:none}
#guild-room .shared-scene[data-scene-state=ready]>.scene-status{width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
#guild-room .shared-scene[data-scene-state=idle] .scene-destinations,#guild-room .shared-scene[data-scene-state=unavailable] .scene-destinations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:150px 25px 50px;align-content:center}
#guild-room .shared-scene[data-scene-state=idle] .scene-destination,#guild-room .shared-scene[data-scene-state=unavailable] .scene-destination{position:static;transform:none;width:100%;max-width:none;min-width:0;border:1px solid #8c9c7755;padding:24px 8px}
#guild-room .guild-room:has(.shared-scene)>.guild-doors,#guild-room .guild-room:has(.shared-scene)>.guild-placeholder-note{display:none}
#guild-room:has(.shared-scene)>.guild-pane:not(.guild-room){background:#f4f3eb;color:#25392d;padding:28px clamp(20px,3vw,40px)}
@media(max-width:900px){
 body>#guild-room:has(.shared-scene){margin:90px 12px 25px}
 #guild-room .guild-room:has(.shared-scene)>.guild-pane-head{left:22px;bottom:20px;max-width:90%}
 #guild-room .shared-scene{height:620px}
 #guild-room .scene-destination{min-width:0;width:43%;padding:11px 5px}
 #guild-room .scene-destination strong{font-size:15px}
 #guild-room .scene-status{width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
 #guild-room .shared-scene[data-scene-state=unavailable] .scene-status{width:auto;height:auto;clip-path:none;left:15px;right:15px;bottom:8px;font-size:10px}
}
@media(min-width:660px) and (max-width:900px){#guild-room .shared-scene{height:540px}#guild-room .scene-destination{width:23%;font-size:12px}}

/* In the hall the scene owns the viewport. The document UI is restored when
   an existing record, form or battle page is opened. */
body[data-studio-space=room]{background:#112728;overflow-x:clip;padding-bottom:0}
body[data-studio-space=room]>#guild-room{width:100%;max-width:none;margin:0;padding:0;border:0}
body[data-studio-space=room] #guild-room>.guild-header{display:none}
body[data-studio-space=room] #guild-room .shared-scene{height:100dvh;min-height:640px}
body[data-studio-space=room]>.studio-header{
 position:absolute;
 inset:20px 30px auto;width:auto;height:auto;min-height:52px;display:flex;flex-direction:row;
 align-items:center;gap:18px;padding:0;background:transparent;border:0;pointer-events:none;
}
body[data-studio-space=room]>.studio-header>*{pointer-events:auto}
body[data-studio-space=room] .brand-lockup{flex-direction:row;align-items:center;gap:16px;margin-right:auto;padding:0;border:0}
body[data-studio-space=room] .brand-mark{width:43px;height:45px;font-size:31px}
body[data-studio-space=room] .studio-header h1{font-size:16px;letter-spacing:.06em}
body[data-studio-space=room] .studio-header .brand{font-size:8px}
body[data-studio-space=room] .studio-header>a,body[data-studio-space=room] #guild-open{display:none}
body[data-studio-space=room] #flow-account-button{order:4;margin:0;padding:10px 14px;background:#0c2023b3;border:1px solid #a4b59b55}
body[data-studio-space=room] .studio-header>.bgm-player{order:5;margin:0}
body[data-studio-space=room] .studio-header>.bgm-player>summary{padding:10px 14px;border:1px solid #a4b59b55;background:#0c2023b3}
body[data-studio-space=room] .studio-header>.bgm-player>summary:before{display:none}
body[data-studio-space=room] .studio-header .bgm-controls{right:30px}
body[data-studio-space=room] .studio-header>.access-card{right:30px;width:min(460px,calc(100vw - 60px));max-height:calc(100dvh - 105px)}
@media(max-width:659px){
 body[data-studio-space=room]>.studio-header{inset:14px 16px auto;gap:8px}
 body[data-studio-space=room] .brand-lockup{gap:9px}
 body[data-studio-space=room] .brand-mark{width:32px;height:38px;font-size:26px}
 body[data-studio-space=room] .studio-header h1{font-size:12px;letter-spacing:.02em}
 body[data-studio-space=room] .studio-header .brand{display:none}
 body[data-studio-space=room] #flow-account-button,body[data-studio-space=room] .studio-header>.bgm-player>summary{padding:9px 10px;font-size:11px}
 body[data-studio-space=room] .studio-header .bgm-controls{right:0}
 body[data-studio-space=room] .studio-header>.access-card{right:0;width:calc(100vw - 32px);max-height:calc(100dvh - 88px)}
 body[data-studio-space=room] #guild-room .shared-scene{min-height:760px}
 body[data-studio-space=room] #guild-room .guild-room>.guild-pane-head{width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
}
