/**
 * The page's styles.
 *
 * **The globe is the page, and the layout gets out of its way.**
 *
 * The Earth fills the screen from edge to edge. The header sits on top of it in a
 * band that is barely there, and the ticker sits under the header for the same
 * reason. Everything else is either a control that gets out of the way or a panel
 * that slides over the globe when it is wanted and is not there when it is not.
 *
 * **Nothing is behind a hover.** Every person here is on a phone, and on a phone a
 * hover is a thing that does not happen. The agent cards open on tap and on focus.
 */

/* ------------------------------------------------------------------ the shell */

/**
 * **The page is one screen tall and never scrolls.**
 *
 * The globe is fixed and fills the window, and the two corners are fixed over
 * it. There is nothing else on the page that needs height, so the body is
 * exactly the height of the window and the overflow is hidden. A scrollbar on
 * a page like this is a scrollbar that suggests there is more to read, and
 * there is not.
 */
html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
}

/**
 * **A pinch is for the globe, not the page.** The page is exactly one screen
 * and never scrolls, so the browser is told not to pan or zoom it at all, and
 * every pinch and drag goes to the globe instead. Only the globe's page: the
 * other pages scroll and zoom as normal.
 */
body[data-season] { touch-action: none; }

#globe {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* **The globe must never take a click that belongs to something else.** It is
     a fixed element over the whole page, and a canvas that is on top of a sheet
     swallows every tap meant for the sheet. */
  pointer-events: none;
}

/* The globe takes its own taps, and nothing else does. */
#globe canvas { pointer-events: auto; }

#globe canvas { display: block; }

/**
 * The flat globe.
 *
 * **The same Earth, in two dimensions.** It is drawn on a canvas rather than in
 * three dimensions, so it cannot be turned, and it is smaller and duller than
 * the real one. It is also the difference between a page that works and a page
 * that is a black rectangle for somebody.
 */
#globe.flat {
  display: grid;
  place-items: center;
  align-content: start;
  padding: 96px 0 0;
  /* The flat globe is shorter than the real one and it has a note under it, so
     it needs room of its own — but the page still does not scroll, so it takes
     what it needs out of the window rather than adding to it. */
  height: 100%;
  overflow: hidden;
}

#globe.flat .flat-globe {
  width: min(100%, 1200px);
  height: auto;
  border-radius: 8px;
  opacity: 0.95;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
}

.flat-note {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  margin: 16px auto 0;
  display: block;
  width: min(100% - 32px, 30rem);
  margin: 0;
  padding: 11px 16px;
  max-width: 30rem;
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 236, 255, 0.16);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(217, 236, 255, 0.78);
  text-align: center;
}

/* The vignette. It sits between the globe and the page, and it is what stops the
   text from having to fight the Earth for attention. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5, 7, 13, 0.85) 0%, rgba(5, 7, 13, 0) 22%),
    linear-gradient(to top, rgba(5, 7, 13, 0.9) 0%, rgba(5, 7, 13, 0) 38%);
}

/* ---------------------------------------------------------------- the header */

.top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 12px;
}

/* **The brand is the first thing and the buttons are the second, and on a narrow
   phone the buttons win.** The name is the thing that can be shortened, so it is
   the thing that is. */
@media (max-width: 460px) {
  /* Hidden to the eye on a phone, kept for a screen reader: it is the page's heading. */
  .brand .name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .top { padding-left: 12px; padding-right: 12px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  flex: none;
}

.brand .name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* ------------------------------------------------------------------ buttons */

button, .ghost, .pill {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 140ms cubic-bezier(0.2, 1.2, 0.4, 1), background 140ms ease,
    box-shadow 140ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--pink-bright);
  outline-offset: 2px;
}

/* **The pill is a button or a link.** The elf's own page has a link that says
   "Make an elf" and it has to look like the button on the other pages, or the
   two pages look like two different sites. */
