@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/fonts/pixelify-sans-700-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.christmas-page {
  color: #e7f2ef;
  background: #101f2a;
}
.christmas-main {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
  overflow-wrap: anywhere;
}
.christmas-main [hidden] { display: none !important; }
.christmas-main a { color: #b7ebd8; }
.christmas-title {
  --ribbon-wing: clamp(.85rem, 4vw, 2.85rem);
  --ribbon-corner: clamp(4px, 1vw, 8px);
  --ribbon-outline: polygon(
    var(--ribbon-corner) 0, calc(100% - var(--ribbon-corner)) 0,
    calc(100% - var(--ribbon-corner)) var(--ribbon-corner), 100% var(--ribbon-corner),
    100% calc(100% - var(--ribbon-corner)), calc(100% - var(--ribbon-corner)) calc(100% - var(--ribbon-corner)),
    calc(100% - var(--ribbon-corner)) 100%, var(--ribbon-corner) 100%,
    var(--ribbon-corner) calc(100% - var(--ribbon-corner)), 0 calc(100% - var(--ribbon-corner)),
    0 var(--ribbon-corner), var(--ribbon-corner) var(--ribbon-corner)
  );
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(100%, 47rem);
  margin: 0 auto;
  padding-inline: var(--ribbon-wing);
  color: #fff0c7;
  font: 700 clamp(1.65rem, 6.6vw, 3.65rem)/1.06 'Pixelify Sans', ui-monospace, monospace;
  text-align: center;
  text-transform: uppercase;
  filter: drop-shadow(0 5px 0 #09202d99);
}
.christmas-title::before,
.christmas-title::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 25% 12%;
  width: calc(var(--ribbon-wing) + 10px);
  background:
    linear-gradient(90deg, transparent 70%, #27181d55 70%),
    linear-gradient(#d5a26b 0 3px, #87424a 3px 50%, #69333d 50% calc(100% - 3px), #a46e51 calc(100% - 3px));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 72%, 18% 72%, 18% 60%, 34% 60%, 34% 40%, 18% 40%, 18% 28%, 0 28%);
}
.christmas-title::before { left: 0; }
.christmas-title::after { right: 0; transform: scaleX(-1); }
.christmas-title-banner {
  position: relative;
  isolation: isolate;
  display: block;
  padding: clamp(.3rem, .65vw, .6rem) clamp(.55rem, 3vw, 1.8rem);
  background: linear-gradient(#ffe6ad, #c79358);
  clip-path: var(--ribbon-outline);
  text-shadow: 0 2px 0 #0c2626;
  text-wrap: balance;
}
.christmas-title-banner::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: clamp(2px, .7vw, 4px);
  background:
    repeating-linear-gradient(0deg, #0b2b2b24 0 1px, transparent 1px 5px),
    linear-gradient(#2c5249, #17363a);
  clip-path: var(--ribbon-outline);
}
.christmas-main .christmas-action, .christmas-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .55rem .85rem; margin-top: .55rem; font: inherit; font-weight: 700; text-decoration: none;
  color: #102a24; background: #afe9cc; border: 1px solid #afe9cc; border-radius: .6rem; cursor: pointer;
}
.christmas-main .christmas-action {
  position: fixed;
  z-index: 20;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  box-shadow: 0 .25rem 1rem #122c3566;
}
.christmas-secondary { color: #e7f2ef; background: #1b333c; border-color: #537773; }
.christmas-secondary:disabled { opacity: .5; cursor: default; }
.christmas-content { margin-top: .75rem; }
.christmas-content h2 {
  font-weight: 700;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.15;
  color: #fff3d4;
  margin: .6rem 0;
}
.christmas-main:not([data-detail]) .christmas-scene {
  position: relative;
  min-height: 80vh;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(.75rem, 3vw, 3rem) 2rem;
  background-color: #182f43;
  background-image:
    linear-gradient(180deg, #091725b3 0%, #09172538 22%, transparent 44%),
    url('/assets/images/noel/clairiere-noel-pixel.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.christmas-content { position: relative; }
.christmas-main:not([data-detail]) .christmas-content { color: #fff; }
.christmas-main:not([data-detail]) [data-result]:empty { display: none; }
.christmas-forest-map {
  position: relative;
  isolation: isolate;
  min-height: clamp(24rem, 70dvh, 60rem);
}
.christmas-tree {
  position: absolute;
  left: var(--tree-x);
  z-index: var(--tree-layer);
  display: grid;
  place-items: end center;
  min-height: 44px;
  width: clamp(44px, 11vw, 12rem);
  transform: translate(-50%, -100%);
}
.christmas-tree-sprite {
  --tooltip-border: #e6c88b;
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
}
.christmas-tree img {
  display: block;
  width: min(var(--sprite-size), calc(100% - 3px));
  height: auto;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 .25rem .22rem #234d5855);
}
.christmas-tree:is(:hover, :focus-visible) { z-index: 5; outline: none; }
.christmas-tree:is(:hover, :focus-visible) img {
  filter: brightness(1.22) drop-shadow(0 0 2px #436458) drop-shadow(0 0 5px #fff3ab);
}
.christmas-tree:not([data-tooltip-dismissed]):focus-visible { --tooltip-visibility: visible; }
@media (hover: hover) {
  .christmas-tree:not([data-tooltip-dismissed]):hover { --tooltip-visibility: visible; }
}
.christmas-tree-tooltip,
.christmas-tree-sprite::after {
  position: absolute;
  bottom: 100%;
  left: 50%;
  visibility: var(--tooltip-visibility, hidden);
}
.christmas-tree-tooltip {
  width: max-content;
  max-width: min(14rem, var(--forest-width));
  padding-bottom: 8px;
  /* The bubble stays inside the clearing while the arrow stays centered on the sprite. */
  transform: translateX(clamp(calc(0px - var(--tree-x)), -50%, calc(var(--forest-width) - var(--tree-x) - 100%)));
  filter: drop-shadow(0 3px 0 #0b182c99);
}
.christmas-tree-tooltip-label {
  position: relative;
  isolation: isolate;
  display: block;
  padding: .36rem .6rem;
  background: var(--tooltip-border);
  color: #fff3d4;
  clip-path: polygon(
    4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px
  );
  font: 700 .8rem/1.3 ui-monospace, Consolas, monospace;
  text-align: center;
}
.christmas-tree-tooltip-label::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 2px;
  background: #182b36;
}
.christmas-tree-sprite::after {
  content: '';
  width: 10px;
  height: 8px;
  background: var(--tooltip-border);
  clip-path: polygon(
    0 0, 100% 0, 100% 25%, 80% 25%, 80% 50%, 60% 50%,
    60% 100%, 40% 100%, 40% 50%, 20% 50%, 20% 25%, 0 25%
  );
  transform: translateX(-50%);
  pointer-events: none;
}
.christmas-podium {
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(.875rem, 3vw, 2rem) 5rem;
  scroll-margin-top: calc(var(--site-header-height, 0px) + 1rem);
  text-align: center;
}
.christmas-podium h2 {
  margin: 0;
  color: #fff3d4;
  font-size: clamp(1.4rem, 4vw, 2rem);
}
.christmas-podium-status {
  margin: .25rem 0 clamp(1rem, 3vw, 1.75rem);
  color: #b8cfce;
  font-size: .9rem;
}
.christmas-podium-list {
  --winner-step: clamp(4.5rem, 10vw, 7.5rem);
  --sprite-size: clamp(5.75rem, 15vw, 9.5rem);
  --step-depth: clamp(.55rem, 1.4vw, .95rem);
  --stage-height: calc(var(--winner-step) + var(--step-depth) + var(--sprite-size));
  --base-height: .4rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: 'second first third';
  margin: 0;
  padding: 0;
  list-style: none;
}
.christmas-podium-list::after {
  content: '';
  position: absolute;
  top: var(--stage-height);
  inset-inline: -.25rem;
  height: var(--base-height);
  background: linear-gradient(#64747c 2px, #354751 2px, #243540);
  pointer-events: none;
}
.christmas-podium-list > li { min-width: 0; }
.christmas-podium-list > li:nth-child(1) {
  grid-area: first;
  --step-height: var(--winner-step);
  --place-color: #ffe2a0;
  --step-surface: #bf9b57;
  --step-light: #76582d;
  --step-shadow: #48351f;
}
.christmas-podium-list > li:nth-child(2) {
  grid-area: second;
  --step-height: calc(var(--winner-step) * .68);
  --place-color: #e0edf5;
  --step-surface: #9eb4c2;
  --step-light: #526977;
  --step-shadow: #2e414e;
}
.christmas-podium-list > li:nth-child(3) {
  grid-area: third;
  --step-height: calc(var(--winner-step) * .45);
  --place-color: #ffd3ba;
  --step-surface: #af836b;
  --step-light: #765141;
  --step-shadow: #49332f;
}
.christmas-podium .christmas-podium-entry {
  display: block;
  color: #eff7f0;
  text-decoration: none;
}
.christmas-podium-stage {
  position: relative;
  display: block;
  height: var(--stage-height);
}
.christmas-podium-step {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  place-items: center;
  height: var(--step-height);
  color: var(--place-color);
  background: linear-gradient(180deg, var(--step-light), var(--step-shadow));
  box-shadow: inset 1px 0 #ffffff26, inset -1px 0 #0004, inset 0 1px #ffffff38;
  font-size: clamp(1.05rem, 3.75vw, 2.15rem);
  line-height: 1;
  font-weight: 700;
}
.christmas-podium-step::before {
  content: '';
  position: absolute;
  inset: auto 0 100%;
  height: var(--step-depth);
  background: linear-gradient(180deg, var(--place-color), var(--step-surface));
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.christmas-podium-stage img {
  position: absolute;
  left: 50%;
  bottom: calc(var(--step-height) + var(--step-depth) * .5);
  display: block;
  width: auto;
  max-width: 84%;
  height: calc(var(--sprite-size) * var(--sprite-scale));
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px #101f2a66);
}
.christmas-podium-copy {
  display: grid;
  justify-items: center;
  gap: .18rem;
  min-width: 0;
  padding: calc(var(--base-height) + .75rem) clamp(.2rem, 1.8vw, 1.15rem) 0;
  font-size: clamp(.82rem, 1.65vw, 1.08rem);
  line-height: 1.3;
}
.christmas-podium-copy > * { max-width: 100%; }
.christmas-podium-height { color: #b8cfce; font-size: clamp(.75rem, 1.5vw, .9rem); }
.christmas-podium-reward {
  margin-top: .2rem;
  color: var(--place-color);
  font-size: clamp(.74rem, 1.5vw, .88rem);
}
.christmas-podium-reward > strong {
  display: block;
  color: inherit;
  font-size: clamp(.92rem, 1.65vw, 1.05rem);
}
.christmas-podium-boost {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .2rem;
  color: #f6a8e8;
  font-size: clamp(.74rem, 1.5vw, .88rem);
}
.christmas-podium-boost img {
  width: 1rem;
  height: 1rem;
  flex: none;
  object-fit: contain;
}
.christmas-podium-entry:is([href]:hover, :focus-visible) .christmas-podium-copy > strong {
  text-decoration: underline;
  text-underline-offset: .15em;
}
.christmas-podium-entry:focus-visible {
  outline: 2px solid var(--place-color);
  outline-offset: -2px;
}
.christmas-main[data-detail] {
  --profile-line: #385456;
  --profile-muted: #b8cfce;
  --profile-accent: #9bd8b8;
  max-width: 62rem;
  padding: clamp(1rem, 3.5vw, 3rem);
}
.christmas-main[data-detail] [data-result]:empty { display: none; }
.christmas-main[data-detail] [data-back] { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.christmas-main[data-detail] h2 { margin: .35rem 0 1.2rem; }
.christmas-detail { display: grid; gap: 1.35rem; align-items: stretch; }
.christmas-tree-portrait {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  background: #182f35;
  border-radius: 4px;
  min-height: 11.5rem;
  margin: 0;
  padding: 1rem .75rem .65rem;
}
.christmas-tree-portrait img { display: block; width: auto; height: auto; max-width: 70%; max-height: 9.5rem; image-rendering: pixelated; }
.christmas-tree-portrait figcaption { color: var(--profile-muted); font-size: .85rem; }
.christmas-metrics { display: grid; align-content: center; margin: 0; }
.christmas-metrics > div { min-width: 0; padding: .85rem 0; }
.christmas-metrics > div + div { border-top: 1px solid var(--profile-line); }
.christmas-metrics dt { color: var(--profile-muted); font-size: .75rem; text-transform: uppercase; }
.christmas-metrics dd { margin: .3rem 0 0; color: #e7f2ef; font-size: .9rem; }
.christmas-metrics dd > strong { color: #fff3d4; font-size: clamp(1.3rem, 3vw, 1.9rem); }
.christmas-metrics small { display: block; color: var(--profile-muted); margin-top: .3rem; }
.christmas-metrics progress { display: block; width: 100%; height: .3rem; margin-top: .55rem; accent-color: var(--profile-accent); }
.christmas-activity { display: grid; gap: 1.4rem; margin-top: 1.5rem; }
.christmas-activity h3 { margin: 0; color: #fff3d4; font-size: 1.05rem; }
.christmas-history { margin: .15rem 0 0; padding-left: 1.5rem; }
.christmas-history li { padding: .65rem .15rem; }
.christmas-history li + li { border-top: 1px solid var(--profile-line); }
.christmas-history time { display: block; color: var(--profile-muted); font-size: .8rem; }
.christmas-history strong { color: var(--profile-accent); font-size: .82rem; }
.christmas-gardeners li > strong { display: inline-block; margin-inline-start: .65rem; }
.christmas-watering { list-style: none; padding: 0; }
.christmas-watering li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; }
.christmas-watering-icon {
  display: grid;
  place-items: center;
  background: #254741;
  color: var(--profile-accent);
  border-radius: 50%;
  width: 2rem;
  aspect-ratio: 1;
}
.christmas-watering-icon::before {
  content: '';
  width: .56rem;
  height: .56rem;
  border: 1px solid currentColor;
  border-radius: 0 55% 55%;
  transform: rotate(45deg);
}
.christmas-pagination { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 40rem) and (orientation: portrait) {
  .christmas-main:not([data-detail]) .christmas-scene {
    background-image:
      linear-gradient(180deg, #091725b3 0%, #09172538 22%, transparent 44%),
      url('/assets/images/noel/clairiere-noel-pixel-mobile.webp');
  }
}
@media (min-width: 48rem) {
  .christmas-tree img { width: min(calc(var(--sprite-size) * 1.7), calc(100% - 6px)); }
  .christmas-detail { grid-template-columns: 1fr 1fr; }
  .christmas-tree-portrait { min-height: 13rem; }
}
