/* 보호자 화면 시안 v1 (E7 전). 색·크기·모양은 앱 토큰(tokens.css)만 쓴다. 새 시각 방향은 만들지 않는다.
   정책서 11절 보호자 화면: 아이 화면과 다른 밀도(표·숫자 허용, 표 위에 한 문장 요약), 본문은 꾸미지 않는다(그림은 잠금 입구에만).
   위험한 조작(초기화·삭제·되돌리기)은 두 번 누르기. */

/* ── 보호자 영역 틀 ── */
/* 태블릿(700px~)에서는 보호자 화면만 넓게 쓴다(타일 4칸, 진도 3칸). 앱 바탕(.app)은 480px */
@media (min-width: 700px) { .app:has(.g-screen) { max-width: 720px; } .app:has(.g-screen) .tabbar ul { max-width: 720px; } }
html:has(.g-screen) { scroll-padding-bottom: calc(var(--tabbar-h, 61px) + 16px + var(--sab)); }
.g-screen { flex: 1; padding: calc(8px + var(--sat)) var(--gutter) calc(84px + var(--sab)); } /* 위 상태 표시줄 자리(2026-11-25) */
.g-head { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.g-head__title { flex: 1; min-width: 0; }
.g-head__title h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.g-head__title small { display: block; color: var(--text-mute); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-iconbtn { position: relative; flex: none; display: grid; place-items: center; width: var(--touch); height: var(--touch); border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; padding: 0; }
.g-iconbtn svg { width: 22px; height: 22px; }
.g-iconbtn .g-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--lamp); color: var(--lamp-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.g-back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--touch); padding: 0 12px 0 6px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: var(--fs-btn-small); font-weight: 600; }
.g-back svg { width: 20px; height: 20px; }

/* 보호자 탭(요약·진도·설정) */
.g-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 6px 0 12px; padding: 4px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.g-tabs button { min-height: var(--touch); border: 0; border-radius: 10px; background: transparent; color: var(--text-mute); font-size: 15px; font-weight: 600; cursor: pointer; padding: 0 4px; line-height: 1.2; }
.g-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -3px 0 var(--lamp); }

/* 이번 주 / 오늘 같은 두 갈래 고르기 */
.g-seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 3px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); margin-bottom: 10px; }
.g-seg button { min-height: var(--touch); min-width: 88px; padding: 0 14px; border-radius: var(--radius-pill); border: 0; background: transparent; color: var(--text-mute); font-weight: 600; font-size: 15px; cursor: pointer; }
.g-seg button[aria-pressed="true"] { background: var(--lamp); color: var(--lamp-ink); }

/* 구역 */
.g-sec { margin: 0 0 18px; }
.g-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.g-sec__head h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.g-sec__head span { color: var(--text-mute); font-size: var(--fs-small); white-space: nowrap; }
.g-lead { margin: 0 0 8px; color: var(--text); font-size: 15px; line-height: 1.5; }  /* 표 위 한 문장 요약(11절) */
.g-mute { color: var(--text-mute); font-size: var(--fs-small); }
.g-note { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--text-mute); font-size: var(--fs-small); line-height: 1.45; }

/* 주간 타일 */
.g-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-choice); }
@media (min-width: 700px) { .g-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-tile { padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.g-tile__label { display: block; color: var(--text-mute); font-size: var(--fs-small); }
.g-tile__num { display: block; margin-top: 2px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.g-tile__num small { font-size: 15px; font-weight: 600; color: var(--text-mute); }
.g-tile__sub { display: block; margin-top: 2px; color: var(--text-mute); font-size: 13px; }

/* 목록 줄(누르면 자세히) */
.g-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-choice); }
.g-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.g-row:focus-visible, .g-tabs button:focus-visible, .g-seg button:focus-visible, .g-iconbtn:focus-visible, .g-back:focus-visible, .g-switch:focus-visible, .g-pin-key:focus-visible, .g-day button:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-row__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.g-row__main b { font-weight: 600; line-height: 1.35; }
.g-row__main span { color: var(--text-mute); font-size: var(--fs-small); line-height: 1.4; }
.g-row__end { flex: none; display: flex; align-items: center; gap: 6px; color: var(--text-mute); font-size: var(--fs-small); }
.g-row__end svg { width: 18px; height: 18px; }
.g-row.is-unread { border-color: var(--line-strong); background: var(--surface-2); }
.g-unread { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); }
.g-read { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.g-row--static { cursor: default; }

/* 꼬리표(색 + 글자) */
.g-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--radius-pill); border: 1px solid currentColor; font-size: 13px; line-height: 1.6; white-space: nowrap; color: var(--text-mute); }
.g-tag--lamp { color: var(--lamp); }
.g-tag--math { color: var(--c-math); }
.g-tag--science { color: var(--c-science); }
.g-tag--moral { color: var(--c-moral); }
.g-tag--est { border-style: dashed; }

