:root {
  --green: #53B175;
  --green-dark: #3d8f5a;
  --green-soft: #eef8f1;
  --ink: #181725;
  --muted: #7C7C7C;
  --line: #E2E2E2;
  --bg: #FCFCFC;
  --white: #FFFFFF;
  --danger: #F3603F;
  --warn: #F8A44C;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
  --font: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(24, 23, 37, 0.06);
}

.page {
  padding: 20px 20px calc(var(--nav-h) + 20px);
  min-height: 100dvh;
}
body.no-nav .page { padding-bottom: 28px; }

.hero-brand {
  text-align: center;
  padding: 28px 8px 12px;
}
.hero-brand .mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, #69c48a, var(--green));
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(83, 177, 117, 0.35);
}
.hero-brand h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h1, h2, h3 { letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.disclaimer {
  background: #fff8e8;
  border: 1px solid #f5e2b8;
  color: #6b5420;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 14px 0;
}

.card-list { display: grid; gap: 12px; margin-top: 16px; }
.action-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s, transform 0.15s;
}
.action-card:active { transform: scale(0.98); }
.action-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.action-card .icon.urgent { background: #fde8e2; color: var(--danger); }
.action-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.action-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.recipient-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--green-soft);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.recipient-bar strong { display: block; }
.recipient-bar .link {
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  border: none;
  background: var(--green);
  color: white;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}
.btn:active { background: var(--green-dark); }
.btn.secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.danger { background: var(--danger); }
.btn.ghost {
  background: transparent;
  color: var(--green-dark);
  border: none;
  min-height: 44px;
}
.btn-row { display: grid; gap: 10px; margin-top: 18px; }

.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--white);
  color: var(--ink);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.errorlist {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.choice-grid { display: grid; gap: 10px; }
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}
.choice input { margin-top: 3px; accent-color: var(--green); width: 18px; height: 18px; }

.outcome {
  border-radius: 18px;
  padding: 18px;
  margin: 16px 0;
  background: var(--green-soft);
  border: 1px solid #cfe9d8;
}
.outcome.urgent { background: #fde8e2; border-color: #f5c2b4; }
.outcome.prompt, .outcome.warn { background: #fff3e4; border-color: #f5d5a8; }
.outcome h2 { margin-top: 0; }
.guidance {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.95rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 4px;
}

.list-row {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  height: var(--nav-h);
  padding: 8px 6px var(--safe-bottom);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.nav-item.active { color: var(--green); }
.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.toast-stack {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 16px 0;
}
.toast {
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.toast-success { background: var(--green-dark); }
.toast-error { background: var(--danger); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
}
.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.tel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
}
.tel-btn.urgent {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.tel-btn .phone { font-weight: 800; font-size: 1.1rem; }

.login-wrap { padding-top: 40px; }
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin-top: 18px;
}

@media (min-width: 768px) {
  body { background: #f0f4f1; }
}
