/* v674: the player stays inside the bright cabin, in front of the exit. */
.hq-transit{border:0;background:#fff4df}
.hq-transit-cabin{position:absolute;inset:0;background:url('../img/hq/elevator-cabin-v674.webp') center/100% 100% no-repeat}
.hq-transit-portal{position:absolute;left:32%;right:32%;top:13%;bottom:16%;overflow:hidden;background:#fff5e3}
.hq-transit-destination{position:absolute;inset:0;background-position:center;background-size:cover}
.hq-transit .hq-transit-door{top:0;bottom:0;width:50%;border:1px solid #aa8242;background:linear-gradient(100deg,#ddba76,#ffedbc 35%,#e4c58c 70%,#cfa55d);z-index:1}
.hq-transit .hq-transit-door.left{left:0}
.hq-transit .hq-transit-door.right{right:0}
.hq-transit[data-phase="moving"] .hq-transit-door{animation:none}
.hq-transit[data-phase="moving"]{animation:hq-cabin-sway 240ms ease-in-out 3}
.hq-transit-light{position:absolute;z-index:2;left:49.4%;width:1.2%;top:0;height:100%;opacity:0;background:linear-gradient(transparent 20%,#fffef0 48%,#ffdc86 52%,transparent 80%)}
.hq-transit[data-phase="moving"] .hq-transit-light{opacity:1;animation:hq-seam-up 450ms linear 2}
.hq-transit[data-direction="down"][data-phase="moving"] .hq-transit-light{animation-name:hq-seam-down}
.hq-transit .hq-transit-player{position:absolute;z-index:3;left:50%;bottom:6%;height:64%;aspect-ratio:272/362;transform:translateX(-50%);overflow:hidden;filter:drop-shadow(0 5px 3px #67451b40)}
:is(#hq-transit-v674,.hq-transit) .hq-transit-player>img{position:absolute!important;inset:auto!important;top:0!important;left:calc(var(--avatar,0) * -100%)!important;width:400%!important;height:100%!important;max-width:none!important;object-fit:fill!important;transform:none!important;border:0!important}
.hq-transit .hq-transit-panel{z-index:4;top:4%;gap:8px;padding:4px 14px;font-size:clamp(16px,3vh,28px);background:#fff7df}
.hq-transit[data-phase="opening"]{animation:hq-cabin-exit 320ms ease both}
.hq-transit.is-reduced{animation:hq-fade 200ms ease}
.hq-transit.is-reduced .hq-transit-door{display:block;animation:none}
@keyframes hq-cabin-sway{0%,100%{translate:0 0}25%{translate:1px 0}75%{translate:-1px 1px}}
@keyframes hq-seam-up{from{transform:translateY(-100%)}to{transform:translateY(100%)}}
@keyframes hq-seam-down{from{transform:translateY(100%)}to{transform:translateY(-100%)}}
@keyframes hq-cabin-exit{0%,60%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.hq-transit[data-phase]{animation:hq-fade 200ms ease}.hq-transit-light{display:none}}
.hq-meeting{width:min(1000px,96vw);max-width:96vw;height:min(680px,94dvh);max-height:94dvh;padding:12px;border:2px solid #bb9658;border-radius:16px;background:#fff8eb;color:#382c1a;overflow:auto}
.hq-meeting::backdrop{background:#30271c88}
.hq-meeting header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hq-meeting h2{margin:0;font-size:20px}.hq-meeting h3{margin:8px 0}
.hq-meeting-scene{position:relative;height:55%;min-height:140px;overflow:hidden;border-radius:10px;margin-top:8px}
.hq-meeting-scene>img{width:100%;height:100%;object-fit:cover}
.hq-meeting-body p{margin:8px 0}.hq-meeting dl{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0}
.hq-meeting dl>div{flex:1;min-width:100px;background:#f6e7c9;padding:8px;border-radius:8px}
.hq-meeting dd{margin:4px 0;font-weight:bold}.hq-meeting :is(h2,h3,p,dt,dd){color:#382c1a!important}
body .hq-meeting button,body button.hq-meeting-entry{background:#fff3d0!important;color:#382c1a!important;border:1px solid #b18c4d!important;border-radius:8px;padding:8px 16px;cursor:pointer}
body button.hq-meeting-entry{margin:8px}body button.hq-meeting-entry:disabled{opacity:.65;cursor:default}
@media(max-height:480px){.hq-meeting[open]{display:grid;grid-template-columns:55% 1fr;grid-template-rows:auto 1fr;gap:8px}.hq-meeting header{grid-column:1/-1}.hq-meeting-scene{height:100%;min-height:0;margin:0}.hq-meeting-body{overflow:auto}.hq-meeting dl{gap:6px}.hq-meeting dl>div{padding:5px}.hq-meeting h2{font-size:17px}}
/* Keep the entire monthly summary visible in short landscape viewports. */
body dialog.hq-meeting{background:#fff8eb!important;color:#382c1a!important}
@media(max-height:480px){
 .hq-meeting-body{font-size:14px;line-height:1.3}
 .hq-meeting-body h3{font-size:16px;margin:4px 0}
 .hq-meeting-body p{margin:5px 0}
 .hq-meeting-body dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0}
 .hq-meeting-body dl>div{min-width:0;padding:6px}
 .hq-meeting-body dt{font-size:12px;line-height:1.2}
 .hq-meeting-body dd{font-size:15px;margin:3px 0 0}
 body .hq-meeting-body button{padding:7px 12px;font-size:14px}
}
/* Older HQ layouts hide all non-lift children; keep the monthly invitation reachable. */
body dialog.district-map .district-detail-body>.hq-meeting-entry:not(#app#app){display:block!important;max-width:min(400px,85vw);white-space:normal}
body dialog.hq-meeting:not(#app#app#app){background:#fff8eb!important;color:#382c1a!important}
body .hq-meeting button:is([data-meeting-finish],[data-meeting-lobby]){background:linear-gradient(#ffd766,#f0a91c)!important;color:#3a2400!important;border:1px solid #c98a12!important;font-weight:700;font-size:16px;padding:10px 26px;box-shadow:0 3px 0 #b07410}
