/* a-learn — 2026-11-30 학습 화면 개선(상영관 컨셉을 안쪽까지). 이 파일만 담당 하위 작업이 고친다.
   미리 공부(learn) · 따라 말하기(shadow) · 시작 전 1분(warm).
   왼쪽(휴대폰은 위) = 먹색 틀 장면 + 자막 띠, 오른쪽(휴대폰은 아래) = 주 동작 하나(불빛 동그라미)와 조용한 단추 줄.
   공통 부품(.btn-hero .hero-act .quietbar .scene-frame .subtitle .stage)은 a-shared.css. 여기는 이 화면들의 배치와 변형만. */

/* ---------- 화면 틀: 장면 | 조작 ---------- */
.lview { display: grid; gap: 22px; }
.lscreen { min-width: 0; }
.lscreen .scene-frame > img { aspect-ratio: 16 / 10; object-position: 50% 38%; }

/* 자막 띠 안의 문장: 이 화면의 주인공이라 공통 자막보다 크게 */
.lscreen .subtitle { padding: 20px 24px 24px; }
.lscreen .subtitle .sent { margin: 0; font-size: clamp(1.75rem, 2.9vw, 2.6rem); font-weight: 500; line-height: 1.18; letter-spacing: -.015em; }
.lscreen .subtitle .mean { margin: 10px 0 0; font-size: 16px; line-height: 1.5; }
.subtitle .sent .w, .wsub .answer .w { --rest: var(--on-stage); --fill: var(--lamp); }

/* 발음 도움말: 자막 아래 작게 */
.lscreen .tip { margin: 14px 8px 0; padding: 0; border-radius: 0; background: none; font-size: 16px; line-height: 1.6; color: var(--ink-2); text-align: center; }
.lscreen .tip b { margin-right: 8px; font-size: 14px; color: var(--lamp-deep); }

