/* 보호자 화면 디자인 v2 — 차분한 하늘·흰색, 표 대신 카드·말풍선·계단·큰 숫자.
   아이 화면(따뜻한 크림)과 한눈에 구분되게. 모든 규칙은 .parent-screen 안에서만. */
.parent-screen {
  --p-bg: #F6F4EC; --p-card: #FFFFFF; --p-ink: #263A31; --p-ink2: #5E6E66; --p-line: #E6E3D6;
  --pri: #4E7D68; --pri2: #3B6453; --soft: #EEF3EC;
  color: var(--p-ink);
}
body:has(.parent-screen) { background: #F6F4EC linear-gradient(180deg, #E9F0E6 0, #F6F4EC 280px) no-repeat; }
.parent-screen .top { background: rgba(246, 244, 236, .96); border: 0; backdrop-filter: blur(6px); z-index: 6; }
.parent-screen .top h1 { font-size: 1.25em; color: var(--p-ink); }
.parent-screen .btn-back { background: #fff; border: 0; box-shadow: 0 2px 8px rgba(35, 49, 73, .12); }
.parent-screen .parent { gap: 18px; font-size: .95em; }
.parent-screen .card { background: var(--p-card); border-radius: 22px; padding: 20px 22px; border: 1px solid var(--p-line); box-shadow: 0 6px 22px rgba(35, 49, 73, .06); }
.parent-screen .card h2 { font-family: var(--font-title); font-size: 1.2em; color: var(--p-ink); }
.parent-screen .card p { color: var(--p-ink2); line-height: 1.7; }
.parent-screen .btn { border-width: 2px; box-shadow: none; }
.parent-screen .btn.primary { background: var(--pri); border-color: var(--pri2); }
.parent-screen .fine { color: #7A889D; }

/* ── 머리 그림띠 ── */
.v-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 26px; color: #fff;
  background: linear-gradient(120deg, #4E7D68 0%, #6E9C83 60%, #9DBB9A 100%); box-shadow: 0 10px 28px rgba(78, 125, 104, .25); }
.v-hero.calm { background: linear-gradient(120deg, #5F7F8C 0%, #8FB0A4 100%); }
.v-hero h2 { font-family: var(--font-title); font-weight: 400; font-size: 1.45em; margin: 0 0 4px; color: #fff; }
.v-hero p { margin: 0; color: rgba(255, 255, 255, .92); line-height: 1.6; }
.v-hero b { color: #FFF4C9; font-weight: 700; }
.v-hero-ch { display: flex; flex: none; }
.v-hero-ch img { width: 78px; height: 78px; margin-left: -14px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .15)); background: rgba(255, 255, 255, .85); border-radius: 50%; }
.v-hero-ch img:first-child { margin-left: 0; }

/* 핵심 세 가지 */
.v-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v-keys > div { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 12px 14px; border: 1px solid var(--p-line); }
.v-keys span { grid-row: span 2; font-size: 1.7em; text-align: center; }
.v-keys b { font-family: var(--font-title); font-weight: 400; }
.v-keys small { color: var(--p-ink2); }

/* 목차 칩 */
.v-toc { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; position: sticky; top: 0; z-index: 3; background: linear-gradient(var(--p-bg) 70%, transparent); }
.v-toc a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--p-line); color: var(--p-ink); text-decoration: none; font-size: .9em; }
.v-toc a:active { background: var(--soft); }

/* 섹션 머리 */
.v-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; scroll-margin-top: 70px; }
.v-ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6em; background: var(--soft); }
.v-head h2 { margin: 2px 0 2px; }
.v-head p { margin: 0; font-size: .92em; }
.v-sub { font-family: var(--font-title); font-weight: 400; font-size: 1.02em; margin: 18px 0 10px; color: var(--p-ink); }

/* 아이콘 카드 */
.v-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.v-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
@media (max-width: 1000px) { .v-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .v-tiles.three, .v-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .v-tiles.four, .v-tiles.three, .v-tiles.two, .v-keys { grid-template-columns: 1fr; } }
.v-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--p-line); overflow: hidden; }
.v-tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--c); }
.v-tile-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45em; background: color-mix(in srgb, var(--c) 16%, #fff); }
.v-tile b { font-family: var(--font-title); font-weight: 400; font-size: 1.05em; }
.v-tile p { margin: 0; font-size: .92em; }
.v-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.v-chips span { font-size: .78em; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--pri2); }
.v-src { color: #8A97AB; font-size: .76em; margin-top: auto; }

/* 말풍선 바꾸기 ✋ → 💬 */
.v-swaps { display: flex; flex-direction: column; gap: 12px; }
.v-swap { display: grid; grid-template-columns: 1fr 30px 1.2fr; align-items: center; gap: 8px; }
.v-swap small { grid-column: 1 / -1; color: #8A97AB; font-size: .78em; padding-left: 4px; }
.v-arrow { text-align: center; color: #9AAAC2; font-size: 1.3em; }
.bub { position: relative; padding: 12px 14px 12px 40px; border-radius: 18px; line-height: 1.5; }
.bub span { position: absolute; left: 12px; top: 11px; }
.bub.bad { background: #FDEEEE; color: #8C3B3B; text-decoration: line-through; text-decoration-color: rgba(140, 59, 59, .35); border-bottom-left-radius: 4px; }
.bub.good { background: #E7F6EC; color: #23573A; border-bottom-right-radius: 4px; font-weight: 600; }
@media (max-width: 640px) { .v-swap { grid-template-columns: 1fr; } .v-arrow { transform: rotate(90deg); } }

/* 상황 → 말 */
.v-says { display: flex; flex-direction: column; gap: 10px; }
.v-say { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: center; }
.v-who { display: flex; align-items: center; gap: 8px; color: var(--p-ink2); font-size: .9em; }
.v-who span { font-size: 1.5em; }
@media (max-width: 560px) { .v-say { grid-template-columns: 1fr; } }

/* 보이는 모습 ▼ 사실은 */
.v-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.v-flip { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #FFF6EE 0 34%, #fff 34%); border: 1px solid var(--p-line); }
.v-seen { font-family: var(--font-title); font-size: 1.15em; color: #B0562B; }
.v-down { font-size: .78em; color: #8A97AB; }
.v-skill { color: var(--p-ink); line-height: 1.5; font-weight: 600; }

/* 큰 숫자 연구 카드 */
.v-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.v-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--p-line); }
.v-big { font-family: var(--font-title); font-weight: 400; font-size: 1.9em; color: var(--pri); line-height: 1.1; }
.v-label { font-size: .8em; color: var(--p-ink2); }
.v-stat p { margin: 4px 0; font-size: .9em; }

/* 계단 */
.v-stairs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; min-height: 240px; margin: 6px 0 12px; }
.v-step { display: flex; flex-direction: column; gap: 6px; height: 100%; justify-content: flex-end; text-align: center; }
.v-step-bar { height: var(--h); min-height: 54px; border-radius: 14px 14px 6px 6px; background: var(--c); display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; }
.v-step-bar b { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--font-title); font-weight: 400; color: var(--p-ink); }
.v-step strong { font-family: var(--font-title); font-weight: 400; font-size: .88em; line-height: 1.25; }
.v-step small { font-size: .72em; color: var(--p-ink2); line-height: 1.3; }
@media (max-width: 760px) { .v-stairs { grid-template-columns: 1fr; min-height: 0; } .v-step { flex-direction: row; text-align: left; align-items: center; } .v-step-bar { height: 44px; min-height: 0; width: calc(40px + var(--h)); flex: none; padding: 6px; align-items: center; justify-content: flex-end; } .v-step strong { min-width: 7em; } }

/* 두 줄 흐름: 앱 / 생활 */
.v-lanes { display: grid; gap: 8px; }
.v-lane-h, .v-lane { display: grid; grid-template-columns: 8em 1fr 1fr; gap: 8px; align-items: stretch; }
.v-lane-h span { font-size: .82em; color: var(--p-ink2); padding-left: 6px; }
.v-lane-h span:first-child { grid-column: 2; }
.v-when { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); }
.v-when b { width: 28px; height: 28px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; font-weight: 400; flex: none; }
.v-cell { background: #FFF6EE; border-radius: 14px; padding: 10px 12px; font-size: .9em; }
.v-cell.life { background: #E7F6EC; }
@media (max-width: 640px) { .v-lane-h { display: none; } .v-lane { grid-template-columns: 1fr; } .v-cell::before { content: '📱 '; } .v-cell.life::before { content: '🏠 '; } }

/* 전화 카드 */
.v-calls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .v-calls { grid-template-columns: 1fr; } }
.v-call { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 20px; background: #fff; border: 2px solid var(--c); text-decoration: none; color: var(--p-ink); min-height: 140px; }
.v-call-num { font-family: var(--font-title); font-size: 2.2em; line-height: 1; color: var(--c); }
.v-call b { font-family: var(--font-title); font-weight: 400; }
.v-call small { color: var(--p-ink2); }
.v-call-btn { margin-top: auto; align-self: flex-start; background: var(--c); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .85em; }

/* 참고 문헌 접기 */
.v-refs summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-family: var(--font-title); }

/* ── 기존 보호자 부품 다듬기(성장 기록·이해하기·설정) ── */
.parent-screen .hope { background: linear-gradient(120deg, #FFF4D6, #FDE7DC); color: #3E3020; border-radius: 22px; }
.parent-screen .kpis { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.parent-screen .kpi { background: #fff; border: 1px solid var(--p-line); border-radius: 18px; padding: 14px 16px; }
.parent-screen .kpi .kv { font-family: var(--font-title); font-size: 1.6em; color: var(--pri); }
.parent-screen .kpi.up { background: #F1FAF4; border-color: #CDEBD7; } .parent-screen .kpi.up .kv { color: #2F7A49; }
.parent-screen .chart, .parent-screen .diagram { background: #FAF9F4; border: 1px solid var(--p-line); border-radius: 18px; }
.parent-screen .tbl thead th { background: #F1F4EE; color: var(--p-ink2); }
.parent-screen .tbl th, .parent-screen .tbl td { border-bottom-color: #EFEDE4; }
.parent-screen .next-steps li { background: #F7F6F0; border: 1px solid var(--p-line); }
.parent-screen .stage-pill { background: var(--soft); color: var(--pri2); }
.parent-screen .ci-day { background: #F7F6F0; }
.parent-screen .wins li { background: #F7F6F0; border-left: 4px solid #FFC94D; }
.parent-screen .rec { background: #F7F6F0; }
.parent-screen .card.warn { background: #FFF5F5; border-color: #F3C9C9; }
.parent-screen .type-card { background: #FAF9F4; border: 1px solid var(--p-line); }
.parent-screen .dim-bar i { background: linear-gradient(90deg, #A9C7F0, #F3D98C, #F2A9A9); }

/* ── 어른 메뉴 첫 화면 ── */
.p-home-hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 26px; color: #fff; background: linear-gradient(120deg, #4E7D68, #7FA58E); box-shadow: 0 10px 28px rgba(78, 125, 104, .22); }
.p-home-hero img { width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, .9); flex: none; }
.p-home-hero h2 { font-family: var(--font-title); font-weight: 400; color: #fff; font-size: 1.4em; margin: 0 0 6px; }
.p-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.p-stats span { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 12px; font-size: .88em; }
.parent-screen .p-nav { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.parent-screen .p-tile { position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 104px; padding: 16px; background: #fff; border: 1px solid var(--p-line); border-radius: 20px; box-shadow: 0 4px 16px rgba(35, 49, 73, .06); text-align: left; overflow: hidden; }
.parent-screen .p-tile::after { content: '›'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.6em; color: #B9C4D6; }
.parent-screen .p-tile span { grid-row: span 2; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7em; background: color-mix(in srgb, var(--c) 15%, #fff); }
.parent-screen .p-tile b { font-family: var(--font-title); font-weight: 400; font-size: 1.1em; padding-right: 18px; }
.parent-screen .p-tile small { color: var(--p-ink2); padding-right: 18px; }
.parent-screen .p-tile:active { transform: scale(.98); }

/* 연습 조건 4가지 */
.cond-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .cond-grid { grid-template-columns: 1fr; } }
.cond { border: 1px solid var(--p-line); border-radius: 18px; padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 6px; background: #FBFAF6; }
.cond legend { font-family: var(--font-title); padding: 0 6px; }
.cond-opt { position: relative; flex-direction: row !important; }
.cond-opt input { position: absolute; opacity: 0; }
.cond-opt span { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: #fff; border: 2px solid var(--p-line); }
.cond-opt input:checked + span { border-color: var(--pri); background: var(--soft); font-weight: 700; }
.cond-opt input:focus-visible + span { outline: 3px solid #2862B3; outline-offset: 2px; }

/* 생각 연습 목표 흐름 · 센터-집 연결 */
.v-goals { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin-bottom: 12px; }
.v-goal { flex: 1 1 140px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: #FBFAF6; border: 1px solid var(--p-line); position: relative; }
.v-goal-n { position: absolute; top: 8px; right: 10px; font-size: .75em; color: #9AA59F; }
.v-goal-ic { font-size: 1.5em; }
.v-goal b { font-family: var(--font-title); font-weight: 400; }
.v-goal small { color: var(--p-ink2); line-height: 1.35; }
.v-goal-arrow { align-self: center; color: #B7C1BA; font-size: 1.4em; }
@media (max-width: 760px) { .v-goal-arrow { display: none; } }
.v-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v-chain span { background: var(--soft); border-radius: 999px; padding: 8px 14px; font-size: .9em; }
.v-chain i { color: #9AA59F; font-style: normal; }
.parent-screen .ck-opts .no-chance span { background: #F2F1EA; color: #7A857F; font-size: .78em; border-style: dashed; }
.help-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82em; color: var(--p-ink2); }
.help-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.help-rows { display: flex; flex-direction: column; gap: 8px; }
.help-row { display: grid; grid-template-columns: 9em 1fr 5em; gap: 10px; align-items: center; }
.help-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: #EFEDE4; }
.help-bar i { display: block; height: 100%; }
@media (max-width: 520px) { .help-row { grid-template-columns: 1fr 4em; } .help-row b { grid-column: 1 / -1; } }
.v-chips.big span { font-size: .9em; padding: 6px 14px; }
.v-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--pri2); }
.v-tile p + p { margin-top: 2px; }

.ux-parent-summary { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: start; padding: 14px 18px !important; background: #FBFAF4 !important; }
.ux-parent-summary::before { content: '🧭'; grid-row: span 4; font-size: 1.6em; }
.ux-parent-summary h2 { font-size: 1em !important; margin: 0; }
.ux-parent-summary p { margin: 0; font-size: .86em; }
.parent-screen .diagram svg { max-width: 620px; margin: 0 auto; } .parent-screen .diagram { padding: 10px; }
