/* KidClock: small mobile-first stylesheet (no build step, no CDN). */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1f24; --muted: #5b6470;
  --border: #d5d9df; --accent: #2563eb; --accent-text: #ffffff; --error: #b42318; --ok: #067647; --warn: #dc6803;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --surface: #1b2027; --text: #e7eaee; --muted: #9aa3ad;
    --border: #2e353f; --accent: #5b8def; --accent-text: #0b0d10; --error: #f97066; --ok: #47cd89; --warn: #fdb022;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { background: var(--surface); border-bottom: 1px solid var(--border); }
nav { max-width: 40rem; margin: 0 auto; padding: .5rem 16px;
      display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem 16px 3rem; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
article { background: var(--surface); border: 1px solid var(--border);
          border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.narrow { max-width: 24rem; margin: 2rem auto; }
label { display: block; margin-bottom: 1rem; font-weight: 500; }
input { display: block; width: 100%; margin-top: .25rem; padding: .7rem .75rem; font: inherit;
        color: var(--text); background: var(--bg); border: 1px solid var(--border);
        border-radius: var(--radius); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-weight: 600; padding: .7rem 1.1rem; min-height: 44px; cursor: pointer;
         color: var(--accent-text); background: var(--accent); border: 0; border-radius: var(--radius); }
form > button { width: 100%; }
button.secondary { color: var(--text); background: transparent; border: 1px solid var(--border);
                   padding: .4rem .9rem; min-height: 36px; }
form.inline { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.error { color: var(--error); font-weight: 500; }

/* M4: family pages */
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
article h2 { margin-top: 0; }
article h2 a { color: var(--text); text-decoration: none; }
.small { font-size: .875rem; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
select { display: block; width: 100%; margin-top: .25rem; padding: .7rem .75rem; font: inherit;
         color: var(--text); background: var(--bg); border: 1px solid var(--border);
         border-radius: var(--radius); }
.status { margin: 0 0 .75rem; font-size: 1.1rem; }
.status.allowed strong { color: var(--ok); }
.status.blocked strong { color: var(--error); }
.status .muted { font-size: .95rem; }
/* Quick buttons side by side in equal columns (+30 min | +1 h). */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
           gap: .5rem; margin: .5rem 0; }
.actions form { margin: 0; }
.actions button { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
       justify-content: space-between; }
.row > label { flex: 1 1 8rem; margin-bottom: 0; }
form.row { margin-top: .75rem; }
form.row > button { width: auto; }
article.row { align-items: center; }
button.danger { background: var(--error); color: #fff; }
/* Day / mode pickers: a tidy grid (a fieldset cannot be a grid in every browser). */
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 500; padding: 0; margin-bottom: .25rem; }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 .5rem; }
.choices label, label.check { display: flex; align-items: center; gap: .35rem; margin: 0 0 .5rem;
                              font-weight: 400; min-height: 44px; }
.choices input, label.check input { width: auto; margin: 0; }
details { margin: 1rem 0; }
summary { cursor: pointer; font-weight: 600; padding: .6rem 0; }
details form { margin-bottom: 1rem; }
article.disabled { opacity: .6; }
.notice { background: var(--surface); border-left: 4px solid var(--warn); padding: .5rem .75rem;
          border-radius: 4px; }
/* Pairing code: big digits, easy to read off the phone. */
.pairing .code { font-size: 2.4rem; letter-spacing: .3em; text-align: center; margin: .5rem 0; }
code { font-size: .85rem; word-break: break-all; }
