:root {
  --bg: #f8f5ef;
  --bg-soft: #f0ebe2;
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #5f6676;
  --line: #e4ddd1;
  --yes: #2f8a66;
  --no: #b8513c;
  --accent: #2b4a6f;
  --accent-ink: #ffffff;
  --accent-soft: #e5ecf5;
  --gold: #e9b949;
  --gold-soft: #fbf1d6;
  --shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 10px 28px rgba(29, 36, 51, .08);
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151c;
    --bg-soft: #171b24;
    --card: #1c212b;
    --ink: #eef1f6;
    --muted: #a6aebc;
    --line: #2c3341;
    --yes: #4fc59a;
    --no: #ee7d68;
    --accent: #9dbbe8;
    --accent-ink: #12151c;
    --accent-soft: #233046;
    --gold: #f2c75c;
    --gold-soft: #3a3220;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151c; --bg-soft: #171b24; --card: #1c212b; --ink: #eef1f6; --muted: #a6aebc; --line: #2c3341;
  --yes: #4fc59a; --no: #ee7d68; --accent: #9dbbe8; --accent-ink: #12151c; --accent-soft: #233046;
  --gold: #f2c75c; --gold-soft: #3a3220; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.5;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 6.5vw, 2.5rem); }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
main { flex: 1; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }

.testbar {
  background: var(--gold-soft); color: var(--ink); font-size: .85rem; text-align: center; padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.top { padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; }
.logo { position: relative; width: 30px; height: 26px; flex: none; }
.logo::before, .logo::after {
  content: ""; position: absolute; top: 0; width: 18px; height: 24px; border-radius: 5px; border: 2px solid var(--accent);
}
.logo::before { left: 0; transform: rotate(-9deg); background: var(--card); }
.logo::after { right: 0; transform: rotate(9deg); background: var(--gold); border-color: var(--gold); }

footer { padding: 28px 0 36px; color: var(--muted); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer a { color: var(--muted); }

/* building blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card.soft { background: var(--bg-soft); box-shadow: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 14px; padding: 12px 18px;
}
.btn.secondary { color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.btn.ghost { color: var(--muted); background: transparent; border: 1px dashed var(--line); font-weight: 600; }
.btn.danger { color: var(--no); background: transparent; border: 1px solid var(--line); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, .choice:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

label.field { display: block; font-weight: 650; margin-bottom: 6px; }
input[type="text"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: var(--no); font-weight: 600; margin: 0; min-height: 1.2em; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }

/* start */
.hero { padding: 8px 0 12px; }
.hero p { color: var(--muted); font-size: 1.05rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.choice {
  font: inherit; font-weight: 650; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 6px; cursor: pointer; min-height: 56px;
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.steps { margin: 0; padding-left: 1.2em; }
.steps li { margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: 8px; }

/* list view */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg-soft); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tab { font: inherit; font-weight: 650; color: var(--muted); background: transparent; border: 0; border-radius: 11px; padding: 10px 4px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.count { display: inline-block; min-width: 1.5em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--gold); color: #2b2205; font-size: .8rem; line-height: 1.5; }

.invite { border-style: dashed; }
.invite { padding: 16px; }
.invite h2 { font-size: 1.05rem; margin: 0; }

.deck { position: relative; height: 260px; margin: 4px 0 18px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.namecard {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
  padding: 24px 18px; text-align: center; will-change: transform; cursor: grab;
}
.namecard.next { transform: scale(.95) translateY(12px); opacity: .7; pointer-events: none; }
.namecard.dragging { cursor: grabbing; transition: none; }
.namecard.fly { transition: transform .28s ease-in, opacity .28s ease-in; }
.namecard.back { transition: transform .2s ease-out; }
.namecard .first { font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; overflow-wrap: anywhere; }
.namecard .last { font-size: 1.15rem; color: var(--muted); margin-top: 6px; }
.namecard .meta { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.namecard .stamp {
  position: absolute; top: 18px; padding: 4px 12px; border-radius: 10px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; opacity: 0; border: 2px solid currentColor;
}
.namecard .stamp.yes { left: 18px; color: var(--yes); transform: rotate(-10deg); }
.namecard .stamp.no { right: 18px; color: var(--no); transform: rotate(10deg); }
.gtag { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); margin-top: 10px; }

.controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.round {
  font: inherit; font-size: 1.6rem; line-height: 1; height: 64px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.round.no { color: var(--no); }
.round.yes { color: var(--yes); }
.round.undo { font-size: .95rem; height: 44px; padding: 0 14px; color: var(--muted); box-shadow: none; }
.round[disabled] { opacity: .4; cursor: default; }
.progress { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 14px; }
.keys { display: none; }
@media (hover: hover) and (pointer: fine) { .keys { display: block; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 650;
  box-shadow: var(--shadow); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.match { background: var(--gold); color: #2b2205; }

/* matches */
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.match {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px;
}
.match .mname { flex: 1; min-width: 0; }
.match .mname strong { font-size: 1.15rem; }
.match .mname span { display: block; color: var(--muted); font-size: .85rem; }
.match.both { border-color: var(--gold); background: var(--gold-soft); }
.iconbtn { font: inherit; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; cursor: pointer; color: var(--muted); }
.star { font-size: 1.2rem; line-height: 1; padding: 6px 9px; }
.star[aria-pressed="true"] { color: #b88a12; border-color: var(--gold); background: var(--gold-soft); }

/* paywall, filters */
.price { font-size: 1.6rem; font-weight: 750; }
.per-person { font-weight: 650; color: var(--accent); margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 1.4em; position: relative; margin-bottom: 6px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--yes); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; min-width: 40px;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.letters .chip { min-width: 38px; padding: 6px 0; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; font-size: .85rem; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--yes); margin-right: 8px; animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .namecard.fly, .namecard.back, .toast { transition: none; }
}
/* keep the swipe buttons above the fold on phones, even with the invitation shown */
.invite .btn { min-height: 44px; padding: 8px 12px; font-size: .95rem; }
.listhead { font-size: 1.45rem; margin-bottom: .15em; }
@media (max-height: 900px) { .deck { height: 230px; } .round { height: 58px; } }
.hero-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: var(--radius); margin: 0 0 16px; background: var(--bg-soft); }

/* Frequently asked questions below the landing view (static HTML, also read by search engines) */
.faq { padding: 4px 0 28px; }
.faq h2 { margin: 0 0 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.faq[hidden] { display: none; }