/* 힌트 쓴 정도 막대(한 색의 진하기 + 숫자, 색만으로 전하지 않음) */
/* 힌트 쓴 정도 막대(오류10 8번, 2026-11-14): 한 가지 색 계열 + 칸마다 다른 무늬(민·빗금·점·격자), 칸 사이 틈 2px, 모든 색이 바탕과 5:1 이상(--g-h*). 숫자는 막대 아래 줄에 모두 */
.g-bar { display: flex; gap: 2px; height: 30px; border-radius: 8px; overflow: hidden; }
.g-bar i { display: grid; place-items: center; flex: 1 1 0; min-width: 6px; font-style: normal; white-space: nowrap; overflow: hidden; }
.g-bar i b { padding: 0 4px; border-radius: 4px; background: var(--paper); color: var(--paper-ink); font-size: 12px; font-weight: 700; line-height: 18px; }
.g-bar i[data-k="0"], .g-sw[data-k="0"] { background: var(--g-h0); }
.g-bar i[data-k="1"], .g-sw[data-k="1"] { background: repeating-linear-gradient(135deg, var(--g-h0) 0 5px, var(--g-h2) 5px 9px); }
.g-bar i[data-k="2"], .g-sw[data-k="2"] { background-color: var(--g-h2); background-image: radial-gradient(circle, var(--g-h0) 1.6px, transparent 2px); background-size: 7px 7px; }
.g-bar i[data-k="3"], .g-sw[data-k="3"] { background-color: var(--g-h3); background-image: linear-gradient(var(--g-h0) 1px, transparent 1px), linear-gradient(90deg, var(--g-h0) 1px, transparent 1px); background-size: 6px 6px; }
.g-bar-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: start; margin-bottom: var(--sp-3); font-size: 13px; color: var(--text-mute); }
.g-bar-row > span { line-height: 30px; }
.g-bar-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; color: var(--text-mute); }
.g-sw { display: inline-block; width: 16px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

/* 카드 상자 */
.g-card { padding: 14px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.g-card + .g-card { margin-top: var(--gap-choice); }
.g-card + .g-sec, .g-seg + .g-card { margin-top: 0; }
.g-screen > .g-card { margin-bottom: 14px; }
.g-card--key { border-color: var(--lamp); }
.g-card h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.35; }
.g-card p { margin: 0 0 8px; line-height: 1.5; }
.g-card p:last-child { margin-bottom: 0; }
.g-card ul, .g-card ol { margin: 4px 0 8px; padding-left: 20px; line-height: 1.55; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.g-signals { list-style: none; margin: 6px 0 8px !important; padding: 0 !important; display: grid; gap: 4px; }
.g-signals li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 15px; }
.g-signals li b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.g-signals li.is-uncounted { background: transparent; border: 1px dashed var(--line); color: var(--text-mute); }
.g-quote { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--lamp); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 15px; }
.g-paper { margin: 6px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--paper); color: var(--paper-ink); font-size: var(--fs-problem); line-height: 1.7; }
.g-paper ol { margin: 0; padding-left: 22px; }
.g-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-choice); margin-top: 10px; }
.g-btns .ui-btn { padding: 0 6px; min-height: 52px; font-size: 15px; }
.g-btns--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-btns--1 { grid-template-columns: 1fr; }
.g-actions { display: grid; gap: var(--gap-choice); margin-top: 12px; }

