/* Minigolf Clásico: a sunny golf-club look on top of the shared Pop menu and HUD. */
:root {
  --mg-ink: #12351f;
  --mg-cream: #fbf7ea;
  --mg-green: #2f9a46;
}
html,
body {
  background: linear-gradient(180deg, #7fd3ff 0%, #b9ecff 32%, #8fd86a 33%, #3fae4f 60%, #1f7a38 100%);
}

/* ---------- Menu ---------- */
.pop-menu {
  padding-top: 8px;
}
.pop-menu > .pop-deco {
  display: none;
}
.pop-menu > .mg-deco {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  min-height: 720px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.mg-deco i {
  position: absolute;
  display: block;
}
.mg-sun {
  right: 8%;
  top: 22px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7c2 0%, #ffe066 45%, rgba(255, 224, 102, 0) 70%);
}
.mg-cloud {
  height: 34px;
  border-radius: 34px;
  background: #fff;
  opacity: 0.9;
  box-shadow:
    22px -14px 0 4px #fff,
    48px -4px 0 0 #fff;
}
.mg-cloud.a {
  left: 6%;
  top: 46px;
  width: 92px;
  animation: mg-drift 40s linear infinite alternate;
}
.mg-cloud.b {
  right: 26%;
  top: 120px;
  width: 70px;
  opacity: 0.7;
  animation: mg-drift 52s linear infinite alternate-reverse;
}
.mg-hill {
  border-radius: 50%;
}
.mg-hill.a {
  left: -30%;
  top: 200px;
  width: 95%;
  height: 260px;
  background: radial-gradient(ellipse at 50% 20%, #9be86b, #4cbb52 60%);
}
.mg-hill.b {
  right: -35%;
  top: 225px;
  width: 100%;
  height: 300px;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.07) 0 28px, rgba(0, 0, 0, 0) 28px 56px),
    radial-gradient(ellipse at 50% 20%, #8ddf62, #3fae4f 62%);
}
.mg-tree {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8fe36b, #2f8f3a 65%);
  box-shadow:
    -18px 12px 0 -4px #36993f,
    16px 10px 0 -6px #2a8538;
}
.mg-tree.a {
  left: 4%;
  top: 196px;
}
.mg-tree.b {
  right: 3%;
  top: 214px;
  transform: scale(0.8);
}

.pop-logo {
  width: 132px;
  height: 132px;
  margin-top: 2px;
  font-size: 0;
  filter: drop-shadow(0 10px 12px rgba(10, 60, 20, 0.35));
}
.pop-logo svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pop-title {
  margin-top: -6px;
  font-size: clamp(40px, 11.5vw, 62px);
  line-height: 1;
  letter-spacing: -0.5px;
  color: #fffef4;
  text-shadow:
    3px 0 0 #14532d,
    -3px 0 0 #14532d,
    0 3px 0 #14532d,
    0 -3px 0 #14532d,
    2px 2px 0 #14532d,
    -2px 2px 0 #14532d,
    2px -2px 0 #14532d,
    -2px -2px 0 #14532d,
    0 7px 0 #14532d,
    3px 7px 0 #14532d,
    -3px 7px 0 #14532d,
    0 12px 16px rgba(10, 60, 20, 0.45);
}
.pop-how {
  max-width: 440px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(14, 70, 30, 0.42);
  font-size: 16px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 30, 10, 0.5);
}
.pop-reto-row {
  width: 100%;
  max-width: 460px;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 14px;
}
.pop-reto-row .pop-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 58px;
  padding: 8px 14px;
  font-size: 21px;
  white-space: nowrap;
  color: var(--mg-ink);
}
.pop-btn.pop-reto {
  flex-grow: 1.25;
  font-size: 22px;
}
.pop-btn.ghost {
  background: linear-gradient(180deg, #ffffff, var(--mg-cream));
  box-shadow:
    inset 0 2px 0 #fff,
    0 5px 0 rgba(10, 60, 25, 0.45),
    0 8px 16px rgba(10, 50, 20, 0.3);
}
.pop-reto-how {
  font-size: 15px;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 30, 10, 0.6);
}
/* The three courses, as big picture buttons above the Modo Reto. */
.mg-campos {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 460px;
  margin-top: 14px;
}
.mg-campo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 98px;
  padding: 8px 4px 7px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  color: #fff;
  font: inherit;
  line-height: 1.1;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.3),
    0 8px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.mg-campo:active {
  transform: translateY(2px);
}
.mg-campo-jardin {
  background:
    radial-gradient(circle at 50% 115%, #9be86b 0 38%, rgba(0, 0, 0, 0) 39%),
    linear-gradient(180deg, #4cc062, #1f7a38);
}
.mg-campo-isla {
  background:
    radial-gradient(ellipse at 50% 112%, #f3d98f 0 34%, rgba(0, 0, 0, 0) 35%),
    linear-gradient(180deg, #48d4e0, #1269a8);
}
.mg-campo-espacio {
  background:
    radial-gradient(circle at 22% 28%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    radial-gradient(circle at 78% 18%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    radial-gradient(circle at 70% 60%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    radial-gradient(circle at 50% 120%, #b9a8ff 0 36%, rgba(0, 0, 0, 0) 37%),
    linear-gradient(180deg, #3b2f9e, #0d0b33);
}
.mg-campo.on {
  border-color: #ffd23f;
  box-shadow:
    0 0 0 3px rgba(255, 210, 63, 0.45),
    0 5px 0 rgba(0, 0, 0, 0.3),
    0 8px 14px rgba(0, 0, 0, 0.25);
}
.mg-campo:not(.on) {
  opacity: 0.86;
}
.mg-campo-ic {
  font-size: 34px;
  line-height: 1.15;
}
.mg-campo b {
  font-size: 15px;
  font-weight: 800;
}
.mg-campo small {
  margin-top: 3px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 12.5px;
  font-weight: 800;
}

.pop-total {
  margin: 2px 0 6px;
  padding: 4px 22px;
  background: rgba(10, 50, 20, 0.45);
  font-size: 20px;
}
.mg-card {
  margin: 0 0 14px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--mg-cream);
  color: var(--mg-ink);
  font-size: 15.5px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(10, 60, 25, 0.35);
}
.mg-card b {
  color: #c4213a;
}
.mg-card b.good {
  color: #13924b;
}
.pop-levels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
}
.pop-level {
  position: relative;
  min-height: 104px;
  padding-bottom: 26px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 120%, rgba(63, 174, 79, 0.18) 0 40%, rgba(0, 0, 0, 0) 41%),
    linear-gradient(180deg, #ffffff 0%, var(--mg-cream) 60%, #efe6c9 100%);
  box-shadow:
    inset 0 -3px 0 rgba(140, 120, 60, 0.3),
    0 5px 0 rgba(10, 60, 25, 0.5),
    0 8px 14px rgba(10, 50, 20, 0.3);
  color: var(--mg-ink);
  font-size: 36px;
}
.pop-level small {
  margin-top: 2px;
  color: #1e7a4e;
  font-size: 12.5px;
}
.mg-par {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--mg-green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.5;
}
.mg-par b {
  color: #ffe14d;
}
.pop-level[disabled] {
  padding-bottom: 26px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15);
  font-size: 30px;
}
.pop-level[disabled] small {
  color: #fff;
  font-size: 13px;
}
.pop-level[disabled] .mg-par {
  background: rgba(10, 50, 20, 0.45);
}
.pop-level.next {
  animation: mg-glow 1.6s ease-in-out infinite;
}
.pop-menu > .pop-row:not(.pop-reto-row) {
  margin-top: 22px;
}
.pop-menu > .pop-row:not(.pop-reto-row) .pop-btn {
  min-width: 190px;
  min-height: 54px;
  font-size: 22px;
}
.pop-foot {
  margin-top: 18px;
  background: var(--mg-cream);
  color: #c4213a;
}

/* ---------- Play ---------- */
.pop-play {
  background: #23803c;
}
.pop-hud {
  margin: 4px 0 0;
  padding: 8px 10px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  gap: 8px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fffdf4 0%, #f2ead2 100%);
  box-shadow:
    inset 0 -2px 0 rgba(140, 120, 60, 0.3),
    0 6px 16px rgba(5, 40, 15, 0.45);
}
.pop-icon {
  width: 46px;
  height: 46px;
  color: var(--mg-ink);
  background: #fff;
  box-shadow:
    0 3px 0 rgba(100, 90, 50, 0.3),
    0 4px 10px rgba(60, 60, 20, 0.15);
}
.pop-icon svg {
  width: 22px;
  height: 22px;
}
.pop-hud .pop-icon:last-child {
  border-radius: 14px;
  background: linear-gradient(180deg, #5ccf6c, #2f9a46);
  color: #fff;
  box-shadow:
    inset 0 0 0 3px #fff,
    0 3px 0 rgba(100, 90, 50, 0.3);
}
.pop-lvl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--mg-ink);
  font-size: 19px;
  text-shadow: none;
}
.pop-lvl > svg {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
}
.pop-lvl > span {
  min-width: 0;
}
.pop-lvl small {
  max-width: 100%;
  font-size: 14px;
  opacity: 0.8;
}
.pop-chips {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 6px;
}
.pop-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  font-size: 17px;
  background: #fff;
  color: var(--mg-ink);
  box-shadow:
    0 2px 0 rgba(100, 90, 50, 0.25),
    0 3px 8px rgba(60, 60, 20, 0.12);
}
.pop-chip svg {
  width: 22px;
  height: 22px;
}
.mg-strokes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mg-strokes.over b {
  color: #d62839;
}
.pop-overlay {
  background: rgba(5, 40, 15, 0.5);
}
.mg-verdict {
  display: inline-block;
  margin-bottom: 2px;
  color: #13924b;
  font-size: 1.45em;
}

@keyframes mg-glow {
  50% {
    box-shadow:
      0 0 0 4px #ffe14d,
      0 0 22px 6px rgba(255, 230, 80, 0.85),
      0 5px 0 rgba(10, 60, 25, 0.5);
  }
}
@keyframes mg-drift {
  to {
    transform: translateX(60px);
  }
}
@media (max-width: 380px) {
  .pop-hud {
    gap: 5px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .pop-icon {
    width: 40px;
    height: 40px;
  }
  .pop-lvl > svg {
    width: 28px;
    height: 28px;
  }
  .pop-lvl {
    font-size: 17px;
    gap: 4px;
  }
  .pop-lvl small {
    font-size: 12px;
  }
  .pop-chips {
    gap: 4px;
  }
  .pop-chip {
    font-size: 15px;
    padding: 3px 8px 3px 5px;
    gap: 3px;
  }
  .pop-chip svg {
    width: 18px;
    height: 18px;
  }
  .pop-reto-row .pop-btn {
    font-size: 18px;
    padding: 8px 10px;
  }
  .pop-level {
    font-size: 30px;
  }
  .pop-level small {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pop-level.next,
  .mg-cloud {
    animation: none;
  }
}

/* ---------- Isla Pirata: sea, sand and wooden signs ---------- */
html:has(body.mg-isla),
body.mg-isla {
  background: linear-gradient(180deg, #7fd3ff 0%, #c4f1ff 30%, #48d4e0 31%, #1d8fc4 62%, #0f5f96 100%);
}
.mg-isla .mg-hill.a {
  background: radial-gradient(ellipse at 50% 20%, #fbe6a8, #e6c46e 60%);
}
.mg-isla .mg-hill.b {
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.18) 0 18px, rgba(0, 0, 0, 0) 18px 56px),
    radial-gradient(ellipse at 50% 20%, #f7dc93, #d9b45c 62%);
}
.mg-isla .pop-how,
.mg-isla .pop-total {
  background: rgba(8, 60, 100, 0.45);
}
.mg-isla .pop-level small {
  color: #0f6c8f;
}
.mg-isla .mg-par {
  background: #1a8fb8;
}
.mg-isla .pop-play {
  background: #1679b8;
}

/* ---------- Estación Espacial: night sky, planets and a grey moon ---------- */
html:has(body.mg-espacio),
body.mg-espacio {
  background:
    radial-gradient(circle at 12% 18%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    radial-gradient(circle at 64% 9%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    radial-gradient(circle at 88% 34%, #fff 0 1.4px, rgba(0, 0, 0, 0) 2.4px),
    radial-gradient(circle at 34% 40%, #fff 0 1px, rgba(0, 0, 0, 0) 2px),
    linear-gradient(180deg, #0b0d2e 0%, #24186b 55%, #3b2a9a 100%);
}
.mg-espacio .mg-sun {
  background: radial-gradient(circle at 35% 30%, #ffd9f4, #c45ad8 60%, #6b2a9c);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18);
  width: 70px;
  height: 70px;
}
.mg-espacio .mg-cloud {
  display: none;
}
.mg-espacio .mg-hill.a,
.mg-espacio .mg-hill.b {
  background:
    radial-gradient(circle at 30% 30%, rgba(90, 95, 120, 0.4) 0 18px, rgba(0, 0, 0, 0) 19px),
    radial-gradient(circle at 70% 45%, rgba(90, 95, 120, 0.35) 0 12px, rgba(0, 0, 0, 0) 13px),
    radial-gradient(ellipse at 50% 20%, #b9bcd4, #6f7395 62%);
}
.mg-espacio .mg-tree {
  display: none;
}
.mg-espacio .pop-how,
.mg-espacio .pop-total {
  background: rgba(10, 8, 50, 0.55);
}
.mg-espacio .pop-level small {
  color: #4b3fb8;
}
.mg-espacio .mg-par {
  background: #5b4bd6;
}
.mg-espacio .pop-play {
  background: #0b0d2a;
}
