@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/dmsans.woff2) format("woff2"); }
:root { --paper: #fbf8ef; --ink: #14213d; --muted: #4c5873; --line: #dbe3ee; --blue: #1458d4; --yellow: #f3bd35; --green: #137a3c; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.45 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
[hidden] { display: none !important; }
.wrap { max-width: 520px; margin: 0 auto; padding: 12px 18px calc(28px + env(safe-area-inset-bottom)); }
.top { padding: 4px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.top .tag { background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .78rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge { display: inline-block; margin: 4px 0 2px; background: #fff1c9; border: 2px solid var(--yellow); color: var(--ink); font-weight: 800; font-size: .95rem; padding: 5px 12px; border-radius: 999px; }
.when { margin: 0 0 12px; font-size: .95rem; color: var(--muted); }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand b { font-weight: 400; color: var(--blue); }
.kick { margin: 8px 0 6px; display: flex; gap: 8px; align-items: center; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.free { background: var(--green); color: #fff; padding: 3px 9px; border-radius: 999px; font-size: .72rem; }
h1 { font-size: 2rem; line-height: 1.12; margin: 4px 0 8px; }
.lead { font-size: 1.2rem; margin: 0 0 14px; }
.why { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.why li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: 1rem; }
.why span { font-size: 1.5rem; }
.big { display: block; width: 100%; border: 0; border-radius: 18px; padding: 18px 14px; min-height: 60px; font: 800 1.3rem "DM Sans", system-ui, sans-serif; background: var(--blue); color: #fff; cursor: pointer; box-shadow: 0 10px 26px rgba(20, 88, 212, .28); margin: 0 0 12px; }
.big.alt { background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; font-size: 1.1rem; min-height: 54px; padding: 14px; }
.fine { text-align: center; color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.dayn { font-size: 1.5rem; font-weight: 800; margin: 4px 0 8px; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 0 0 14px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: #e6e9f0; }
.dots i.on { background: var(--green); }
.dots i.now { background: #fff; box-shadow: inset 0 0 0 3px var(--blue); }
.card { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px; margin: 0 0 14px; }
.card .em { font-size: 2.6rem; margin: 0; line-height: 1; }
.card h1 { font-size: 1.6rem; margin: 8px 0 6px; }
.how { font-size: 1.15rem; margin: 0 0 12px; }
.gu { background: #fff4d1; border-radius: 12px; padding: 10px 12px; font-size: 1rem; margin: 0 0 10px; }
.mins { color: var(--muted); font-size: .9rem; margin: 0; font-weight: 700; }
.donemsg { background: #e7f6ec; border: 2px solid var(--green); border-radius: 16px; padding: 12px 14px; font-weight: 800; font-size: 1.1rem; margin: 0 0 12px; text-align: center; }
.small { display: block; margin: 6px auto 0; background: none; border: 0; color: var(--blue); font: 700 .95rem "DM Sans", system-ui, sans-serif; padding: 10px; min-height: 44px; text-align: center; cursor: pointer; text-decoration: underline; }
#over { color: var(--muted); font-weight: 400; font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 1rem; max-width: 90vw; text-align: center; margin: 0; }

/* kids on this phone */
.kids { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.kid { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; min-height: 44px; font: 700 .95rem "DM Sans", system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.kid.on { border-color: var(--blue); background: #e8f0ff; }
.kid .d { color: var(--muted); font-weight: 400; margin-left: 4px; }
.kid.add { border-style: dashed; color: var(--blue); }
/* grown-up sign-up */
.signup { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px; margin: 18px 0 8px; }
.signup h2 { font-size: 1.25rem; line-height: 1.2; margin: 0 0 10px; }
.signup label { display: block; font-weight: 700; font-size: .95rem; margin: 0 0 10px; }
.signup input:not([type=checkbox]), .signup select { display: block; width: 100%; margin-top: 4px; font: 400 1.05rem "DM Sans", system-ui, sans-serif; padding: 12px; min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.signup fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.signup legend { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.signup legend small { font-weight: 400; color: var(--muted); }
.signup .ck { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0 14px 6px 0; min-height: 44px; }
.signup .ck input { width: 22px; height: 22px; }
.consent { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.err { color: #b3261e; font-weight: 700; font-size: .95rem; margin: 0 0 8px; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* grown-ups gate + plans */
.sheet { position: fixed; inset: 0; background: rgba(20, 33, 61, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding: 12px; overflow-y: auto; }
.sheet .box { background: var(--paper); border-radius: 20px; padding: 18px; width: 100%; max-width: 480px; margin: auto 0 0; }
.sh-h { font-weight: 800; font-size: 1.3rem; margin: 0 0 8px; }
#gate-in { display: block; width: 100%; font: 700 1.3rem "DM Sans", system-ui, sans-serif; padding: 12px; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; margin: 0 0 10px; }
.plans-lead { margin: 0 0 12px; }
.plan { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; }
.plan.pay { border-color: var(--blue); }
.plan .pn { font-weight: 800; font-size: 1.1rem; margin: 0 0 4px; display: flex; justify-content: space-between; }
.plan ul { margin: 0 0 10px; padding-left: 20px; font-size: .95rem; }
.plan a.big { text-align: center; text-decoration: none; margin: 0 0 6px; }
.gu-link { margin-top: -4px; }
/* Brave Habits (bonus stars) */
.habits { background: #fff; border: 2px solid var(--yellow); border-radius: 20px; padding: 14px 14px 10px; margin: 4px 0 14px; }
.hab-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.habits h2 { font-size: 1.25rem; margin: 0; }
.stars { background: #fff1c9; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 1rem; white-space: nowrap; }
.hab-sub { color: var(--muted); font-size: .9rem; margin: 4px 0 10px; }
.hab-list { display: grid; gap: 8px; }
.hab { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 12px; font: 700 1.05rem "DM Sans", system-ui, sans-serif; color: var(--ink); text-align: left; cursor: pointer; }
.hab .he { font-size: 1.5rem; }
.hab .ht { flex: 1; }
.hab .hs { font-size: .78rem; font-weight: 800; color: #9a5b00; background: #ffe6b8; border-radius: 999px; padding: 2px 8px; margin-left: 6px; white-space: nowrap; }
.hab .hc { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; font-size: 1rem; }
.hab.on { border-color: var(--green); background: #e7f6ec; }
.hab.on .hc { border-color: var(--green); background: var(--green); color: #fff; }
.hab.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.04); } }
.hab-streak { font-weight: 800; margin: 10px 0 6px; font-size: 1rem; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge2 { flex: 1; min-width: 60px; text-align: center; border: 2px dashed var(--line); border-radius: 14px; padding: 6px 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.badge2 b { display: block; font-size: 1.4rem; filter: grayscale(1); opacity: .45; }
.badge2.on { border: 2px solid var(--yellow); background: #fff1c9; color: var(--ink); }
.badge2.on b { filter: none; opacity: 1; }
.party { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(20, 33, 61, .45); padding: 18px; overflow: hidden; }
.party-box { position: relative; z-index: 2; background: var(--paper); border-radius: 24px; padding: 22px 18px 10px; text-align: center; max-width: 360px; width: 100%; animation: pop .4s ease; }
.party-em { font-size: 3.4rem; margin: 0; line-height: 1.1; }
.party-t { font-weight: 800; font-size: 1.3rem; margin: 8px 0 14px; }
.conf { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; z-index: 1; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .conf { display: none; } .hab.pop, .party-box { animation: none; } }
