* { box-sizing: border-box; }
html, body { width:100%; height:100%; margin:0; overflow:hidden; background:#000000; }
#scene { display:block; width:100%; height:100%; touch-action:none; }
[hidden] { display:none !important; }
#error { position:fixed; z-index:10; left:50%; top:50%; transform:translate(-50%,-50%); width:min(90%,600px); padding:24px; margin:0; background:#161a22ed; color:white; font:15px/1.6 Arial,sans-serif; white-space:pre-wrap; overflow-wrap:anywhere; }
:root { --pump-button-width:360px; --pump-button-height:64px; --sphere-buttons-bottom:24px; }
.sphere-controls { position:fixed; z-index:2; left:50%; bottom:calc(var(--sphere-buttons-bottom) + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:8px; width:min(var(--pump-button-width),calc(100vw - 32px)); }
.sphere-diameter { color:#fff; font:500 20px/1.2 Arial,sans-serif; font-variant-numeric:tabular-nums; text-align:center; text-shadow:0 2px 6px #0007; pointer-events:none; margin-bottom:6px; }
.pump-action { display:flex; align-items:center; justify-content:center; width:100%; min-height:var(--pump-button-height); padding:12px 16px; border:2px solid #175e2e; border-radius:8px; background:#248344; color:#fff; font:600 16px/1.35 Arial,sans-serif; text-decoration:none; text-align:center; cursor:pointer; touch-action:manipulation; }
.pump-action:hover { filter:brightness(1.1); }
.pump-action:active { filter:brightness(.9); }
.pump-action:focus-visible, .help-button:focus-visible, .project-dialog :focus-visible { outline:2px solid white; outline-offset:3px; }
.pump-status { margin:0; color:#fff; text-shadow:0 1px 4px #000; text-align:center; font:12px/1.4 Arial,sans-serif; }
 .help-button { position:fixed; z-index:3; top:calc(16px + env(safe-area-inset-top,0px)); left:calc(16px + env(safe-area-inset-left,0px)); width:44px; height:44px; border:1px solid #6b7280; border-radius:50%; background:#080a0de8; color:#fff; font:600 23px/1 Arial,sans-serif; cursor:pointer; touch-action:manipulation; }
.help-button:hover, .help-close:hover { background:#292e36; }
.project-dialog { width:min(620px,calc(100vw - 32px)); max-height:calc(100dvh - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); padding:0 24px 24px; color:#f5f5f5; background:#080808; border:1px solid #414650; border-radius:14px; font:15px/1.65 Arial,sans-serif; overflow-y:auto; overscroll-behavior:contain; }
.project-dialog::backdrop { background:#0009; }
.help-header { position:sticky; top:0; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; background:#080808; border-bottom:1px solid #333; }
.help-header h1 { margin:0; font-size:22px; letter-spacing:3px; }
.help-header form { margin:0; }
.help-close { width:44px; height:44px; border:1px solid #555; border-radius:8px; background:#161616; color:white; font-size:26px; cursor:pointer; }
.project-dialog section + section { margin-top:28px; padding-top:12px; border-top:1px solid #333; }
.project-dialog h2 { font-size:20px; margin-bottom:10px; }
.project-dialog h3 { font-size:16px; margin-bottom:8px; }
.project-dialog ol { padding-left:22px; }
.project-dialog li + li { margin-top:10px; }
.help-note { color:#b3bac4; font-size:13px; }
@media(max-width:600px) { :root { --pump-button-height:56px; --sphere-buttons-bottom:16px; } .sphere-diameter { font-size:18px; } .pump-action { font-size:14px; } }
@media(max-height:500px) and (orientation:landscape) { :root { --pump-button-height:48px; --sphere-buttons-bottom:10px; } .sphere-diameter { font-size:16px; } }

#scene { cursor:grab; }
