/* ==========================================================================
   PALE Pilot — placeholder stylesheet
   ========================================================================== */

:root {
  --pale-green: #2d7a5f;
  --pale-blue: #3a8fb7;
  --pale-orange: #c75c2e;
  --pale-purple: #7b5ea7;
  --text-primary: #1f2933;
  --text-secondary: #5a6673;
  --bg: #f6f8f7;
  --card-bg: #ffffff;
  --border: #dde3e0;
  --danger-bg: #fdecea;
  --danger-border: #e8b4ac;
  --radius: 14px;
  --focus-ring: 0 0 0 3px rgba(45, 122, 95, 0.35);
}

* { box-sizing: border-box; }

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

.screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.screen.active { display: flex; }

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.card-wide { max-width: 900px; }

.brand {
  font-size: 1.9rem;
  color: var(--pale-green);
  margin: 0 0 12px;
  text-align: center;
}

h2 { font-size: 1.35rem; margin: 0 0 12px; }
h3.section-title { font-size: 1.05rem; margin: 28px 0 10px; color: var(--text-secondary); }
p { color: var(--text-primary); }
.hint { color: var(--text-secondary); font-size: 0.9rem; }
.version-tag { color: var(--text-secondary); font-size: 0.85rem; margin-top: 20px; }
.step-tag {
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--pale-blue);
  margin: 0 0 4px;
  font-size: 0.85rem;
}

.emergency-notice {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0 20px;
}
.emergency-notice h2 { color: var(--pale-orange); font-size: 1.05rem; }

.btn-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.btn-row { flex-direction: row; flex-wrap: wrap; }

.btn {
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  min-height: 48px;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary { background: var(--pale-green); color: #fff; }
.btn-primary:disabled { background: #a9c9be; cursor: not-allowed; }
.btn-secondary { background: #eef2f0; color: var(--text-primary); }
.btn-link { background: transparent; color: var(--pale-blue); text-decoration: underline; padding: 8px; min-height: unset; }

.option-group { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.option-btn {
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  min-height: 48px;
}
.option-btn.selected { border-color: var(--pale-green); background: #eaf5f0; font-weight: 600; }
.option-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.slider-wrap { margin: 20px 0; }
.slider { width: 100%; accent-color: var(--pale-green); height: 32px; }
.slider-labels { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px; }
.slider-value { text-align: center; font-size: 2rem; font-weight: 700; color: var(--pale-green); margin-top: 8px; }

.breathing-visual { display: flex; flex-direction: column; align-items: center; margin: 28px 0; }
.breathing-circle {
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--pale-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.1rem;
}
.breathing-phase { margin-top: 16px; font-weight: 600; font-size: 1.1rem; }
.breathing-timer { font-size: 2.4rem; font-weight: 700; color: var(--pale-blue); }

.grounding-list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.grounding-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; min-height: 48px;
}
.grounding-item .check { opacity: 0.25; font-size: 1.2rem; }
.grounding-item.done { border-color: var(--pale-green); background: #eaf5f0; }
.grounding-item.done .check { opacity: 1; color: var(--pale-green); }

.adapt-choice-display { font-size: 1.2rem; font-weight: 700; color: var(--pale-orange); margin: 12px 0; }

.learn-content { background: #f2f6f4; border-radius: 10px; padding: 16px; margin: 16px 0; }

.field-label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 0.9rem; }
.field-label .optional { font-weight: 400; color: var(--text-secondary); }
.text-field {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  border: 2px solid var(--border); font: inherit; resize: vertical;
}
.text-field:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.error-msg { color: var(--pale-orange); font-size: 0.9rem; margin: 8px 0 0; }

.admin-header { display: flex; justify-content: space-between; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat-card { background: #f2f6f4; border-radius: 10px; padding: 16px; text-align: center; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--pale-green); }
.stat-card .label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 12px 0; }
.chart-grid canvas { max-height: 260px; }
.loading-msg { color: var(--text-secondary); padding: 12px 0; }

.feedback-list { margin-bottom: 16px; }
.feedback-item { background: #f2f6f4; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 0.9rem; }

.offline-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--pale-orange); color: #fff;
  text-align: center; padding: 10px 16px; font-size: 0.9rem; z-index: 999;
}
