/* Plunge — mobile-web, portrait, touch-only static bundle. */

:root {
  --ink: #071019;
  --deep: #0c1720;
  --water: #123b46;
  --foam: #d9fff9;
  --muted: #95b8b5;
  --panel: rgba(7, 16, 25, 0.86);
  --mint: #7be0d3;
  --coral: #ff7867;
  --gold: #ffcf6d;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  color: var(--foam);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  padding:
    max(12px, var(--safe-top))
    max(12px, var(--safe-right))
    max(12px, var(--safe-bottom))
    max(12px, var(--safe-left));
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 207, 109, 0.16), transparent 24%),
    linear-gradient(180deg, #153242 0%, #0b2630 48%, #071019 100%);
}

#hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 5px 0 10px;
}

.stat {
  min-width: 0;
  text-align: center;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.1;
}

.stat span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--foam);
  font-size: 21px;
  font-weight: 850;
  line-height: 1;
}

#streak {
  color: var(--gold);
}

#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 18px;
  text-align: center;
  background: var(--panel);
  backdrop-filter: blur(2px);
}

.panel[hidden] {
  display: none;
}

.panel h1,
.panel h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.panel h1 {
  color: var(--mint);
  font-size: 42px;
}

.panel h2 {
  color: var(--coral);
  font-size: 30px;
}

.tagline {
  max-width: 270px;
  margin: 0;
  color: #c3e1dd;
  font-size: 17px;
  line-height: 1.45;
}

.result {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.result strong {
  color: var(--gold);
  font-size: 24px;
}

.result.sub {
  color: #c3e1dd;
}

.result.sub strong {
  color: var(--foam);
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 232px);
}

.cta {
  appearance: none;
  width: 100%;
  min-width: 210px;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 24px;
  background: var(--gold);
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  touch-action: manipulation;
  transition: transform 0.06s ease, filter 0.12s ease;
}

.cta:active {
  transform: scale(0.96);
  filter: brightness(1.08);
}

.cta.secondary {
  background: var(--mint);
  font-size: 18px;
}

.cta[hidden] {
  display: none;
}
