/* THE ONE PALETTE: A, calm sage (picked 15 Oct 2026; the owner left the pick to me). Every colour comes from here. */
:root {
  --bg: #eef1ec; --bg-deep: #d8dfd4; --panel: #ffffff; --ink: #1f2a24; --ink-soft: #526158; --line: #c5cfc3;
  --accent: #2f5d4a; --accent-ink: #ffffff; --good: #2f6b4a; --good-bg: #e1efe5; --check: #9a4b1f; --check-bg: #f8e6d8;
  --calm-bg: #e4ebe2; --focus: #1d3b2f; --radius: 20px; --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 20px; display: flex; gap: 10px; align-items: center; }
.mark { width: 22px; height: 22px; border-radius: 50%; border: 5px solid var(--accent); display: inline-block; }
.where { color: var(--ink-soft); font-size: 15px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 4px 16px 60px; display: grid; gap: 16px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 22px; animation: in .4s var(--ease) both; }
@keyframes in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink-soft); font-weight: 600; }

.hero { padding: 26px; display: grid; gap: 10px; }
.hero[data-tone="good"] { background: var(--good-bg); }
.hero[data-tone="check"] { background: var(--check-bg); }
.hero[data-tone="calm"] { background: var(--calm-bg); }
.hero .title { font-size: 34px; line-height: 1.1; font-weight: 750; margin: 0; }
.hero[data-tone="good"] .title { color: var(--good); }
.hero[data-tone="check"] .title { color: var(--check); }
.hero .line { font-size: 19px; margin: 0; }
.hero .when { font-size: 14px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn { border: none; border-radius: 14px; padding: 14px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; min-height: 52px; transition: transform .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn.quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn:disabled { opacity: .55; cursor: default; }

.timeline { position: relative; height: 92px; margin: 14px 4px 4px; }
.timeline .axis { position: absolute; left: 0; right: 0; top: 40px; height: 6px; border-radius: 99px; background: var(--bg-deep); }
.timeline .band { position: absolute; top: 30px; height: 26px; border-radius: 99px; background: var(--good-bg); border: 2px dashed var(--good); opacity: .9; }
.timeline .dot { position: absolute; top: 35px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--accent); animation: pop .35s var(--ease) both; }
.timeline .dot.ring { width: 22px; height: 22px; margin-left: -11px; top: 32px; background: var(--panel); border: 4px solid var(--accent); }
.timeline .now { position: absolute; top: 18px; bottom: 26px; width: 2px; background: var(--check); }
.timeline .now span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--check); font-weight: 700; white-space: nowrap; }
.timeline .ticks { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: -1px; }
.legend i.ring { background: var(--panel); border: 3px solid var(--accent); }
.legend i.band { border-radius: 4px; background: var(--good-bg); border: 2px dashed var(--good); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; margin-top: 12px; }
.day { display: grid; gap: 6px; justify-items: center; font-size: 12px; color: var(--ink-soft); }
.day .col { position: relative; width: 100%; height: 110px; border-radius: 10px; background: var(--bg); }
.day .pin { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); }
.day .usual { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--good); }
.day.none .col { background: var(--check-bg); }

.door { display: grid; gap: 12px; }
.door .device { display: flex; align-items: center; gap: 14px; }
.door .device img { width: 56px; height: 56px; border-radius: 12px; background: var(--bg); object-fit: contain; }
.door .snap { width: 100%; border-radius: 14px; background: var(--bg); min-height: 120px; object-fit: cover; }
.door input { font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); width: 100%; background: var(--panel); color: var(--ink); }
.msg { font-size: 15px; color: var(--check); min-height: 20px; margin: 0; }
.pill { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 99px; background: var(--good-bg); color: var(--good); font-weight: 600; }
.pill.off { background: var(--check-bg); color: var(--check); }

.demo summary { cursor: pointer; font-weight: 600; }
.demo .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.demo .note { font-size: 14px; color: var(--ink-soft); margin: 10px 0 0; }

.welcome { padding: 34px 26px; display: grid; gap: 14px; }
.welcome h1 { font-size: 34px; line-height: 1.15; margin: 0; }
.welcome ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.small { font-size: 14px; color: var(--ink-soft); margin: 0; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
