:root {
  --bg: #fff9f2;
  --bg2: #fff0e2;
  --card: rgba(255, 255, 255, 0.78);
  --ink: #2f2236;
  --accent: #ff5e7a;
  --accent-2: #ff9166;
  --good: #117a65;
  --warn: #b53333;
  --shadow: 0 14px 40px rgba(95, 36, 54, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Gowun Dodum", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 14%, #ffd7db 0 16%, transparent 17%),
    radial-gradient(circle at 86% 76%, #ffe4bf 0 20%, transparent 21%),
    linear-gradient(145deg, var(--bg), var(--bg2));
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.45;
}

.bg-shape-a {
  width: 300px;
  height: 300px;
  left: -90px;
  top: 14vh;
  background: #ffc7d2;
  animation: driftA 8s ease-in-out infinite;
}

.bg-shape-b {
  width: 360px;
  height: 360px;
  right: -110px;
  bottom: 8vh;
  background: #ffd8ad;
  animation: driftB 10s ease-in-out infinite;
}

.app {
  width: min(1080px, 92vw);
  margin: 24px auto 42px;
  display: grid;
  gap: 18px;
}

.hero {
  text-align: center;
  padding: 14px 12px;
  animation: enter 0.7s ease;
}

.hero h1 {
  margin: 8px 0 4px;
  font-family: "Bagel Fat One", cursive;
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  font-weight: 400;
  color: #c72f59;
  letter-spacing: 0.5px;
}

.chip {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  color: #8a4f58;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.form-card {
  padding: 20px;
  animation: enter 0.9s ease;
}

.form-card h2,
.wall-card h2 {
  margin: 0 0 12px;
  font-family: "Bagel Fat One", cursive;
  font-weight: 400;
  color: #cc3e60;
}

form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 700;
  font-size: 0.95rem;
}

input,
textarea {
  border: 1px solid #f3b7c2;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}

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

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

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

.status {
  min-height: 1.3em;
  margin: 10px 4px 0;
  font-weight: 700;
}

.status.ok {
  color: var(--good);
}

.status.error {
  color: var(--warn);
}

.wall-card {
  padding: 18px;
  animation: enter 1.05s ease;
}

.wall-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.wall-head p {
  margin: 0;
  color: #7d4b53;
}

.error-box {
  margin: 6px 0 10px;
  padding: 12px;
  border-radius: 12px;
  background: #ffe3df;
  border: 1px solid #ffb2a8;
  color: #8a251b;
  font-weight: 700;
}

.heart-stage {
  position: relative;
  height: 560px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 188, 202, 0.8) 0, rgba(255, 224, 231, 0.5) 45%, rgba(255, 248, 243, 0.2) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 241, 237, 0.45));
  overflow: hidden;
  border: 1px solid rgba(252, 170, 186, 0.9);
}

.heart-note {
  position: absolute;
  width: min(180px, 28vw);
  max-width: 180px;
  min-width: 106px;
  transform: translate(-50%, -50%) scale(0.86);
  transform-origin: center;
  opacity: 0;
  animation: popIn 0.45s ease forwards;
}

.heart-note::before,
.heart-note::after {
  content: "";
  position: absolute;
  top: 0;
  width: 52%;
  height: 82%;
  background: #ff748e;
  border-radius: 50% 50% 0 0;
  z-index: -1;
}

.heart-note::before {
  left: 48%;
  transform: translateX(-100%) rotate(-45deg);
  transform-origin: 100% 100%;
}

.heart-note::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 0 100%;
}

.heart-note > div {
  background: #ff748e;
  padding: 16px 12px 14px;
  border-radius: 14px;
  color: white;
  text-align: center;
  box-shadow: 0 8px 20px rgba(172, 38, 78, 0.28);
}

.heart-note h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.heart-note p {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes popIn {
  from {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

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

@keyframes driftB {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(16px);
  }
}

@keyframes enter {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .wall-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .heart-stage {
    height: 500px;
  }

  .heart-note {
    width: min(156px, 38vw);
  }
}
