:root {
  color-scheme: dark;
  --bg: #0b0b12;
  --bg-elev: #15151f;
  --bg-elev-2: #1c1c29;
  --border: #2a2a3a;
  --text: #f2f2f7;
  --text-dim: #9797ad;
  --accent: #a78bfa;
  --fertile-1: #16a34a;
  --fertile-2: #22c55e;
  --wait-1: #4338ca;
  --wait-2: #6366f1;
  --danger: #ef4444;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 2rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.95rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.form-card h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#person-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#person-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

#person-form input {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

#person-form input:focus {
  outline: none;
  border-color: var(--accent);
}

#person-form button {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

#person-form button:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

#people-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.person-card {
  margin-bottom: 0;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.person-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.delete-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  opacity: 0.7;
  line-height: 1;
}

.delete-btn:active {
  background: rgba(239, 68, 68, 0.15);
  opacity: 1;
}

.status-banner {
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.status-banner.fertile {
  background: linear-gradient(135deg, var(--fertile-1), var(--fertile-2));
  box-shadow: 0 0 0 1px rgba(34,197,94,0.35), 0 8px 24px rgba(34,197,94,0.25);
}

.status-banner.wait {
  background: linear-gradient(135deg, var(--wait-1), var(--wait-2));
  box-shadow: 0 0 0 1px rgba(99,102,241,0.35), 0 8px 24px rgba(99,102,241,0.2);
}

.status-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.status-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.01em;
}

.status-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.detail-label {
  color: var(--text-dim);
}

.detail-value {
  font-weight: 600;
  text-align: right;
}

footer {
  text-align: center;
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 420px) {
  header h1 { font-size: 2.2rem; }
  .status-emoji { font-size: 2.8rem; }
  .status-text { font-size: 1.3rem; }
}
