@font-face {
  font-family: Oswald;
  src: url("assets/oswald.woff") format("woff");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

:root {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  color: #142d4b;
  background: #faf8f3;
  font-synthesis: none;
  --navy: #142d4b;
  --red: #ad1932;
  --paper: #faf8f3;
  --white: #fffefa;
  --line: #c9d1d9;
  --body-copy: #38516b;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
body::before {
  content: "";
  display: block;
  height: 13px;
  background: repeating-linear-gradient(to bottom, var(--navy) 0 2px, var(--paper) 2px 5px);
}
button, a { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #29669b;
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.masthead {
  max-width: 1380px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px clamp(19px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.brand-mark { width: 62px; height: auto; display: block; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.film-button {
  border: 1px solid #b9c5d0;
  border-radius: 4px;
  padding: 7px 12px;
  min-height: 40px;
  background: var(--white);
  color: var(--navy);
  font-size: .95rem;
  white-space: nowrap;
}
.film-button:hover, #music-switch[aria-pressed="true"] { background: #e9eff5; }
.film-button > span:first-child { color: var(--red); margin-right: 3px; }
.play-icon { display: inline-block; border-block: 4px solid transparent; border-left: 6px solid var(--red); }

.layout {
  max-width: 1380px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(235px, .73fr) minmax(0, 1.27fr);
  align-items: center;
  gap: clamp(28px, 5.6vw, 82px);
  padding: clamp(28px, 4.8vw, 67px) clamp(19px, 5vw, 72px);
}
.intro h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(3rem, 5.7vw, 5.35rem);
  text-transform: uppercase;
  letter-spacing: -.035em;
  line-height: 1.00;
}
.intro h1 span { display: block; }
.intro h1 span:last-child { color: var(--red); }
.description {
  margin: 21px 0 24px;
  max-width: 32ch;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.55;
  color: var(--body-copy);
}
.journey { max-width: 330px; list-style: none; padding: 0; margin: 0; }
.journey li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  color: var(--body-copy);
  font-size: 1rem;
}
.journey li:last-child { border-bottom: 1px solid var(--line); }
.journey li[aria-current="step"] { color: var(--navy); background: #eaf0f6; }
.number { color: var(--red); font-size: .81rem; font-weight: 600; letter-spacing: .07em; }
.stage-state { color: var(--red); margin-left: auto; }

.arcade {
  position: relative;
  padding: 12px;
  border: 1px solid #aebdcb;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 14px 42px #1a345316;
}
.hud, .controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
}
.hud { padding: 2px 3px 9px; }
.hud output { font-weight: 650; font-variant-numeric: tabular-nums; margin-left: 4px; }
.score-heart { color: var(--red); margin-right: 2px; }
.life-snowflake { color: #325e86; margin-right: 2px; }
.meter {
  position: relative;
  height: 3px;
  border-radius: 4px;
  overflow: hidden;
  background: #dde5ed;
  margin: 0 3px 10px;
}
#meter-fill { height: 100%; width: 0; background: var(--red); transition: width .15s; }
.meter i { position: absolute; left: 60%; top: 0; width: 2px; height: 100%; background: var(--white); }

.rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}
.rewards > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 7px;
  padding: 5px 8px;
  border: 1px solid #c9d6e1;
  border-radius: 4px;
  font-size: .86rem;
}
.rewards strong { color: var(--red); font-size: 1.03rem; }
.rewards .reward-check { margin-left: auto; display: none; color: var(--red); font-weight: 600; }
.rewards .earned { border-color: #c5697d; background: #fff0f0; }
.rewards .earned .reward-check { display: inline; }

.field {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(365px, 36vw, 496px);
  border-radius: 5px;
  background: #213851;
  touch-action: pan-y;
}
.arcade.playing .field { touch-action: none; cursor: ew-resize; }
.scenery, .flurries, .snowbank, .drops, .doudou { pointer-events: none; }
.scenery, .flurries, .drops { position: absolute; inset: 0; }
.scenery {
  background: linear-gradient(180deg, #0713264a, #0713240a 42%, #10274a24 68%, #0a122570),
    var(--backdrop) var(--backdrop-pos, center) / cover no-repeat;
}
.field[data-scene="lights"] { --backdrop: url("assets/scene-lights.webp"); --backdrop-pos: 30% center; }
.field[data-scene="walk"] { --backdrop: url("assets/scene-walk.webp"); --backdrop-pos: 52% center; }
.field[data-scene="rooftops"] { --backdrop: url("assets/scene-rooftops.webp"); --backdrop-pos: center 18%; }
.flurries { overflow: hidden; }
.flake {
  position: absolute;
  left: var(--x);
  top: -5%;
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff7e9;
  opacity: var(--opacity);
  animation: snow var(--length) var(--delay) linear infinite;
}
@keyframes snow { to { transform: translate(38px, 560px); } }
.storm-flake { display: none; }
.field.in-round:is([data-scene="walk"], [data-scene="rooftops"]) .storm-flake:nth-child(even) { display: block; }
.field.blizzard .flake { animation-duration: calc(var(--length) * .57); }
.field.blizzard .storm-flake { display: block; }
.snowbank {
  position: absolute;
  bottom: -6%;
  left: -6%;
  width: 112%;
  height: 18%;
  border-radius: 53% 48% 0 0;
  background: linear-gradient(#eaf4fa, #7894adbf);
  opacity: .8;
  transform: rotate(-2deg);
}
.doudou {
  position: absolute;
  bottom: 4%;
  left: 50%;
  height: 35%;
  width: 30%;
  object-fit: contain;
  object-position: bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 12px #141b33c9);
  user-select: none;
}
.field:not(.in-round) .doudou { left: 76%; height: 87%; width: 53%; }
.doudou.hit { animation: hit .35s ease-out; }
@keyframes hit { 33%, 66% { opacity: .35; } }
.drop {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font: 33px/1 sans-serif;
}
.drop.collectible {
  color: #dd263e;
  font-size: 36px;
  -webkit-text-stroke: 1px #ffe6e1;
  text-shadow: 0 2px 4px #410d22;
  paint-order: stroke fill;
}
.drop.snowball {
  color: #eefaff;
  border: 2px solid #ddf4ff;
  border-radius: 50%;
  background: #315578ed;
  font-size: 24px;
}
.drop.caught { animation: spark .32s ease-out forwards; }
@keyframes spark { to { opacity: 0; translate: 0 -29px; } }

.controls { padding-top: 9px; color: var(--body-copy); text-align: center; }
.controls button, .dialog-header button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #becbd7;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--navy);
  font: 27px/1 Arial, sans-serif;
  touch-action: none;
}
.controls button:disabled { opacity: .52; }
.rule { min-height: 1.35em; text-align: center; margin: 3px 0 1px; color: var(--body-copy); font-size: .93rem; }

.card {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(58%, 322px);
  max-height: 94%;
  overflow: auto;
  background: var(--white);
  border-radius: 5px;
  border-top: 4px solid var(--red);
  padding: clamp(13px, 2vw, 24px);
  box-shadow: 0 9px 25px #08182f38;
}
.card h2, .card p { margin: 0 0 8px; }
.card h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.15; font-weight: 600; }
.card-label {
  color: var(--red);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .11em;
}
#card-copy { color: var(--body-copy); font-size: 1rem; line-height: 1.45; margin-bottom: 13px; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--red);
  color: white;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.primary:hover { background: #8e1830; }
.primary span { color: #ffc3cd; }

.coupon { display: grid; gap: 6px; padding: 8px; margin-bottom: 10px; background: #f1f4f7; border-radius: 4px; }
.coupon small { font-size: .87rem; color: var(--body-copy); }
.coupon-code { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 7px; }
.coupon strong { font-size: 1.05rem; letter-spacing: .06em; user-select: all; overflow-wrap: anywhere; }
.coupon button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  padding: 3px 1px;
  color: var(--navy);
}
.shop-button { background: var(--navy); padding-inline: 7px; font-size: .95rem; }
.shop-button:hover { background: #254c75; }
#copy-status { font-size: .8rem; margin: 0; }
#copy-status:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hit-feedback {
  position: absolute;
  top: 12%;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  color: #eefaff;
  background: #122941;
  border: 1px solid #c6ebff;
  border-radius: 30px;
  box-shadow: 0 3px 14px #08111a8c;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.hit-feedback span { color: #b9efff; font-size: 1.1rem; line-height: 1; }

dialog { width: min(91vw, 770px); border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--navy); padding: 13px; }
dialog::backdrop { background: #080d16d9; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dialog-header h2 { margin: 0; font-size: 1.15rem; }
.dialog-header #film-skip { width: auto; min-width: 76px; flex: none; border-radius: 4px; font: inherit; }
video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

@media (max-width: 760px) {
  .masthead { padding: 8px 14px; }
  .brand-mark { width: 50px; }
  .header-actions { gap: 5px; }
  .film-button { padding: 5px 8px; min-height: 36px; font-size: .85rem; }
  .layout { grid-template-columns: 1fr; padding: 15px 12px 18px; gap: 11px; }
  .intro { text-align: center; }
  .intro h1 { font-size: clamp(1.86rem, 6.4vw, 3.4rem); letter-spacing: -.02em; text-wrap: balance; }
  .intro h1 span { display: inline; }
  .intro h1 span + span::before { content: " "; white-space: pre; }
  .description { max-width: 40ch; margin: 7px auto 10px; font-size: .94rem; line-height: 1.38; }
  .journey { max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .journey li, .journey li:last-child { justify-content: center; gap: 4px; min-height: 33px; padding: 4px 3px; border-bottom: 1px solid var(--line); font-size: .83rem; line-height: 1.15; }
  .number { font-size: .71rem; }
  .stage-state { margin-left: 0; }
  .arcade { padding: 8px; border-radius: 7px; }
  .field { height: clamp(285px, 47svh, 440px); }
  .hud { padding-bottom: 5px; font-size: .94rem; }
  .meter { margin-bottom: 6px; }
  .controls { padding-top: 6px; font-size: .92rem; }
  .card { padding: 11px; width: min(62%, 305px); }
  .card h2 { font-size: clamp(1.28rem, 5vw, 1.9rem); }
  .card-label { font-size: .8rem; }
  #card-copy { font-size: .94rem; margin-bottom: 9px; }
  .rule { font-size: .88rem; }
  .rewards > div { font-size: .8rem; }
  .rewards strong { font-size: .93rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .flurries { display: none; }
.field.in-round:is([data-scene="walk"], [data-scene="rooftops"]) .storm-flake:nth-child(even) { display: block; }
}

/* Keep the film centred on screen, including on phones. */
dialog[open] { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 32px); box-sizing: border-box; }
