:root {
  --bg-top: #fff3df;
  --bg-mid: #ffe3d8;
  --bg-bottom: #fff9f2;
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(244, 162, 97, 0.25);
  --ink: #4a3531;
  --ink-soft: #7a5d57;
  --accent: #ff7597;
  --accent-deep: #e8557c;
  --gold: #ffb703;
  --butter: #fff3c4;
  --mint: #d8f3dc;
  --mint-ink: #2d6a4f;
  --shadow: 0 14px 36px rgba(153, 94, 72, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
    "Quicksand", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(175deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  line-height: 1.5;
  overflow-x: hidden;
}

.sky-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  filter: blur(1px);
  box-shadow: 0 8px 24px rgba(255, 193, 158, 0.18);
}

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

.cloud-1 {
  width: 150px;
  height: 48px;
  top: 7%;
  left: -180px;
  animation: drift 42s linear infinite;
}

.cloud-1::before {
  width: 64px;
  height: 64px;
  top: -28px;
  left: 24px;
}

.cloud-1::after {
  width: 50px;
  height: 50px;
  top: -18px;
  left: 72px;
}

.cloud-2 {
  width: 190px;
  height: 56px;
  top: 22%;
  left: -220px;
  opacity: 0.8;
  animation: drift 56s linear infinite 12s;
}

.cloud-2::before {
  width: 82px;
  height: 82px;
  top: -36px;
  left: 34px;
}

.cloud-2::after {
  width: 60px;
  height: 60px;
  top: -24px;
  left: 98px;
}

.cloud-3 {
  width: 130px;
  height: 42px;
  top: 40%;
  left: -160px;
  opacity: 0.65;
  animation: drift 48s linear infinite 24s;
}

.cloud-3::before {
  width: 56px;
  height: 56px;
  top: -24px;
  left: 22px;
}

.cloud-3::after {
  width: 44px;
  height: 44px;
  top: -16px;
  left: 62px;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(100vw + 380px));
  }
}

.floating-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.floating-particle {
  position: absolute;
  font-size: 1.35rem;
  user-select: none;
  animation: floatUp 1.8s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), -120px) scale(1.25) rotate(var(--rot, 12deg));
  }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow);
}

.hero {
  text-align: center;
  padding: 2.2rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--butter);
  color: #8c5a00;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sun-button {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sun-button:hover {
  transform: scale(1.07);
}

.sun-button:active,
.sun-button.bouncing {
  transform: scale(1.14) rotate(6deg);
}

.sun-button:focus-visible,
.btn:focus-visible,
.pill-btn:focus-visible,
.mood-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.sun-svg {
  width: 136px;
  height: 136px;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(255, 183, 3, 0.34));
}

.sun-rays {
  transform-origin: 80px 80px;
  animation: slowSpin 26s linear infinite;
}

.sun-button.excited .sun-rays {
  animation-duration: 5s;
}

.sun-blush {
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.sun-button.excited .sun-blush {
  opacity: 0.95;
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.9rem, 4.8vw, 2.8rem);
  line-height: 1.15;
  color: var(--ink);
}

h2 {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.3rem;
  line-height: 1.25;
}

