:root {
  --rose: #ff6f9f;
  --rose-deep: #d93670;
  --peach: #ffd3bd;
  --cream: #fff7f2;
  --ink: #482134;
  --soft-ink: #78425c;
  --glass: rgba(255, 246, 250, 0.74);
  --line: rgba(255, 255, 255, 0.52);
  --shadow: 0 24px 70px rgba(154, 42, 91, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 214, 230, 0.92), transparent 24rem),
    linear-gradient(135deg, #ffe6ef 0%, #ffd4e4 38%, #ffefe0 100%);
  overflow-x: hidden;
}

body::selection {
  color: white;
  background: var(--rose-deep);
}

.bg-photo,
.aurora,
.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-photo {
  z-index: -4;
  background-image:
    linear-gradient(180deg, rgba(68, 21, 45, 0.18), rgba(255, 222, 232, 0.74) 58%, rgba(255, 247, 242, 0.96)),
    url("assets/background.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.02);
}

.aurora {
  z-index: -3;
  background:
    radial-gradient(circle at 20% 34%, rgba(255, 111, 159, 0.42), transparent 15rem),
    radial-gradient(circle at 82% 15%, rgba(255, 211, 189, 0.55), transparent 14rem),
    radial-gradient(circle at 58% 72%, rgba(255, 255, 255, 0.64), transparent 18rem);
  animation: glowDrift 9s ease-in-out infinite alternate;
}

.float-layer {
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255, 124, 173, 0.8) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.5px);
  background-size: 72px 72px, 116px 116px, 46px 46px;
  animation: starFall 16s linear infinite;
  opacity: 0.75;
}

.identity-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 8;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--soft-ink);
  background: rgba(255, 248, 251, 0.78);
  box-shadow: 0 12px 34px rgba(154, 42, 91, 0.16);
  backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 900;
}

.identity-switch span {
  padding-left: 9px;
}

