* { box-sizing: border-box }
html, body, main { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #797d8d; color: #fff; font: 14px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; }
main { position: relative; }
.poster, canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.poster { object-fit: contain; background: #41495c; }
canvas { cursor: grab; touch-action: pan-y; }
canvas:active { cursor: grabbing; }
canvas:focus-visible { outline: 2px solid white; outline-offset: -3px; }
.toolbar { position: absolute; right: clamp(12px,2.3vw,35px); bottom: clamp(12px,2.3vw,32px); display: flex; gap: 8px; align-items: stretch; }
.toolbar > * { display: flex; align-items: stretch; padding: 2px; border: 1px solid #fff6; border-radius: 30px; background: #13161ad9; }
button { color: white; background: transparent; font: inherit; font-size: clamp(12px,1.4vw,14px); letter-spacing: .01em; border: none; border-radius: 22px; padding: 9px 14px; cursor: pointer; }
.toolbar #light { gap: 8px; align-items: center; padding: 9px 15px; }
button:focus-visible { outline: 2px solid #f7c993; outline-offset: 2px; }
[role=group] button[aria-pressed=true] { color:#191b1e; background:#f3f0e9; }
.lamp { border-radius: 50%; width: 8px; height: 8px; border:1px solid #c6c2b9; }
#light[aria-pressed=true] .lamp { background: #ffd88a; border-color: #ffe8a5; box-shadow: 0 0 5px #efb563aa; }
[hidden] { display:none !important; }
@media(max-width:480px) {.toolbar { right: 10px; bottom: 10px; gap: 5px; } button {padding:8px 11px;} .toolbar #light {padding:8px 12px;} }

/* Preserve the framing when the standalone viewer is opened on a tall phone or wide monitor. */
body { display:grid; place-items:center; background:#202631; }
#model { width:min(100%, 200vh); height:min(100%, 96vw); }