/* ---------- 조작: 듣기(주인공) → 말해 보기(둘째) → 조용한 줄 ---------- */
.lctl { display: flex; flex-direction: column; align-items: center; gap: 20px; min-width: 0; }
.hero-row { display: flex; align-items: flex-start; justify-content: center; gap: 22px; }
.lctl .btn-hero { width: 88px; height: 88px; }
.lctl .btn-hero .i { width: 34px; height: 34px; }
.hero-row .seg { margin-top: 19px; } /* 동그라미 가운데 높이에 맞춤 (88 - 50) / 2 */
.lctl .seg button { padding: 0 15px; font-size: 16px; }
/* 미리 공부: 듣기 동그라미 옆에 속도와 말해 보기를 세로로 — 말해 보기는 둘째(작고 옅은 테두리) */
.hero-row .side { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.hero-row .side .seg { margin-top: 0; }
.hero-row .side .seg button { flex: 1; white-space: nowrap; }

.btn.say-btn { min-height: 46px; min-width: 9.6em; justify-content: center; padding: 0 18px 0 14px;   /* '다시 말해 보기'로 길어져도 옆 단추가 밀리지 않게 폭을 미리 잡는다 */ gap: 8px; border-color: var(--rule-2); background: transparent; color: var(--ink-2); font-size: 16px; }
.btn.say-btn:hover { border-color: var(--ink-3); color: var(--ink-1); }
.btn.say-btn .i { width: 18px; height: 18px; color: var(--lamp-deep); }
.btn.say-btn.on { border-color: var(--rec); background: var(--rec); color: #fff; }
.btn.say-btn.on .i { color: #fff; }

/* 안내 문장: 두 줄 자리를 미리 잡아 단추가 움직이지 않게, 문장 사이에서만 줄을 바꿈 */
.lctl .hint { min-height: 2.9em; max-width: 32ch; line-height: 1.45; text-align: center; word-break: keep-all; }
.lctl .hint span { display: inline-block; }
.lctl .quietbar { align-self: stretch; padding-top: 12px; border-top: 1px solid var(--rule); }
.quietbar > .btn { min-height: 44px; padding: 0 12px; gap: 6px; border: 0; background: transparent; color: var(--ink-2); font-size: 16px; }
.quietbar > .btn .i { width: 18px; height: 18px; }
.quietbar > .btn.pin[aria-pressed="true"] { color: var(--lamp-deep); }
.quietbar > .btn .i.to { width: 14px; height: 14px; margin: 0 -1px; opacity: .65; }

/* ---------- 따라 말하기: 지금 상태를 불빛으로 ---------- */
.sview .scene-frame > img { transition: filter var(--motion-t) var(--motion-e); }
.sview .lscreen[data-st="say"] .scene-frame > img { filter: brightness(.5) saturate(.75); }
.sview .ring { display: flex; width: max-content; max-width: 100%; margin: -2px auto 14px; min-height: 44px; padding: 0 20px 0 16px; gap: 10px; border-radius: 999px;
  background: var(--night-3); color: var(--on-stage); font-size: 16px; font-weight: 500; white-space: nowrap; transition: background-color var(--motion-t) var(--motion-e), color var(--motion-t) var(--motion-e); }
.sview .ring .i { width: 20px; height: 20px; color: var(--on-stage-sub); }
.sview .ring.say { background: var(--lamp); color: var(--lamp-ink); }
.sview .ring.say .i { color: var(--lamp-ink); }
.sview .lscreen[data-st="say"] .subtitle .mean { color: var(--on-stage); }

.cue { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cue li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--ink-2); transition: color var(--motion-t) var(--motion-e); }
.cue li b { font-weight: 500; color: var(--ink-1); }
.cue .i { width: 36px; height: 36px; padding: 8px; border-radius: 50%; }
.cue .c-listen .i { background: var(--night-2); color: var(--on-night); }
.cue .c-say .i { background: var(--lamp); color: var(--lamp-ink); }
.sview:has([data-st="listen"]) .c-say, .sview:has([data-st="say"]) .c-listen { color: var(--ink-3); }
.sview:has([data-st="listen"]) .c-say b, .sview:has([data-st="say"]) .c-listen b { color: var(--ink-3); }
/* 재생 중 주 단추는 공통 규칙(.btn-hero.on = 더 밝은 불빛)을 그대로 쓴다 */
.sview .dots { justify-content: center; margin: 0; }
.sview .dots i.on { background: var(--lamp); }

/* ---------- 시작 전 1분: 먹색 무대 위 자막으로 묻기 ---------- */
.area-warm { max-width: 780px; }
.wq { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 22px 24px 26px; }
.wsub { align-self: stretch; padding: 30px 12px 6px; background: transparent; }
.wsub .ko-prompt { margin: 0; font-family: var(--font-serif); font-size: clamp(1.35rem, 2.6vw, 1.95rem); line-height: 1.5; color: var(--on-stage); }
.wsub .answer { margin: 20px 0 0; min-height: 1.3em; font-family: var(--font-en); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 500; line-height: 1.2; letter-spacing: -.015em; color: var(--on-stage); }
.wsub .answer.hidden { width: 60%; margin-inline: auto; color: transparent;
  background: repeating-linear-gradient(90deg, rgba(238, 228, 215, .32) 0 14px, transparent 14px 22px) left bottom / 100% 2px no-repeat; }
.wsub .answer.hidden .w { visibility: hidden; }
.wsub .done-k { margin: 0 0 10px; font-size: 14px; font-weight: 500; letter-spacing: .03em; color: var(--lamp); }
.wact { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wact .hero-row { align-items: flex-start; }
.btn.w2 { min-height: 52px; margin-top: 12px; padding: 0 24px 0 20px; border-color: rgba(238, 228, 215, .26); background: transparent; color: var(--on-stage); }
.btn.w2:hover { border-color: var(--on-stage-sub); }
.wq .quietbar:empty { display: none; }
.wq .hint { min-height: 1.4em; text-align: center; color: var(--on-stage-sub); }
.wq .hint:empty { display: none; }
.wq :focus-visible { outline-color: var(--lamp); }

/* ---------- PC ---------- */
@media (min-width: 860px) {
  .lview { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 48px; align-items: center; }
  .lscreen .scene-frame > img { aspect-ratio: 3 / 2; }
  .lctl { padding: 8px 0; }
  .lctl .quietbar { gap: 0; }
  .lctl .quietbar > .btn { padding: 0 9px; }
  .sview .lctl { gap: 26px; }
}
/* 키 작은 PC 창: 장면을 조금 납작하게 해서 다음 단추까지 한 화면에 */
@media (min-width: 860px) and (max-height: 820px) {
  .lscreen .scene-frame > img { aspect-ratio: 16 / 9; object-position: 50% 30%; }
}

/* ---------- 휴대폰 ---------- */
@media (max-width: 859px) {
  .lview { gap: 14px; }
  .lctl { gap: 10px; }
  .sview .lctl { gap: 14px; }
  .cue { order: 3; }
  .sview .dots { order: 2; }
  /* 한 화면에 '다음'까지: 장면 높이를 화면 키에 맞춰 줄인다 */
  .area-learn .lscreen .scene-frame > img { aspect-ratio: auto; height: clamp(130px, calc(100svh - 605px), 240px); }
  .area-shadow .lscreen .scene-frame > img { aspect-ratio: auto; height: clamp(130px, calc(100svh - 562px), 240px); }
  .lscreen .tip { margin-top: 10px; line-height: 1.5; }
  .lctl .quietbar { padding-top: 4px; }
  .area-learn .pager, .area-shadow .pager { margin-top: 12px; }
  /* 따라 말하기 안내 두 줄을 나란히 */
  .cue { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cue li { gap: 8px; line-height: 1.35; word-break: keep-all; }
  .cue .i { width: 30px; height: 30px; padding: 6px; flex: none; }
}
@media (max-width: 560px) {
  .lscreen .subtitle { padding: 16px 16px 18px; }
  .lscreen .subtitle .sent { font-size: 1.6rem; }
  .lscreen .subtitle .mean { margin-top: 6px; }
  .lctl .btn-hero { width: 76px; height: 76px; }
  .lctl .btn-hero .i { width: 30px; height: 30px; }
  .hero-row { gap: 18px; }
  .hero-row .seg { margin-top: 13px; }
  .hero-row .side .seg { margin-top: 0; }
  .lctl .hero-act { gap: 8px; }
  .sview .ring { margin-bottom: 10px; min-height: 44px; padding: 0 16px 0 12px; white-space: normal; }
  .wq { padding: 14px 16px 20px; border-radius: 16px; }
  .wsub { padding-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sview .scene-frame > img, .sview .ring, .cue li { transition: none; }
}

/* 320px 폭 휴대폰: 핵심 표현(#/d/N/key)의 시작 단추가 첫 화면 안에 들도록 장면 높이 · 자막 여백을 줄이고,
   불빛 안내(동그라미 안 '들어요 / 말하세요'와 같은 말)와 발음 도움말은 접는다. 다른 폭은 그대로 (2026-12-01) */
@media (max-width: 359px) {
  .area.area-key .where { margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
  .kview { gap: 10px; }
  .kview .k-screen > video { aspect-ratio: auto; height: 116px; }
  .kview .lscreen .subtitle { padding: 10px 12px 12px; }
  .kview .lscreen .subtitle .sent { font-size: 1.35rem; }
  .kview .sview .ring, .kview .ring { margin-bottom: 6px; min-height: 38px; }
  .kview .lctl .cue, .kview .lscreen .tip { display: none; }
}

/* ---------- 발음 점수 줄 (2026-12-01, Azure 발음 평가) ----------
   줄 모양은 a-script.css 의 .agp(공용)를 그대로 쓰고, 여기는 놓는 자리만.
   표현 더 익히기: 안내 문장 바로 아래, 조작 칸 폭 그대로. */
.lctl > .agp { align-self: stretch; margin: -8px 0 0; }
/* 장면 다시 보기(마무리 날, a-recap.js): 대본 카드의 그 줄 말풍선 아래 — 얼굴(44px) + 간격(12px)만큼 들여서 말풍선과 줄을 맞춘다.
   (a-recap.css 는 다른 담당이라 놓는 자리만 여기 둔다) */
.rc-row:has(> .agp:not(:empty)) { flex-wrap: wrap; }
.rc-row > .agp { flex: 0 0 100%; --agp-in: 56px; margin: 4px 0 8px; }
.rc-row.right > .agp { --agp-in: 0px; --agp-in-r: 56px; }
.rc-row.right > .agp .agp-bar { justify-content: flex-end; }
.rc-row.right > .agp .agp-acts { margin-left: 0; }
@media (max-width: 560px) {
  .rc-row > .agp, .rc-row.right > .agp { --agp-in: 0px; --agp-in-r: 0px; }
}
