/* Our Nest – all styles are local. No web fonts, no external files. */
:root {
  --bg: #fff7ea; --card: #ffffff; --ink: #3b2314; --muted: #6b5546; --line: #ecd9c0;
  --brand: #b45309; --brand-ink: #ffffff; --brand-soft: #fde8c8;
  --good: #166534; --good-soft: #dcfce7; --warn: #92400e; --warn-soft: #fef3c7; --bad: #9f1239; --bad-soft: #ffe4e6;
  --radius: 18px; --shadow: 0 2px 0 rgba(120, 70, 20, .08), 0 8px 24px rgba(120, 70, 20, .08);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; font-size: 17px; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 12px 16px; border-radius: 10px; }
.offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 4px solid #1d4ed8; outline-offset: 2px; }
[hidden] { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .error { color: var(--bad); font-weight: 600; }
.lead { font-size: 1.15rem; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.ico { width: 1.5em; height: 1.5em; flex: none; }
.pic { display: block; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; flex-wrap: wrap; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 7px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.center-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 30px); background: #3b2314; color: #fff; padding: 14px 20px; border-radius: 16px; max-width: min(92vw, 520px); opacity: 0; pointer-events: none; transition: .25s; z-index: 200; font-weight: 600; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.error { background: #9f1239; }

/* ---------- buttons & forms (grown-up) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); border-radius: 14px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); } .btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: .95rem; } .btn.big { min-height: 56px; font-size: 1.1rem; width: 100%; }
.btn .ico { width: 1.25em; height: 1.25em; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field label, .toggle-text { font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], select, textarea { font: inherit; color: var(--ink); background: #fff; border: 2px solid #c9a97d; border-radius: 12px; padding: 10px 12px; min-height: 48px; width: 100%; }
input[type=file] { font: inherit; width: 100%; padding: 10px 0; min-height: 48px; }
.hint { color: var(--muted); font-weight: 400; display: block; }
.toggle { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 6px 0; cursor: pointer; }
.toggle input, .check input { width: 26px; height: 26px; flex: none; margin: 0; accent-color: var(--brand); }
.checks { border: 2px solid var(--line); border-radius: 14px; padding: 8px 14px 12px; display: grid; gap: 4px; }
.checks legend { font-weight: 700; padding: 0 6px; } .check { display: flex; gap: 12px; align-items: center; min-height: 44px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.inner { box-shadow: none; background: #fffaf2; } .hint-card { background: var(--brand-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.childcard { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; } .childcard p { margin: 0; }
.cardpic { width: 56px; height: 56px; flex: none; } .optpic { width: 48px; height: 48px; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.badge.ok { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.quote { border-left: 4px solid var(--line); padding: 6px 12px; background: #fffaf2; }
.table { width: 100%; border-collapse: collapse; } .table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .table th { color: var(--muted); }
details.card > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 56px; list-style: none; font-size: 1.15rem; } details.card[open] > summary { margin-bottom: 12px; }
details.card > summary::-webkit-details-marker { display: none; }
.avatarpick, .iconpick { display: flex; flex-wrap: wrap; gap: 8px; }
.avopt, .iconopt { border: 3px solid transparent; background: #fff; border-radius: 16px; padding: 4px; min-width: 56px; min-height: 56px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; color: var(--ink); }
.avopt.on, .iconopt.on { border-color: var(--brand); background: var(--brand-soft); } .iconopt { padding: 6px 10px; gap: 2px; font-size: .85rem; } .iconopt .optpic { width: 44px; height: 44px; }

/* ---------- grown-up frame ---------- */
.adult .frame { max-width: 1040px; margin: 0 auto; padding: 0 14px calc(24px + var(--safe-b)); }
.content > h1 { margin-bottom: .8em; }
.foot { text-align: center; color: var(--muted); padding: 30px 0 10px; font-size: .95rem; }
.foot a { display: inline-block; padding: 12px 6px; }
.tilelinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tilelink { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: var(--radius); background: var(--brand-soft); text-decoration: none; color: var(--ink); font-weight: 700; min-height: 96px; justify-content: center; text-align: center; }
.tilelink .ico { width: 2em; height: 2em; color: var(--brand); }
.authcard { max-width: 460px; width: 100%; } .authpic { width: 84px; height: 84px; margin: 0 auto 8px; }
.authcard h1 { text-align: center; }
.overlay { position: fixed; inset: 0; background: rgba(40, 20, 8, .55); display: grid; place-items: center; padding: 16px; z-index: 150; }
.dialog { background: #fff; border-radius: 20px; padding: 22px; max-width: 480px; width: 100%; display: grid; gap: 12px; max-height: 92vh; overflow: auto; }
.dialog h2 { margin: 0; }

/* ---------- conversations (shared) ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread-head { display: flex; align-items: center; gap: 12px; } .thread-head h1 { margin: 0; font-size: 1.4rem; } .thread-head p { margin: 0; } .headpic { width: 56px; height: 56px; }
.msglist { display: flex; flex-direction: column; gap: 12px; min-height: 160px; padding-bottom: 8px; }
.msg { display: flex; flex-direction: column; max-width: 86%; gap: 4px; } .msg.mine { align-self: flex-end; align-items: flex-end; } .msg.theirs { align-self: flex-start; align-items: flex-start; }
.bubble { background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 12px 16px; min-width: 60px; }
.msg.mine .bubble { background: var(--brand-soft); border-color: #f0c98f; }
.msg.k-sticker .bubble, .msg.k-drawing .bubble, .msg.k-photo .bubble { background: transparent; border-color: transparent; padding: 0; }
.msgtext { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.msgimg { display: block; border-radius: 18px; border: 2px solid var(--line); background: #fff; max-height: 60vh; width: auto; max-width: 100%; }
.msgsticker { width: 120px; height: 120px; }
.sender { font-size: .85rem; color: var(--muted); font-weight: 700; }
.msgfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; } .time { color: var(--muted); font-size: .85rem; }
.speak { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 48px; margin-top: 6px; border: 2px solid var(--brand); background: #fff; color: var(--brand); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.flagbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 12px; } .flagbtn:hover { color: var(--bad); background: var(--bad-soft); } .flagbtn .ico { width: 1.3em; height: 1.3em; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.react { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; justify-content: center; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.react.on { border-color: var(--brand); background: var(--brand-soft); } .react:disabled { cursor: default; } .reactpic { width: 28px; height: 28px; } .rcount { font-weight: 700; } .react.add .ico { color: var(--muted); }
.voice { display: flex; align-items: center; gap: 12px; } .dur { font-weight: 700; color: var(--muted); }
.wavebar { display: flex; align-items: center; gap: 3px; height: 40px; }
.wb { display: block; width: 5px; border-radius: 3px; background: #d6a86a; } .w0 { height: 12px; } .w1 { height: 24px; } .w2 { height: 34px; } .w3 { height: 18px; } .w4 { height: 28px; } .w5 { height: 14px; }
.wavebar.live .wb { animation: bounce .8s ease-in-out infinite alternate; background: var(--brand); } .wavebar.live .wb:nth-child(odd) { animation-delay: .25s; }
@keyframes bounce { from { transform: scaleY(.5); } to { transform: scaleY(1.15); } }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(10px + var(--safe-b)); border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.composer-panel:empty { display: none; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.textform { display: flex; flex-direction: column; gap: 10px; } .textform .row { align-items: stretch; }
.emojirow { display: flex; flex-wrap: wrap; gap: 6px; } .emojibtn { min-width: 56px; min-height: 56px; font-size: 1.8rem; border: 2px solid var(--line); background: #fff; border-radius: 16px; cursor: pointer; }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; } .traybtn { min-height: 72px; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 6px; cursor: pointer; } .traybtn .pic { width: 100%; height: 100%; max-height: 64px; }

/* ---------- recorder, big buttons, drawing pad ---------- */
.bigbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 56px; min-height: 56px; border-radius: 999px; border: 3px solid transparent; background: var(--brand); color: #fff; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; padding: 8px 18px; }
.bigbtn .ico { width: 1.8em; height: 1.8em; } .bigbtn:disabled { opacity: .45; cursor: not-allowed; }
.bigbtn.ghost { background: #fff; color: var(--brand); border-color: var(--brand); } .bigbtn.small { padding: 8px 12px; }
.bigbtn.tool { flex: 1 1 96px; flex-direction: column; border-radius: 22px; background: #fff; color: var(--ink); border: 3px solid var(--line); min-height: 76px; } .bigbtn.tool .ico { color: var(--brand); } .bigbtn.tool.mic { background: #ffe1ea; border-color: #f4a6bd; } .bigbtn.tool:hover { border-color: var(--brand); }
.toollabel { font-size: .95rem; }
.recorder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 22px; }
.recorder .bigbtn.mic, .recorder .bigbtn.stop { width: 96px; height: 96px; background: #d6336c; } .recorder .bigbtn.mic .ico, .recorder .bigbtn.stop .ico { width: 3em; height: 3em; }
.recorder.big .bigbtn.mic, .recorder.big .bigbtn.stop { width: min(52vw, 220px); height: min(52vw, 220px); }
.recorder.big .bigbtn.mic .ico, .recorder.big .bigbtn.stop .ico { width: 4.5em; height: 4.5em; }
.bigbtn.recording { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(214, 51, 108, .6); } 50% { box-shadow: 0 0 0 22px rgba(214, 51, 108, 0); } }
.rec-live { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; } .rec-dot { width: 14px; height: 14px; border-radius: 50%; background: #d6336c; }
.recorder-hint { margin: 0; font-weight: 700; color: var(--muted); text-align: center; }
.review-row { display: flex; align-items: center; gap: 16px; justify-content: center; }
.bigbtn.play { width: 84px; height: 84px; background: #2a9d8f; padding: 0; flex: none; } .bigbtn.play .ico { width: 2.6em; height: 2.6em; }
.bigbtn.send { background: #2a9d8f; width: 72px; height: 72px; padding: 0; flex: none; } .bigbtn.bin { background: #fff; color: var(--bad); border-color: var(--bad); }
.pad { display: flex; flex-direction: column; gap: 12px; max-width: 900px; margin: 0 auto; }
.pad-canvas-wrap { background: #fff; border: 4px solid var(--line); border-radius: 22px; overflow: hidden; line-height: 0; }
.pad-canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.pad-tools { display: flex; flex-direction: column; gap: 10px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .swatch { min-height: 56px; min-width: 56px; aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; background: var(--c); box-shadow: 0 0 0 2px #b8a28a; cursor: pointer; } .swatch.on { box-shadow: 0 0 0 5px var(--ink); }
.pad-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .sizes { display: flex; gap: 8px; }
.sizebtn { min-width: 56px; min-height: 56px; border-radius: 16px; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; cursor: pointer; } .sizebtn.on { border-color: var(--ink); background: var(--brand-soft); }
.dot { display: block; width: var(--d); height: var(--d); max-width: 40px; max-height: 40px; background: var(--ink); border-radius: 50%; }

/* ---------- wall, stories, calendar ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.post { background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.posthead { display: flex; align-items: center; gap: 10px; } .postavatar { width: 48px; height: 48px; } .postwho { flex: 1; min-width: 0; }
.postimg { width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: 16px; background: #fff7ea; }
.poststicker { width: 160px; height: 160px; margin: 0 auto; }
.postfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .postfoot .reactions { flex: 1; }
.caption { margin: 0; font-size: 1.1rem; }
.sharebar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.book { position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 8px; min-height: 56px; }
.bookcover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; } .booktitle { font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.book.played { border-color: #bfe3c8; } .stamp { position: absolute; top: 6px; right: 6px; background: #ffd23f; color: #7a4b00; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; } .stamp .ico { width: 26px; height: 26px; }
.player { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 520px; margin: 0 auto; }
.playcover { width: min(80vw, 340px); aspect-ratio: 1; object-fit: cover; border-radius: 28px; border: 4px solid #fff; box-shadow: var(--shadow); } .playtitle { font-size: 1.8rem; margin: 0; }
.player .bigbtn.play { width: 128px; height: 128px; } .player .bigbtn.play .ico { width: 4em; height: 4em; }
.progress { width: 100%; height: 18px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; } .progressfill { height: 100%; width: 0; background: #2a9d8f; transition: width .3s linear; }
.events { display: flex; flex-direction: column; gap: 12px; }
.event { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 12px 14px; flex-wrap: wrap; } .event.pending { border-style: dashed; }
.eventpic { width: 72px; height: 72px; flex: none; }
.eventdate { display: flex; flex-direction: column; align-items: center; min-width: 64px; background: var(--brand-soft); border-radius: 16px; padding: 6px 10px; line-height: 1.1; } .dow, .mon { font-weight: 700; font-size: .9rem; text-transform: uppercase; } .dom { font-size: 1.8rem; font-weight: 800; }
.eventtext { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 140px; } .eventtext strong { font-size: 1.15rem; }
.calendar .card { margin-bottom: 16px; }

/* ---------- Children's screens ---------- */
body.kid { background: radial-gradient(circle at 20% 0%, #ffe9b8 0, #fff3d6 38%, #fff8ec 100%); background-attachment: fixed; font-size: 20px; }
.kidframe { max-width: 760px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 14px calc(20px + var(--safe-b)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 12px; }
.kidframe.wide { max-width: 940px; }
.kidbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kidhello { display: flex; align-items: center; gap: 10px; } .kidme { width: 64px; height: 64px; } .kidname { font-weight: 800; font-size: 1.5rem; }
.kidtitle { margin: 0; flex: 1; text-align: center; }
.kid .bigbtn, .kid button, .kid .btn, .kid a.bigbtn, .kid .tile, .kid .avatar-tile, .kid .react, .kid .book, .kid input, .kid select { min-height: 56px; min-width: 56px; }
.kid .bigbtn.home { background: #fff; color: var(--brand); border-color: var(--brand); } .kid .bigbtn { width: auto; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; flex: 1; align-content: center; padding: 10px 0; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.kidframe.home { max-width: 1040px; }
.kidframe.home .kidmain { gap: 14px; }
.kidbye { display: flex; justify-content: center; padding-top: 6px; }
.t-photo { background: #d7f0c2; } .t-photo .tileico { color: #3f7d20; } button.tile { font: inherit; font-weight: 800; font-size: 1.35rem; cursor: pointer; }
.photobtn { width: min(80vw, 340px); min-height: 280px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 32px; min-height: 170px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.35rem; border: 4px solid #fff; box-shadow: 0 6px 0 rgba(90, 50, 10, .14), 0 14px 26px rgba(90, 50, 10, .1); transition: transform .12s; }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(90, 50, 10, .14); }
.tileico { width: 84px; height: 84px; } .little .tileico { width: 108px; height: 108px; }
.t-people { background: #ffd6c9; } .t-people .tileico { color: #c2410c; }
.t-wall { background: #c9f0e8; } .t-wall .tileico { color: #0f766e; }
.t-stories { background: #e4d9ff; } .t-stories .tileico { color: #6d28d9; }
.t-calendar { background: #cfe5ff; } .t-calendar .tileico { color: #1d4ed8; }
.t-draw { background: #ffeab0; } .t-draw .tileico { color: #a16207; }
.t-voice { background: #ffd0e6; } .t-voice .tileico { color: #be185d; }
.t-calls { background: #e9e5df; color: #5b5047; } .t-calls .tileico { color: #6b625a; } .tile.soon { border-style: dashed; border-color: #b9aea2; box-shadow: none; cursor: default; }
.tilebadge { position: absolute; top: 10px; right: 12px; min-width: 44px; height: 44px; border-radius: 22px; background: #d6336c; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; padding: 0 8px; border: 3px solid #fff; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; padding: 8px 0; align-content: start; }
.avatar-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: 4px solid #fff; border-radius: 32px; padding: 14px; box-shadow: 0 6px 0 rgba(90, 50, 10, .12), 0 14px 26px rgba(90, 50, 10, .08); text-decoration: none; color: var(--ink); cursor: pointer; font: inherit; }
.avatar-tile:active { transform: translateY(3px); } .avatar-tile .huge { width: min(40vw, 150px); height: min(40vw, 150px); } .avatar-name { font-weight: 800; font-size: 1.3rem; }
.avatar-tile.wallchoice { background: #c9f0e8; } .avatar-tile.wallchoice .huge { color: #0f766e; }
.kid-login { min-height: 100vh; min-height: 100dvh; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; max-width: 860px; margin: 0 auto; }
.kid-login .avatar-grid { width: 100%; } .login-sun { width: 90px; height: 90px; }
.grownups-link { color: var(--muted); padding: 16px 20px; min-height: 56px; display: inline-flex; align-items: center; font-size: 1rem; }
.kid-login.pin .huge.me { width: 120px; height: 120px; }
.pin-dots { display: flex; gap: 16px; } .pin-dot { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--brand); background: #fff; } .pin-dot.on { background: var(--brand); }
.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pin-msg { margin: 0; min-height: 1.5em; font-weight: 800; color: var(--bad); }
.pinpad { display: grid; grid-template-columns: repeat(3, minmax(72px, 96px)); gap: 12px; }
.pinkey { min-height: 76px; border-radius: 24px; border: 4px solid #fff; background: #fff6e5; box-shadow: 0 5px 0 rgba(90, 50, 10, .14); font: inherit; font-size: 2rem; font-weight: 800; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 4px; }
.pinkey:active { transform: translateY(3px); } .pinpic { width: 56px; height: 56px; } .pinkey .ico { width: 1.2em; height: 1.2em; }
.kid .thread-head { justify-content: center; } .kid .msg { max-width: 94%; } .kid .msgtext { font-size: 1.5rem; } .kid .bubble { border-radius: 28px; padding: 14px 18px; }
.kid .msgsticker { width: 150px; height: 150px; } .kid .bigbtn.tool { min-height: 96px; background: #fff; } .little .bigbtn.tool { min-height: 112px; flex: 1 1 100px; } .little .bigbtn.tool .ico { width: 3em; height: 3em; }
.kid .bigbtn.tool.mic { background: #ffd0e6; } .kid .speak { min-height: 64px; min-width: 64px; }
.kid .composer { border-top: 0; background: linear-gradient(transparent, var(--bg) 20%); }
.kid .post { border-radius: 32px; } .kid .react { min-height: 56px; min-width: 56px; } .kid .reactpic { width: 36px; height: 36px; }
.kid .avatar-grid .empty, .kid .empty { grid-column: 1 / -1; }
.sleepy { min-height: 100vh; min-height: 100dvh; background: linear-gradient(#1e2a5a, #3a3f7a); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.moonwrap .bigmoon { width: 160px; height: 160px; color: #ffe08a; } .sleepy-title { font-size: 2.4rem; margin: 0; } .sleepy-sub { margin: 0; font-size: 1.3rem; } .sleepy .bigbtn.ghost { margin-top: 24px; background: transparent; color: #fff; border-color: #fff; }
.kid .event { border-radius: 28px; padding: 16px; } .kid .eventpic { width: 96px; height: 96px; } .kid .dom { font-size: 2.3rem; } .kid .eventtext strong { font-size: 1.5rem; }
.kid .shelf { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .kid .booktitle { font-size: 1.2rem; }
.drawpage .pad { max-width: 100%; }
.voicepage { display: grid; place-items: center; flex: 1; }
.wide .pad-canvas-wrap { border-radius: 28px; }

@media (max-width: 520px) {
  .adult .frame { padding: 0 10px 20px; } .whoname { display: none; } h1 { font-size: 1.45rem; }
  .msg { max-width: 94%; } .cards { grid-template-columns: 1fr; } .swatches { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .tile { min-height: 132px; } .tileico { width: 64px; height: 64px; }
  .tiles { gap: 12px; }
}
@media (max-width: 380px) { .swatches { grid-template-columns: repeat(4, 1fr); } }

/* ---------- static pages (privacy, guide) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.doc h2 { margin-top: 1.6em; } .doc li { margin-bottom: .4em; }
.doc .note { background: var(--warn-soft); border-radius: 14px; padding: 12px 16px; }
.doc table { border-collapse: collapse; width: 100%; } .doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }

/* ---------- grown-up home tiles and section headers (no top bar) ---------- */
.homehead { display: flex; align-items: center; gap: 14px; padding: calc(16px + var(--safe-t)) 0 14px; }
.brand-pic { width: 56px; height: 56px; } .homename { margin: 0; font-size: 1.7rem; } .hello { margin: 2px 0 0; font-size: 1.05rem; }
.atiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .atiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .atiles { grid-template-columns: repeat(4, 1fr); } }
.atile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 124px; padding: 16px 10px; border-radius: 24px; border: 3px solid #fff; background: var(--brand-soft); color: var(--ink); text-decoration: none; font: inherit; font-weight: 800; font-size: 1.12rem; text-align: center; box-shadow: 0 5px 0 rgba(90, 50, 10, .12), 0 10px 20px rgba(90, 50, 10, .07); cursor: pointer; }
.atile:active { transform: translateY(3px); } .atile:hover { filter: brightness(.97); }
.atileico { width: 46px; height: 46px; }
.a-msg { background: #ffd6c9; } .a-msg .atileico { color: #c2410c; } .a-wall { background: #c9f0e8; } .a-wall .atileico { color: #0f766e; }
.a-stories { background: #e4d9ff; } .a-stories .atileico { color: #6d28d9; } .a-cal { background: #cfe5ff; } .a-cal .atileico { color: #1d4ed8; }
.a-approve { background: #ffeab0; } .a-approve .atileico { color: #a16207; } .a-kids { background: #d7f0c2; } .a-kids .atileico { color: #3f7d20; }
.a-circle { background: #ffd0e6; } .a-circle .atileico { color: #be185d; } .a-log { background: #e9e5df; } .a-log .atileico { color: #5b5047; }
.a-summary { background: #d6f1f7; } .a-summary .atileico { color: #0e7490; } .a-settings { background: #ece6dc; } .a-settings .atileico { color: #5b5047; }
.a-out { background: #fff; border-color: var(--line); } .a-out .atileico { color: var(--brand); }
.tilebadge.small { top: 8px; right: 8px; min-width: 32px; height: 32px; border-radius: 16px; font-size: 1rem; }
.sectionhead { display: flex; align-items: center; gap: 12px; }
.adult .sectionhead { padding: calc(12px + var(--safe-t)) 0 14px; }
.adult .sectionhead .sectiontitle { margin: 0; flex: 1; font-size: 1.5rem; }
.btn.big { min-height: 56px; padding: 10px 22px; font-size: 1.1rem; } .backbtn { background: #fff; }
.homebtn { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); border: 2px solid var(--brand); }
.homebtn .ico { width: 28px; height: 28px; }
.content > h1 { margin-bottom: .8em; }

.devbanner { margin: 0; padding: 12px 14px; border-radius: 14px; background: #f3ece1; font-weight: 600; } .devbanner.on { background: var(--good-soft); color: var(--good); } .devbanner .ico { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
