/* Parent mode — clean, modern redesign (loaded after style.css, overrides its parent styles). Also the kid character picker. */
.parent-bg, .setup, .pin-gate { --pf: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg2: #F5F7FB; --text: #0F172A; --text2: #64748B; --hair: #E6EAF0; --acc: #2563EB; --acc-soft: #EEF3FF; }
.parent-bg { background: var(--bg2); font-family: var(--pf); color: var(--text); font-weight: 500; }
.parent-bg .t-body, .setup .t-body { font-weight: 500; font-size: 15px; }
.parent-bg .t-small, .setup .t-small { font-weight: 500; color: var(--text2); line-height: 1.45; }
.parent-bg .t-title { font-weight: 700; letter-spacing: -.02em; }
.parent { background: var(--bg2); }
.p-head { gap: 12px; padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 5; }
.p-face { width: 40px; height: 40px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--hair); }
.p-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.p-head-text b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-head-text small { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-head-text small:first-child { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--acc); }
.p-page-title { font-size: 26px; font-weight: 700; letter-spacing: -.03em; padding: 18px 18px 2px; flex: none; }
.p-body { padding: 12px 16px 24px; gap: 14px; }
.pcard { border: 1px solid var(--hair); border-radius: 18px; padding: 18px; gap: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.pcard-h h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.pcard-h p { margin: 4px 0 0; font-size: 13px; color: var(--text2); line-height: 1.45; }
.parent-bg .label, .setup .label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text2); margin-top: 4px; }
.pbtn { font-family: var(--pf); font-weight: 600; font-size: 15px; border-radius: 12px; padding: 12px 16px; background: var(--acc);
  box-shadow: 0 1px 2px rgba(37,99,235,.25); transition: background .15s, transform .1s; white-space: normal; }
.pbtn:hover:not(:disabled) { background: #1D4ED8; }
.pbtn.soft { background: var(--acc-soft); color: var(--acc); box-shadow: none; } .pbtn.soft:hover:not(:disabled) { background: #E0E9FF; }
.pbtn.sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; flex: none; }
.pbtn.ok { background: #16A34A; } .pbtn.bad { background: #DC2626; } .pbtn.bad-soft { background: #FEF2F2; color: #DC2626; box-shadow: none; }
.link-btn { font-weight: 600; font-size: 14px; border-radius: 8px; } .link-btn:hover { background: var(--bg2); }
.field { font-size: 13px; font-weight: 600; color: var(--text2); gap: 6px; }
.field input, .field textarea, .select select { font-family: var(--pf); font-size: 15px; font-weight: 500; color: var(--text);
  border: 1px solid #D5DBE5; border-radius: 12px; padding: 12px 14px; background-color: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .select select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.select { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.select select { width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.choice-field { display: flex; flex-direction: column; gap: 6px; } .choice-field > span { font-size: 13px; font-weight: 600; color: var(--text2); }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #EEF1F6; border-radius: 12px; }
.segmented button { flex: 1 1 auto; min-width: 0; border-radius: 9px; padding: 9px 12px; font-family: var(--pf); font-size: 14px; font-weight: 600;
  color: var(--text2); transition: background .15s, color .15s, box-shadow .15s; }
.segmented button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.pick-grid button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--hair); background: #fff; font-size: 22px; }
.pick-grid button.on { border-color: var(--acc); background: var(--acc-soft); box-shadow: 0 0 0 2px rgba(37,99,235,.25); }
.stepper { display: inline-flex; align-items: center; border: 1px solid #D5DBE5; border-radius: 12px; overflow: hidden; background: #fff; flex: none; }
.stepper button { width: 38px; height: 36px; font-size: 18px; font-weight: 600; color: var(--acc); }
.stepper button:disabled { color: #CBD5E1; } .stepper button:not(:disabled):hover { background: var(--acc-soft); }
.stepper b { min-width: 58px; text-align: center; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.wbar { height: 10px; gap: 2px; background: transparent; } .wbar i { border-radius: 99px; }
.wlist { display: flex; flex-direction: column; }
.wrow { gap: 10px; padding: 8px 0; border-top: 1px solid #F1F4F8; } .wrow:first-child { border-top: 0; }
.wdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wn { flex: 1; width: auto; font-size: 14px; } .wn b { font-weight: 600; } .wn small { color: var(--warn); font-size: 11px; }
.kpi { border-radius: 16px; padding: 14px; gap: 4px; } .kpi small { font-size: 12px; font-weight: 500; } .kpi b { font-size: 22px; }
.p-tabs { padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.p-tabs button { gap: 3px; padding: 4px 0; color: var(--text2); font-size: inherit; }
.p-tab-ic { width: 48px; height: 30px; border-radius: 99px; display: grid; place-items: center; transition: background .15s; }
.p-tabs .on { color: var(--acc); } .p-tabs .on .p-tab-ic { background: var(--acc-soft); }
.licon { width: 22px; height: 22px; } .p-tabs small { font-size: 11px; font-weight: 600; color: inherit; }
.subj { border: 1px solid var(--hair); } .subj.open { background: #FAFBFF; border-color: #C9D6F5; }
.subj-head { padding: 10px 12px; } .subj-icon { border-radius: 12px; width: 38px; height: 38px; }
.draft { border: 1px solid var(--hair); background: #FAFBFD; border-radius: 14px; }
.days-left { border-radius: 12px; }
.mat-pick { border: 1px solid var(--hair); margin-bottom: 2px; } .mat-pick.on { border-color: var(--acc); }
.between { justify-content: space-between; }
.sub-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--hair); }
.ch-preview { font-size: 13px; color: var(--text); background: var(--bg2); border-radius: 12px; padding: 10px 12px; line-height: 1.5; }
.ch-preview small { font-weight: 600; color: var(--acc); }
.ch-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #F1F4F8; }
.ch-no { width: 24px; height: 24px; border-radius: 8px; background: var(--acc-soft); color: var(--acc); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; color: var(--text2); font-weight: 700; flex: none; } .icon-btn:hover { background: var(--bg2); } .icon-btn.bad { color: #DC2626; }
.toc-box { border: 1px solid #C9D6F5; background: #F7FAFF; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.toc-box ol { margin: 0; padding-left: 20px; line-height: 1.6; }
.parent-bg .row.gap8 > .pbtn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; }
.setup { font-family: var(--pf); }
.setup .t-hero { font-size: 26px; letter-spacing: -.03em; }
.hud-avatar { display: block; border-radius: 50%; }

/* ---------- character picker (kid) ---------- */
.char-stage { display: flex; justify-content: center; align-items: flex-end; gap: 4px; padding: 8px 0; }
.char-title { font: 700 20px var(--game); color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.18); margin-top: 4px; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.char-card { background: #fff; border-radius: 22px; padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 5px 0 #D5DBEE; border: 3px solid transparent; transition: transform .1s; }
.char-card:active { transform: translateY(3px); box-shadow: 0 2px 0 #D5DBEE; }
.char-card img { width: 96px; height: 96px; object-fit: contain; }
.char-card b { font-size: 16px; font-weight: 900; } .char-card small { font-size: 12px; color: var(--muted); font-weight: 700; }
.char-card.on { border-color: var(--leaf); } .char-card.on small { color: var(--ok); }
.char-card.locked { opacity: .6; }
.char-soon { width: 96px; height: 96px; display: grid; place-items: center; font-size: 40px; border-radius: 50%; background: #F1F4FA; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chev { font-size: 22px; color: #94A3B8; transform: rotate(90deg); transition: transform .2s; margin-left: 6px; line-height: 1; }
.chev.up { transform: rotate(-90deg); }
