/* Index-only polish. /control keeps using style.css without these overrides. */
.index-body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 199, 89, 0.28), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(180, 22, 44, 0.25), transparent 26rem),
    linear-gradient(145deg, #310813 0%, #5b0f1f 45%, #13070a 100%);
}

.index-body .hero {
  isolation: isolate;
}

.index-body .hero-copy {
  display: flex;
  flex-direction: column;
}

.index-body .hero-text strong {
  color: var(--gold-400);
  white-space: nowrap;
}

.index-body .wager-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: -8px 0 22px;
}

.index-body .wager-strip span {
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid rgba(255, 245, 214, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 197, 61, 0.18), transparent 56%),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.index-body .wager-strip strong,
.index-body .wager-strip small {
  display: block;
}

.index-body .wager-strip strong {
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.index-body .wager-strip small {
  margin-top: 5px;
  color: rgba(255, 247, 223, 0.64);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.index-body .action-row {
  margin: 0 0 24px;
}

.index-body .primary-button,
.index-body .secondary-button,
.index-body .ghost-button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.index-body .overflow-badge {
  align-self: flex-start;
  padding: 8px 11px;
  border: 1px solid rgba(255, 247, 223, 0.2);
  border-radius: 999px;
  color: #351704;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 12px 28px rgba(255, 197, 61, 0.2);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.index-body .overflow-badge[hidden] {
  display: none;
}

.index-body .beer-mug {
  --overflow-extra: 24px;
  --overflow-opacity: 0;
}

.index-body .overflow-layer {
  position: absolute;
  top: -24px;
  left: -2px;
  right: 42px;
  height: calc(64px + var(--overflow-extra));
  z-index: 18;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transform-origin: center top;
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.index-body .beer-mug.is-overflowing .overflow-layer {
  opacity: var(--overflow-opacity);
  transform: translateY(0) scale(1);
}

.index-body .overflow-foam,
.index-body .overflow-stream,
.index-body .overflow-drop {
  position: absolute;
  display: block;
  pointer-events: none;
}

.index-body .overflow-foam {
  height: 32px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 55%, #fffdf5 0 10px, transparent 10.5px),
    radial-gradient(circle at 35% 35%, #fffdf5 0 13px, transparent 13.5px),
    radial-gradient(circle at 62% 60%, #fffdf5 0 11px, transparent 11.5px),
    radial-gradient(circle at 86% 38%, #fffdf5 0 12px, transparent 12.5px),
    linear-gradient(180deg, #fffdf5, #f7e8bd);
  filter: drop-shadow(0 6px 10px rgba(255, 245, 214, 0.18));
  animation: overflowFoam 3.8s ease-in-out infinite;
}

.index-body .foam-one {
  top: 13px;
  left: 2px;
  width: 56%;
}

.index-body .foam-two {
  top: 8px;
  right: 2px;
  width: 54%;
  animation-delay: -1.4s;
}

.index-body .foam-three {
  top: 0;
  left: 31%;
  width: 36%;
  height: 28px;
  animation-delay: -2.2s;
}

.index-body .overflow-stream {
  top: 31px;
  width: 13px;
  height: var(--overflow-extra);
  min-height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.98), rgba(255, 211, 92, 0.86), rgba(242, 169, 21, 0));
  filter: drop-shadow(0 3px 8px rgba(255, 197, 61, 0.16));
  animation: overflowStream 1.55s ease-in-out infinite;
}

.index-body .stream-left {
  left: 14%;
}

.index-body .stream-right {
  right: 8%;
  top: 36px;
  height: calc(var(--overflow-extra) + 12px);
  animation-delay: -0.7s;
}

.index-body .overflow-drop {
  width: 10px;
  height: 14px;
  border-radius: 999px 999px 999px 3px;
  background: linear-gradient(180deg, #fff8df, var(--beer-300));
  opacity: 0.82;
  transform: rotate(24deg);
  animation: overflowDrop 1.8s ease-in infinite;
}

.index-body .drop-one {
  top: 54px;
  left: 4%;
}

.index-body .drop-two {
  top: 62px;
  right: -8px;
  width: 8px;
  height: 12px;
  animation-delay: -0.55s;
}

.index-body .drop-three {
  top: 46px;
  left: 72%;
  width: 7px;
  height: 10px;
  animation-delay: -1.05s;
}

.index-body .beer-mug.is-overflowing .mug-glass {
  box-shadow:
    0 0 0 2px rgba(255, 247, 223, 0.08),
    inset 0 0 30px rgba(255, 255, 255, 0.26),
    inset 0 -16px 30px rgba(255, 255, 255, 0.12),
    0 -18px 34px rgba(255, 245, 214, 0.12);
}

.index-body .beer-mug.is-overflowing .liquid-level::before {
  animation-duration: 3.2s;
}

.index-body .mobile-bet-bar {
  display: none;
}

@keyframes overflowFoam {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-5px) translateY(2px); }
}

@keyframes overflowStream {
  0%, 100% { transform: scaleY(0.92); opacity: 0.72; }
  50% { transform: scaleY(1.08); opacity: 1; }
}

@keyframes overflowDrop {
  0% { transform: translateY(0) rotate(24deg) scale(0.76); opacity: 0; }
  18% { opacity: 0.9; }
  100% { transform: translateY(58px) rotate(24deg) scale(1.04); opacity: 0; }
}

@media (max-width: 940px) {
  .index-body .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-body .stats-grid .stat-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .index-body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .index-body .page-shell {
    width: 100%;
    padding: 8px 8px calc(24px + env(safe-area-inset-bottom));
  }

  .index-body .hero {
    padding: 10px;
    border-radius: 28px;
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.34);
  }

  .index-body .hero::after {
    right: -20px;
    bottom: -22px;
    font-size: clamp(5rem, 28vw, 8rem);
    opacity: 0.72;
  }

  .index-body .skyline {
    opacity: 0.24;
  }

  .index-body .topbar {
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
  }

  .index-body .brand {
    min-width: 0;
    gap: 9px;
  }

  .index-body .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
  }

  .index-body .brand strong {
    font-size: 0.98rem;
  }

  .index-body .brand small {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
  }

  .index-body .status-pill {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  .index-body .hero-grid {
    gap: 10px;
  }

  .index-body .hero-copy,
  .index-body .mug-card {
    padding: 18px;
    border-radius: 24px;
  }

  .index-body .eyebrow {
    margin-bottom: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .index-body h1 {
    font-size: clamp(2.55rem, 13.5vw, 3.9rem);
    line-height: 0.94;
  }

  .index-body .hero-text {
    margin: 16px 0 18px;
    font-size: 1rem;
    line-height: 1.5;
  }

  .index-body .wager-strip {
    gap: 7px;
    margin: 0 0 16px;
  }

  .index-body .wager-strip span {
    padding: 11px 7px;
    border-radius: 17px;
  }

  .index-body .wager-strip strong {
    font-size: clamp(1rem, 5vw, 1.28rem);
  }

  .index-body .wager-strip small {
    font-size: 0.57rem;
    letter-spacing: 0.06em;
  }

  .index-body .action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .index-body .action-row .primary-button,
  .index-body .action-row .secondary-button {
    width: 100%;
    min-height: 52px;
  }

  .index-body .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 14px;
  }

  .index-body .stat-card {
    min-height: 112px;
    padding: 14px;
    border-radius: 20px;
  }

  .index-body .stat-card:last-child {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-items: center;
    min-height: 94px;
  }

  .index-body .stat-card:last-child .stat-icon {
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }

  .index-body .stat-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 9px;
    border-radius: 13px;
    font-size: 1.15rem;
  }

  .index-body .stat-label {
    font-size: 0.76rem;
  }

  .index-body .stat-value:not(.compact),
  .index-body #literCount {
    font-size: clamp(2.15rem, 12vw, 3.35rem);
  }

  .index-body .stat-value.compact {
    margin-top: 3px;
    font-size: clamp(1rem, 4.4vw, 1.18rem);
  }

  .index-body .stat-note {
    margin-top: 2px;
    font-size: 0.78rem;
  }

  .index-body .size-breakdown {
    gap: 7px;
    margin: 0;
  }

  .index-body .size-chip {
    min-height: 62px;
    padding: 9px 5px;
    border-radius: 18px;
  }

  .index-body .size-chip strong {
    font-size: clamp(1.05rem, 6vw, 1.45rem);
  }

  .index-body .size-chip small {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }

  .index-body .mug-card {
    min-height: auto;
  }

  .index-body .mug-card-header {
    align-items: center;
  }

  .index-body .mug-card-header h2 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .index-body .overflow-badge {
    max-width: 44vw;
    overflow: hidden;
    padding: 7px 9px;
    font-size: 0.62rem;
    text-overflow: ellipsis;
  }

  .index-body .mug-stage {
    min-height: 300px;
    padding: 14px 40px 4px 0;
  }

  .index-body .beer-mug {
    width: min(214px, 68vw);
    height: 284px;
  }

  .index-body .mug-handle {
    top: 66px;
    right: -18px;
    width: 82px;
    height: 148px;
    border-width: 14px;
  }

  .index-body .mug-glass {
    border-width: 7px;
    border-top-width: 10px;
    border-radius: 24px 24px 38px 38px;
  }

  .index-body .overflow-layer {
    top: -20px;
    right: 39px;
  }

  .index-body .mug-readout {
    left: 16px;
    right: 16px;
    bottom: 15px;
    padding: 12px 10px;
    border-radius: 16px;
  }

  .index-body .mug-readout strong {
    font-size: 1.86rem;
  }

  .index-body .mug-readout > span {
    margin-top: 3px;
    font-size: 0.72rem;
  }

  .index-body .projection-line {
    left: 4px;
    width: calc(100% + 66px);
  }

  .index-body .projection-line > span {
    min-width: 70px;
    padding: 6px 7px;
    border-radius: 13px;
    font-size: 0.5rem;
  }

  .index-body .projection-line > span strong {
    font-size: 0.86rem;
  }

  .index-body .mug-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 2px;
  }

  .index-body .mug-metrics span {
    min-height: 64px;
    padding: 9px 5px;
    border-radius: 18px;
  }

  .index-body .mug-metrics strong,
  .index-body #currentPace {
    font-size: clamp(0.9rem, 4vw, 1.12rem);
  }

  .index-body .mug-metrics small {
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .index-body .mug-metrics em {
    font-size: 0.54rem;
  }

  .index-body .modal {
    width: min(100% - 18px, 560px);
    max-height: calc(100dvh - 18px);
  }

  .index-body .modal-card {
    border-radius: 24px;
  }

  .index-body .mobile-bet-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
    border: 1px solid rgba(255, 245, 214, 0.22);
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(58, 8, 21, 0.9), rgba(35, 6, 13, 0.92)),
      rgba(42, 8, 17, 0.9);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 18px));
    transition: opacity 180ms ease, transform 220ms ease;
  }

  .index-body .mobile-bet-bar.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .index-body .mobile-bet-bar .primary-button,
  .index-body .mobile-bet-bar .secondary-button {
    width: auto;
    min-height: 50px;
    padding: 12px 14px;
    white-space: nowrap;
  }

  .index-body .mobile-bet-bar .secondary-button {
    min-width: 86px;
  }

  .index-body:has(dialog[open]) .mobile-bet-bar {
    display: none;
  }
}

@media (max-width: 390px) {
  .index-body .page-shell {
    padding-inline: 6px;
  }

  .index-body .hero {
    padding: 8px;
  }

  .index-body .hero-copy,
  .index-body .mug-card {
    padding: 15px;
    border-radius: 22px;
  }

  .index-body .brand small {
    display: none;
  }

  .index-body .wager-strip {
    grid-template-columns: 1fr 1fr;
  }

  .index-body .wager-strip span:last-child {
    grid-column: 1 / -1;
  }

  .index-body .stats-grid {
    gap: 8px;
  }

  .index-body .stat-card {
    padding: 12px;
  }

  .index-body .mug-stage {
    padding-right: 30px;
  }

  .index-body .beer-mug {
    width: min(204px, 72vw);
    height: 272px;
  }

  .index-body .mug-handle {
    top: 62px;
    width: 74px;
    height: 140px;
  }

  .index-body .mobile-bet-bar {
    left: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-body .overflow-foam,
  .index-body .overflow-stream,
  .index-body .overflow-drop {
    animation: none !important;
  }
}
