* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: linear-gradient(180deg, #20130b 0%, #2e1c10 55%, #382314 100%);
  color: #f7ead9;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
#app { position: relative; height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }

#hud { display: flex; justify-content: space-between; padding: 10px 12px 4px; font-size: 14px; font-weight: 700; }
.hud-item { background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 10px; }

#board-zone { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 4px 0; }
#board { height: 100%; aspect-ratio: 360/560; border-radius: 14px; background: #1a0f08; touch-action: none; }
#next-box {
  position: absolute; top: 6px; right: 8px; background: rgba(0,0,0,.45);
  border-radius: 12px; padding: 6px 10px; text-align: center; pointer-events: none;
}
#next-label { font-size: 10.5px; color: #d9b98c; }
#next-emoji { font-size: 26px; }

#press-zone { padding: 6px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; }
#btn-press {
  min-width: 170px; min-height: 56px; border: 0; border-radius: 14px;
  font-size: 16px; font-weight: 800; font-family: inherit; line-height: 1.25;
  background: linear-gradient(180deg, #b8bcc4, #878d98); color: #20130b;
}
#btn-press .sub { font-size: 11px; font-weight: 600; opacity: .75; }
#btn-press:disabled { opacity: .4; }
#btn-press:active { transform: scale(.97); }
#press-meter { flex: 1; height: 14px; background: rgba(255,255,255,.1); border-radius: 7px; overflow: hidden; }
#press-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #7fd4ff, #ffd166, #ff8a80); transition: width .1s linear; }

.overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(16,9,4,.93); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 28px;
}
.overlay.hidden, .hidden { display: none !important; }
#title-logo { font-size: 72px; }
#title-h1 { font-size: 32px; font-weight: 800; color: #ffd166; }
#title-desc { font-size: 14px; line-height: 1.65; color: #e0c9a6; }
#title-best { font-size: 15px; color: #7fd4ff; font-weight: 700; }
.big-btn {
  min-width: 200px; min-height: 56px; border: 0; border-radius: 16px;
  font-size: 18px; font-weight: 800; font-family: inherit;
  background: linear-gradient(180deg, #ffd166, #f0a840); color: #20130b;
  margin-top: 8px;
}
.big-btn:active { transform: scale(.96); }
#result-emoji { font-size: 76px; }
#result-title { font-size: 26px; font-weight: 800; color: #ffd166; }
#result-score { font-size: 52px; font-weight: 800; color: #7fd4ff; }
#result-sub { font-size: 14px; line-height: 1.6; color: #e0c9a6; white-space: pre-line; }

#float-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.floaty { position: absolute; font-size: 20px; font-weight: 800; color: #ffd166; animation: floatUp 1s ease-out forwards; }
@keyframes floatUp { to { transform: translateY(-80px); opacity: 0; } }

#btn-mute {
  position: absolute; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08); font-size: 18px;
}
