/* The photo and actors share one camera plane. Interface controls stay in screen coordinates. */
html:has(body.temple-screen){height:100%;overflow:hidden}
body.temple-screen{
 --inset-top:env(safe-area-inset-top,0px);
 --edge-left:max(14px,env(safe-area-inset-left,0px));
 --edge-right:max(14px,env(safe-area-inset-right,0px));
 --edge-bottom:max(12px,env(safe-area-inset-bottom,0px));
 --bar:calc(58px + var(--inset-top));--screen-height:100dvh;
 --glass:#21191076;--glass-strong:#211910cc;--glass-line:#ffedca48;--glass-text:#fff2d8;
 height:var(--screen-height);min-height:0;overflow:hidden;background:#241d14;color:var(--glass-text);
}
.temple-screen .topbar{position:fixed;inset:0 0 auto;height:var(--bar);z-index:20;border:0;background:linear-gradient(180deg,#170e09ac,transparent);backdrop-filter:none;pointer-events:none}
.temple-screen .topbar .topline{display:flex;flex-wrap:nowrap;min-height:0;height:100%;width:auto;margin:0 var(--edge-right) 0 var(--edge-left);padding:var(--inset-top) 0 0;gap:7px}
.temple-screen .topline button,.temple-screen .topline a{pointer-events:auto}
.temple-screen .topbar .brand{margin-right:auto;min-width:0;gap:9px;color:var(--glass-text);text-shadow:0 1px 5px #160e08}
.temple-screen .topbar .brand-icon{flex:0 0 32px;height:32px;width:32px;background:#f1d294e5;color:#65451c}
.temple-screen .topbar .brand-name{font-size:21px;letter-spacing:.035em;color:#fff3d9;white-space:nowrap}
.temple-screen .topbar .brand-small{font-size:9px;letter-spacing:.12em;color:#eee1c8;margin-top:2px}
.temple-screen .topbar #back{display:none!important}
.screen-location{margin-left:auto;padding:0 8px;font-size:14px;color:#fff2d8;text-shadow:0 1px 4px #120905,0 1px 9px #120905;font-weight:650}
.temple-screen main{position:fixed;inset:0 0 auto;height:var(--screen-height);min-height:0;overflow:clip}
.temple-screen main>section,.temple-screen main>section.photo-visit{position:absolute;inset:0;width:auto!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important;overflow:clip;isolation:isolate}
.temple-screen main>section::after{content:'';position:absolute;z-index:3;inset:auto 0 0;height:108px;background:linear-gradient(transparent,#1d130e78);pointer-events:none}
.temple-screen .courtyard-heading,.temple-screen .walk-heading,.temple-screen .hall-panel,.temple-screen .walk-panel,.temple-screen .courtyard-bar,.temple-screen .yard-destinations,.temple-screen .yard-scenery,.temple-screen .yard-hint,.temple-screen .yard-journey,.temple-screen .lotus-invite,.temple-screen .hall-head{display:none!important}
.temple-screen .yard-shell,.temple-screen #yardViewport{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:clip;touch-action:manipulation}
.temple-screen #yardScene,.temple-screen .hall-stage.altar-stage,.temple-screen .photo-visit .visit-scene,.temple-screen .walk-scene-quiet,.temple-screen #lakeScene{
 position:absolute!important;z-index:0;left:var(--scene-left,0px);top:var(--scene-top,0px);width:var(--scene-width,100%)!important;height:var(--scene-height,100%)!important;
 min-width:0!important;min-height:0!important;max-width:none;aspect-ratio:auto!important;margin:0!important;border-radius:0!important;overflow:hidden;box-shadow:none;scroll-margin:0;
}
.temple-screen #yardImage,.temple-screen .visit-backdrop,.temple-screen .walk-scene-quiet>img{object-fit:fill!important;object-position:center!important;width:100%;height:100%}
.temple-screen .hall-stage.altar-stage{--image-width:var(--scene-width);--image-height:var(--scene-height);--hall-height:var(--scene-height)}
.temple-screen .hall-backdrop{background-size:100% 100%;background-position:center;mask-image:none}
.temple-screen .altar-offerings{width:100%;height:100%;left:50%;bottom:0}
.temple-screen .hall-seat,.temple-screen .hall-traveler{width:clamp(30px,7.4cqw,100px);top:calc(var(--y) - clamp(0%,(var(--y) - var(--floor-start,0%)) * var(--floor-loss,0),var(--floor-cut,0%)))}
.temple-screen .hall-traveler.is-visitor{width:clamp(35px,9cqw,123px)}
.temple-screen .hall-demo-badge,.temple-screen .courtyard-caption,.temple-screen .lake-view-label{display:none}
.temple-screen #yardCompanion .yard-name{bottom:150%}
/* Each action stands alone, leaving the scene visible between the controls. */
.experience-dock{position:absolute;z-index:6;left:var(--edge-left);right:var(--edge-right);bottom:var(--edge-bottom);display:flex;align-items:end;justify-content:space-between;gap:8px;pointer-events:none;color:var(--glass-text);font:400 14px/1.3 var(--ui)}
.dock-status{position:absolute;left:0;bottom:calc(100% + 6px);width:max-content;max-width:min(44vw,520px);margin:0;padding:3px 2px;font-size:13px;line-height:1.4;color:#fff3df;text-shadow:0 1px 4px #160c07,0 1px 8px #160c07}
.dock-actions,.dock-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.dock-links{justify-content:flex-end;flex:none}
.temple-screen .experience-dock button,.temple-screen .topline .dock-icon,.temple-screen .topline .sound-toggle,.temple-screen .yard-portal{
 appearance:none;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:44px;height:auto;min-height:44px;margin:0;padding:6px 13px;
 border:1px solid var(--glass-line);border-radius:999px;color:var(--glass-text);background:var(--glass);backdrop-filter:blur(4px);
 font:650 14px/1.2 var(--ui);text-decoration:none;text-shadow:0 1px 3px #100906;cursor:pointer;white-space:nowrap;
}
.temple-screen .experience-dock button:hover,.temple-screen .topline button:hover,.temple-screen .yard-portal:hover{background:var(--glass-strong)}
.temple-screen .experience-dock button:disabled,.temple-screen .yard-portal:disabled{opacity:.72;cursor:default}
.temple-screen .experience-dock button.dock-primary{background:#4b341baf;border-color:#f7d797ae;color:#fff2cc;padding-inline:17px}
.temple-screen .experience-dock button.dock-primary:hover{background:#654521e8}
.temple-screen .experience-dock button:focus-visible,.temple-screen .topline button:focus-visible,.temple-screen .yard-portal:focus-visible{outline:2px solid #ffe2a2;outline-offset:2px}
.temple-screen .topline .dock-icon,.temple-screen .topline .sound-toggle{width:42px;min-width:42px;height:42px;min-height:42px;flex:none;padding:8px;background:#20160f52}
.temple-screen .topline button svg,.dock-links button svg{width:18px;height:18px;flex:none}
.temple-screen .dock-links .header-map span{display:inline}
.temple-screen .topline .sound-toggle[aria-pressed=false]{opacity:.8}
.temple-screen .yard-portal{padding:6px 12px;box-shadow:none;left:clamp(59px,var(--px),calc(100% - 59px));top:var(--py)}
.temple-screen .yard-portal .portal-dot{display:none}
.temple-screen .yard-portal.portal-main{border-color:#ffe2a4b0;background:#4c321f8c}
.temple-screen .yard-portal[aria-current=location]{border-color:#ffe2a4;color:#fff6dd;background:#5a3e22df}
.scene-portal-rail{position:absolute;z-index:5;left:var(--edge-left);right:var(--edge-right);top:calc(var(--bar) + 4px);display:flex;gap:4px;justify-content:center;flex-wrap:wrap;pointer-events:none}
.temple-screen .scene-portal-rail .yard-portal{position:static;transform:none;font-size:12px;padding:4px 8px;min-width:0;min-height:40px}
.temple-screen .scene-portal-rail .yard-portal::after{display:none}
.temple-screen .visit-dialog,.temple-screen .lotus-dialog{max-height:calc(var(--screen-height) - 24px);overscroll-behavior:contain}
.map-dialog .map-profile-button{display:block!important;margin:12px 0 0;width:100%;background:#f1e6d0!important;color:#654924!important;border:1px solid #d5bf96!important;border-radius:12px;min-height:44px;padding:10px;font:700 14px var(--ui)}
body.temple-screen.lotus-reading{overflow:auto;height:auto;min-height:100dvh;background:#faf4e8;color:#30281c}
.temple-screen.lotus-reading .experience-dock{display:none}
.temple-screen.lotus-reading .topbar{background:#292218}
.temple-screen.lotus-reading #dockBack,.temple-screen.lotus-reading #soundToggle{display:none}
.temple-screen.lotus-reading .lotus-recipient-view{margin-top:calc(var(--bar) + 20px)}
html:has(body.temple-screen.lotus-reading){height:auto;overflow:auto}
@media(max-width:1050px){
 .temple-screen .experience-dock button{padding-inline:11px;gap:5px;font-size:13px}
 .dock-links button svg{width:16px;height:16px}
 .dock-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(orientation:landscape) and (max-height:580px){
 body.temple-screen{--bar:calc(46px + var(--inset-top));--edge-bottom:max(8px,env(safe-area-inset-bottom,0px))}
 .temple-screen .topbar .brand-name{font-size:17px}
 .temple-screen .topbar .brand-small{display:none}
 .temple-screen .topbar .brand-icon{width:28px;height:28px;flex-basis:28px}
 .temple-screen .topline .dock-icon,.temple-screen .topline .sound-toggle{width:40px;min-width:40px;height:40px;min-height:40px}
 .temple-screen .experience-dock button,.temple-screen .yard-portal{min-height:40px}
 .temple-screen .yard-portal{font-size:13px;padding:4px 9px}
 .dock-status{height:1px;width:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
}
@media(orientation:landscape) and (max-width:645px){
 .dock-links{gap:3px}
 .temple-screen .experience-dock .dock-links button{position:relative;min-width:40px;padding:5px 8px}
 .dock-links button span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
 .dock-links button svg{width:19px;height:19px}
}
@media(orientation:portrait) and (max-width:700px){
 body.temple-screen{--bar:calc(54px + var(--inset-top));--edge-left:max(8px,env(safe-area-inset-left,0px));--edge-right:max(8px,env(safe-area-inset-right,0px))}
 .temple-screen .topbar .topline{gap:4px}
 .temple-screen .topbar .brand-name{font-size:clamp(13px,4.15vw,17px)}
 .temple-screen .topbar .brand-small{display:none}
 .temple-screen .topbar .brand-icon{flex-basis:24px;width:24px;height:24px}
 .temple-screen .topline .dock-icon,.temple-screen .topline .sound-toggle{width:40px;min-width:40px;height:40px;min-height:40px}
 .temple-screen .topbar .brand-name{display:block;transform:translateY(-6px)}
 .screen-location{position:absolute;left:calc(var(--edge-left) + 33px);top:calc(var(--inset-top) + 31px);font-size:11px;padding:0;max-width:49%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .temple-screen .experience-dock{display:grid;justify-content:start;gap:5px}
 .dock-status{max-width:calc(100vw - 30px);font-size:12px}
 .dock-links{justify-content:flex-start;gap:4px}
 .temple-screen .experience-dock button{font-size:12px;padding-inline:8px}
 .temple-screen .experience-dock button.dock-primary{padding-inline:12px}
 .dock-links button svg{width:15px;height:15px}
 .temple-screen main>section::after{height:156px}
}
@media(orientation:portrait) and (max-width:345px){.dock-links button svg{display:none}.temple-screen .topbar .brand-icon{display:none}.screen-location{left:var(--edge-left)}}
@media(orientation:landscape) and (max-height:580px){
 .temple-screen #profileDialog{width:min(740px,calc(100vw - 24px));padding:14px}
 #profileForm{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;align-items:start}
 #profileForm>.sheet-head{grid-column:1/-1;grid-row:1}
 #profileForm .profile-greeting{display:none}
 #profileForm>.sheet-head h2{font-size:25px}
 #profileForm>fieldset:first-of-type{grid-column:1;grid-row:2/5;margin:0}
 #profileForm>.field-label:not(.profile-name){grid-column:2;grid-row:2}
 #profileForm>.profile-name{grid-column:2;grid-row:3;margin:0}
 #profileForm>.companion-option{grid-column:2;grid-row:4;margin:0}
 #profileForm>.profile-extras{grid-column:1;grid-row:5;border:0;margin:0;padding:0;align-self:center}
 #profileForm>#profileSubmit{grid-column:2;grid-row:5;margin:0;min-height:44px}
 #profileDialog .avatar-options{margin-top:4px}
 #profileDialog .avatar-option{padding:7px 4px}
 #profileDialog .avatar-option img{height:95px}
 #profileDialog .profile-extras summary{font-size:13px;line-height:1.4}
 .temple-screen .prayer-dialog{padding:14px;width:min(650px,calc(100vw - 24px))}
 .prayer-dialog .sheet-head h2{font-size:23px}
 .prayer-dialog textarea{height:66px;min-height:50px}
 .prayer-dialog .form-note{font-size:12px;margin:5px 0}
 .prayer-dialog .sheet-submit{margin-top:7px;min-height:44px}
 .prayer-dialog .lotus-link-button{margin-top:5px;min-height:30px}
 .temple-screen .map-dialog{width:min(680px,calc(100vw - 24px));padding:14px}
 .map-dialog[open]{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}
 .map-dialog>.sheet-head,.map-dialog>.map-location,.map-dialog>.map-list{grid-column:1/-1}
 .map-dialog .sheet-head h2{font-size:25px}
 .map-dialog .map-location{margin:0;font-size:13px}
 .map-dialog .map-picture{display:none}
 .map-dialog .map-list{display:grid;grid-template-columns:1fr 1fr;gap:3px 12px;margin:0}
 .map-dialog .map-list button{min-height:44px;padding:4px;gap:8px}
 .map-dialog .map-list small,.map-dialog .map-list button>span:last-child{display:none}
 .map-dialog .map-list strong{font-size:14px}
 .map-dialog #mapToYard,.map-dialog .map-profile-button{font-size:13px;margin:0;min-height:40px}
}
@media(orientation:landscape) and (max-height:580px){
 #profileForm>.sheet-head{align-items:center}
 #profileForm>.sheet-head .sheet-kicker{display:none}
 #profileForm>.sheet-head h2{font-size:22px}
 #profileForm>.sheet-head .sheet-close{width:32px;height:32px;min-height:32px;font-size:22px}
 #profileForm>.field-label{grid-template-columns:65px minmax(0,1fr);align-items:center;font-size:13px;gap:7px}
 #profileForm>.companion-option>legend{display:none}
 #profileForm>.companion-option>.companion-toggle{min-height:44px;margin:0;padding:5px;font-size:13px}
 .prayer-dialog .sheet-kicker{display:none}
 .prayer-dialog textarea{height:58px}
}
