:root {
  --bg: #fbf6ef;
  --card: #ffffff;
  --ink: #1d2621;
  --muted: #5d6862;
  --line: #ebe2d4;
  --red: #c42a3c;
  --red-dark: #9f1f2f;
  --red-soft: #fbe9eb;
  --green: #1e6b48;
  --green-soft: #e5f2eb;
  --gold: #e3a72f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.05), 0 8px 24px rgba(40, 30, 20, 0.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
}
a { color: var(--red-dark); }
img, svg { display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { padding: 16px 0; }
.top .wrap, .top .narrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 18px; }
.top nav a:hover { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.card h2 { font-size: 22px; }
.card > :last-child { margin-bottom: 0; }

/* Forms */
label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; }
.row > .field { flex: 1; min-width: 0; }
input[type=text], input[type=date], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #ddd3c4;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(196, 42, 60, .15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error { color: var(--red-dark); background: var(--red-soft); border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 10px 0; }
.error:empty { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px;
  border: 0; border-radius: 12px; padding: 13px 20px; cursor: pointer;
  background: var(--red); color: #fff; text-decoration: none;
  transition: background .15s, transform .05s;
  min-height: 48px;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid #ddd3c4; }
.btn.secondary:hover { background: #f7f1e8; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #17573a; }
.btn.ghost { background: transparent; color: var(--muted); padding: 8px 10px; min-height: 0; font-weight: 600; font-size: 14px; }
.btn.ghost:hover { color: var(--red-dark); background: transparent; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 14px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Landing */
.hero { padding: 28px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.badge { display: inline-flex; gap: 8px; align-items: center; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 14px; border-radius: 99px; padding: 6px 12px; margin-bottom: 16px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; font-size: 17px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231e6b48' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.create-card { padding: 26px; }
section.block { padding: 48px 0; border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: 15px; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { background: #f6efe4; font-weight: 700; }
.compare td.yes { color: var(--green); font-weight: 700; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.my-groups { margin-top: 18px; }
.my-groups a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.my-groups a span { color: var(--muted); font-weight: 500; font-size: 14px; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap, footer .narrow { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

/* Group page */
.group-head { padding: 6px 0 10px; }
.group-head h1 { font-size: clamp(28px, 7vw, 38px); margin-bottom: 8px; word-wrap: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #f6efe4; border-radius: 99px; padding: 6px 12px; font-size: 15px; font-weight: 600; }
.chip.me { background: var(--red-soft); color: var(--red-dark); }
.chip .tag { font-size: 12px; font-weight: 600; color: var(--muted); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 0 0 4px; }
.chip button:hover { color: var(--red-dark); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.facts b { color: var(--ink); }
.note-box { background: #fff8e6; border: 1px solid #f2e2b6; border-radius: 12px; padding: 10px 14px; font-size: 15px; margin-top: 10px; white-space: pre-wrap; }
.count-big { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--green); margin-bottom: 10px; }

.share-link { display: flex; gap: 8px; align-items: center; background: #f6efe4; border-radius: 12px; padding: 6px 6px 6px 14px; margin: 12px 0; }
.share-link code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }

/* The reveal */
.reveal { text-align: center; background: linear-gradient(160deg, #c42a3c 0%, #8f1a2a 100%); color: #fff; border: 0; padding: 30px 22px 26px; position: relative; overflow: hidden; }
.reveal::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1.5px, transparent 1.6px); background-size: 22px 22px; pointer-events: none; opacity: .6; }
.reveal > * { position: relative; z-index: 1; }
.reveal .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; opacity: .85; margin-bottom: 8px; }
.reveal .who { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 10vw, 54px); line-height: 1.1; margin: 6px 0 10px; word-wrap: break-word; }
.reveal .who.hidden { filter: blur(14px); user-select: none; }
.reveal .btn { background: #fff; color: var(--red-dark); }
.reveal .btn:hover { background: #fdf1f2; }
.reveal .sub { opacity: .9; font-size: 15px; }
.wish { white-space: pre-wrap; background: #f6efe4; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.wish a { word-break: break-all; }

.thread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; max-height: 320px; overflow-y: auto; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg.theirs { background: #f1ebe1; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.mine { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.compose { display: flex; gap: 8px; }
.compose input { flex: 1; }

.organizer { border-color: #d9e8df; background: #fbfefc; }
.organizer .label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.pairs { list-style: none; padding: 0; margin: 8px 0 12px; }
.pairs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: #f6efe4; border-radius: 10px; margin-bottom: 6px; font-size: 15px; }
.reveal-list { list-style: none; padding: 0; margin: 0; }
.reveal-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.reveal-list li:last-child { border-bottom: 0; }
.start-own { background: var(--green-soft); border-color: #cfe6d9; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; opacity: 0; transition: all .2s; pointer-events: none; z-index: 10; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.hide { display: none !important; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.legal { padding-bottom: 40px; }
.legal h2 { font-size: 22px; margin-top: 28px; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 12px; }
  .top nav a.hide-sm { display: none; }
}
@media (max-width: 460px) {
  .row { flex-direction: column; gap: 0; }
  .card { padding: 18px; }
  .compare { font-size: 14px; }
  .compare th, .compare td { padding: 10px 8px; }
}
