
.mc-game-content {
  --paper: #f8f7f2;
  --white: #fffcf6;
  --ink: #294d42;
  --dark: #24483c;
  --green: #4d705c;
  --muted: #57675b;
  --line: #dedfd6;
  --pale: #e9efdf;
  --gold: #b88243;
  color: var(--ink);
}
.mc-game-content *,
.mc-game-content *::before,
.mc-game-content *::after { box-sizing: border-box; }
.mc-game-content figure { margin: 0; }
.mc-game-content [hidden] { display: none !important; }
.mc-game-content a { color: var(--ink); text-decoration: none; }
.mc-game-content a:hover { text-decoration: underline; }
.mc-game-content button { font: inherit; cursor: pointer; }
.mc-game-content button:disabled { cursor: default; }
.mc-game-content :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.mc-game-content { width: min(1120px, calc(100% - 40px), calc((100svh - 137px) * 4 / 3)); }
.mc-game-content h1 { margin: 12px 0 13px; font-size: clamp(1.3rem, 3.6vw, 2.35rem); letter-spacing: -.035em; line-height: 1.18; font-weight: 550; }
.mc-game-content .room { overflow: hidden; border-radius: 15px; background: var(--white); box-shadow: 0 12px 34px #243a2c24; }
.mc-game-content .scene { position: relative; isolation: isolate; aspect-ratio: 4 / 3; background: #536057; container-type: inline-size; }
.mc-game-content #room-base,
.mc-game-content .room-image { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-game-content .room-image { opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.mc-game-content .room-image.visible { opacity: 1; }
.mc-game-content .scene-overlay { z-index: 6; }
.mc-game-content .decor-layer { z-index: 3; }
.mc-game-content .decor-garland {
  mask-image: radial-gradient(ellipse 17% 3.7% at 63% 28.8%, #000 77%, transparent),
    radial-gradient(ellipse 2.4% 19% at 49.8% 40.9%, #000 72%, transparent),
    radial-gradient(ellipse 1.8% 11% at 76% 33.2%, #000 74%, transparent);
}
.mc-game-content .decor-candles {
  mask-image: radial-gradient(ellipse 8.5% 7.7% at 60% 76.7%, #000 71%, transparent),
    radial-gradient(ellipse 6% 4% at 60% 64.5%, #000 68%, transparent);
}
.mc-game-content .room-image.decor-gifts { inset: auto; left: 68.6%; bottom: 22%; width: 15%; height: auto; object-fit: contain; }
.mc-game-content .room:not(.has-tree) .decor-gifts { left: 67.8%; bottom: 17%; z-index: 4; }
.mc-game-content .decor-balls {
  mask-image: radial-gradient(ellipse 2.1% 5.6% at 11.6% 3.5%, #000 72%, transparent),
    radial-gradient(ellipse 2.2% 6% at 16.7% 6%, #000 75%, transparent),
    radial-gradient(ellipse 2.8% 8.2% at 22.9% 4.8%, #000 77%, transparent),
    radial-gradient(ellipse 3.1% 8.3% at 29.8% 7.4%, #000 75%, transparent),
    radial-gradient(ellipse 2.3% 9.3% at 36% 10%, #000 73%, transparent),
    radial-gradient(ellipse 3.7% 8.8% at 40.7% 3.5%, #000 81%, transparent),
    radial-gradient(ellipse 4.4% 10.3% at 63.3% 4%, #000 80%, transparent),
    radial-gradient(ellipse 3.1% 10% at 70.2% 9.5%, #000 75%, transparent),
    radial-gradient(ellipse 3.1% 10% at 77.2% 8.4%, #000 75%, transparent);
}
.mc-game-content .decor-snowflakes {
  mask-image: radial-gradient(ellipse 4.7% 6.5% at 58.2% 38.6%, #000 79%, transparent),
    radial-gradient(ellipse 3.7% 5.5% at 66.4% 35.5%, #000 76%, transparent),
    radial-gradient(ellipse 4.2% 5.4% at 66% 42.9%, #000 76%, transparent),
    radial-gradient(ellipse 3.4% 5% at 59% 50.4%, #000 76%, transparent),
    radial-gradient(ellipse 3.4% 5% at 68% 51.7%, #000 76%, transparent),
    radial-gradient(ellipse 4% 4.9% at 84.1% 9.1%, #000 80%, transparent);
}



.mc-game-content .mirror-star {
  position: absolute; z-index: 9; top: 31%; left: 26%; transform: translate(-24px, -50%);
  display: flex; align-items: center; gap: 3px; min-height: 46px; white-space: nowrap;
  padding: 0; border: 0; border-radius: 9px; background: transparent; user-select: none; touch-action: manipulation;
}
.mc-game-content .mirror-star.is-flying { pointer-events: none; }
.mc-game-content .mirror-star.is-flying .star-label { visibility: hidden; }
.mc-game-content .star-spark {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, #f7cf836e, transparent 72%);
  color: #fff4bf; text-shadow: 0 0 9px #ffd094, 0 0 22px #ffac43; font: 2.6rem/1 Georgia, serif;
}
.mc-game-content .star-label {
  font-size: clamp(.78rem, 2.15cqw, .98rem); font-weight: 650; color: #fff7e8;
  padding: .18rem .47rem; border-radius: 6px; background: #29342bdc;
}

.mc-game-content .button,
.mc-game-content .close {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border-radius: 8px; font-size: .92rem; font-weight: 600; line-height: 1.12;
}
.mc-game-content .button { padding: .45rem .7rem; border: 1px solid transparent; text-align: center; }
.mc-game-content .primary { background: var(--green); color: white; border-color: var(--green); }
.mc-game-content .primary:hover { background: var(--dark); text-decoration: none; }
.mc-game-content .secondary { background: var(--white); color: var(--dark); border-color: #a6b5a3; }
.mc-game-content .secondary:hover { background: var(--pale); }
.mc-game-content .final-tools {
  position: absolute; z-index: 8; display: flex; align-items: center; gap: 6px;
  border-radius: 10px; padding: 4px; background: #fffcf4f2; box-shadow: 0 3px 14px #281e1940;
}
.mc-game-content .final-tools { top: 2.6%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 96%; }
.mc-game-content .popup {
  position: absolute; z-index: 10; top: auto; right: 2.8%; bottom: 9%; left: auto;
  margin: 0; width: min(49%, 420px); max-width: none; max-height: calc(100% - 18px);
  border: 1px solid #dadfd1; border-radius: 13px; padding: 12px 14px;
  box-shadow: 0 12px 42px #192b2160; color: var(--ink); background: var(--white);
}
.mc-game-content .popup-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.mc-game-content .popup h2 { margin: 0; font-size: clamp(1rem, 2.6cqw, 1.34rem); line-height: 1.18; font-weight: 650; }
.mc-game-content .popup h2:focus { outline: none; }
.mc-game-content .close {
  flex: 0 0 44px; padding: 0; border: 0; background: transparent; color: var(--ink);
  font-size: 1.5rem; font-weight: 400;
}
.mc-game-content .close:hover { background: var(--pale); }
.mc-game-content .result-popup p { margin: .2rem 0 .55rem; line-height: 1.35; font-size: clamp(.85rem, 2.14cqw, 1rem); }
.mc-game-content .result-finish { font-weight: 650; }
.mc-game-content .spotlight {
  pointer-events: none; position: absolute; z-index: 7; opacity: 0;
  width: var(--size, 13%); aspect-ratio: 1; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 2px #ffe6a5b0, inset 0 0 22px #ffe6a55e, 0 0 22px #ffe5aa82;
}
.mc-game-content .spotlight.flash { animation: point-it-out 1s ease both; }
@keyframes point-it-out {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
  28% { opacity: .73; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14); }
}
.mc-game-content .live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
@media (max-width: 720px) {
  .mc-game-content { width: min(calc(100% - 26px), calc((100svh - 116px) * 4 / 3)); }
  .mc-game-content h1 { margin: 9px 0 10px; }

  .mc-game-content .popup { width: min(90%, 370px); right: 3%; bottom: 4%; max-height: calc(100% - 14px); padding: 4px 8px 7px; }
  .mc-game-content .popup-top { margin-bottom: 1px; }
  .mc-game-content .button { font-size: .86rem; }
}
@media (max-height: 550px) and (min-aspect-ratio: 1/1) {
  .mc-game-content h1 { font-size: 1.25rem; margin: 4px 0 7px; }
  .mc-game-content { width: min(calc(100% - 26px), calc((100svh - 89px) * 4 / 3)); }
  .mc-game-content .popup { width: min(91%, 405px); bottom: 4%; padding: 4px 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-game-content .spotlight.flash { animation: none; }
  .mc-game-content .room-image { transition: none; }
}

.mc-game-content .scene:has(#choose-popup[open]) .mirror-star,
.mc-game-content .scene:has(#reward-popup[open]) .mirror-star:not(.is-flying),
.mc-game-content .scene:has(#result-popup[open]) .final-tools { visibility: hidden; }

.mc-game-content .choice-popup {
  --orbit-radius: clamp(49px, 17cqw, 140px);
  --icon-size: clamp(49px, 13.5cqw, 102px);
  top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
  width: min(calc(100% - 12px), 550px); height: min(calc(100% - 12px), 448px);
  max-height: none; border: 0; padding: 0; border-radius: 0; background: transparent;
  box-shadow: none; overflow: visible; user-select: none; pointer-events: none;
}
.mc-game-content .choice-popup::before {
  content: ""; position: absolute; inset: 28px -12% -6%; z-index: -1;
  background: radial-gradient(ellipse, #17252c83, #17252c57 42%, #17252c00 72%);
}
.mc-game-content .choice-popup .popup-top {
  position: absolute; inset: 0 0 auto; z-index: 1; justify-content: center; padding-inline: 42px;
}
.mc-game-content .choice-popup h2 {
  padding: .45rem .7rem; border-radius: 12px; background: #fffcf2ed; text-align: center;
  box-shadow: 0 4px 20px #192b2140;
}
.mc-game-content .choice-popup .close {
  position: absolute; right: 0; top: 0; width: 44px; color: white;
  background: #20302fcc; pointer-events: auto;
}
.mc-game-content .choice-popup .close:hover { background: #29463f; }
.mc-game-content .choices { position: absolute; inset: 45px 0 0; animation: orbit-spin 28s linear infinite; }
.mc-game-content .choices::before {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); content: "";
  width: calc(2 * var(--orbit-radius)); aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed #edeee4a8; box-shadow: 0 0 10px #17252c50;
}
.mc-game-content .choice-slot {
  position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  transform: rotate(var(--slot-angle)) translateY(calc(-1 * var(--orbit-radius))) rotate(calc(-1 * var(--slot-angle)));
}
.mc-game-content .choice {
  position: absolute; top: calc(-.5 * var(--icon-size)); left: calc(-.5 * var(--icon-size));
  width: var(--icon-size); height: var(--icon-size); display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: transparent; pointer-events: auto;
  animation: orbit-counter-spin 28s linear infinite; touch-action: manipulation;
}
.mc-game-content .choice:hover .choice-icon,
.mc-game-content .choice:focus-visible .choice-icon {
  scale: 1.12; filter: drop-shadow(0 0 7px #ffefb9) drop-shadow(0 3px 4px #102027);
}
.mc-game-content .choice-icon {
  width: 100%; height: 100%; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 3px 5px #102027e8); transition: scale .2s ease, filter .2s ease;
}
.mc-game-content .choice[data-decor="garland"]::before {
  content: ""; position: absolute; inset: -4%; pointer-events: none;
  background: radial-gradient(ellipse, #17252ca0, #17252c42 57%, transparent 72%);
}
.mc-game-content .choice[data-decor="garland"] .choice-icon { position: relative; }
.mc-game-content .choice[aria-pressed="true"] .choice-icon { opacity: .42; }
.mc-game-content .choice[aria-pressed="true"]::after {
  position: absolute; top: 3px; right: 1px; width: 19px; height: 19px; border-radius: 50%;
  content: "✓"; color: var(--dark); background: var(--pale); font: 700 13px/19px "Segoe UI", sans-serif;
}
.mc-game-content .choice-popup:has(.choice:hover, .choice:focus-visible, .choice:active) :is(.choices, .choice) { animation-play-state: paused; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-counter-spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mc-game-content .choices,
.mc-game-content .choice { animation: none; }
  .mc-game-content .choice-icon { transition: none; }
}

.mc-game-content .reward-popup,
.mc-game-content .result-popup {
  inset: 50% auto auto 50%; transform: translate(-50%, -50%);
}
.mc-game-content .reward-popup {
  width: min(94%, 356px); padding: 12px; text-align: center;
  background: #fffcf3f2; backdrop-filter: blur(10px);
}
.mc-game-content .reward-popup p { margin: 3px 0 8px; color: var(--muted); font-size: .85rem; }
.mc-game-content .reward-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.mc-game-content .reward-actions .button { flex: 1 1 auto; }
.mc-game-content .result-popup {
  width: min(66%, 540px); max-height: calc(100% - 86px); background: #fffcf3e9;
  backdrop-filter: blur(11px) saturate(.85);
}
.mc-game-content .result-popup p { margin-bottom: .25rem; }
.mc-game-content .result-popup p:focus { outline: none; }
.mc-game-content .forecast-pager { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mc-game-content .forecast-pager button {
  min-height: 32px; border: 0; padding: 2px 7px; border-radius: 5px;
  background: var(--pale); color: var(--dark); font-size: .75rem; font-weight: 650;
}
.mc-game-content .forecast-pager button:disabled { visibility: hidden; }
.mc-game-content .forecast-pager span { font-size: .72rem; color: var(--muted); }
.mc-game-content .coupon {
  margin-top: 8px; padding: 8px 10px 7px; border: 1px solid #aab8a6;
  border-radius: 8px; background: #edf1e8;
}
.mc-game-content .coupon-summary,
.mc-game-content .coupon-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; }
.mc-game-content .coupon-summary { justify-content: space-between; }
.mc-game-content .coupon-summary strong { font-size: clamp(.94rem, 2.3cqw, 1.25rem); }
.mc-game-content .coupon-summary span,
.mc-game-content .coupon small,
.mc-game-content #use-coupon { font-size: .76rem; color: var(--dark); }
.mc-game-content .coupon-code {
  width: 100%; margin: 2px 0 5px; padding: 4px 6px; border: 1px dashed #aab8a6; border-radius: 5px;
  background: #fffcf6; color: var(--dark); text-align: center;
  font: 650 .89rem/1.2 "Segoe UI", sans-serif; letter-spacing: .07em;
}
.mc-game-content .coupon-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mc-game-content .coupon-actions .button { min-height: 38px; }
.mc-game-content .coupon small,
.mc-game-content #use-coupon { display: block; margin-top: 3px; }
.mc-game-content #use-coupon { text-decoration: underline; }
.mc-game-content #open-coupon,
.mc-game-content #back-to-forecast,
.mc-game-content #coupon-title,
.mc-game-content #compact-open-coupon { display: none; }
.mc-game-content .restart {
  position: absolute; z-index: 8; bottom: 2%; right: 2%;
  padding: 0 7px; height: 44px; border: 0; background: transparent;
}
.mc-game-content .restart span {
  display: block; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; font-size: .78rem; font-weight: 650; color: var(--dark);
  background: #fffcf3e9; box-shadow: 0 2px 10px #1d30262b;
}
.mc-game-content .restart:hover span { background: var(--pale); }

@media (max-width: 720px), (max-height: 550px) {
  .mc-game-content .result-popup {
    width: min(96%, 445px); max-height: calc(100% - 54px); padding: 4px 8px;
  }
  .mc-game-content .result-popup.is-coupon-open { max-height: calc(100% - 20px); }
  .mc-game-content .scene:has(#result-popup[open].is-coupon-open) .restart { visibility: hidden; }
  .mc-game-content .result-popup p { font-size: .82rem; line-height: 1.25; }
  .mc-game-content .result-popup .close { min-height: 27px; flex-basis: 32px; }
  .mc-game-content .restart { height: 28px; bottom: 0; }
  .mc-game-content .coupon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3px 5px; margin-top: 3px; padding: 4px; }
  .mc-game-content .coupon-summary { display: contents; }
  .mc-game-content .coupon-summary strong { grid-area: 1 / 1; }
  .mc-game-content .coupon-summary span { grid-area: 1 / 2; text-align: right; line-height: 1.15; }
  .mc-game-content .coupon-actions { grid-row: 3; grid-column: 1 / -1; }
  .mc-game-content #use-coupon { grid-row: 5; grid-column: 1 / -1; margin: 0; text-align: center; line-height: 1.2; }
  .mc-game-content .coupon-summary span,
.mc-game-content .coupon small,
.mc-game-content #use-coupon { font-size: .68rem; }
  .mc-game-content .coupon-code { grid-row: 2; grid-column: 1 / -1; min-width: 0; padding-block: 3px; margin: 0; font-size: .74rem; }
  .mc-game-content .coupon small { grid-row: 4; grid-column: 1 / -1; margin: 0; text-align: center; line-height: 1.15; }
  .mc-game-content .coupon-actions .button { min-height: 35px; font-size: .75rem; padding: 3px 4px; }
  .mc-game-content .result-popup:not(.is-coupon-open) .coupon-summary span { display: none; }
  .mc-game-content .result-popup:not(.is-coupon-open) #open-coupon {
    display: inline-flex; grid-area: 1 / 2 / span 2; min-height: 36px;
    padding-inline: 4px; font-size: .73rem;
  }
  .mc-game-content .result-popup:not(.is-coupon-open) :is(.coupon-code, .coupon-actions, .coupon small, #use-coupon),
.mc-game-content .result-popup.is-coupon-open :is(#result-text, #forecast-title, #forecast-pager) { display: none; }
  .mc-game-content .result-popup.is-coupon-open #coupon-title { display: inline; }
  .mc-game-content #use-coupon { grid-area: 5 / 1; }
  .mc-game-content .result-popup.is-coupon-open #back-to-forecast {
    display: block; grid-area: 5 / 2; padding: 2px;
    border: 0; background: none; color: var(--dark); text-decoration: underline; font-size: .72rem;
  }
  .mc-game-content .coupon:has(#use-coupon[hidden]) #back-to-forecast { grid-column: 1 / -1; }
}
@media (max-width: 355px) {
  .mc-game-content .choice-popup h2 { font-size: .97rem; }
  .mc-game-content .result-popup p { font-size: .8rem; line-height: 1.25; }
  .mc-game-content .result-popup h2 { font-size: .94rem; }
  .mc-game-content .coupon { column-gap: 3px; }
  .mc-game-content .coupon-summary span { font-size: .63rem; }
  .mc-game-content .result-popup:not(.is-coupon-open) #coupon { display: none; }
  .mc-game-content .scene:has(#result-popup[open]:not(.is-coupon-open) #coupon:not([hidden])) #compact-open-coupon {
    display: inline-flex; position: absolute; z-index: 9; bottom: 2px; left: 2%;
    min-height: 27px; padding: 3px 8px; font-size: .76rem;
  }
}

.mc-game-content { margin: 0 auto clamp(24px, 4vw, 52px); }
