:root {
  --red: #c0392b; --red-dark: #962d22; --green: #1e6b45; --cream: #fffaf2;
  --text: #2b2b2b; --muted: #6b6b6b; --line: #ead9c6;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4ede3;
  color: var(--text); min-height: 100vh; font-size: 17px; line-height: 1.45;
}
header {
  color: #fff; text-align: center; padding: 28px 16px 70px;
  background: linear-gradient(180deg, #1e6b45, #14492f); overflow-wrap: anywhere;
}
header h1 { margin: 0; font-size: 28px; }
header p { margin: 6px 0 0; opacity: .85; }
main { max-width: 560px; margin: -50px auto 40px; padding: 0 14px; }
.card {
  background: var(--cream); border-radius: 18px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.card h2 { margin: 0 0 12px; font-size: 20px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 4px; }
input, textarea {
  width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
textarea { min-height: 170px; resize: vertical; }
button, .btn {
  display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 12px;
  padding: 13px 18px; background: var(--red); color: #fff; cursor: pointer; text-decoration: none;
  text-align: center;
}
button:hover, .btn:hover { background: var(--red-dark); }
button:disabled { opacity: .6; }
.btn.secondary, button.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.green { background: #075e54; color: #fff; }
.btn.green:hover { background: #054a42; }
button.danger { background: #fff; color: var(--red); border: 2px solid var(--red); }
button.danger:hover { background: #fdf0ee; }
.full { width: 100%; margin-top: 18px; }
.error { color: var(--red); font-weight: 600; margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.big-reveal { text-align: center; padding: 26px 20px; }
.big-reveal .name { font-size: 36px; font-weight: 800; color: var(--red); margin: 8px 0; }
.facts { display: flex; gap: 10px; margin-top: 14px; }
.fact { flex: 1; min-width: 0; overflow-wrap: anywhere; background: #fff; border-radius: 12px; padding: 10px; text-align: center; border: 1px solid var(--line); }
.fact b { display: block; font-size: 18px; }
.fact span { color: var(--muted); font-size: 13px; }
.person { border-top: 1px solid var(--line); padding: 14px 0; }
.person:first-of-type { border-top: 0; }
.person .top { gap: 8px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.badge { white-space: nowrap; font-size: 13px; padding: 3px 9px; border-radius: 99px; background: #eee; color: var(--muted); }
.badge.ok { background: #dff3e8; color: var(--green); }
.person .actions { display: flex; gap: 8px; }
.person .actions > * { flex: 1; padding: 10px; font-size: 15px; }
.chat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 60px; max-height: 320px; overflow-y: auto; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; margin: 6px 0; white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { margin-left: auto; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { background: #f1ebe2; border-bottom-left-radius: 4px; }
.msg small { display: block; font-size: 12px; opacity: .9; margin-top: 2px; }
.empty { color: var(--muted); text-align: center; font-size: 15px; padding: 12px; }
.send { display: flex; gap: 8px; margin-top: 8px; }
.send input { flex: 1; }
.send button { padding: 12px 16px; }
.hidden { display: none; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding-bottom: 30px; }
.person .top b { overflow-wrap: anywhere; }
.notice { background: #fff4d6; border: 1px solid #f0d58a; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-weight: 600; }
.chat-error { color: var(--red); font-size: 15px; font-weight: 600; margin-top: 6px; }
.reveal-btn { font-size: 20px; padding: 18px 22px; margin: 10px 0; }
.couples { color: var(--muted); font-size: 15px; margin-top: 10px; }
.mygroups a { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: var(--green); font-weight: 600; text-decoration: none; }
.mygroups a:first-of-type { border-top: 0; }