.identity-btn {
  min-width: 54px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.56);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.identity-btn.is-active {
  color: white;
  background: linear-gradient(135deg, #ff5d98, #ffb17d);
  box-shadow: 0 8px 18px rgba(219, 54, 112, 0.22);
}

.page-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.bucket-list {
  position: fixed;
  top: 112px;
  right: max(18px, calc((100vw - 1120px) / 2 - 226px));
  z-index: 4;
  width: 216px;
  max-height: min(620px, calc(100svh - 136px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 248, 251, 0.76);
  box-shadow: 0 18px 48px rgba(154, 42, 91, 0.16);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.bucket-heading {
  display: grid;
  gap: 2px;
}

.bucket-heading h2 {
  font-size: 22px;
}

.bucket-progress {
  justify-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: white;
  background: linear-gradient(135deg, #ff5d98, #ffb17d);
  font-size: 13px;
  font-weight: 900;
}

.bucket-items {
  min-height: 0;
  display: grid;
  gap: 8px;
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bucket-item {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 8px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.52);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.38;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.bucket-check {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(120, 66, 92, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.bucket-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.18s ease;
}

.bucket-item.is-done {
  color: var(--ink);
  background: rgba(255, 247, 211, 0.74);
}

.bucket-item.is-done .bucket-check {
  border-color: #e0b82e;
  background: linear-gradient(135deg, #e6bd2e, #ffd96b);
}

.bucket-item.is-done .bucket-check::after {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.bucket-text {
  min-width: 0;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 22px 0 44px;
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.62);
  box-shadow: 0 14px 40px rgba(112, 42, 76, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-weight: 700;
  color: var(--rose-deep);
  white-space: nowrap;
}

.nav-pills {
  display: flex;
  gap: 8px;
}

.nav-pills a,
.hero-actions a {
  color: var(--ink);
  text-decoration: none;
}

.nav-pills a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}

.hero-content {
  align-self: center;
  width: min(760px, 100%);
  padding: 48px 0 20px;
  text-shadow: 0 2px 22px rgba(255, 255, 255, 0.52);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: clamp(42px, 10vw, 92px);
  line-height: 1.05;
  color: #fffafc;
  text-shadow: 0 8px 34px rgba(92, 21, 52, 0.45);
}

#dayText {
  display: inline-block;
  color: #fff;
  animation: heartBeat 1.8s ease-in-out infinite;
}

.flip-counter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}

.digit-card {
  position: relative;
  width: clamp(54px, 12vw, 82px);
  height: clamp(68px, 15vw, 102px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 226, 238, 0.78));
  box-shadow: var(--shadow);
  color: var(--rose-deep);
  font-size: clamp(34px, 9vw, 62px);
  font-weight: 900;
  transform-origin: center top;
  animation: flipIn 0.78s cubic-bezier(0.2, 0.84, 0.26, 1.2) both;
  overflow: hidden;
}

.digit-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(210, 56, 111, 0.18);
}

.quote {
  max-width: 650px;
  margin: 0;
  color: #fff;
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: clamp(19px, 4vw, 28px);
  text-shadow: 0 4px 24px rgba(91, 19, 53, 0.5);
}

.hero-actions,
.message-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 26px;
}

.primary-action,
.ghost-action,
.save-btn,
.send-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-action,
.save-btn,
.send-btn {
  color: white;
  background: linear-gradient(135deg, #ff5d98, #ff8aaf 48%, #ffb17d);
  box-shadow: 0 16px 32px rgba(219, 54, 112, 0.32);
}

.ghost-action {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

button:active,
a:active {
  transform: translateY(1px) scale(0.98);
}

.section {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--glass);
  box-shadow: 0 20px 60px rgba(154, 42, 91, 0.18);
  backdrop-filter: blur(20px);
}

.section-heading {
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
}

.moment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.moment-card {
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 220, 235, 0.7)),
    radial-gradient(circle at 80% 20%, rgba(255, 111, 159, 0.26), transparent 7rem);
  box-shadow: 0 12px 28px rgba(161, 51, 98, 0.16);
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  overflow: hidden;
}

.moment-card::after {
  content: "♥";
  position: absolute;
  right: 14px;
  bottom: -20px;
  color: rgba(255, 114, 159, 0.16);
  font-size: 74px;
  transform: rotate(-14deg);
}

.moment-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #ff629a, #ffc078);
  box-shadow: 0 10px 18px rgba(255, 98, 154, 0.25);
  font-size: 24px;
}

.weather-board {
  padding: clamp(12px, 3vw, 22px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.weather-card {
  position: relative;
  min-height: 188px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 229, 240, 0.54)),
    radial-gradient(circle at 88% 14%, rgba(255, 177, 125, 0.2), transparent 8rem);
  box-shadow: 0 18px 44px rgba(154, 42, 91, 0.13);
  overflow: hidden;
}

.weather-card::after {
  content: "♡";
  position: absolute;
  right: 18px;
  bottom: -24px;
  color: rgba(255, 111, 159, 0.13);
  font-size: 82px;
  transform: rotate(-12deg);
}

.weather-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.weather-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.weather-card h3 {
  margin: 0;
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: 26px;
  line-height: 1.15;
}

.weather-card p {
  margin: 4px 0 0;
  color: var(--soft-ink);
  line-height: 1.5;
}

.weather-title-row strong {
  flex: 0 0 auto;
  color: var(--rose-deep);
  font-size: 42px;
  line-height: 0.95;
}

.weather-main {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 850;
}

.weather-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.weather-stats span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 850;
}

.weather-tip {
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-weight: 800;
}

.weather-visual {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 224, 236, 0.34));
}

.sun {
  position: absolute;
  width: 48px;
  height: 48px;
  left: 17px;
  top: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8b8 0 28%, #ffd86d 58%, #ff9c70 100%);
  box-shadow: 0 0 22px rgba(255, 197, 95, 0.62);
  animation: sunSpin 9s linear infinite;
}

.sun::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 198, 87, 0.8) 0 10deg, transparent 10deg 22deg);
  z-index: -1;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 18px rgba(159, 92, 123, 0.13);
  animation: cloudFloat 4.8s ease-in-out infinite alternate;
}

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

.cloud-a {
  width: 68px;
  height: 28px;
  left: 28px;
  top: 55px;
}

