/* Chevron — pine night, warm embers. Mobile-first. */

:root {
  --bg: #1d2a25;
  --surface: #27362f;
  --surface-2: #2f4038;
  --ink: #f3ecdc;
  --ink-dim: #b9c3b6;
  --line: #45564c;
  --gold: #e6c566;
  --c-body: #e8a87c;
  --c-mind: #c3a6da;
  --c-purpose: #93c29f;
  --c-connection: #e48e92;
  --radius: 18px;
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 560px;
  padding: max(12px, env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.date-nav { display: flex; align-items: center; gap: 2px; }
.date-nav > button { min-width: 44px; min-height: 44px; border-radius: 12px; font-size: 22px; color: var(--ink-dim); }
.date-nav > button:disabled { opacity: .25; cursor: default; }
.date-label { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); padding: 4px 8px; }
.gentle-toggle {
  min-height: 44px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--ink-dim); font-weight: 600; font-size: 14px;
}
.gentle-toggle.on { border-color: var(--gold); color: var(--gold); background: rgba(230, 197, 102, .08); }

/* ---------- chevron banner (the signature) ---------- */
.banner {
  display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px;
  padding: 10px 8px 4px; margin-top: 4px;
  background: var(--surface); border-radius: var(--radius);
}
.banner-chev { min-height: 40px; padding: 4px 0; }
.banner-chev svg { width: 100%; max-width: 30px; display: block; margin: 0 auto; transition: transform .15s ease; }
.banner-chev.done svg { filter: drop-shadow(0 0 6px rgba(230, 197, 102, .25)); }
.banner-chev:active svg { transform: scale(.85); }

.day-line { display: flex; align-items: baseline; gap: 10px; margin: 10px 4px 4px; color: var(--ink-dim); }
.day-count { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--gold); }
.gentle-hint { margin: 2px 4px 8px; font-size: 14px; color: var(--gold); opacity: .9; }

/* ---------- areas & cards ---------- */
.area { margin-top: 18px; }
.area-name {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--area); margin: 0 4px 8px;
}
.card {
  background: var(--surface); border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
  border-left: 4px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.card.done { border-left-color: var(--area); background: var(--surface-2); }
.card.pop { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.015); } }

.card-row { display: flex; align-items: stretch; }
.tick { flex: 0 0 64px; min-height: 64px; display: grid; place-items: center; }
.tick svg { width: 30px; }
.card-main { flex: 1; text-align: left; padding: 10px 14px 10px 0; min-height: 64px; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.floor-badge {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 999px;
  padding: 0 8px; letter-spacing: .05em;
}
.card-sub { font-size: 13.5px; color: var(--ink-dim); margin-top: 2px; }
.card-sub.has-details { color: var(--area); font-weight: 600; }

.card-details {
  display: none; padding: 2px 16px 14px 16px;
  border-top: 1px dashed var(--line);
}
.card.open .card-details { display: block; }

/* ---------- fields ---------- */
.field { margin-top: 12px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-dim); margin-bottom: 6px; }
.field input[type="text"], .field input[type="time"] {
  width: 100%; min-height: 46px; padding: 8px 12px;
  background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; font: inherit;
}
.field input::placeholder { color: #78857b; }

.stepper { display: flex; align-items: center; gap: 4px; }
.step-btn {
  min-width: 46px; min-height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line); font-size: 20px; color: var(--ink);
}
.step-val { min-width: 84px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 17px; }

.scale { display: flex; gap: 6px; }
.scale-dot {
  flex: 1; min-height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line); color: var(--ink-dim); font-weight: 700;
}
.scale-dot.on { background: var(--area); border-color: var(--area); color: var(--bg); }
.scale-hints { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); font-weight: 600; font-size: 15px;
}
.chip.on { background: var(--area); border-color: var(--area); color: var(--bg); }

/* ---------- gentle mode ---------- */
body.gentle { --bg: #1a2622; }
.bonus { margin-top: 22px; }
.bonus > summary {
  cursor: pointer; list-style: none; text-align: center;
  color: var(--ink-dim); font-weight: 600; padding: 12px; min-height: 44px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.bonus > summary::-webkit-details-marker { display: none; }
.bonus[open] > summary { margin-bottom: 10px; }

/* ---------- history ---------- */
.hist-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim);
  margin: 26px 4px 8px;
}
.history {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px;
  background: var(--surface); border-radius: var(--radius); padding: 10px 6px 6px;
}
.hist-day { padding: 2px 0 6px; border-radius: 10px; min-height: 52px; }
.hist-day.current { background: var(--surface-2); }
.hist-glyph { height: 22px; display: grid; place-items: center; }
.hist-glyph svg { width: 18px; }
.hist-glyph.tall svg { width: 24px; }
.hist-label { font-size: 11px; color: var(--ink-dim); text-align: center; margin-top: 2px; }
.ember { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; opacity: .9; }
.ember.inline { vertical-align: middle; }
.quiet { width: 8px; height: 3px; border-radius: 3px; background: var(--line); display: inline-block; }
.hist-legend { font-size: 12.5px; color: var(--ink-dim); margin: 8px 6px 0; }

/* ---------- saved toast ---------- */
.saved {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--surface-2); color: var(--gold);
  font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.saved.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
