* { 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, #0a1628 0%, #0e1f3a 55%, #12294a 100%);
  color: #e8f0fa;
  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; align-items: center;
  padding: 12px 16px 4px; font-size: 15px; font-weight: 600;
}
.hud-item { background: rgba(255,255,255,.07); border-radius: 10px; padding: 6px 12px; }

#ai-row { display: flex; gap: 8px; padding: 10px 12px 4px; }
.ai-card {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 8px 6px; text-align: center;
  transition: opacity .3s, border-color .3s, background .3s;
  min-height: 108px;
}
.ai-card.out { opacity: .35; }
.ai-card.acting { border-color: #ffd166; background: rgba(255,209,102,.12); }
.ai-card.high { border-color: #4fc3f7; }
.ai-avatar { font-size: 26px; line-height: 1.2; }
.ai-name { font-size: 11.5px; font-weight: 700; margin-top: 2px; color: #bcd3ee; }
.ai-tell { font-size: 10px; color: #8fa8c8; margin-top: 4px; min-height: 24px; line-height: 1.25; }
.ai-status { font-size: 11px; font-weight: 700; margin-top: 3px; min-height: 15px; color: #ffd166; }
.ai-status.passed { color: #7c8ea8; }

#box-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
#box-emoji { font-size: 84px; line-height: 1; filter: drop-shadow(0 6px 18px rgba(79,195,247,.25)); }
#box-label { font-size: 13px; color: #8fa8c8; }
#current-price { font-size: 46px; font-weight: 800; color: #ffd166; line-height: 1.05; }
#current-price.bump { animation: bump .3s; }
@keyframes bump { 30% { transform: scale(1.22); } }
#price-hint { font-size: 12px; color: #6d84a5; text-align: center; padding: 0 24px; }

#action-row { display: flex; gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); }
.act-btn {
  flex: 1; min-height: 58px; border: 0; border-radius: 14px;
  font-size: 15px; font-weight: 700; font-family: inherit; color: #0a1628;
  background: linear-gradient(180deg, #7fd4ff, #4fc3f7);
  line-height: 1.25;
}
.act-btn .sub { font-size: 11.5px; font-weight: 600; opacity: .75; }
.act-btn.bluff { background: linear-gradient(180deg, #ffd166, #f0a840); }
.act-btn.drop { background: rgba(255,255,255,.12); color: #bcd3ee; flex: .72; }
.act-btn:disabled { opacity: .35; }
.act-btn:active { transform: scale(.96); }

.overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(6,12,24,.92); 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: #a9bfd9; }
#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: #0a1628;
  margin-top: 8px;
}
.big-btn:active { transform: scale(.96); }

#reveal-emoji, #result-emoji { font-size: 76px; }
#reveal-title { font-size: 26px; font-weight: 800; }
#reveal-detail { font-size: 14.5px; line-height: 1.7; color: #a9bfd9; white-space: pre-line; }
#result-title { font-size: 26px; font-weight: 800; color: #ffd166; }
#result-score { font-size: 52px; font-weight: 800; }
#result-sub { font-size: 14px; line-height: 1.6; color: #a9bfd9; white-space: pre-line; }

#float-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.floaty {
  position: absolute; font-size: 22px; font-weight: 800; color: #ffd166;
  animation: floatUp 1.1s ease-out forwards;
}
.floaty.bad { color: #ff8a80; }
.floaty.good { color: #7fd4ff; }
@keyframes floatUp { to { transform: translateY(-90px); 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;
}
