/* 한플로우 패밀리 부모 화면 — 시각 체계 v1(설계 design/redesign/design.md, Fable 5.1 261018).
   원칙: 숫자가 주인공 · 채운 버튼은 하나 · 색은 상태에만 · 따뜻한 절제 · 색만으로 말하지 않는다. */
:root {
  --n0: #FFFFFF; --n50: #FAFAF8; --n100: #F4F4F1; --n200: #E9E9E4; --n300: #D9D9D3;
  --n400: #B5B6B0; --n500: #868781; --n600: #5F615E; --n700: #434542; --n800: #2A2C2A; --n900: #17181A;
  --bg: #F4F4F1; --card: #FFFFFF; --card-sub: #FAFAF8;
  --ink: #17181A; --ink-2: #434542; --muted: #5F615E;
  --line: #E9E9E4; --line-strong: #D9D9D3;
  --brand: #3451B2; --brand-fill: #3451B2; --brand-hover: #2C4599; --brand-ink: #FFFFFF;
  --brand-soft: #EEF1FB; --brand-soft-ink: #2C4599;
  --ok: #1F7A4D; --ok-soft: #E8F4EC;
  --warn: #8A5300; --warn-fill: #D9930D; --warn-soft: #FBF3E3;
  --bad: #C23A2F; --bad-soft: #FBEBE9;
  --track: #E9E9E4;
  --chart-pc: #8A9BE8; --chart-browser: #2C44A6; --chart-over: #D08079; --chart-limit: #868781;
  --heat-0: #E9E9E4; --heat-1: #DDE3F8; --heat-2: #B4C0F0; --heat-3: #7B8FE0; --heat-4: #3451B2;
  --r-sm: 8px; --r-ctl: 10px; --r-card: 16px; --r-sheet: 20px; --radius: 16px;
  --sh-1: 0 1px 2px rgb(23 24 26 / .04), 0 1px 3px rgb(23 24 26 / .04);
  --sh-2: 0 2px 4px rgb(23 24 26 / .04), 0 8px 24px rgb(23 24 26 / .06);
  --sh-3: 0 4px 8px rgb(23 24 26 / .06), 0 24px 64px rgb(23 24 26 / .16);
  --auth-glow: #E4E9FA;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316; --card: #1A1C20; --card-sub: #202329;
    --ink: #ECEDEE; --ink-2: #C9CBD0; --muted: #A3A7AE;
    --line: #2A2D33; --line-strong: #383C44;
    --n100: #24272D; --n200: #2A2D33; --n300: #383C44; --n400: #5A5F68;
    --brand: #8FA0F2; --brand-fill: #4863DB; --brand-hover: #5B75E6; --brand-ink: #FFFFFF;
    --brand-soft: #1F2640; --brand-soft-ink: #B4C0F7;
    --ok: #5FC38E; --ok-soft: #15291F; --warn: #E9B44C; --warn-fill: #D9930D; --warn-soft: #2D2414; --bad: #F0756A; --bad-soft: #301A18;
    --track: #2A2D33;
    --chart-pc: #6E82DE; --chart-browser: #B8C4F7; --chart-over: #D98C84;
    --heat-0: #24262B; --heat-1: #262D4A; --heat-2: #35427A; --heat-3: #5068C4; --heat-4: #8FA0F2;
    --sh-1: none; --sh-2: 0 8px 24px rgb(0 0 0 / .4); --sh-3: 0 24px 64px rgb(0 0 0 / .6);
    --auth-glow: #1F2640;
    color-scheme: dark;
  }
}

