*{box-sizing:border-box}body{margin:0;background:#172627;color:#fff;font:16px system-ui,sans-serif;overflow:hidden}canvas{display:block;touch-action:none}header{position:fixed;top:24px;left:28px;right:28px;display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}header>*{pointer-events:auto}.brand{display:flex;gap:12px;align-items:center;text-shadow:0 2px 14px #000}.mark{font-family:Georgia,serif;font-size:32px;border:1px solid #ffffff80;width:46px;height:46px;text-align:center}.brand strong{font-size:14px;letter-spacing:3px}.brand small{display:block;font-size:12px;margin-top:5px;color:#e6e6da}button{font:500 14px system-ui;color:inherit;background:#142526dd;border:1px solid #ffffff30;padding:12px 17px;border-radius:5px;cursor:pointer;backdrop-filter:blur(12px)}button:hover,button:focus-visible{background:#375053;border-color:#fff}button.active{background:#f0dfb8;color:#182425;border-color:#f0dfb8}#caption{position:fixed;bottom:169px;left:30px;text-shadow:0 2px 9px #000;pointer-events:none}#modeLabel{font-size:14px;letter-spacing:3px}#hint{font-size:14px;margin:8px 0;color:#eee}#views{position:fixed;bottom:111px;left:28px;display:flex;gap:7px}footer{position:fixed;bottom:0;padding:15px 28px 13px;width:100%;background:linear-gradient(transparent,#101d20e8)}.tools{display:flex;gap:7px}footer small{display:block;font-size:12px;color:#ccd2cc;margin-top:10px}#pad{display:none;position:fixed;right:24px;bottom:140px;text-align:center;touch-action:none}#pad button{width:52px;height:48px;padding:0;margin:3px;font-size:22px}#loading{position:fixed;inset:0;display:grid;place-items:center;background:#172627;z-index:9}dialog{color:#eee;background:#162627;border:1px solid #667879;border-radius:12px;max-width:1000px;width:90%;padding:24px}dialog::backdrop{background:#000b}.photos{display:grid;grid-template-columns:1fr 1fr;gap:18px}figure{margin:0}figure img{width:100%;border-radius:6px}figcaption,dialog p{font-size:14px;color:#bfc9c9;margin-top:8px}#close{float:right}h2{font-weight:400}body.record header,body.record nav,body.record footer,body.record #caption,body.record #pad{display:none!important}@media(max-width:650px){header{top:16px;left:16px;right:16px}.brand strong{font-size:12px;letter-spacing:1.5px}.brand small{font-size:11px}.mark{display:none}button{padding:11px 12px;font-size:13px}header button{font-size:12px;padding:10px}footer{padding:14px 12px 20px}.tools{display:grid;grid-template-columns:1fr 1fr}footer small{font-size:11px;line-height:1.35}#views{left:12px;bottom:172px;gap:4px}#caption{left:16px;bottom:225px}#hint{max-width:240px;font-size:13px}#pad{bottom:270px;right:12px}#pad button{width:44px;height:44px}.photos{grid-template-columns:1fr}dialog{max-height:88vh;overflow:auto}}

@media(max-width:650px){#views{bottom:220px}#caption{bottom:273px}#pad{bottom:318px}.tools #gate{grid-column:1 / -1;grid-row:3}}

.header-actions{display:flex;gap:7px}body.ui-hidden header,body.ui-hidden nav,body.ui-hidden footer,body.ui-hidden #caption,body.ui-hidden #pad{display:none!important}
@media(max-width:650px){header{flex-wrap:wrap}.header-actions{margin-left:auto}}

/* Compact phone controls leave more room for the house. */
@media(max-width:650px){
 header{top:12px;left:12px;right:12px;gap:8px}
 .brand strong{font-size:11px;letter-spacing:1px}
 .brand small{font-size:10px;margin-top:3px}
 button{padding:8px 10px;font-size:12px;min-height:36px}
 header button{font-size:11px;padding:7px 9px;min-height:34px}
 .header-actions{gap:5px}
 footer{padding:10px 12px max(12px,env(safe-area-inset-bottom))}
 .tools{gap:5px}
 footer small{font-size:10px;line-height:1.3;margin-top:7px}
 #views{bottom:calc(181px + env(safe-area-inset-bottom));gap:4px}
 #caption{left:12px;bottom:calc(224px + env(safe-area-inset-bottom))}
 #modeLabel{font-size:12px;letter-spacing:2px}
 #hint{font-size:12px;margin:6px 0}
 #pad{bottom:calc(270px + env(safe-area-inset-bottom))}
}

@media(max-width:650px){.tools #gate{grid-column:auto;grid-row:auto}.tools #download{grid-column:1 / -1}#views{bottom:calc(221px + env(safe-area-inset-bottom))}#caption{bottom:calc(264px + env(safe-area-inset-bottom))}#pad{bottom:calc(310px + env(safe-area-inset-bottom))}}