.hero-subtitle {
  margin: 0;
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.sun-speech {
  margin: 0.4rem 0 0;
  padding: 0.55rem 1.15rem;
  background: #fff4f7;
  border: 1px dashed rgba(255, 117, 151, 0.45);
  border-radius: var(--radius-pill);
  color: #a63a5b;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: #ffe8ef;
  color: #b83b62;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.counter-chip {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Note Card */
.note-card {
  display: flex;
  flex-direction: column;
}

.note-paper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 155px;
  padding: 1.35rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fffdf7 0%, #fff4e8 100%);
  border: 1.5px dashed rgba(244, 162, 97, 0.5);
  text-align: center;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.note-paper.flipping {
  transform: scale(0.96) rotate(-1deg);
  opacity: 0.65;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.82rem 1.4rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8fab 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 117, 151, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(251, 133, 0, 0.26);
}

.btn-hug {
  background: linear-gradient(135deg, #ff7597 0%, #ff9a76 100%);
  color: #ffffff;
  padding: 0.95rem 1.7rem;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 10px 22px rgba(255, 117, 151, 0.34);
}

.hug-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.92rem;
}

/* Cafe Card */
.cafe-card {
  display: flex;
  flex-direction: column;
}

.drink-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.pill-btn {
  border: 1.5px solid rgba(244, 162, 97, 0.4);
  background: #fff9f2;
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.85rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pill-btn:hover {
  border-color: var(--accent);
}

.pill-btn.active {
  background: var(--ink);
  color: #fff9f2;
  border-color: var(--ink);
}

.cup-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0 0.9rem;
  min-height: 145px;
}

.steam {
  display: flex;
  gap: 10px;
  height: 22px;
  margin-bottom: 4px;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.cup-stage.brewing .steam,
.cup-stage.brewed .steam {
  opacity: 1;
}

.steam span {
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: rgba(166, 120, 102, 0.45);
  animation: steamRise 1.8s ease-in-out infinite;
}

.steam span:nth-child(2) {
  animation-delay: 0.35s;
}

.steam span:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes steamRise {
  0%,
  100% {
    transform: translateY(4px) scaleY(0.8);
    opacity: 0.25;
  }
  50% {
    transform: translateY(-6px) scaleY(1.1);
    opacity: 0.85;
  }
}

.cup {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cup-stage.brewing .cup {
  transform: translateY(-4px) scale(1.06);
}

.cup-lid {
  width: 96px;
  height: 14px;
  border-radius: 8px 8px 3px 3px;
  background: #ffffff;
  border: 2px solid #e2cfc4;
}

.cup-body {
  width: 84px;
  height: 82px;
  border-radius: 4px 4px 20px 20px;
  background: #e6ccb2;
  border: 2px solid rgba(74, 53, 49, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.cup[data-drink="latte"] .cup-body {
  background: #e9c9a8;
}

.cup[data-drink="matcha"] .cup-body {
  background: #b7e4c7;
}

.cup[data-drink="strawberry"] .cup-body {
  background: #ffc2d4;
}

.cup[data-drink="cocoa"] .cup-body {
  background: #b08968;
}

.cup-sleeve {
  width: 100%;
  padding: 0.35rem 0.25rem;
  background: #fff9f2;
  border-top: 1.5px solid rgba(74, 53, 49, 0.12);
  border-bottom: 1.5px solid rgba(74, 53, 49, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.cup-heart {
  color: var(--accent);
  font-size: 0.95rem;
}

.cup-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.cafe-message {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.94rem;
  color: var(--ink-soft);
  min-height: 2.8em;
}

/* Mood Card */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.mood-btn {
  border: 1.5px solid rgba(255, 117, 151, 0.28);
  background: #fff8fa;
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.75rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.mood-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.mood-btn.selected {
  background: #ffe0ea;
  border-color: var(--accent);
  color: #8f2447;
}

.mood-reply {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: #fffaf0;
  border: 1px solid rgba(255, 183, 3, 0.35);
  color: var(--ink);
  font-size: 0.96rem;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
}

/* Checklist Card */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.68rem 0.85rem;
  border-radius: 14px;
  background: #fffbf6;
  border: 1.5px solid rgba(244, 162, 97, 0.24);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.check-item:hover {
  border-color: rgba(255, 117, 151, 0.55);
}

.check-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #e0a899;
  background: #ffffff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.check-item input:focus-visible + .check-box {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.check-item input:checked + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-item input:checked + .check-box::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg) translateY(-1px);
}

.check-item input:checked ~ .check-text {
  text-decoration: line-through;
  color: var(--ink-soft);
}

.check-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.checklist-celebration {
  margin: 0.9rem 0 0;
  min-height: 1.5em;
  font-weight: 700;
  color: var(--mint-ink);
  font-size: 0.94rem;
}

/* Hug Banner */
.hug-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(255, 245, 248, 0.94) 0%, rgba(255, 244, 224, 0.94) 100%);
}

.hug-copy h2 {
  margin: 0 0 0.25rem;
}

.hug-copy p {
  margin: 0;
  color: var(--ink-soft);
}

.footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding-top: 0.25rem;
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hug-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud,
  .sun-rays,
  .steam span,
  .floating-particle {
    animation: none;
  }
}
