:root {
  --bg: #fff8f1; --card: #ffffff; --ink: #2b2420; --soft: #6f625a; --line: #f0e3d6;
  --coral: #e8664a; --coral-2: #fbe1d8; --teal: #2a9d8f; --teal-2: #d9f1ee; --sun: #f4b63f; --sun-2: #fdf0d2;
  --r: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 'Nunito', system-ui, sans-serif; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { font-family: 'Baloo 2', 'Nunito', sans-serif; line-height: 1.15; margin: 0; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 19px; }
p { margin: 0; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font: 800 20px 'Baloo 2', sans-serif; }
.logo { width: 30px; height: 30px; border-radius: 10px; background: var(--coral); color: #fff; display: grid; place-items: center; font-size: 13px; }
.kid { background: var(--card); border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 14px; }
main { padding: 6px 16px 20px; }
.lead { color: var(--soft); margin: 4px 0 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.moment { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 104px; }
.moment .e { font-size: 28px; }
.moment b { font: 800 17px/1.15 'Baloo 2', sans-serif; }
.moment small { color: var(--soft); font-size: 13px; line-height: 1.3; }
.moment.hot { background: var(--coral); color: #fff; border-color: var(--coral); grid-column: span 2; flex-direction: row; align-items: center; gap: 12px; min-height: 0; }
.moment.hot small { color: #ffe9e2; }
.back { color: var(--soft); font-weight: 800; padding: 4px 0 10px; }
.seg { display: flex; background: #f5e9de; border-radius: 99px; padding: 4px; gap: 4px; margin: 12px 0 14px; }
.seg button { flex: 1; border-radius: 99px; padding: 8px 4px; font-weight: 800; font-size: 13.5px; color: var(--soft); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.card { background: var(--card); border-radius: var(--r); border: 1.5px solid var(--line); padding: 16px; margin-bottom: 14px; }
.card-h { display: flex; gap: 12px; align-items: flex-start; }
.card-h .e { font-size: 34px; line-height: 1; }
.card-h .fav { margin-left: auto; font-size: 22px; color: var(--coral); padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { font-size: 12.5px; font-weight: 800; border-radius: 99px; padding: 3px 9px; background: var(--sun-2); }
.chip.t { background: var(--teal-2); } .chip.c { background: var(--coral-2); }
.mats { font-size: 14px; color: var(--soft); margin-bottom: 8px; }
ol.steps { margin: 6px 0 8px; padding-left: 22px; } ol.steps li { margin: 3px 0; }
.note { font-size: 14px; background: #fff3cf; border-radius: 12px; padding: 8px 10px; margin-top: 8px; }
.note.safe { background: #ffe4dc; }
.more { font-size: 14px; color: var(--soft); margin-top: 6px; }
.more b { color: var(--ink); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn { border-radius: 14px; padding: 11px 10px; font-weight: 900; background: #f5e9de; text-align: center; }
.btn.p { background: var(--coral); color: #fff; } .btn.g { background: var(--teal); color: #fff; }
.btn.wide { grid-column: span 2; width: 100%; display: block; }
.btn.sm { padding: 7px 10px; font-size: 14px; }
.empty { text-align: center; color: var(--soft); padding: 30px 10px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; background: var(--card); border-top: 1.5px solid var(--line); display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 6; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 11.5px; font-weight: 800; color: var(--soft); padding: 4px 0; }
.tabs button span { font-size: 20px; line-height: 1.2; }
.tabs button.on { color: var(--coral); }
.sheet { position: fixed; inset: 0; background: rgba(43,36,32,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-in { background: var(--bg); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; }
.reason { display: flex; width: 100%; text-align: left; gap: 12px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 8px; }
.reason .e { font-size: 24px; }
.reason b { display: block; } .reason small { color: var(--soft); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: 99px; padding: 9px 16px; font-weight: 800; font-size: 14px; z-index: 30; }
.toast[hidden] { display: none; }
.timer { text-align: center; padding: 18px 0 8px; }
.timer .t { font: 800 64px/1 'Baloo 2', sans-serif; color: var(--coral); }
.script { background: var(--card); border-left: 5px solid var(--teal); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-weight: 800; font-size: 17px; }
.script.storm { border-color: var(--coral); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.pick button { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 8px; font-weight: 800; line-height: 1.2; }
.pick button.on { border-color: var(--coral); background: var(--coral-2); }
.pick .e { font-size: 28px; display: block; margin-bottom: 4px; }
.day { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; width: 100%; text-align: left; }
.day .n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #f5e9de; display: grid; place-items: center; font-weight: 900; }
.day.done .n { background: var(--teal); color: #fff; }
.day.done b { text-decoration: line-through; text-decoration-color: var(--teal); }
.day small { color: var(--soft); display: block; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.toggles button { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 14px; }
.toggles button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.toggles button.off { text-decoration: line-through; color: var(--soft); background: #f5e9de; }
.label { font-weight: 900; margin-top: 18px; }
.fine { font-size: 12.5px; color: var(--soft); margin-top: 18px; }
.bar { height: 8px; background: #f5e9de; border-radius: 99px; overflow: hidden; margin: 10px 0 16px; }
.bar i { display: block; height: 100%; background: var(--teal); }
.pic { width: 64px; height: 64px; object-fit: contain; flex: none; margin: -4px 0; }
.mpic { width: 52px; height: 52px; object-fit: contain; }
.moment.hot .mpic { width: 60px; height: 60px; background: #fff; border-radius: 16px; padding: 4px; }
.ppic { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.rpic { width: 40px; height: 40px; object-fit: contain; }
.mascot { width: 120px; height: 120px; object-fit: contain; display: block; margin: -8px auto 0; }
.logo-img { width: 34px; height: 34px; object-fit: contain; }
body.locked .tabs, body.locked .kid { display: none; }
.gate { text-align: center; padding-top: 20px; }
.gate img { width: 150px; height: 150px; object-fit: contain; }
.gate h1 { margin: 6px 0 4px; }
.gate input { width: 100%; padding: 14px; border-radius: 14px; border: 2px solid var(--line); font: 800 22px 'Nunito'; text-align: center; letter-spacing: 2px; margin: 8px 0 12px; text-transform: uppercase; }
.gate .err { color: #b2412a; font-weight: 800; margin-top: 12px; }
