:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(17, 23, 32, 0.88);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7f8fb;
  --muted: #aeb9c7;
  --rose: #ff7a8a;
  --yellow: #ffd166;
  --mint: #79ead7;
  --green: #a8ef75;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 52px;
  padding: 0 22px;
  transition: transform 180ms ease, filter 180ms ease, width 260ms ease, min-height 260ms ease, font-size 260ms ease;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.dashboard-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(121, 234, 215, 0.14), transparent 36%),
    linear-gradient(315deg, rgba(255, 122, 138, 0.13), transparent 40%),
    var(--bg);
}

.dashboard-shell {
  width: min(920px, 100%);
}

.dashboard-panel {
  align-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  display: grid;
  gap: 24px;
  min-height: min(620px, calc(100vh - 48px));
  padding: clamp(24px, 6vw, 64px);
}

.dashboard-panel h1 {
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 0.98;
  margin: 0;
}

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

.empty-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  min-height: 118px;
}

.quiet-line {
  color: var(--muted);
  margin: 0;
}

.apology-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(121, 234, 215, 0.16), transparent 28%),
    radial-gradient(circle at 84% 30%, rgba(255, 122, 138, 0.15), transparent 30%),
    linear-gradient(180deg, #0d1018, #090b10 58%, #11100d);
  overflow-x: hidden;
}

.apology-shell {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  margin: 0 auto;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 36px);
  width: min(1080px, 100%);
}

.letter-panel,
.stage-panel,
.choice-panel,
.accepted-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
}

.letter-panel {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 5vw, 46px);
}

.letter-panel h1,
.accepted-panel h1 {
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  line-height: 0.95;
  margin: 0;
}

.letter-panel p {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.28rem);
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.stage-panel {
  overflow: hidden;
  padding: clamp(10px, 2vw, 20px);
  position: relative;
}

.artwork-panel {
  min-height: auto;
}

.sorry-art {
  display: block;
}

.sorry-art img {
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.boy-svg {
  animation: boy-kneel 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 90%;
}

.girl-svg {
  animation: girl-breathe 4.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 90%;
}

.boy-bow-arm {
  animation: offer-arm 2.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 15% 50%;
}

.girl-hand {
  animation: girl-hand-soften 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 100% 0;
}

.bouquet {
  animation: bouquet-offer 2.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 30% 100%;
}

.flower-head {
  animation: flower-pulse 1.8s ease-in-out infinite;
}

.flower-head-2 {
  animation-delay: 0.22s;
}

.speech-bubble {
  animation: speech-float 2.4s ease-in-out infinite;
}

.twinkle {
  animation: twinkle 2.8s ease-in-out infinite;
}

.twinkle-2 {
  animation-delay: 0.55s;
}

.twinkle-3 {
  animation-delay: 1.05s;
}

.heart-pop {
  animation: heart-pop 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.heart-2 {
  animation-delay: 0.45s;
}

.heart-3 {
  animation-delay: 0.9s;
}

.petal-float {
  animation: petal-float 4.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.petal-b {
  animation-delay: 0.7s;
}

.petal-c {
  animation-delay: 1.25s;
}

.comfort-panel {
  background: rgba(17, 23, 32, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(22px, 5vw, 46px);
}

.comfort-copy {
  display: grid;
  gap: 12px;
}

.comfort-copy h2 {
  font-size: clamp(2rem, 6vw, 4.3rem);
  line-height: 0.98;
  margin: 0;
}

.comfort-copy p {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.55;
  margin: 0;
  max-width: 840px;
}

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

.moment-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  overflow: hidden;
  padding: 10px;
}

.moment-card img {
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  object-position: top;
  width: 100%;
}

.moment-card figcaption {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
  padding: 0 2px 4px;
}

.choice-panel {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
}

.accept-button {
  background: var(--green);
  color: #11190c;
  width: min(260px, 100%);
}

.angry-button {
  background: var(--rose);
  color: #211014;
}

.angry-floating {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  position: fixed;
  z-index: 20;
}

.accept-takeover {
  background: transparent;
  border: 0;
  box-shadow: none;
  inset: 0;
  padding: 12px;
  position: fixed;
  z-index: 30;
}

.accept-takeover .accept-button {
  border-radius: 8px;
  height: calc(100vh - 24px);
  width: calc(100vw - 24px) !important;
}

.accepted-page {
  background:
    radial-gradient(circle at 28% 10%, rgba(121, 234, 215, 0.15), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(255, 209, 102, 0.13), transparent 30%),
    var(--bg);
}

.accepted-shell {
  display: grid;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 36px);
  place-items: center;
}

.accepted-panel {
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: clamp(22px, 5vw, 52px);
  text-align: center;
  width: min(980px, 100%);
}

.accepted-title {
  display: grid;
  gap: 4px;
  letter-spacing: 0;
}

.accepted-title span:first-child {
  font-size: clamp(2.7rem, 8vw, 6.4rem);
}

.accepted-title span:last-child {
  color: #ffd9df;
  font-size: clamp(2rem, 6vw, 4.8rem);
}

.camping-line {
  color: #ffe7b7;
  font-family: "Brush Script MT", "Segoe Script", "Apple Chancery", cursive;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  font-weight: 900;
  line-height: 0.95;
  margin: 0 0 8px;
  text-shadow: 0 8px 28px rgba(255, 209, 102, 0.22);
}

.gift-picture {
  display: block;
  place-self: center;
  width: min(100%, 860px);
}

.gift-picture img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--shadow);
  display: block;
  max-height: min(64vh, 760px);
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

@keyframes boy-kneel {
  0%, 100% { transform: translateY(0) rotate(-0.8deg); }
  50% { transform: translateY(7px) rotate(1deg); }
}

@keyframes girl-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes offer-arm {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  50% { transform: rotate(-3deg) translateX(8px); }
}

@keyframes girl-hand-soften {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  50% { transform: rotate(5deg) translateX(-6px); }
}

@keyframes bouquet-offer {
  0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
  50% { transform: translateX(12px) translateY(-5px) rotate(-2deg); }
}

@keyframes flower-pulse {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

@keyframes speech-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.32; transform: scale(0.72); }
  50% { opacity: 0.95; transform: scale(1.15); }
}

@keyframes heart-pop {
  0%, 100% { opacity: 0.22; transform: translateY(10px) scale(0.72); }
  50% { opacity: 0.82; transform: translateY(-8px) scale(1.12); }
}

@keyframes petal-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
  50% { transform: translate(18px, -28px) rotate(18deg); opacity: 1; }
}

@media (max-width: 760px) {
  .empty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-panel {
    padding: 8px;
  }

  .sorry-art img {
    max-height: 78vh;
    object-fit: contain;
  }

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

  .moment-card {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
  }

  .moment-card img {
    aspect-ratio: 9 / 16;
    max-height: 210px;
  }

  .moment-card figcaption {
    font-size: 1rem;
  }

  .accepted-panel {
    gap: 14px;
  }

  .gift-picture img {
    max-height: 66vh;
  }
}

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