:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --danger: #f87171;
  --radius: 10px;
  --nav-height: 4.75rem;
  --topbar-height: 3rem;
  --iti-border-color: #2c3a50;
  --iti-country-selector-bg: #121a26;
  --iti-icon-color: var(--muted);
  --iti-hover-color: rgba(255, 255, 255, 0.06);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.muted.small {
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

label {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #2c3a50;
  background: #121a26;
  color: var(--text);
}

.phone-field .iti {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}

.phone-field .iti input {
  width: 100%;
  margin-top: 0;
  padding-left: 0.65rem;
}

.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid #243044;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    max-width: 960px;
  }
}

.tab-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 0.35rem;
  padding-bottom: 0.25rem;
}

.tab-panel-compact {
  padding-top: 0;
}

.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.tab-panel.active {
  display: flex;
}

.tab-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.row label {
  flex: 1 1 160px;
  margin-top: 0;
}

.row label.flex-grow {
  flex: 1 1 200px;
}

.hidden {
  display: none !important;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.link {
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.results li button,
.resident-btn {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  border: 1px solid #2c3a50;
  background: #121a26;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  font: inherit;
}

.results li button .result-name,
.resident-btn .result-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.results li button .result-address,
.resident-btn .result-address {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: pre-wrap;
  word-break: break-word;
}

.results li button .result-distance,
.resident-btn .result-distance {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}

.results li button:hover,
.resident-btn:hover {
  border-color: var(--accent);
}

.address-card {
  background: var(--surface);
  border: 1px solid #243044;
  border-radius: var(--radius);
  overflow: hidden;
}

.address-card-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #243044;
  background: #151d2a;
}

.address-card-header .address-line {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}

.address-card-header .address-distance {
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 0.2rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.address-card-residents {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0;
}

.address-card-residents li {
  margin: 0;
}

.address-card-residents .resident-btn {
  margin-bottom: 0;
  padding: 0.7rem 0.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid #1e2a3c;
}

.address-card-residents li:last-child .resident-btn {
  border-bottom: none;
}

.address-card-residents .resident-btn .result-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.address-card-residents .resident-btn:hover {
  background: #121a26;
}

.address-groups {
  margin-top: 0.25rem;
}

.address-card {
  margin-bottom: 0.5rem;
}

.nearby-toolbar {
  flex-shrink: 0;
  padding: 0 0 0.35rem;
}

.search-bar,
.search-field {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #2c3a50;
  background: #121a26;
  color: var(--text);
  font-size: 1rem;
}

.search-bar:disabled {
  opacity: 0.65;
}

.mobile-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-bottom: 0.35rem;
}

.mobile-search-form .search-field {
  margin-top: 0;
}

.search-sheet {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
  padding: 0.6rem 0.65rem 0.7rem;
  border-radius: 14px;
  background: linear-gradient(165deg, #1c2738 0%, #151d2a 55%, #121a26 100%);
  border: 1px solid #2a3a52;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.search-lead {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #9eb0c8;
  font-style: italic;
}

.unified-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.search-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: 10px;
  background: rgba(15, 20, 28, 0.45);
  border: 1px solid rgba(44, 58, 80, 0.65);
}

.search-cluster-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d82a0;
}

.search-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

@media (max-width: 380px) {
  .search-field-row {
    grid-template-columns: 1fr;
  }
}

.search-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  font-size: inherit;
}

.search-field-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #a8b8d0;
  letter-spacing: 0.01em;
}

.search-input {
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.58rem;
  border-radius: 8px;
  border: 1px solid #2c3a50;
  background: rgba(18, 26, 38, 0.9);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input::placeholder {
  color: #5c6d85;
  font-size: 0.88rem;
}

.search-input:focus {
  outline: none;
  border-color: #4a7fd4;
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.18);
}