.cloud-a::before {
  width: 32px;
  height: 32px;
  left: 10px;
  top: -17px;
}

.cloud-a::after {
  width: 25px;
  height: 25px;
  right: 10px;
  top: -12px;
}

.cloud-b {
  width: 46px;
  height: 20px;
  left: 12px;
  top: 72px;
  opacity: 0.72;
  animation-delay: -1.4s;
}

.cloud-b::before {
  width: 22px;
  height: 22px;
  left: 8px;
  top: -12px;
}

.cloud-b::after {
  width: 16px;
  height: 16px;
  right: 8px;
  top: -8px;
}

.is-sunny .cloud {
  opacity: 0.24;
}

.is-cloudy .sun,
.is-rainy .sun,
.is-snowy .sun,
.is-foggy .sun {
  opacity: 0.58;
}

.drop,
.flake,
.fog {
  position: absolute;
  z-index: 2;
}

.drop {
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(#8fd7ff, #4aa6ff);
  animation: rainDrop 0.9s linear infinite;
}

.drop-a {
  left: 42px;
  top: 82px;
}

.drop-b {
  left: 62px;
  top: 78px;
  animation-delay: -0.28s;
}

.drop-c {
  left: 80px;
  top: 84px;
  animation-delay: -0.55s;
}

.flake {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: snowFall 1.8s ease-in-out infinite;
}

.flake-a {
  left: 38px;
  top: 78px;
}

.flake-b {
  left: 62px;
  top: 84px;
  animation-delay: -0.5s;
}

.flake-c {
  left: 84px;
  top: 76px;
  animation-delay: -1s;
}

.fog {
  left: 19px;
  width: 74px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  animation: fogSlide 3s ease-in-out infinite alternate;
}

.fog-a {
  top: 78px;
}

.fog-b {
  top: 91px;
  width: 58px;
  animation-delay: -1.1s;
}

.journal-board,
.message-board,
.photo-board {
  display: grid;
  gap: 16px;
}

.upload-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.album-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.album-form input {
  flex: 1 1 260px;
}

.album-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.album-tab {
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.58);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.album-tab.is-active {
  color: white;
  background: linear-gradient(135deg, #ff5d98, #ff8aaf 48%, #ffb17d);
  box-shadow: 0 12px 24px rgba(219, 54, 112, 0.22);
}

.upload-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  color: white;
  background: linear-gradient(135deg, #ff5d98, #ff8aaf 48%, #ffb17d);
  box-shadow: 0 16px 32px rgba(219, 54, 112, 0.28);
  font-weight: 850;
  cursor: pointer;
}

.photo-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-hint {
  margin: 0;
  color: var(--soft-ink);
  font-size: 14px;
  font-weight: 700;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-card,
.photo-empty {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
}

.photo-card {
  position: relative;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.photo-card span {
  display: block;
  color: var(--soft-ink);
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-weight: 700;
}

.photo-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 14px;
}

.photo-caption span {
  min-width: 0;
  padding: 0;
}

.photo-caption small {
  color: rgba(120, 66, 92, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.corner-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 14px rgba(154, 42, 91, 0.14);
  padding: 0;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.corner-delete::before,
.corner-delete::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
}

.corner-delete::before {
  transform: rotate(45deg);
}

.corner-delete::after {
  transform: rotate(-45deg);
}

.photo-delete {
  color: white;
  background: rgba(217, 54, 112, 0.62);
}

.photo-empty {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--soft-ink);
  line-height: 1.7;
}

.diary-form {
  display: grid;
  gap: 12px;
}

.diary-form label {
  display: grid;
  gap: 8px;
  color: var(--soft-ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 128, 174, 0.28);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(217, 54, 112, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 111, 159, 0.16);
}

.diary-list,
.message-list {
  display: grid;
  gap: 12px;
}

.diary-item,
.message-item {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.diary-item h3 {
  margin: 0 0 8px;
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: 22px;
}

.diary-item p,
.message-item p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.7;
}

.meta {
  display: block;
  margin-top: 10px;
  color: rgba(120, 66, 92, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.meta b {
  color: var(--rose-deep);
}

.message-form input {
  flex: 1 1 240px;
}

.moment-modal {
  width: min(920px, calc(100% - 28px));
  border: 0;
  border-radius: 30px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.moment-modal::backdrop {
  background: rgba(58, 18, 40, 0.48);
  backdrop-filter: blur(8px);
}

.modal-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 248, 250, 0.94);
  box-shadow: var(--shadow);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.78);
  font-size: 28px;
  cursor: pointer;
}

.media-frame {
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(255, 92, 151, 0.08), rgba(255, 215, 228, 0.4)),
    url("assets/background.jpg");
  background-size: cover;
  background-position: center;
}

.media-frame video,
.media-frame img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
}

.modal-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 46px);
}

