html,
body {
  touch-action: manipulation;
}

.pour-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.pour-shell [hidden] {
  display: none !important;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.stat-card {
  padding: 8px 8px 10px;
  border-radius: var(--radius-lg);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

.stat-card--level { background: var(--amber-soft); }
.stat-card--tries { background: var(--indigo-soft); }
.stat-card--best { background: var(--sky-soft); }

.stat-label {
  font-size: 0.74rem;
  font-weight: 900;
  color: var(--ink);
}

.stat-value {
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-sub {
  margin-top: 2px;
  min-height: 1em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-secondary);
}

.pour-stage {
  position: relative;
  height: clamp(230px, calc(100dvh - 340px), 520px);
  border-radius: var(--radius-xl);
  border: 2.5px solid var(--border);
  background:
    radial-gradient(circle at 50% 18%, rgba(56, 189, 248, 0.16), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pour-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.pour-live {
  min-height: 1.35em;
  margin: 8px 0 0;
  text-align: center;
  font-weight: 900;
  color: var(--ink);
}

.pour-card {
  margin-top: 10px;
  padding: 14px 14px 16px;
  border-radius: var(--radius-lg);
  border: 2.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.pour-card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.pour-card p {
  margin: 0 0 10px;
  color: var(--ink-secondary);
  font-weight: 700;
  line-height: 1.45;
}

.pour-kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--indigo);
}

.pour-card--low { background: var(--amber-soft); }
.pour-card--high,
.pour-card--spill { background: var(--coral-soft); }
.pour-card--clear,
.pour-card--perfect { background: var(--mint-soft); }

.pour-best {
  font-variant-numeric: tabular-nums;
}

.pour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pour-wide {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.pour-actions .pour-wide {
  flex: 1 1 140px;
  width: auto;
}

.pour-hold {
  margin-top: 10px;
  width: 100%;
  min-height: 68px;
  border-radius: 18px;
  border: 2.5px solid var(--border);
  background: var(--indigo);
  color: #ffffff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.pour-hold.is-down {
  background: var(--coral);
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--border);
}

.pour-hold:disabled {
  cursor: default;
  opacity: 0.7;
}

.pour-hold:focus-visible,
.pour-card button:focus-visible,
.pour-card a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.pour-shell .arcade-hint {
  margin-top: 12px;
}

.pour-shell .privacy-note {
  margin-top: 14px;
}

.pour-res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.pour-res-grid div {
  padding: 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: #ffffff;
  text-align: center;
}

.pour-res-grid span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink-secondary);
}

.pour-res-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.pour-new {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: var(--amber);
  font-size: 0.75rem;
  font-weight: 900;
}

@media (max-width: 520px) {
  .pour-stage {
    height: clamp(210px, calc(100dvh - 300px), 360px);
  }

  .pour-hold {
    min-height: 72px;
  }

  .stat-label {
    font-size: 0.68rem;
  }
}
