:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #efeBDD;
  color: #1e2a22;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #f4b740;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.minigolf-app {
  --mg-cream: #fcfaf2;
  --mg-green: #5a9563;
  --mg-green-dark: #173d27;
  --mg-green-light: #e2f1e6;
  --mg-yellow: #f1bb40;
  --mg-coral: #df684f;
  --mg-blue: #5c93d4;
  --mg-ink: #10251a;
  --mg-muted: #7b8178;
  --mg-line: #e7e1d2;
  --mg-white: #fff;
  width: min(100% - 24px, 400px);
  height: calc(100dvh - 24px);
  min-height: 640px;
  max-height: 940px;
  margin: 12px auto;
  position: relative;
}

.minigolf-app.mg-scorecard-expanded {
  width: calc(100% - 24px);
  max-width: none;
}

.mg-screen {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 32px;
  background: var(--mg-cream);
  box-shadow: 0 20px 50px rgba(22, 61, 38, 0.18);
  display: flex;
  flex-direction: column;
}

.mg-screen h1,
.mg-screen h2,
.mg-dialog h2 {
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
}

.mg-hero,
.mg-game-hero,
.mg-scorecard-hero {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--mg-green);
  color: var(--mg-white);
}

.mg-hero::after,
.mg-game-hero::after,
.mg-scorecard-hero::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -1px;
  left: -20%;
  height: 18px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--mg-cream);
}

.mg-setup-hero {
  min-height: 166px;
  padding: 28px 22px 40px;
}

.mg-hero h1 {
  max-width: 240px;
  margin: 5px 0 0;
  font-size: 1.75rem;
  line-height: 1.15;
}

.mg-eyebrow {
  margin: 0;
  color: var(--mg-green-light);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mg-eyebrow-dark {
  color: var(--mg-green);
}

.mg-flag {
  width: 64px;
  height: 78px;
}

.mg-setup-hero .mg-flag {
  position: absolute;
  top: 22px;
  right: 20px;
}

.mg-flag-pole {
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.mg-flag-pennant {
  fill: var(--mg-coral);
}

.mg-flag text {
  fill: #fff;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.mg-screen-form {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mg-screen-form > .mg-content {
  flex: 1 0 auto;
  overflow-y: visible;
}

.mg-content,
.mg-game-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 22px 18px;
}

.mg-setup-content {
  padding-bottom: 28px;
}

.mg-setup-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mg-setup-choice-row .mg-form-section {
  margin-bottom: 25px;
}

.mg-setup-choice-card {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 6px 42px 6px 0;
    border: 1.5px solid var(--mg-line);
    border-radius: 12px;
    background: #fff;
    color: var(--mg-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
}

.mg-setup-choice-card > :last-child {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  width: 42px;
  align-items: center;
  justify-content: center;
  background: var(--mg-green);
  color: #fff;
  font-size: 0.78rem;
}

.mg-setup-choice-card.is-selected {
  border-color: var(--mg-green);
  color: var(--mg-green-dark);
}

.mg-setup-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mg-player-option-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mg-setup-option {
  display: flex;
  aspect-ratio: 1;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: var(--mg-cream);
  color: var(--mg-ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
}

.mg-setup-option.is-selected {
  border-color: var(--mg-green);
  background: var(--mg-green);
  color: #fff;
}

.mg-dialog-custom-value {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--mg-line);
}

.mg-dialog-custom-value label {
  color: var(--mg-muted);
  font-weight: 600;
}

.mg-dialog-custom-value input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mg-ink);
}
.mg-dialog-custom-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.mg-dialog-custom-controls .mg-primary-button {
  width: auto;
  min-height: 46px;
  padding: 10px 14px;
  white-space: nowrap;
}
.mg-form-section {
  min-width: 0;
  margin: 0 0 25px;
  padding: 0;
  border: 0;
}

.mg-section-label {
  display: block;
  margin: 0 0 10px;
  color: var(--mg-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.mg-pills {
  display: flex;
  gap: 7px;
}

.mg-pill {
  display: flex;
  min-width: 48px;
  min-height: 44px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--mg-green);
  border-radius: 999px;
  background: #fff;
  color: var(--mg-green);
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 150ms ease, color 150ms ease;
}

.mg-pill-wide {
  flex-grow: 1.45;
}

.btn-check:checked + .mg-pill {
  background: var(--mg-green);
  color: #fff;
}

.mg-pill:active {
  transform: scale(0.95);
}

.mg-custom-holes {
  margin-top: 10px;
}

.mg-custom-holes input,
.mg-player-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mg-ink);
}

