:root {
  --navy: #0b3d5c;
  --green: #2e8b57;
  --red: #c0392b;
  --red-bg: #fdecea;
  --amber-bg: #fff8e6;
  --amber-border: #f0c14b;
  --grey-bg: #f4f6f8;
  --border: #d8dee3;
  --text: #1c2733;
  --muted: #6b7a88;
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

.app-header {
  background: var(--navy);
  color: #fff;
  padding: 1.4rem 1.2rem 1.1rem;
  text-align: center;
}
.app-header h1 { margin: 0; font-size: 1.4rem; }
.app-header .subtitle { margin: 0.3rem 0 0; color: #cfe0ec; font-size: 0.9rem; }

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1rem 6rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--navy); }
.card.hidden, .hidden { display: none !important; }

.hint { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.88rem; }

.big-select {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.8rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.02rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist input[type="checkbox"] {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.checklist li.checked span { color: var(--green); text-decoration: line-through; text-decoration-color: var(--green); }

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notes-list li {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.6rem;
}
.notes-list li:last-child { margin-bottom: 0; }
.note-text { font-size: 1rem; margin: 0 0 0.4rem; white-space: pre-wrap; }
.note-meta { color: var(--muted); font-size: 0.8rem; margin: 0 0 0.6rem; }
.note-done-btn {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: #fff;
}

.bin-card p { margin: 0.2rem 0; }
.bin-card { background: #eef6ff; }

.submit-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}
.submit-bar button {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem;
  border-radius: 10px;
  border: none;
  background: var(--green);
  color: #fff;
}
.submit-bar button:disabled { background: #a9b4bd; }

#step-done { text-align: center; }
#step-done button {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  border: none;
  background: var(--navy);
  color: #fff;
  margin-top: 0.8rem;
}

.error-banner {
  max-width: 640px;
  margin: 0 auto 1rem;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem;
}

@media (min-width: 700px) {
  #app { max-width: 860px; }
}