/* ---------- 바탕 ---------- */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
.ic { flex: none; display: inline-block; vertical-align: -0.2em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- 상단바 ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: calc(10px + env(safe-area-inset-top, 0px)) 24px 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.logo { color: var(--brand-fill); display: inline-flex; }
.logo .mark { width: 26px; height: 26px; }
.brand .en { font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.who { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 14px; }
.who #whoName { color: var(--ink-2); font-weight: 500; }
.who button.link { color: var(--ink-2); font-size: 14px; }
.who button.link:hover { color: var(--brand); }
.top-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.lang-sel {
  appearance: none; -webkit-appearance: none; width: auto; height: 32px; padding: 0 30px 0 12px;
  font: 500 13px var(--font); color: var(--ink-2); background: var(--card) no-repeat right 10px center / 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
}
@media (max-width: 480px) { .brand .en, .who #whoName { display: none; } .top { padding-left: 16px; padding-right: 16px; } .top-right { gap: 10px; } .who { gap: 10px; } }
.zone-badge { font-size: 12px; color: var(--muted); margin: -2px 0 8px 48px; }
details.more { margin: 8px 0 10px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* ---------- 쪽 ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
body:has(#children > .child:only-child) main { max-width: 600px; }
body:has(#children > .child:nth-child(2):last-child) main { max-width: 840px; }
body:has(#authView:not([hidden])) main { max-width: 1120px; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; margin: 0 0 4px; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 12px; }
h3, h4 { font-weight: 600; }
@media (max-width: 640px) { main { padding: 20px 16px 48px; } h1 { font-size: 20px; } }
.muted { color: var(--muted); }
.center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; box-shadow: var(--sh-1); }
.narrow { max-width: 420px; margin: clamp(24px, 10vh, 96px) auto; }
.empty { text-align: center; padding: 56px 24px; }
.empty h2 { font-size: 17px; margin: 0 0 6px; }
.empty p { max-width: 360px; margin: 0 auto; font-size: 14px; }
.empty-ico { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }

/* ---------- 로그인 ---------- */
body:has(#authView:not([hidden])) { background: radial-gradient(70% 45% at 50% -10%, var(--auth-glow) 0%, var(--bg) 70%) fixed, var(--bg); }
#authView { padding: 32px; box-shadow: var(--sh-2); }
#authView h1 { font-size: 24px; margin-top: 4px; }
#authView > .muted { margin: 6px 0 8px; font-size: 14px; }
.auth-mark .mark { width: 44px; height: 44px; }
@media (max-width: 480px) { #authView { padding: 24px; } }

/* ---------- 폼 ---------- */
label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 16px 0 0; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]), label > select, textarea, .prog-row select, #webYt) {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px;
  font: 400 15px var(--font); color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  transition: border-color .15s, box-shadow .15s;
}
@media (min-width: 768px) { :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), label > select, #webYt) { min-height: 40px; padding: 8px 12px; } }
@media (prefers-color-scheme: dark) { :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), label > select, textarea, .prog-row select, #webYt) { background-color: var(--card-sub); } }
input::placeholder, textarea::placeholder { color: var(--n400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
:where(label > select, .prog-row select, #webYt) {
  appearance: none; -webkit-appearance: none; padding-right: 36px; background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
input[type=time] { font-variant-numeric: tabular-nums; }
input[type=time]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
@media (prefers-color-scheme: dark) { input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); } }

/* 체크박스·라디오 */
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border: 1.5px solid var(--line-strong); background: var(--card); cursor: pointer; display: inline-grid; place-content: center;
  transition: background .15s, border-color .15s;
}
input[type=checkbox] { border-radius: 6px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background: var(--brand-fill) no-repeat center / 14px; border-color: var(--brand-fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border: 6px solid var(--brand-fill); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--ink); cursor: pointer; }
label.check small { color: var(--muted); }

/* 토글 스위치(켜고 끄는 설정) */
label.check.toggle { justify-content: space-between; align-items: center; min-height: 44px; flex-direction: row-reverse; gap: 16px; }
label.check.toggle > span { flex: 1; }
label.check.toggle input {
  width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--line-strong); position: relative; margin: 0;
}
label.check.toggle input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .18s;
}
label.check.toggle input:checked { background: var(--brand-fill); background-image: none; }
label.check.toggle input:checked::before { transform: translateX(18px); }

/* 라디오 카드(시간을 다 쓰면) */
label.check.choice { border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 12px 14px; margin: 0; align-items: flex-start; transition: border-color .15s, background .15s; }
label.check.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* 버튼 */
button {
  font: 500 15px var(--font); cursor: pointer; white-space: nowrap; flex: none; border-radius: var(--r-ctl);
  border: 1px solid transparent; padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
button.primary { background: var(--brand-fill); color: var(--brand-ink); font-weight: 600; }
button.primary:hover { background: var(--brand-hover); }
button.ghost { background: var(--card); border-color: var(--line-strong); color: var(--ink-2); }
button.ghost:hover { background: var(--n100); color: var(--ink); }
button.tonal { background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 600; }
button.tonal:hover { filter: brightness(.97); }
button.link { background: none; border: none; color: var(--brand); padding: 0; min-height: 0; font-size: 14px; display: inline; }
button.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
button.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
form button.primary[type=submit] { width: 100%; margin-top: 24px; min-height: 48px; font-size: 16px; }
.switch { text-align: center; margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.error { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }

/* ---------- 자녀 카드 ---------- */
.child { display: flex; flex-direction: column; }
.child .head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 650; font-size: 15px; }
.child .name { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--n100); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.lock { background: var(--bad-soft); color: var(--bad); }
.badge.idle { background: var(--n100); color: var(--muted); }
.usage { margin: 20px 0 10px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.usage small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
@media (max-width: 640px) { .usage { font-size: 30px; } }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-fill); width: 0; transition: width .3s; }
.bar.warn > i { background: var(--warn-fill); }
.bar.over > i { background: var(--bad); }
.bar.thin { height: 4px; }
.bonus, .window-sum, .remind-over, .browser-usage { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 10px; color: var(--ink-2); }
.bonus { color: var(--ok); }
.window-sum .ic, .browser-usage .ic { color: var(--muted); }
.browser-usage { font-weight: 500; margin-top: 14px; }
.browser-usage small { color: var(--muted); font-weight: 400; }
.browser-usage + .bar { margin-top: 8px; }
.remind-over { color: var(--warn); }
.devices { margin: 16px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.devices li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--line); }
.devices li > span:first-child { color: var(--ink-2); font-weight: 500; }
.devices .web-status { display: block; font-size: 12px; padding: 4px 0 0; margin: 0; border: 0; color: var(--muted); }
.devices .web-status.bad { color: var(--warn); }
.devices .web-status.ok { color: var(--muted); }
.alerts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.alerts:not(:has(*)) { display: none; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-soft-ink); }
.pill.req { background: var(--warn-soft); color: var(--warn); }
.child.sos { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* 알림 틀 — 옅은 바탕 + 왼쪽 3px 선 + 글자색 */
.admin-warn, .sos-banner, .prep-note, .consent-box, .parent-lock, .warn-note:not(:empty):is(div, p#versionWarn, p#scheduleWarn, p#euWarn, p#pauseWarn) {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--r-ctl); font-size: 13px; line-height: 1.55; border-left: 3px solid;
}
.admin-warn { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn-fill); }
.warn-note { color: var(--warn); font-size: 13px; }
.warn-note:is(div, #versionWarn, #scheduleWarn, #euWarn, #pauseWarn) { background: var(--warn-soft); border-left-color: var(--warn-fill); }
#deadlineBox { margin-bottom: 16px; }
.sos-banner { background: var(--bad-soft); color: var(--bad); border-left-color: var(--bad); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sos-banner button.primary { background: var(--bad); }
.parent-lock { background: var(--bad-soft); color: var(--bad); border-left-color: var(--bad); font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.parent-lock button.link { color: var(--bad); font-weight: 600; margin-left: auto; }
.prep-note { background: var(--card-sub); color: var(--ink-2); border-left-color: var(--line-strong); margin: 0 0 4px; }
.consent-box { background: var(--brand-soft); color: var(--ink); border-left-color: var(--brand); margin: 8px 0; }
.notice { margin-bottom: 16px; border-left: 3px solid var(--brand); }

/* 빠른 동작 */
.quick { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.quick button .ic { margin-left: -2px; }

/* 보호 상태 */
.protect-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border: 0; background: var(--n100); color: var(--ink-2);
  border-radius: 999px; min-height: 30px; padding: 0 12px 0 10px; font-size: 13px; margin: 12px 0 0; cursor: pointer; }
.protect-btn:hover { background: var(--n200); }
.protect-btn.ok .ic { color: var(--ok); }
.protect-btn.notice .ic { color: var(--warn-fill); }
.protect-btn.alert { background: var(--bad-soft); color: var(--bad); }
.protect-btn .dot { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.notice { background: var(--warn-fill); }
.dot.alert { background: var(--bad); }

/* 카드 아래 아이콘 탭 7개 */
.child .actions { display: flex; justify-content: stretch; gap: 0; margin: 18px -20px -20px; padding: 4px 6px; border-top: 1px solid var(--line); flex-wrap: nowrap; }
.child .actions button.tab { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 2px; border: 0; background: none; border-radius: var(--r-sm); color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.2; white-space: normal; text-align: center; }
.child .actions button.tab:hover { background: var(--n100); color: var(--ink); }
.child .actions button.tab span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* «오늘 HH:MM 까지» 연장(M4 S6) */
.card .extend { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--card-sub); border: 1px solid var(--line); }
.card .extend label { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 600; margin: 0; color: var(--ink); }
.card .extend input[type=time] { width: auto; display: inline-block; margin: 0; min-height: 40px; }
.card .extend .extend-preview { margin: 10px 0 4px; font-size: 14px; }
.card .extend .hint { margin: 0 0 12px; font-size: 12px; color: var(--muted); }

/* ---------- 대화상자 ---------- */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 24px 24px 0; box-shadow: var(--sh-3);
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--card); color: var(--ink);
}
dialog:not(:has(.actions)), dialog.report, dialog.chat { padding-bottom: 24px; }
dialog > h2:first-child, dialog form > h2:first-child { font-size: 20px; margin: 0 0 8px; }
dialog::backdrop { background: rgb(17 18 20 / .5); }
dialog .actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  background: var(--card); border-top: 1px solid var(--line); margin: 20px -24px 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px));
}
dialog form > details.danger-zone, dialog form > .rule-block:last-child { margin-bottom: 24px; }
@media (max-width: 640px) {
  html:root dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: calc(100dvh - 24px); border-bottom: 0; padding: 28px 20px 0; }
  dialog:not(:has(.actions)), dialog.report, dialog.chat { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  dialog::before { content: ""; position: absolute; top: 9px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 999px; background: var(--n300); }
  dialog .actions { margin: 20px -20px 0; padding-left: 20px; padding-right: 20px; }
  dialog .actions button { flex: 1; }
}
.steps { padding-left: 20px; color: var(--ink-2); line-height: 1.7; }
.code { font-size: 40px; letter-spacing: 10px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; margin: 16px 0 4px; padding: 16px; border-radius: 12px; background: var(--card-sub); }
.small-note { font-size: 12px; margin: 8px 0 10px; line-height: 1.55; }