.mg-custom-holes input::placeholder,
.mg-player-input::placeholder {
  color: #b8bbb1;
}

.mg-stepper {
  display: inline-flex;
  align-items: center;
  gap: 17px;
  padding: 7px 14px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: #fff;
}

.mg-step-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--mg-green-light);
  color: var(--mg-green-dark);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.mg-step-button:disabled {
  opacity: 0.4;
}

.mg-step-value {
  min-width: 20px;
  color: var(--mg-ink);
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

.mg-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mg-avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--player-color, var(--mg-green));
  color: #fff;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
}

.mg-tone-0 { --player-color: #df684f; --player-tint: #f9e5e0; }
.mg-tone-1 { --player-color: #efb83f; --player-tint: #fbf2d9; }
.mg-tone-2 { --player-color: #5c93d4; --player-tint: #e2edf9; }
.mg-tone-3 { --player-color: #579461; --player-tint: #e3f0e6; }
.mg-tone-4 { --player-color: #9b6bd3; --player-tint: #eee6f8; }
.mg-tone-5 { --player-color: #39a2a2; --player-tint: #ddf1f1; }
.mg-tone-6 { --player-color: #d979a8; --player-tint: #f8e6ef; }
.mg-tone-7 { --player-color: #8c784f; --player-tint: #eee9df; }
.mg-tone-8 { --player-color: #d58b45; --player-tint: #f7eadc; }
.mg-tone-9 { --player-color: #6574c4; --player-tint: #e5e8f6; }

.mg-player-input {
  flex: 1 1 auto;
  min-width: 0;
}

.mg-cta:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.mg-cta-bar {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 16px 22px 22px;
  background: linear-gradient(to top, var(--mg-cream) 68%, rgba(252, 250, 242, 0));
}

.mg-cta,
.mg-primary-button,
.mg-secondary-button,
.mg-cta-back {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  cursor: pointer;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.mg-cta,
.mg-primary-button {
  border: 1.5px solid var(--mg-green);
  background: var(--mg-green);
  color: #fff;
}

.mg-cta {
  flex: 1 1 auto;
  padding: 14px 20px;
  border: 0;
  font-size: 1.05rem;
}

.mg-primary-button,
.mg-secondary-button {
  width: 100%;
  padding: 12px 18px;
}

.mg-secondary-button {
  border: 1.5px solid var(--mg-green);
  background: transparent;
  color: var(--mg-green);
}

.mg-cta-back {
    width: 60px;
    flex: 0 0 60px;
    border: 0;
    background: var(--mg-green);
    color: #fff;
    font-size: 1.6rem;
    padding-bottom: 6px;
}

.mg-cta-back:disabled {
  background: #c7dbc5;
  opacity: 0.7;
}

.mg-ball {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 3px 2px 0 -1px var(--mg-green), inset -3px -2px 0 -1px var(--mg-green);
}

.mg-text-button,
.mg-end-link {
  padding: 8px;
  border: 0;
  background: none;
  color: var(--mg-green);
  cursor: pointer;
  text-decoration: underline;
}

.mg-status {
  margin: 10px 0 0;
  color: #a32f25;
  font-size: 0.9rem;
}

.mg-notice-card,
.mg-message-card {
  padding: 22px;
  border: 1.5px solid var(--mg-line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.mg-notice-card h2,
.mg-message-card h1,
.mg-message-card h2 {
  margin: 5px 0 14px;
  font-size: 1.45rem;
}

.mg-game-facts {
  margin: 20px 0;
  text-align: left;
}

.mg-game-facts div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--mg-line);
}

.mg-game-facts dt { color: var(--mg-muted); font-weight: 500; }
.mg-game-facts dd { margin: 0; font-weight: 600; }

.mg-message-screen {
  justify-content: center;
  padding: 22px;
}

/* Game */
.mg-game-hero {
  padding: 16px 22px 39px;
}

.mg-game-top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.mg-game-top-row > :first-child { justify-self: start; }
.mg-game-top-row > :nth-child(2) { justify-self: center; }
.mg-game-top-row > :last-child { justify-self: end; }

.mg-header-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.mg-pennant-button {
  display: block;
  width: 205px;
  height: 116px;
  margin: 2px auto 8px;
  position: relative;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.mg-pennant-pole {
  position: absolute;
  top: 10px;
  left: 64px;
  width: 6px;
  height: 107px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
}

.mg-pennant-shape {
  position: absolute;
  top: 17px;
  left: 64px;
  width: 150px;
  height: 88px;
  background: var(--mg-coral);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.mg-pennant-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 3.6rem;
  font-weight: 600;
}

.mg-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.3);
}

.mg-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mg-yellow);
  transition: width 220ms ease;
}

.mg-hole-dialog-grid {
  display: grid;
  max-height: min(50vh, 360px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  padding: 2px;
}

.mg-hole-chip {
  min-height: 44px;
  padding: 9px 4px;
  border: 1.5px solid var(--mg-line);
  border-radius: 10px;
  background: var(--mg-cream);
  color: var(--mg-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.mg-hole-chip.is-played { border-color: var(--mg-green); background: var(--mg-green-light); }
.mg-hole-chip.is-current { border-color: var(--mg-green); background: var(--mg-green); color: #fff; }

.mg-game-page-flow {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mg-game-page-flow > .mg-game-content {
  flex: 1 0 auto;
  overflow-y: visible;
}
.mg-game-content {
  padding-top: 20px;
}

.mg-player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mg-player-card,
.mg-quick-row {
  border: 1.5px solid var(--mg-line);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--player-tint) 0%, #fff 70%);
}

.mg-player-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
}

.mg-player-name-row,
.mg-dialog-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.mg-player-name-row .mg-avatar,
.mg-dialog-player .mg-avatar {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  font-size: 0.7rem;
}

.mg-player-name {
  margin: 0;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mg-player-name-row .mg-quick-total {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.mg-quick-row > .mg-quick-aces {
  text-align: right;
}
.mg-card-bottom {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
}

.mg-player-stats {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
}

.mg-stat {
  margin: 0;
  color: var(--mg-muted);
  font-size: 0.73rem;
}

.mg-score-placeholder {
  width: 38%;
  min-height: 43px;
  flex: 0 0 38%;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: var(--mg-cream);
  color: var(--mg-muted);
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.mg-score-placeholder.is-set {
  border-color: var(--mg-green);
  background: var(--mg-green);
  color: #fff;
}

.mg-quick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-quick-row {
  padding: 12px;
}

.mg-quick-row .mg-stat:first-of-type {
  margin-top: 0;
}

.mg-quick-buttons {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.mg-quick-button,
.mg-dialog-score-button {
  display: flex;
  aspect-ratio: 1;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--mg-line);
  border-radius: 10px;
  background: #fff;
  color: var(--mg-ink);
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
}

.mg-quick-button.is-selected,
.mg-dialog-score-button.is-selected {
  border-color: var(--mg-green);
  background: var(--mg-green);
  color: #fff;
}

/* Scorecard */
.mg-scorecard-hero {
  padding: 16px 22px 31px;
}

.mg-scorecard-top-row .mg-end-link {
  color: #fff;
}

.mg-scorecard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 22px;
}

.mg-scorecard-title-row h1 {
  margin: 4px 0 0;
  font-size: 1.4rem;
}

.mg-scorecard-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.mg-scorecard-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 0 0 20px;
  background: var(--mg-cream);
  overscroll-behavior: contain;
}
.mg-scorecard-scroll::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 13px;
  margin-bottom: -2px;
  background: var(--mg-cream);
  pointer-events: none;
}
.mg-scorecard-scroll > .mg-cta-bar {
  position: sticky;
  left: 0;
  width: 100%;
}

.mg-scorecard-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.mg-scorecard-table th,
.mg-scorecard-table td {
  border: 1px solid var(--mg-line);
  padding: 0;
  background: #fff;
  text-align: center;
}

.mg-scorecard-table .mg-corner,
.mg-scorecard-table .mg-hole-number {
  width: 54px;
  min-width: 54px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--mg-cream);
  font-weight: 600;
}

.mg-scorecard-table .mg-player-heading {
  width: 70px;
  min-width: 70px;
  padding: 7px 4px;
  background: var(--player-tint);
}

.mg-scorecard-table thead .mg-player-heading {
  position: sticky;
  top: 12px;
  z-index: 3;
  border-top: 1px solid var(--mg-line);
}

.mg-scorecard-table thead .mg-corner {
  top: 12px;
  z-index: 4;
  border-top: 1px solid var(--mg-line);
}

.mg-scorecard-table .mg-player-heading .mg-avatar {
  width: 20px;
  height: 20px;
  margin: 0 auto 3px;
  font-size: 0.6rem;
}

.mg-scorecard-table .mg-player-heading span {
  display: block;
  max-width: 65px;
  overflow: hidden;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mg-scorecard-table .mg-hole-number {
  height: 42px;
}

.mg-score-cell {
  width: 70px;
  height: 42px;
  border: 0;
  background: #fff;
  color: var(--mg-ink);
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
}

    .mg-score-cell.is-ace {
        background: #fff1c8;
        border-radius: 50px;
        margin: 5px 0;
        height: 32px;
        width: 40px;
    }
.mg-scorecard-table .mg-total-row th,
.mg-scorecard-table .mg-total-row td {
  height: 42px;
  background: var(--mg-green-light);
  color: var(--mg-green-dark);
  font-weight: 700;
}

.mg-save-status {
  margin: 0;
  padding: 6px 22px;
}

/* Dialogs */
.mg-dialog {
  width: min(calc(100% - 24px), 400px);
  padding: 22px;
  border: 0;
  border-radius: 22px;
  color: var(--mg-ink);
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 61, 38, 0.25);
}

.mg-dialog::backdrop {
  background: rgba(22, 61, 38, 0.48);
}

.mg-dialog:focus {
  outline: none;
}

.mg-sheet-dialog {
  max-height: min(520px, calc(100dvh - 24px));
  margin: auto auto 12px;
  border-radius: 22px 22px 12px 12px;
}

.mg-dialog h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.mg-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.mg-dialog-player {
  margin-bottom: 16px;
}

.mg-dialog-player div {
  display: flex;
  flex-direction: column;
}

.mg-dialog-player small {
  color: var(--mg-muted);
}

.mg-dialog-score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mg-dialog-score-button {
  font-size: 1.15rem;
}

.mg-view-option {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: var(--mg-cream);
  color: var(--mg-ink);
  text-align: left;
}

.mg-view-option span {
  color: var(--mg-muted);
  font-size: 0.82rem;
}

.mg-view-option.is-active {
  border-color: var(--mg-green);
  background: var(--mg-green-light);
}

/* Result */
.mg-result-hero {
  padding: 28px 22px 37px;
}

.mg-result-content {
  padding: 28px 22px;
  text-align: center;
}

.mg-result-intro {
  margin: 0 0 22px;
  color: var(--mg-muted);
}

.mg-podium-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-podium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--mg-line);
  border-radius: 12px;
  background: #fff;
}

.mg-podium-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.mg-placement {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mg-green);
  color: #fff;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
}

.mg-podium-row:nth-child(1) .mg-placement { background: var(--mg-yellow); color: var(--mg-ink); }
.mg-podium-row:nth-child(2) .mg-placement { background: #bec5c0; color: var(--mg-ink); }
.mg-podium-row:nth-child(3) .mg-placement { background: var(--mg-coral); }

.mg-new-game-button {
  margin-top: 22px;
}

@media (max-width: 359px) {
  .mg-content, .mg-game-content { padding-right: 16px; padding-left: 16px; }
  .mg-cta-bar { padding-right: 16px; padding-left: 16px; }

  .mg-header-button { padding-right: 8px; padding-left: 8px; font-size: 0.7rem; }
  .mg-quick-buttons { gap: 4px; }
}

@media (max-width: 600px), (hover: none) and (pointer: coarse) and (max-width: 932px) {
  .minigolf-app,
  .minigolf-app.mg-scorecard-expanded {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
  }

  .mg-screen {
    border-radius: 0;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Site home */
.site-home {
  min-height: 100dvh;
  padding: clamp(28px, 8vw, 64px) 16px;
  background: #fcfaf2;
}

.site-home-inner {
  width: min(100%, 620px);
  margin: 0 auto;
}

.site-home-header {
  margin-bottom: 28px;
}

.site-home-header p {
  margin: 0 0 4px;
  color: #5a9563;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.site-home-header h1 {
  margin: 0;
  color: #173d27;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: clamp(2.4rem, 10vw, 4rem);
  font-weight: 700;
  line-height: 1;
}

.site-home-header > span {
  display: block;
  margin-top: 12px;
  color: #7b8178;
}

.site-game-list {
  display: grid;
  gap: 16px;
}

.site-game-card {
  display: flex;
  min-height: 190px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 30px;
  background: #5a9563;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(23, 61, 39, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.site-game-card:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(23, 61, 39, 0.24);
}

.site-game-label {
  color: #e2f1e6;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-game-card h2 {
  margin: 5px 0 7px;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.site-game-card p {
  max-width: 360px;
  margin: 0;
  color: #e2f1e6;
}

.site-game-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.5rem;
}

.site-coming-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.site-coming-games > span {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border: 1.5px solid #e7e1d2;
  border-radius: 18px;
  background: #fff;
  color: #7b8178;
  font-weight: 600;
}

.site-coming-games small {
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 400;
}
