body:is([data-page="welcome"],[data-page="home"],[data-page="mood"]) {
  margin: 0;
  color: #fcf1e3;
  background: #0b102b;
}
body:is([data-page="welcome"],[data-page="home"],[data-page="mood"]) #app {
  display: grid;
  min-width: 0;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.night-artframe {
  position: relative;
  margin: 0 auto;
  isolation: isolate;
  max-width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.night-artimage {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  -webkit-user-drag: none;
  user-select: none;
}
.night-artframe { width:100%; }
.night-artframe .art-hit {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 11px;
  margin: 0;
  padding: 0;
  min-height: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
}
.night-artframe .art-hit:focus-visible {
  outline: 2px solid #ffe7b5;
  outline-offset: -2px;
}
.art-login .art-hit, .art-mood [data-act="night:saveMood"] {border-radius:999px}
.art-readonly {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  margin:0;
  padding:0;
  border:0;
}
.night-live-date {
  position: absolute;
  display: flex;
  align-items: center;
  left: 8.9%;
  top: 23.85%;
  width: 18.4%;
  height: 3.3%;
  padding-left: .88%;
  line-height: 1;
  white-space: nowrap;
  color: #abb0c9;
  font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif;
  font-weight: 400;
  font-size: 4.05cqw;
  background-image: url("media/night-home.jpg");
  background-size: 543.48% 3030.3%;
  background-position: 10.91% 22%;
  pointer-events: none;
}
.art-mood .night-mood-choice {
  position: absolute;
  display: block;
  appearance: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
}
.night-quiet-sky {
  position: absolute;
  inset: 54% 0 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 98% 42%, #211743, transparent 70%),
    linear-gradient(120deg, #12132e, #13112e);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%);
  mask-image: linear-gradient(to bottom, transparent, black 5%);
}
.night-quiet-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  /* A clean patch of the same star field, below the mascot on the chat plate. */
  background: url("media/chat-night.png") center 84% / auto 500% no-repeat;
  opacity: .48;
}
.art-mood.is-other .night-quiet-sky,
.night-other-fields[hidden] {
  display: none;
}
.night-mood-hint {
  position: absolute;
  display: grid;
  place-items: center;
  margin: 0;
  color: #bcafce;
  background: linear-gradient(100deg, #111432, #111330 55%, #11122e);
  font: 400 3.55cqw/1.4 "PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  white-space: nowrap;
  pointer-events: none;
  mask-image: linear-gradient(to right,transparent,#000 12%,#000 88%,transparent);
}
.night-saved-mood {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(115deg, #ffa45e, #f77c28 64%, #e26312);
  box-shadow: inset 0 1px 4px #ffcf97b0;
  color: #4b200f;
  font: 550 4.2cqw/1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
.night-mood-ring {
  position: absolute;
  left: 6.25%;
  top: 4.67%;
  width: 87.5%;
  height: 65.42%;
  border: 1.5px solid transparent;
  border-radius: 50%;
  pointer-events: none;
}
.night-mood-choice[aria-pressed="true"] .night-mood-ring {
  border-color: #ffdfae;
  box-shadow: 0 0 0 1px #eebc8650, 0 0 10px #ffd5a24d;
}
.night-mood-choice:focus-visible .night-mood-ring {
  outline: 2px dotted #fff8ef;
  outline-offset: 2px;
}
.night-note-touch, .night-note-mask, .night-note {position:absolute}
.night-note-touch {cursor:text}
.night-note-mask {
  display: none;
  pointer-events: none;
  /* Cover the printed prompt with the texture immediately below it. */
  background: url("media/night-mood.png") 38.06% 74.03% / 135.80% 2943.86% no-repeat;
}
.art-mood.is-other .night-note-mask {display:block}
.night-artframe .night-note {
  min-height: 0;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  resize: none;
  color: #fff5e9;
  caret-color: #fff5e9;
  font: 400 16px/1.45 "PingFang SC",system-ui,sans-serif;
  font-size: max(16px,3.3cqw);
}
.night-note:focus-visible {outline:1px solid #fcdfbd55;outline-offset:3px}
.night-note::placeholder {color:#c5bed3;opacity:1}

.night-mood-choice[aria-pressed="true"] .night-mood-ring::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #ffdfae;
  border-radius: 50%;
  opacity: 0;
  animation: mood-select-pulse 550ms ease-out;
}
@keyframes mood-select-pulse {
  from { opacity: .9; transform: scale(.94); }
  to   { opacity: 0; transform: scale(1.25); }
}

.mood-delivery {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  isolation: isolate;
}
.mood-delivery::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 25%, #101831bd 0%, #0a0d24eb 55%, #101025f2 100%);
  animation: mood-sky-dim 220ms ease-out both;
}
@keyframes mood-sky-dim {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mood-flight {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  transform-origin: center;
  filter: drop-shadow(0 0 7px #ffe4bf99);
  transform: translate(calc(-50% + var(--flight-x)), calc(-50% + var(--flight-y))) scale(.12);
  animation: mood-orb-flight 1560ms both;
}
.mood-flight .mood-orb-replica {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background-image: url("media/night-mood.png");
  background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, black 84%, transparent 100%);
  mask-image: radial-gradient(closest-side, black 84%, transparent 100%);
}
@keyframes mood-orb-flight {
  0% {
    transform: translate(-50%, -50%) scale(1);
    animation-timing-function: ease-out;
  }
  13% {
    transform: translate(-50%, calc(-50% - 3px)) scale(1.06);
    animation-timing-function: cubic-bezier(.42,0,.22,1);
  }
  83%, 100% {
    transform: translate(calc(-50% + var(--flight-x)), calc(-50% + var(--flight-y))) scale(.12);
  }
}

.mood-arrival {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fffbee 0 5%, #ffddadbd 10%, #e4b6e44d 28%, transparent 70%);
  filter: drop-shadow(0 0 5px #fbd5eb);
  animation: mood-starlight 620ms 1010ms both;
}
.mood-arrival::before,
.mood-arrival::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #fff8e4 0 8%, #fff1cd 20%, transparent 70%);
  transform: scale(.13, 1);
}
.mood-arrival::after { transform: scale(.86, .13); }
@keyframes mood-starlight {
  0%  { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  57% { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
  to  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.mood-receipt {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 52%;
  width: 91%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: #fff1dc;
  text-align: center;
  font: 500 clamp(16px, 4.5cqw, 24px)/1.55 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: .045em;
  text-shadow: 0 2px 10px #090a20;
  animation: mood-receipt-appear 380ms 620ms ease-out both;
  outline: 0;
}
@keyframes mood-receipt-appear {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 5px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .night-mood-choice[aria-pressed="true"] .night-mood-ring::after,
  .mood-delivery::before, .mood-flight, .mood-arrival, .mood-receipt {
    animation: none !important;
  }
}