/* 시트 머리(닫기 단추가 있는 대화상자) */
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.chat-head h2 { margin: 0; }

/* 섹션 = 그룹 인셋 패널 */
.rule-block { background: var(--card-sub); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; }
.rule-block h3 { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.rule-block h3 small { display: block; font-weight: 400; font-size: 12px; margin: 2px 0 0; color: var(--muted); }
.rule-block > label.check:first-of-type { margin-top: 4px; }
.rule-block label.check.toggle { margin-top: 4px; }
@media (prefers-color-scheme: dark) { .rule-block { background: var(--card-sub); } }

/* ---------- 시간 규칙 ---------- */
dialog.rules { width: min(560px, calc(100vw - 32px)); }
#limitControls, #browserControls { margin-top: 12px; }
#limitRange, #browserRange { width: 100%; }
input[type=range] { appearance: none; -webkit-appearance: none; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: var(--track); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 999px; background: var(--track); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--card); border: 2px solid var(--brand-fill); box-shadow: var(--sh-1); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid var(--brand-fill); }
.limit-value { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 10px; color: var(--muted); }
.limit-value input { width: 120px; display: inline-block; text-align: center; margin: 0; min-height: 52px; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.over-limit { margin-top: 14px; display: grid; gap: 8px; }
.over-limit > .muted { font-size: 13px; font-weight: 500; }
.weekday-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.weekday-grid label { margin: 0; text-align: center; font-size: 12px; min-width: 0; color: var(--muted); }
.weekday-grid input { text-align: center; padding: 8px 0; font-size: 14px; min-width: 0; min-height: 40px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.weekday-grid input::-webkit-outer-spin-button, .weekday-grid input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.window { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; display: grid; gap: 10px; box-shadow: var(--sh-1); }
.window .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.window input[type=text] { flex: 1; min-width: 120px; margin: 0; }
.window input[type=time] { width: auto; display: inline-block; margin: 0; min-height: 40px; padding: 6px 10px; }
.window.invalid { border-color: var(--bad); }
.window .ico { color: var(--brand); display: inline-flex; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); align-items: center; justify-content: center; }
.window .toggles { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; }
.window .toggles .check { margin: 0; font-size: 14px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day { width: 36px; height: 36px; min-height: 36px; border-radius: 999px; border: 0; background: var(--n100); color: var(--ink-2); padding: 0; font-size: 13px; font-weight: 500; }
.day.on { background: var(--brand-fill); color: var(--brand-ink); }
@media (max-width: 640px) { .day { width: 40px; height: 40px; } }
.window-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.remove { margin-left: auto; color: var(--bad); }
.preset-picker { margin-top: 12px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; }
.preset-picker > .muted { font-size: 13px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 10px; }
.preset { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 76px; padding: 12px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink-2); font-size: 13px; white-space: normal; }
.preset .ico { color: var(--brand); display: inline-flex; }
.preset:hover, .preset:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.week { margin-top: 16px; }
.week h4 { margin: 0 0 8px; font-size: 14px; }
.week-filters, .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--n100); }
.week-filters button, .seg-btn { border: 0; background: transparent; color: var(--muted); min-height: 30px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.week-filters button[aria-selected=true], .seg-btn.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
@media (prefers-color-scheme: dark) { .week-filters button[aria-selected=true], .seg-btn.on { background: var(--n300); } }
.week-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 10px 0; flex-wrap: wrap; }
.wk-key { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.wk-key.lock, .wk-block.lock { background: var(--brand-fill); color: var(--brand-ink); }
.wk-key.notify, .wk-block.notify { border: 1.5px solid var(--warn-fill); background: repeating-linear-gradient(45deg, var(--warn-soft) 0 4px, var(--card) 4px 8px); color: var(--ink); }
.week-canvas { display: grid; grid-template-columns: 26px repeat(7, 1fr); gap: 3px; position: relative; }
.wk-hours { position: relative; margin-top: 20px; height: 240px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-hours span { position: absolute; right: 2px; transform: translateY(-50%); }
.wk-day { min-width: 0; }
.wk-head { height: 20px; font-size: 11px; text-align: center; color: var(--muted); }
.wk-body { position: relative; height: 240px; background: repeating-linear-gradient(to bottom, var(--card) 0 59px, var(--line) 59px 60px); border-radius: 6px; border: 1px solid var(--line); }
.wk-block { position: absolute; left: 1px; right: 1px; border-radius: 4px; font-size: 10px; line-height: 1.2; padding: 2px 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box; display: flex; gap: 2px; align-items: flex-start; }
.wk-block .ic { flex: none; margin-top: 1px; }
.wk-block span { overflow: hidden; text-overflow: ellipsis; }
.wk-block.bell::after { content: ""; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 520px) { .wk-body, .wk-hours { height: 192px; } .wk-body { background: repeating-linear-gradient(to bottom, var(--card) 0 47px, var(--line) 47px 48px); } }

/* ---------- 토스트 ---------- */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(8px);
  background: var(--n900); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--sh-3);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: min(420px, calc(100vw - 32px)); }
