/* 수리랑 UI 개선(2026-11-12, UI 창). 화면 모양만 덧입힌다: 마크업·동작·흐름은 바꾸지 않는다.
   근거와 시안: ui-handoff 브랜치 docs/handoff_ui/개선대책.md(3절 ·11절). 맨 마지막에 읽혀서 앞 파일의 모양 값을 덮는다.
   ① 눌림 → ⑪ 등불 유리(빌드 40)
   ② 등불 진행: 지나온 문제 점에 불빛
   움직임은 0.12초(--t-fast). '움직임 줄이기'면 움직임 없이 모양만 바뀌고, 차분형(
/* ── ① 눌림: 2026-11-13 결정으로 '아랫단 4px·눌림 3px' 규칙을 걷어 냈다. 버튼 생김새·효과는 아래 ⑫ '등불 유리' 한 벌 ── */

/* ── ② 등불 진행 ── */
.ui-dot.is-done { box-shadow: 0 0 8px var(--lamp); }

/* ── ③ 답을 낸 뒤 알림 = 캐릭터의 말(제품 책임자 결정 2026-11-12) ──
   맞히면 무대의 상대('해결' 자세)가, 틀리면 반디가 말한다. 다음 문제로 넘어갈 때까지 계속 보인다.
   마크업은 그대로다(battle-view.js feedbackCard, data-role="fb"). 보이는 자리만 무대 바로 아래로 옮기고(order) 말풍선 모양을 입힌다.
   화면 읽기 순서는 마크업 순서 그대로(문제 → 알림)다. */
.screen.learn[data-screen="battle"] .learn-body > .bt-status { order: -3; }
.screen.learn[data-screen="battle"] .learn-body > .bt-stage { order: -2; }
.screen.learn[data-screen="battle"] .learn-body > .bt-fb { order: -1; position: relative; isolation: isolate; }
/* 맞힘: 꼬리가 위(상대 쪽)를 가리킨다 */
.screen.learn[data-screen="battle"] .bt-fb.ok::before {
  content: ""; position: absolute; left: 50%; top: -8px; width: 13px; height: 13px; margin-left: -7px; transform: rotate(45deg);
  background: var(--surface-2); border-left: 1.5px solid var(--c-science); border-top: 1.5px solid var(--c-science);
}
/* 아쉬움: 왼쪽에 반디, 오른쪽이 말풍선(금색 점선은 그대로) */
.screen.learn[data-screen="battle"] .bt-fb.soft { grid-template-columns: 56px 1fr; gap: 4px 20px; background: none; border: 0; padding: 12px 14px 12px 0; }
.screen.learn[data-screen="battle"] .bt-fb.soft::after {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 64px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1.5px dashed var(--lamp);
}
.screen.learn[data-screen="battle"] .bt-fb.soft::before {
  content: ""; position: absolute; left: 58px; top: 26px; width: 13px; height: 13px; transform: rotate(45deg);
  background: var(--surface-2); border-left: 1.5px dashed var(--lamp); border-bottom: 1.5px dashed var(--lamp);
}
.screen.learn[data-screen="battle"] .bt-fb.soft .bt-fb__ico {
  width: 56px; height: 56px; border: 0; border-radius: 0; background: url("../assets/characters/assets/webp/256/bandi/idle.webp") center / contain no-repeat;
}
.screen.learn[data-screen="battle"] .bt-fb.soft .bt-fb__ico .ui-icon { display: none; }