.pill,
a.pill {
  border: 0;
  padding: 10px 18px;
  background: var(--pink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 18px rgba(214, 51, 127, 0.35);
}

.pill:hover, a.pill:hover { transform: translateY(-1px); background: #e0408f; }
.pill:active { transform: translateY(0) scale(0.98); }

.pill.wide { width: 100%; padding: 14px 18px; font-size: 15px; }

.ghost {
  border: 1px solid rgba(217, 236, 255, 0.28);
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--frost);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(217, 236, 255, 0.5); }
.ghost:active { transform: scale(0.98); }

.ghost.small { padding: 7px 12px; font-size: 12px; }

/* The simulate button says what it does, but on a phone there is not room for the
   whole sentence, so it says the short version. The long version is the title
   attribute, which is there when somebody wants it. */
@media (max-width: 460px) {
  #simulate { padding: 9px 12px; font-size: 12px; }
  .pill { padding: 10px 15px; font-size: 13.5px; }
}

/* ---------------------------------------------------------------- the desktop */

@media (min-width: 760px) {
  /* The panels sit in a column on the left, over the globe, and they are only
     as wide as they need to be. */
  .ticker,
  .caption,
  .controls {
    max-width: 30rem;
  }

  .ticker {
    margin-top: 6px;
  }

  /* The globe is a little smaller on a wide screen, because there is more of it
     to look at and it does not need to fill the height. */
  .controls {
    margin-top: 12px;
  }
}

/* -------------------------------------------------------------- the countdowns */

/**
 * The big countdown.
 *
 * **The one number everybody came for.**
 *
 * It sits in the middle of the screen, over the globe, because it is the
 * middle of the subject: the time until Santa leaves the workshop.
 *
 * It is a row of four numbers — days, hours, minutes, seconds — with the
 * labels underneath, and the seconds flip once a second the way a flap on a
 * split-flap board does.
 *
 * **The digits are monospaced and the units are fixed width**, so the row does
 * not twitch when a digit changes from a one to a nine. A countdown that twitches
 * once a second is worse than one that does not.
 */
.big-countdown {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
  text-align: center;
  width: max-content;
  max-width: calc(100vw - 32px);
  /**
   * **A soft pool of darkness underneath.**
   *
   * The countdown sits over the globe, and the globe is not always dark —
   * when the camera comes down to the ground there is a bright map of streets
   * underneath, and pale text on a pale map is gone.
   *
   * **The pool is a wide radial fade**, so it darkens the middle of the
   * picture without drawing a box around it, and it fades away completely at
   * the edges so that the map is not hidden.
   */
  padding: 22px 34px 26px;
  background: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    rgba(4, 8, 16, 0.82) 0%,
    rgba(4, 8, 16, 0.6) 45%,
    rgba(4, 8, 16, 0) 78%
  );
}

/**
 * **The countdown is in the middle of the screen, and the panels are on the
 * left.**
 *
 * On a wide screen there is room for both: the panels on the left, the
 * countdown in the middle of the globe.
 *
 * On a narrow screen there is not, so the countdown **takes its place in the
 * flow**, under the header and above the panels, and the panels sit below it.
 * It is still the biggest thing on the screen and it is still the first thing
 * you read.
 */
@media (max-width: 1000px) {
  .big-countdown {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    z-index: 10;
    margin: 6px 16px 0;
    width: auto;
    max-width: none;
    /**
     * **No pool of darkness on a narrow screen**, because the countdown is in
     * the flow there rather than over the globe, and the page behind it is
     * already dark.
     */
    padding: 0;
    background: none;
  }
}

/**
 * **On a wide screen the panels are on the left and the countdown is in the
 * middle**, so the countdown has to be above them in the page.
 */
@media (min-width: 1001px) {
  .big-countdown { position: absolute; }
}

.big-countdown-label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(217, 236, 255, 0.55);
}

.big-countdown-clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 22px);
}

