/* Responsive overlay corrections kept separate from the minified game skin. */
.welcome {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.welcome > .angle-modal-card {
  flex: 0 0 auto;
  margin: auto 0;
}

.level-pill [data-strokes] {
  color: #fff0a6;
  white-space: nowrap;
}

.angle-control.putt-mode > div {
  display: block;
}

.angle-control.putt-mode button,
.angle-control.putt-mode input {
  display: none;
}

.angle-control.putt-mode output {
  display: block;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 11px;
  background: #164c5f;
  color: #fff;
  font-size: .84rem;
  text-align: left;
}

@media (max-width: 720px) {
  .year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .year-grid button {
    min-height: 76px;
    padding: 8px;
  }

  .year-grid small {
    display: block;
    font-size: .58rem;
  }
}

@media (max-width: 480px) {
  .welcome {
    padding: max(8px, env(safe-area-inset-top)) 8px max(12px, env(safe-area-inset-bottom));
  }

  .angle-modal-card {
    padding: 15px;
  }

  .angle-modal-card h1 {
    font-size: 2.1rem;
  }

  .angle-modal-card > p:not(.modal-kicker) {
    font-size: .82rem;
  }

  .selector-label {
    margin-top: 10px !important;
  }

  .year-grid button {
    min-height: 72px;
    padding: 7px 6px;
  }

  .year-grid b {
    font-size: .82rem;
  }

  .year-grid small {
    font-size: .54rem;
  }

  .how-grid {
    margin: 9px 0;
  }

  .how-grid article {
    min-height: 45px;
    padding: 6px;
  }

  .how-grid article > span {
    flex-basis: 30px;
    height: 30px;
  }

  .how-grid b {
    font-size: .75rem;
  }

  .how-grid small {
    font-size: .55rem;
  }

  .angle-modal-card > small {
    margin-top: 8px;
  }
}

/* The course itself is the swing control. This compact panel is a live gauge
   and keyboard-accessible fallback, not a full-width control tray. */
.shot-controls {
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: auto;
  width: 194px;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
}

.angle-control {
  grid-column: 1 / -1;
}

.power-control {
  grid-column: 1;
  display: grid;
  justify-items: center;
  align-content: start;
}

.power-control .control-label {
  text-align: center;
}

.power-track {
  width: 32px;
  height: 94px;
  margin: 0 auto;
}

.power-track i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--power, 35%);
  transition: height .04s linear;
}

.power-sweet {
  top: 18%;
  right: 0;
  left: 0;
  width: auto;
  height: 18%;
  padding: 2px 0;
  border: 0;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  font-size: .47rem;
  text-align: center;
}

.power-control small {
  width: 60px;
  margin-top: 4px;
  font-size: .53rem;
  line-height: 1.2;
  text-align: center;
}

.hit-button {
  grid-column: 2;
  grid-row: 2;
  min-height: 112px;
  padding: 7px;
}

.hit-button b {
  font-size: .86rem;
}

.hit-button small {
  font-size: .55rem;
}

.hit-button.charging {
  background: linear-gradient(#fff28a, #ff9f3c);
}

.hole-celebration {
  position: absolute;
  z-index: 28;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 239, 105, .24), transparent 45%);
}

.hole-celebration[hidden] {
  display: none;
}

.hole-celebration > div {
  display: grid;
  min-width: min(420px, calc(100vw - 36px));
  justify-items: center;
  padding: 18px 24px;
  border: 3px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: rgba(4, 47, 61, .9);
  box-shadow: 0 8px 0 rgba(1, 25, 36, .45), 0 0 60px rgba(255, 221, 87, .75);
  animation: hole-card-pop .55s cubic-bezier(.18, .9, .22, 1.25) both;
}

.hole-celebration span {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #6d4d00;
  font-size: 2.15rem;
  animation: hole-star-spin 1.4s ease-in-out infinite;
}

.hole-celebration b {
  margin-top: 8px;
  color: #fff;
  font-size: clamp(2rem, 9vw, 4.7rem);
  line-height: .9;
  letter-spacing: -.06em;
  text-shadow: 0 4px 0 #077a68;
}

.hole-celebration small {
  margin-top: 8px;
  color: #fff4aa;
  font-size: .9rem;
  font-weight: 900;
}

@keyframes hole-card-pop {
  from { opacity: 0; transform: scale(.45) rotate(-5deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes hole-star-spin {
  50% { transform: translateY(-8px) rotate(16deg) scale(1.12); }
}

@media (max-width: 720px) {
  .shot-controls {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: auto;
    width: 154px;
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 7px;
  }

  .angle-control > div {
    grid-template-columns: 32px 32px 32px;
    justify-content: space-between;
  }

  .angle-control input {
    display: none;
  }

  .angle-control output {
    font-size: .88rem;
  }

  .power-track {
    width: 28px;
    height: 78px;
  }

  .power-control small {
    width: 50px;
    font-size: .49rem;
  }

  .hit-button {
    grid-column: 2;
    grid-row: 2;
    min-height: 98px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .shot-controls {
    width: 178px;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .power-track {
    height: 64px;
  }

  .hit-button {
    min-height: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hole-celebration > div,
  .hole-celebration span {
    animation: none;
  }
}
