/* Kid Kiosk for parents — same family as the kiosk ("uncurl"): warm cream,
   navy ink, one coral action colour, Nunito. Dark mode follows the phone. */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/nunito-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/nunito-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #fbf4e6;
  --surface: #ffffff;
  --surface-2: #f6eddc;
  --line: #ece0c8;
  --ink: #2c2a52;
  --ink-strong: #201e45;
  --muted: #6b6889;
  --primary: #ea5a3f;
  --primary-strong: #c4432b;
  --on-primary: #ffffff;
  --ok: #2f9e6a;
  --ok-soft: #dff3e8;
  --no-soft: #fbe3dd;
  --lip: #e6d6b8;
  --shadow: 0 2px 0 var(--lip), 0 14px 34px -20px rgba(44, 42, 82, .35);
  --radius: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1b1a2c;
    --surface: #262439;
    --surface-2: #2f2d46;
    --line: #3a3856;
    --ink: #ecebf7;
    --ink-strong: #ffffff;
    --muted: #a9a6c8;
    --primary: #f26a4e;
    --primary-strong: #d9553b;
    --ok: #5fcf8c;
    --ok-soft: #22392f;
    --no-soft: #3b2730;
    --lip: #141322;
    --shadow: 0 2px 0 var(--lip), 0 14px 34px -20px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--ground); color: var(--ink);
  font: 500 17px/1.45 "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app {
  max-width: 520px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 28px);
}
h1, h2, h3 { color: var(--ink-strong); margin: 0; line-height: 1.15; }
h1 { font-size: 30px; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 900; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* --- header ------------------------------------------------------------------ */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 2px 0 var(--lip); }
.top .who { display: flex; flex-direction: column; min-width: 0; }
.top .who b { font-weight: 900; color: var(--ink-strong); font-size: 18px; }
.top .who span { font-size: 14px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--ok); }

/* --- cards + buttons ------------------------------------------------------------ */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 16px; }
.stack > * + * { margin-top: 12px; }
.btn {
  appearance: none; border: 0; border-radius: 999px; min-height: 52px; padding: 0 22px;
  font: 800 17px/1 "Nunito", system-ui, sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  -webkit-tap-highlight-color: transparent; transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 3px 0 var(--primary-strong); }
.btn-primary:active { box-shadow: 0 1px 0 var(--primary-strong); }
.btn-ghost { background: var(--surface-2); color: var(--ink-strong); box-shadow: 0 3px 0 var(--lip); }
.btn-link { background: none; color: var(--muted); min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.row { display: flex; gap: 10px; }
.row > .btn { flex: 1; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 70%, transparent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 800; color: var(--ink-strong); font-size: 15px; }
.input {
  width: 100%; min-height: 54px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2);
  color: var(--ink-strong); font: 800 20px/1 "Nunito", system-ui, sans-serif; padding: 0 16px;
}
.input:focus { outline: none; border-color: var(--primary); }
.input.code { text-align: center; letter-spacing: .18em; text-transform: uppercase; font-size: 24px; }
.error { color: var(--primary-strong); font-weight: 700; font-size: 15px; }
@media (prefers-color-scheme: dark) { .error { color: var(--primary); } }

/* --- hero (first screens) -------------------------------------------------------- */
.hero { text-align: center; padding: 8px 4px 20px; }
.hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hero h1 { margin-bottom: 8px; }
.hero p { color: var(--muted); }
.steps-label { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }

/* --- iOS "Add to Home Screen" wizard ---------------------------------------------- */
.wiz { counter-reset: step; }
.wiz-step { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 14px 0; }
.wiz-step + .wiz-step { border-top: 2px dashed var(--line); }
.wiz-art {
  width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center;
  color: #0a84ff; position: relative;
}
@media (prefers-color-scheme: dark) { .wiz-art { color: #409cff; } }
.wiz-art svg { width: 28px; height: 28px; }
.wiz-art img { width: 40px; height: 40px; border-radius: 10px; }
.wiz-art::after {
  counter-increment: step; content: counter(step); position: absolute; top: -6px; left: -6px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  font: 900 13px/22px "Nunito", sans-serif; text-align: center;
}
.wiz-text b { display: block; font-weight: 900; color: var(--ink-strong); font-size: 18px; margin-bottom: 2px; }
.wiz-text span { color: var(--muted); font-size: 15px; }
.inline-ic { display: inline-flex; vertical-align: -4px; width: 20px; height: 20px; color: #0a84ff; }
.inline-ic svg { width: 20px; height: 20px; }
/* --- notifications step ----------------------------------------------------------- */
.bell { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--primary); }
.bell svg { width: 36px; height: 36px; }
.notice { border-radius: 16px; padding: 12px 14px; background: var(--surface-2); font-size: 15px; }
.notice.ok { background: var(--ok-soft); }
.notice b { color: var(--ink-strong); }

/* --- requests ---------------------------------------------------------------------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 10px; }
.req { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.req + .req { margin-top: 12px; }
.req.is-focus { outline: 3px solid var(--primary); outline-offset: 2px; }
.req-kid { font-size: 14px; font-weight: 800; color: var(--muted); }
.req-site { font-size: 26px; font-weight: 900; color: var(--ink-strong); overflow-wrap: anywhere; margin: 2px 0 4px; }
.req-why { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.req .row { margin-top: 14px; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--ok); margin-bottom: 8px; }
.hist { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 16px; }
.hist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.hist-item + .hist-item { border-top: 1px solid var(--line); }
.hist-item .what { flex: 1; min-width: 0; }
.hist-item .what b { display: block; font-weight: 900; color: var(--ink-strong); overflow-wrap: anywhere; }
.hist-item .what span { font-size: 14px; color: var(--muted); }
.tag { flex: 0 0 auto; font-size: 13px; font-weight: 900; border-radius: 999px; padding: 4px 10px; background: var(--surface-2); color: var(--muted); }
.tag.allowed { background: var(--ok-soft); color: var(--ok); }
.tag.denied { background: var(--no-soft); color: var(--primary-strong); }
@media (prefers-color-scheme: dark) { .tag.denied { color: var(--primary); } }

.settings .set { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.settings .set + .set { border-top: 1px solid var(--line); }
.settings .set .what { flex: 1; min-width: 0; }
.settings .set .what b { display: block; font-weight: 900; color: var(--ink-strong); }
.settings .set .what span { font-size: 14px; color: var(--muted); }
.settings .btn { min-height: 42px; padding: 0 16px; font-size: 15px; }

.boot { height: 60vh; }
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%);
  background: var(--ink-strong); color: var(--ground); font-weight: 800; border-radius: 999px; padding: 12px 20px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); max-width: calc(100% - 32px); text-align: center;
}
