* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, 'Times New Roman', serif;
  color: #4a1c2b;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #ffd6e0 0%, #ffeef2 50%, #fbd3e9 100%);
  overflow-x: hidden;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding: 40px 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(200, 60, 100, 0.2);
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: normal;
  color: #c2185b;
}

.reason {
  min-height: 4.5em;
  margin: 0 0 8px;
  font-size: clamp(18px, 4.5vw, 24px);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.counter {
  min-height: 1.2em;
  margin: 0 0 24px;
  font-size: 14px;
  color: #a05070;
}

.heart-btn {
  width: 96px;
  height: 96px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #e91e63;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.45);
  transition: transform 0.15s ease;
}
.heart-btn:hover { transform: scale(1.06); }
.heart-btn:active { transform: scale(0.94); }
.heart-btn.pulse { animation: pulse 0.6s ease; }

@keyframes pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.fade-in { animation: fade 0.6s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hearts { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.float-heart {
  position: absolute;
  bottom: -40px;
  opacity: 0.8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e91e63' d='M12 21s-7.5-4.6-10-9.3C.3 8.4 2.1 4.5 5.8 4.1 8.1 3.8 10.4 5 12 7c1.6-2 3.9-3.2 6.2-2.9 3.7.4 5.5 4.3 3.8 7.6C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: rise linear forwards;
}
@keyframes rise {
  to { transform: translateY(-110vh) rotate(25deg); opacity: 0; }
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.subtitle { margin: -12px 0 20px; color: #a05070; }

#lock input { text-align: center; }

.link-btn {
  margin-top: 20px;
  padding: 4px;
  font: inherit;
  font-size: 15px;
  color: #c2185b;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

.history-list { max-height: 60vh; overflow-y: auto; margin-bottom: 20px; text-align: left; }
.history-list li { display: block; }

/* ---- admin ---- */
.admin { max-width: 720px; text-align: left; }
.admin h1 { text-align: center; }
.admin h2 {
  margin: 32px 0 12px;
  padding-top: 20px;
  font-size: 20px;
  font-weight: normal;
  color: #c2185b;
  border-top: 1px solid #f6d0dc;
}
.admin .hint { margin: 0 0 10px; font-size: 14px; color: #a05070; }
.admin input + label, .admin textarea + label { margin-top: 12px; }
.btn.danger { background: #b3261e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { margin-top: 0; }

.admin label, #lock label { display: block; margin-bottom: 6px; font-size: 14px; color: #a05070; }
#lock input,
.admin input,
.admin textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  border: 1px solid #f0b3c6;
  border-radius: 12px;
  background: #fff;
}
.admin textarea { min-height: 90px; resize: vertical; }

.btn {
  margin-top: 12px;
  padding: 10px 20px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: #e91e63;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.btn.secondary { background: #b0899a; }
.btn.small { margin: 0; padding: 4px 12px; font-size: 13px; }

.msg { min-height: 1.2em; margin: 8px 0 0; font-size: 14px; color: #c2185b; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stats { font-size: 14px; color: #a05070; }

.list { list-style: none; margin: 16px 0 0; padding: 0; }
.list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f6d0dc;
}
.list .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.list .seen { font-size: 12px; color: #b0899a; }
