:root{--paper:#f1eee7;color-scheme:light;background:var(--paper)}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--paper)}
body{height:100dvh}
.stage{position:fixed;inset:0;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
#device-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab;touch-action:none}
#device-canvas.dragging{cursor:grabbing}
.ground-shadow{position:absolute;left:50%;top:76%;width:min(62vw,46vh);height:5vh;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#4a4232 0%,transparent 70%);opacity:.22;filter:blur(14px);pointer-events:none}
.offscreen{position:absolute;width:2px;height:2px;opacity:0;pointer-events:none;left:0;top:0}
/* Visually hidden but reachable by keyboard and screen readers. */
.controls>*{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.controls>button:focus-visible{width:auto;height:auto;clip:auto;margin:0;left:12px;bottom:12px;padding:6px 10px;background:#fffdf6;border:1px solid #9e7f46;border-radius:6px;font:13px system-ui,sans-serif;color:#4a3b20}