/* ── ④ 문장제 그림(storyFigure 위젯 src/ui/widgets/story-figure.js). 그림 값은 메인 빌드 38.1(은행 fig)이 넘긴다 ── */
/* 문장제 그림(storyFigure): 밝은 종이 위 교과서 그림. 모르는 칸 = 초록 테두리 + '?', 답을 낸 뒤 = 연초록 채움 */
.sf { --sf-ink: var(--paper-ink); --sf-ok: #1F7A5C; --sf-warn: #C0532F; --sf-off: #6A7399; --sf-a: #FFE3A8; --sf-b: #DCE9FF; --sf-okfill: #D9F5EA; --sf-paper: #fff; font-family: var(--f-num); }
.sf-t { font-weight: 700; } .sf-t.sf-plain { font-weight: 400; }
.sf-t.sf-ink { fill: var(--sf-ink); } .sf-t.sf-ok { fill: var(--sf-ok); } .sf-t.sf-warn { fill: var(--sf-warn); } .sf-t.sf-off { fill: var(--sf-off); }
.sf-box { fill: var(--sf-paper); stroke: var(--sf-ink); stroke-width: 2; }
.sf-box.is-a { fill: var(--sf-a); } .sf-box.is-b { fill: var(--sf-b); } .sf-box.is-off { stroke: var(--sf-off); }
.sf-box.is-solved { fill: var(--sf-okfill); stroke: var(--sf-ok); }
.sf-ask { fill: var(--sf-paper); stroke: var(--sf-ok); stroke-width: 2.5; } .sf-ask.is-solved { fill: var(--sf-okfill); }
.sf .is-dash { stroke-dasharray: 5 4; }
.sf-line { fill: none; stroke-width: 2.5; } .sf-line.sf-thin { stroke-width: 2; }
.sf-line.sf-ink { stroke: var(--sf-ink); } .sf-line.sf-ok { stroke: var(--sf-ok); } .sf-line.sf-warn { stroke: var(--sf-warn); } .sf-line.sf-off { stroke: var(--sf-off); }
.sf-head.sf-ok { fill: var(--sf-ok); } .sf-head.sf-warn { fill: var(--sf-warn); } .sf-head.sf-off { fill: var(--sf-off); }
.ui-card--paper .learn-figure:has(> .wd-story) { border: 0; border-top: 1.5px dashed var(--paper-line); border-radius: 0; background: none; padding: var(--sp-2) 0 0; margin-top: var(--sp-2); }
/* 문장제 그림이 있는 문제(UI 개선 2026-11-12): 숫자판을 조금 줄여 그림이 숫자판에 가리지 않게 한다. 키는 44px(누름 영역 하한) 그대로 지킨다.
   빌드 39: 무대는 줄이지 않는다(무대 높이는 학년군마다 같고 작은 화면은 아래 ⑦의 최소 높이). 360×640에서 상대 그림이 0×0이 되던 것을 고침 */
.screen.learn[data-screen="battle"]:has(.learn-prompt ~ .learn-figure > .wd-story) .learn-input.has-pad .ui-key { min-height: var(--touch); }
.screen.learn[data-screen="battle"]:has(.learn-prompt ~ .learn-figure > .wd-story) .learn-input.has-pad .learn-field { min-height: 46px; }
.screen.learn[data-screen="battle"]:has(.learn-prompt ~ .learn-figure > .wd-story) .learn-input.has-pad .ui-keypad__grid { gap: 6px; }
.screen.learn[data-screen="battle"]:is([data-phase="ask"], [data-phase="retry"]):has(.learn-prompt ~ .learn-figure > .wd-story) .learn-body { gap: 8px; padding-top: 4px; }
.screen.learn[data-screen="battle"]:is([data-phase="ask"], [data-phase="retry"]):has(.learn-prompt ~ .learn-figure > .wd-story) .ui-card--paper { padding: 10px 14px; }
.ui-card--paper .learn-figure:has(> .wd-story) { padding-top: 6px; margin-top: 6px; }
/* 문장제 그림 + 낮은 화면(높이 800px 미만): 위의 '낮은 폰' 규칙처럼 숫자판을 가로 6칸 두 줄로 바꿔 그림 자리를 낸다(키 44px 이상, 순서 1~6 / 7 8 9 0 ⌫) */
@media (max-height: 799px) {
  .screen.learn[data-screen="battle"]:has(.learn-prompt ~ .learn-figure > .wd-story) .learn-input.has-pad .ui-keypad__grid { grid-template-columns: repeat(6, 1fr); }
  .screen.learn[data-screen="battle"]:has(.learn-prompt ~ .learn-figure > .wd-story) .learn-input.has-pad .ui-key--sub { order: 2; }
}
@media (max-height: 700px) {
  .screen.learn[data-screen="battle"]:is([data-phase="ask"], [data-phase="retry"]):has(.learn-prompt ~ .learn-figure > .wd-story) .learn-prompt { font-size: 17px; line-height: 1.45; }
}

/* ── ⑤ 모험 탭 단원 목록(unit-list.js, 시안 B '나') ──
   '지금 갈 곳' 칸 = 밤하늘 무대: 땅 위에 반디, 오른쪽에 가로등·등대, 말은 말풍선, 단추는 아래. 목록은 상태가 색과 모양으로 보인다. */
.ul-next.ui-card { position: relative; overflow: hidden; isolation: isolate; padding: 14px 14px 16px; border: 1.5px solid var(--line);
  background: radial-gradient(130% 90% at 50% 100%, #2A3F8C 0%, var(--sky1) 58%, #0C1638 100%); }
.ul-next.ui-card::before { content: ""; position: absolute; z-index: -1; left: -12%; right: -12%; bottom: -64px; height: 140px; border-radius: 50%;
  background: linear-gradient(180deg, var(--shade-ground-0, #34489F), var(--shade-ground-2, #16245E)); border-top: 2px solid var(--shade-edge-light, #6D82D6); }
.ul-next.ui-card::after { content: ""; position: absolute; z-index: -1; right: 14px; bottom: 34px; width: 104px; height: 132px;
  background: url("../assets/objects/lighthouse_on.webp") center bottom / contain no-repeat; }
.ul-next .ui-card__body { grid-template-columns: auto 1fr; grid-template-areas: "pic say" "go go"; align-items: center; justify-items: start; column-gap: var(--sp-2); }
.ul-next__pic { grid-area: pic; min-height: 0; }
.ul-next__bandi { width: 112px; height: 112px; }
.ul-next__say { grid-area: say; position: relative; margin: 0 0 30px; max-width: 170px; background: var(--sheet); border: 1.5px solid var(--lamp); }
.ul-next__say::before { content: ""; position: absolute; left: -8px; bottom: 14px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--sheet); border-left: 1.5px solid var(--lamp); border-bottom: 1.5px solid var(--lamp); }
.ul-next .ui-card__body > .ui-btn { grid-area: go; justify-self: start; min-width: 180px; margin-left: 4px; } /* 등대와 겹치지 않게 왼쪽 */
.ul-next .ui-card__body > .ul-next__say:only-child { grid-column: 1 / -1; margin: 40px 0 70px; }
/* 목록: 다 한 곳은 등불이 켜지고, 지금 갈 곳은 금색 테두리, 잠긴 곳은 점선·흐림(색과 모양을 함께) */
.ul-item[data-state="done"] .ul-row__icon { filter: drop-shadow(0 0 6px var(--lamp)); }
.ul-item[data-state="open"] .ul-row__icon, .ul-item[data-state="doing"]:not([data-now]) .ul-row__icon { color: var(--line-strong); }
.ul-item[data-now] { border: 1.5px solid var(--lamp); box-shadow: 0 0 0 2px var(--lamp-glow); }

/* ── ⑥ 학년군 밀도(html[data-band], src/ui/feel.js applyBand). 틀은 하나, 3~4학년이 기준(값을 바꾸지 않음) ──
   1~2학년: 글자와 누르는 칸을 키운다. 5~6학년: 무대를 낮춰 문제·풀이 자리를 넓힌다. */
html[data-band="1-2"] .learn-prompt { font-size: 22px; line-height: 1.5; }
html[data-band="1-2"] .learn-choice { min-height: 68px; font-size: 21px; border-radius: 18px; }
html[data-band="1-2"] .learn-bar .ui-btn { min-height: 60px; }
html[data-band="1-2"] .bt-fb__tt { font-size: 22px; }
/* 5~6학년 무대(한 줄 무대)는 아래 ⑦ */
html[data-band="5-6"] .learn-prompt { font-size: 17px; }

/* ── ⑦ 전투 무대·연출(빌드 39, 메인). 계획 src/engine/stage-plan.js, 꾸미기 src/ui/scene/stage.js ──
   무대 높이는 답을 낸 뒤에도 풀 때와 같다(1~2학년 176px · 3~4학년 150px, 2026-11-12 UI 결정). 5~6학년은 한 줄 무대(게이지 옆 두 줄 글).
   작은 화면(높이 760px 이하)은 최소 높이(1~2학년 132px · 3~4학년 120px)로 줄이되 상대 그림은 44px 아래로 줄지 않는다(360×640 문장제 그림 0×0 고침).
   태블릿(폭 700 이상·높이 1000 이상)은 지금처럼 무대가 남는 자리를 채운다.
   동작: 정답 18종은 소품(.st-prop)에, 등장·버티기·판 끝은 몸짓. 모두 0.6초 이하 한 번(--st-ms). 끝 모습은 정적 규칙이라 움직임 줄이기(data-still·data-reduce)면 끝 모습만 보인다. */
@media not all and (min-width: 700px) and (min-height: 1000px) {
  html[data-band="1-2"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 176px; --bt-mon: 96px; }
  html[data-band="3-4"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 150px; --bt-mon: 92px; }
  html[data-band="5-6"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 64px; --bt-mon: 48px; }
  .screen.learn[data-screen="battle"]:not([data-phase="result"], [data-phase="meet"]) .learn-body > .bt-stage { height: var(--bt-stage-h); }
}
@media (max-height: 760px) and (max-width: 699px) {
  html[data-band="1-2"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 132px; --bt-mon: 72px; }
  html[data-band="3-4"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 120px; --bt-mon: 60px; }
}
.screen.learn[data-screen="battle"] .bt-stage .bt-mon { min-width: 44px; min-height: 44px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage { height: auto; min-height: var(--bt-stage-h); flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 6px 12px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage .bt-mon { width: var(--bt-mon); height: var(--bt-mon); }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage .bt-tag { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); margin: 0; max-width: 52%; font-size: 13px; padding: 4px 8px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage .bt-tag::after { display: none; }

/* 테마 배경(연출 틀 그림, 낮 그림이라 밤 톤으로 눌러 둔다). 꾸밈 */
.bt-stage > .st-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: center 72% / cover no-repeat; filter: brightness(.42) saturate(.78); }
.bt-stage > .st-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 17, 40, .55), rgba(10, 17, 40, .12) 58%, rgba(10, 17, 40, .62)); }
.bt-stage[data-theme="language"] > .st-bg[data-art="on"] { background-image: url("../assets/stage/theme-language.webp"); }
.bt-stage[data-theme="math"] > .st-bg[data-art="on"] { background-image: url("../assets/stage/theme-math.webp"); }
.bt-stage[data-theme="science"] > .st-bg[data-art="on"] { background-image: url("../assets/stage/theme-science.webp"); }
.bt-stage[data-theme="world"] > .st-bg[data-art="on"] { background-image: url("../assets/stage/theme-world.webp"); }
.bt-stage > .bt-sky { z-index: 0; }

/* 소품: 문제 유형 칸 하나(아틀라스 4×2) */
.bt-stage > .st-prop { position: absolute; z-index: 1; right: 14%; bottom: 12px; width: 52px; height: 52px; pointer-events: none;
  background: none calc(var(--st-cx, 0) * 100% / 3) calc(var(--st-cy, 0) * 100%) / 400% 200% no-repeat; }
/* 그림은 판의 첫 문제가 그려진 뒤에 붙는다(stage.js data-art, 전투 진입 시간) */
.bt-stage > .st-prop[data-art="on"] { background-image: url("../assets/stage/props.webp"); }
.bt-stage[data-band="1-2"] > .st-prop { right: auto; left: 50%; margin-left: -10px; bottom: 14px; width: 60px; height: 60px; }
/* 1~2학년: 문제 화면에 상대가 없다(판 시작 카드·판 끝에만). 반디가 왼쪽, 내 친구가 오른쪽 아래 */
.bt-stage[data-band="1-2"][data-opp-visible="false"] .bt-mon, .bt-stage[data-band="1-2"][data-opp-visible="false"] > .ui-hp { display: none; }
.bt-stage > .st-bandi { position: absolute; z-index: 2; left: 10px; bottom: 6px; width: var(--st-bandi, 112px); height: var(--st-bandi, 112px); pointer-events: none; }
.bt-stage[data-band="3-4"] > .st-bandi { --st-bandi: 92px; }
.bt-stage > .st-bandi .char-pic { display: block; width: 100%; height: 100%; }
.bt-stage > .st-friend { position: absolute; z-index: 2; right: 8px; bottom: 4px; }
@media (max-height: 760px) and (max-width: 699px) { .bt-stage > .st-bandi { --st-bandi: 84px; } .bt-stage[data-band="3-4"] > .st-bandi { --st-bandi: 72px; } }
/* 3~4학년 맞힘: 말하는 상대(해결 자세)는 왼쪽, 말풍선이 그 아래에서 꼬리로 가리킨다. 틀리면 반디가 왼쪽에서 말하고 상대는 가운데서 버티기 */
.bt-stage[data-band="3-4"][data-speaker="opponent"] .bt-mon { align-self: flex-start; margin-left: 9%; }

/* 18동작(정답, 소품). 끝 모습은 정적 규칙, 움직임은 from → 끝 모습 한 번 */
.bt-stage[data-motion] { --st-ms: 560ms; }
.bt-stage[data-motion="light"] > .st-prop { filter: drop-shadow(0 0 10px var(--lamp)); animation: st-light var(--st-ms) ease-out both; }
.bt-stage[data-motion="fill"] > .st-prop { filter: drop-shadow(0 0 6px var(--c-science)); animation: st-fill var(--st-ms) ease-out both; }
.bt-stage[data-motion="draw"] > .st-prop::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -4px; height: 3px; border-radius: 2px; background: var(--lamp); transform-origin: left; animation: st-draw var(--st-ms) ease-out both; }
.bt-stage[data-motion="greet"] > .st-prop { animation: st-greet var(--st-ms) ease-out both; }
.bt-stage[data-motion="sort"] > .st-prop { animation: st-sort var(--st-ms) ease-out both; }
.bt-stage[data-motion="open"] > .st-prop { transform: translateY(-2px) scale(1.08); animation: st-open var(--st-ms) ease-out both; }
.bt-stage[data-motion="depart"] > .st-prop { transform: translateX(26px); opacity: .6; animation: st-depart var(--st-ms) ease-out both; }
.bt-stage[data-motion="rotate"] > .st-prop { animation: st-rotate var(--st-ms) ease-out both; }
.bt-stage[data-motion="grow"] > .st-prop { transform: translateY(-6px) scale(1.14); transform-origin: 50% 100%; animation: st-grow var(--st-ms) ease-out both; }
.bt-stage[data-motion="connect"] > .st-prop { filter: drop-shadow(0 0 6px var(--lamp)); animation: st-connect var(--st-ms) ease-out both; }
.bt-stage[data-motion="reveal"] > .st-prop { animation: st-reveal var(--st-ms) ease-out both; }
.bt-stage[data-motion="balloon-pop"] > .st-prop { transform: scale(.55); opacity: .25; animation: st-pop var(--st-ms) ease-out both; }
.bt-stage[data-motion="clear"] > .st-prop { opacity: .25; filter: blur(3px); animation: st-clear var(--st-ms) ease-out both; }
.bt-stage[data-motion="stamp"] > .st-prop { animation: st-stamp var(--st-ms) ease-out both; }
.bt-stage[data-motion="sound"] > .st-prop { filter: drop-shadow(0 0 8px var(--lamp)); animation: st-sound var(--st-ms) ease-out both; }
.bt-stage[data-motion="transform"] > .st-prop { transform: scale(1.06); filter: hue-rotate(40deg); animation: st-transform var(--st-ms) ease-out both; }
.bt-stage[data-motion="rainbow"] > .st-prop::after { content: ""; position: absolute; left: -10px; right: -10px; top: -14px; height: 26px; border-radius: 40px 40px 0 0; border: 3px solid transparent; border-top-color: var(--lamp); border-left-color: var(--c-science); border-right-color: #D89AB7; animation: st-reveal var(--st-ms) ease-out both; }
.bt-stage[data-motion="condense"] > .st-prop { transform: scale(.78); animation: st-condense var(--st-ms) ease-out both; }
/* 몸짓: 등장(새 문제·첫 만남, 소품·반디가 아래에서 한 번) */
.bt-stage[data-motion="enter"] > .st-prop, .bt-stage[data-motion="enter"] > .st-bandi { animation: st-enter var(--st-ms) ease-out both; }
/* 큰 연출(판 끝·심화 lv3): 무대 테두리가 등불 빛으로 한 번 밝아지고 은은하게 남는다 */
.bt-stage[data-big] { box-shadow: inset 0 0 0 2px var(--lamp), 0 0 18px var(--lamp-glow); animation: st-big var(--st-ms) ease-out both; }
.bt-hero[data-motion="end"][data-big] { box-shadow: inset 0 0 0 2px var(--lamp), 0 0 18px var(--lamp-glow); animation: st-big var(--st-ms) ease-out both; }
/* 움직임 줄이기·차분형: 동작 없이 끝 모습만 */
.bt-stage[data-still], .bt-stage[data-still] > *, .bt-stage[data-still] > *::after, .bt-hero[data-still] { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .bt-stage > *, .bt-stage > *::after, .bt-stage[data-big], .bt-hero[data-big] { animation: none !important; } }
@keyframes st-light { from { filter: none; transform: scale(.9); } 50% { transform: scale(1.12); } to { transform: none; } }
@keyframes st-fill { from { transform: scale(.6); opacity: .4; } 60% { transform: scale(1.1); opacity: 1; } to { transform: none; } }
@keyframes st-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes st-greet { 0% { transform: rotate(0); } 30% { transform: rotate(-12deg); } 65% { transform: rotate(9deg); } 100% { transform: rotate(0); } }
@keyframes st-sort { 0% { transform: translateX(-8px) rotate(-8deg); } 50% { transform: translateX(8px) rotate(6deg); } 100% { transform: none; } }
@keyframes st-open { from { transform: scaleY(.7); } 60% { transform: translateY(-2px) scale(1.14); } to { transform: translateY(-2px) scale(1.08); } }
@keyframes st-depart { from { transform: none; opacity: 1; } to { transform: translateX(26px); opacity: .6; } }
@keyframes st-rotate { from { transform: rotate(-120deg) scale(.85); } to { transform: none; } }
@keyframes st-grow { from { transform: scale(.7); } to { transform: translateY(-6px) scale(1.14); } }
@keyframes st-connect { from { transform: translateX(-18px); filter: none; } to { transform: none; } }
@keyframes st-reveal { from { opacity: .2; filter: blur(4px); } to { opacity: 1; filter: none; } }
@keyframes st-pop { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(.55); opacity: .25; } }
@keyframes st-clear { from { opacity: 1; filter: blur(0); } to { opacity: .25; filter: blur(3px); } }
@keyframes st-stamp { from { transform: scale(1.5); opacity: 0; } 70% { transform: scale(.92); opacity: 1; } to { transform: none; } }
@keyframes st-sound { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes st-transform { from { transform: none; filter: none; } to { transform: scale(1.06); filter: hue-rotate(40deg); } }
@keyframes st-condense { from { transform: none; } to { transform: scale(.78); } }
@keyframes st-enter { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes st-big { from { box-shadow: inset 0 0 0 0 transparent, 0 0 0 transparent; } 50% { box-shadow: inset 0 0 0 3px var(--lamp), 0 0 26px var(--lamp-glow); } }

/* 말풍선 = 답한 뒤 캐릭터의 말(빌드 39). 무대 바로 아래, 꼬리가 무대 왼쪽의 말하는 이(1~2학년 반디 · 3~4학년 맞힘 상대 · 틀림 반디)를 가리킨다.
   다음 문제로 넘어갈 때까지 보이고 누르면 닫힌다. ③의 반디 그림 아이콘은 무대에 반디가 서므로 말풍선 안에서는 쓰지 않는다 */
.screen.learn[data-screen="battle"] .bt-fb.is-bubble { cursor: pointer; grid-template-columns: 32px 1fr; gap: 2px 10px; padding: 12px 14px; background: var(--surface-2); border: 1.5px solid var(--c-science); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble.soft { border: 1.5px dashed var(--lamp); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble::after { display: none; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble::before { left: 44px; top: -8px; bottom: auto; margin-left: 0; width: 13px; height: 13px; transform: rotate(45deg); background: var(--surface-2); border: 0; border-left: 1.5px solid var(--c-science); border-top: 1.5px solid var(--c-science); content: ""; position: absolute; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble.soft::before { border-left: 1.5px dashed var(--lamp); border-top: 1.5px dashed var(--lamp); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble .bt-fb__ico { width: 32px; height: 32px; background: var(--surface); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble .bt-fb__ico .ui-icon { display: block; width: 20px; height: 20px; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble .bt-fb__tt { min-height: 32px; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble:not(:has(.bt-fb__tt)) .bt-fb__tx { grid-column: 2; align-self: center; font-size: 17px; font-weight: 700; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble [data-role="bubble"] { font-size: 17px; }
html[data-band="1-2"] .screen.learn[data-screen="battle"] .bt-fb.is-bubble [data-role="bubble"] { font-size: 20px; }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
/* 5~6학년: 말풍선 없이 한 줄 무대의 게이지 옆 두 줄 글 */
.bt-stage .bt-fb.is-note { position: relative; z-index: 3; display: block; margin-left: auto; padding: 0; border: 0; background: none; text-align: right; max-width: 58%; }
.bt-stage .bt-fb.is-note::before, .bt-stage .bt-fb.is-note::after, .bt-stage .bt-fb.is-note .bt-fb__ico { display: none; }
.bt-stage .bt-fb.is-note .bt-fb__tt { min-height: 0; display: block; font-size: 15px; color: var(--c-science); }
.bt-stage .bt-fb.is-note.soft .bt-fb__tt { color: var(--lamp); }
.bt-stage .bt-fb.is-note .bt-fb__tx { font-size: 13px; color: var(--text-mute, inherit); }
.bt-stage .bt-fb.is-note .bt-badge, .bt-stage .bt-fb.is-note .ui-chip { margin-top: 2px; }

/* ⑦ 보탬: 첫 문제 '조심!' 한 줄(H58)이 있는 무대는 상대 그림을 줄여 같은 높이 안에 넣는다(말풍선이 잘리지 않게) */
html[data-band="3-4"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage:has(.bt-tag) .bt-mon { width: 56px; height: 56px; }
.screen.learn[data-screen="battle"] .learn-body > .bt-stage[data-band] .bt-tag { margin: 6px 0; }
@media (max-height: 760px) and (max-width: 699px) {
  html[data-band="3-4"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage:has(.bt-tag) .bt-mon { width: 44px; height: 44px; }
  .screen.learn[data-screen="battle"] .learn-body > .bt-stage[data-band] .bt-tag { margin: 4px 0; font-size: 13px; padding: 4px 8px; }
}
/* 3~4학년 틀림: 반디는 체력 줄 위 왼쪽(이름표와 겹치지 않게) */
.bt-stage[data-band="3-4"] > .st-bandi { bottom: 34px; --st-bandi: 84px; }
@media (max-height: 760px) and (max-width: 699px) { .bt-stage[data-band="3-4"] > .st-bandi { bottom: 30px; --st-bandi: 64px; } }
/* 5~6학년 한 줄 무대: 상대 · 체력 칸 · (오른쪽) 두 줄 글. 칸 수 글(3/4)은 숨기고, 두 줄 글·조심! 한 줄이 있으면 이름표도 접는다(위 칩 줄에 '○○ 잡기'가 있다) */
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .ui-hp__num { display: none; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage:is(:has(.bt-tag), :has(.is-note)) .ui-hp__name { display: none; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .ui-hp { flex: none; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .bt-fb.is-note { flex: 1 1 0; min-width: 0; max-width: none; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .bt-fb.is-note .bt-fb__tx { margin: 0; line-height: 1.35; }
.bt-stage[data-band="3-4"] > .st-prop { bottom: 36px; right: 9%; width: 48px; height: 48px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .bt-fb.is-note .bt-fb__tx { color: var(--ink); }

/* ── ⑧ 답을 낸 뒤 '내 답 · 정답' 줄(빌드 39.1, 메인). 마크업 battle-view.js answerReview, 시안 개선대책 11-2·11-3 ──
   이름표('내가 고른 답'·'내가 쓴 답'·'정답')는 칸 위에 작게. 내 답은 금색 점선 테두리, 정답은 민트 테두리.
   칸이 하나뿐인 숫자·분수·O/X 답은 두 줄이 아니라 두 칸을 나란히(보기 고르기는 1~2학년만 나란히, 글이 길 수 있어 나머지는 위아래). 여러 칸 답은 줄마다 칸을 나눈다.
   틀린 칸(.is-off)은 빨간 경고색 없이 바탕과 글자를 낮춰(색 + 점선 테두리) 차분하게. 잠근 입력이 같은 내용을 보이는 때(짝·나누기·차례)는 [hidden]이라 그대로 숨는다.
   글자는 12·13·14·15·20·26만, 움직임 없음(차분형·움직임 줄이기에서도 같은 모양). */
.bt-ans:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3) var(--sp-2); margin: var(--sp-2) 0; min-width: 0; }
.bt-ans__row { display: grid; gap: var(--sp-1); min-width: 0; align-content: start; }
.bt-ans__lbl { font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; color: var(--text-mute); }
.bt-ans__row.is-mine > .bt-ans__lbl { color: var(--lamp); }
.bt-ans__row.is-right > .bt-ans__lbl { color: var(--c-science); }
.bt-ans__cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: var(--sp-2); min-width: 0; }
.bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
.bt-ans__cell { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: var(--sp-2); row-gap: 2px; min-width: 0; min-height: 36px; box-sizing: border-box;
  padding: var(--sp-1) var(--sp-3); border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.bt-ans__row.is-mine .bt-ans__cell { border: 1.5px dashed var(--lamp); }
.bt-ans__row.is-right .bt-ans__cell { border: 1.5px solid var(--c-science); background: var(--surface-2); background: color-mix(in srgb, var(--c-science) 14%, var(--sheet)); }
.bt-ans__row.is-mine .bt-ans__cell.is-off { background: var(--off-fill); color: var(--mute); }
.bt-ans__cl { flex: 0 1 auto; font-size: 13px; line-height: 1.3; color: var(--text-mute); }
.bt-ans__cell.is-off .bt-ans__cl { color: var(--off-ink); }
.bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__cell { min-height: var(--touch); padding: var(--sp-2) var(--sp-3); }
.bt-ans__v { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__v { font-size: 20px; }
.bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__cl { flex-basis: 100%; }
/* 칸이 하나뿐인 숫자·분수·O/X: 내 답과 정답을 나란히 */
.bt-ans[data-result="ng"][data-revealed="true"]:is([data-input-kind="number"], [data-input-kind="fraction"], [data-input-kind="ox"]):not(:has(.bt-ans__cell:nth-child(2))),
html[data-band="1-2"] .bt-ans[data-result="ng"][data-revealed="true"]:is([data-input-kind="choice"], [data-input-kind="listen"], [data-input-kind="fill"]):not(:has(.bt-ans__cell:nth-child(2))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 학년군: 1~2학년은 글자를 키운다 */
html[data-band="1-2"] .bt-ans__lbl { font-size: 13px; }
html[data-band="1-2"] .bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__v { font-size: 26px; }
html[data-band="1-2"] .bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__cell { min-height: 56px; }
html[data-band="1-2"] .bt-ans__v { font-size: 20px; }
html[data-band="1-2"] .bt-ans__cl { font-size: 14px; }
/* 5~6학년: 한 줄 안에 이름표를 왼쪽으로(시안의 정답 줄), 칸은 왼쪽 맞춤 */
html[data-band="5-6"] .bt-ans[data-revealed="true"]:not(:has(.bt-ans__cell:nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
html[data-band="5-6"] .bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__v { font-size: 15px; }
html[data-band="5-6"] .bt-ans__cell { justify-content: flex-start; text-align: left; }

/* ── ⑨ 보호자 진도 탭 도달표·다지는 중(빌드 40, 메인). 마크업 src/ui/screens/guardian/reach.js, 값 engine/reach.js·judge.js ──
   상태 다섯은 모양으로 가른다(색만으로 가르지 않고 이름 글자가 늘 붙는다): 굳힘 = 등불 금색 채움 + 바깥 고리 · 도달 = 등불 금색 채움 ·
   익히는 중 = 반만 채움 · 다지는 중 = 점선 고리(연보라) · 아직 = 빈 고리. 빨강·경고 색·순위 표시는 쓰지 않는다(10절). */
.g-reach__legend { margin: 0 0 4px; }
.g-reach__meaning { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 2px 0 8px; font-size: 14px; line-height: 1.45; }
.g-reach__meaning dt, .g-reach__meaning dd { margin: 0; }
.g-reach__subj { margin-top: var(--gap-choice); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.g-reach__subj > summary { display: flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 6px 12px; cursor: pointer; list-style: none; }
.g-reach__subj > summary::-webkit-details-marker { display: none; }
.g-reach__subj > summary::after { content: ''; flex: none; width: 8px; height: 8px; margin-left: 2px; border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute); transform: rotate(45deg) translateY(-2px); }
.g-reach__subj[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.g-reach__subj > summary:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; border-radius: var(--radius); }
.g-reach__subj > summary b { flex: none; font-size: 15px; font-weight: 600; }
.g-reach__count { flex: 1; min-width: 0; color: var(--text-mute); font-size: 13px; text-align: right; }
.g-reach__subj > .g-mute { margin: 0; padding: 0 12px 10px; }
.g-reach__list { list-style: none; margin: 0; padding: 0 12px 4px; }
.g-reach__row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--border); }
.g-reach__name { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.g-reach__codes, .g-reach__concept { color: var(--text-mute); font-size: 12px; }
.g-st { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); white-space: nowrap; }
.g-st__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); box-sizing: border-box; }
.g-st[data-s="reached"] .g-st__dot { background: var(--lamp); border-color: var(--lamp); }
.g-st[data-s="solid"] .g-st__dot { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--lamp); }
.g-st[data-s="learning"] .g-st__dot { border-color: var(--mute); background: linear-gradient(90deg, var(--mute) 50%, transparent 50%); }
.g-st[data-s="weak"] .g-st__dot { border-style: dashed; border-color: var(--c-moral); }
.g-st[data-s="yet"] { color: var(--text-mute); }
/* ── ⑩ 화면 정리 1차(빌드 40 UI 창, 2026-11-13 제품 책임자 결정) ──
   버튼의 색·그림자·눌림은 새로 만들지 않았다(다른 창이 새 시안 작업 중). 여기는 배치와 종류만이다.
   (a) 결과 화면 아래 줄: 두 단추가 같은 크기로 나란히. '아쉬운 문제 다시 보기'는 글 단추로 몸통 안에(아래 줄에 깔리지 않게 자리를 비워 둔다)
   (b) 접는 줄(.nx-fold): 모험 단원 목록 '끝낸 단원 n개'·'앞으로 갈 단원 n개', 보호자 설정 묶음. 누르는 칸 48px 이상 */
:root { --nx-hit: 48px; }

/* 글 단추: 테두리·바탕 없이 밑줄 글. 눌림은 색만 바뀐다(움직임 없음) */
.ui-btn--text { min-height: var(--nx-hit); padding: 0 16px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); box-shadow: none; font-size: var(--fs-btn-small); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ui-btn--text:active:not([aria-disabled="true"]), .ui-btn--text.is-pressed { transform: none; filter: none; box-shadow: none; color: var(--lamp); }

/* (a) 결과 화면 */
.screen.learn[data-phase="result"] .learn-bar:has(.learn-bar__left > .ui-btn) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.screen.learn[data-phase="result"] .learn-bar:has(.learn-bar__left > .ui-btn) :is(.learn-bar__left, .learn-bar__main) { display: flex; margin: 0; min-width: 0; }
.screen.learn[data-phase="result"] .learn-bar:has(.learn-bar__left > .ui-btn) .ui-btn { flex: 1; width: 100%; min-width: 0; padding-inline: 12px; }
.bt-missed-row { justify-content: center; }
.bt-missed-row .ui-btn--text { flex: none; }
.bt-multiple { min-height: var(--touch); }
/* 위 v4.css의 '그림 칸 가장 작은 높이'에 '아쉬운 문제 다시 보기' 줄(글 단추 48 + 간격 12)만큼 더 비워 둔다 */
.learn-body > .bt-res { --res-extra: 0px; --res-hero: max(130px, min(800px, calc(100dvh - 200px - var(--res-rx) - var(--res-extra)))); }
.learn-body > .bt-res:has([data-role="missed-row"]) { --res-extra: 60px; }
/* 작은 폰(높이 700 이하, 360×640): '아쉬운 문제 다시 보기'와 상자 [?]가 아래 줄 위에 다 들어오게 별 줄·간격을 조인다. 상대 그림 칸은 130px 아래로 줄이지 않는다(25판 N1) */
@media (max-height: 700px) and (max-width: 699px) {
  .learn-body > .bt-res { --res-hero: max(130px, calc(100dvh - 200px - var(--res-rx) - var(--res-extra))); gap: 6px; }
  .learn-body > .bt-res > .bt-hero { min-height: 72px; }
  .bt-result-v4 .bt-stars { gap: 4px; }
  .bt-result-v4 .bt-star, .bt-result-v4 .bt-star .ui-icon { width: 36px; height: 36px; }
  .bt-result-v4 .bt-chest { padding-block: 6px; }
  .screen.learn[data-phase="result"] .learn-body { padding-bottom: 4px; }
}

/* (b) 접는 줄 */
.nx-fold { display: grid; }
.nx-fold__head { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--nx-hit); padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nx-fold__head:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.nx-fold__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nx-fold__label { font-size: var(--fs-body); font-weight: 600; line-height: 1.3; }
.nx-fold__sub { color: var(--mute); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.nx-fold__n { flex: none; color: var(--mute); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.nx-fold__chev { flex: none; width: 22px; height: 22px; color: var(--mute); transform: rotate(90deg); }
.nx-fold__head[aria-expanded="true"] .nx-fold__chev { transform: rotate(-90deg); }
.nx-fold__body { margin-top: var(--sp-2); }
.nx-fold__body[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .nx-fold__chev { transition: transform var(--t-fast) ease; } }
/* 모험 단원 목록 안의 접는 줄 */
.ul-fold { list-style: none; }
.ul-list--in { margin: 0; }
/* 보호자 설정의 접는 줄: 보호자 화면 글 크기(15·13) */
.nx-fold--guardian .nx-fold__label { font-size: 15px; }
.nx-fold--guardian .nx-fold__sub, .nx-fold--guardian .nx-fold__n { font-size: 13px; }
.nx-fold--guardian .nx-fold__head { min-height: 56px; }

/* ── ⑪ 화면 크기별 배치(빌드 40 UI 창, 2026-11-13 결정 시안 2_A · 6_A) ──
   폰(700px 미만)은 그대로 한 줄(폭 480). 태블릿 세로(700px 이상)는 아이 화면 폭 720 + 오늘 퀘스트 2열.
   태블릿 가로(1024px 이상 · 가로 방향)는 아래 탭을 왼쪽 세로 줄로 옮기고, 오늘 화면은 두 칸(왼쪽 장면·등대, 오른쪽 퀘스트·주 단추).
   문제·카드·보너스 놀이처럼 탭을 감추는 화면(#app[data-focus="true"])은 이 규칙을 타지 않는다: 글 열 폭은 전과 같다.
   오늘 화면 위쪽(시안 6_A): 머리 줄은 이름표 + 소리 단추, '오늘의 퀘스트' 줄 오른쪽에 'n / N 완료'(today.js). */
.screen[data-screen="today"] .today-head { min-height: var(--touch); }
.screen[data-screen="today"] .quest .daily-row { align-items: baseline; margin-top: 2px; }
.screen[data-screen="today"] .quest .daily-count { font-size: 13px; }
/* 폰: 장면 칸을 낮춰(위 하늘·아래 물결을 덜 보이게) 퀘스트 다섯 장과 등대 띠가 390×844 한 화면에 들어오게 한다.
   장면 비율·위치는 그대로 두고 보이는 창만 좁힌다: 칸 비율 358:140, 장면을 칸 너비의 19.8%(= 장면 높이의 30%)만큼 올려 반디·가로등·등대가 모두 칸 안에 든다 */
@media (max-width: 699px) {
  .scene-hero.scene-today { height: auto; aspect-ratio: 358 / 140; }
  .scene-hero.scene-today > .path-stage { margin-top: -19.8%; }
  .screen[data-screen="today"][data-layout="v4"] .part { min-height: 62px; padding-block: 5px; }
  .screen[data-screen="today"][data-layout="v4"] .part-pic, .screen[data-screen="today"][data-layout="v4"] .part-pic .char-pic { width: 48px; height: 48px; }
}

@media (min-width: 700px) {
  .app[data-focus="false"] { max-width: 720px; } /* 아래 탭이 있는 화면(오늘·모험·보물·보호자)만. 탭을 감추는 화면(학습·보너스 놀이 등)은 전과 같다 */
  .tabbar ul { max-width: 720px; }
  .today-next { padding-inline: max(var(--gutter), calc((100% - 720px) / 2 + var(--gutter))); }
  .screen[data-screen="today"] .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (orientation: landscape) {
  :root { --rail-w: 104px; }
  /* 아래 탭 → 왼쪽 세로 줄(탭을 감추는 학습 화면은 그대로 가운데 한 줄) */
  .app.app[data-focus="false"] { max-width: none; padding-left: var(--rail-w); }
  .app[data-focus="false"] .tabbar { top: 0; right: auto; width: var(--rail-w); border-top: 0; border-right: 1px solid var(--line); padding: calc(16px + var(--sat)) 0 var(--sab); }
  .app[data-focus="false"] .tabbar ul { grid-template-columns: 1fr; gap: 8px; max-width: none; }
  .app[data-focus="false"] .tabbar a { min-height: 72px; }
  .app[data-focus="false"] .view > .screen { width: 100%; max-width: 720px; margin-inline: auto; padding-bottom: calc(24px + var(--sab)); }
  .app[data-focus="false"] .view > .g-screen { width: 100%; max-width: 720px; margin-inline: auto; } /* 보호자 화면도 한 줄 글이 너무 길지 않게 720 */
  /* 오늘: 두 칸 */
  .app[data-focus="false"] .view > .screen[data-screen="today"] {
    max-width: 1160px; display: grid; column-gap: 32px; align-content: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr auto;
    grid-template-areas: "head quest" "resume quest" "hero quest" "week quest" "dev quest" ". next";
  }
  .screen[data-screen="today"] > .today-head { grid-area: head; }
  .screen[data-screen="today"] > .resume-box { grid-area: resume; }
  .screen[data-screen="today"] > .scene-hero { grid-area: hero; }
  .screen[data-screen="today"] > .quest { grid-area: quest; align-self: start; }
  .screen[data-screen="today"] > .quest .daily-row { margin-top: 4px; }
  .screen[data-screen="today"] > .week { grid-area: week; }
  .screen[data-screen="today"] > .dev-units { grid-area: dev; align-self: start; }
  .screen[data-screen="today"] > .today-next { grid-area: next; position: static; padding: 12px 0 0; background: transparent; border: 0; }
  .screen[data-screen="today"] .parts { grid-template-columns: minmax(0, 1fr); }
}

/* ── ⑫ 버튼 생김새·효과: 방향 B '등불 유리' 한 벌(빌드 40 UI 창, 2026-11-13 결정. 시안 scratchpad btn_style/buttons.html B 탭) ──
   · 주 단추: 등불 금색 빛 비탈 + 빛 테두리. 보조·키·보기·칩·[?]·접기 줄·아래 탭: 반투명 유리(그라데이션) + 빛 머금은 1px 테두리.
   · 흐림(backdrop-filter)은 큰 판 하나(아래 탭)에만 쓴다(오늘 주 단추 줄은 11절대로 불투명). 부품마다 흐림을 쓰면 저사양 태블릿에서 느려진다(메모 4절).
   · 누름(src/ui/press.js): 97%로 살짝 줄고 금빛 고리, 누른 자리에서 빛이 퍼진다(0.48초). 움직임 줄이기(기기 설정·앱 설정)면 크기·빛 퍼짐 없이 색만.
   · 글자 대비 4.5:1 이상(유리 합성색 기준), 누르는 칸 48px 이상(tokens --touch 48). 색만으로 나타내지 않는다(고름 = 고리, 맞음 = ✓ + '정답', 틀림 = ✕ + 이름표). */
:root {
  --gl-bg: linear-gradient(180deg, rgba(150, 170, 255, 0.17), rgba(150, 170, 255, 0.07));
  --gl-bg-down: linear-gradient(180deg, rgba(150, 170, 255, 0.26), rgba(150, 170, 255, 0.12));
  --gl-edge: rgba(200, 215, 255, 0.46);
  --gl-ring: inset 0 1px 0 rgba(255, 255, 255, 0.22); /* 테두리는 진짜 border(--gl-line, 바탕과 3:1 이상) + 위쪽 빛줄 */
  --gl-line: var(--line-strong);
  --gl-down: inset 0 0 0 1.5px rgba(255, 214, 140, 0.85), 0 0 18px rgba(255, 196, 90, 0.32);
  --gl-main: radial-gradient(120% 140% at 50% 0%, #FFE3A6 0%, #FFC45A 55%, #F3AE3E 100%);
  --gl-main-sh: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(255, 220, 150, 0.6), 0 0 24px rgba(255, 196, 90, 0.4);
  --gl-main-down: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 2px rgba(255, 230, 170, 0.9), 0 0 36px rgba(255, 196, 90, 0.6);
  --gl-r: 18px;
}
/* 모양 */
.ui-btn, .ui-key, .learn-choice { border-radius: var(--gl-r); }
.ui-btn--main, .ui-key--main { background: var(--gl-main); color: var(--lamp-ink); border-color: transparent; box-shadow: var(--gl-main-sh); }
:is(.ui-btn--sub, .ui-btn--small, .ui-key:not(.ui-key--main), .learn-choice, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head) {
  background: var(--gl-bg); border-color: var(--gl-line); box-shadow: var(--gl-ring); color: var(--ink);
}
.nx-fold__head { border-style: solid; }
.ui-btn--text { color: var(--lamp); border-radius: var(--radius-pill); }
.ui-btn--text:active:not([aria-disabled="true"]), .ui-btn--text.is-down, .ui-btn--text.is-pressed { color: var(--lamp); background: rgba(255, 196, 90, 0.12); }
/* 오늘 퀘스트 카드 · 단원 목록 줄: 같은 유리(지금 할 것은 금빛 테두리 그대로) */
.screen[data-layout="v4"] .part:not(.is-next), .ul-item:not(.is-locked):not([data-now]) { background: var(--gl-bg); border-color: var(--gl-line); box-shadow: var(--gl-ring); }
.screen[data-layout="v4"] .part.is-next, .ul-item[data-now] { background: linear-gradient(180deg, rgba(255, 196, 90, 0.14), rgba(255, 196, 90, 0.05)); border-color: var(--lamp); box-shadow: 0 0 16px rgba(255, 196, 90, 0.22); }
/* 칩(과목 고르기 등): 색 유리, 고르면 색이 채워진다(+ ✓ 아이콘은 부품 그대로) */
.ui-chip--press { background: color-mix(in srgb, currentColor 10%, transparent); border-color: currentColor; }
.ui-chip--press.is-selected { background: color-mix(in srgb, currentColor 85%, #fff 15%); box-shadow: 0 0 14px color-mix(in srgb, currentColor 45%, transparent); }
.ui-chip--press.is-selected { -webkit-text-fill-color: #0A1128; } /* 글자만 짙게(바탕은 currentColor = 과목 색) */
.ui-chip--press.is-selected svg { color: #0A1128; }
/* [?] 단추: 금빛 고리 */
.bt-odds-btn, .g-help { color: var(--lamp); box-shadow: 0 0 12px rgba(255, 196, 90, 0.2); border: 1.5px solid var(--lamp); }
.g-help { flex: none; display: grid; place-items: center; width: var(--touch); height: var(--touch); padding: 0; border-radius: 50%; font-size: 20px; font-weight: 800; cursor: pointer; }
.g-help:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.g-set__li--help { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 4px; padding-right: 8px; }
.g-set__li--help > .g-help__note { grid-column: 1 / -1; margin: 4px 0 8px; }
/* 스위치: 유리 길 + 켜면 등불 */
.g-switch { background: rgba(150, 170, 255, 0.14); border-color: var(--gl-line); box-shadow: none; }
.g-switch::after { background: #DCE3FF; }
.g-switch[aria-checked="true"] { background: rgba(255, 196, 90, 0.55); border-color: var(--lamp); box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.9), 0 0 14px rgba(255, 196, 90, 0.35); }
.g-switch[aria-checked="true"]::after { background: #FFF4DC; box-shadow: 0 0 8px rgba(255, 220, 150, 0.9); }
/* 접기 줄의 화살표는 등불색 */
.nx-fold__chev { color: var(--lamp); }
/* 아래 탭: 흐림 유리는 이 큰 판 하나에만 */
.tabbar { background: rgba(10, 17, 40, 0.78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-top-color: rgba(200, 215, 255, 0.22); }
.tabbar a { border-radius: 16px; }
.tabbar a[aria-current="page"] { color: var(--lamp); background: radial-gradient(60% 70% at 50% 40%, rgba(255, 196, 90, 0.16), transparent 75%); }
.tabbar a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(255, 196, 90, 0.8)); }
/* 오늘 주 단추 줄은 불투명 그대로(11절: 스크롤 글이 줄 아래로 비치지 않게. 흐림 유리는 쓰지 않는다) */
/* 보기: 고름 · 맞음 · 틀림(내 답). 틀림은 꺼진 것처럼 점선·흐린 글이 아니라 분홍 고리 + ✕ */
.learn-choice.is-picked { background: rgba(255, 196, 90, 0.16); box-shadow: 0 0 18px rgba(255, 196, 90, 0.32); border-color: var(--lamp); transform: none; }
.learn-choice.is-right { background: rgba(95, 224, 187, 0.18); box-shadow: 0 0 20px rgba(95, 224, 187, 0.4); border-color: var(--c-science); color: var(--ink); }
.learn-choice.is-right .learn-choice__mark { background: var(--c-science); color: #03271C; border-color: transparent; }
.learn-choice.is-right .learn-choice__tag { color: var(--c-science); }
.learn-choice.is-maybe { background: rgba(242, 165, 190, 0.14); box-shadow: none; border-style: solid; border-color: var(--c-rush); color: var(--ink); }
.learn-choice.is-maybe .learn-choice__mark { background: var(--c-rush); color: #3A0B1C; border-color: transparent; }
.learn-choice.is-maybe .learn-choice__tag { color: var(--c-rush); }
/* 못 누름: 흐린 유리 + 점선(색과 모양) */
.ui-btn[aria-disabled="true"], .ui-key[aria-disabled="true"] { background: rgba(26, 39, 87, 0.55); color: var(--off-ink); box-shadow: none; border: 1.5px dashed rgba(135, 147, 196, 0.5); }
/* 누름(is-down: press.js, :active: 키보드·옛 브라우저) */
:is(.ui-btn--sub, .ui-btn--small, .ui-key:not(.ui-key--main), .learn-choice, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head):is(.is-down, :active):not([aria-disabled="true"], :disabled),
.screen[data-layout="v4"] .part:is(.is-down, :active), .ul-item:not(.is-locked):is(.is-down, :active) { background: var(--gl-bg-down); box-shadow: var(--gl-down); filter: none; }
:is(.ui-btn--main, .ui-key--main):is(.is-down, :active):not([aria-disabled="true"]) { box-shadow: var(--gl-main-down); filter: none; }
.ui-chip--press:is(.is-down, :active) { filter: brightness(1.12); }
/* 누른 자리에서 빛 퍼짐(::after). 이미 ::after를 쓰는 단추(.has-dot)는 뺀다 */
/* :where()로 묶어 점수 0: 자리(position)를 이미 정한 단추(상자 줄의 [?] 등)는 그대로 둔다 */
:where(.ui-btn, .ui-key, .learn-choice, .ui-chip--press, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head, .tabbar a, .ul-item, .part):where(:not(.has-dot)) { position: relative; overflow: hidden; isolation: isolate; }
:where(.ui-btn, .ui-key, .learn-choice, .ui-chip--press, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head, .tabbar a, .ul-item, .part):where(:not(.has-dot))::after {
  content: ""; position: absolute; z-index: -1; left: var(--x, 50%); top: var(--y, 50%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, 0.75), rgba(255, 196, 90, 0) 70%); opacity: 0; transform: scale(0); pointer-events: none;
}
@keyframes nx-glint { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(14); } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="reduce"]) :where(.glint:not(.has-dot))::after { animation: nx-glint 480ms ease-out; }
  html:not([data-motion="reduce"]) :is(.ui-btn, .ui-key, .learn-choice, .ui-chip--press, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head, .ul-item, .screen[data-layout="v4"] .part) {
    transition: transform 260ms cubic-bezier(.2, .9, .3, 1.2), box-shadow 220ms ease, background-color 160ms ease, color 160ms ease;
  }
  html:not([data-motion="reduce"]) :is(.ui-btn, .ui-key, .learn-choice, .ui-chip--press, .sound-btn, .bt-odds-btn, .g-help, .nx-fold__head, .ul-item:not(.is-locked), .screen[data-layout="v4"] .part):is(.is-down, :active):not([aria-disabled="true"], :disabled) { transform: scale(0.97); transition-duration: 90ms; }
  html:not([data-motion="reduce"]) .g-switch::after { transition: left 240ms cubic-bezier(.2, .9, .3, 1.2); }
  html:not([data-motion="reduce"]) .learn-choice.is-right .learn-choice__mark { animation: nx-pop 300ms ease-out; }
}
@keyframes nx-pop { from { transform: scale(0.5); } 60% { transform: scale(1.18); } to { transform: none; } }
/* 움직임 줄이기: 크기·빛 퍼짐 없이 색만 */
html[data-motion="reduce"] :is(.ui-btn, .ui-key, .learn-choice, .ui-chip--press, .part, .ul-item):is(.is-down, :active) { transform: none !important; }
html[data-motion="reduce"] .glint::after { animation: none !important; }

/* 보호자 진도 탭 도달표(⑨, 빌드 40)도 같은 한 벌: 과목 접는 줄은 등불 유리 줄(48px), 과목 묶음은 상자 대신 선으로 나눈다 */
.g-reach__subj { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding-bottom: 6px; }
.g-reach__subj > summary { min-height: 48px; padding: 6px 14px; border: 1px solid var(--gl-line); border-radius: var(--radius); background: var(--gl-bg); box-shadow: var(--gl-ring); }
.g-reach__subj > summary::after { border-color: var(--lamp); }
.g-reach__subj > summary:is(:active) { background: var(--gl-bg-down); box-shadow: var(--gl-down); }
.g-reach__row { min-height: 48px; }
.g-reach__list { padding-inline: 4px; }

/* ── ⑬ 화면 정리 2차(2026-11-13 제품 책임자 결정 19건) ──
   ② 학교 복습: 요약 한 장 대신 문제 위 접힌 줄 '핵심 다시 보기', 첫 만남은 상대 말풍선 앞 '처음 만났어요!' 한마디 */
.bt-core { margin: 0; border-bottom: 1px solid var(--border); }
.bt-core__head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px; color: var(--lamp); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.bt-core__head::-webkit-details-marker { display: none; }
.bt-core__head::after { content: ''; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.bt-core[open] > .bt-core__head::after { transform: rotate(-135deg) translateY(-2px); }
.bt-core__head:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: 2px; }
.bt-core__list { padding: 0 8px 12px 1.6em; gap: 8px; }
.bt-core__list .learn-text { font-size: 17px; }
.bt-tag__meet { color: var(--lamp); font-weight: 800; }
/* ⑧ 하루를 다 했을 때: 오늘 화면 맨 위 '다 했어요' 띠 + [상자 열기](끝내기 화면 대신) */
.day-done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; padding: 8px 0 8px 12px; border-left: 3px solid var(--lamp); }
.day-done__tx { flex: 1 1 140px; margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.day-done .closing-chest { flex: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.day-done .closing-chest .ui-btn { min-height: 48px; }
/* ③ 결과 화면 별: 별 그림 3개, 얻은 별만 채움 + 아래 한 줄(별 조건 목록 없음) */
.bt-stars { display: grid; justify-items: center; gap: 8px; margin-inline: auto; }
.bt-stars__row { list-style: none; display: flex; gap: 12px; margin: 0; padding: 0; }
.bt-star { display: grid; place-items: center; width: 44px; height: 44px; color: var(--line-strong); }
.bt-star .ui-icon { width: 100%; height: 100%; }
.bt-star.is-got { color: var(--lamp); }
.bt-stars__next { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-mute); text-align: center; }
.bt-stars[data-stars="3"] .bt-stars__next { color: var(--lamp); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="reduce"]) .bt-star.is-got { animation: ui-star-fill var(--t-star) ease-out backwards; animation-delay: calc(var(--i) * var(--t-star-step)); }
}
/* ⑦ 카드: 다른 예시는 내용 아래 글 단추 하나, 남은 칸 띠는 글 없이 */
.learn-other { display: flex; justify-content: center; margin-top: 8px; }
.learn-cardstrip__text { display: none; }
/* ⑨ 보호자 요약 맨 위 '오늘' 한 장(2차 9번) */
.g-today { border-left: 3px solid var(--lamp); padding-left: 12px; }
.g-today__kv { grid-template-columns: max-content 1fr; align-items: center; }
.g-today__kv dd { text-align: right; }
.g-today__kv .g-link { display: inline-flex; align-items: center; justify-content: flex-end; margin: 0; min-height: 48px; min-width: 48px; padding: 0 4px; color: var(--ink); }
.g-lang.is-soon { opacity: 0.6; border-style: dashed; cursor: default; }

/* ── ⑭ 모양 조이기(2026-11-13 결정 2차 12~15번, 시안 scratchpad ux_audit3/mock 1_A·2_C·3_A·4_A, 값은 ux_audit3/tools/recipes.mjs) ──
   보이는 높이: 주 48 · 보조 40 · 아이콘 40 · 작은 글 단추 32, 누르는 칸은 모두 48(위아래 투명 테두리 + background-clip). 글자 14·17·19·24 네 단계.
   주 버튼 빛 번짐 뺌, 간격 8px 격자, 모서리 값 통일(--nx-r 14, 작은 것 10). 1~2학년(data-band 1-2)의 글·보기 칸·아래 줄 버튼은 크게 유지.
   목록(오늘 퀘스트·단원·보물)은 상자를 걷고 선으로 나눔, 지금 할 것은 금색 왼쪽 막대 하나. */
:root { --nx-r: 14px; --nx-r-s: 10px; --nx-div: rgba(200, 215, 255, 0.14); }

/* ⑫ 과목 고르기 = 한 줄 밑줄 탭(7과목도 한 줄, 넘치면 옆으로 밀기 + 끝 흐림 .is-more) */
.ul-subjects { display: flex !important; flex-wrap: nowrap !important; gap: 0 !important; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 8px !important; padding: 0 16px !important; box-shadow: inset 0 -1px 0 var(--nx-div); }
.ul-subjects::-webkit-scrollbar { display: none; }
.ul-subjects.is-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.ul-subjects .ui-chip { flex: none !important; min-height: 48px !important; height: 48px; padding: 0 12px !important; background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; color: var(--mute) !important; -webkit-text-fill-color: currentColor !important; font-size: 17px !important; font-weight: 500 !important; filter: none !important; }
.ul-subjects .ui-chip svg { display: none !important; }
.ul-subjects .ui-chip.is-selected { color: var(--ink) !important; font-weight: 700 !important; box-shadow: inset 0 -3px 0 var(--lamp) !important; }
/* 오늘 '이번 주' 띠·보물 탭도 같은 밑줄 모양 */
.week li.today { box-shadow: inset 0 -3px 0 var(--lamp) !important; border-color: transparent !important; border-radius: 0 !important; background: none !important; }
.tt-tabs { gap: 0 !important; box-shadow: inset 0 -1px 0 var(--nx-div); }
.tt-tab { min-height: 48px; background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; color: var(--mute) !important; font-size: 17px; font-weight: 500 !important; }
.tt-tab[aria-selected="true"] { color: var(--ink) !important; font-weight: 700 !important; box-shadow: inset 0 -3px 0 var(--lamp) !important; }

/* ⑬ 문제 화면 위쪽 한 줄: 뒤로·진행·가방(아이콘)·친구. 하트는 무대 왼쪽 아래, 체력은 오른쪽 아래, '이상해요'는 문제 카드 귀퉁이 */
.screen.learn[data-screen="battle"] .learn-top { display: flex; align-items: center; gap: 4px; }
.screen.learn[data-screen="battle"] .learn-top__mid { flex: 1 1 auto; min-width: 0; }
.learn-top [data-role="back"] .ui-btn__label, .learn-top [data-role="bag"].is-top .ui-btn__label { display: none; }
.learn-top [data-role="back"], .learn-top [data-role="bag"].is-top { flex: none; width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; box-sizing: border-box; border-width: 4px !important; border-style: solid !important; border-color: transparent !important; border-radius: calc(var(--nx-r-s) + 4px) !important; background-clip: padding-box !important; }
.screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage { position: absolute; left: 8px; bottom: 8px; z-index: 4; margin: 0; padding: 2px 8px; min-height: 0; border: 0; border-radius: var(--nx-r-s); background: rgba(10, 17, 40, 0.55); box-shadow: none; width: auto; display: flex; align-items: center; gap: 6px; }
.screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage .bt-status__lbl, .screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage .ui-energy__num { display: none; }
.screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage .ui-cell { width: 16px; height: 16px; }
.screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage .bt-held:not([data-n="1"]) .bt-held__name { display: none; } /* 둘이면 그림만(읽어 주는 이름은 그대로) */
.screen.learn[data-screen="battle"] .bt-stage > .ui-hp, .screen.learn[data-screen="battle"] .bt-stage .ui-hp { position: absolute; right: 8px; bottom: 8px; z-index: 4; padding: 2px 8px; border-radius: var(--nx-r-s); background: rgba(10, 17, 40, 0.55); }
.screen.learn[data-screen="battle"] .bt-stage .ui-hp__name, .screen.learn[data-screen="battle"] .bt-stage .ui-hp__num { font-size: 14px; }
.screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { padding-bottom: 40px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage, html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage .ui-hp { position: static; order: 5; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage { margin-left: auto; }
html[data-band="5-6"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { padding-bottom: 6px; }
@media (min-height: 700px) and (max-width: 699px) {
  html[data-band="3-4"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 212px; --bt-mon: 92px; }
  html[data-band="1-2"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) { --bt-stage-h: 216px; --bt-mon: 96px; }
}
.learn-report.is-corner { float: right; position: relative; z-index: 2; margin: -8px -8px 4px 8px; display: block; }
.learn-report.is-corner .ui-btn { min-height: 48px; height: 48px; padding: 0 10px; box-sizing: border-box; border: 8px solid transparent !important; border-radius: 18px !important; background: rgba(20, 32, 74, 0.08) !important; background-clip: padding-box !important; box-shadow: none !important; color: var(--paper-mute, #4b5578) !important; font-size: 14px; font-weight: 600; }
.learn-report.is-corner .ui-btn svg { width: 16px; height: 16px; }

/* ⑭ 버튼 크기 '또렷하게 조임' */
.ui-btn--main { min-height: 48px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(255, 220, 150, 0.6) !important; font-weight: 700; }
.ui-btn--main:is(.is-down, :active):not([aria-disabled="true"]) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 2px rgba(255, 230, 170, 0.9) !important; }
.ui-btn--main .ui-btn__label, .ui-btn--sub .ui-btn__label { font-size: 17px; }
.ui-btn--sub:not(.learn-choice) { min-height: 48px; box-sizing: border-box; border-top-width: 4px !important; border-bottom-width: 4px !important; border-top-color: transparent !important; border-bottom-color: transparent !important; background-clip: padding-box !important; }
.ui-btn--small:not(.is-top):not([data-role="back"]) { min-height: 48px; box-sizing: border-box; border-top: 8px solid transparent !important; border-bottom: 8px solid transparent !important; background-clip: padding-box !important; }
.ui-btn--small .ui-btn__label { font-size: 14px; }
.bt-odds-btn { box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.6) !important; }
.today-next .ui-btn--main { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important; }
footer.learn-bar { padding-block: 8px calc(8px + var(--sab)); } /* 아래 안전 영역을 지우지 않는다(2026-11-13: 태블릿에서 다음 단추가 시스템 막대에 깔림) */
/* 글자 네 단계 14·17·19·24 */
.today-name { font-size: 19px; }
.section-label h2 { font-size: 17px; }
.daily-count, .learn-count, .week li, .tabbar a, .part .state, .counter span, .ul-row small, .ui-bag__note, .bt-tag { font-size: 14px; }
.part .label b, .bt-chest b, .ui-bubble { font-size: 17px; }
.bt-res__title { font-size: 24px; }
.learn-prompt { font-size: 19px; }
.learn-prompt .rt-big .eq { font-size: 24px; }
.ui-hp__name, .ui-hp__num, .ui-energy__num { font-size: 14px; }
/* learn.css의 '이상해요' 44px · 작은 폰 키패드 50×44 → 48 */
.learn-report .ui-btn { min-height: 48px; }
@media (max-height: 700px) { .learn-input.has-pad .learn-field, .learn-input.has-pad .ui-key { min-height: 48px; } }
/* 1~2학년은 크게 유지: 글·보기 칸·아래 줄 버튼 */
html[data-band="1-2"] .ui-btn--main, html[data-band="1-2"] footer.learn-bar .ui-btn { min-height: 56px; }
html[data-band="1-2"] .ui-btn--main .ui-btn__label, html[data-band="1-2"] footer.learn-bar .ui-btn__label { font-size: 19px; }
html[data-band="1-2"] .learn-prompt { font-size: 24px; }

/* ⑮ 목록 상자 걷기: 선으로 나눔, 지금 할 것은 금색 왼쪽 막대 하나 */
.parts { gap: 0 !important; border-top: 1px solid var(--nx-div); }
.screen[data-layout="v4"] .part, .part { background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid var(--nx-div) !important; min-height: 56px !important; padding: 8px !important; }
.screen[data-layout="v4"] .part.is-next { background: linear-gradient(90deg, rgba(255, 196, 90, 0.12), rgba(255, 196, 90, 0) 70%) !important; box-shadow: inset 3px 0 0 var(--lamp) !important; padding-left: 16px !important; }
.part .state:not(.has-tag) { border: 0 !important; color: var(--mute) !important; font-weight: 500 !important; width: auto !important; }
.ul-list { gap: 0 !important; border-top: 1px solid var(--nx-div); }
.ul-list .ui-card, .ul-item { background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid var(--nx-div) !important; }
.ul-item[data-now] { background: linear-gradient(90deg, rgba(255, 196, 90, 0.12), rgba(255, 196, 90, 0) 70%) !important; box-shadow: inset 3px 0 0 var(--lamp) !important; }
.ul-item.is-locked, .ul-item.is-locked * { color: var(--off-ink) !important; }
.ul-next.ui-card { border: 0 !important; box-shadow: none !important; }
.scene-hero { box-shadow: none !important; }
.ui-bag-list { gap: 0 !important; border-top: 1px solid var(--nx-div); }
.treasure .ui-bag, .tt-bag .ui-bag { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; border-bottom: 1px solid var(--nx-div) !important; }
.nx-fold__head { background: none !important; box-shadow: none !important; border: 0 !important; border-bottom: 1px solid var(--nx-div) !important; border-radius: 0 !important; }
.screen.learn[data-screen="battle"] .bt-stage > .bt-status.is-in-stage .bt-hearts { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; }

/* ── ⑯ 친구를 무대에 크게 · 리액션(2026-11-13 결정 2차 16·17번, 시안 friend_light/mock/1_big) ──
   3~4학년: 친구(144)는 왼쪽, 상대는 오른쪽에서 마주 봄. 1~2학년: 친구만(176), 오른쪽에 작은 집. 5~6학년은 한 줄 무대 그대로(친구는 머리줄).
   그림은 리액션 컷 시트(ui/friend/reactions.js). 읽고 푸는 동안은 정지, 움직임 0.6초 이하 한 번, 움직임 줄이기면 끝 모습만. */
.bt-stage > .st-friend { position: absolute; z-index: 2; left: 4px; right: auto; bottom: 32px; width: var(--st-fr, 144px); height: var(--st-fr, 144px); pointer-events: none; }
.bt-stage[data-band="1-2"] > .st-friend { --st-fr: 176px; left: 8px; bottom: 30px; }
.bt-stage > .st-friend .st-friend__pic, .bt-stage > .st-friend .char-pic { display: block; width: 100%; height: 100%; }
.rx-pic { display: block; background-repeat: no-repeat; }
@media (max-height: 760px) and (max-width: 699px) { .bt-stage > .st-friend { --st-fr: 96px; bottom: 30px; } .bt-stage[data-band="1-2"] > .st-friend { --st-fr: 104px; } }
/* 3~4학년: 상대는 오른쪽(친구와 마주 봄) */
html .bt-stage[data-band="3-4"] .bt-mon { position: absolute; right: 9%; bottom: 40px; margin: 0; }
.bt-stage[data-band="3-4"][data-speaker="opponent"] .bt-mon { margin-left: 0; align-self: auto; }
.bt-stage[data-band="1-2"] > .st-house { position: absolute; z-index: 1; right: 10px; bottom: 34px; width: 72px; }
.bt-stage[data-band="1-2"] > .st-prop { left: auto; right: 96px; margin-left: 0; }
/* 머리줄 친구: 무대에 친구가 서는 학년군(1~2·3~4)의 풀이 화면에서는 숨긴다(한 화면에 친구 하나) */
html:is([data-band="1-2"], [data-band="3-4"]) .screen.learn[data-screen="battle"]:not([data-phase="result"], [data-phase="review"]) .learn-top__friend { visibility: hidden; }
/* 리액션 움직임(한 번, 0.6초 이하) */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="reduce"]) .bt-stage:not([data-still]) .rx-pic[data-motion="hop"] { animation: rx-hop 520ms ease-out both; }
  html:not([data-motion="reduce"]) .bt-stage:not([data-still]) .rx-pic[data-motion="nod"] { animation: rx-nod 480ms ease-in-out both; transform-origin: 50% 90%; }
  html:not([data-motion="reduce"]) .bt-stage:not([data-still]) .rx-pic[data-motion="droop"] { animation: rx-droop 520ms ease-out both; transform-origin: 50% 90%; }
  html:not([data-motion="reduce"]) .bt-stage:not([data-still]) .rx-pic[data-motion="sparkle"] { animation: rx-spark 560ms ease-out both; }
}
@keyframes rx-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px); } 70% { transform: translateY(0); } 85% { transform: translateY(-4px); } 100% { transform: none; } }
@keyframes rx-nod { 0%, 100% { transform: none; } 40% { transform: rotate(-4deg) translateY(3px); } 70% { transform: rotate(2deg); } }
@keyframes rx-droop { from { transform: none; } to { transform: translateY(3px) rotate(-2deg); } }
@keyframes rx-spark { 0% { filter: none; transform: scale(.96); } 50% { filter: drop-shadow(0 0 10px var(--lamp)); transform: scale(1.05); } 100% { filter: none; transform: none; } }

/* ── ⑰ 말풍선 자리(2026-11-13 결정 2차 19번) ──
   ① 말하는 캐릭터 곁에서 꼬리로 그 캐릭터를 가리킨다 ② 얼굴·상대·문제 글·답 칸·하트를 가리지 않는다 ③ 화면 밖으로 넘치지 않는다(360 포함) ④ 길이에 따라 무대 높이가 출렁이지 않는다.
   규칙: 1~2·3~4학년의 말(정답 말풍선·친구 한마디·첫 문제 한 줄·첫 만남)은 모두 무대 바로 아래 한 자리. 무대 높이는 고정이고, 꼬리 자리만 말하는 이를 따라간다
   (친구 = 무대 왼쪽 친구 가운데, 상대 = 무대 오른쪽 상대 가운데). 5~6학년은 한 줄 무대 안 게이지 옆 두 줄 글 그대로. */
html[data-band="3-4"] .screen.learn[data-screen="battle"] { --st-fr: 144px; --fr-l: 4px; }
html[data-band="1-2"] .screen.learn[data-screen="battle"] { --st-fr: 176px; --fr-l: 8px; }
@media (max-height: 760px) and (max-width: 699px) {
  html[data-band="3-4"] .screen.learn[data-screen="battle"] { --st-fr: 84px; }
  html[data-band="1-2"] .screen.learn[data-screen="battle"] { --st-fr: 100px; }
}
.screen.learn[data-screen="battle"] { --opp-r: 24px; --fr-cx: calc(var(--fr-l, 4px) + var(--st-fr, 144px) / 2); --opp-cx: calc(var(--opp-r) + var(--bt-mon, 92px) / 2); }
.bt-stage > .st-friend { width: var(--st-fr); height: var(--st-fr); left: var(--fr-l, 4px); bottom: 30px; }
html .bt-stage[data-band="3-4"] .bt-mon { right: var(--opp-r); bottom: 40px; }
/* 소품(정답 동작 18종)은 친구와 상대 사이 가운데(상대 그림을 가리지 않게) */
html .bt-stage[data-band="3-4"] > .st-prop { right: auto; left: calc(var(--fr-l, 4px) + var(--st-fr, 144px) + (100% - var(--fr-l, 4px) - var(--st-fr, 144px) - var(--opp-r) - var(--bt-mon, 92px)) / 2 - 24px); width: 48px; height: 48px; bottom: 34px; }
/* 무대 아래 말: 꼬리를 위로 */
.screen.learn[data-screen="battle"] .learn-body > .bt-tag.is-below { position: relative; z-index: 3; align-self: flex-end; width: max-content; max-width: 100%; margin: 4px 0 0; padding: 8px 14px; box-sizing: border-box; text-align: left; font-size: 15px; }
html[data-band="1-2"] .screen.learn[data-screen="battle"] .learn-body > .bt-tag.is-below { font-size: 17px; }
.screen.learn[data-screen="battle"] .learn-body > .bt-tag.is-below::after { top: -7px; bottom: auto; left: auto; right: calc(var(--opp-cx) - 7px); margin: 0; transform: rotate(225deg); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble::before { left: calc(var(--fr-cx) - 7px); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble[data-speaker="opponent"]::before { left: auto; right: calc(var(--opp-cx) - 7px); }
.screen.learn[data-screen="battle"] .bt-fb.is-bubble { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
@media (max-width: 380px) { .screen.learn[data-screen="battle"] .bt-stage .ui-hp__name { display: none; } } /* 좁은 폰: 상대 이름은 무대 아래 말에 있다(하트와 겹치지 않게) */

/* ── ⑱ 불 켜기(2026-11-13 결정 2차 18번): 결과 화면 왼쪽 아래에 내 친구와 이 단원 집. 상대는 오른쪽으로 비켜 선다 ── */
.bt-hero > .bt-light { position: absolute; inset: 0; z-index: 2; display: block; pointer-events: none; } /* 집이 무대의 주인공: 무대 폭의 55~60%, 가운데 아래. 친구는 집 옆(왼쪽 아래), 상대는 위쪽 오른쪽 구석에 작게 */
.bt-light__friend { position: absolute; z-index: 2; left: 2%; bottom: 8px; display: block; width: 24%; max-width: 120px; aspect-ratio: 1; }
.bt-light__friend .bt-light__pic, .bt-light__friend .char-pic { display: block; width: 100%; height: 100%; }
.bt-light__house { position: absolute; z-index: 1; left: 50%; bottom: 0; display: block; width: 76%; aspect-ratio: 1; transform: translate(-50%, 9%); } /* 그림 칸 폭 76% = 집 몸통 약 55~58% */
.bt-light__house .hz { position: absolute; inset: 0; }
.bt-light__house svg { display: block; width: 100%; height: auto; overflow: visible; }
.bt-light__bush { position: absolute; right: -18px; bottom: 10px; width: 34%; height: auto; }
.bt-light__moon { position: absolute; left: 10px; top: 10px; width: 34px; height: auto; opacity: 0.95; }
.hz { display: block; }
.hz__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.hz__img[data-on="0"] { opacity: 0; }
.bt-hero:has(> .bt-light) { padding-right: 0; }
.bt-hero:has(> .bt-light) > .bt-hero__mon { position: absolute; z-index: 3; right: 10px; top: 10px; width: min(24%, 88px); height: auto; aspect-ratio: 1; }
@media (max-height: 700px) and (max-width: 699px) { .bt-light__moon { display: none; } }
.bt-stage > .st-house svg { display: block; width: 100%; height: auto; }
@media (min-width: 700px) { .bt-light__friend { max-width: 160px; } .bt-light__moon { width: 48px; } .bt-hero:has(> .bt-light) > .bt-hero__mon { width: min(22%, 130px); } }
.screen.learn[data-screen="battle"][data-phase="result"]:has(.bt-light) .learn-top__friend { visibility: hidden; } /* 친구는 불 켜기 장면에 한 번만 */
/* 5~6학년 한 줄 무대(2차 13번 뒤 고침): 하트 줄이 무대 안 같은 줄에 들어와 두 줄 글·조심! 한 줄이 들어갈 폭이 없어(세로로 한 글자씩) 아래 줄로 내린다 */
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage { flex-wrap: wrap; row-gap: 4px; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage > .bt-tag,
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage .bt-fb.is-note { order: 9; flex: 1 1 100%; position: relative; inset: auto; transform: none; margin: 0; max-width: none; text-align: left; }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage > .bt-tag::after { display: none; }
/* 넓은 화면(태블릿 세로): 무대가 높아지는 만큼 친구도 크게 */
@media (min-width: 700px) { .screen.learn[data-screen="battle"] { --st-fr: 208px; } }
html[data-band="5-6"] .screen.learn[data-screen="battle"] .learn-body > .bt-stage .ui-hp { flex: 1 1 0; min-width: 72px; }
/* 5~6학년 무대 높이는 답하기 전·후 같게(2차 19번 ④): 아래 줄(조심! 한 줄·두 줄 글) 자리를 늘 비워 둔다 */
html[data-band="5-6"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { min-height: 128px; align-content: flex-start; box-sizing: border-box; }
@media (max-width: 380px) { html[data-band="5-6"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { min-height: 140px; } }
/* 큰 화면(700×1000 이상): 무대가 '남는 자리만큼' 늘면 답한 뒤 아래 글 길이에 따라 높이가 출렁인다(2차 19번 ④). 화면 높이에 묶은 고정 높이로 */
@media (min-width: 700px) and (min-height: 1000px) {
  .screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { flex: 0 0 auto; height: min(560px, 40vh); max-height: none; }
  html[data-band="5-6"] .screen.learn[data-screen="battle"]:not([data-phase="result"]) .learn-body > .bt-stage { height: 224px; }
}

/* ── 주간 띠: 공부한 날과 안 한 날을 가른다. 안 한 날은 불 꺼진 등대(흐리고 색 빠짐), 한 날은 불빛이 번지고 요일 글자가 금색 ── */
.week li:not(.lit) svg { opacity: .38; filter: saturate(.15) brightness(.8); }
.week li.lit svg { filter: drop-shadow(0 0 7px var(--lamp)); }
.week li.lit { color: var(--lamp); font-weight: 600; }

/* ── ⑲ 보호자 영역 모양 고도화(2026-11-13 제품 책임자, open1113 추가 묶음). 2차 정리의 모양 언어를 보호자 화면에도:
   목록은 상자 대신 가는 줄, 설정 줄은 '이름 왼쪽 · 값/스위치 오른쪽' 한 줄, 작은 머리글로 묶음, 글자 12·13·14·15·20·26, 강조는 하나(등불색),
   스위치는 켜짐 = 등불색 채움 + 동그라미 오른쪽 + '켬', 꺼짐 = 빈 테두리 + 동그라미 왼쪽 + '꺼짐'(색과 모양 둘 다). 누르는 곳 48 이상, 보이는 크기 48/40/32.
   태블릿(700px~)은 2단. 정책서 10절(비교·순위·경고 색 없음)은 그대로 ── */
.g-screen { --g-line: color-mix(in srgb, var(--line-strong) 38%, transparent); }
.g-head__title h1, .g-screen .w-head h1 { font-size: 20px; }
.g-head__title small { font-size: 13px; }
.g-iconbtn { width: 48px; height: 48px; border: 0; background: transparent; }
.g-iconbtn::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid var(--g-line); background: color-mix(in srgb, var(--surface-2) 60%, transparent); z-index: -1; }
.g-iconbtn { isolation: isolate; }
.g-tabs { gap: 0; margin: 4px 0 16px; padding: 0; border: 0; border-bottom: 1px solid var(--g-line); border-radius: 0; background: transparent; }
.g-tabs button { min-height: 48px; border-radius: 0; font-size: 15px; }
.g-tabs button[aria-selected="true"] { background: transparent; color: var(--text); box-shadow: inset 0 -2px 0 var(--lamp); font-weight: 700; }
.g-sec { margin: 0 0 22px; }
.g-sec__head { margin: 0 0 4px; padding: 0 4px; }
.g-sec__head h2 { font-size: 13px; font-weight: 700; color: var(--text-mute); letter-spacing: 0.02em; }
.g-sec__head span { font-size: 13px; }
.g-lead { font-size: 14px; padding: 0 4px; }
.g-empty-line { margin: 24px 4px; color: var(--text-mute); font-size: 15px; text-align: center; }
/* 줄 목록 */
.g-screen :is(.g-list, .g-set) { gap: 0; border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--g-line); }
.g-screen .g-list > li, .g-screen .g-set > li { border-bottom: 1px solid var(--g-line); }
.g-screen .g-set li + li { border-top: 0; }
.g-screen .g-row { min-height: 52px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; }
.g-screen .g-row.is-unread { background: transparent; }
.g-screen .g-row.is-unread .g-row__main b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--lamp); }
.g-screen .g-row__main b, .g-set__text b { font-size: 15px; font-weight: 600; }
.g-screen .g-row__main span, .g-set__text span { font-size: 13px; }
.g-row__end, .g-set__val { font-size: 14px; }
.g-rank { flex: none; width: 20px; color: var(--text-mute); font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.g-screen .g-set__row { min-height: 52px; padding: 6px 4px; }
/* 오늘 한 장·숫자 칸: 상자 없이 줄 */
.g-today { padding: 0; border: 0; background: transparent; }
.g-today__kv { margin: 0; padding: 8px 4px; gap: 6px 12px; border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); font-size: 15px; }
.g-tiles { gap: 0; border-top: 1px solid var(--g-line); }
.g-tile { padding: 10px 4px; border: 0; border-bottom: 1px solid var(--g-line); border-radius: 0; background: transparent; }
.g-tile:nth-child(odd) { padding-right: 12px; }
.g-tile__label { font-size: 13px; }
.g-tile__num { font-size: 26px; }
.g-tile__num small { font-size: 14px; }
.g-tile__sub { font-size: 13px; }
/* 스위치 한 벌 */
.g-switch { width: 48px; height: 28px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: transparent; box-sizing: border-box; }
.g-switch::after { top: 3px; left: 3px; width: 19px; height: 19px; background: transparent; border: 1.5px solid var(--off-ink); box-sizing: border-box; }
.g-switch[aria-checked="true"] { background: var(--lamp); border-color: var(--lamp); }
.g-switch[aria-checked="true"]::after { left: 23px; background: var(--lamp-ink); border-color: var(--lamp-ink); }
.g-switch__word { font-size: 13px; width: auto; min-width: 2.4em; }
.g-set__row[aria-checked="true"] .g-switch__word { color: var(--text); }
/* 고르기(진동 등): 한 줄 세 칸, 보이는 40 · 누르는 48 */
.g-set .g-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin-top: 6px; padding: 2px; border-radius: 12px; border: 1px solid var(--g-line); }
.g-set .g-chips .ui-chip { min-height: 48px; margin: 0; border: 0; border-radius: 10px; background: transparent; font-size: 14px; box-shadow: none; }
.g-set .g-chips .ui-chip[aria-pressed="true"] { background: var(--lamp); color: var(--lamp-ink); font-weight: 700; }
/* 숫자 올리고 내리기: 보이는 40 */
.g-stepper__btn { min-width: 48px; min-height: 48px; border: 0; background: transparent; position: relative; isolation: isolate; font-size: 20px; }
.g-stepper__btn::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; border: 1px solid var(--line-strong); z-index: -1; }
.g-stepper__val { font-size: 15px; min-width: 2.8em; }
/* [?]: 보이는 32 · 누르는 48 */
.g-screen .g-help { width: 48px; height: 48px; min-width: 48px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; position: relative; isolation: isolate; font-size: 14px; color: var(--text-mute); }
.g-screen .g-help::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1px solid var(--line-strong); z-index: -1; }
.g-help__note { margin: 0 4px 8px; border: 0; padding: 0; font-size: 13px; }
/* 접힌 묶음: 줄과 같은 모양 */
.g-screen .nx-fold--guardian .nx-fold__head { min-height: 52px; padding: 6px 4px; border: 0 !important; border-bottom: 1px solid var(--g-line) !important; border-radius: 0; background: transparent !important; box-shadow: none !important; }
.g-screen .nx-fold--guardian .nx-fold__label { font-size: 15px; }
.g-screen .g-folds { display: grid; gap: 0; border-top: 1px solid var(--g-line); }
.g-screen .nx-fold__body { margin: 0 0 8px 12px; }
/* 오픈소스 라이선스: 한 목록 */
.g-lics { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--g-line); }
.g-lic { border-bottom: 1px solid var(--g-line); padding: 0 4px; }
.g-lic__line { display: flex; align-items: center; justify-content: space-between; gap: 2px 12px; min-height: 48px; }
.g-lic__line b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.g-lic__kind { color: var(--text-mute); font-size: 13px; }
.g-lic__more { margin: 0; border: 0; background: transparent; padding: 0; }
.g-lic__more > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 4px; cursor: pointer; list-style: none; }
.g-lic__more > summary .g-lic__kind { flex: none; color: var(--lamp); text-align: right; white-space: nowrap; }
.g-lic__more > summary:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: -2px; }
.g-lic__more > summary::-webkit-details-marker { display: none; }
.g-lic__copy { margin: 0 0 6px; color: var(--text-mute); font-size: 13px; }
/* 단추 크기 한 벌(보호자): 주 48 · 보조 40(누르는 곳 48) */
.g-screen .g-actions .ui-btn { min-height: 48px; }
.g-more { margin-top: 4px; }
/* 태블릿 2단: 머리·탭·오늘 한 장은 위에 걸치고, 구역은 두 단으로 흐른다 */
@media (min-width: 700px) {
  .g-screen:is([data-screen="summary"], [data-screen="progress"], [data-screen="settings"], [data-screen="sources"]) { columns: 2; column-gap: 28px; }
  .g-screen:is([data-screen="summary"], [data-screen="progress"], [data-screen="settings"], [data-screen="sources"]) > :is(.g-head, .g-tabs, .g-today, .g-empty-line) { column-span: all; }
  .g-screen .g-sec, .g-screen .g-card, .g-screen .g-report { break-inside: avoid; }
  .g-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ⑲ 보탬: 지난주 리포트·도달표 과목 묶음도 상자 대신 줄 */
.g-screen .g-report { padding: 10px 4px; border: 0; border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); border-radius: 0; background: transparent; }
.g-screen .g-report h3 { font-size: 13px; font-weight: 700; color: var(--text-mute); margin: 0 0 4px; }
.g-screen .g-report p { font-size: 15px; }
.g-screen .g-reach__subj { border: 0 !important; border-bottom: 1px solid var(--g-line) !important; border-radius: 0 !important; background: transparent !important; }
.g-screen .g-reach__subj > summary { min-height: 52px; padding: 0 4px; border: 0 !important; border-radius: 0 !important; background: transparent !important; font-size: 15px; }
.g-set .g-chips .ui-chip { white-space: nowrap; padding: 0 6px; font-size: 13px; }

/* ⑳ 아이 쪽도 같은 모양 언어(2026-11-13): 목록은 상자 대신 가는 줄, 단추는 등불 유리 한 벌(보이는 크기 48 · 40 · 32, 누르는 곳은 모두 48 이상) */
:is(.ui-btn--sub, .ui-btn--small, .ui-btn--text):not(.g-screen *) { box-sizing: border-box; min-height: 48px; background-clip: padding-box; }
:is(.ui-btn--sub, .ui-btn--small):not(.g-screen *) { border: 4px solid transparent; box-shadow: inset 0 0 0 1.5px var(--gl-line), var(--gl-ring); } /* 보이는 40 */
.ui-btn--text:not(.g-screen *) { border: 8px solid transparent; padding: 0 8px; } /* 보이는 32 */
:is(.ui-btn--sub, .ui-btn--small):not(.g-screen *):is(.is-down, :active):not([aria-disabled="true"], :disabled) { box-shadow: inset 0 0 0 1.5px rgba(255, 214, 140, 0.85), 0 0 18px rgba(255, 196, 90, 0.32); }
:is(.ui-btn--sub, .ui-btn--small):not(.g-screen *)[aria-disabled="true"] { border: 4px solid transparent; box-shadow: inset 0 0 0 1.5px rgba(135, 147, 196, 0.5); }
/* 가방 줄(보물 탭·전투 가방 시트): 가는 줄 */
.ui-sheet .ui-bag-list { gap: 0 !important; border-top: 1px solid var(--nx-div); }
.ui-sheet .ui-bag { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; border-bottom: 1px solid var(--nx-div) !important; }
.ui-bag.is-off { border-style: solid; }
/* 배지 조끼: 한 줄 3칸 격자(태블릿 6칸), 테두리 없는 칸(그림 + 이름 한 줄 + 받은 단계 작은 글). 받은 배지는 색, 못 받은 배지는 흐린 점선 윤곽만 */
.tv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; border: 0; }
.tb, .tb[data-got="false"], .tb[data-worn] { grid-auto-flow: row; grid-template-columns: none; justify-items: center; align-content: start; align-items: start; gap: 2px; min-height: 48px; padding: 4px 2px; border: 0; border-radius: 0; background: none; text-align: center; }
.tb .tb-art { width: 56px; height: 64px; justify-self: auto; }
.tb[data-got="false"] .tb-art { opacity: 0.55; }
.tb__name { max-width: 100%; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; }
.tb__state { color: var(--lamp); font-size: 12px; line-height: 1.2; }
.tv-h { padding: 0 4px; font-size: 15px; }
.tv-section { gap: 4px; }
@media (min-width: 700px) { .tv-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tb .tb-art { width: 72px; height: 82px; } }
/* 성장 일기: 상자 없이 줄 */
.td-page { padding: 4px 4px 0; border: 0; border-radius: 0; background: none; }
.td-head { padding-bottom: 8px; border-bottom: 1px solid var(--nx-div); }
/* 불 켜기 결과: 무대(금빛 테두리 칸)는 내용만큼(화면 높이의 40% 안팎)만 차지하고, 아래 글·별·상자 줄이 위로 올라온다 */
.learn-body > .bt-res:has(.bt-light) { grid-template-rows: auto; align-content: center; flex: 1 1 auto; }
.learn-body > .bt-res:has(.bt-light) > .bt-hero { height: clamp(220px, min(45dvh, 100vw), 560px); min-height: 0; }

/* ㉑ 여백 한 벌(2026-11-13 제품 책임자): 가까운 것은 한 묶음, 묶음 사이는 그 두 배 이상.
   제목↔내용 8 · 묶음 안 항목 8~12 · 묶음↔묶음 24 · 구역↔구역 32 · 카드 안쪽 16 · 화면 좌우 16 · 단추와 위 내용 16 이상 · 글 줄 1.45 이상 */
.g-screen { padding-inline: var(--gutter); }
.g-screen :is(p, li, dd, dt, small, label) { line-height: 1.45; }
.g-head__title small { margin-top: 2px; }
.g-tabs { margin: 12px 0 var(--sp-group); }
.g-sec { margin: 0 0 var(--sp-section); }
.g-sec__head { margin: 0 0 var(--sp-title); }
.g-sec__head + :is(.g-lead, details, ul, ol, dl, div, p) { margin-top: 0; }
.g-lead { margin: 0 0 var(--sp-item); }
.g-screen .g-card { padding: var(--sp-4); }
.g-screen > .g-card { margin-bottom: var(--sp-group); }
.g-card + .g-card { margin-top: var(--sp-group); }
.g-screen h3 { margin-block: 0 var(--sp-title); }
.g-screen .g-report h3 { margin-bottom: var(--sp-title); }
.g-screen .g-report + .g-report { margin-top: var(--sp-group); }
.g-screen :is(ul, ol, dl, p, div) + .ui-btn:not(.ui-btn--text) { margin-top: var(--sp-4); }
.g-screen .g-actions { margin-top: var(--sp-group); }
.w-step { margin-bottom: 4px; }
.w-head { margin: 4px 0 var(--sp-group); }
.w-head h1 { margin: 4px 0 var(--sp-title); line-height: 1.3; }
.w-hint { margin: 4px 0 var(--sp-title); }
.w-label { margin: var(--sp-group) 0 var(--sp-title); font-size: 15px; line-height: 1.45; }
.g-screen .w-label { margin: var(--sp-group) 0 var(--sp-title); font-size: 15px; font-weight: 700; color: var(--text-mute); line-height: 1.45; }
.w-label + .g-chips { margin-top: 0; }
.w-input + .w-err { margin-top: var(--sp-title); }
.g-today__kv { row-gap: var(--sp-title); }
.g-kv { row-gap: var(--sp-title); }
.g-yes, .g-no { gap: var(--sp-title); margin: var(--sp-title) 0 var(--sp-item); }
.g-yes li, .g-no li { padding-block: 2px; }
.g-reach__meaning { row-gap: var(--sp-title); }
.g-reach__codes { margin-top: 2px; }
/* 문제 화면: 윗줄과 무대 사이만 풀고(높이는 그대로) */
.screen.learn .learn-top { margin-bottom: 4px; }
.screen.learn[data-screen="battle"] .learn-body { padding-top: var(--sp-2); }
/* 가방·보물 줄 */
.ui-bag__info { gap: 4px; }
.tv-h { margin: 0 0 var(--sp-title); }
.tv-section + .tv-section { margin-top: var(--sp-group); }
.td-head__txt { gap: 4px; }
.td-stage__txt { gap: 4px; }
.td-stage { padding-block: var(--sp-3); }
.treasure-panel { gap: var(--sp-group); }
.ul-row__state { margin-top: 2px; }

/* ㉒ 고르기 부품 한 벌(2026-11-13): 알약 칩 대신 같은 너비의 둥근 네모 칸(높이 48, 모서리 12). 고른 칸은 금색 채움 + 굵은 글, 안 고른 칸은 가는 테두리 */
.g-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-2); margin-top: 0; }
.g-chips:has(> :nth-child(5)) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; }
.g-chips:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-chips .ui-chip, .ui-chip--press { justify-content: center; text-align: center; white-space: normal; min-height: 48px; padding: 4px 6px; border-radius: var(--r-m); border: 1px solid var(--gl-line); background: var(--gl-bg); color: var(--ink); box-shadow: var(--gl-ring); font-size: 15px; font-weight: 500; line-height: 1.3; }
.g-chips .ui-chip .ui-icon, .ui-chip--press .ui-icon { display: none; }
.g-chips .ui-chip[aria-pressed="true"], .ui-chip--press.is-selected, .ui-chip--press[aria-pressed="true"] { background: var(--lamp); color: var(--lamp-ink); -webkit-text-fill-color: var(--lamp-ink); border-color: var(--lamp); font-weight: 800; box-shadow: 0 0 12px rgba(255, 196, 90, 0.3); }
.ui-chip--press.is-selected svg { color: var(--lamp-ink); }
.g-seg { border-radius: var(--r-m); padding: 3px; }
.g-seg button { border-radius: 10px; }
.ui-chip:not(.ui-chip--press) { border-radius: var(--r-s); }
.ui-btn--text { border-radius: var(--r-m); }

/* ㉓ 모서리 단계(8 · 12 · 16, 등불 유리 단추 18): 완전 알약(999px)은 주 단추·스위치·진행 막대에만, 동그란 아이콘 단추는 둥근 네모로 */
:is(.g-iconbtn, .g-help, .ui-sheet__close, .g-stepper__btn) { border-radius: var(--r-m); }
.g-pin-key, .g-back, .screen.learn .learn-top .ui-btn--small { border-radius: var(--gl-r); }
.ui-btn--text, .ui-btn--text.g-more { border-radius: var(--r-m); }
.learn-field, .w-input, .g-code, .dev-select { border-radius: var(--r-m); }

/* ㉔ 붙음 마무리 */
.bt-mname + .bt-sol, .learn-text + .bt-sol { margin-top: var(--sp-2); }
.learn-title + .bt-stars, .bt-stars__row + .bt-stars__next { margin-top: var(--sp-2); }
.g-head + .g-sec, .g-head + .g-card { margin-top: var(--sp-4); }
.g-screen :is(b, strong) + :is(span, small) { margin-top: 2px; }
.g-screen li:not([class]) + li:not([class]) { margin-top: var(--sp-2); }
.nx-fold:has(.nx-fold__head[aria-expanded="true"]) { padding-bottom: var(--sp-3); }
.w-line + .w-line { margin-top: 6px; }
.g-screen :is(ul, ol, p, div, dl) + :is(h2, h3) { margin-top: var(--sp-group); }
/* 적은 선택지(1~4개)는 설정의 '나눠 고르기' 틀(가는 테두리 틀 + 칸 사이 붙음)과 같게 */
.g-chips:not(:has(> :nth-child(5))) { gap: 0; padding: 2px; border: 1px solid var(--g-line, var(--line-strong)); border-radius: var(--r-m); }
.g-chips:not(:has(> :nth-child(5))) .ui-chip { border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
.g-chips:not(:has(> :nth-child(5))) .ui-chip[aria-pressed="true"] { background: var(--lamp); color: var(--lamp-ink); font-weight: 800; box-shadow: none; }
.screen.learn .learn-top :is([data-role="back"], [data-role="bag"]), .sound-btn { border-radius: var(--gl-r); }
.g-chips:has(> .g-mute:only-child) { padding: 0; border: 0; }
/* 낮은 폰(높이 700 이하): 여백을 넓힌 뒤에도 '아쉬운 문제 다시 보기'와 상자 줄이 아래 단추 줄에 가리지 않게 결과 무대를 낮춘다 */
@media (max-height: 700px) { .learn-body > .bt-res:has(.bt-light) > .bt-hero { height: clamp(170px, 34dvh, 560px); } }

/* ㉕ 보조 단추 테두리 · 요일별 과목 표 · 선택과목 줄 (2026-11-13)
   · 보호자 화면(.g-screen) 보조·작은 단추: 예전 '위아래 4·8px 투명 테두리'(⑰) 규칙이 여기까지 걸려 위쪽 빛줄과 양옆만 보이고 아래 테두리가 사라졌다. 네 변 같은 1px 진짜 테두리로 되돌린다(보이는 높이 48).
   · 요일별 과목 표: 칸 수(--cols, 5~7)만큼 같은 너비, 누르는 높이 48. 6칸 이상은 글 13 · ✓ 없이 금색 채움 + 굵은 글 두 가지로 구분. */
.g-screen :is(.ui-btn--sub, .ui-btn--small):not(.is-top):not([aria-disabled="true"]) { box-sizing: border-box; min-height: 48px; border: 1px solid var(--gl-line) !important; background-clip: border-box !important; box-shadow: var(--gl-ring); }
.g-screen :is(.ui-btn--sub, .ui-btn--small):not(.is-top):not([aria-disabled="true"]):is(.is-down, :active) { box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.85), 0 0 18px rgba(255, 196, 90, 0.32); }
/* 요일별 과목 표(2026-11-13 제품 책임자 확정): 머리글 = 과목 이름, 왼쪽 열 = 요일, 칸 = 체크만. 칸 너비 같게(--cols 5~7), 누르는 높이 48, 모서리 12 */
.w-days { display: grid; gap: var(--sp-2); }
.w-days .w-day { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; align-items: center; }
.w-cells { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 4px; min-width: 0; }
.w-cells > .w-rest { grid-column: 1 / -1; }
.w-colname { display: block; text-align: center; font-size: 13px; line-height: 1.3; color: var(--text-mute); white-space: nowrap; overflow: hidden; }
.w-cell { box-sizing: border-box; min-height: 48px; min-width: 0; padding: 0; display: grid; place-items: center; border-radius: var(--r-m); border: 1px solid var(--gl-line); background: var(--gl-bg); box-shadow: var(--gl-ring); color: var(--lamp-ink); font-size: 20px; font-weight: 800; cursor: pointer; }
.w-cell[aria-pressed="true"] { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 12px rgba(255, 196, 90, 0.3); }
.w-small { margin: var(--sp-2) 0 0; font-size: 13px; line-height: 1.45; }
.w-days + .w-small { margin-top: var(--sp-3); }
.w-elect { margin-bottom: var(--sp-group); }
.w-elect .w-label { margin-top: 0; }
.g-chips.w-elect-chips { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--n, 2), minmax(0, 148px)); width: fit-content; max-width: 100%; gap: 0; } /* 1~4개는 틀 한 개 안의 칸(㉒) */
.w-elect-chips .ui-chip[aria-pressed="true"]::before { content: "✓"; margin-right: 4px; font-weight: 800; }
.w-elect .w-hint { margin: var(--sp-2) 0 0; }
.g-card > :is(.g-note, .w-small):last-child, .g-card > :is(.g-note, .w-small):has(+ [hidden]:last-child) { margin-bottom: 0; } /* 카드 아래 안쪽 여백 = 위 안쪽 여백(16) */
.w-fill-note { margin: 0; text-align: center; color: var(--text); } /* [추천 배치로 채우기] 바로 아래 한 줄 */
.g-screen :is(.w-fill-note) + .ui-btn { margin-top: var(--sp-4); }
@keyframes w-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 196, 90, 0); } 35% { box-shadow: 0 0 0 3px rgba(255, 196, 90, 0.55), 0 0 22px rgba(255, 196, 90, 0.35); } 100% { box-shadow: 0 0 0 0 rgba(255, 196, 90, 0); } }
.w-days.is-flash { border-radius: var(--r-m); animation: w-flash 0.7s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .w-days.is-flash { animation: none; } }

/* ㉖ 지적 7건(2026-11-13 밤)
   · 아쉬운 문제 다시 보기: 'n개 중 k번째' 작은 이름표 → 문제 카드 → 내 답·정답 줄(문제 화면 부품) → 풀이 칸. 문제 사이 32, 안쪽 12. 짧으면 세로 가운데 쪽으로
   · 짝·나누기·차례의 답은 칸마다 한 줄(짝 표). 내 답 칸은 색 + ✓/✗ 표식
   · 머리줄 친구는 머리줄 높이(48) 안에 */
.screen.learn[data-screen="battle"][data-phase="review"] .learn-body { justify-content: safe center; }
.bt-review { display: grid; gap: var(--sp-6); align-content: center; padding-bottom: var(--sp-4); }
.bt-review > .learn-title { margin: 0 0 calc(var(--sp-2) - var(--sp-6)); }
.bt-review .bt-missed { display: grid; gap: var(--sp-3); }
.bt-missed__of { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--lamp); letter-spacing: .02em; }
.bt-review .bt-ans:not([hidden]) { margin: 0; }
.bt-review .bt-ans[data-input-kind="match"] .bt-ans__cells, .bt-review .bt-ans[data-input-kind="sort"] .bt-ans__cells, .bt-review .bt-ans[data-input-kind="order"] .bt-ans__cells { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
.bt-review .bt-ans:is([data-input-kind="match"], [data-input-kind="sort"], [data-input-kind="order"]) .bt-ans__cell { justify-content: flex-start; min-height: 40px; padding: var(--sp-1) var(--sp-3); }
.bt-review .bt-ans__cell[data-ok]::before { flex: none; font-weight: 800; font-size: 15px; }
.bt-review .bt-ans__cell[data-ok="true"]::before { content: "✓"; color: var(--c-science); }
.bt-review .bt-ans__cell[data-ok="false"]::before { content: "✗"; color: var(--lamp); }
@media (min-width: 700px) { .bt-review .bt-ans:not([hidden]):has(.is-mine) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.screen.learn .learn-top__friend { margin-block: 0; width: 48px; height: 48px; flex: none; display: grid; place-items: center; overflow: visible; }
.screen.learn .learn-top__friend .fr { --fr-size: 48px; }
html:is([data-band="1-2"], [data-band="3-4"]) .screen.learn[data-screen="battle"]:not([data-phase="result"], [data-phase="review"]) .learn-top__friend,
.screen.learn[data-screen="battle"][data-phase="result"]:has(.bt-light) .learn-top__friend { width: 0; margin-left: -4px; overflow: hidden; }
/* 불 켜기 장면 정리: 관목은 집 땅선 위(무대 테두리 안), 결과 가로등(학교 복습 밝기 표시)은 불 켜기 집과 겹쳐 잘린 조각으로 보여 숨긴다(밝기는 별·집이 같이 말한다) */
.bt-light__bush { right: 2%; bottom: 11%; width: 28%; }
.bt-hero:has(> .bt-light) > .bt-hero__lamp { display: none; }
/* 나누기(상자에 넣기) 풀 때: 상자 칸은 화면 아래 낮은 줄(아래 주 단추 줄 바로 위)에 늘 보인다. 한 줄 칸 수 = 상자 수, 누르는 높이 56, 이름 + 든 개수.
   열린 상자의 든 말은 그 줄 바로 위에 펼친다. 들어간 말은 목록에서 흐린 자리표. 답을 낸 뒤(is-locked)는 예전 모양. 무대는 이 유형에서 낮춘다 */
.bank-sort:not(.is-locked) .bank-boxes { grid-template-columns: none; position: sticky; bottom: var(--learn-bar-h, 72px); z-index: 3; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: var(--sp-2); margin: 0 calc(-1 * var(--gutter)); padding: var(--sp-3) var(--gutter) var(--sp-2); background: linear-gradient(180deg, rgba(10, 17, 40, 0), var(--sky0) 12px); }
.bank-sort:not(.is-locked) .bank-box { display: contents; }
.bank-sort:not(.is-locked) .bank-box__head { grid-row: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 6px; row-gap: 0; min-height: 56px; padding: 4px 8px; border: 2px solid var(--slot); border-radius: var(--r-m); background: color-mix(in srgb, var(--slot) 14%, var(--sky0)); font-size: 15px; line-height: 1.25; }
.bank-sort:not(.is-locked) .bank-box__head .bank-box__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bank-sort:not(.is-locked) .bank-box__head .bank-box__count { grid-column: 2; font-size: 13px; }
.bank-sort:not(.is-locked) .bank-box__head[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--slot) inset; }
.bank-sort:not(.is-locked) .bank-box__items { display: none; }
.bank-sort:not(.is-locked) .bank-box.is-open .bank-box__items { display: flex; grid-row: 1; grid-column: 1 / -1; max-height: 34dvh; overflow: auto; padding: var(--sp-2); border: 2px solid var(--slot); border-radius: var(--r-m); background: var(--sky1, var(--sky0)); }
.bank-sort:not(.is-locked) .bank-pool.is-empty { display: flex; }
.bank-ghost { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; max-width: 100%; padding: 6px 12px; border-radius: var(--radius); border: 2px dashed var(--line-strong, var(--line)); background: transparent; color: var(--text-mute); font: inherit; text-align: left; cursor: pointer; opacity: .62; }
.bank-ghost .bank-badge { flex: none; }
.bank-ghost__t { min-width: 0; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.bank-ghost.is-armed { opacity: 1; border-style: solid; border-color: var(--lamp); color: var(--text); }
.bank-ghost.is-armed .bank-ghost__t { text-decoration: none; }
.screen.learn:has(.bank-sort) .mix-stage { height: 84px; }
.screen.learn[data-screen="battle"]:has(.bank-sort) .learn-body > .bt-stage { height: 128px; min-height: 128px; --bt-mon: 64px; }
/* 카드 핵심 칸(2026-11-13): 일반 장면 없이 핵심 글 카드를 크게, 남는 자리에서 세로 가운데. 순서를 말하는 카드는 글 칸 3~5개를 화살표로 잇는 띠 */
.screen.learn .learn-body:has(.learn-key) > .ui-card:has(.learn-key) { margin-top: auto; }
.screen.learn .learn-body:has(.learn-key) > :last-child { margin-bottom: auto; }
.screen.learn .learn-key { font-size: 20px; line-height: 1.5; font-weight: 700; }
.key-seq { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2); }
.key-seq__item { display: flex; align-items: center; gap: var(--sp-2); }
.key-seq__t { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 72px; padding: 6px 14px; box-sizing: border-box; border-radius: var(--r-m); border: 1px solid var(--gl-line); background: var(--gl-bg); color: var(--ink); font-size: 15px; font-weight: 700; }
.key-seq__arrow { color: var(--lamp); font-size: 20px; font-weight: 800; }
.bt-review .bt-ans__cell { flex-wrap: nowrap; justify-content: flex-start; text-align: left; gap: var(--sp-2); }
.bt-review .bt-ans__cell .bt-ans__v { flex: 1 1 auto; }
.bt-review .bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__cell { justify-content: center; text-align: center; }
.bt-review .bt-ans__cells:not(:has(.bt-ans__cell:nth-child(2))) .bt-ans__cell .bt-ans__v { flex: 0 1 auto; }
.screen.learn .learn-body:has(.learn-key) > .ui-card:has(.learn-key) + .key-seq { margin-top: var(--sp-2); }
@media (min-width: 700px) { .screen.learn .learn-key { font-size: 26px; line-height: 1.4; } .key-seq__t { min-height: 56px; font-size: 20px; padding-inline: 20px; } }

/* ㉗ 전체 화면 품질 검사(2026-11-13): 사진을 한 장씩 보고 고친 공통 부품
   · 보호자 하위 화면 머리글 한 벌: 첫 줄 [뒤로] 제목 (오른쪽 도구) 세로 가운데, 둘째 줄 부제는 화면 왼쪽 선. 머리글 아래 16
   · 줄 목록: 글 시작 x를 화면 왼쪽 선(16)에 맞춤(구역 제목·줄·안내 글이 같은 선). 새 것 표시는 줄 앞 점 하나(읽은 줄도 같은 자리를 비워 둠)
   · 줄 목록 두 묶음이 이어지면 사이 32(가는 줄 두 개가 12 안에 겹쳐 보이던 것)
   · 문제 위쪽 줄: 친구가 숨는 학년군에서는 그 자리를 접어 가방 단추가 오른쪽 끝(친구 칸은 48) */
.g-screen > .g-head { margin-bottom: var(--sp-4); }
.g-head--back { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-3); row-gap: var(--sp-1); min-height: 48px; }
.g-head--back .g-head__title { display: contents; }
.g-head--back .g-head__title h1 { grid-column: 2; grid-row: 1; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.g-head--back .g-head__title small { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.g-head--back .g-head__tool { grid-column: 3; grid-row: 1; display: flex; }
.g-head--back .g-head__tool .ui-btn { min-height: 48px; margin: 0; }
.g-head--back .g-back { align-self: center; }
.g-head + .g-sec, .g-head + .g-card { margin-top: 0; }
.g-screen .g-sec__head { padding: 0; }
.g-screen .g-row { padding-inline: 0; gap: var(--sp-3); }
.g-screen .g-set__row { padding-inline: 0; }
.g-screen .g-row.is-unread .g-row__main b::before { content: none; }
.g-screen .g-row > :is(.g-unread, .g-read) { align-self: flex-start; width: 8px; height: 8px; margin-top: calc(var(--sp-2) + 6px); border: 0; }
.g-screen .g-row > .g-read { background: transparent; }
.g-screen > :is(.g-list, .g-set) + :is(.g-list, .g-set), .g-screen .g-set--after { margin-top: var(--sp-section); }
.g-screen > :is(.g-list, .g-set) + .g-mute { margin-top: var(--sp-2); }
.g-reach__code { white-space: nowrap; }
.g-pin-dots { margin: var(--sp-2) 0 var(--sp-4); }
.g-pinflow > .g-note { margin: 0 0 var(--sp-4) !important; }
.g-screen .g-actions + .g-card, .g-screen .g-note + .g-actions { margin-top: var(--sp-group); }
.g-b38-chips { margin-bottom: var(--sp-3); }
.g-b38-chips + .g-b38-chips { margin-top: 0; }
.screen[data-layout="v4"] .part.is-next { padding-left: 8px !important; } /* 오늘의 퀘스트: 지금 할 줄도 다른 줄과 같은 시작 x(금색 막대는 안쪽 3px) */
.g-screen :is(.g-lead, .g-today__kv, .g-tile, .g-lic, .g-report, .g-reach__list) { padding-inline: 0; }
.g-screen .nx-fold--guardian .nx-fold__head, .g-lic__more > summary, .g-screen .g-reach__subj > summary { padding-inline: 0; }
.g-screen .g-today__kv .g-link { padding-inline: 0; }
.g-screen .nx-fold__body > :is(.g-set, .g-list):first-child { border-top: 0; } /* 접힘 머리 아래 줄과 안쪽 목록 윗줄이 겹치던 것 */
.g-screen table :is(th, td):first-child { padding-left: 0; }
.g-screen table :is(th, td):last-child { padding-right: 0; }
.g-screen .g-note + .g-b38-chips { margin-top: var(--sp-4); }
.g-screen .g-b38-chips + .g-b38-chips { margin-top: var(--sp-4); }
.g-screen .g-b38-chips + .g-sec { margin-top: var(--sp-group); }
.g-screen > :is(.g-set, .g-list, .g-sec) + .g-note { margin-top: var(--sp-3); }
.g-screen .g-set__li--help { column-gap: var(--sp-2); padding-right: 0; } /* [?] 단추와 줄 사이 8, 오른쪽 끝은 다른 줄의 화살표·스위치와 같은 선 */
.td-page { padding-inline: 0; }
.td-head { gap: var(--sp-3); }
.td-pic { width: 120px; height: 120px; flex: none; } /* 친구 칸 120 고정(H163): 그림이 바뀌어도 칸은 그대로 */
.td-head { align-items: end; } /* 1단계 친구 그림은 칸 아래쪽에 서 있어 이름 줄을 그림 발끝에 맞춘다 */
.screen.learn .learn-top__friend .fr { width: 48px; height: 48px; } /* 친구 칸은 머리줄 48 안(설정 ui.learnFriend.sizePx 48, 64로 커서 아래로 삐져나오던 것) */
.g-screen :is(ul, ol) + .ui-btn--text { margin-top: var(--sp-2); }
 /* 이야기 아이 장면을 뺀 뒤(2026-11-14) 친구·집·등대 장면이 남는 자리를 채운다 */
/* 카드를 마친 화면의 내 친구(사람 그림 대신, 2026-11-14) */
.card-end-friend { display: grid; place-items: center; margin-top: var(--sp-5); }
.card-end-friend__pic { display: block; width: 160px; height: 160px; }

/* ㉘ 오류10(2026-11-14, 전문가 패널 3절) */
/* 1번: 꼴만 다른 분수 정답 뒤 "대분수로 바꿔 볼까요?" 한 칸. 답판은 칸 안에 그대로 놓는다(아래 고정 아님) */
.learn-nudge { display: grid; gap: var(--sp-2); padding: var(--sp-4); border: 1px dashed var(--line-strong); border-radius: var(--r-m); }
.learn-nudge__ask { margin: 0; }
.learn-nudge .learn-input.has-pad { position: static; margin: 0; padding: 0; background: none; }
.learn-nudge .learn-side { display: flex; justify-content: flex-end; }
.learn-nudge__right { display: inline-flex; vertical-align: middle; }
/* 7번: 1~2학년 보호자 설정의 언어 줄 대신 안내 한 줄(줄 목록 한 줄 높이 48, 왼쪽 선 16 그대로) */
.g-set > .g-set__li--note { display: flex; align-items: center; min-height: 48px; }
.g-set__note { margin: 0; }

/* ㉙ 보상·성장 묶음(2026-11-14, 결정 H158·H162·H163) */
/* H158 모험 맨 위 '우리 동네' 띠: 높이 72(글 16 + 집 48 + 위아래 4). 집은 최대 7채라 한 줄에 48 폭씩 들어간다(가로 스크롤 없음) */
.town { box-sizing: border-box; height: 72px; margin: 0 0 var(--sp-5); padding: 4px 2px; display: grid; grid-template-rows: 16px 48px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-m); background: linear-gradient(180deg, var(--panel) 0%, #0F1B4A 100%); }
.town__head { display: flex; align-items: baseline; justify-content: space-between; padding-inline: var(--sp-3); font-size: 13px; line-height: 16px; }
.town__title { font-weight: 700; }
.town__n { color: var(--mute); font-variant-numeric: tabular-nums; }
.town__row { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; justify-content: space-between; gap: 0; }
.town__li { flex: 0 1 48px; min-width: 0; display: flex; }
.town__house { position: relative; flex: 1 1 auto; min-width: 0; height: 48px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; }
.town__house[data-locked="true"] { cursor: default; opacity: .55; }
.town__house[data-lit="false"]:not([data-locked="true"]) { opacity: .8; }
.town__house:focus-visible { outline: 2px solid var(--lamp); outline-offset: -2px; border-radius: var(--r-s); }
.town__hz { position: absolute; inset: 0; }
.town__halo { position: absolute; inset: -4px; border-radius: 50%; opacity: 0; pointer-events: none; background: radial-gradient(circle, rgba(255, 196, 90, .85) 0%, rgba(255, 196, 90, 0) 68%); }
/* H162 상자 연 화면: 전체 화면 덮개. 위 [뒤로]·[가방] 48, 가운데 열린 상자와 빛, 아래 카드 한 장 + [좋아요]. 글 두 문장(제목 + 카드 한 줄), 움직임은 불투명도·위치만 */
.box-reveal { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); padding: 0 var(--sp-4) var(--sp-4); overflow-y: auto;
  background: radial-gradient(120% 60% at 50% 22%, #2A3F8C 0%, transparent 60%), linear-gradient(180deg, var(--sky0) 0%, #1F2F6E 100%); color: var(--ink); }
.rv-top { align-self: stretch; display: flex; justify-content: space-between; padding-top: var(--sp-4); }
.rv-top__btn { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--line-strong); border-radius: var(--r-m); background: var(--panel); color: var(--ink); cursor: pointer; }
.rv-top__btn .ui-icon { width: 24px; height: 24px; }
.rv-chest { position: relative; width: 200px; height: 200px; margin-top: var(--sp-2); display: grid; place-items: center; }
.rv-chest__glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, .55) 0%, rgba(255, 196, 90, 0) 68%); }
.rv-chest .bt-chest__img { position: relative; width: 180px; height: 180px; }
.rv-title { margin: 0; font-size: 20px; line-height: 1.45; text-align: center; }
.rv-card { width: min(100%, 280px); box-sizing: border-box; display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4); border: 1.5px solid var(--line-strong); border-radius: var(--r-l); background: var(--panel); text-align: center; }
.rv-item__mark { width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid var(--lamp); border-radius: 50%; background: var(--panel2); color: var(--lamp); }
.rv-item__mark .ui-icon { width: 36px; height: 36px; }
.rv-item__img { width: 56px; height: 56px; }
.rv-card--multi { width: min(100%, 340px); grid-template-columns: repeat(var(--rv-n, 2), minmax(0, 1fr)); align-items: start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-3); }
.rv-part { display: grid; justify-items: center; align-content: start; gap: var(--sp-2); min-width: 0; }
.rv-card--multi .rv-card__name { font-size: 17px; overflow-wrap: anywhere; }
.rv-card--multi .rv-card__note { font-size: 14px; }
.rv-item__egg { display: block; width: 64px; height: 72px; }
.rv-item__egg svg { display: block; width: 100%; height: 100%; }
.rv-card__name { font-size: 20px; line-height: 1.3; }
.rv-card__note { color: var(--mute); font-size: 15px; line-height: 1.45; }
.rv-bar { margin-top: auto; align-self: stretch; display: flex; justify-content: center; }
.rv-ok { min-width: 200px; min-height: 48px; }
.tt-kept { margin-top: var(--sp-5); display: grid; gap: var(--sp-2); }
.tt-kept__row { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; }
.tt-kept__row .bt-chest__img { width: 48px; height: 48px; flex: none; }
.tt-kept__name { flex: 1 1 auto; min-width: 0; font-size: 15px; }
.tt-kept__row .ui-btn { flex: none; min-height: 48px; }
@media (min-width: 700px) { .box-reveal { justify-content: flex-start; } .rv-bar { margin-top: var(--sp-4); } }

/* ㉚ 성장 일기 다음 모습(H163, 2026-11-14): 검은 실루엣 + 자라는 때 한 줄. 칸 크기 고정, 가로 넘침 없음 */
.td-pic .fr { width: 100%; height: 100%; }
.td-next { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); min-height: 56px; min-width: 0; }
.td-sil { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; }
.td-sil .char-pic, .td-sil .char-pic__pic, .td-sil .char-pic__img { display: block; width: 100%; height: 100%; }
.td-sil__pic .char-pic__img { filter: none; }
.td-sil__pic { filter: brightness(0); opacity: .9; transform: scale(var(--sil-grow, 1)); transform-origin: 50% 90%; }
.td-next__line { font-size: 15px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
/* 자란 날 오늘 화면(H163): 새 모습에 빛 0.6초 + '○○가 자랐어요!' 한 번 */
.grew { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-2, 12px); background: var(--panel); border: 1px solid var(--line); }
.grew__txt { font-family: var(--f-head); font-size: 20px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.grew__fig { position: relative; flex: none; width: 72px; height: 72px; }
.grew__fig .char-pic { width: 100%; height: 100%; }
.grew__halo { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, color-mix(in srgb, var(--lamp) 55%, transparent), transparent 70%); }

/* ㉕ 과목 무대 띠(H159): 오늘·모험·보물·끝내기 맨 위. 테마 그림은 밤 톤으로 눌러 두고(전투 무대와 같은 규칙) 친구는 늘 왼쪽 아래 */
.sband { position: relative; flex: none; height: var(--sb-h, 156px); border-radius: 22px; overflow: hidden; border: 1px solid var(--v4-edge, var(--line)); background: linear-gradient(180deg, var(--bg), var(--panel)); }
.sband__bg { position: absolute; inset: 0; pointer-events: none; background: center 72% / cover no-repeat; filter: brightness(.5) saturate(.8); }
.sband__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 17, 40, .5), rgba(10, 17, 40, .08) 58%, rgba(10, 17, 40, .6)); }
.sband__bg[data-theme="language"][data-art="on"] { background-image: url("../assets/stage/theme-language.webp"); }
.sband__bg[data-theme="math"][data-art="on"] { background-image: url("../assets/stage/theme-math.webp"); }
.sband__bg[data-theme="science"][data-art="on"] { background-image: url("../assets/stage/theme-science.webp"); }
.sband__bg[data-theme="world"][data-art="on"] { background-image: url("../assets/stage/theme-world.webp"); }
.sband__friend { position: absolute; z-index: 2; left: 8px; bottom: 2px; width: calc(var(--sb-h, 156px) * .86); height: calc(var(--sb-h, 156px) * .86); }
.sband__friend .fr, .sband__friend .char-pic { width: 100% !important; height: 100% !important; }
.sband__say { position: absolute; z-index: 3; left: calc(var(--sb-h, 156px) * .86 + 4px); right: calc(var(--sb-h, 156px) * .52 + 16px); top: 50%; transform: translateY(-50%); margin: 0; padding: 8px 12px; font-size: 17px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.sband__right { position: absolute; z-index: 1; right: 12px; bottom: 8px; width: calc(var(--sb-h, 156px) * .52); height: calc(var(--sb-h, 156px) * .52); }
.sband__right .char-pic, .sband__right .char-pic__pic, .sband__right .char-pic__img { display: block; width: 100%; height: 100%; }
.sband__right[data-silhouette] .char-pic__img { filter: brightness(0) drop-shadow(0 0 6px rgba(169, 181, 227, .55)); opacity: .92; }
/* 오늘 첫 장면(H159): 섬 바탕 그림 대신 테마 그림. 가로등·등대·친구·말풍선은 그대로 위에 선다 */
.scene-hero[data-stage="band"] > .sband__bg { z-index: 0; }
.scene-hero[data-stage="band"] .path-stage { position: relative; z-index: 1; }
.scene-hero[data-stage="band"] .path-bg { display: none; }
/* 하루를 다 한 오늘 화면: '더 하고 싶어요' 칸(H164). 점선 테두리 상자 안에 제목 · 안내 · 단추 */
.day-more { margin-top: var(--sp-3, 24px); padding: 16px; border: 2px dashed color-mix(in srgb, var(--lamp) 55%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--lamp) 5%, var(--v4-card, var(--panel))); }
.day-more__t { margin: 0; font-size: 19px; line-height: 1.3; }
.day-more__s { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--mute); }
.day-more__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.day-more__btns .ui-btn { flex: 1 1 140px; min-height: 52px; }

