/* Kids - Guardian. Calm navy + SK sunshine, rounded like the kid app. Phone first. */
@font-face { font-family: "Fredoka"; src: local("Fredoka"), local("Fredoka One"); }
:root {
  --ink: #16223B; --fg: #1B2236; --muted: #5B6478; --bg: #FFFBF3; --card: #FFFFFF; --line: #EFE7D6;
  --teal: #12A4A0; --teal-soft: #EAF6F5; --sun: #FFC531; --sun-soft: #FFF3C8; --coral-soft: #FFE7DF; --bad: #C2372F;
  --note-yellow: #FFE680; --note-pink: #FFC2D6; --note-green: #BDEBD5; --note-blue: #C9DDFF;
  --display: "Fredoka", "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
main { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 700; } h2 { font-size: 20px; font-weight: 600; } h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
a { color: var(--teal); }
.sub { color: var(--muted); font-size: 14px; }
.sec { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8A90A0; margin-top: 6px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
.logo i { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; color: var(--sun); font-style: normal; font-size: 13px; font-weight: 800; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink); text-decoration: none; min-height: 44px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; text-decoration: none; }
.card { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: 0 2px 0 var(--line), 0 0 0 1px var(--line); display: grid; gap: 10px; }
.kid-hd { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.pet { width: 46px; height: 46px; border-radius: 14px; background: var(--sun-soft); display: grid; place-items: center; font-size: 26px; flex: 0 0 auto; }
.nm { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pl { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--teal-soft); color: #0B6F6C; }
.pl.y { background: var(--sun-soft); color: #7A5600; } .pl.c { background: var(--coral-soft); color: #A8401E; } .pl.g { background: #EDEFF5; color: #4A5166; }
.btn { appearance: none; border: 0; border-radius: 14px; padding: 13px 14px; min-height: 48px; font: 800 15px var(--body); text-align: center; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn.pri { background: var(--ink); color: #fff; } .btn.sun { background: var(--sun); color: #2C2000; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink) inset; }
.btn.danger { background: #fff; color: var(--bad); box-shadow: 0 0 0 1.5px var(--bad) inset; }
.btn.small { width: auto; min-height: 40px; padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #F0EADD; min-height: 48px; }
.row:last-child { border-bottom: 0; }
.rows { padding: 2px 14px; }
label.f { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=date], input[inputmode=numeric], select, textarea {
  font: 600 16px var(--body); color: var(--fg); background: #fff; border: 0; border-radius: 12px; padding: 12px; box-shadow: 0 0 0 1px #E4DCCB inset; width: 100%; min-height: 48px; }
textarea { min-height: 90px; resize: vertical; }
select { appearance: auto; }
.check { display: flex; align-items: flex-start; gap: 10px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 0 0 1px #E4DCCB inset; font-size: 14px; cursor: pointer; min-height: 48px; }
.check input { width: 22px; height: 22px; accent-color: var(--teal); flex: 0 0 auto; margin: 0; }
.tg { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #D5CFC2; position: relative; cursor: pointer; flex: 0 0 auto; margin: 0; transition: background .15s; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.tg:checked { background: var(--teal); } .tg:checked::after { left: 21px; }
.err { color: var(--bad); font-weight: 700; font-size: 14px; }
.ok { color: #0B6F6C; font-weight: 700; font-size: 14px; }
.welcome { margin: calc(-14px - env(safe-area-inset-top, 0px)) -16px 0; padding: calc(40px + env(safe-area-inset-top, 0px)) 20px 28px; background: var(--ink); color: #fff; text-align: center; display: grid; gap: 8px; justify-items: center; border-radius: 0 0 28px 28px; }
.welcome .big { width: 72px; height: 72px; border-radius: 20px; background: var(--sun); display: grid; place-items: center; font-size: 34px; }
.welcome h1 { color: #fff; } .welcome p { color: #C9D3E8; max-width: 34ch; }
.choice { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 0 0 1px #E4DCCB inset, 0 2px 0 var(--line); text-decoration: none; color: inherit; min-height: 64px; }
.choice .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.choice b { display: block; font-size: 16px; color: var(--ink); } .choice span { font-size: 13px; color: var(--muted); }
.choice.hl { box-shadow: 0 0 0 2px var(--teal) inset; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px max(4px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); z-index: 5; }
.tabs a { display: grid; justify-items: center; gap: 1px; font-size: 12px; font-weight: 800; color: #8A90A0; text-decoration: none; padding: 4px 0; min-height: 48px; }
.tabs a b { font-size: 20px; font-weight: 400; } .tabs a.on { color: var(--ink); }
.dev { position: fixed; top: calc(4px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); background: #E5322D; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .08em; padding: 2px 10px; border-radius: 6px; z-index: 9; pointer-events: none; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; z-index: 10; max-width: calc(100vw - 32px); }
/* Notes */
.note { border-radius: 4px 4px 18px 4px; padding: 14px; font-family: var(--display); font-size: 18px; font-weight: 500; color: #3A2A00; box-shadow: 0 6px 14px rgba(60, 40, 0, .16); position: relative; display: grid; gap: 6px; overflow-wrap: anywhere; }
.note.yellow { background: var(--note-yellow); } .note.pink { background: var(--note-pink); } .note.green { background: var(--note-green); } .note.blue { background: var(--note-blue); }
.note small { font-family: var(--body); font-size: 12px; font-weight: 800; color: #7A5600; }
.note .stk { width: 96px; height: 104px; }
.note .stk svg { width: 100%; height: 100%; }
.ntabs { display: flex; gap: 4px; background: #F0EADD; border-radius: 12px; padding: 4px; }
.ntabs button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 2px; font: 800 13px var(--body); color: var(--muted); cursor: pointer; min-height: 40px; }
.ntabs button.on { background: #fff; color: var(--ink); }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis button, .stickers button { border: 0; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #E4DCCB inset; cursor: pointer; }
.emojis button { width: 46px; height: 46px; font-size: 24px; }
.emojis button.on, .stickers button.on { box-shadow: 0 0 0 3px var(--teal) inset; }
.stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stickers button { aspect-ratio: 1 / 1.05; padding: 4px; display: grid; }
.stickers button svg { width: 100%; height: 100%; }
.swatch { display: flex; gap: 10px; }
.swatch button { width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer; }
.swatch button.on { box-shadow: 0 0 0 3px var(--ink); }
.rec { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 0 0 1px #E4DCCB inset; }
.recbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #E5322D; color: #fff; font-size: 20px; cursor: pointer; flex: 0 0 auto; }
.recbtn.on { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(.9); } }
audio { width: 100%; height: 40px; }
.count { font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.invite-card { background: var(--teal-soft); border-radius: 18px; padding: 16px; display: grid; gap: 8px; text-align: center; }
.linkbox { font: 600 13px ui-monospace, monospace; background: #fff; border-radius: 10px; padding: 10px; overflow-wrap: anywhere; user-select: all; }
@media (prefers-reduced-motion: reduce) { .recbtn.on { animation: none; } .tg, .tg::after { transition: none; } }
@media (min-width: 700px) { body { padding-bottom: 90px; } }
/* Sticker animations (CSS only, $0). Kept in step with the kid app's note stickers. */
.stk svg { transform-origin: 50% 80%; }
.anim-bounce svg { animation: stk-bounce 1.6s ease-in-out infinite; }
.anim-wiggle svg { animation: stk-wiggle 1.4s ease-in-out infinite; }
.anim-float svg { animation: stk-float 2.4s ease-in-out infinite; }
.anim-spin svg { animation: stk-spin 3s ease-in-out infinite; transform-origin: 50% 50%; }
.anim-hop svg { animation: stk-hop 1.8s ease-in-out infinite; }
@keyframes stk-bounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-10%) scale(.96, 1.04); } 60% { transform: translateY(0) scale(1.05, .95); } }
@keyframes stk-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes stk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7%); } }
@keyframes stk-spin { 0%, 70% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@keyframes stk-hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-14%); } 80% { transform: translateY(0); } 88% { transform: translateY(-6%); } }
@media (prefers-reduced-motion: reduce) { .stk svg { animation: none !important; } }
