:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
}

* {
  box-sizing: border-box;
}

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

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 40px;
}

.app-header {
  padding: max(24px, env(safe-area-inset-top)) 20px 12px;
  text-align: center;
}

.app-header h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.last-filled {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.main {
  padding: 8px 16px 24px;
}

/* Picker */
.picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.picker-intro {
  text-align: center;
  color: var(--muted);
  margin: 0 0 6px;
}

.picker-btn, .done-btn, .submit-btn {
  font-size: 18px;
  font-weight: 600;
  padding: 18px;
  border-radius: 14px;
  border: none;
  background: var(--blue);
  color: white;
  cursor: pointer;
}

.picker-btn:active, .done-btn:active, .submit-btn:active {
  background: var(--blue-dark);
}

/* Card / field groups */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.field {
  margin-bottom: 22px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
}

.field-tag {
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.field-hint {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Scale buttons (1-5 style) */
.scale-row {
  display: flex;
  gap: 8px;
}

.scale-btn {
  flex: 1;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  cursor: pointer;
}

.scale-btn.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  padding: 0 2px;
}

/* Choice list (seizures, etc.) */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  text-align: left;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  cursor: pointer;
}

.choice-btn.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* Activities */
.activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
}

.activity-row.selected {
  border-color: var(--blue);
  background: #eff6ff;
}

.activity-checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--blue);
}

.activity-name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.activity-duration {
  width: 90px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 15px;
}

.activity-duration:disabled {
  background: #f1f5f9;
  color: var(--muted);
}

/* Text areas */
textarea, input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
}

textarea {
  min-height: 80px;
}

/* Submit */
.submit-btn {
  width: 100%;
  margin-top: 8px;
}

.submit-btn:disabled {
  background: #94a3b8;
  cursor: default;
}

.error-msg {
  color: #dc2626;
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}

/* Done screen */
.done {
  text-align: center;
  margin-top: 60px;
}

.done-check {
  width: 72px;
  height: 72px;
  line-height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 36px;
  margin: 0 auto 20px;
}

.done-text {
  font-size: 17px;
  margin-bottom: 24px;
}
