/* Task 55 보호자 동의 시안 — 셸 + LOPI 앱(다크) + 메일·보호자 페이지(밝음). 값 근거는 design.md */
:root {
  --kr: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Hiragino Sans", sans-serif;
  --brand: #BEF264;
  --card: #161616;
  --card2: #1A1A1A;
  --line: #2A2A2A;
  --mute: #7F7F7F;
  --sub: #ABABAB;
  --err: #FF6B6B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #0b0b0b; color: #fff; font-family: var(--kr); word-break: keep-all; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- 셸 ---------- */
.draft-bar { position: sticky; top: 0; z-index: 20; background: #FDE68A; color: #111; font-size: 13px; font-weight: 600; text-align: center; padding: 7px 12px; }
.stage { display: grid; grid-template-columns: 260px minmax(420px, 1fr) 340px; gap: 28px; max-width: 1440px; margin: 0 auto; padding: 28px 24px 60px; align-items: start; }
.toc { position: sticky; top: 56px; font-size: 14px; }
.toc h1 { font-size: 17px; font-weight: 700; }
.toc .meta { color: var(--mute); font-size: 12px; line-height: 1.6; margin: 6px 0 18px; }
.flow { margin-bottom: 18px; }
.flow h2 { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.flow h2 small { display: block; color: var(--mute); font-weight: 400; font-size: 12px; margin-top: 2px; }
.flow ol { list-style: none; border-left: 1px solid var(--line); }
.flow li button { display: flex; gap: 8px; width: 100%; text-align: left; padding: 6px 10px; font-size: 13px; color: var(--sub); border-left: 2px solid transparent; margin-left: -1px; line-height: 1.4; }
.flow li button:hover { color: #fff; }
.flow li button[aria-current="true"] { color: #fff; border-left-color: var(--brand); background: rgba(255,255,255,.04); }
.flow li .k { color: var(--mute); font-variant-numeric: tabular-nums; min-width: 22px; }
.flow li .t { font-size: 11px; color: var(--mute); margin-left: auto; }

.center { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stepnav { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--sub); }
.stepnav button { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: #fff; }
.stepnav button:disabled { opacity: .3; cursor: default; }
.stepnav .where { min-width: 180px; text-align: center; }
.frame-label { font-size: 12px; color: var(--mute); }

.panel { position: sticky; top: 56px; background: var(--card); border-radius: 12px; padding: 20px; font-size: 14px; line-height: 1.6; }
.panel h3 { font-size: 15px; margin-bottom: 4px; }
.panel .who { color: var(--mute); font-size: 12px; margin-bottom: 14px; }
.panel h4 { font-size: 12px; color: var(--brand); margin: 14px 0 6px; font-weight: 700; }
.panel ul { padding-left: 18px; color: #ddd; }
.panel li { margin-bottom: 4px; }
.panel .law li { color: var(--sub); font-size: 13px; }
.panel .q li { color: #FDE68A; font-size: 13px; }

/* ---------- 폰 프레임 ---------- */
.phone { width: 375px; height: 780px; border-radius: 44px; background: #000; border: 10px solid #1c1c1c; box-shadow: 0 0 0 1px #333, 0 30px 60px rgba(0,0,0,.5); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.statusbar { display: flex; justify-content: space-between; padding: 14px 26px 6px; font-size: 14px; font-weight: 600; flex: none; }
.app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.back-header { display: flex; align-items: center; height: 48px; padding: 0 12px; flex: none; }
.back-header .bk { width: 32px; height: 32px; font-size: 20px; }
.back-header .ttl { flex: 1; text-align: center; font-size: 17px; font-weight: 500; margin-right: 32px; }
.scroll { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.scroll::-webkit-scrollbar { width: 0; }
.bottom { flex: none; padding: 12px 20px 28px; display: flex; flex-direction: column; gap: 10px; }
.h1 { font-size: 22px; font-weight: 700; line-height: 1.4; margin: 8px 0 8px; }
.p { font-size: 14px; color: var(--sub); line-height: 1.6; }
.p b { color: #fff; }
.lbl { font-size: 13px; color: var(--sub); margin: 18px 0 8px; display: block; }
.field { width: 100%; background: #080808; border: 1px solid #555; border-radius: 6px; padding: 14px 16px; font-size: 15px; color: #fff; }
.field.ok { border-color: var(--brand); }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 9px 0; font-size: 14px; color: var(--sub); }
.seg button.on { border-color: var(--brand); color: var(--brand); }
.btn-primary { height: 50px; border-radius: 999px; background: var(--brand); color: #000; font-size: 16px; font-weight: 600; width: 100%; }
.btn-primary:disabled { background: #3a3a3a; color: #777; cursor: default; }
.btn-sub { height: 52px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); font-size: 15px; width: 100%; }
.btn-text { font-size: 14px; color: var(--sub); text-decoration: underline; padding: 6px; }
.info { display: flex; gap: 10px; border-radius: 6px; background: rgba(255,255,255,.1); padding: 14px; margin-top: 16px; }
.info .ic { color: var(--brand); font-size: 15px; line-height: 1.3; flex: none; }
.info b { display: block; font-size: 13px; margin-bottom: 2px; }
.info span { font-size: 12px; color: var(--sub); line-height: 1.55; display: block; }
.info.warn .ic { color: var(--err); }
.card { background: var(--card); border-radius: 12px; padding: 16px; margin-top: 14px; }
.card .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.card .row span:first-child { color: var(--mute); flex: none; }
.card .row span:last-child { text-align: right; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; }
.pill.wait { background: rgba(190,242,100,.14); color: var(--brand); }
.pill.ok { background: var(--brand); color: #000; }
.pill.no { background: rgba(255,107,107,.15); color: var(--err); }
.pill.gray { background: #2A2A2A; color: var(--sub); }
.kid-card { background: var(--card2); border-radius: 12px; padding: 16px; margin-top: 14px; }
.kid-card h5 { font-size: 14px; margin-bottom: 8px; }
.kid-card ol { padding-left: 18px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.lock-list { list-style: none; margin-top: 8px; }
.lock-list li { font-size: 13px; color: var(--sub); padding: 4px 0; }
.lock-list li::before { content: "🔒 "; }
.big-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; margin: 28px auto 12px; background: rgba(190,242,100,.14); color: var(--brand); }
.big-ic.no { background: rgba(255,107,107,.15); color: var(--err); }
.big-ic.gray { background: #2A2A2A; color: var(--sub); }
.center-t { text-align: center; }
.variant-tabs { display: flex; gap: 6px; margin: 4px 0 6px; }
.variant-tabs button { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--sub); }
.variant-tabs button.on { background: #fff; color: #000; border-color: #fff; }
.timer { font-variant-numeric: tabular-nums; color: var(--mute); }

/* 동의 목록 (앱) */
.agree-all { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border-radius: 12px; font-weight: 600; font-size: 15px; margin-top: 10px; }
.chk { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #555; flex: none; display: grid; place-items: center; font-size: 13px; color: transparent; }
.on > .chk, .chk.on { background: var(--brand); border-color: var(--brand); color: #000; }
.agree-group { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.agree-group .gh { padding: 12px 16px; font-size: 12px; color: var(--mute); background: var(--card2); }
.agree-item { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.agree-item .tx { flex: 1; font-size: 14px; line-height: 1.5; }
.agree-item .tx small { display: block; color: var(--sub); font-size: 12px; margin-top: 2px; }
.req { color: var(--brand); font-size: 12px; font-weight: 600; }
.opt { color: var(--mute); font-size: 12px; font-weight: 600; }
.recv { list-style: none; margin-top: 8px; }
.recv li { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); color: #ddd; }
.recv li:first-child { border-top: 0; }
.recv .flag { color: var(--sub); font-size: 12px; }
.recv .flag.x { color: var(--brand); }
.sample { font-size: 11px; color: #FDE68A; border: 1px solid #6b5f2a; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.more { font-size: 12px; color: var(--sub); text-decoration: underline; margin-top: 6px; display: inline-block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: none; z-index: 5; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #161616; border-radius: 20px 20px 0 0; padding: 20px; display: none; z-index: 6; max-height: 78%; overflow-y: auto; }
.sheet.show, .sheet-bg.show { display: block; }
.sheet h5 { font-size: 16px; margin-bottom: 12px; }
.kv { font-size: 13px; line-height: 1.6; }
.kv div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.kv div:first-child { border-top: 0; }
.kv dt { color: var(--mute); }

/* ---------- 메일 프레임 ---------- */
.mail { width: 720px; max-width: 100%; background: #fff; color: #111; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.mail-top { display: flex; align-items: center; gap: 10px; background: #F1F3F4; padding: 10px 16px; font-size: 13px; color: #555; }
.mail-top .dots i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #d0d0d0; margin-right: 5px; }
.mail-head { padding: 18px 24px 12px; border-bottom: 1px solid #E5E5E5; }
.mail-head .subj { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.mail-head .from { font-size: 13px; color: #555; line-height: 1.6; }
.mail-head .from b { color: #111; }
.mail-lang { display: flex; gap: 6px; padding: 10px 24px; border-bottom: 1px solid #E5E5E5; font-size: 12px; color: #777; align-items: center; }
.mail-lang button { border: 1px solid #ddd; border-radius: 999px; padding: 4px 12px; color: #555; }
.mail-lang button.on { background: #111; color: #fff; border-color: #111; }
.mail-body { background: #F6F6F6; padding: 24px 12px; }
.mail-body iframe { display: block; width: 100%; border: 0; height: 900px; background: #F6F6F6; }

/* ---------- 브라우저 프레임 (보호자 페이지) ---------- */
.browser { background: #fff; color: #111; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.5); width: 720px; max-width: 100%; }
.browser.mobile { width: 390px; border-radius: 36px; border: 10px solid #1c1c1c; }
.browser-bar { display: flex; align-items: center; gap: 10px; background: #F1F3F4; padding: 10px 14px; font-size: 12px; color: #555; }
.browser-bar .url { flex: 1; background: #fff; border-radius: 999px; padding: 6px 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser-bar .url b { color: #188038; font-weight: 600; }
.view-toggle { display: flex; gap: 6px; }
.view-toggle button { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--sub); }
.view-toggle button.on { background: #fff; color: #000; }
.gweb { height: 760px; overflow-y: auto; background: #fff; }
.browser.mobile .gweb { height: 700px; }
.gweb-in { max-width: 560px; margin: 0 auto; padding: 28px 24px 40px; font-size: 15px; line-height: 1.65; }
.glogo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.glogo .logo { font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.glogo .logo i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #84cc16; margin-left: 2px; }
.glogo select { border: 1px solid #ddd; border-radius: 6px; padding: 5px 8px; font-size: 13px; background: #fff; color: #111; }
.gh1 { font-size: 24px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.gp { color: #444; }
.gbox { background: #F6F6F6; border-radius: 10px; padding: 16px 18px; margin-top: 18px; }
.gbox h3 { font-size: 15px; margin-bottom: 8px; }
.gtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.gtable th { text-align: left; color: #666; font-weight: 500; width: 108px; vertical-align: top; padding: 8px 8px 8px 0; border-top: 1px solid #E5E5E5; }
.gtable td { padding: 8px 0; border-top: 1px solid #E5E5E5; }
.gtable tr:first-child th, .gtable tr:first-child td { border-top: 0; }
.gsec { margin-top: 26px; }
.gsec h2 { font-size: 17px; margin-bottom: 8px; }
.gsec .tag { font-size: 12px; font-weight: 600; color: #b45309; background: #FEF3C7; border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }
.glist { padding-left: 20px; color: #333; }
.glist li { margin-bottom: 4px; }
.gform label { display: block; font-size: 14px; color: #444; margin: 14px 0 6px; }
.gform input, .gform select { width: 100%; border: 1px solid #ccc; border-radius: 8px; padding: 12px 14px; font-size: 15px; background: #fff; color: #111; }
.gcheck { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #ddd; border-radius: 10px; padding: 14px; margin-top: 12px; cursor: pointer; font-size: 14px; }
.gcheck input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: #111; }
.gcheck small { display: block; color: #666; margin-top: 2px; }
.gbtns { display: flex; gap: 10px; margin-top: 22px; }
.gbtns button { flex: 1; height: 52px; border-radius: 10px; font-size: 16px; font-weight: 600; }
.g-no { border: 1px solid #ccc; color: #111; background: #fff; }
.g-yes { background: #111; color: #fff; }
.g-yes:disabled { background: #bbb; cursor: default; }
.gnote { font-size: 13px; color: #666; margin-top: 14px; }
.gfoot { font-size: 12px; color: #888; border-top: 1px solid #E5E5E5; margin-top: 32px; padding-top: 14px; line-height: 1.7; }
.gdone { text-align: center; padding-top: 30px; }
.gdone .ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 28px; background: #ECFCCB; color: #3f6212; }
.gdone .ic.no { background: #FEE2E2; color: #b91c1c; }
.gwarn { background: #FEF3C7; color: #78350f; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 14px; }

/* 좁은 화면 */
@media (max-width: 1180px) {
  .stage { grid-template-columns: 1fr; }
  .toc, .panel { position: static; }
  .flow ol { display: flex; flex-wrap: wrap; border: 0; }
}
