:root {
  color-scheme: light;
  --ink: #263f58;
  --muted: #70879c;
  --soft: rgba(255, 255, 255, 0.76);
  --strong: rgba(255, 255, 255, 0.92);
  --line: rgba(91, 156, 184, 0.24);
  --a: #62b8c7;
  --b: #ffe08a;
  --c: #dff6ef;
  --sky-1: #dff6ff;
  --sky-2: #f6fcff;
  --sky-3: #fff5df;
  --shadow: 0 20px 54px rgba(69, 122, 150, 0.2);
  --tight-shadow: 0 12px 30px rgba(69, 122, 150, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 52%, var(--sky-3));
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  transition: background 520ms ease;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body[data-weather="sunny"] {
  --a: #5aaed0;
  --b: #ffd96b;
  --c: #fff1ba;
  --sky-1: #d9f4ff;
  --sky-3: #fff0bf;
}

body[data-weather="breeze"] {
  --a: #5fb9ad;
  --b: #ffe2a1;
  --c: #d8f5ea;
  --sky-1: #e0f9f1;
  --sky-3: #fff7df;
}

body[data-weather="cloudy"] {
  --a: #7daec8;
  --b: #e7eff8;
  --c: #f4f8fb;
  --sky-1: #e5f4fb;
  --sky-3: #fbfdff;
}

body[data-weather="afterrain"] {
  --a: #59b4b4;
  --b: #d9f4ff;
  --c: #e4f8ef;
  --sky-1: #daf7f7;
  --sky-3: #fff6de;
}

body[data-weather="starlight"] {
  --a: #808be0;
  --b: #ffe0a8;
  --c: #e8e4ff;
  --sky-1: #e5e8ff;
  --sky-3: #fff0d8;
}

.ambient-sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.95), transparent 24%),
    radial-gradient(circle at 88% 16%, color-mix(in srgb, var(--b) 50%, transparent), transparent 25%),
    radial-gradient(circle at 44% 86%, color-mix(in srgb, var(--c) 62%, transparent), transparent 28%);
}

.sun-wash {
  position: absolute;
  width: 340px;
  height: 340px;
  top: -120px;
  right: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 225, 120, 0.4), transparent 66%);
  filter: blur(8px);
}

.ambient-cloud {
  position: absolute;
  width: 160px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--tight-shadow);
  animation: cloudDrift 26s ease-in-out infinite;
}

.ambient-cloud::before,
.ambient-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.ambient-cloud::before {
  width: 78px;
  height: 78px;
  left: 24px;
  top: -34px;
}

.ambient-cloud::after {
  width: 94px;
  height: 94px;
  right: 20px;
  top: -44px;
}

.cloud-one {
  top: 16%;
  left: -44px;
}

.cloud-two {
  top: 62%;
  right: -60px;
  scale: 0.72;
  animation-duration: 33s;
}

.cloud-three {
  bottom: 4%;
  left: 28%;
  scale: 0.56;
  opacity: 0.72;
  animation-duration: 39s;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 20px, 1120px);
  margin: 0 auto;
  padding: 14px 0 38px;
}

.hero-card,
.weather-stage,
.note-lab,
.wish-dock {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  min-height: 560px;
  padding: 18px;
}

.top-line,
.section-head,
.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-pill,
.today-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: color-mix(in srgb, var(--a) 75%, #1d5362);
  font-size: 14px;
  font-weight: 800;
}

.brand-dot {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--c) 80%, #ffffff));
  box-shadow: 0 10px 24px rgba(59, 132, 160, 0.16);
}

.today-pill {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-layout {
  display: grid;
  min-height: 484px;
  align-items: end;
  gap: 24px;
}

.portrait-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 16px;
}

.portrait-button {
  position: relative;
  width: min(68vw, 255px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--b) 36%, #ffffff));
  box-shadow: 0 18px 46px rgba(71, 136, 164, 0.24);
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 260ms ease;
}

.portrait-button:active {
  transform: scale(0.985);
}

.portrait-button::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: scale(0.9);
}

.portrait-button.is-blooming {
  animation: portraitBloom 980ms cubic-bezier(0.2, 0.8, 0.22, 1) both;
}

.portrait-button.is-blooming::before {
  animation: bloomRing 980ms ease-out forwards;
}

.portrait-button img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.86);
}