/* 진도 */
.g-prog { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 15px; }
.g-prog__track { height: 12px; border-radius: 6px; background: var(--off-fill); border: 1px solid var(--line); overflow: hidden; }
.g-prog__fill { height: 100%; background: var(--lamp); }
.g-prog__num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-mute); font-size: var(--fs-small); }
.g-units { display: grid; gap: 8px; }
.g-unit { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.g-unit__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.g-unit__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.g-step { display: grid; justify-items: center; gap: 1px; padding: 4px 2px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; color: var(--text-mute); text-align: center; line-height: 1.3; }
.g-step b { font-size: 14px; color: var(--text); font-weight: 700; }
.g-step.is-done { border-color: var(--lamp); }
.g-step.is-done b { color: var(--lamp); }
.g-step.is-now { border-style: dashed; border-color: var(--line-strong); }
.g-step.is-fail b { color: var(--text); }
.g-unit__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--text-mute); }
.g-lamps { display: inline-flex; gap: 3px; align-items: center; }
.g-lamps i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px dashed var(--off-ink); box-sizing: border-box; }
.g-lamps i.on { background: var(--lamp); border: 1.5px solid var(--lamp); }
.g-lamps.is-hidden i.on { background: transparent; border: 1.5px solid var(--c-ghost); }
@media (min-width: 700px) {
  .g-unit { grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; }
  .g-unit__foot { flex-direction: column; align-items: flex-end; }
}

/* 요일별 과목 */
.g-week { display: grid; gap: 6px; }
.g-day { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; min-height: 56px; padding: 6px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.g-day__name { font-weight: 700; font-size: 17px; text-align: center; }
.g-day__subs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.g-day.is-rest { background: transparent; border-style: dashed; }
.g-day button { min-height: var(--touch); padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-size: var(--fs-btn-small); font-weight: 600; cursor: pointer; }
.g-pick { display: flex; flex-wrap: wrap; gap: var(--gap-choice); }

/* 스위치(켬/끔). 누름 영역은 줄 전체 */
.g-set { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.g-set li + li { border-top: 1px solid var(--border); }
.g-set__row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; width: 100%; background: transparent; border: 0; color: var(--text); text-align: left; font: inherit; }
button.g-set__row { cursor: pointer; }
.g-set__row:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: -3px; }
.g-set__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.g-set__text b { font-weight: 600; line-height: 1.35; }
.g-set__text span { color: var(--text-mute); font-size: 13px; line-height: 1.4; }
.g-set__val { flex: none; color: var(--text-mute); font-size: 15px; display: flex; align-items: center; gap: 4px; }
.g-set__val svg { width: 18px; height: 18px; }
.g-set__row.is-danger b { color: var(--text); }
.g-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 15px; border: 1.5px solid var(--line-strong); background: var(--off-fill); }
.g-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: var(--off-ink); }
.g-switch[aria-checked="true"] { background: var(--lamp); border-color: var(--lamp); }
.g-switch[aria-checked="true"]::after { left: 25px; background: var(--lamp-ink); }
.g-switch__word { flex: none; width: 2.2em; text-align: right; font-size: 13px; color: var(--text-mute); }
@media (prefers-reduced-motion: no-preference) { .g-switch::after { transition: left var(--t-fast) ease; } }

