:root {
  --teal: #00d9c0;
  --teal-dark: #00b8a3;
  --ink: #000000;
  --bg: #f5f9f8;
  --card: #ffffff;
  --text: #16211f;
  --text-muted: #6b7876;
  --border: #e2ebe9;
  --danger: #e14848;
  --danger-tint: #fde8e8;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
body { padding-bottom: 40px; }
img { max-width: 100%; }

/* top bar: non-clickable brand mark */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.topbar .brand {
  font-weight: 800; font-size: 17px; color: var(--ink);
  cursor: default; user-select: none;
  display: flex; align-items: center; gap: 6px;
}
.topbar .brand .dot { color: var(--teal-dark); }

.wrap { max-width: 480px; margin: 0 auto; padding: 20px 18px 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
}

h1.page-title { font-size: 21px; font-weight: 800; margin: 4px 0 6px; }
p.page-desc { font-size: 14.5px; color: var(--text-muted); margin: 0 0 20px; line-height: 1.6; }

.profile-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--teal);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 14.5px;
  flex-wrap: wrap;
}
.profile-bar .chip {
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
}

/* form elements */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 15px 16px;
  font-size: 17px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.field select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7876' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  padding-right: 44px;
}
.field select:invalid { color: var(--text-muted); }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal-dark); }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.login-lead {
  font-size: 19px; font-weight: 700; line-height: 1.5;
  color: var(--text); margin: 4px 0 22px;
}

.party-select-list { display: flex; flex-direction: column; gap: 10px; }
.party-option {
  display: block; cursor: pointer;
  border: 2px solid var(--border); border-radius: 14px;
  padding: 14px 16px;
  transition: background 0.15s, border-color 0.15s;
}
.party-option input { display: none; }
.party-option-body { display: flex; flex-direction: column; gap: 4px; }
.party-option-title { font-weight: 800; font-size: 15.5px; color: var(--text); }
.party-option-meta { font-size: 13px; color: var(--text-muted); }
.party-option:has(input:checked) {
  background: var(--teal); border-color: var(--teal-dark);
}
.party-option:has(input:checked) .party-option-title,
.party-option:has(input:checked) .party-option-meta {
  color: var(--ink);
}

.gender-toggle { display: flex; gap: 10px; }
.gender-toggle label {
  flex: 1; text-align: center;
  padding: 16px 0; border-radius: 14px;
  border: 2px solid var(--border);
  font-weight: 700; font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.gender-toggle input { display: none; }
.gender-toggle input:checked + label {
  background: var(--teal); border-color: var(--teal-dark); color: var(--ink);
}

/* buttons: big, touch-friendly */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 18px 20px;
  font-size: 17px; font-weight: 800;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--teal); color: var(--ink); }
.btn-primary:disabled { opacity: 0.45; }
.btn-outline { background: #fff; border: 2px solid var(--border); color: var(--text); margin-top: 10px; }
.btn-link {
  background: none; border: none; color: var(--text-muted);
  text-decoration: underline; font-size: 13.5px; padding: 8px;
}

.status-box {
  text-align: center; padding: 40px 16px;
}
.status-box .emoji { font-size: 44px; margin-bottom: 14px; }
.status-box p { color: var(--text-muted); font-size: 15px; line-height: 1.7; white-space: pre-line; }

.result-hero {
  text-align: center; padding: 32px 20px;
  border-radius: var(--radius);
}
.result-hero.success { background: var(--teal); color: var(--ink); }
.result-hero.none { background: #fff; border: 1px solid var(--border); }
.result-hero .headline { font-size: 19px; font-weight: 800; margin-bottom: 10px; white-space: pre-line; }
.result-hero .pair-line { font-size: 22px; font-weight: 800; margin: 14px 0; }
.result-hero .contact {
  display: inline-block; margin-top: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px; padding: 8px 18px; font-weight: 700;
}
.result-hero.none .body-text { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; white-space: pre-line; }

.notice-banner {
  background: #fff8e1; border: 1px solid #f2e3a8;
  border-radius: 14px; padding: 14px 16px;
  font-size: 13.5px; color: #6b5a1c; margin-bottom: 16px; line-height: 1.6;
}

.error-banner {
  background: var(--danger-tint); color: var(--danger);
  border-radius: 14px; padding: 12px 16px;
  font-size: 13.5px; margin-bottom: 14px; font-weight: 600;
}

.footer-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 18px; }
