/* Winter Frost is a color mode. Festival decorations are supplied separately. */
html[data-theme="festival-december"] {
  --theme-surface-deep: #1b555c;
  --theme-surface-deep-rgb: 27, 85, 92;
  --theme-surface-deeper: #103c42;
  --theme-surface-base: #286e75;
  --theme-surface-base-rgb: 40, 110, 117;
  --theme-surface-mid: #4a9fa6;
  --theme-surface-mid-rgb: 74, 159, 166;
  --theme-surface-light: #a3e0e2;
  --theme-surface-light-rgb: 163, 224, 226;
  --theme-page-bg: linear-gradient(135deg, #a3e0e2 0%, #d9f4f4 65%, #fff3ec 100%);
  --theme-nav-bg: linear-gradient(90deg, #a3e0e2, #d9f4f4, #fff3ec);
  --theme-accent: #a3e0e2;
  --theme-accent-2: #fff3ec;
  --theme-on-accent-2: #1b555c;
  --theme-accent-3: #fff3ec;
  --theme-on-accent-3: #1b555c;
  --theme-control-bg: linear-gradient(180deg, #fff3ec, #d9f4f4);
  --theme-control-hover-bg: linear-gradient(180deg, #ffffff, #fff3ec);
  --theme-control-text: #1b555c;
  --theme-control-active-bg: #286e75;
  --theme-control-active-text: #ffffff;
}
html[data-theme="festival-december"] .top-nav { background: var(--theme-nav-bg); }
html[data-theme="festival-december"] .top-nav .nav-brand { color: #1b555c; }
html[data-theme="festival-december"] .top-nav .nav-link.active { background: #286e75; color: #ffffff; }
#mainView.festival-december .carousel-slide::before { content: none; }
.december-festival-art {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 2;
  width: min(calc(var(--festival-art-height, 95vh) * 16 / 9), 100vw);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.december-background-snow {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 2;
  width: min(calc(var(--festival-art-height, 95vh) * 16 / 9), 100vw);
  height: var(--festival-art-height, 95vh);
  transform: translate(-50%, -50%);
  overflow: hidden;
  pointer-events: none;
}
.december-snowflake {
  position: absolute;
  left: var(--snow-x);
  top: -5%;
  width: var(--snow-size);
  height: var(--snow-size);
  border-radius: 1px;
  background: #fffdfa;
  box-shadow: 0 0 0 1px rgba(55, 114, 124, .28);
  opacity: var(--snow-opacity);
  animation: decemberSnowfall var(--snow-duration) linear var(--snow-delay) infinite;
  pointer-events: none;
}
@keyframes decemberSnowfall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--snow-drift), 110vh, 0); }
}
@media (max-width: 768px) {
  #mainView .december-festival-art {
    width: auto;
    height: min(calc(var(--tent-art-height) - var(--tent-art-offset)), 56.25vw);
    top: calc((var(--tent-art-height) + var(--tent-art-offset)) / 2);
  }
  #mainView .december-background-snow {
    width: 100%;
    height: calc(var(--tent-art-height) - var(--tent-art-offset));
    top: calc((var(--tent-art-height) + var(--tent-art-offset)) / 2);
  }
}
@media (min-width: 769px) and (max-width: 1100px) {
  #mainView .december-festival-art {
    width: min(calc(var(--festival-tent-layer-height, 85vh) * 16 / 9), 100vw);
    height: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .december-snowflake { animation: none; top: var(--snow-static-y); }
}
.december-snowball-sign-image { display: none; pointer-events: none; }
body.december-snowball-available #claw_corn_maze_sign { display: block; }
body.december-snowball-available #claw_corn_maze_sign .october-maze-sign-image { display: none; }
body.december-snowball-available #claw_corn_maze_sign .december-snowball-sign-image { display: block; }
body.december-snowball-available #claw_speakers { display: none; }

/* December Snowball Fight uses the same modal, controls, and leaderboard framing as the other site minigames. */
#claw_ozoz.december-snowball-departing {
  transform: translateX(-450px);
  opacity: 0;
  transition: transform 550ms ease-in, opacity 550ms ease-in;
  pointer-events: none;
}
.december-snowball-modal { width: min(1180px, 96vw); max-width: 96vw; }
.december-snowball-modal button:not(.action-btn) { font-family: inherit; }
body.snowball-exit-confirm-open #customAlertModal.active { z-index: 20001 !important; }
.december-snowball-modal .stat-value { line-height: 1.2; }
.december-snowball-modal .snowball-hearts {
  color: #e8799c;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: .18em;
  white-space: nowrap;
}
.december-snowball-modal .game-main { min-width: 0; }
.december-snowball-modal .game-sidebar { flex: 0 0 220px; }
.december-snowball-modal #snowballCanvas {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  border: 3px solid var(--theme-body-text);
  border-radius: 12px;
  background: #a8d3dc;
  image-rendering: pixelated;
  touch-action: none;
}
.december-snowball-modal .snowball-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--theme-text);
  text-align: center;
}
.december-snowball-modal .maze-level-picker {
  padding: .7rem;
  border: 1px solid rgba(91, 76, 98, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
}
.december-snowball-modal .maze-level-picker strong { display: block; margin-bottom: .45rem; }
.december-snowball-modal .maze-level-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; }
.december-snowball-modal .maze-level-buttons button {
  min-width: 0;
  padding: .4rem 0;
  border: 1px solid var(--theme-body-text);
  border-radius: 6px;
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
}
.december-snowball-modal .maze-level-buttons button[aria-pressed="true"] {
  background: var(--theme-body-text);
  color: var(--theme-modal-bg);
}
.december-snowball-modal .maze-level-picker small { display: block; margin-top: .45rem; font-size: .7rem; }
.december-snowball-modal .snowball-prize-note { margin: .3rem 0; font-size: .68rem; line-height: 1.4; text-align: center; }
.december-snowball-modal .minigame-how-to { font-size: .72rem; line-height: 1.45; }
.snowball-touch-controls { display: none; align-items: center; justify-content: center; gap: 16px; margin: 1rem auto 0; touch-action: none; overscroll-behavior: none; }
@media (any-pointer: coarse) {
  .snowball-touch-controls { display: flex; }
}
.snowball-move-controls { flex: 0 0 auto; }
.snowball-move-pad { display: grid; grid-template-columns: repeat(2, 58px); gap: 6px; touch-action: none; }
.snowball-touch-controls button {
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #f79ab5 0%, #e07a9a 100%);
  color: #fff3ec;
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(91, 76, 98, 0.3);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.snowball-touch-controls #snowball-touch-throw { width: 120px; font-size: 1.2rem; line-height: 1.25; text-align: center; }
.snowball-touch-controls button:is(:active, .is-held) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(91, 76, 98, 0.3); }
@media (max-width: 768px) {
  .december-snowball-modal { box-sizing: border-box; max-height: calc(100dvh - 12px); overscroll-behavior: contain; }
  .december-snowball-modal .balloon-game-content { flex-direction: column; gap: .7rem; }
  .december-snowball-modal .game-sidebar { flex-basis: auto; width: 100%; gap: .6rem; }
  .december-snowball-modal #snowballCanvas { max-width: 100%; }
}
@media (max-width: 480px) {
  .snowball-touch-controls { gap: 12px; }
}
@media (max-height: 700px) and (any-pointer: coarse) {
  #decemberSnowballModal.snowball-round-running :is(#snowball-open-leaderboard, .snowball-prize-note, .minigame-how-to) { display: none; }
}
@media (max-height: 500px) and (any-pointer: coarse) {
  #decemberSnowballModal.snowball-round-running .december-snowball-modal {
    box-sizing: border-box;
    max-height: calc(100dvh - 12px);
    padding: .6rem;
    overflow-y: hidden;
  }
  #decemberSnowballModal.snowball-round-running .balloon-game-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: .5rem;
    align-items: start;
  }
  #decemberSnowballModal.snowball-round-running .game-main { min-width: 0; }
  #decemberSnowballModal.snowball-round-running #snowballCanvas {
    width: min(100%, 340px);
    height: auto;
    margin: 0 auto;
  }
  #decemberSnowballModal.snowball-round-running .snowball-status { margin-top: 2px; }
  #decemberSnowballModal.snowball-round-running .snowball-touch-controls { margin-top: .2rem; }
  #decemberSnowballModal.snowball-round-running .game-sidebar { width: 170px; gap: .35rem; }
  #decemberSnowballModal.snowball-round-running .game-info { gap: .35rem; }
  #decemberSnowballModal.snowball-round-running .game-stat { padding: .4rem; }
}