.portrait-glow {
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 120deg, transparent, color-mix(in srgb, var(--b) 68%, transparent), transparent, color-mix(in srgb, var(--a) 54%, transparent), transparent);
  filter: blur(12px);
  animation: slowTurn 7s linear infinite;
}

.tap-bubble {
  max-width: 260px;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--tight-shadow);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.tap-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tap-puff {
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  animation: puffAway 900ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.tap-petal,
.tap-spark {
  position: absolute;
  pointer-events: none;
  animation-delay: var(--delay, 0ms);
}

.tap-petal {
  width: 12px;
  height: 20px;
  border-radius: 999px 999px 999px 2px;
  background: linear-gradient(160deg, #ffe99e, #ffd0dc 62%, #ffffff);
  box-shadow: 0 8px 20px rgba(224, 147, 93, 0.16);
  animation: petalAway 980ms cubic-bezier(0.18, 0.82, 0.28, 1) forwards;
}

.tap-spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff3a8;
  box-shadow: 0 0 18px rgba(255, 204, 88, 0.72);
  animation: sparkAway 840ms ease-out forwards;
}

.hero-copy {
  padding: 6px 2px 0;
}

.eyebrow {
  margin: 0 0 9px;
  color: color-mix(in srgb, var(--a) 70%, #155b6f);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(34px, 10vw, 60px);
  line-height: 1.08;
}

h2 {
  color: #29425a;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.18;
}

.lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.weather-stage {
  position: relative;
  min-height: 420px;
  margin-top: 14px;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--b) 34%, transparent), transparent 25%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.76), color-mix(in srgb, var(--c) 58%, transparent));
}

.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  opacity: 0;
  animation: particleFloat var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.particle.sun {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd45d;
  box-shadow: 0 0 22px rgba(255, 197, 74, 0.55);
}

.particle.breeze {
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a) 45%, transparent);
}

.particle.cloud {
  width: 44px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.particle.rain {
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: rgba(98, 176, 195, 0.48);
}

.particle.star {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 233, 165, 0.9);
  box-shadow: 0 0 18px rgba(133, 141, 228, 0.55);
}

.stage-card {
  position: relative;
  min-height: 260px;
  display: grid;
  align-content: center;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--tight-shadow);
}

.stage-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

#today-weather {
  margin-top: 8px;
  color: color-mix(in srgb, var(--a) 72%, #245069);
  font-size: clamp(46px, 14vw, 78px);
  line-height: 1;
}

#weather-message {
  max-width: 560px;
  margin: 20px 0 0;
  color: #39546e;
  font-size: 18px;
  line-height: 1.9;
}

.real-weather {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 22px;
}

.sync-weather {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--a) 34%, transparent);
  border-radius: 999px;
  color: #19596a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--c) 82%, #ffffff));
  box-shadow: 0 10px 22px rgba(77, 132, 160, 0.1);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  transition: transform 180ms ease, opacity 180ms ease;
}

.sync-weather:active {
  transform: translateY(1px) scale(0.99);
}

.sync-weather:disabled {
  cursor: progress;
  opacity: 0.72;
}

.sync-weather.is-loading {
  animation: weatherButtonPulse 900ms ease-in-out infinite;
}

.weather-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.weather-ribbon {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.weather-chip,
.draw-note,
.release-button {
  border: 1px solid rgba(91, 156, 184, 0.24);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(77, 132, 160, 0.1);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.weather-chip {
  min-width: 86px;
  min-height: 48px;
  scroll-snap-align: center;
}

.weather-chip:active,
.draw-note:active {
  transform: translateY(1px) scale(0.99);
}

.weather-chip.is-active {
  color: #175969;
  border-color: color-mix(in srgb, var(--a) 52%, transparent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--c) 88%, #ffffff));
}

.note-lab,
.wish-dock {
  margin-top: 14px;
  padding: 18px;
}

.draw-note {
  min-width: 82px;
  min-height: 42px;
  padding: 0 16px;
  color: color-mix(in srgb, var(--a) 72%, #155b6f);
  font-weight: 800;
}

.draw-hint {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.draw-stage {
  position: relative;
  height: 126px;
  margin-top: 18px;
  perspective: 860px;
  pointer-events: none;
  overflow: visible;
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 22px;
  width: min(48vw, 178px);
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--b) 24%, #ffffff)),
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--a) 24%, transparent), transparent 28%);
  box-shadow: 0 14px 28px rgba(77, 132, 160, 0.13);
  opacity: 0.72;
  transform-origin: 50% 86%;
}