.big-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.big-countdown-digits {
  display: flex;
  gap: 1px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

/**
 * **The digit.**
 *
 * It is a box, so the flap can come down inside it without the row moving. The
 * font is the same width for every digit, so a one and a nine take the same
 * room and the row does not twitch.
 */
.big-countdown-digit {
  position: relative;
  display: block;
  min-width: 0.62em;
  padding: 0.1em 0.02em;
  text-align: center;
  border-radius: 0.1em;
  /**
   * **The backing is nearly opaque.**
   *
   * The countdown sits over the globe, and the globe is not always dark: when
   * the camera comes down to the ground there is a bright map underneath, and
   * a half-transparent box over a map of Moscow is unreadable.
   *
   * **So the box is dark enough to read against anything**, and the edge is
   * soft so that it does not look like a sticker on the map.
   */
  background: rgba(8, 13, 24, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(217, 236, 255, 0.12);
  color: #fff;
  overflow: hidden;
}

/**
 * **A slot with nothing in it is not a box.**
 *
 * The days have three slots and there are forty-two days in them, and a row of
 * "042" is a date format rather than a person counting.
 *
 * It is a class rather than the `:empty` selector, because a slot holding a
 * space is not empty as far as the selector is concerned, and a space is what
 * an unused slot holds.
 */
.big-countdown-digit.is-blank {
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
}

/**
 * **The flip.**
 *
 * The digit comes down from above and the old one goes up and out. It is a
 * keyframe animation on the element itself rather than two elements swapping,
 * because one element cannot animate two different things at once and this way
 * the old digit is simply replaced.
 */
.big-countdown-digit.is-flipping {
  animation: digit-flip var(--flip-ms, 380ms) cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes digit-flip {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  55% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/**
 * **The words around the numbers.**
 *
 * They sit over the globe, which is not always dark — when the camera comes
 * down to the ground there is a bright map underneath — so they carry a
 * shadow of their own, which keeps them readable against anything.
 *
 * **The shadow is wide and soft**, because a tight one looks like an outline
 * and a wide one looks like the words are glowing, which is what they need
 * to do over a busy map.
 */
.big-countdown-label,
.big-countdown-unit-label,
.big-countdown-note,
.workshop-note {
  text-shadow:
    0 1px 2px rgba(4, 8, 16, 1),
    0 0 6px rgba(4, 8, 16, 1),
    0 0 16px rgba(4, 8, 16, 0.95),
    0 0 32px rgba(4, 8, 16, 0.85);
}

.big-countdown-unit-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 242, 255, 0.85);
}

.big-countdown-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: rgba(230, 242, 255, 0.92);
}

/**
 * **What Santa is doing while he waits.**
 *
 * It used to be a panel in the top left corner, which took up more of the
 * screen than the globe did, and now it is under the countdown where the eye
 * already is.
 *
 * It is two lines of text in a quiet colour, and it says three things: that he
 * is in the workshop, that he is with his elves, and that the lamp is on. The
 * clock above says the rest.
 */
.workshop-note {
  margin: 16px auto 0;
  max-width: 26rem;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(230, 242, 255, 0.88);
  text-wrap: balance;
  /**
   * **It has a shadow of its own**, because it sits over the globe and the
   * globe is not always dark. When the camera comes down to the ground there
   * is a bright map underneath, and a line of pale text on a pale map is
   * gone.
   */
  text-shadow:
    0 1px 2px rgba(4, 8, 16, 1),
    0 0 6px rgba(4, 8, 16, 1),
    0 0 16px rgba(4, 8, 16, 0.95),
    0 0 32px rgba(4, 8, 16, 0.9);
}

.workshop-note strong {
  color: rgba(255, 95, 175, 0.85);
  font-weight: 700;
}

/** The whole thing is bigger on a big screen. */
@media (min-width: 900px) {
  .big-countdown-digit { font-size: clamp(38px, 5.2vw, 66px); }
  .big-countdown-label { font-size: 14px; }
  .big-countdown-unit-label { font-size: 11.5px; }
}

/** And smaller on a phone, because a phone is narrow. */
@media (max-width: 560px) {
  .big-countdown-digit { font-size: clamp(27px, 8.4vw, 40px); }
  .big-countdown-clock { gap: 7px; }
  .big-countdown-label { font-size: 11px; letter-spacing: 0.1em; }
  .big-countdown-unit-label { font-size: 9.5px; }
  .big-countdown-unit { gap: 5px; }
}

/**
 * **Somebody has asked their phone not to animate things.**
 *
 * The countdown still counts, and the digits still change, they just arrive
 * without the flap.
 */
@media (prefers-reduced-motion: reduce) {
  .big-countdown-digit.is-flipping { animation: none; }
}

/**
 * **When Santa has gone**, the countdown says so and the numbers stop.
 */
.big-countdown.is-gone .big-countdown-digit {
  border-color: rgba(255, 95, 175, 0.28);
  color: var(--pink-bright);
}

.big-countdown.is-gone .big-countdown-label {
  color: rgba(255, 95, 175, 0.7);
}

/* ------------------------------------------------------------------ ticker */

/**
 * The panels.
 *
 * **They are the width of the text and no wider.** A ticker that runs the whole
 * width of a desktop window is a bar of nothing with a number in the middle of
 * it. So on a wide screen the panels are capped and put on the left, where the
 * eye goes, and the globe has the rest of the screen to itself.
 */
.ticker {
  position: relative;
  z-index: 10;
  margin: 4px 16px 0;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: rgba(10, 16, 28, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(217, 236, 255, 0.14);
  display: flex;
  align-items: baseline;
  gap: 10px;
  overflow: hidden;
}

.ticker[hidden] { display: none; }

/**
 * **On a phone the count has a line of its own.** It runs into the billions,
 * and beside the label it was cut off at the edge of the screen. Where Santa
 * is, is in the caption underneath, so the ticker's own note goes.
 */
@media (max-width: 759px) {
  .ticker { flex-wrap: wrap; row-gap: 2px; }
  .ticker-label { flex-basis: 100%; }
  .ticker-count { font-size: 26px; }
  .ticker-now { display: none; }
}

.ticker-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(217, 236, 255, 0.62);
  flex: none;
}

.ticker-label.simulated { color: var(--gold); }

.ticker-count {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ticker-now {
  font-size: 12.5px;
  color: rgba(217, 236, 255, 0.78);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------- main */

main {
  position: relative;
  z-index: 10;
  padding: 0 16px;
  pointer-events: none;
}

main > * { pointer-events: auto; }

/**
 * The caption.
 *
 * It sits under the ticker, in the flow, rather than floating over the globe.
 * A caption that floats is a caption that ends up on top of a paragraph, and
 * two pieces of text on top of each other is worse than either of them alone.
 */
.caption {
  margin-top: 10px;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: rgba(10, 16, 28, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(217, 236, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.caption[hidden] { display: none; }

.caption-where {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.caption-local {
  font-size: 13px;
  color: rgba(217, 236, 255, 0.8);
}

.controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.controls[hidden] { display: none; }

.clock {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: rgba(217, 236, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ the corners */

/**
 * **Two corners of the screen, and nothing else.**
 *
 * The footer was a whole band at the bottom of the page, which meant the page
 * was taller than the screen and there was a scrollbar and a visitor had to
 * scroll to find out who made it. It is now two small blocks in two corners of
 * the screen, fixed over the globe, and the page is exactly one screen tall.
 *
 * The one on the left asks the agent where Santa is. The one on the right says
 * who made it.
 */

.corner {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  z-index: 10;
  pointer-events: none;
  line-height: 1.45;
}

.corner > * { pointer-events: auto; }

.corner-left { left: 16px; }
.corner-right { right: 16px; text-align: right; }

/* The links. They are quiet until they are looked at. */

.corner a {
  color: rgba(217, 236, 255, 0.62);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-bottom-color 140ms ease;
}

.corner a:hover,
.corner a:focus-visible {
  color: #fff;
  border-bottom-color: rgba(217, 236, 255, 0.4);
}

/** The question about Santa. It is the one thing that asks to be clicked. */
.corner-link {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/** Who made it. */
.corner-made {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(217, 236, 255, 0.85);
}

.corner-made a { color: var(--pink-bright); }
.corner-made a:hover { color: #ffa8d4; }

/** And what it was made with, underneath. */
.corner-luros {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: rgba(217, 236, 255, 0.5);
}

/**
 * **The call with Santa.** The one thing in the corner that is meant to be
 * pressed, so it is big and pink and it has a red light on it like a camera.
 */
.corner a.call-santa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 34px -10px rgba(214, 51, 127, 0.85);
  transition: transform 140ms ease, background 140ms ease;
}

.corner a.call-santa:hover,
.corner a.call-santa:focus-visible {
  background: var(--pink-bright);
  color: #fff;
  border-bottom-color: transparent;
  transform: translateY(-1px);
}

.call-santa-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
  animation: call-santa-pulse 1.6s ease-in-out infinite;
}

@keyframes call-santa-pulse { 50% { opacity: 0.35; } }

/** The share, and the licence, such as it is. */
.corner-share {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 12.5px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(217, 236, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.4);
  color: rgba(217, 236, 255, 0.9);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.share-button:hover,
.share-button:focus-visible {
  border-color: rgba(217, 236, 255, 0.7);
  color: #fff;
}

.shareware {
  color: rgba(217, 236, 255, 0.55);
  font-style: italic;
  letter-spacing: 0.01em;
}

/** On a narrow phone the block is a little smaller, so it leaves the globe alone. */
@media (max-width: 420px) {
  .corner-right {
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
  }

  .corner a.call-santa { padding: 12px 20px; font-size: 15.5px; margin-bottom: 10px; }
  .corner-made { font-size: 12.5px; }
  .corner-luros { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .call-santa-dot { animation: none; }
}

/* --------------------------------------------------------------- snow & the rest */

.snow {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .snow { display: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* The screen reader's version of the globe. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------ once he has left */

/** **The countdown has nothing left to count**, so it leaves the middle of the globe. */
.big-countdown.is-gone,
.big-countdown:has(.is-gone) { display: none; }

/** **The simulated time, in UTC**, at the bottom of the screen in the middle. */
.sim-utc {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.88);
  border: 1px solid rgba(217, 236, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ------------------------------------------------------------ the map globe */

/**
 * **Space, behind the globe**: a scatter of stars drawn by the page, and a
 * deep blue glow where the Earth is.
 */
#globe {
  background:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 64%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 34%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 86%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 90%, #ffe8c4 50%, transparent 51%),
    radial-gradient(ellipse at 50% 45%, #0d1838 0%, var(--night) 70%);
  background-size: 220px 220px, 300px 300px, 260px 260px, 340px 340px, 180px 180px, 400px 400px, 280px 280px, 100% 100%;
}

#globe .maplibregl-canvas-container,
#globe .maplibregl-canvas { pointer-events: auto; }
#globe .maplibregl-canvas { outline: none; }
/* A keyboard user can see when the globe has the focus. */
#globe .maplibregl-canvas:focus-visible { outline: 3px solid var(--pink-bright); outline-offset: -4px; }
#globe .maplibregl-ctrl { pointer-events: auto; }

/* The credits, small and out of the way, above the safe area. */
#globe .maplibregl-ctrl-bottom-left { bottom: env(safe-area-inset-bottom); }
#globe .maplibregl-ctrl-attrib { font-size: 10.5px; }

/**
 * **Santa, his sleigh and his reindeer**, in 3D, the same size at every zoom,
 * over a gold glow that breathes, so a child can always find him.
 */
.santa-sprite {
  position: relative;
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.santa-sprite canvas { position: relative; width: 200px; height: 200px; }

/** **The presents**, tumbling out of the sleigh at every house. */
.santa-drops { position: absolute; left: 50%; top: 54%; width: 0; height: 0; }
.santa-drops i {
  position: absolute;
  left: -9px;
  top: 0;
  font-style: normal;
  font-size: 17px;
  line-height: 1;
  opacity: 0;
}
.santa-drops.is-dropping i { animation: present-fall 760ms cubic-bezier(0.4, 0, 0.8, 0.7) both; }
.santa-drops.is-dropping i:nth-child(1) { --x: -22px; --r: -70deg; }
.santa-drops.is-dropping i:nth-child(2) { --x: 2px; --r: 40deg; animation-delay: 90ms; }
.santa-drops.is-dropping i:nth-child(3) { --x: 24px; --r: 110deg; animation-delay: 170ms; }
@keyframes present-fall {
  0% { opacity: 0; transform: translate(0, -6px) scale(0.5) rotate(0deg); }
  18% { opacity: 1; transform: translate(calc(var(--x) * 0.3), 4px) scale(1) rotate(calc(var(--r) * 0.2)); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), 46px) scale(0.7) rotate(var(--r)); }
}

.santa-glow {
  position: absolute;
  inset: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 207, 92, 0.7), rgba(255, 207, 92, 0) 68%);
  animation: santa-breathe 1.8s ease-in-out infinite;
}
@keyframes santa-breathe { 50% { transform: scale(1.25); opacity: 0.55; } }

/** **The workshop**, at the Pole, with its label. Its lights go out when he leaves. */
.workshop-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}
.workshop-pin span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(10, 16, 32, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.workshop-pin.is-empty { opacity: 0.55; }

.controls .pill.small { padding: 7px 12px; font-size: 12.5px; }
.controls [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .santa-glow { animation: none; }
}

/** **Home again**: the words stay, and the clock goes, because there is nothing left to count. */
.big-countdown.is-home .big-countdown-clock { display: none; }
.big-countdown.is-home .big-countdown-label { color: var(--gold); font-size: 15px; }

/* ============================================================ the A+ pass */

[hidden] { display: none !important; }

h1.name { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }

/* ---------------------------------------------------------- the first second */

/**
 * **The page's own Earth.** Until the real one has loaded there is a soft blue
 * ball where it will be, so a slow connection sees a planet and not an empty
 * sky, and the real Earth fades in over it instead of arriving in pieces.
 */
#globe::before {
  content: "";
  position: absolute;
  left: var(--ball-x, 50%);
  top: var(--ball-y, 52%);
  width: var(--ball-size, min(74vw, 62vh));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #4a9be0 0%, #1d5aa8 45%, #0c2a5c 78%, #071a3d 100%);
  box-shadow: 0 0 70px rgba(90, 170, 255, 0.35), inset -18px -24px 50px rgba(0, 0, 20, 0.55);
  transition: opacity 900ms ease;
}
#globe .maplibregl-canvas { opacity: 0; transition: opacity 900ms ease; }
#globe.is-ready .maplibregl-canvas { opacity: 1; }
#globe.is-ready::before { opacity: 0; }
#globe.flat::before { display: none; }

/* ------------------------------------------------------- the sun and moon */

/**
 * **The sun and the moon sit underneath the map** (z-index -1 inside the
 * globe's own layer), so the Earth hides whichever is behind it. Placed by
 * sky-bodies.js; they fade in once the Earth is there and the whole globe is
 * in view.
 */
.sky-body {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 400ms ease;
}
#globe.is-ready.sky-bodies-on .sky-body { visibility: visible; }
.sky-sun { width: 130px; height: 130px; }
.sky-sun-core {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fffbe6 0%, #ffe680 38%, #ffc23a 72%, #ff9d1f 100%);
  box-shadow: 0 0 34px 12px rgba(255, 196, 60, 0.75), 0 0 90px 36px rgba(255, 170, 40, 0.35);
}
.sky-sun-rays {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 214, 102, 0.55) 0deg 9deg, transparent 9deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 40%, #000 62%, transparent 72%);
  mask: radial-gradient(circle, transparent 38%, #000 40%, #000 62%, transparent 72%);
  animation: sun-turn 40s linear infinite;
}
@keyframes sun-turn { to { transform: rotate(360deg); } }
.sky-moon {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(220, 230, 255, 0.35));
}
@media (prefers-reduced-motion: reduce) {
  .sky-sun-rays { animation: none; }
}
/* The credits stay out of sight until the Earth is there, so they never open
   across a phone while it loads. */
#globe:not(.is-ready) .maplibregl-ctrl-attrib { visibility: hidden; }

/* ------------------------------------------------------------- the panels */

/** Solid enough that the map's own names never show through the words. */
.ticker, .caption { background: rgba(10, 16, 28, 0.9); }
.controls .ghost { background: rgba(10, 16, 28, 0.9); }
.controls { flex-wrap: wrap; gap: 8px; }

.caption-eta {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pink-bright);
}

.top-actions .ghost { display: inline-flex; align-items: center; gap: 7px; }

/* ----------------------------------------------------------- the countdown */

.big-countdown-sleeps {
  margin: 0 0 6px;
  font-size: clamp(22px, 4.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.big-countdown-sleeps:empty { display: none; }

.big-countdown-eta {
  margin: 10px auto 0;
  max-width: 30rem;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--pink-bright);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}
.big-countdown-eta:empty { display: none; }

.big-countdown-label, .big-countdown-note, .workshop-note { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85); }

/**
 * **Folded away while somebody explores.** Once the globe has been taken, the
 * countdown becomes a small pill at the top, so it is never on top of the
 * street a child has just zoomed in to see.
 */
body[data-explore="1"] #big-countdown {
  padding: 0;
  background: none;
}
body[data-explore="1"] #big-countdown [data-big] {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.9);
  border: 1px solid rgba(217, 236, 255, 0.16);
}
body[data-explore="1"] .big-countdown-sleeps,
body[data-explore="1"] .big-countdown-note,
body[data-explore="1"] .big-countdown-eta,
body[data-explore="1"] .workshop-note,
body[data-explore="1"] .big-countdown-unit-label { display: none; }
body[data-explore="1"] .big-countdown-label { margin: 0; font-size: 11px; letter-spacing: 0.08em; }
body[data-explore="1"] .big-countdown-clock { gap: 6px; }
body[data-explore="1"] .big-countdown-digits { font-size: 17px; }
body[data-explore="1"] .big-countdown-digit { padding: 2px 3px; border-radius: 4px; }
@media (min-width: 1001px) {
  body[data-explore="1"] #big-countdown {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
  }
}
@media (max-width: 1000px) {
  body[data-explore="1"] #big-countdown { margin-top: 4px; text-align: left; }
  body[data-explore="1"] .big-countdown-label { display: none; }
}

/* ----------------------------------------------------- back, and the hint */

.recenter {
  position: fixed;
  left: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 52px);
  z-index: 12;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  box-shadow: 0 10px 28px -8px rgba(214, 51, 127, 0.8);
}

.hint {
  position: fixed;
  left: 50%;
  top: 64%;
  z-index: 9;
  margin: 0;
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.82);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  animation: hint-in 600ms 1600ms both;
  transition: opacity 500ms ease;
}
.hint.is-done { opacity: 0 !important; animation: none; }
.hint-hand { display: inline-block; animation: hint-swipe 1.6s ease-in-out infinite; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes hint-swipe { 0%, 100% { transform: translateX(-9px) rotate(-12deg); } 50% { transform: translateX(9px) rotate(12deg); } }

/* ------------------------------------------------------------ the moments */

.moment {
  position: fixed;
  left: 50%;
  top: 24%;
  z-index: 50;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: min(92vw, 34rem);
  padding: 18px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #d6337f, #ff7a3d);
  color: #fff;
  font-size: clamp(19px, 4.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  box-shadow: 0 24px 60px -12px rgba(214, 51, 127, 0.8), 0 0 0 4px rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.moment.is-showing { animation: moment-in 520ms cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.moment.is-leaving { animation: moment-out 420ms ease both; }
.moment-emoji { font-size: 1.9em; line-height: 1; animation: moment-bob 900ms ease-in-out infinite; }
@keyframes moment-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } }
@keyframes moment-out { to { opacity: 0; transform: translate(-50%, -70%) scale(0.92); } }
@keyframes moment-bob { 50% { transform: translateY(-6px) rotate(-8deg); } }

.confetti { position: fixed; inset: 0; z-index: 49; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -24px;
  border-radius: 2px;
  animation: confetti-fall linear both;
}
@keyframes confetti-fall {
  to { transform: translate(var(--drift), 108vh) rotate(var(--spin)); opacity: 0.9; }
}

.elf-bubble {
  position: fixed;
  left: 50%;
  top: 44%;
  z-index: 40;
  transform: translateX(-50%);
  max-width: min(88vw, 24rem);
  padding: 13px 18px;
  border-radius: 20px;
  background: #fff;
  color: #2a1d2e;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 18px 44px -10px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.elf-bubble.is-showing { animation: moment-in 420ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.elf-bubble.is-showing { transform: translate(-50%, -50%); }

/* ------------------------------------------------- the things on the globe */

.workshop-pin { pointer-events: auto; cursor: pointer; }
.workshop-pin:focus-visible { outline: 3px solid var(--pink-bright); outline-offset: 4px; border-radius: 10px; }
.workshop-pin svg rect[fill="#ffd65c"] { animation: window-twinkle 2.4s ease-in-out infinite; }
.workshop-pin svg rect[fill="#ffd65c"]:last-of-type { animation-delay: 1.1s; }
.workshop-pin.is-knocked svg { animation: workshop-knock 600ms ease; }
.workshop-pin.is-empty .workshop-label { display: none; }
.workshop-pin.is-empty svg { width: 28px; height: 28px; }
.workshop-zzz { display: none; position: absolute; left: 70%; top: -14px; color: #fff; font-weight: 800; font-size: 13px; }
.workshop-zzz i, .workshop-zzz b { font-style: normal; font-size: 1.25em; }
.workshop-zzz b { font-size: 1.6em; }
.workshop-pin.is-asleep { opacity: 1; }
.workshop-pin.is-asleep .workshop-label { display: inline; }
.workshop-pin.is-asleep .workshop-zzz { display: block; animation: zzz 2.6s ease-in-out infinite; }
@keyframes window-twinkle { 50% { opacity: 0.45; } }
@keyframes workshop-knock { 20% { transform: rotate(-9deg) scale(1.15); } 50% { transform: rotate(8deg) scale(1.2); } 80% { transform: rotate(-4deg); } }
@keyframes zzz { 0% { transform: translate(0, 4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(10px, -14px); opacity: 0; } }

/** **The house he is at**, and the present going down its chimney. */
.delivery-pin { pointer-events: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6)); }
.delivery-gift { position: absolute; left: 50%; top: -34px; font-size: 20px; transform: translateX(-50%); opacity: 0; }
.delivery-pin.is-dropping .delivery-gift { animation: gift-drop 900ms cubic-bezier(0.5, 0, 0.8, 0.6) both; }
.delivery-pin.is-dropping svg { animation: house-pop 700ms 600ms ease both; }
.delivery-pin.is-dropping .delivery-window { animation: window-on 900ms 700ms ease both; }
@keyframes gift-drop { 0% { opacity: 0; transform: translate(-50%, -26px) rotate(-20deg); } 25% { opacity: 1; } 85% { opacity: 1; transform: translate(-50%, 26px) rotate(10deg) scale(0.8); } 100% { opacity: 0; transform: translate(-50%, 34px) scale(0.3); } }
@keyframes house-pop { 30% { transform: scale(1.22); } 60% { transform: scale(0.96); } }
@keyframes window-on { 0% { fill: #8b5a3c; } 100% { fill: #ffd65c; } }

/** **The family's own town.** */
.home-pin { display: flex; flex-direction: column; align-items: center; pointer-events: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6)); }
.home-pin-dot { font-size: 30px; line-height: 1; animation: home-bob 2.2s ease-in-out infinite; }
.home-pin-label { margin-top: 2px; padding: 3px 10px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
@keyframes home-bob { 50% { transform: translateY(-5px); } }

/* -------------------------------------------------------------- the corner */

.corner-share { flex-wrap: wrap; gap: 8px; }
.share-button { min-height: 36px; }
.corner-made .shareware { font-style: italic; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(217, 236, 255, 0.85);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover, .link-button:focus-visible { color: #fff; }

/** **Fingers, not mouse pointers**: everything that can be tapped is big enough to tap. */
@media (pointer: coarse) {
  .ghost, .share-button, .recenter { min-height: 44px; }
  .ghost.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .link-button { padding: 8px 2px; }
  .corner-made a, .corner-luros a { padding: 6px 0; display: inline-block; }
}

@media (max-width: 520px) {
  /* The words go, the name stays: a button with only an icon still says what it is. */
  #find span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  #find { padding-inline: 12px; }
}

/* -------------------------------------------------------------- the sheets */

.sheet-dialog {
  width: min(92vw, 27rem);
  max-height: min(88dvh, 44rem);
  padding: 22px 22px 18px;
  border: 1px solid rgba(217, 236, 255, 0.16);
  border-radius: 22px;
  background: #121829;
  color: var(--frost);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  overflow: auto;
  touch-action: pan-y;
}
.sheet-dialog.sheet-wide { width: min(94vw, 44rem); }
.sheet-dialog::backdrop { background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(3px); }
.sheet-dialog h2 { margin: 0 34px 6px 0; font-size: 24px; letter-spacing: -0.03em; color: #fff; }
.sheet-lede { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: rgba(217, 236, 255, 0.78); }
.sheet-small { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(217, 236, 255, 0.6); }
.sheet-close { position: absolute; top: 10px; right: 10px; margin: 0; }
.sheet-close button {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.sheet-close button:hover { background: rgba(255, 255, 255, 0.16); }
.sheet-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(217, 236, 255, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 17px;
}
.sheet-input:focus { outline: none; border-color: var(--pink-bright); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sheet-actions .pill, .sheet-actions .ghost { min-height: 44px; padding: 0 18px; font-size: 15px; }

.find-results { list-style: none; margin: 10px 0 0; padding: 0; }
.find-results button {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
.find-results button:hover, .find-results button:focus-visible { background: rgba(214, 51, 127, 0.3); outline: none; }
.find-none { padding: 12px 14px; color: rgba(217, 236, 255, 0.7); }

.certificate-canvas { display: block; width: 100%; height: auto; margin-top: 14px; border-radius: 10px; background: #fffaf0; }

.grownups-list { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 14.5px; line-height: 1.55; color: rgba(217, 236, 255, 0.82); }
.grownups-list li { margin-bottom: 10px; }
.grownups-list strong { color: #fff; }
.grownups-list a { color: var(--pink-bright); }

/* Printing the certificate prints the certificate, and nothing else. */
@media print {
  body.is-printing-certificate > *:not(#certificate-dialog) { display: none !important; }
  body.is-printing-certificate #certificate-dialog { position: static; width: 100%; max-height: none; border: 0; background: #fff; box-shadow: none; padding: 0; }
  body.is-printing-certificate #certificate-dialog > *:not(canvas) { display: none !important; }
  body.is-printing-certificate .certificate-canvas { margin: 0; border-radius: 0; }
}

/* ------------------------------------------------------- phones on their side */

/**
 * **A phone held sideways** has no height to spare, so the countdown is always
 * the small pill, the panels are narrow, and the credits go.
 */
@media (max-height: 520px) and (orientation: landscape) {
  .ticker, .caption, .controls { max-width: 17rem; }
  .ticker { flex-wrap: wrap; row-gap: 0; padding: 7px 12px; }
  .ticker-now { display: none; }
  .caption { padding-block: 7px; }
  .corner-made, .corner-luros { display: none; }
  .corner a.call-santa { padding: 10px 18px; font-size: 15px; margin-bottom: 6px; }
  .big-countdown-note, .workshop-note, .big-countdown-unit-label { display: none; }
  /* The countdown goes on the left, like on a wide screen. */
  #big-countdown {
    position: absolute;
    left: 16px;
    top: 64px;
    transform: none;
    width: 15.5rem;
    margin: 0;
    padding: 0;
    background: none;
    text-align: left;
  }
  .big-countdown-sleeps { font-size: 19px; }
  .big-countdown-label { margin: 0 0 4px; font-size: 10px; }
  .big-countdown-clock { justify-content: flex-start; gap: 6px; }
  .big-countdown-digits { font-size: 24px; }
  .big-countdown-eta { font-size: 12.5px; margin-top: 6px; }
  .hint { top: 80%; }
}

/* ------------------------------------------------------------- big screens */

/**
 * **A television across the room.** On a big screen everything that is read
 * is made bigger, because twelve-pixel text is not text from three metres.
 */
@media (min-width: 1600px) {
  .ticker, .caption, .controls { max-width: 40rem; }
  .ticker { padding: 16px 22px; gap: 14px; }
  .ticker-label { font-size: 16px; }
  .ticker-count { font-size: 34px; }
  .ticker-now { font-size: 18px; }
  .caption { padding: 16px 22px; }
  .caption-where { font-size: 32px; }
  .caption-local { font-size: 19px; }
  .caption-eta { font-size: 19px; }
  .ghost { font-size: 17px; padding: 12px 20px; }
  .ghost.small, .sim-utc { font-size: 17px; padding: 10px 16px; }
  .brand .name { font-size: 22px; }
  .corner a.call-santa { font-size: 24px; padding: 20px 34px; }
  .share-button { font-size: 16px; min-height: 44px; padding: 0 16px; }
  .corner-made, .corner-luros { font-size: 16px; }
  .big-countdown-label { font-size: 18px; }
  .big-countdown-note, .workshop-note, .big-countdown-eta { font-size: 19px; max-width: 40rem; }
  .big-countdown-unit-label { font-size: 14px; }
  /* The marker itself is placed by the map, so it is the picture inside that grows. */
  .santa-sprite canvas { transform: scale(1.35); }
  .recenter { font-size: 19px; min-height: 54px; padding: 0 24px; }
  .moment { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint-hand, .moment-emoji, .home-pin-dot, .workshop-pin svg rect, .workshop-zzz,
  .delivery-pin.is-dropping .delivery-gift, .delivery-pin.is-dropping svg, .santa-drops.is-dropping i { animation: none !important; }
  #globe .maplibregl-canvas, #globe::before { transition: none; }
}

/* ------------------------------------------- where the countdown lives now */

/**
 * **On a wide screen the countdown is on the left, and the globe has the rest.**
 * It used to float in the middle of the Earth, where the names of countries
 * showed through it and it covered whatever anybody was looking at.
 */
@media (min-width: 1001px) {
  body:not([data-explore="1"]) #big-countdown {
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: min(25rem, 30vw);
    max-width: none;
    padding: 0;
    background: none;
    text-align: left;
  }
  body:not([data-explore="1"]) #big-countdown [data-big] {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    padding: 22px 24px;
    border-radius: 22px;
    background: rgba(10, 16, 28, 0.82);
    border: 1px solid rgba(217, 236, 255, 0.12);
    backdrop-filter: blur(10px);
    text-align: left;
  }
  body:not([data-explore="1"]) .big-countdown-clock { justify-content: flex-start; gap: 12px; }
  body:not([data-explore="1"]) .big-countdown-digits { font-size: clamp(30px, 3vw, 46px); }
  body:not([data-explore="1"]) .big-countdown-clock { flex-wrap: nowrap; }
  body:not([data-explore="1"]) .big-countdown-note,
  body:not([data-explore="1"]) .workshop-note,
  body:not([data-explore="1"]) .big-countdown-eta { margin-left: 0; margin-right: 0; text-align: left; }
}

/**
 * **A phone has no room for a paragraph and a planet.** On a short screen the
 * note goes, because the hint on the globe says the same thing, and the
 * credits are small, one line each.
 */
@media (max-width: 1000px) {
  .big-countdown-sleeps { margin-bottom: 2px; }
  .big-countdown-eta { margin-top: 6px; font-size: 13.5px; }
  /* Each credit on a line of its own. */
  .corner-made, .corner-luros { display: block; font-size: 11.5px; margin: 0; }
  .corner a.call-santa { margin-bottom: 8px; }
  .corner-share { margin-bottom: 4px; }
}
@media (max-width: 1000px) and (max-height: 900px) {
  .workshop-note { display: none; }
}
@media (max-width: 1000px) and (max-height: 700px) {
  .big-countdown-sleeps { font-size: 20px; }
  .big-countdown-digits { font-size: 30px; }
  .corner a.call-santa { padding: 10px 18px; font-size: 15px; }
  .share-button { min-height: 38px; font-size: 12px; }
}

/**
 * **On a phone the way back is in the top bar**, next to the search: a round
 * button with Santa (or the Earth) on it. Its words are kept for a screen
 * reader. On a wide screen it stays a labelled pill, bottom left.
 */
.recenter { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1000px) {
  .recenter {
    position: static;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    justify-content: center;
    font-size: 21px;
    box-shadow: 0 6px 18px -6px rgba(214, 51, 127, 0.9);
    animation: recenter-in 320ms cubic-bezier(0.2, 1.5, 0.4, 1) both;
  }
  #recenter-words { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .top-actions { gap: 8px; }
}
@keyframes recenter-in { from { transform: scale(0.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .recenter { animation: none; } }
