* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --accent: #FF8A3D;
  --ink: #21352b;
  --paper: #fffdf4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: #274536; color: var(--ink); }
.game {
  position: relative;
  isolation: isolate;
  width: min(100%, 540px);
  height: 100%;
  height: 100dvh;
  margin-inline: auto;
  overflow: hidden;
  background: #a0be77;
}
.scene, #arena { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { object-fit: cover; pointer-events: none; user-select: none; }
#arena { display: block; touch-action: none; }
.hud {
  position: absolute;
  inset: calc(env(safe-area-inset-top, 0px) + 12px) 14px auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
}
.pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #e0e9d7;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 2px 5px #21352b29;
}
.score span { font-size: 13px; font-weight: 650; }
.score strong { min-width: 4ch; font-size: 21px; font-variant-numeric: tabular-nums; }
.lives .mp-icon { color: #c3472b; font-size: 23px; }
.lives .is-lost { color: #c2c9ba; }
.hint { display: none; }
.veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #172c22a8;
}
.result {
  width: min(100%, 320px);
  padding: 22px 18px 15px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px #0a1a155e;
  text-align: center;
}
.result h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.result p { margin: 9px 0 16px; font-size: 15px; }
.result button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.primary { background: var(--accent); }
.primary .mp-icon { font-size: 21px; }
.secondary { margin-top: 8px; background: #edf2e6; }
.result button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.result button:disabled { opacity: .65; cursor: progress; }
.result .ad-status { margin: 9px 0 0; font-size: 13px; line-height: 1.5; color: #4d6154; }
