:root {
  --rose: #ff4f8b;
  --rose-deep: #c2185b;
  --ink: #5a1433;
  --paper: #fff7fb;
  --blush: #ffd6e7;
  --cream: #ffeef5;
  --card: #fffdfc;
  --line: rgba(194, 24, 91, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, #ff9ec4 0%, transparent 55%),
    radial-gradient(900px 600px at 110% 10%, #ff7eb3 0%, transparent 50%),
    radial-gradient(800px 500px at 50% 120%, #ffc1d8 0%, transparent 55%),
    linear-gradient(180deg, #ffd0e4 0%, #ffb3d1 42%, #ff8fb8 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Ctext x='12' y='44' font-size='28' fill='%23c2185b'%3E♥%3C/text%3E%3Ctext x='92' y='118' font-size='18' fill='%23c2185b'%3E♥%3C/text%3E%3C/svg%3E");
  z-index: 0;
}

.wrap {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header, .site-footer {
  position: relative;
  z-index: 1;
}

.site-header .inner,
.site-footer .inner {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  font-family: "Snell Roundhand", "Apple Chancery", Palatino, cursive;
  font-size: 1.7rem;
  color: var(--rose-deep);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.header-nav a,
.site-footer a {
  color: var(--rose-deep);
  text-decoration: none;
  margin-left: 14px;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
}

.header-nav a:hover,
.site-footer a:hover,
.brand:hover { text-decoration: underline; }

.letter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px 32px 28px;
  margin: 18px 0 28px;
  box-shadow:
    0 24px 60px rgba(194, 24, 91, 0.18),
    0 2px 0 rgba(255,255,255,0.7) inset;
}

.kicker {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--rose);
  margin: 0 0 10px;
}

h1 {
  font-family: "Snell Roundhand", "Apple Chancery", Palatino, cursive;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--rose-deep);
  line-height: 1.05;
}

.datum {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: #9a4066;
  margin: 0 0 22px;
  font-size: 0.95rem;
}

.brief p {
  font-size: 1.18rem;
  line-height: 1.55;
  margin: 0 0 1em;
}

.brief p:last-of-type { margin-bottom: 0; }

.signoff {
  margin-top: 28px;
  font-family: "Snell Roundhand", "Apple Chancery", Palatino, cursive;
  font-size: 1.7rem;
  color: var(--rose-deep);
}

.hearts {
  text-align: center;
  color: var(--rose);
  letter-spacing: 0.4em;
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.note {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  color: #7a3554;
  text-align: center;
  margin: 0 0 36px;
}

.archiv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archiv-list li {
  border-top: 1px solid var(--line);
}

.archiv-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  color: var(--ink);
  text-decoration: none;
}

.archiv-list a:hover { color: var(--rose-deep); }

.legal h2 {
  font-size: 1.15rem;
  margin: 1.6em 0 0.4em;
}

.legal p, .legal li {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

.site-footer {
  padding-bottom: 28px;
  color: #7a3554;
}

.site-footer .inner { padding-top: 0; }

@media (max-width: 520px) {
  .letter { padding: 26px 20px 22px; border-radius: 22px; }
  .brief p { font-size: 1.08rem; }
  .header-nav a { margin-left: 10px; }
}

.sr { display: block; }
.sr input { display: block; width: 100%; margin-top: 6px; }

.pin-box, .chat-form, .pin-form {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

.pin-form, .chat-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 12px;
}

.pin-form input, .chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.btn, .mic {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--rose-deep);
  color: #fff;
  cursor: pointer;
}

.mic {
  min-width: 160px;
  min-height: 56px;
  font-size: 1.05rem;
}

.mic.live { background: #7a1038; }

.mic-row { text-align: center; margin: 18px 0 8px; }

.log {
  max-height: 52vh;
  overflow: auto;
  padding: 4px 2px 12px;
}

.bubble {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 16px;
  margin: 0 0 10px;
}

.bubble.me {
  background: var(--blush);
  margin-left: 18%;
}

.bubble.bot {
  background: #fff;
  border: 1px solid var(--line);
  margin-right: 12%;
}

.err, .fine {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  color: #7a3554;
}

.fine { margin-top: 18px; }
