* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #17304a;
  color: #1c1915;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}
.game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 148px;
  z-index: 3;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.hud-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(18, 28, 42, 0.55);
  color: #fff8ef;
}
.coin-pill strong { color: #ffe08a; }
.hud-pill span, .hud-pill small { font-size: 13px; opacity: 0.86; }
.hud-pill strong { font-size: 22px; line-height: 1; }
.ad-button {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  min-width: 128px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #FF8A3D;
  color: #2a1608;
  font-size: 15px;
  font-weight: 700;
}
.hint, .toast {
  position: absolute;
  left: 50%;
  z-index: 3;
  margin: 0;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 12px;
  color: #fff8ef;
  font-size: 14px;
  pointer-events: none;
}
.hint {
  bottom: 14px;
  background: rgba(18, 28, 42, 0.48);
  transition: opacity 0.4s ease;
}
.hint.fade { opacity: 0; }
.toast {
  top: 64px;
  background: rgba(42, 22, 8, 0.82);
}
.toast.hidden { display: none; }
.overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 22, 36, 0.28);
}
.overlay.hidden { display: none; }
.panel {
  width: min(460px, 78vw);
  max-height: 86vh;
  overflow: auto;
  padding: 16px 18px 14px;
  border-radius: 14px;
  background: rgba(255, 248, 239, 0.96);
  box-shadow: 0 10px 28px rgba(20, 18, 14, 0.22);
}
.eyebrow {
  margin: 0 0 4px;
  color: #c45a12;
  font-size: 12px;
  letter-spacing: 0.08em;
}
h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.panel p { margin: 8px 0 0; color: #5c564c; font-size: 14px; line-height: 1.45; }
.result-line { font-size: 15px; color: #1c1915; }
.primary-button, .ghost-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}
.primary-button { background: #FF8A3D; color: #2a1608; }
.ghost-button { background: #efe4d6; color: #2a1608; }
.primary-button:active, .ghost-button:active, .ad-button:active { transform: translateY(1px); }
.ad-bar {
  height: 12px;
  margin-top: 14px;
  border-radius: 8px;
  background: #efe4d6;
  overflow: hidden;
}
.ad-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: #FF8A3D;
}
