/* Shared look: warm paper, rose accents, handwriting for the words that matter. */

:root {
  --paper: #fff7f2;
  --paper-2: #ffeee6;
  --card: #fffdfb;
  --ink: #4a2333;
  --ink-soft: #8c6472;
  --rose: #e8577a;
  --rose-deep: #c93a62;
  --rose-soft: #ffd5df;
  --peach: #ffb38a;
  --line: #f1d9d6;
  --shadow: 0 10px 30px -12px rgba(150, 50, 80, 0.35);
  --hand: 'Caveat', 'Segoe Print', cursive;
  --sans: 'Nunito', system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, #ffe1e8 0, transparent 45%),
    radial-gradient(circle at 100% 30%, #ffe9dc 0, transparent 40%),
    var(--paper);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
}

h1, h2 { font-family: var(--hand); font-weight: 700; margin: 0; line-height: 1.05; }
h1 { font-size: 44px; color: var(--rose-deep); }
h2 { font-size: 30px; }

a { color: var(--rose-deep); }

button, .button {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--rose);
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(232, 87, 122, 0.7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, background 0.2s;
}
button:active, .button:active { transform: scale(0.96); }
button.ghost, .button.ghost { background: transparent; color: var(--rose-deep); box-shadow: none; border: 2px solid var(--rose-soft); }
button.small { padding: 6px 12px; font-size: 14px; }
button:disabled { opacity: 0.5; }

input, textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--card);
  outline: none;
}
input:focus, textarea:focus { border-color: var(--rose); }
textarea { resize: vertical; min-height: 96px; }
label { display: block; font-weight: 800; font-size: 14px; color: var(--ink-soft); margin: 14px 0 6px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.muted { color: var(--ink-soft); }

.banner {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 2px dashed var(--rose-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  box-shadow: none;
}
.banner-button { cursor: pointer; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 1000;
  animation: toast-in 0.25s ease;
  transition: opacity 0.4s, transform 0.4s;
  white-space: nowrap;
}
.toast.out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.float-heart {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  font-size: 26px;
  animation: float-up 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes float-up {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1.2); opacity: 0; }
}

.locked {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}
.locked-heart { font-size: 64px; animation: beat 1.6s ease-in-out infinite; }
.locked p { max-width: 290px; color: var(--ink-soft); }
.login-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; min-width: 250px; }
.login-error { color: var(--rose-deep) !important; font-weight: 700; min-height: 1.4em; }
.login-hint { font-size: 13px; }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.12); }
  30% { transform: scale(1); }
  45% { transform: scale(1.08); }
}

.loading { text-align: center; padding: 30vh 0; font-size: 40px; animation: beat 1.4s infinite; }