.deck-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed color-mix(in srgb, var(--a) 24%, transparent);
  border-radius: 6px;
}

.draw-glow {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 190px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--b) 42%, transparent), transparent 70%);
  filter: blur(10px);
  opacity: 0.52;
  transform: translateX(-50%);
}

.deck-a {
  transform: translateX(-52%) rotate(-8deg);
}

.deck-b {
  transform: translateX(-48%) translateY(6px) rotate(5deg);
}

.deck-c {
  transform: translateX(-50%) translateY(12px) rotate(0deg);
}

.draw-stage.is-shuffling .deck-a {
  animation: deckFlyLeft 680ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.draw-stage.is-shuffling .deck-b {
  animation: deckFlyRight 680ms 70ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.draw-stage.is-shuffling .deck-c {
  animation: deckLift 720ms 120ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.draw-stage.is-shuffling .draw-glow {
  animation: drawGlow 900ms ease-out both;
}

.fortune-spark,
.fortune-ribbon {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  animation-delay: var(--delay, 0ms);
}

.fortune-spark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff2a4;
  box-shadow: 0 0 18px rgba(255, 207, 90, 0.72);
  animation: fortuneSpark 980ms cubic-bezier(0.17, 0.78, 0.28, 1) forwards;
}

.fortune-ribbon {
  width: 9px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff5b8, #9de2dc);
  box-shadow: 0 10px 18px rgba(74, 150, 161, 0.14);
  animation: fortuneRibbon 1120ms cubic-bezier(0.17, 0.78, 0.28, 1) forwards;
}

.note-card {
  position: relative;
  display: grid;
  min-height: 318px;
  align-content: center;
  justify-items: center;
  margin-top: 0;
  padding: 30px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), color-mix(in srgb, var(--b) 18%, #ffffff)),
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--c) 54%, transparent), transparent 30%);
  box-shadow: var(--tight-shadow);
  transition: transform 260ms ease, opacity 220ms ease;
  text-align: center;
}

.note-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 16%, rgba(255, 255, 255, 0.72) 42%, transparent 66%);
  opacity: 0;
  transform: translateX(-100%);
}

.note-card.is-changing {
  opacity: 0;
  transform: translateY(10px) scale(0.99);
}

.note-card.is-drawing {
  animation: noteDeal 780ms cubic-bezier(0.2, 0.84, 0.26, 1) both;
}

.note-card.is-drawing::before {
  animation: cardShine 760ms ease-out both;
}

.note-card.is-revealed {
  animation: fortuneReveal 560ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.fortune-kicker {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--a) 28%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--a) 76%, #155b6f);
  background: rgba(255, 255, 255, 0.72);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.note-card h3 {
  max-width: 360px;
  margin: 18px 0 0;
  color: #29425a;
  font-size: clamp(25px, 7.2vw, 34px);
  line-height: 1.18;
}

.note-card p {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 2;
}

.fortune-seal {
  display: inline-grid;
  min-width: 116px;
  min-height: 38px;
  place-items: center;
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--a) 36%, transparent);
  border-radius: 999px;
  color: #1e6a75;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), color-mix(in srgb, var(--c) 74%, #ffffff));
  box-shadow: 0 12px 24px rgba(74, 150, 161, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.note-orbits {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 12px;
}

.orbit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(94, 151, 178, 0.22);
}

.orbit-dot.is-active {
  background: color-mix(in srgb, var(--a) 70%, #ffffff);
}

.wish-form {
  margin-top: 18px;
}

.wish-form textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid rgba(91, 156, 184, 0.25);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  line-height: 1.75;
  outline: none;
}

.wish-form textarea:focus {
  border-color: color-mix(in srgb, var(--a) 58%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent);
}

.release-row {
  margin-top: 12px;
}

.char-count,
.form-note {
  color: var(--muted);
  font-size: 13px;
}

.release-button {
  --hold: 0%;
  position: relative;
  min-width: 126px;
  min-height: 48px;
  overflow: hidden;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 86%, #4fc2d4), #5aaec2);
  box-shadow: 0 16px 30px rgba(53, 141, 162, 0.24);
  touch-action: none;
}

.release-button.is-holding {
  animation: holdGlow 900ms ease-in-out infinite;
}

