/* 置き方だけ。色・文字・部品の見た目はまだ決めていない。3D の上に載るので文字には縁と影を付ける */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: #000; }
html, body { -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; color: #fff; }
#app { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#vignette, #flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
#vignette { background: radial-gradient(ellipse at center, rgba(20,30,50,0) 45%, rgba(10,16,30,0.75) 100%); }
#flash { background: #fff; }

#hud { position: absolute; inset: 0; pointer-events: none; text-align: center;
  text-shadow: 0 0 2px #000, 0 0 2px #000, 0 2px 6px rgba(0,0,0,0.85); }
#hud section[hidden], #hud p[hidden], #ui button[hidden], #msg[hidden] { display: none; }
#hud section { position: absolute; left: 0; right: 0; top: max(5%, env(safe-area-inset-top)); }
#title-box h1 { margin: 0 0 14px; font-size: 40px; letter-spacing: 0.04em; }
#title-box p { margin: 4px 0; font-size: 17px; }
#title-best { margin-top: 12px !important; font-size: 15px !important; }
#timer { font-size: 44px; font-weight: bold; font-variant-numeric: tabular-nums; }
#bar { width: min(72vw, 300px); height: 12px; margin: 8px auto; border: 2px solid #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 3px #000, inset 0 0 3px rgba(0,0,0,0.6); background: rgba(0,0,0,0.35); }
#bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffcf6a, #ff7a2a); }
#taps { font-size: 18px; font-variant-numeric: tabular-nums; }
#charge-hint { margin-top: 6px; font-size: 18px; font-weight: bold; }
#dist { font-size: 56px; font-weight: bold; font-variant-numeric: tabular-nums; }
#dist small { font-size: 26px; }
#zone-name { font-size: 18px; margin-top: 2px; }
/* 結果は明るい空・地面の上にも出るので、上から暗い帯を敷いて読みやすく */
#hud #result-box { top: 0; padding: max(5vh, env(safe-area-inset-top)) 0 34px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.35) 65%, rgba(0,0,0,0)); }
#res-stage { font-size: 22px; font-weight: bold; margin-bottom: 4px; }
#res-dist { font-size: 54px; font-weight: bold; font-variant-numeric: tabular-nums; }
#res-taps, #res-best { font-size: 16px; margin-top: 6px; }
#test-note { position: absolute; left: 0; right: 0; bottom: 4px; margin: 0; font-size: 12px; }
#sensor { position: absolute; right: 8px; bottom: 4px; margin: 0; font-size: 11px; opacity: 0.8; }

/* ボタン（仮）。画面の下寄りに重ねる */
#ui { position: absolute; left: 0; right: 0; bottom: 12%; display: flex; justify-content: center; pointer-events: none; }
#ui button { pointer-events: auto; touch-action: manipulation; font: inherit; font-size: 20px; padding: 12px 36px;
  background: rgba(255,255,255,0.92); color: #000; border: 2px solid #000; border-radius: 0; }
#btn-sound { position: absolute; top: max(8px, env(safe-area-inset-top)); right: 8px; touch-action: manipulation; font: inherit; font-size: 13px;
  padding: 6px 10px; background: rgba(0,0,0,0.45); color: #fff; border: 1px solid rgba(255,255,255,0.7); border-radius: 4px; }
#msg { position: absolute; left: 0; right: 0; top: 40%; margin: 0; padding: 0 16px; text-align: center; font-size: 16px; color: #fff; }