/* 잠금 입구 */
.g-gate { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: calc(4px + var(--sat)); }
.g-gate__art { height: 168px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.g-gate__art svg { width: 100%; height: 100%; display: block; }
.g-gate h1 { margin: 6px 0 0; text-align: center; font-size: var(--fs-title); }
.g-gate__msg { margin: 0; text-align: center; color: var(--text); min-height: 3em; }
.g-gate__msg span { display: block; }
.g-pin-dots { display: flex; justify-content: center; gap: 16px; margin: 2px 0 4px; }
.g-pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); }
.g-pin-dots i.on { background: var(--lamp); border-color: var(--lamp); }
.g-pin-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-choice); max-width: 360px; width: 100%; margin: 0 auto; }
.g-pin-key { min-height: var(--btn-h); border-radius: var(--radius); border: 1.5px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; display: grid; place-items: center; padding: 0; }
.g-pin-key svg { width: 26px; height: 26px; }
.g-pin-key--sub { font-size: var(--fs-btn-small); }
.g-pin-key[aria-disabled="true"] { background: var(--off-fill); color: var(--off-ink); border-style: dashed; border-color: var(--line); cursor: default; }
.g-link { display: block; margin: 4px auto 0; min-height: var(--touch); padding: 0 12px; border: 0; background: transparent; color: var(--text-mute); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; cursor: pointer; }
.g-wait { margin: 0 auto; max-width: 360px; padding: 8px 12px; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--text-mute); font-size: var(--fs-small); text-align: center; }

/* 보호자 탭 점(아이 화면 아래 탭, 결정 D9) */
.tabbar a { position: relative; }
.tabbar a { position: relative; }
.g-tabdot { position: absolute; top: 8px; left: calc(50% + 6px); width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); border: 2px solid var(--sky0); }

/* 미접속 날짜 띠(결정 D7) */
.g-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
.g-days div { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; color: var(--text-mute); text-align: center; min-width: 0; }
.g-days div b { font-size: 15px; color: var(--text); }
.g-days div.rest { border-style: dashed; }
.g-days div.miss { border-color: var(--lamp); border-width: 2px; }
.g-days div.miss b { color: var(--lamp); }
.g-days div.done b { color: var(--text-mute); }

/* 날짜별 시간 표(진도 탭, N1): 글자와 숫자만. 색·막대·강조로 많고 적음을 가르지 않는다(15절) */
.g-times { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.g-times th, .g-times td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; font-weight: 400; }
.g-times thead th { color: var(--text-mute); font-size: var(--fs-small); }
.g-times th:first-child { text-align: left; }
.g-sees h3 { margin: 0 0 6px; font-size: 15px; }
/* 개인정보 처리방침(H173·H180): 보호자 글자 13·15·20. 소제목마다 카드 한 장, 표는 두 칸 고정(가로 스크롤 없음). 채우지 않은 칸은 '준비 중'을 회색 작은 글로 */
.g-pp { padding: 8px 0 24px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.g-pp__lead p { margin: 0 0 14px; }
.g-pp__card { margin: 0 0 12px; }
.g-pp h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.35; }
.g-pp p { margin: 0 0 8px; }
.g-pp__card > :last-child { margin-bottom: 0; }
.g-pp ul { margin: 0 0 8px; padding-left: 22px; }
.g-pp li + li { margin-top: 4px; }
.g-pp__table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 8px; font-size: 15px; }
.g-pp__table th, .g-pp__table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-weight: 400; }
.g-pp__table thead th { color: var(--text-mute); font-size: 13px; }
.g-pp__table tbody th { width: 38%; font-weight: 600; }
.g-pp__table tbody tr:last-child th, .g-pp__table tbody tr:last-child td { border-bottom: 0; }
/* 좁은 폭(휴대폰)에서는 표를 위·아래로 쌓아 가로 스크롤 없이 읽는다 */
@media (max-width: 520px) {
  .g-pp__table, .g-pp__table tbody, .g-pp__table tr, .g-pp__table th, .g-pp__table td { display: block; width: auto; }
  .g-pp__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .g-pp__table tbody tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .g-pp__table tbody tr:last-child { border-bottom: 0; }
  .g-pp__table th, .g-pp__table td { padding: 0; border: 0; }
  .g-pp__table tbody th { width: auto; }
  .g-pp__table td { color: var(--text-mute); }
}
.g-pp__todo { color: var(--text-mute); font-size: 13px; }
.g-pp__web a { color: inherit; text-underline-offset: 3px; }

