:root {
  --bg: #f6f8fa;
  --card-bg: #ffffff;
  --text-primary: #12283c;
  --text-secondary: #5b6b7a;
  --border: #e3e8ee;
  --brand: #0f5c4c;
  --brand-hover: #0c4a3d;
  --brand-text: #ffffff;
  --radius-card: 16px;
  --radius-control: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720;
    --card-bg: #17222c;
    --text-primary: #eef3f7;
    --text-secondary: #9fb0bd;
    --border: #2a3a47;
    --brand: #29b088;
    --brand-hover: #22a17b;
    --brand-text: #0f1720;
  }
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.app-header h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.4rem; }
.disclaimer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px rgba(18, 40, 60, 0.05);
}
.card h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; }

label {
  display: block;
  margin: 0.9rem 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
label:first-of-type { margin-top: 0; }

input, textarea, select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

button {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  background: var(--brand);
  color: var(--brand-text);
  border: none;
  border-radius: var(--radius-control);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--brand-hover); }

pre {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.85rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

#save-result, #load-result:not(pre) { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem; }

.stage {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-control);
  font-size: 0.95rem;
  font-weight: 600;
}
.stage-ok { background: #e6f4ea; color: #1e4620; }
.stage-warn { background: #fff4e5; color: #663c00; }
.stage-danger { background: #fdecea; color: #611a15; }

.deadline-list {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.deadline-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.deadline-list li:last-child { border-bottom: none; }
