:root {
  --ink: #16213b;
  --muted: #667085;
  --paper: #fffaf2;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(22, 33, 59, 0.12);
  --coral: #f47e61;
  --coral-dark: #dc654a;
  --gold: #f2bd5a;
  --mint: #77bba8;
  --mint-light: #dff2ec;
  --danger: #b53c42;
  --shadow: 0 24px 70px rgba(40, 43, 70, 0.12);
  --small-shadow: 0 10px 30px rgba(40, 43, 70, 0.08);
  --radius: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
}
.ambient-one { top: -300px; right: -170px; background: radial-gradient(circle, #ffd0bf, transparent 68%); }
.ambient-two { bottom: -350px; left: -180px; background: radial-gradient(circle, #bce6db, transparent 68%); }

.topbar {
  width: min(1120px, calc(100% - 36px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--ink);
}
.brand-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.brand-mark i:nth-child(2) { background: var(--gold); }
.brand-mark i:nth-child(3) { background: var(--mint); }

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 15px;
  border-radius: 999px;
}
.nav-link:hover { background: rgba(255,255,255,.7); color: var(--ink); }

main { min-height: calc(100vh - 138px); }
.shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.narrow { width: min(720px, calc(100% - 36px)); margin: 0 auto; }

.hero {
  min-height: 670px;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(42px, 8vw, 100px);
  align-items: center;
  padding: 56px 0 88px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #a94e38;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--coral); }

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin: 18px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 7vw, 88px);
  line-height: .96;
  letter-spacing: -.055em;
  font-weight: 500;
}
h1 em { color: var(--coral); font-weight: 500; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; }
h3 { font-size: 20px; letter-spacing: -.02em; }
.lede { color: var(--muted); font-size: 18px; max-width: 580px; }

.join-box {
  display: flex;
  max-width: 520px;
  gap: 10px;
  margin-top: 34px;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  border-radius: 19px;
  box-shadow: var(--small-shadow);
}
.join-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 14px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; outline: none; color: var(--ink); }

.button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(22,33,59,.18); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.button.coral { background: var(--coral); }
.button.coral:hover { background: var(--coral-dark); }
.button.secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button.danger { color: var(--danger); background: #fff4f3; border: 1px solid rgba(181,60,66,.16); }
.button.small { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 12px; }
.button.wide { width: 100%; }

.orbit-card {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit { position: absolute; width: 390px; height: 390px; max-width: 100%; border: 1px solid rgba(22,33,59,.10); border-radius: 50%; animation: float 8s ease-in-out infinite; }
.orbit::after { content: ''; position: absolute; inset: 45px; border: 1px dashed rgba(22,33,59,.12); border-radius: 50%; }
.person { position: absolute; z-index: 2; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; color: white; font: 600 32px Georgia, serif; border: 8px solid var(--paper); box-shadow: var(--small-shadow); }
.person.one { top: 10px; left: calc(50% - 46px); background: var(--coral); }
.person.two { top: 175px; right: -2px; background: var(--gold); color: var(--ink); }
.person.three { bottom: 8px; left: 55px; background: var(--mint); }
.person.four { top: 175px; left: -2px; background: var(--ink); }
.center-note { width: 190px; text-align: center; z-index: 3; background: rgba(255,250,242,.82); backdrop-filter: blur(8px); padding: 22px; border-radius: 50%; }
.center-note strong { display: block; font-family: Georgia, serif; font-size: 26px; line-height: 1.05; }
.center-note span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 100px; }
.step-card, .card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius);
  box-shadow: var(--small-shadow);
}
.step-card { padding: 28px; }
.step-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--mint-light); font-weight: 900; margin-bottom: 30px; }
.step-card:nth-child(2) .step-number { background: #fff0d1; }
.step-card:nth-child(3) .step-number { background: #ffe0d8; }
.step-card p { color: var(--muted); margin-bottom: 0; }

.page-head { padding: 58px 0 28px; text-align: center; }
.page-head h2 { margin: 10px auto 14px; max-width: 650px; }
.page-head p { color: var(--muted); }
.event-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--mint-light); font-size: 12px; font-weight: 800; }
.event-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