@media (prefers-color-scheme: dark) { #toast { background: #ECEDEE; color: #17181A; } }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 가족 메시지 ---------- */
dialog.chat { width: min(520px, calc(100vw - 32px)); }
.chat-list { height: min(52vh, 460px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card-sub); border-radius: 12px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; word-break: break-word; font-size: 14px; }
.msg.child { align-self: flex-start; background: var(--card); box-shadow: var(--sh-1); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.parent { align-self: flex-end; background: var(--brand-fill); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.msg .meta { font-size: 11px; opacity: .7; margin-top: 4px; }
.msg.sos { border: 1.5px solid var(--bad); background: var(--bad-soft); }
.msg .tag { display: inline-block; font-size: 11px; font-weight: 600; margin-bottom: 4px; color: var(--warn); }
.msg.sos .tag { color: var(--bad); }
.decide { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.decide input { width: 72px; display: inline-block; margin: 0; min-height: 36px; padding: 4px 8px; }
.decide .state { font-size: 13px; font-weight: 600; }
.state.ok { color: var(--ok); } .state.no { color: var(--muted); }
.chat-form { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.chat-form input { flex: 1; min-width: 0; margin: 0; }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; }

/* ---------- 리포트 ---------- */
dialog.report { width: min(680px, calc(100vw - 32px)); }
.seg { margin: 12px 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats div { background: var(--card-sub); border: 0; border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.stats span { font-size: 12px; }
.stats strong { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .stats strong { font-size: 17px; } .stats div { padding: 10px; } }
.chart-wrap { overflow-x: auto; }
#repChart { width: 100%; height: 220px; display: block; }
#repChart .col { fill: var(--chart-pc); }
#repChart .col.over { fill: var(--chart-over); }
#repChart .limit { stroke: var(--chart-limit); stroke-dasharray: 4 3; stroke-width: 1.5; fill: none; pointer-events: none; }
#repChart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
#repChart .grid { stroke: var(--line); }
#repChart .col-browser { fill: var(--chart-browser); opacity: 1; pointer-events: none; }
#repChart .col-hit { fill: transparent; cursor: pointer; }
#repChart .col-hit:hover, #repChart .col-hit:focus-visible { fill: var(--ink); fill-opacity: .05; outline: none; }
.rep-vs { display: block; font-size: 12px; color: var(--muted); }
.rep-vs.up { color: var(--warn); }
.rep-summary { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.rep-summary li::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--n400); margin: 0 8px 3px 2px; }
.rep-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.rep-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rep-legend .sw.pc { background: var(--chart-pc); }
.rep-legend .sw.browser { background: var(--chart-browser); margin-left: 10px; }
.rep-programs { display: grid; margin: 6px 0 0; }
.rep-prog { display: grid; grid-template-columns: minmax(0, 1fr) 5.5em 6.5em 6.5em; gap: 10px; justify-items: end; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rep-prog-name { justify-self: stretch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-prog-num { font-variant-numeric: tabular-nums; }
.rep-prog-num.used-up { color: var(--bad); font-weight: 600; }
@media (max-width: 480px) { .rep-prog { grid-template-columns: minmax(0, 1fr) auto; } .rep-prog > :nth-child(3) { justify-self: start; } }
.rep-day { margin-top: 12px; }
.rep-day-line { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rep-day-line:last-child { border-bottom: 0; }
.hours-wrap { overflow-x: auto; margin-top: 8px; }
.hours-grid { display: grid; gap: 3px; min-width: 300px; }
.hours-row { display: grid; grid-template-columns: 6.5em repeat(24, minmax(10px, 1fr)); gap: 3px; align-items: center; }
.hours-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hours-tick { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.hours-unknown { grid-column: 2 / -1; font-size: 12px; color: var(--muted); padding: 2px 8px; border: 1px dashed var(--line-strong); border-radius: 4px; }
.hc { height: 14px; border-radius: 3px; background: var(--heat-0); }
.hc.l1 { background: var(--heat-1); }
.hc.l2 { background: var(--heat-2); }
.hc.l3 { background: var(--heat-3); }
.hc.l4 { background: var(--heat-4); }
.hours-legend .hc { width: 12px; height: 12px; display: inline-block; }
@media (max-width: 480px) { .hours-row { grid-template-columns: 4.6em repeat(24, minmax(7px, 1fr)); gap: 1px; } .hours-grid { gap: 1px; } .hc { height: 12px; } }

/* ---------- 프로그램·사이트 규칙 ---------- */
.prog-list { display: grid; gap: 0; margin: 8px 0; }
.prog-row { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.prog-name { display: flex; flex-direction: column; min-width: 0; }
.prog-name strong { font-weight: 600; font-size: 14px; }
.prog-name small { color: var(--muted); font-size: 12px; }
.prog-name strong, .prog-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-row input.mins { width: 76px; margin: 0; min-height: 36px; padding: 4px 8px; }
.prog-row select { width: auto; margin: 0; min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
.prog-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.prog-add input { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.cat-grid label.check { margin-top: 10px; font-size: 14px; }
textarea { resize: vertical; }
#webBody.dim { opacity: .45; }
.test-result { font-size: 14px; margin: 8px 0 0; min-height: 1.3em; }
.test-result.ok { color: var(--ok); }
.test-result.bad { color: var(--bad); }
@media (max-width: 420px) {
  .prog-row { grid-template-columns: 1fr auto auto; }
  .prog-row .prog-name { grid-column: 1 / -1; }
}

/* ---------- 이메일 확인·보호 동의 ---------- */
.code-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.code-row input { max-width: 160px; margin-top: 0; letter-spacing: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 되돌릴 수 없는 동작 ---------- */
details.danger-zone { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
details.danger-zone summary { cursor: pointer; color: var(--bad); font-size: 14px; font-weight: 500; }
button.danger { background: var(--bad); color: #fff; margin-top: 12px; font-weight: 600; }

/* ---------- 보호 상태 시트(설계 m3 §3.5) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.protect-devices { display: grid; gap: 10px; margin: 10px 0; }
.protect-device { background: var(--card-sub); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.protect-device.silent { border-color: var(--bad); background: var(--bad-soft); }
.protect-status { font-size: 14px; }
.protect-events { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; font-size: 14px; }
.protect-events li { padding: 10px 12px; border-left: 3px solid var(--line-strong); background: var(--card-sub); border-radius: 0 8px 8px 0; }
.protect-events li.pause { border-left-color: var(--warn-fill); }
.protect-events li.alert { border-left-color: var(--bad); background: var(--bad-soft); }
.check-line { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-top: 6px; }
.unpair-block { margin-top: 12px; }
.unpair-code { font-size: 22px; font-weight: 700; letter-spacing: .08em; margin: 8px 0; font-variant-numeric: tabular-nums; }
.protect-unpair { font-size: 13px; margin: 4px 0; color: var(--muted); }
.protect-unpair.stuck { color: var(--warn); }
.protect-device > button { display: inline-flex; width: auto; margin: 8px 0 2px; }   /* 원격 해제 — 한 번 누르면 기존 danger(빨강 바탕·흰 글씨)로 확정 대기 */

/* ---------- 시간 풀어주기(Q4 — 설계 q4 §4.2·§5.6) ---------- */
.pause-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-ctl); border-left: 3px solid var(--warn-fill); background: var(--warn-soft); color: var(--ink); font-size: 13px; line-height: 1.55; display: grid; gap: 6px; }
.pause-head { display: flex; align-items: center; gap: 6px; color: var(--warn); }
.pause-head strong { font-size: 14px; font-weight: 600; }
.pause-sub { color: var(--ink-2); }
.pause-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pause-devices li { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.pause-devices li > span:first-child { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pause-devices li > span:last-child { color: var(--muted); text-align: right; }
.pause-devices li.ok > span:last-child { color: var(--ok); }
.pause-warn { display: flex; gap: 6px; align-items: flex-start; color: var(--warn); padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--warn-fill) 30%, transparent); }
.pause-warn .ic { margin-top: 1px; }
.pause-box > button { justify-self: start; margin-top: 4px; }
.pause-old { margin: 8px 0 0; }
.pause-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0 4px; }
.pause-choices label.check.choice { position: relative; justify-content: center; align-items: center; min-height: 52px; padding: 8px 4px; font-weight: 600; font-size: 15px; text-align: center; font-variant-numeric: tabular-nums; }
.pause-choices label.check.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pause-choices label.check.choice:has(input:checked) { color: var(--brand-soft-ink); }
.pause-choices label.check.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 340px) { .pause-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pause-choices { gap: 6px; } .pause-choices label.check.choice { font-size: 14px; padding: 8px 2px; } }
#pauseLeft { margin: 8px 0 4px; }
#pauseConfirm { margin-top: 8px; }
.pin-status { margin: 4px 0 0; font-size: 14px; font-weight: 500; }
.pin-input { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
dialog .actions button.danger { margin-top: 0; }

/* 저장 줄 뒤에 다른 구역(내 데이터·삭제)이 오는 대화상자 — 그때는 붙박이로 두지 않는다 */
dialog .actions:not(:last-child) { position: static; border-top: 0; margin: 20px 0 0; padding: 0; background: none; }
a { color: var(--brand); text-underline-offset: 3px; }

/* ---------- 시간대별 앱 기록(Q5 — 설계 q5 §6.1) ---------- */
.tl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tl-top h3 { margin: 0; }
.tl-top button { flex: none; }
.tl-off-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.tl-on-btn { margin-top: 12px; }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 10px; }
.tl-head strong { font-size: 15px; }
.tl-head select { width: auto; max-width: 100%; margin: 0; min-height: 36px; padding: 4px 32px 4px 10px; font: 400 14px var(--font); color: var(--ink); background: var(--card) no-repeat right 10px center / 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.tl-state { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--card); border: 1px dashed var(--line-strong); font-size: 14px; color: var(--ink-2); }
.tl-state:empty { display: none; }
.tl-device { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tl-device:first-child { border-top: 0; padding-top: 0; }
.tl-dev-name { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-warn { margin: 0 0 8px; }
.tl-zone { margin: 0 0 8px; }
.tl-strip { position: relative; height: 28px; background: var(--track); border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.tl-strip[tabindex] { cursor: pointer; }
.tl-seg { position: absolute; top: 0; bottom: 0; min-width: 1px; }
.tl-seg.on { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; min-width: 4px; }
.tl-ticks { position: relative; height: 18px; margin: 0 1px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-ticks span { position: absolute; top: 3px; transform: translateX(-50%); line-height: 1; white-space: nowrap; }
.tl-ticks span:first-child { transform: none; }
.tl-ticks span:last-child { transform: translateX(-100%); }
.tl-caption { min-height: 1.55em; margin: 4px 0 0; font-size: 13px; color: var(--ink); font-weight: 500; }
.tl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--ink-2); }
.tl-legend li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tl-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.tl-totals { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.tl-totals li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.tl-totals li span { min-width: 0; overflow-wrap: anywhere; }
.tl-consent-body { white-space: pre-line; font-size: 14px; line-height: 1.6; color: var(--ink-2); background: var(--card-sub); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 12px 14px; max-height: min(44vh, 360px); overflow: auto; margin: 8px 0 14px; }
.tl-consent-body:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tl-pw { margin-top: 14px; }
.tl-off-confirm { font-size: 15px; line-height: 1.6; margin: 8px 0 0; }
#tlOffDialog .warn-note { background: var(--warn-soft); border-left: 3px solid var(--warn-fill); margin-top: 12px; padding: 10px 12px; border-radius: var(--r-ctl); line-height: 1.55; }
/* Q5b §2.8 청소년 자녀 동의 상태 카드 · §3.4 합계만 */
.tl-teen-note { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--brand-soft); color: var(--brand-soft-ink); font-size: 14px; line-height: 1.55; }
.tl-teen { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--card); border: 1px solid var(--line-strong); border-left: 3px solid var(--brand); }
.tl-teen[data-tone=ok] { border-left-color: var(--ok); }
.tl-teen[data-tone=warn] { border-left-color: var(--warn-fill); background: var(--warn-soft); }
.tl-teen[data-tone=muted] { border-left-color: var(--n400); }
.tl-teen-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.tl-teen-state { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.tl-teen[data-tone=warn] .tl-teen-state { color: var(--warn); }
.tl-teen-devices { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--warn); line-height: 1.5; }
.tl-teen-devices:empty { display: none; }
.tl-ask-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.tl-ask-row .small-note { margin: 0; }
.tl-totals-note { margin: 0 0 4px; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--card-sub); border: 1px dashed var(--line-strong); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 480px) { .tl-ticks { font-size: 10px; } .tl-totals li { font-size: 13px; } }

/* Q6 아침 요약 메일·PC 사용 기록(설계 q6 §6·§B5) */
.pc-sessions { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; margin-top: 10px; color: var(--ink-2); line-height: 1.5; font-variant-numeric: tabular-nums; }
.pc-sessions .ic { color: var(--muted); flex: none; margin-top: 1px; }
.pc-sessions span { min-width: 0; overflow-wrap: anywhere; }
.digest-home { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.digest-home button { flex: none; }
.digest-nudge p { margin: 6px 0 0; }
.digest-preview { margin-top: 8px; }
.digest-preview iframe { display: block; width: 100%; height: min(480px, 60dvh); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#digestStatus:empty { display: none; }
.quiet-times { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.quiet-times label { flex: 1 1 120px; margin: 0; }
.quiet-times input[type=time] { min-height: 44px; }
.protect-events.sessions { font-variant-numeric: tabular-nums; }
.protect-events.sessions li.open { border-left-color: var(--brand); }
label.check.toggle:has(input:disabled) { cursor: not-allowed; }
label.check.toggle:has(input:disabled) > span, label.check.toggle input:disabled { opacity: .5; }
.pc-sessions .nw { white-space: nowrap; }
