html, body { margin: 0; height: 100%; background: #0f1a22; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
body { font: 14px/1.4 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #fff; }
#stage { position: fixed; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: absolute; inset: 0; pointer-events: none; }
.score { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 10px; display: flex; gap: 8px; align-items: center; background: rgba(8, 18, 12, .78); padding: 5px 10px; border-radius: 6px; font-weight: 600; }
.score .t0 { color: #8fc1ff; } .score .t1 { color: #ff9c86; } .score .clock { font-style: normal; opacity: .8; margin-left: 6px; font-variant-numeric: tabular-nums; }
.mini { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); border-radius: 4px; }
.arrows { position: absolute; left: 0; top: 0; }
.power { position: absolute; width: 60px; height: 8px; background: rgba(0, 0, 0, .55); border: 1px solid #fff; border-radius: 4px; overflow: hidden; }
.power i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd34d, #ff6a3d); }
.banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: 34px; font-weight: 800; background: rgba(8, 18, 12, .8); padding: 10px 26px; border-radius: 8px; }
.debug { position: absolute; right: 10px; top: 10px; margin: 0; font: 12px/1.45 ui-monospace, Menlo, monospace; background: rgba(0, 0, 0, .6); padding: 6px 8px; border-radius: 4px; }
#cam { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: 10px; display: flex; gap: 4px; }
html.touch #cam { top: 10px; bottom: auto; }
#cam button { font: 600 12px inherit; font-family: inherit; color: #fff; background: rgba(8, 18, 12, .7); border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px; padding: 6px 9px; }
#start { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 14, 10, .6); }
#start[hidden] { display: none; }
#start .card { touch-action: pan-y; background: #10231a; border: 1px solid #2c5a3a; border-radius: 10px; padding: 18px 22px; max-width: min(560px, 92%); max-height: 92%; overflow: auto; }
#start h1 { margin: 0 0 6px; font-size: 24px; }
#start table { border-collapse: collapse; margin: 8px 0; width: 100%; }
#start td, #start th { text-align: left; padding: 4px 8px; border-bottom: 1px solid #23402e; font-size: 13px; }
#start .hint { opacity: .75; font-size: 12px; }
#start button { margin-top: 8px; font: 700 16px inherit; font-family: inherit; color: #10231a; background: #ffd34d; border: 0; border-radius: 6px; padding: 10px 22px; }
.pad { position: absolute; inset: 0; pointer-events: auto; }
.stick { position: absolute; width: 112px; height: 112px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); }
.knob { position: absolute; left: 32px; top: 32px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.btn { position: absolute; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45); }
.btn.on { background: rgba(255, 211, 77, .55); }
#start .short { display: none; font-size: 13px; opacity: .85; }
@media (max-height: 480px) { #start table, #start .hint { display: none; } #start .short { display: block; } #start .card { padding: 12px 18px; } #start h1 { font-size: 20px; } }