.release-button.is-sending {
  filter: saturate(1.08);
}

.release-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--hold);
  background: rgba(255, 232, 157, 0.42);
  transition: width 80ms linear;
}

.release-text {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.form-note {
  min-height: 23px;
  margin: 10px 0 0;
}

.wish-sky {
  position: relative;
  min-height: 320px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px dashed rgba(91, 156, 184, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.86), transparent 23%),
    linear-gradient(180deg, color-mix(in srgb, var(--sky-1) 82%, #ffffff), rgba(255, 249, 232, 0.72));
}

.wish-comet {
  position: absolute;
  left: var(--start-x, 36%);
  bottom: 22px;
  z-index: 4;
  display: grid;
  min-width: 94px;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #386072;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(68, 137, 159, 0.22);
  animation: cometFly 1200ms cubic-bezier(0.2, 0.8, 0.24, 1) forwards;
}

.wish-comet::before,
.wish-comet::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: inherit;
}

.wish-comet::before {
  width: 42px;
  height: 42px;
  left: 12px;
  top: -20px;
}

.wish-comet::after {
  width: 50px;
  height: 50px;
  right: 12px;
  top: -24px;
}

.wish-comet span {
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.empty-sky {
  max-width: 260px;
  margin: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.wish-cloud {
  position: absolute;
  display: grid;
  min-width: 104px;
  min-height: 54px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #42677b;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 26px rgba(79, 129, 158, 0.16);
  animation: wishFloat 7s ease-in-out infinite;
}

.wish-cloud.is-new {
  animation: launchCloud 900ms ease-out 1, wishFloat 7s ease-in-out 900ms infinite;
}

.wish-cloud::before,
.wish-cloud::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: inherit;
}

.wish-cloud::before {
  width: 46px;
  height: 46px;
  left: 18px;
  top: -22px;
}

.wish-cloud::after {
  width: 58px;
  height: 58px;
  right: 18px;
  top: -28px;
}

.wish-cloud span {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.wish-dialog {
  width: min(420px, calc(100% - 34px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 80px rgba(54, 95, 124, 0.28);
  padding: 26px;
}

.wish-dialog::backdrop {
  background: rgba(92, 132, 158, 0.24);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: color-mix(in srgb, var(--sky-1) 82%, #ffffff);
}

.dialog-text {
  margin: 8px 0 0;
  font-size: 19px;
  line-height: 1.8;
}

.dialog-date {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.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;
}

@keyframes cloudDrift {
  0%,
  100% {
    translate: -16px 0;
  }
  50% {
    translate: 24px 8px;
  }
}

@keyframes slowTurn {
  to {
    rotate: 360deg;
  }
}

@keyframes portraitBloom {
  0% {
    transform: scale(1);
  }
  34% {
    transform: scale(1.045) rotate(-1deg);
  }
  68% {
    transform: scale(1.012) rotate(1deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bloomRing {
  0% {
    opacity: 0.8;
    transform: scale(0.88);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes puffAway {
  from {
    opacity: 0.9;
    transform: translate(0, 0) scale(0.8);
  }
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.4);
  }
}

@keyframes petalAway {
  from {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.7);
  }
  20% {
    opacity: 0.92;
  }
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1.05);
  }
}

@keyframes sparkAway {
  from {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(calc(var(--x) * 0.72), calc(var(--y) * 0.72)) scale(1.3);
  }
}

@keyframes weatherButtonPulse {
  0%,
  100% {
    box-shadow: 0 10px 22px rgba(77, 132, 160, 0.1);
  }
  50% {
    box-shadow: 0 10px 28px color-mix(in srgb, var(--a) 28%, transparent);
  }
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) rotate(0deg);
  }
  30%,
  72% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--move-x, 20px), var(--move-y, -90px), 0) rotate(var(--rot, 12deg));
  }
}

@keyframes deckFlyLeft {
  0% {
    opacity: 0.68;
    transform: translateX(-52%) rotate(-8deg);
  }
  55% {
    opacity: 1;
    transform: translateX(-112%) translateY(-24px) rotate(-22deg);
  }
  100% {
    opacity: 0.62;
    transform: translateX(-52%) rotate(-8deg);
  }
}

@keyframes deckFlyRight {
  0% {
    opacity: 0.68;
    transform: translateX(-48%) translateY(6px) rotate(5deg);
  }
  55% {
    opacity: 1;
    transform: translateX(12%) translateY(-26px) rotate(20deg);
  }
  100% {
    opacity: 0.62;
    transform: translateX(-48%) translateY(6px) rotate(5deg);
  }
}

@keyframes deckLift {
  0% {
    opacity: 0.7;
    transform: translateX(-50%) translateY(12px) rotate(0deg) scale(1);
  }
  58% {
    opacity: 1;
    transform: translateX(-50%) translateY(-42px) rotate(0deg) scale(1.12);
  }
  100% {
    opacity: 0.72;
    transform: translateX(-50%) translateY(12px) rotate(0deg) scale(1);
  }
}

@keyframes drawGlow {
  0% {
    opacity: 0.32;
    transform: translateX(-50%) scale(0.82);
  }
  46% {
    opacity: 0.92;
    transform: translateX(-50%) scale(1.22);
  }
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes fortuneSpark {
  from {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.35);
  }
}

@keyframes fortuneRibbon {
  from {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.72);
  }
  18% {
    opacity: 0.95;
  }
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1);
  }
}

