* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #111; color: #fff;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  overscroll-behavior: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }

#stage { position: fixed; inset: 0; overflow: hidden; }
#scene { position: absolute; left: 0; top: 0; width: 720px; height: 1280px; transform-origin: 0 0;
  transition: transform .9s cubic-bezier(.2,.7,.2,1); will-change: transform; }
#scene.instant { transition: none; }
#shaker { position: absolute; inset: 0; }
#poster, #video, #fx { position: absolute; inset: 0; width: 720px; height: 1280px; display: block; }
#video { opacity: 0; }
#video.on { opacity: 1; }

/* 画面の上に重ねるもの */
.panel { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 32px 24px calc(32px + env(safe-area-inset-bottom)); text-align: center;
  background: linear-gradient(180deg, rgba(20,8,2,.55), rgba(20,8,2,.85)); }
.panel.show { display: flex; }
h1 { font-size: 46px; line-height: 1.05; letter-spacing: .04em; color: #fff;
  text-shadow: 0 4px 0 #b8121b, 0 8px 18px rgba(0,0,0,.5); }
.lead { font-size: 16px; line-height: 1.7; opacity: .95; }
.label { font-size: 14px; letter-spacing: .1em; opacity: .85; }
.note { font-size: 12px; opacity: .6; }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; width: min(100%, 360px); }
.chip { border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.12);
  outline: 3px solid transparent; transition: outline-color .2s, transform .2s; }
.chip img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 88%; }
.chip span { display: block; padding: 5px 0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.on { outline-color: #ff3b3b; transform: translateY(-2px); }

.big { min-width: 240px; padding: 16px 28px; border-radius: 999px; font-size: 20px; font-weight: 800; letter-spacing: .06em;
  background: linear-gradient(180deg, #ff4a4a, #c4101a); box-shadow: 0 6px 0 #7a0710, 0 10px 24px rgba(0,0,0,.35); }
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #7a0710; }
.big:disabled { opacity: .5; }
.big.ghost { background: rgba(255,255,255,.16); box-shadow: 0 4px 0 rgba(0,0,0,.25); font-size: 17px; }

.hud { position: fixed; left: 0; right: 0; display: none; pointer-events: none; }
.hud.show { display: block; }
.hud button, .hud .stepper { pointer-events: auto; }
#guide { top: 0; padding: calc(18px + env(safe-area-inset-top)) 20px 18px; text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }
#guideText { font-size: 22px; font-weight: 800; line-height: 1.45; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
#guideText small { display: block; font-size: 14px; font-weight: 600; opacity: .9; margin-top: 4px; }

#meter { top: calc(110px + env(safe-area-inset-top)); left: 20px; right: auto; width: 54px; text-align: center; }
.meterName { font-size: 12px; font-weight: 700; margin-bottom: 6px; text-shadow: 0 1px 4px #000; }
.bar { position: relative; width: 22px; height: 220px; margin: 0 auto; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
#fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; border-radius: 12px;
  background: linear-gradient(0deg, #4fc3ff, #7cf08a); transition: height .15s, background .3s; }
#fill.hot { background: linear-gradient(0deg, #ffb340, #ff3b3b); }
#count { margin-top: 6px; font-size: 14px; font-weight: 800; text-shadow: 0 1px 4px #000; }

#dock { bottom: 0; padding: 18px 20px calc(26px + env(safe-area-inset-bottom)); text-align: center;
  background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }
#dock > * { display: none; margin: 0 auto; }
#dock > .on { display: block; }
#tapShake.on { display: inline-block; margin-bottom: 12px; }
#open.on { display: inline-block; }
#dropBox .label { margin-bottom: 8px; text-shadow: 0 1px 4px #000; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; font-size: 28px; font-weight: 800; background: rgba(255,255,255,.2); }
#tabs { display: flex; gap: 6px; min-width: 150px; justify-content: center; }
#tabs i { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e9e4da 60%, #c9c2b4);
  box-shadow: 0 2px 4px rgba(0,0,0,.4); }

#result { background: linear-gradient(180deg, rgba(20,8,2,.2), rgba(20,8,2,.8)); justify-content: flex-end; }
#height { font-size: 84px; font-weight: 900; line-height: 1; text-shadow: 0 4px 0 #b8121b, 0 8px 20px rgba(0,0,0,.5); }
#height span { font-size: 36px; margin-left: 4px; }
#comment { font-size: 18px; font-weight: 700; line-height: 1.6; }
#best { font-size: 14px; opacity: .85; margin-bottom: 6px; }
#result .hub { margin-top: 6px; font-size: 12px; }
#result .hub a { color: rgba(255,255,255,.75); }