.card { padding: clamp(22px, 4vw, 38px); margin-bottom: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 28px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > legend { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 850; }
.field-note { display: block; margin-top: -6px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
fieldset { border: 0; padding: 0; min-width: 0; }
.input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(119,187,168,.16); }
.input.code { text-transform: uppercase; letter-spacing: .14em; font-weight: 850; }
.questionnaire-intro { max-width: 480px; margin: 16px auto 0; font-size: 14px; }
.about-field { padding: 20px; background: #f1f8f5; border: 1px solid rgba(119,187,168,.4); border-radius: 17px; }
.about-input { display: block; min-height: 130px; padding: 14px 15px; resize: vertical; line-height: 1.6; }
.field-counter { margin-top: 7px; font-size: 12px; color: var(--muted); text-align: right; }
.field small { color: var(--muted); font-weight: 500; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid.stacked { grid-template-columns: 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { min-height: 46px; height: 100%; padding: 11px 13px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); color: #4b556b; font-size: 13px; font-weight: 700; cursor: pointer; transition: .15s ease; }
.choice input:checked + span { color: var(--ink); background: var(--mint-light); border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.choice input:focus-visible + span { outline: 3px solid rgba(244,126,97,.35); }

.consent { display: flex; align-items: flex-start; gap: 11px; padding: 16px; background: #f8f5ee; border-radius: 13px; font-size: 12px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--ink); }
.error-box { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; color: var(--danger); background: #fff0ef; border: 1px solid rgba(181,60,66,.12); font-size: 13px; font-weight: 700; }
.hidden { display: none !important; }

.waiting-card { text-align: center; padding: clamp(34px, 7vw, 68px); }
.pulse { width: 100px; height: 100px; margin: 0 auto 28px; border-radius: 50%; background: var(--mint-light); display: grid; place-items: center; position: relative; }
.pulse::before, .pulse::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--mint); border-radius: inherit; animation: pulse 2.5s ease-out infinite; }
.pulse::after { animation-delay: 1.25s; }
.pulse .brand-mark { width: 48px; height: 48px; border-radius: 16px; }
@keyframes pulse { from { transform: scale(.9); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.waiting-card h2 { margin-bottom: 12px; }
.waiting-card p { color: var(--muted); max-width: 480px; margin: 0 auto 18px; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #4a806f; }
.status-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.assignment { overflow: hidden; padding: 0; }
.assignment-top { padding: 34px; color: white; background: var(--ink); }
.assignment-top .eyebrow { color: #ffb8a8; }
.assignment-top h2 { margin: 12px 0 6px; }
.assignment-top p { margin: 0; color: rgba(255,255,255,.68); }
.assignment-body { padding: 32px; }
.member-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0 30px; }
.member { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.member.self { border-color: var(--coral); background: #fff6f3; }
.member strong { display: block; }
.member span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.member, .participant-row { min-width: 0; overflow-wrap: anywhere; }
.member-about { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.participant-about { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.shared-section { margin: 30px 0; }
.section-note { margin: 8px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.shared-interests { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.shared-interest { max-width: 100%; padding: 12px 15px; border: 1px solid #bfdfd4; border-radius: 14px; background: var(--mint-light); overflow-wrap: anywhere; }
.shared-interest strong { display: block; font-size: 14px; }
.shared-interest span { display: block; margin-top: 3px; color: #376655; font-size: 12px; }
.discussion-section { padding: 22px; border-radius: 17px; background: #fff0d1; }
.discussion-questions { margin: 0; padding-left: 26px; }
.discussion-questions li { padding: 14px 0 14px 8px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.discussion-questions li + li { border-top: 1px solid rgba(150, 108, 32, .18); }
.discussion-questions li::marker { color: #825b15; font-weight: 800; }

.organizer-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 24px; }
.organizer-tabs button { border: 0; border-radius: 999px; padding: 9px 15px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.organizer-tabs button.active { background: var(--ink); color: white; }

.dashboard { width: min(1180px, calc(100% - 30px)); margin: 0 auto; padding: 30px 0 70px; }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 20px 0 24px; }
.dashboard-head h2 { margin: 7px 0 3px; }
.dashboard-head p { margin: 0; color: var(--muted); }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.metric { padding: 20px; border-radius: 18px; background: white; border: 1px solid var(--line); }
.metric strong { display: block; font: 500 34px Georgia, serif; }
.metric span { color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 20px; align-items: start; }
.qr-panel { text-align: center; position: sticky; top: 20px; }
.qr-wrap { width: min(280px, 100%); margin: 18px auto; padding: 14px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.qr-wrap img { width: 100%; display: block; }
.join-link { display: flex; gap: 8px; }
.join-link .input { font-size: 11px; }
.network-hint { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

.participant-list { display: grid; gap: 9px; }
.participant-row { display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr auto; gap: 12px; align-items: center; padding: 13px 15px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.participant-row strong { overflow: hidden; text-overflow: ellipsis; }
.participant-row span { color: var(--muted); font-size: 11px; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 17px; }
.group-preview { margin-top: 25px; }
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.group { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fdfcf9; }
.group strong { display: block; margin-bottom: 8px; }
.group span { display: block; color: var(--muted); font-size: 12px; }
.status-badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-open { color: #39715f; background: var(--mint-light); }
.status-published { color: #8b5d0d; background: #fff0d1; }
.status-closed { color: var(--danger); background: #fff0ef; }

.privacy-copy h3 { margin-top: 30px; }
.privacy-copy p, .privacy-copy li { color: var(--muted); }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 17px; border-radius: 999px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: 13px; font-weight: 750; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading-screen { min-height: 65vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.spinner { display: block; width: 36px; height: 36px; margin: 0 auto 12px; border: 3px solid var(--line); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { min-height: 64px; width: min(1120px, calc(100% - 36px)); margin: 0 auto; display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; min-height: auto; }
  .hero-visual { display: none; }
  .steps { grid-template-columns: 1fr; margin-top: 50px; }
  .step-card { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; }
  .step-number { grid-row: span 2; margin: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .qr-panel { position: static; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .dashboard-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .topbar { min-height: 64px; }
  .shell, .narrow { width: min(100% - 24px, 720px); }
  h1 { font-size: clamp(48px, 15vw, 66px); }
  .lede { font-size: 16px; }
  .join-box { flex-direction: column; border-radius: 17px; }
  .join-box input { min-height: 48px; text-align: center; }
  .page-head { padding-top: 36px; }
  .card { border-radius: 20px; }
  .form-grid, .choice-grid.three { grid-template-columns: 1fr; }
  .choice-grid { gap: 8px; }
  .choice span { font-size: 12px; }
  .input { font-size: 16px; }
  .member-list, .group-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid .metric:last-child { grid-column: span 2; }
  .participant-row { grid-template-columns: 1fr auto; }
  .participant-row > span { grid-column: 1; }
  .participant-row button { grid-column: 2; grid-row: 1 / span 2; }
  .dashboard { width: min(100% - 20px, 1180px); }
  .footer-dot, footer > span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