/* 파일·확인 */
.g-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 15px; overflow-wrap: anywhere; }
.g-file svg { flex: none; width: 22px; height: 22px; color: var(--lamp); }
.g-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0; font-size: 15px; }
.g-kv dt { color: var(--text-mute); }
.g-kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.g-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-choice); }
.g-cmp > div { padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.g-cmp h4 { margin: 0 0 4px; font-size: 15px; }
.g-cmp .g-kv { grid-template-columns: 1fr; gap: 0; font-size: 14px; }
.g-cmp .g-kv dt { font-size: 12px; margin-top: 4px; }
.g-yes, .g-no { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.g-yes li, .g-no li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.g-yes li svg, .g-no li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.g-yes li svg { color: var(--lamp); }
.g-no li svg { color: var(--text-mute); }

/* 화면 아래 고정 단추 줄은 쓰지 않는다(보호자 화면은 단추를 내용 끝에 둔다) */
.g-done { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; text-align: center; }
.g-done svg { width: 40px; height: 40px; color: var(--lamp); }
.g-toast { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius); border: 1.5px solid var(--lamp); background: var(--surface-sheet); font-size: 15px; }
.g-detail { margin-top: 8px; }
.g-detail summary { min-height: var(--touch); display: flex; align-items: center; cursor: pointer; color: var(--text); font-weight: 600; }
.g-detail table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-detail th, .g-detail td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--border); vertical-align: top; }
.g-detail th { color: var(--text-mute); font-weight: 400; font-size: 13px; }
.g-detail td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }


/* ── E7-2 앱 화면에서 더한 것 ── */
.g-screen[hidden] { display: none; }
.g-gate__art .fill-scene { height: 100%; min-height: 0; }
/* 입구 그림은 등대 꼭대기까지 보이는 높이(236px)가 나올 때만. 키 작은 화면은 숫자판에 자리를 준다 */
.g-gate__art { display: none; }
@media (min-height: 800px) { .g-gate__art { display: block; height: 236px; } }
/* 키 작은 폰(25판 N6, 예: 360×640): 숫자판 아래 남는 자리만큼 작은 장면(등대와 자물쇠)이 선다. 자리가 모자라면 120px(화면이 조금 스크롤) */
@media (max-height: 799px) {
  .g-gate__art { display: block; flex: 1 1 120px; height: auto; min-height: 120px; max-height: 236px; order: 9; }
  .g-gate > .g-link { order: 8; }
}
/* 키 큰 화면(태블릿): 그림이 남는 세로를 받아 입구가 빈 채로 남지 않게 한다 */
@media (min-height: 1000px) { .g-gate { min-height: calc(100dvh - 72px); } .g-gate__art { flex: 1 1 236px; height: auto; min-height: 236px; } }
@media (max-height: 700px) { .g-pin-key { min-height: 52px; } .g-gate { gap: 6px; } }
.g-pin-key:active:not([aria-disabled="true"]) { filter: brightness(0.9); }
.g-pin-key--ok { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.g-set__row:disabled, .g-set__row[aria-disabled="true"] { cursor: default; }
.g-chips { display: flex; flex-wrap: wrap; gap: var(--gap-choice); margin-top: 8px; }
.g-chips .ui-chip { min-height: var(--touch); padding: 0 14px; font-size: 15px; }
.g-chips .ui-chip[aria-pressed="true"] { background: var(--lamp); color: var(--lamp-ink); border-color: var(--lamp); }
.g-tabdot { position: absolute; top: 8px; left: calc(50% + 6px); width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); border: 2px solid var(--sky0); pointer-events: none; }
.g-wait { margin: 4px auto 0; }
.g-ok { color: var(--lamp); }
.g-err { color: var(--text); font-weight: 600; }
.g-empty { margin: 0; padding: 12px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--text-mute); font-size: 15px; }
.g-more { margin-top: 8px; }
.g-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.g-row .g-tag { flex: none; }
.g-row.is-static { cursor: default; }
.g-report { margin: 0 0 14px; }
@media (prefers-reduced-motion: reduce) { .g-switch::after { transition: none; } }

/* hidden 속성이 display 규칙에 지지 않게 */
.g-screen [hidden] { display: none !important; }
.g-say { margin: 4px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.5; }
.g-quote .g-say li + li { margin-top: 2px; }