.btn-search-submit {
  width: 100%;
  margin-top: 0;
  padding: 0.58rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-search-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.btn-search-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-search-loading.hidden {
  display: none;
}

.btn-search-submit.is-loading .btn-search-label {
  display: none;
}

.btn-search-submit.is-loading .btn-search-loading {
  display: inline-flex;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-loading.hidden {
  display: none;
}

.search-spinner {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #2c3a50;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}

@keyframes search-spin {
  to {
    transform: rotate(360deg);
  }
}

.address-search-hint {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.address-search-hint strong {
  color: #a8b8d0;
  font-weight: 600;
}

.btn-block {
  width: 100%;
  padding: 0.7rem 1rem;
  margin-top: 0.15rem;
  font-size: 1rem;
}

.status-inline {
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--danger);
}

.status-inline.hidden {
  display: none;
}

.location-help {
  flex-shrink: 0;
  margin-top: 0.5rem;
  padding: 1rem 1rem 1rem 0.9rem;
  background: #3a2a14;
  border: 1px solid #b45309;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

.location-help.hidden {
  display: none;
}

.location-help-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.location-help-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  color: #fbbf24;
}

.location-help-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fde68a;
  line-height: 1.3;
}

.location-help-lead {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: #fcd34d;
  line-height: 1.45;
  opacity: 0.95;
}

.location-help-steps {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: #fef3c7;
  line-height: 1.5;
}

.location-help-steps li {
  margin-bottom: 0.5rem;
}

.location-help-steps li:last-child {
  margin-bottom: 0;
}

.location-help-steps strong {
  color: #fff;
  font-weight: 600;
}

.location-help-note {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: #fbbf24;
  line-height: 1.4;
}

.location-help-note strong {
  color: #fde68a;
}

.location-help .btn.primary {
  background: #d97706;
  color: #1a1208;
  font-weight: 700;
}

.location-help .btn.primary:active {
  background: #f59e0b;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 0.75rem);
  transform: translateX(-50%) translateY(1rem);
  z-index: 1000;
  max-width: calc(100% - 2rem);
  width: max-content;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  background: #1e3a2f;
  border: 1px solid #2d6a4f;
  color: #b7e4c7;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast.error {
  background: #3a1e1e;
  border-color: #6a2d2d;
  color: #f8b4b4;
}

.person-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.person-header-main {
  flex: 1;
  min-width: 0;
}

.person-label {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.person-address {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.captain-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 2px solid #c9a227;
  background: rgba(201, 162, 39, 0.15);
  color: #e8c547;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.captain-toggle:has(input:checked) {
  background: linear-gradient(180deg, #e8c547 0%, #c9a227 100%);
  border-color: #e8c547;
  color: #1a1408;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.45);
}

.captain-toggle input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: #1a1408;
}

.captain-toggle-text {
  line-height: 1;
}

.person-flags {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-evenly;
  align-items: flex-start;
  width: 100%;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.flag-toggle {
  display: inline-flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.flag-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.flag-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 6rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  border: 2px solid #3a4a63;
  background: rgba(36, 48, 68, 0.55);
  color: #8b9cb3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.flag-toggle-icon svg {
  width: 1.85rem;
  height: 1.85rem;
}

.flag-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.1;
}

.option-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

.option-check-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.option-check-on {
  display: none;
}

.option-check-off {
  display: block;
}

.support-btn .option-check-icon {
  display: none;
}

.support-btn .option-check-off {
  display: none;
}

.support-btn.is-selected .option-check-icon {
  display: inline-flex;
}

.support-btn.is-selected .option-check-on {
  display: block;
}

.flag-toggle:has(input:checked) .option-check-on {
  display: block;
}

.flag-toggle:has(input:checked) .option-check-off {
  display: none;
}

.flag-toggle-sign:has(input:checked) .flag-toggle-icon {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.flag-toggle-sign:has(input:checked) .flag-toggle-label {
  color: #93c5fd;
}

.flag-toggle-volunteer:has(input:checked) .flag-toggle-icon {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25);
}

.flag-toggle-volunteer:has(input:checked) .flag-toggle-label {
  color: #86efac;
}

.flag-toggle-donor:has(input:checked) .flag-toggle-icon {
  border-color: #f472b6;
  background: rgba(244, 114, 182, 0.15);
  color: #f9a8d4;
  box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.25);
}

.flag-toggle-donor:has(input:checked) .flag-toggle-label {
  color: #f9a8d4;
}

.person-tags {
  margin: 0.65rem 0 0;
}

.tags-legend {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--tag-color, var(--accent));
  background: var(--tag-bg, rgba(91, 141, 239, 0.12));
  color: var(--tag-fg, var(--text));
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tag-pill.is-selected {
  background: var(--tag-color, var(--accent));
  color: #fff;
  border-color: var(--tag-color, var(--accent));
}

.tag-pill.is-inactive {
  opacity: 0.75;
  border-style: dashed;
}

.tag-pill .tag-checkbox {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--tag-color, var(--accent));
}

.tag-pill.is-selected .tag-checkbox {
  accent-color: #fff;
}

.tags-other-dropdown {
  position: relative;
  margin-top: 0.65rem;
}

.tags-other-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #2c3a50;
  background: #121a26;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tags-other-toggle-label {
  font-weight: 600;
  color: var(--muted);
}

