/* Muse Friends app — elegant, lightweight, mobile-first. System fonts only,
   one small file, no framework. Palette: warm paper, ink, one deep-green accent. */
:root {
  --paper: #f7f5f1; --card: #ffffff; --ink: #1d1a16; --muted: #6b645a;
  --line: #e6e0d6; --accent: #2f5d50; --accent-soft: #e6efeb;
  --warn: #8a2b2b; --warn-soft: #f9e8e8; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto; max-width: 760px; padding: 0 1rem 3rem;
  line-height: 1.6; color: var(--ink); background: var(--paper);
}
header { padding: 1.25rem 0 0.5rem; }
header h1 { margin: 0 0 0.25rem; font-size: 1.7rem; letter-spacing: -0.02em; }
.app-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
.app-note a, main a, footer a { color: var(--accent); }
.notice {
  font-size: 0.88rem; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem;
}
.notice.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.25rem; }
/* Sticky top nav: always reachable on a phone, scrolls sideways if needed. */
nav {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 0.4rem;
  overflow-x: auto; padding: 0.6rem 0; margin: 0.5rem 0 1rem;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
nav button {
  flex: 0 0 auto; min-height: 44px; padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 0.95rem;
}
nav button.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 650; }
.screen { display: none; }
.screen.active { display: block; }
section > .card, .welcome {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1rem 0;
}
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }
label { display: block; margin: 0.6rem 0; font-weight: 550; }
input, select {
  display: block; width: 100%; min-height: 44px; margin-top: 0.3rem;
  padding: 0.55rem 0.75rem; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input[type="checkbox"] { display: inline-block; width: auto; min-height: auto; margin: 0 0.4rem 0 0; vertical-align: middle; }
input[type="time"] { display: inline-block; width: auto; }
button { cursor: pointer; font: inherit; }
button:not(nav button):not([data-setup-step]) {
  min-height: 44px; padding: 0.55rem 1rem; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600;
}
button:not(nav button):not([data-setup-step]):disabled { opacity: 0.55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
/* Status lines: clearly visible, neutral by default (app.js sets text only,
   not success/error classes, so we never colour a message as success
   when it might be an error). */
[id$="-status"], #setup-next {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 0.6rem 0.85rem; color: var(--ink);
}
[id$="-status"]:empty { display: none; }
/* Setup progress: five tappable steps, wrapping gracefully on a phone. */
.setup-progress {
  list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.setup-progress li { margin: 0; }
.setup-progress button[data-setup-step] {
  min-height: 44px; padding: 0.5rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 0.9rem;
}
.setup-progress button[data-setup-step].current {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 650;
}
pre {
  white-space: pre-wrap; word-break: break-word; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
  max-height: 60vh; overflow: auto; font-size: 0.9rem;
}
footer { margin-top: 2.5rem; font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
@media (min-width: 640px) {
  body { padding: 0 1.5rem 4rem; }
  header h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
