:root {
  --bg: #f4f1ea;
  --card: #fffdf8;
  --text: #1f211d;
  --muted: #6f7269;
  --line: #ded9cf;
  --accent: #2f5d50;
  --accent-soft: #dfe9e4;
  --shadow: 0 12px 30px rgba(31, 33, 29, 0.07);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(47,93,80,.08), transparent 34%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button, textarea, select { font: inherit; }

button { color: inherit; }

.app-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 10vw, 3.2rem);
  line-height: .95;
  letter-spacing: -.05em;
}

h2 {
  font-size: 1.45rem;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

h3 { font-size: 1rem; margin-bottom: 12px; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 800;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.icon-button,
.back-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  font-size: 1.2rem;
}

.back-button {
  padding: 0;
  margin-bottom: 22px;
  color: var(--accent);
  font-weight: 700;
}

.status-card,
.hero-card,
.list-card,
.result-card {
  background: var(--card);
  border: 1px solid rgba(222,217,207,.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  margin-bottom: 30px;
}

.status-card p {
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.35;
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #5e9b76;
  box-shadow: 0 0 0 5px rgba(94,155,118,.13);
}

.action-grid {
  display: grid;
  gap: 12px;
}

.action-card {
  display: flex;
  text-align: left;
  width: 100%;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.88);
  box-shadow: 0 5px 18px rgba(31,33,29,.04);
  cursor: pointer;
}

.action-card:active { transform: scale(.99); }

.action-card .emoji { font-size: 1.8rem; }

.action-card strong,
.action-card small {
  display: block;
}

.action-card strong {
  font-size: 1.03rem;
  margin-bottom: 4px;
}

.action-card small {
  color: var(--muted);
  line-height: 1.25;
}

.mini-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .83rem;
  padding: 18px 5px;
}

.view { display: none; }
.view.active { display: block; }

.segmented-block {
  margin: 24px 0;
}

.segmented-block label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  padding: 10px 13px;
  cursor: pointer;
}

.chip.selected {
  background: var(--accent-soft);
  border-color: rgba(47,93,80,.35);
  color: #24483f;
  font-weight: 800;
}

.primary-button,
.secondary-button {
  width: 100%;
  border-radius: 16px;
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: white;
  border: 0;
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
  margin-top: 14px;
}

.result-card,
.hero-card,
.list-card {
  padding: 18px;
  margin-top: 18px;
}

.result-card strong {
  display: block;
  font-size: 1.3rem;
  margin: 5px 0 8px;
}

.hidden { display: none; }

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255,255,255,.78);
  color: var(--text);
  outline: none;
}

textarea:focus,
select:focus {
  border-color: rgba(47,93,80,.65);
  box-shadow: 0 0 0 4px rgba(47,93,80,.08);
}

.capture-types { margin: 13px 0 18px; }

.feedback {
  min-height: 22px;
  margin: 10px 2px 0;
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-row h3 { margin-bottom: 0; }

.text-button {
  color: var(--muted);
  padding: 6px;
}

.capture-list { margin-top: 12px; }

.capture-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.capture-item:first-child { border-top: 0; }

.capture-item p {
  margin-bottom: 4px;
  line-height: 1.35;
}

.capture-item small { color: var(--muted); }

.hero-card small {
  display: block;
  font-weight: 900;
  letter-spacing: .11em;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-card strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.hero-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.timeline-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-of-type { border-top: 0; }

.timeline-item span {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 800;
}

.timeline-item p { margin: 0; }

.checklist {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.65);
}

.check-item input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.check-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

@media (min-width: 700px) {
  body { padding-top: 34px; }
}