.tags-other-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tags-other-summary {
  font-size: 0.82rem;
  color: var(--text);
  text-align: right;
}

.tags-other-chevron {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.tags-other-dropdown.is-open .tags-other-chevron {
  transform: rotate(180deg);
}

.tags-other-dropdown.is-open .tags-other-toggle {
  border-color: var(--accent);
}

.tags-other-menu {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 0.35rem;
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px solid #2c3a50;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tags-other-menu.hidden {
  display: none;
}

.tags-other-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.88rem;
  cursor: pointer;
}

.tags-other-option:hover {
  background: #121a26;
}

.tags-other-option.is-inactive {
  opacity: 0.75;
}

.tags-other-option .tag-checkbox {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.tags-other-option-label {
  line-height: 1.3;
}

#person-form #btn-save {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.65rem 1rem;
}

.error {
  color: var(--danger);
  margin-bottom: 0.75rem;
}

.inline {
  display: inline;
  margin: 0;
}

.fieldset-support {
  border: 1px solid #2c3a50;
  border-radius: 8px;
  padding: 0.65rem 1rem 0.85rem;
  margin: 1rem 0 0;
}

.fieldset-support-first {
  margin-top: 0.75rem;
}


.fieldset-support legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.support-buttons {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-evenly;
  width: 100%;
  margin-top: 0.35rem;
}

.support-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease;
}

.support-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid #2c3a50;
  background: #121a26;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.support-btn-icon svg {
  width: 1.85rem;
  height: 1.85rem;
}

.support-btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.15;
  text-align: center;
  max-width: 5rem;
}

.support-btn:active {
  transform: scale(0.96);
}

.support-btn-happy {
  color: #4ade80;
}

.support-btn-neutral {
  color: #fbbf24;
}

.support-btn-sad {
  color: #f87171;
}

.support-btn-nothome {
  color: #8b9cb3;
}

.support-btn-happy.is-selected .support-btn-icon {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
}

.support-btn-happy.is-selected .support-btn-label {
  color: #86efac;
}

.support-btn-neutral.is-selected .support-btn-icon {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
}

.support-btn-neutral.is-selected .support-btn-label {
  color: #fde047;
}

.support-btn-sad.is-selected .support-btn-icon {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.support-btn-sad.is-selected .support-btn-label {
  color: #fca5a5;
}

.support-btn-nothome.is-selected .support-btn-icon {
  border-color: #8b9cb3;
  background: rgba(139, 156, 179, 0.15);
  color: #b8c5d9;
}

.support-btn-nothome.is-selected .support-btn-label {
  color: #b8c5d9;
}

.radio-row,
.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.radio-row:first-of-type,
.checkbox-row {
  margin-top: 0.35rem;
}

.radio-row input[type="radio"],
.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

#person-form .person-form-checkbox {
  margin-top: 0.75rem;
}

.bottom-nav {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid #243044;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: var(--nav-height);
  padding: 0.5rem 0.35rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.nav-item .nav-icon {
  width: 1.85rem;
  height: 1.85rem;
}

.nav-item.active {
  color: var(--accent);
}

.nav-label {
  line-height: 1.15;
  letter-spacing: 0.01em;
}