/* ㉖ 하루 끝 화면(H157): 제목 · 무대 띠(내일 예고) · 오늘 켠 불 · 돌아보기 세 단추 · 아래 줄 [내일 봐요] + [상자 열기] */
.screen.closing[data-v="h157"] { display: flex; flex-direction: column; gap: var(--sp-3, 24px); min-height: 100dvh; padding-top: calc(var(--sp-2, 8px) + var(--sat)); text-align: left; }
.screen.closing[data-v="h157"] .closing-title { margin: 0; font-size: 24px; line-height: 1.3; }
.screen.closing[data-v="h157"] .sband { margin-top: 0; }
.cl-card { padding: 16px; border: 1px solid var(--v4-edge, var(--line)); border-radius: 22px; background: var(--v4-card, var(--panel)); }
.cl-card__t { margin: 0; font-size: 19px; line-height: 1.35; }
.cl-lamps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.cl-lamp { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.cl-lamp__fig { position: relative; display: block; width: 64px; height: 120px; }
.cl-lamp__fig img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); }
.cl-lamp__on { z-index: 1; }
.cl-lamp__glow { position: absolute; left: 50%; top: -4px; width: 124px; height: 124px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 90, .5), rgba(255, 196, 90, 0) 62%); pointer-events: none; }
.cl-lamp__sub { margin-top: 6px; font-size: 15px; line-height: 1.35; }
.cl-lamp__unit { font-size: 13px; line-height: 1.4; color: var(--mute); overflow-wrap: anywhere; }
/* 친구에게 알려 주기(H191, ui/friend/teach-card.js): 오늘 맞힌 문제 한 줄 + 까닭 두 줄 단추(세로로, 왼쪽 맞춤) + [잘 모르겠어요] 글 단추 */
.cl-teach__ask { margin: 8px 0 0; font-size: 15px; line-height: 1.45; }
.cl-teach__ask b { color: var(--ink); background: color-mix(in srgb, var(--lamp) 22%, transparent); border-radius: 8px; padding: 1px 6px; }
.cl-teach__q { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--panel2, var(--panel)); }
.cl-teach__q .learn-text { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.cl-teach__q .cl-teach__sum { margin-top: 6px; font-weight: 700; }
.cl-teach__opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cl-teach__opt { justify-content: flex-start; min-height: 52px; padding: 10px 14px; text-align: left; font-size: 15px; line-height: 1.45; white-space: normal; }
.cl-teach__opt .ui-btn__label { overflow-wrap: anywhere; }
.cl-teach__opt.is-wrong { opacity: .45; text-decoration: line-through; text-decoration-color: var(--mute); }
.cl-teach .cl-teach__opt.is-right, .cl-teach .cl-teach__opt.is-right[aria-disabled="true"] { border: 4px solid transparent; box-shadow: inset 0 0 0 2px var(--lamp); background: color-mix(in srgb, var(--lamp) 26%, var(--panel2, var(--panel))); color: var(--ink); opacity: 1; }
.cl-teach:not([data-state="ask"]) .cl-teach__opt:not(.is-right) { opacity: .45; }
.cl-teach__skip { align-self: flex-start; min-height: 44px; font-size: 15px; }
.cl-teach__msg { margin: 10px 0 0; min-height: 1.45em; font-size: 15px; line-height: 1.45; font-weight: 700; }
.cl-teach__msg:empty { display: none; }
.cl-reflect { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cl-reflect .ui-btn { flex: 1 1 0; min-width: 96px; min-height: 52px; padding-inline: 8px; font-size: 15px; }
.cl-reflect .ui-btn[data-answer="can"] { flex-grow: 1.5; }
.cl-reflect .ui-btn[aria-pressed="true"] { border-color: var(--lamp); background: color-mix(in srgb, var(--lamp) 18%, var(--panel2, var(--panel))); color: var(--ink); }
.screen.closing[data-v="h157"] .closing-bar { position: sticky; bottom: 0; margin: auto calc(-1 * var(--gutter)) 0; display: flex; align-items: stretch; justify-content: space-between; gap: 8px; padding: 16px var(--gutter) calc(16px + var(--sab)); }
.screen.closing[data-v="h157"] .closing-bar > .ui-btn { flex: 0 0 auto; min-width: 128px; min-height: 56px; }
.screen.closing[data-v="h157"] .closing-bar__main { flex: 1 1 0; min-width: 0; }
.screen.closing[data-v="h157"] .closing-bar__main .closing-chest { width: 100%; }
.screen.closing[data-v="h157"] .closing-bar__main .closing-chest .ui-btn { width: 100%; min-width: 0; min-height: 56px; }
.screen.closing[data-v="h157"] .closing-bar__main .closing-chest .ui-btn--sub { border: 0; color: var(--lamp-ink); background: linear-gradient(180deg, #ffd27a, #f6b34f); font-weight: 700; }
.screen.closing[data-v="h157"] .closing-bar__main .closing-chest .bt-chest { width: 100%; min-height: 56px; }

/* ㉗ 결과 화면 '집에서 해 봐요' 한 줄(H172): 점선 상자, 위에 작은 금색 이름표 + 아래 활동 이름 */
.bt-home { width: 100%; box-sizing: border-box; align-self: stretch; display: flex; flex-direction: column; gap: 4px; margin-top: var(--sp-3, 24px); padding: 16px; border: 2px dashed color-mix(in srgb, var(--lamp) 45%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--lamp) 4%, var(--panel)); text-align: left; }
.bt-home__k { font-size: 15px; line-height: 1.4; color: var(--lamp); font-weight: 700; }
.bt-home__v { font-size: 19px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }

/* ㉘ 보물 조끼 그림(팩 화풍, 96px) */
.tv-vest { display: grid; place-items: center; margin: 0 0 8px; }
.tv-vest img { width: 96px; height: 96px; object-fit: contain; }
.screen.closing[data-v="h157"] [data-role="closing-lamps"] { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.screen.closing[data-v="h157"] .cl-lamps { align-content: center; }

/* 보호자 요약 맨 위 한 줄 판정·카드 한 문장(2026-11-15 보호자 2·3번). 글자는 12·13·14·15·20만 */
.g-verdict { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 8px 4px 4px; min-height: 48px; }
.g-verdict b { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--text); }
.g-verdict__sub { font-size: 14px; color: var(--text-mute); }
.g-verdict__mark { display: inline-flex; width: 24px; height: 24px; color: var(--text); }
.g-verdict__mark svg { width: 24px; height: 24px; }
.g-verdict[data-kind="rest"] b, .g-verdict[data-kind="saturday"] b { color: var(--text); }
.g-unit__why { color: var(--text); font-size: 14px; }
.g-row__main span.g-unit__why { color: var(--text); font-size: 14px; }
.g-row__main span.g-unit__ask { font-size: 13px; }
.g-unit__nums { margin: 0 0 8px 4px; }
.g-unit__nums summary { min-height: 48px; font-size: 13px; font-weight: 600; color: var(--text-mute); }
.g-unit__nums ul { margin: 0 0 4px; padding-left: 20px; font-size: 13px; color: var(--text-mute); }
.g-one dd { text-align: left; }

/* ㉗ 부모 약속(H181) 아이 화면: 오늘 '다음 약속' 한 줄(기존 .part 줄보다 낮고 조용하게) · 바닥 시트 보기 · 깜짝 선물 카드(.grew 모양) · 끝내기 카드(.cl-card 모양) */
.promise-box { margin-top: var(--gap-choice); }
.promise-box.alone { margin: 0; }
.screen[data-screen="today"] > .promise-box.alone { grid-area: quest; align-self: start; }
.part.promise-row { min-height: 48px; padding: 8px 14px; background: transparent; border-color: var(--line); cursor: default; }
button.part.promise-row { cursor: pointer; }
.part.promise-row .label b { font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.part.promise-row .label span { font-size: 13px; line-height: 1.4; }
.promise-dots { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 48%; }
.promise-dots .ui-dot { width: 10px; height: 10px; border-width: 2px; }
.promise-pick { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.promise-pick .ui-btn { min-height: 52px; font-size: 15px; text-align: left; justify-content: flex-start; white-space: normal; }
.promise-sheet__note { margin: 8px 0 0; font-size: 13px; color: var(--mute); }
.promise-gift { justify-content: space-between; margin-top: var(--gap-choice); }
.promise-gift__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.promise-gift__txt b { font-size: 15px; line-height: 1.35; }
.promise-gift__txt span { font-size: 15px; line-height: 1.4; color: var(--mute); }
.promise-gift .ui-btn { flex: none; min-height: 44px; font-size: 15px; }
.promise-card__sub { margin: 4px 0 0; font-size: 15px; line-height: 1.4; color: var(--mute); }
.promise-card__body { margin-top: 12px; }
.promise-card__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.promise-card__btns .ui-btn { flex: 1 1 140px; min-height: 52px; font-size: 15px; }
.promise-card__line { margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }

/* ── 장면 속 내 친구의 단계 그림(2026-11-25, ui/friend/scene-pic.js): 알 · 아기 · 고치일 때는 리액션 컷(다 자란 모습) 대신 오늘 화면과 같은 단계 그림을 같은 칸에 놓는다.
   칸 크기는 자리마다의 규칙(.st-friend__pic · .c1-band__pic · .bt-light__pic · .gw-friend__pic · .card-end-friend__pic · .ul-next__bandi)을 그대로 따르고, 리액션 움직임(data-motion)도 .rx-pic 그대로 붙는다 ── */
.rx-pic--stage { position: relative; background: none; }
.rx-pic--stage > .rx-stage__in { position: absolute; inset: 0; display: block; transform: scale(var(--rx-grow, 1)); transform-origin: 50% 90%; }
.rx-pic--stage > .rx-stage__in > * { display: block; width: 100%; height: 100%; }
.rx-pic--stage > .rx-stage__in > .char-pic { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: 100% !important; transform: none !important; }
.rx-pic--stage > .rx-stage__in > svg { overflow: visible; }

/* ㉚ 보호자 요약 · 진도 줄이기(2026-11-25, H189 A '할 일 먼저, 나머지 접기'): '같이 볼 곳' · '다시 다지는 곳' 한 목록, 접는 묶음(자세히 · 날짜별 시간), 도달표 '상태 뜻' 단추 */
.g-screen .g-sec__head .g-reach__legend-btn { display: inline-flex; align-items: center; margin: 0; min-height: 44px; min-width: 44px; padding: 0 2px; font-size: 13px; color: var(--lamp); }
.g-reach__legend { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.g-more-fold { margin-top: 20px; border-top: 1px solid var(--border); }
.g-more-fold > summary { justify-content: space-between; gap: 8px; list-style: none; }
.g-more-fold > summary::-webkit-details-marker { display: none; }
.g-more-fold > summary small { margin-left: auto; color: var(--text-mute); font-size: 13px; font-weight: 400; }
.g-more-fold > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute); transform: rotate(45deg) translateY(-2px); }
.g-more-fold[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.g-more-fold > .g-sec, .g-more-fold > .g-card { margin-top: 16px; }
.g-redo { align-items: flex-start; }
.g-row__main span.g-redo__why { color: var(--text); font-size: 14px; }
.g-redo__subj { align-self: flex-start; color: var(--text-mute); font-size: 13px; white-space: nowrap; }
[data-part="week-one"] + .g-mute { margin-top: 4px; font-size: 13px; }
.g-more-fold > summary { font-size: 15px; }