/* ── 24판 보호자 설정 남은 항목(하루 추가 전투 안내 줄, 기록 삭제, 자료 출처) ── */
.g-stepper { cursor: default; }
.g-stepper__ctl { flex: none; display: flex; align-items: center; gap: 6px; }
.g-stepper__btn { min-width: var(--touch); min-height: var(--touch); padding: 0; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.g-stepper__btn:disabled { opacity: 0.4; cursor: default; }
.g-stepper__btn:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-stepper__val { min-width: 3.2em; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-code__label { display: block; margin: 4px 0 6px; font-size: 15px; line-height: 1.5; }
.g-code__label b { font-size: 20px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.g-code { display: block; width: 100%; min-height: var(--touch); padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 20px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.g-code:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-screen .ui-btn.is-armed { outline: 2px solid var(--lamp); outline-offset: 2px; }
.g-license { margin: 4px 0 0; padding: 10px; max-height: 320px; overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.g-license:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-screen > .g-actions + .g-card, .g-screen > .g-card + .g-actions + .g-card { margin-top: 14px; }
.g-screen > .g-mute { margin: 12px 0 0; }

/* 상자 확률 안내(설정 탭, 7·10절). 펼침 칸 안의 표 */
@media (prefers-reduced-motion: no-preference) { .g-set__row[aria-expanded] .g-fold-chev { transition: transform .15s; } }
.g-set__row[aria-expanded="true"] .g-fold-chev { transform: rotate(90deg); }
.g-odds-panel { padding: 4px 12px 14px; display: grid; gap: 8px; }
.g-odds-panel[hidden] { display: none; }
.g-odds-panel > p { margin: 0; }
.g-odds-h { margin: 6px 0 0; font-size: 15px; line-height: 1.35; }
.g-odds { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: auto; }
.g-odds caption { text-align: left; color: var(--text-mute); font-size: 13px; padding: 2px 0 4px; }
.g-odds th, .g-odds td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.g-odds thead th { color: var(--text-mute); font-weight: 400; font-size: 13px; }
.g-odds tbody th { font-weight: 600; color: var(--text); }
.g-odds .g-odds__n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-odds .g-odds__note td { border-top: 0; padding: 0 4px 6px; text-align: left; font-size: 13px; line-height: 1.4; color: var(--text-mute); }

/* ── 언어 화면(10절 H22, 언어 1단계): 두 장의 고르기 카드 + 예 한 줄 ── */
.g-langs { display: grid; gap: 10px; margin-top: 8px; }
.g-lang { display: grid; gap: 3px; text-align: left; min-height: 64px; padding: 12px 16px; border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.g-lang b { font-weight: 600; font-size: 17px; }
.g-lang span { color: var(--text-mute); font-size: 14px; line-height: 1.4; }
.g-lang[aria-checked="true"] { border-color: var(--lamp); background: color-mix(in srgb, var(--lamp) 14%, var(--surface-2)); }
.g-lang:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-lang-ex { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius); border: 1px dashed var(--border); display: grid; gap: 4px; }
.g-lang-ex p { margin: 0; }
.g-lang-ex[hidden] { display: none; }
.g-lang-ex__line { font-size: 20px; font-weight: 600; }
.g-lang-ex .tm-en { font-size: 0.8em; font-weight: 400; color: var(--en-ink); }

/* 약속 만들기 2단계: 직접 쓰기 줄(입력 + 더하기) */
.g-promise-add { display: flex; gap: var(--gap-choice); align-items: center; margin-top: 12px; }
.g-promise-add .w-input { flex: 1; min-width: 0; }
.g-screen > .g-langs, .g-screen > .g-chips { margin-bottom: 12px; }
.g-screen > .g-mute, .g-screen > .g-note { margin: 8px 0 0; }
.g-screen > .g-chips[data-part="promise-chips"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-screen > .g-chips[data-part="promise-chips"] .ui-chip { white-space: normal; justify-content: center; text-align: center; padding: 6px 10px; line-height: 1.3; }
