* { 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: #141b12;
  color: #eef5e9;
  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; align-items: center; gap: 6px; padding: 10px 10px 4px; font-size: 13.5px; font-weight: 700; }
.hud-item { background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 9px; white-space: nowrap; }
.energy-wrap { flex: 1; }
#energy-bar { height: 12px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; }
#energy-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff8a80, #ffd166, #9dff70); transition: width .15s linear; }

#board-zone { flex: 1; position: relative; display: flex; justify-content: center; min-height: 0; padding: 4px 0; }
#board { height: 100%; aspect-ratio: 360/600; border-radius: 12px; background: #1a0f08; touch-action: none; }
#scent {
  position: absolute; font-size: 30px; pointer-events: none; z-index: 5;
  animation: pulse .8s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(255,240,150,.8));
}
@keyframes pulse { from { transform: scale(.85); opacity: .65; } to { transform: scale(1.15); opacity: 1; } }

#upgrade-bar { display: flex; gap: 8px; padding: 6px 12px calc(12px + env(safe-area-inset-bottom)); }
.up-btn {
  flex: 1; min-height: 52px; border: 0; border-radius: 12px;
  font-size: 14px; font-weight: 800; font-family: inherit; line-height: 1.25;
  background: linear-gradient(180deg, #8fbf6a, #6a9a4a); color: #141b12;
}
.up-btn .cost { font-size: 11.5px; font-weight: 700; opacity: .8; }
.up-btn:disabled { opacity: .35; }
.up-btn:active { transform: scale(.96); }

.overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10,14,8,.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: 30px; font-weight: 800; color: #ffd166; }
#title-desc { font-size: 14px; line-height: 1.65; color: #c9dcb8; }
#title-best { font-size: 15px; color: #9dff70; 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: #141b12;
  margin-top: 8px;
}
.big-btn:active { transform: scale(.96); }
#collapse-emoji { font-size: 72px; }
#collapse-title { font-size: 26px; font-weight: 800; color: #ff8a80; }
#collapse-text { font-size: 15px; line-height: 1.6; color: #c9dcb8; white-space: pre-line; }

#float-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.floaty { position: fixed; font-size: 20px; font-weight: 800; color: #9dff70; animation: floatUp 1.1s ease-out forwards; }
.floaty.bad { color: #ff8a80; }
@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;
}