@keyframes noteDeal {
  0% {
    opacity: 0;
    transform: translateY(-36px) rotateX(72deg) scale(0.72);
  }
  68% {
    opacity: 1;
    transform: translateY(6px) rotateX(-8deg) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes fortuneReveal {
  0% {
    transform: scale(0.96);
  }
  58% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cardShine {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  32% {
    opacity: 0.86;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes holdGlow {
  0%,
  100% {
    box-shadow: 0 16px 30px rgba(53, 141, 162, 0.24);
  }
  50% {
    box-shadow: 0 18px 38px color-mix(in srgb, var(--a) 42%, transparent);
  }
}

@keyframes cometFly {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.72);
  }
  16% {
    opacity: 1;
  }
  72% {
    opacity: 0.96;
    transform: translate3d(calc(var(--end-x, 72%) - var(--start-x, 36%)), -190px, 0) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--end-x, 72%) - var(--start-x, 36%)), -245px, 0) scale(0.62);
  }
}

@keyframes wishFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes launchCloud {
  0% {
    opacity: 0;
    transform: translateY(70px) scale(0.76);
  }
  65% {
    opacity: 1;
    transform: translateY(-8px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100% - 44px, 1160px);
    padding-top: 28px;
  }

  .hero-card {
    min-height: 520px;
    padding: 28px;
  }

  .hero-layout {
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 414px;
    align-items: center;
  }

  .portrait-wrap {
    padding-top: 0;
  }

  .portrait-button {
    width: 250px;
  }

  .weather-stage {
    min-height: 390px;
    padding: 24px;
  }

  .stage-card {
    min-height: 250px;
    max-width: 620px;
  }

  .weather-ribbon {
    max-width: 840px;
  }

  .note-lab,
  .wish-dock {
    padding: 24px;
  }
}

@media (min-width: 980px) {
  .app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
  }

  .hero-card,
  .weather-stage {
    grid-column: 1 / -1;
  }

  .note-lab,
  .wish-dock {
    margin-top: 0;
    min-height: 550px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100% - 16px, 430px);
    padding-top: 10px;
  }

  .hero-card,
  .weather-stage,
  .note-lab,
  .wish-dock {
    border-radius: 7px;
  }

  .hero-card,
  .weather-stage,
  .note-lab,
  .wish-dock {
    padding: 16px;
  }

  .today-pill {
    display: none;
  }

  .hero-card {
    min-height: 640px;
  }

  .hero-layout {
    min-height: 572px;
  }

  .portrait-button {
    width: min(72vw, 245px);
  }

  h1 {
    font-size: 34px;
  }

  .stage-card {
    padding: 22px;
  }

  .real-weather {
    align-items: flex-start;
  }

  .weather-meta {
    flex-basis: 100%;
  }

  .weather-ribbon {
    grid-template-columns: repeat(5, 92px);
    margin-left: -2px;
    margin-right: -2px;
  }

  .section-head {
    align-items: flex-start;
  }

  .draw-note {
    min-width: 76px;
  }

  .draw-stage {
    height: 118px;
  }

  .deck-card {
    width: min(52vw, 160px);
    height: 66px;
  }

  .note-card {
    min-height: 342px;
    padding: 28px 20px;
  }

  .note-card p {
    font-size: 16px;
    line-height: 1.95;
  }

  .wish-sky {
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