.modal-copy h3 {
  margin: 0 0 12px;
  font-family: "Segoe Print", "STKaiti", "KaiTi", cursive;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
}

.modal-copy p:last-child {
  margin: 0;
  color: var(--soft-ink);
  font-size: 18px;
  line-height: 1.8;
}

@keyframes flipIn {
  0% {
    opacity: 0;
    transform: rotateX(-88deg) translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0);
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  18% {
    transform: scale(1.08);
  }
  34% {
    transform: scale(0.98);
  }
  52% {
    transform: scale(1.05);
  }
}

@keyframes glowDrift {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 2%, 0) scale(1.03);
  }
}

@keyframes starFall {
  from {
    background-position: 0 0, 0 0, 0 0;
  }
  to {
    background-position: 72px 144px, -116px 232px, 46px 92px;
  }
}

@keyframes sunSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cloudFloat {
  from {
    transform: translateX(-5px);
  }
  to {
    transform: translateX(6px);
  }
}

@keyframes rainDrop {
  0% {
    opacity: 0;
    transform: translateY(-8px) rotate(12deg);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(14px) rotate(12deg);
  }
}

@keyframes snowFall {
  0% {
    opacity: 0;
    transform: translateY(-8px) translateX(0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(16px) translateX(7px);
  }
}

@keyframes fogSlide {
  from {
    transform: translateX(-7px);
  }
  to {
    transform: translateX(8px);
  }
}

@media (hover: hover) {
  .primary-action:hover,
  .ghost-action:hover,
  .save-btn:hover,
  .send-btn:hover,
  .moment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(219, 54, 112, 0.28);
  }

  .bucket-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.72);
  }
}

@media (max-width: 1420px) {
  .bucket-list {
    position: static;
    width: auto;
    max-height: none;
    margin: 18px 0 0;
  }

  .bucket-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 520px);
  }

  .identity-switch {
    top: 10px;
    right: 10px;
    transform: scale(0.92);
    transform-origin: top right;
  }

  .hero {
    padding-top: 10px;
  }

  .bucket-list {
    margin-top: 58px;
    padding: 14px;
    border-radius: 22px;
  }

  .bucket-items {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .topbar {
    align-items: stretch;
    border-radius: 24px;
    flex-direction: column;
    padding: 14px;
  }

  .nav-pills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-pills a {
    padding: 0 8px;
  }

  .hero-content {
    padding-top: 34px;
  }

  .hero-actions a,
  .primary-action,
  .ghost-action,
  .save-btn,
  .send-btn {
    width: 100%;
  }

  .moment-grid,
  .photo-grid,
  .weather-grid {
    grid-template-columns: 1fr 1fr;
  }

  .weather-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .weather-visual {
    width: 82px;
    height: 82px;
    transform: scale(0.86);
    transform-origin: left center;
  }

  .weather-title-row {
    display: block;
  }

  .weather-title-row strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
  }

  .moment-card {
    min-height: 118px;
    padding: 15px;
    font-size: 16px;
  }

  .section {
    border-radius: 24px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .media-frame,
  .media-frame video,
  .media-frame img {
    min-height: 270px;
  }
}

@media (max-width: 420px) {
  .flip-counter {
    gap: 7px;
  }

  .digit-card {
    width: 48px;
    height: 64px;
    border-radius: 14px;
    font-size: 34px;
  }

  .moment-grid,
  .photo-grid,
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .quote {
    font-size: 19px;
  }
}

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