/* 카톡 영어 학습지. 앱 너비와 하단 탭은 공통 shell.css에서 정한다. */
@font-face { font-family: "Paperlogy"; font-weight: 400; font-display: swap; src: url("fonts/paperlogy-400.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 700; font-display: swap; src: url("fonts/paperlogy-700.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 800; font-display: swap; src: url("fonts/paperlogy-800.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: var(--paper-white);
  --paper-deep: var(--paper-pale);
  --paper-hi: var(--paper-white);
  --ink: var(--paper-ink);
  --soft: var(--paper-muted);
  --rule: var(--paper-line);
  --edge: #73776e;
  --action: var(--paper-ink);
  --learn: var(--paper-accent);
  --mark: var(--paper-pale);
  --ok: #1e6b44;
  --ok-bg: #e6f2ea;
  --bad: #a32d1c;
  --bad-bg: #fbeae5;
  --kakao: #fee500;
  --chat: var(--paper-pale);
  --focus: #1d5fd1;
  --sans: "Paperlogy", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --serif: Arial, var(--sans);
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-padding: calc(var(--top) + 16px) 0 calc(var(--tabs) + 90px); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { min-width: 0; padding: 0; border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* 길게 읽는 글은 라벨처럼 나누지 않는다(공용 paper-label) */
:is(.talk-part, .express, details) > p:not(.hint), .line-body > .hint { text-wrap: pretty; }
h1:focus, h2:focus, main:focus { outline: none; }
h1 { font-size: clamp(27px, 5vw, 36px); line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.01em; }
h3 { font-size: 18px; }
h4 { font-size: 17px; font-weight: 400; }
.ic { flex: none; width: 20px; height: 20px; object-fit: contain; }



/* 공용 */
.page { max-width: 640px; margin: 0 auto; padding: 24px var(--gutter) calc(var(--tabs) + 48px + env(safe-area-inset-bottom)); }
.page > * + * { margin-top: 16px; }
.page > section, .page > fieldset { margin-top: 40px; }
.page > section > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.center { justify-content: center; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); font-weight: 700; text-align: center; text-decoration: none; transition: background-color .16s, border-color .16s, transform .12s var(--ease); }
.btn:hover:not(:disabled) { border-color: var(--edge); }
.btn:active:not(:disabled), .choice:active:not(:disabled), .chip:is(button):active { transform: scale(.98); }
.btn.primary { border-color: transparent; background: var(--paper-lime); color: var(--paper-ink); }
.btn.primary:hover:not(:disabled) { background: var(--paper-lime-hover); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.wide { width: 100%; min-height: 54px; font-size: 17px; }
.btn.kakao { border-color: var(--kakao); background: var(--kakao); color: #191919; }
.btn:disabled { opacity: .5; }
.link { min-height: 44px; padding: 0 4px; color: var(--soft); font-size: 14px; text-decoration: underline; text-underline-offset: .2em; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; color: var(--soft); font-size: 15px; text-decoration: none; }
.kicker { color: var(--learn); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.lead { font-size: 17px; color: var(--soft); }
.hint { color: var(--soft); font-size: 15px; }
.hint.error, .error { color: var(--bad); }
.note { padding: 12px 16px; border-radius: 12px; background: var(--paper-deep); font-size: 15px; }
.card { padding: clamp(16px, 3vw, 24px); border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-hi); }
.big { font-size: 20px; font-weight: 700; line-height: 1.45; }
.en { font-family: var(--serif); font-size: 19px; line-height: 1.5; word-break: normal; }
.en.big { font-size: 23px; font-weight: 400; }
.ko { color: var(--soft); }
mark { border-radius: 3px; background: var(--mark); color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
li.chip { flex-wrap: wrap; gap: 0 6px; border-radius: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); font-size: 15px; }
button.chip { min-height: 44px; }
button.chip:hover { border-color: var(--edge); }
button.chip.busy, .btn.busy { opacity: .5; }
.loading { padding: 64px var(--gutter); color: var(--soft); text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); z-index: 20; translate: -50% 0; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--action); color: #fff; font-size: 15px; }
progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; background: var(--paper-deep); appearance: none; }
progress::-webkit-progress-bar { background: var(--paper-deep); }
progress::-webkit-progress-value { background: var(--learn); }
progress::-moz-progress-bar { background: var(--learn); }
.meter p { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--soft); font-size: 15px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); }
.seg button { min-width: 52px; min-height: 42px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: var(--action); color: #fff; }
.sticky-cta { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); z-index: 5; margin-top: 24px; padding: 12px 0; background: linear-gradient(transparent, var(--paper) 14px); }
.list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.list > li > a { display: block; padding-block: 8px; text-decoration: none; }
.list > li > a:hover { text-decoration: underline; }
.card.list li:last-child { border: 0; padding-bottom: 0; }
.card.list li:first-child { padding-top: 0; }
label, legend { font-weight: 700; }
legend { padding: 0; font-size: 20px; letter-spacing: -.01em; }
textarea, select, input[type="text"], input[type="tel"] { display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--edge); border-radius: 14px; background: var(--paper-hi); }
textarea { resize: vertical; line-height: 1.5; }
.field select { margin-top: 8px; }

/* 톡 — 카카오톡 대화방 모양의 바닥과 말풍선 */
.katalk { margin-inline: calc(var(--gutter) * -1); padding: 16px clamp(12px, 3.5vw, 20px) 20px; background: var(--chat); }
.page > .katalk { margin-top: 16px; }
.page > .katalk:first-child { margin-top: 0; }
.katalk > * + * { margin-top: 14px; }
.katalk-date { text-align: center; }
.katalk-date span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgb(25 25 25 / 10%); font-size: 13px; }
.katalk-msg { display: flex; align-items: flex-start; gap: 8px; }
.katalk-body { flex: 1; min-width: 0; }
.katalk-body > * + * { margin-top: 8px; }
.katalk-name { font-size: 14px; line-height: 1.3; }
.talk { overflow: hidden; border-radius: 4px 18px 18px; background: #fff; }
.talk + .talk { border-radius: 18px; }
.talk-art { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; background: #f8f0e4; }
.talk-head { padding: 18px 18px 14px; }
.talk-head.plain { padding: 34px 18px 28px; background: var(--action); color: #fff; }
.talk-day { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: var(--learn); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plain .talk-day, .plain .talk-mean { color: #d8e3da; }
.talk-done { display: inline-flex; align-items: center; gap: 3px; }
.talk-done .ic { width: 15px; height: 15px; }
.talk-head h1, .talk-head h2 { font: 400 clamp(27px, 7.4vw, 34px)/1.2 var(--serif); letter-spacing: -.02em; word-break: normal; overflow-wrap: break-word; text-wrap: balance; }
.talk-mean { margin-top: 4px; color: var(--soft); font-size: 17px; }
.talk-part { margin-inline: 18px; padding-block: 14px; border-top: 1px solid #ece8e0; }
.talk-label { margin-bottom: 3px; color: var(--learn); font-size: 14px; font-weight: 700; }
.talk-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.talk-line > :first-child { flex: 1; min-width: 0; }
.talk .ko { font-size: 15px; }
.talk-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 4px 14px 14px; }
.talk-actions .btn { padding-inline: 8px; border-color: transparent; border-radius: 10px; background: #f1efea; }
.talk-actions .btn.primary { background: var(--paper-lime); color: var(--paper-ink); }

.talk-say { width: fit-content; max-width: 100%; padding: 12px 16px; }
.talk-say > * + * { margin-top: 10px; }

/* 목록 */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gos { border-top: 1px solid var(--rule); }
.go { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.go > .ic:first-child { width: 24px; height: 24px; }
.go > .ic:last-child { color: var(--edge); }
.go:hover .go-text b { text-decoration: underline; text-underline-offset: .2em; }
.go-text { flex: 1; min-width: 0; }
.go-text b, .go-text span { display: block; }
.go-text span { color: var(--soft); font-size: 15px; }

/* 코스 고르기 */
.start-head .lead { margin-top: 6px; }
.start-grid { display: grid; gap: 24px 32px; margin-top: 24px; }
.start-grid > * { min-width: 0; }
.period input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.period:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.period { position: relative; display: flex; flex-direction: column; align-items: center; padding: 13px 6px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper-hi); font-weight: 400; text-align: center; }
.period span { color: var(--soft); font-size: 14px; }
.period:has(:checked) { border-color: var(--action); background: var(--action); color: #fff; }
.period:has(:checked) span { color: #d9d4cb; }

/* 지난 레슨 */
.thumb { flex: none; width: 72px; height: 72px; border-radius: 14px; object-fit: cover; object-position: 50% 62%; background: #f8f0e4; }
.thumb.plain { display: grid; place-items: center; background: var(--action); color: #fff; font: 400 28px/1 var(--serif); }
.inbox { border-top: 1px solid var(--rule); }
.inbox a { display: flex; align-items: center; gap: 14px; padding-block: 12px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.inbox a:hover b { text-decoration: underline; text-underline-offset: .2em; }
.inbox-text { flex: 1; min-width: 0; }
.inbox-text > * { display: block; }
.inbox-text b { font: 400 20px/1.35 var(--serif); word-break: normal; }
.inbox-text .kicker { font-size: 13px; }
.inbox-text .ko { font-size: 15px; }
.inbox a > .ic { color: var(--edge); }
.inbox-done { color: var(--learn); }
.peek { display: block; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px dashed var(--edge); border-radius: 12px; color: var(--soft); text-align: left; transition: border-color .16s, background-color .16s; }
.peek:hover { border-style: solid; background: var(--paper); }
.line-body > [tabindex]:focus, .asks [tabindex]:focus { outline: none; }
.line-head { display: block; color: var(--learn); font: 700 15px/1.5 var(--sans); }
.asks { border-top: 1px solid var(--rule); }
.asks > li { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.asks > li > * + * { margin-top: 8px; }
.asks > li > p:first-child { font-weight: 700; }

/* 레슨 */
.lesson-head { margin-top: 0 !important; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 14px; background: var(--paper-deep); }
.steps button { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; min-height: 44px; padding: 0 2px; border-radius: 11px; color: var(--soft); font-size: 15px; }
.steps button[aria-current] { background: var(--paper-hi); color: var(--ink); font-weight: 700; }
.steps .passed { color: var(--learn); }
.steps .ic { width: 15px; height: 15px; }
.panel { margin-top: 28px !important; }
.panel > * + * { margin-top: 14px; }
.panel > h2 + .hint { margin-top: 4px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.lines > * + * { margin-top: 10px; }
.line { display: flex; align-items: flex-start; gap: 14px; padding: 12px; }
.line-play { display: flex; flex: none; align-items: center; justify-content: center; gap: 2px; width: 60px; min-height: 48px; border-radius: 12px; background: var(--paper-deep); font-variant-numeric: tabular-nums; }
.line-body { flex: 1; min-width: 0; align-self: center; }
.veil { color: var(--edge); letter-spacing: .06em; line-height: 1.4; }
.line-body > * + * { margin-top: 4px; }
.chip.word { flex-wrap: wrap; gap: 0 6px; margin-top: 8px; text-align: left; border-radius: 22px; }
.chip.word .ic { width: 16px; height: 16px; }
.is-playing { box-shadow: inset 0 0 0 2px var(--learn); color: var(--learn); }
.verdict { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; }
.verdict .ic { margin-top: 3px; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }

.sound { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper-deep); }
details + details { margin-top: 8px !important; }
summary { min-height: 48px; padding-block: 12px; font-weight: 700; cursor: pointer; }


/* 카카오톡 연결 */
.kakao-steps > li { display: flex; gap: 14px; padding-block: 14px; }
.kakao-steps > li + li { border-top: 1px solid var(--rule); }
.kakao-steps > li > div { flex: 1; min-width: 0; }
.step-n { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.kakao-steps .done .step-n { background: var(--ok-bg); color: var(--ok); }

/* 인쇄용 학습 자료 */
@media print {
  .back, .no-print, .toast { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page { max-width: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 머리줄 · 넓은 화면 */
.btn.kakao, .btn.primary { border-radius: 999px; }
@media (min-width: 560px) {
  .katalk { margin-inline: 0; padding: 20px; border-radius: 24px; }
}
@media (min-width: 900px) {
  .page.home, .page.start, .page.get { max-width: calc(1040px + 2 * var(--gutter)); padding-top: 36px; }
  .start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-rows: auto 1fr; }
  .start-preview { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 899px) {
  .start-grid { display: flex; flex-direction: column; }

}


/* 레슨의 오늘 표현 · 세 번 듣기 */
.express-en { font: 400 clamp(26px, 6.6vw, 34px)/1.22 var(--serif); letter-spacing: -.02em; word-break: normal; }
.stage-title { padding-top: 18px; }
.stages { display: flex; }
.stages button { flex: 1; min-width: 0; padding: 0 4px; font-size: 15px; }
.btn.toggle[aria-pressed="true"] { border-color: var(--learn); background: var(--mark); color: var(--learn); }
.script-group > * + * { margin-top: 10px; }
.script-group + .script-group { margin-top: 24px; }
.script-art { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 18px; object-fit: cover; object-position: 50% 62%; background: #f8f0e4; }
.line .thumb { width: 64px; height: 64px; }
.lesson-head .lead { margin-top: 2px; }

/* 유튜브 장면 · 두 코스 · 빈칸 */
.clip > * + * { margin-top: 10px; }
.clip-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border-radius: 14px; background: #101412; }
.clip-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-open { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; min-height: 200px; color: #fff; font-weight: 700; }
.clip-credit { color: var(--soft); font-size: 14px; }
.clip .hint:empty { display: none; }
.course-tabs { max-width: 100%; }
.course-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border-radius: 999px; font-size: 15px; text-decoration: none; }
.course-tabs a[aria-current] { background: var(--action); color: #fff; }
.talk-reveal { min-height: 44px; margin-top: 4px; padding: 0; color: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: .2em; }
.katalk-msg + .katalk-msg { padding-top: 6px; }

/* 손그림 학습지. 레이아웃은 이 앱에 두고 PNG와 컴포넌트는 공통 paper.css에서 가져온다. */
.page:not(.start,.home,.get) { max-width: 740px; padding-top: clamp(28px, 6vw, 60px); }
.view-title { display: flex; align-items: center; gap: .3em; font-size: clamp(32px, 5.5vw, 56px); }
.view-title > .paper-sticker { width: 1.08em; height: 1.08em; }
.page > .view-title + .lead, .start-head .lead { margin-top: 10px; }
.welcome {
  display: grid; justify-items: center; align-content: center; text-align: center;
  padding: clamp(30px, 7vw, 64px) 0 clamp(34px, 6vw, 72px);
}
.welcome .paper-title { font-size: clamp(46px, 9.8vw, 78px); line-height: 1.06; }
.welcome .lead { margin-top: 14px; font-size: clamp(15px, 3.8vw, 19px); }
.welcome-art { width: clamp(212px, 60vw, 300px); height: auto; margin: 20px 0 18px; }
.welcome-go { min-width: min(245px, 100%); min-height: 52px; font-size: 18px; }
.welcome-go .ic { width: 19px; }
.start-grid { border-top: 1px solid var(--ink); padding-top: 26px; margin-top: 16px; }
.start-grid legend, .start-courses > label { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.05em; }
.periods { gap: 3px; padding: 4px; border-radius: 12px; background: var(--paper-pale); }
.period { padding: 9px 4px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; }
.period:has(:checked) { border-color: var(--paper-line); background: white; box-shadow: 0 1px 3px #0001; color: var(--paper-accent); }
.period:has(:checked) span { color: var(--soft); }
.go > .paper-sticker:first-child { width: 36px; height: 36px; }
.page.start:has(.welcome) { padding-top: 0; }
.start-preview .katalk { margin: 0; }
.start-preview > .btn { margin-top: 12px; }
.katalk { margin-inline: 0; padding: clamp(14px, 3vw, 26px); border-radius: 20px; }
.katalk-name { display: flex; align-items: center; gap: 7px; font-weight: 700; letter-spacing: -.04em; }
.katalk-name img { width: 26px; height: 26px; }
.katalk-date { text-align: left; }
.katalk-date span { padding: 0; background: none; font: 700 16px/1.4 var(--sans); }
.talk.paper-frame { padding: 9px; border-radius: 14px; }
.talk-art { border-radius: 8px; aspect-ratio: 16 / 10; }
.talk-head, .talk-head.plain { padding: 17px 11px; }
.talk-head.plain { border-radius: 9px; background: var(--paper-apricot); color: var(--ink); }
.plain .talk-day, .plain .talk-mean { color: #443528; }
.talk-head h1, .talk-head h2 { font-weight: 700; letter-spacing: -.055em; }
.talk-part { margin-inline: 11px; border-color: var(--rule); }
.talk-actions { display: flex; flex-wrap: wrap; padding: 0 8px 10px; }
.talk-actions .btn { flex: 1 1 105px; white-space: nowrap; border-radius: 999px; }
.talk-actions .btn:last-child:not(:first-child,.primary) { background: var(--paper-pale); }
.talk-say { border: 1px solid var(--rule); }
.card.paper-frame { border: 0; background: var(--paper-surface, #fff); }
.steps button[aria-current] { background: var(--paper-lime); }
.lesson-head h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.055em; }
.go { padding-inline: 4px; }
.kakao-steps .step-n { background: var(--paper-pale); }
@media (min-width: 900px) {
  .welcome {
    grid-template: "title art" auto "lead art" auto "action art" auto / 1fr 1fr;
    justify-items: start; align-content: center; text-align: left;
    min-height: 425px; padding: 36px clamp(28px, 6vw, 80px);
  }
  .welcome .paper-title { grid-area: title; align-self: end; }
  .welcome .lead { grid-area: lead; align-self: start; margin-top: 16px; }
  .welcome-actions { grid-area: action; align-self: start; margin-top: 24px; min-width: 190px; }
  .welcome-art { grid-area: art; width: min(100%, 360px); justify-self: center; align-self: center; margin: 0; }
  .start-grid { grid-template-rows: auto auto; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: 24px 48px; }
  .start-go { grid-column: 1; }
  .start-preview { align-self: start; }
}
@media print {
  .view-title img, .welcome-art { display: none; }
}

.sample-summary { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-weight: 700; }
.sample-summary span { color: var(--soft); font-size: .9rem; font-weight: 400; }
.delivery-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.page.received { max-width: 42rem; }
.received > * + * { margin-top: 1rem; }
.received-heading .view-title { font-size: clamp(1.5rem, 5.7vw, 2.25rem); }
.received-lesson { display: grid; gap: .875rem; padding: clamp(1rem, 4vw, 1.5rem); border-radius: 1rem; }
.received-expression { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.received-expression h2 { font: 700 clamp(1.4rem, 5.5vw, 2.3rem)/1.18 var(--serif); overflow-wrap: anywhere; }
.received-expression p { margin-top: .25rem; color: var(--soft); }
.received-expression img { flex: none; width: clamp(6rem, 25vw, 10rem); aspect-ratio: 2 / 1; height: auto; border-radius: .625rem; object-fit: cover; object-position: center 62%; }
.received-example { padding: .75rem; border-radius: .75rem; background: var(--paper-pale); }
.received-example .en { font-size: clamp(1.05rem, 3.7vw, 1.3rem); font-weight: 700; }
.received-example .ko { margin-top: .25rem; font-size: .9375rem; }
.received-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.received-actions .btn { min-height: 3rem; padding: .5rem .625rem; line-height: 1.25; }
.received-actions .ic { width: 1.125rem; height: 1.125rem; }
.received-actions .is-playing { box-shadow: inset 0 0 0 2px var(--ink); }
.received-status { color: var(--ok); font-size: .875rem; }
.received-status.error { color: var(--bad); }
.received-status:empty { position: absolute; }
.received-more .text-action { min-height: 2.75rem; }
.received-detail, .received-scene { padding: .25rem .75rem; border-top: 1px solid var(--rule); }
.received-detail summary, .received-scene summary { min-height: 2.75rem; padding-block: .625rem; }
.received-examples { display: grid; gap: .5rem; }
.received-examples h2 { font-size: 1.125rem; }

.welcome-actions { display: grid; justify-items: center; gap: 6px; }
.welcome-actions .link, .course-pass { display: inline-flex; align-items: center; }
.course-pass { justify-content: center; width: 100%; }
.start-courses .hint { margin-top: 8px; }
.compact-talk .talk-art { float: right; width: clamp(70px, 20vw, 104px); margin: 12px 10px 5px; aspect-ratio: 1; }
.compact-talk > .talk-part, .compact-talk .talk-actions { clear: both; }
.compact-talk .talk-head { min-height: 88px; }
.compact-talk .talk-head h2 { overflow-wrap: anywhere; }
.expression-detail { margin: 0 11px; border-top: 1px solid var(--rule); }
.expression-detail summary, .lesson-options summary, .extra-expressions summary { font-size: 15px; color: var(--soft); }
.expression-detail .talk-part { margin-inline: 0; padding-top: 0; border: 0; }
.extra-expressions { padding: 0 14px 4px; border-radius: 12px; background: var(--paper-hi); }
.extra-expressions ul { padding-bottom: 10px; }
.lesson-options > .row { padding-bottom: 8px; }
@media (min-width: 900px) { .welcome-actions { justify-items: start; } }

.study-collection { display: grid; gap: 1rem; }
.study-card { display: grid; gap: .875rem; min-width: 0; padding: clamp(1rem, 4vw, 1.5rem); }
.study-card h2 { margin: 0; font-size: clamp(1.375rem, 4vw, 1.875rem); }
.study-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.study-card-heading .ko { margin-top: .25rem; }
.study-card-art { max-width: 100%; max-height: 18rem; width: auto; height: auto; justify-self: center; object-fit: contain; border-radius: .75rem; }
.study-examples { display: grid; gap: .75rem; }
.study-examples li + li { padding-top: .75rem; border-block-start: 1px solid var(--rule); }
.study-note { padding: .75rem; border-radius: .75rem; background: var(--paper-deep); }
.study-dialogue summary, details.study-card > summary { cursor: pointer; }
.study-dialogue[open] summary { margin-block-end: .75rem; }
.study-lesson > [role=status]:empty { display: none; }

/* 서비스 소개, 결제, 수신 설정 */
.page.service-intro { max-width: calc(1000px + var(--gutter) * 2); padding-top: clamp(28px, 5vw, 70px); }
html:has(.sample-bar) {
  --sample-bar-bottom: calc(var(--tabs) + var(--sample-bar-gap, 0px) + env(safe-area-inset-bottom));
  --sample-bar-clearance: calc(var(--sample-bar-bottom) + var(--sample-bar-height, 0px));
  scroll-padding-bottom: calc(var(--sample-bar-clearance) + 1rem);
}
.service-intro:has(.sample-bar) { padding-bottom: calc(var(--sample-bar-clearance) + 2rem); }
body:has(.sample-bar) .toast { bottom: calc(var(--sample-bar-clearance) + 1rem); }
.intro-hero { display: grid; gap: 24px; align-items: center; }
.intro-copy h1 { font-size: clamp(40px, 6vw, 78px); font-weight: 800; line-height: 1.12; letter-spacing: -.05em; }
.intro-copy .lead { margin: 17px 0; line-height: 1.7; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.intro-actions .paper-action { min-height: 50px; }
.intro-actions .paper-action .ic { width: 14px; height: 14px; }
.intro-link, .text-action { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 14px; text-underline-offset: 4px; }
.chat-preview { width: 100%; max-width: 390px; justify-self: center; overflow: hidden; border: 1px solid #8596a1; border-radius: 23px; background: #c1d3df; box-shadow: 0 4px 0 #34454d12; }
.chat-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 19px; border-bottom: 1px solid #36434c24; background: #ccdde7; }
.chat-avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 12px; background: #ffec87; border: 1px solid #bcb58c; }
.chat-avatar .ic { width: 27px; height: 27px; }
.chat-toolbar b, .chat-toolbar small { display: block; line-height: 1.4; }
.chat-toolbar b { font-size: 15px; }
.chat-toolbar small { color: #475560; font-size: 11px; }
.chat-conversation { display: grid; gap: .75rem; padding: .875rem; }
.sample-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; }
.sample-tab { min-height: 2.75rem; padding: .375rem .25rem; border: 1px solid #849ca8; border-radius: .75rem; color: #18262e; font-size: .875rem; line-height: 1.25; font-weight: 700; }
.sample-tab[aria-pressed=true] { border-color: #23333c; background: #23333c; color: white; }
.sample-slide {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  min-width: 0;
  min-height: 22rem;
  padding: clamp(.875rem, 3vw, 1.25rem);
  border-radius: 1rem;
  background: var(--paper-hi);
  box-shadow: 0 1px 2px rgb(30 46 56 / 18%);
  text-wrap: pretty;
}
.sample-slide header { display: flex; align-items: center; gap: .5rem; }
.sample-slide h3 { font-size: 1rem; }
.sample-picture { align-self: center; width: auto; height: auto; max-height: clamp(11.5rem, 28vw, 14rem); object-fit: contain; border-radius: .625rem; }
.sample-thumbnail { width: 100%; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; }
.sample-wide { width: 100%; max-height: none; aspect-ratio: 2 / 1; object-fit: contain; }
.sample-english { font: 700 clamp(1.35rem, 4vw, 1.75rem)/1.24 Arial, var(--sans); letter-spacing: -.04em; overflow-wrap: anywhere; }
.sample-example { display: grid; gap: .25rem; width: 100%; border-inline-start: 2px solid var(--rule); padding-inline-start: .625rem; }
.sample-examples { display: grid; gap: .5rem; width: 100%; }
.sample-examples h4 { font-size: .875rem; }
.sample-example-en { font: 700 1rem/1.4 Arial, var(--sans); }
.sample-ko { color: var(--soft); font-size: .9375rem; }
.sample-slide > .btn { width: 100%; min-height: 2.75rem; }
.sample-detail { width: 100%; padding: .5rem .75rem; border-radius: .625rem; background: var(--paper-deep); font-size: .875rem; }
.sample-detail > * + * { margin-top: .5rem; }
.sample-bar {
  position: fixed;
  inset: auto 0 var(--sample-bar-bottom);
  max-inline-size: var(--shell-width);
  margin-inline: auto;
  z-index: 9;
  border-top: 1px solid var(--rule);
  background: var(--paper-hi);
  box-shadow: 0 -4px 18px rgb(0 0 0 / 8%);
}
.sample-bar-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem var(--gutter);
}
.sample-bar-icon { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: .75rem; background: var(--paper-pale); }
.sample-bar-icon .ic { width: 1.75rem; height: 1.75rem; }
.sample-bar-copy { flex: 1; min-width: 0; }
.sample-bar-copy h2 { font-size: 1rem; line-height: 1.3; }
.sample-bar-status { margin-top: .1875rem; color: var(--soft); font-size: .875rem; line-height: 1.4; }
.sample-bar-status.error { color: var(--bad); }
.sample-bar .sample-control { flex: 0 0 auto; max-width: 55%; }
.sample-bar .paper-action { max-width: 100%; min-height: 3rem; padding-inline: clamp(.75rem, 3vw, 1.25rem); gap: .5em; font-size: .9375rem; }
@media (min-width: 960px) {
  html:has(.sample-bar) { --sample-bar-gap: .75rem; }
  .sample-bar {
    inset-inline: var(--gutter);
    max-inline-size: 46rem;
    border: 1px solid var(--rule);
    border-radius: 1.375rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 10%);
  }
  .sample-bar-inner { padding-inline: 1.125rem; }
}
@media (max-width: 480px) {
  .sample-bar-icon { display: none; }
  .sample-bar-status { font-size: .8125rem; }
}
@media print {
  .sample-bar { display: none; }
}
.service-intro .intro-features { margin-top: clamp(3rem, 8vw, 5rem); }
.intro-features ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.375rem, 2vw, 1.25rem); }
.service-intro .intro-features ul { margin-top: 1.75rem; }
.intro-features li { min-width: 0; padding: clamp(.625rem, 2vw, 1.25rem); }
.intro-features .ic { --sticker-size: clamp(1.75rem, 5vw, 2.5rem); width: var(--sticker-size); height: var(--sticker-size); }
.intro-features h3 { margin-top: .375rem; font-size: clamp(.875rem, 2.4vw, 1.0625rem); line-height: 1.25; }
.intro-features p { margin-top: .25rem; color: var(--soft); font-size: clamp(.75rem, 2vw, .9375rem); line-height: 1.45; }
.course-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.course-links .ic { width: 18px; height: 18px; }
@media (min-width: 720px) {
  .intro-hero { grid-template-columns: 1fr minmax(300px,.95fr); gap: 48px; }
}
@media (max-width: 719px) {
  .page.service-intro { max-width: 530px; }
  .intro-copy h1 br { display: none; }
  .intro-copy h1 { font-size: clamp(31px, 8vw, 42px); }
  .intro-copy .lead { margin: 10px 0 16px; font-size: 15px; }
  .intro-hero { gap: 20px; }
}

/* 서비스 소개 아래쪽(intro.js): 꽉 찬 둥근 칸 · 가운데 굵은 제목 · 알약 표 · 칸 모서리에 걸친 뜨개 그림.
   .page > section 공용 여백보다 앞서도록 .service-intro 아래에 둔다 */
.page.service-intro { --intro-sky: #e2ecf2; --intro-lime: #edfad6; --intro-yellow: #ffe46b; overflow-x: clip; }
.service-intro .intro-title { font: 800 clamp(1.625rem, 5.4vw, 2.5rem)/1.25 var(--sans); letter-spacing: -.045em; text-align: center; text-wrap: balance; }
.service-intro .intro-title::before, .service-intro .intro-title::after { content: "+"; content: "+" / ""; display: inline-block; margin-inline: .4em; color: var(--soft); font-weight: 400; font-size: .62em; vertical-align: .2em; }
.service-intro .intro-band { position: relative; margin-top: clamp(3rem, 8vw, 5rem); padding: clamp(2.5rem, 7vw, 4rem) clamp(1rem, 4vw, 2.5rem); border-radius: clamp(1.5rem, 4vw, 2.25rem); }
.service-intro .knit { position: absolute; z-index: 1; height: auto; margin: 0; rotate: var(--tilt, 0deg); pointer-events: none; user-select: none; filter: drop-shadow(0 10px 12px rgb(23 23 21 / 14%)); }
/* 뜨개 그림은 제자리에서 둥둥 뜨고(translate · rotate), 스크롤에 따라 조금 늦게 따라온다(transform) */
@keyframes knit-float {
  from { translate: 0 0; rotate: calc(var(--tilt, 0deg) - 3deg); }
  to { translate: 0 -10px; rotate: calc(var(--tilt, 0deg) + 3deg); }
}
@keyframes knit-drift {
  from { transform: translateY(28px); }
  to { transform: translateY(-28px); }
}
@media (prefers-reduced-motion: no-preference) {
  .service-intro .knit { animation: knit-float 3.2s ease-in-out var(--float-delay, 0s) infinite alternate; }
  @supports (animation-timeline: view()) {
    .service-intro .knit { animation: knit-float 3.2s ease-in-out var(--float-delay, 0s) infinite alternate, knit-drift linear both; animation-timeline: auto, view(); }
  }
}
.service-intro .intro-badge { display: inline-block; padding: .25rem .75rem; border-radius: 999px; background: var(--paper-ink); color: var(--paper-lime); font: 700 .8125rem/1.4 var(--sans); }
.service-intro .intro-note { max-width: 27rem; margin: 1rem auto 0; color: var(--soft); text-align: center; line-height: 1.65; text-wrap: pretty; }

/* 이런 고민 */
.service-intro .intro-needs { background: linear-gradient(172deg, var(--intro-sky), var(--paper-pale) 55%, var(--intro-lime)); text-align: center; }
.service-intro .intro-needs .knit-corner { top: clamp(-2.75rem, -5vw, -1.5rem); inset-inline-end: clamp(-.5rem, 3vw, 2.5rem); width: clamp(5.5rem, 20vw, 9.5rem); --tilt: 8deg; }
.service-intro .need-bubbles { display: flex; flex-direction: column; gap: .625rem; max-width: 25rem; margin: 1.75rem auto 0; }
.need-bubbles li { align-self: flex-start; max-width: 88%; padding: .75rem 1.125rem; border-radius: 1.25rem 1.25rem 1.25rem .375rem; background: var(--paper-white); box-shadow: 0 6px 16px rgb(23 23 21 / 8%); font-weight: 700; font-size: clamp(.9375rem, 3.6vw, 1.0625rem); line-height: 1.45; text-align: start; }
.need-bubbles li:nth-child(even) { align-self: flex-end; border-radius: 1.25rem 1.25rem .375rem 1.25rem; background: var(--intro-yellow); }
.service-intro .need-turn { margin-top: 2.25rem; font: 800 clamp(1.375rem, 5vw, 2rem)/1.35 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.need-turn mark { padding-inline: .15em; border-radius: .2em; background: var(--paper-lime); color: inherit; }

/* 카톡으로 보내는 까닭 */
.service-intro .intro-reasons { background: linear-gradient(180deg, var(--intro-lime), var(--paper-pale) 40%, var(--intro-sky)); }
.service-intro .intro-cells { display: grid; gap: 1.75rem; margin-top: 2rem; }
.intro-cell { position: relative; min-width: 0; padding: 2rem clamp(1.125rem, 4vw, 1.75rem) clamp(1.5rem, 4vw, 2rem); border-radius: 1.5rem; background: var(--paper-white); box-shadow: 0 1px 0 var(--rule), 0 12px 28px rgb(23 23 21 / 6%); text-align: center; }
.service-intro .intro-cell .knit-corner { top: -1.125rem; inset-inline-end: -.25rem; width: clamp(2.75rem, 10vw, 3.75rem); --tilt: 10deg; }
.service-intro .intro-cell:nth-child(even) .knit-corner { --tilt: -8deg; --float-delay: -1.6s; }
.service-intro .intro-cell:nth-child(3) .knit-corner { --float-delay: -2.4s; }
.intro-cell h3 { margin-top: .75rem; font: 800 clamp(1.25rem, 4.4vw, 1.5rem)/1.3 var(--sans); letter-spacing: -.04em; }
.intro-cell p { margin-top: .5rem; color: var(--soft); font-size: .9375rem; line-height: 1.6; text-wrap: pretty; }
.intro-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1.125rem; }
.intro-times li { padding: .75rem .25rem; border-radius: 1rem; background: linear-gradient(160deg, var(--intro-lime), var(--intro-sky)); }
.intro-times b { display: block; font: 800 clamp(1.125rem, 4.4vw, 1.375rem)/1.15 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.intro-times span { color: var(--soft); font-size: .75rem; }
.intro-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-top: 1rem; }
.intro-chips li { padding: .375rem .75rem; border-radius: 999px; background: var(--paper-pale); font-size: .8125rem; font-weight: 700; }

/* 뜻에서 쓰임까지 */
.service-intro .intro-ladder { margin-top: clamp(3rem, 8vw, 5rem); }
.service-intro .intro-ladder ol { display: grid; gap: 2.25rem; margin-top: 2rem; }
.ladder-step { position: relative; padding: 1.5rem clamp(1.125rem, 4vw, 1.5rem); border-radius: 1.5rem; background: var(--paper-pale); }
.ladder-step:last-child { background: linear-gradient(160deg, var(--intro-lime), var(--intro-sky)); }
.ladder-step:not(:last-child)::after { content: "↓"; content: "↓" / ""; position: absolute; left: 50%; bottom: -1.875rem; translate: -50% 0; color: var(--soft); font-weight: 700; }
.ladder-step h3 { margin-top: .625rem; font: 800 1.25rem/1.3 var(--sans); }
.ladder-step p { margin-top: .375rem; line-height: 1.6; text-wrap: pretty; }
.ladder-step .ladder-en { font: 700 1.125rem/1.35 Arial, var(--sans); letter-spacing: -.02em; }
.ladder-en + p { color: var(--soft); }

/* 이런 톡이 와요: 코스는 세로로 차례로, 코스 안의 톡은 옆으로 넘긴다(모든 화면 폭). 넘길 때 가장자리 톡은 작고 옅게 */
.service-intro .intro-examples { background: linear-gradient(180deg, var(--paper-pale), var(--intro-sky)); }
.service-intro .intro-examples .knit-corner { top: clamp(-2.5rem, -5vw, -1.5rem); inset-inline-start: clamp(-.5rem, 3vw, 2.5rem); width: clamp(5rem, 17vw, 8rem); --tilt: -10deg; --float-delay: -.8s; }
.service-intro .example-groups { display: grid; gap: 2.5rem; margin-top: 2rem; }
.example-group h3 { display: flex; align-items: center; gap: .5rem; font: 800 1.25rem/1.3 var(--sans); letter-spacing: -.03em; }
.example-group h3 .ic { width: 1.75rem; height: 1.75rem; }
.example-group-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.example-navs { display: flex; flex: none; gap: .375rem; }
.example-nav { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-white); }
.example-nav .ic { width: 1rem; height: 1rem; }
.example-list { display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 19rem); gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(1rem, 4vw, 2.5rem); margin: .75rem calc(-1 * clamp(1rem, 4vw, 2.5rem)) 0; padding: .5rem clamp(1rem, 4vw, 2.5rem) 1.25rem; scrollbar-width: none; }
.example-list::-webkit-scrollbar { display: none; }
.example-card { scroll-snap-align: start; }
@keyframes example-pass {
  entry 0% { opacity: .55; scale: .92; }
  entry 100% { opacity: 1; scale: 1; }
  exit 0% { opacity: 1; scale: 1; }
  exit 100% { opacity: .55; scale: .92; }
}
@media (prefers-reduced-motion: no-preference) {
  .example-list { scroll-behavior: smooth; }
  @supports (animation-timeline: view()) {
    .example-card { animation: example-pass linear both; animation-timeline: view(inline); }
  }
}
.example-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 1.25rem; background: var(--paper-white); box-shadow: 0 1px 0 var(--rule), 0 10px 24px rgb(23 23 21 / 6%); }
.example-picture { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; background: var(--paper-tint); }
.example-body { display: grid; gap: .375rem; align-content: start; padding: 1rem 1.125rem 1.25rem; }
.example-day { justify-self: start; padding: .125rem .5rem; border-radius: 999px; background: var(--paper-pale); color: var(--soft); font: 700 .75rem/1.5 var(--sans); }
.example-head { font: 700 1.25rem/1.28 Arial, var(--sans); letter-spacing: -.03em; overflow-wrap: anywhere; }
.example-mean, .example-pron { color: var(--soft); font-size: .9375rem; }
.example-pron { font-size: .8125rem; }
.example-about { margin-top: .25rem; padding: .625rem .75rem; border-radius: .75rem; background: var(--paper-pale); font-size: .875rem; line-height: 1.55; text-wrap: pretty; }
@media (min-width: 720px) {
  .service-intro .intro-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .service-intro .intro-ladder ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .ladder-step:not(:last-child)::after { content: "→"; content: "→" / ""; left: auto; right: -1.25rem; top: 50%; bottom: auto; translate: 50% -50%; }
}

/* 오늘 학습 */
.page.today-study { max-width: 48rem; }
.today-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.today-streak {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .5rem .75rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--paper-deep);
  line-height: 1.2;
}
.today-streak .ic { width: clamp(1.5rem, 5vw, 2rem); height: auto; }
.today-streak :is(span, strong) { display: block; white-space: nowrap; }
.today-streak span { color: var(--soft); font-size: .8125rem; }
.today-streak strong { margin-top: .1875rem; font-size: clamp(1.375rem, 5vw, 1.875rem); font-variant-numeric: tabular-nums; }
.today-header .view-title { font-size: clamp(2rem, 5vw, 3rem); }
.today-header time { display: block; margin: .375rem 0 0 .25rem; color: var(--soft); }
.today-header .course-tabs { gap: .375rem; margin-top: .875rem; padding: 0; border: 0; }
.today-header .course-tabs a { border: 1px solid var(--rule); }
.today-header .course-tabs a[aria-current] { border-color: var(--action); }
.today-study > .today-lesson {
  padding: clamp(1.125rem, 4vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  background: var(--paper-deep);
}
.today-lesson-main { display: flex; justify-content: space-between; align-items: center; gap: .875rem; }
.today-meta { margin-bottom: .6rem; color: var(--soft); font-size: .875rem; }
.today-lesson h2 { font: 700 clamp(1.75rem, 6vw, 2.75rem)/1.14 Arial, var(--sans); letter-spacing: -.045em; text-wrap: pretty; }
.today-mean { margin-top: .375rem; font-size: 1.0625rem; }
.today-picture { flex: none; width: clamp(4rem, 23vw, 9rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .875rem; }
.today-lesson > .btn { margin-top: 1.25rem; }
.today-result { display: flex; align-items: center; gap: .375rem; margin-top: .75rem; color: var(--ok); font-size: .9375rem; }
.today-lesson .hint { margin-top: .625rem; }
.today-study > .study-calendar { margin-top: clamp(1.75rem, 5vw, 2.5rem); }
.calendar-expression { font: 700 clamp(1.1rem, 4vw, 1.375rem)/1.3 Arial, var(--sans); }

.course-tabs { flex-wrap: wrap; }

/* 수신 설정 */
.kakao-settings > .paper-settings-body { margin-top: 0; }
.receive-guide-steps { display: grid; gap: 1rem; padding: 0; list-style: none; counter-reset: receive-step; }
.receive-guide-steps > li { position: relative; display: grid; gap: .375rem; padding-inline-start: 2.375rem; counter-increment: receive-step; }
.receive-guide-steps > li + li { --step-top: 1rem; padding-block-start: var(--step-top); border-block-start: 1px solid var(--rule); }
.receive-guide-steps > li::before {
  content: counter(receive-step);
  position: absolute;
  inset-block-start: var(--step-top, 0);
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--settings-selected);
  color: var(--settings-accent);
  font-size: .875rem;
  font-weight: 700;
}
.receive-guide-steps header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .75rem; }
.receive-guide-steps h3 { font-size: 1rem; }
.receive-guide-status, .channel-friend-status { color: var(--soft); font-size: .8125rem; font-weight: 700; }
.channel-friend-status[data-friend=added], .receive-guide-status[data-on=true] { color: var(--ok); }
.channel-friend-status[data-friend=blocked] { color: var(--bad); }
.receive-guide :is(.hint:empty, .row:not(:has(:is(a, button):not([hidden]))), .receive-guide-actions:not(:has(button:not([hidden])))) { display: none; }
.receive-guide-steps :is(.row, .receive-guide-actions) { margin-top: .25rem; }
.receive-guide-alerts { margin-top: .875rem; border-block-start: 1px solid var(--rule); }
.receive-guide-alerts summary { padding-block: .625rem; color: var(--soft); font-size: .875rem; cursor: pointer; }
.delivery-schedule .paper-settings-section-head h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
/* 카톡 받는 방법 · 레슨 시간표 탭(12-03 사용자 지정) — 탭 이름이 곧 제목이라 칸 안 h2 는 화면 읽기에만 남긴다 */
.kakao-tabbed { display: grid; min-width: 0; gap: clamp(1rem, 3vw, 1.5rem); }
.kakao-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; padding: .3125rem; border: 1px solid var(--rule); border-radius: 1.125rem; background: var(--paper-pale); }
.kakao-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 0; min-height: 3.25rem; padding: .375rem .75rem;
  border-radius: .875rem; color: var(--soft); font: 700 clamp(.9375rem, 2.4vw, 1.0625rem)/1.25 var(--sans); letter-spacing: -.02em;
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.kakao-tab .paper-sticker { --sticker-size: 1.625rem; opacity: .5; transition: opacity .18s var(--ease); }
.kakao-tab[aria-selected=true] { background: var(--paper-white); color: var(--ink); box-shadow: 0 0 0 1px var(--rule), 0 2px 6px rgb(28 28 28 / .07); }
.kakao-tab[aria-selected=true] .paper-sticker { opacity: 1; }
.kakao-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .kakao-tab[aria-selected=false]:hover { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .kakao-tab, .kakao-tab .paper-sticker { transition: none; } }
@media (forced-colors: active) { .kakao-tab[aria-selected=true] { outline: 2px solid Highlight; } }
.kakao-tabbed [role=tabpanel] .paper-settings-section-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kakao-tabbed [role=tabpanel] .paper-settings-section-head:not(:has(p)) { display: none; }
.kakao-tabbed .delivery-schedule .paper-settings-section-head p { margin: 0; text-align: center; }
/* 이용권을 사면 '포함돼요' 칸이 맨 아래로 빠져 위 칸엔 상태 카드만 남는다 — 한 칸 폭으로 */
.kakao-settings .paper-pay:has(> .paper-settings-card:only-child) { grid-template-columns: minmax(0, 1fr); }
.schedule-slots { display: grid; gap: clamp(1.125rem, 3vw, 1.75rem); }
.schedule-slot { display: grid; gap: clamp(1.125rem, 3vw, 1.75rem); padding: clamp(1.125rem, 3.75vw, 2rem); }
.schedule-slot-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.schedule-slot-heading h3 { font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.2; letter-spacing: -.025em; }
.schedule-slot .paper-settings-options { gap: .75rem; }
.schedule-slot .paper-settings-option { min-height: 3.75rem; padding-inline: .625rem; font-size: clamp(1.0625rem, 2vw, 1.25rem); }
.schedule-form { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(.875rem, 2.5vw, 1.5rem); }
.schedule-field, .schedule-random-hint {
  min-width: 0;
  min-height: clamp(5.5rem, 10vw, 6.5rem);
  padding: .875rem clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--settings-background);
}
.schedule-field {
  display: grid;
  grid-template: auto auto / minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: .375rem 1rem;
  text-align: start;
}
.schedule-field > span { color: var(--soft); font-size: .9375rem; font-weight: 700; line-height: 1.2; }
.schedule-field > strong { grid-area: 2 / 1; font-size: clamp(1.275rem, 3vw, 1.625rem); line-height: 1.25; letter-spacing: -.025em; }
.schedule-field::after {
  content: "";
  grid-area: 1 / 2 / 3;
  width: .625rem;
  height: .625rem;
  margin-inline-end: .25rem;
  border: solid var(--settings-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.schedule-field:hover { border-color: var(--settings-accent); background: var(--settings-selected); }
/* 받는 시간 팝업: 지금 고른 시각 → 오전·오후 → 시(4칸 × 3줄) → 분 → 완료 */
.time-pick { display: grid; gap: .75rem; }
.time-pick-now { margin-bottom: .25rem; text-align: center; font: 800 clamp(2rem, 8vw, 2.5rem)/1.15 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.time-pick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.time-pick-hours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.time-pick-choice {
  min-height: 3rem; padding: .375rem; border: 1px solid var(--rule); border-radius: .875rem; background: var(--settings-background);
  color: var(--ink); font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.time-pick-choice[aria-pressed=true] { border-color: var(--settings-accent); background: var(--settings-selected); color: var(--settings-accent); }
.time-pick-choice:disabled { opacity: .35; }
.time-pick-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .time-pick-choice:enabled:not([aria-pressed=true]):hover { border-color: var(--settings-accent); } }
.time-pick-done { width: 100%; min-height: 3.25rem; margin-top: .5rem; }
.time-pick-row + .time-pick-hours, .time-pick-hours + .time-pick-row { margin-top: .25rem; }
.schedule-random-hint { display: grid; align-content: center; color: var(--soft); }
.schedule-picker {
  width: min(calc(100% - 2rem), 42rem);
  max-height: min(86dvh, 45rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
  background: var(--paper-white);
  color: var(--ink);
}
.schedule-picker[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.schedule-picker::backdrop { background: rgb(0 0 0 / .4); }
.schedule-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .875rem clamp(1.125rem, 4vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
}
.schedule-picker-header h3 { font-size: clamp(1.5rem, 4vw, 1.875rem); letter-spacing: -.03em; }
.schedule-picker-close { min-height: 2.75rem; padding-inline: .875rem; border-radius: .75rem; background: var(--settings-background); font-weight: 700; }
.schedule-picker-close:hover { background: var(--settings-selected); color: var(--settings-accent); }
.schedule-picker-body { overflow: auto; overscroll-behavior: contain; padding: clamp(1.125rem, 4vw, 1.75rem); }
.schedule-picker-group + .schedule-picker-group { margin-top: 1.5rem; }
.schedule-picker-group h4 { margin-bottom: .625rem; color: var(--soft); font-weight: 700; }
.schedule-picker-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.schedule-picker-option {
  display: grid;
  align-items: center;
  min-height: 4rem;
  padding: .75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: .875rem;
  background: var(--settings-background);
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: start;
}
.schedule-picker-option:hover, .schedule-picker-option[aria-pressed=true] { border-color: var(--settings-accent); background: var(--settings-selected); color: var(--settings-accent); }
.schedule-picker-times { grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr)); }
.schedule-picker-times .schedule-picker-option { justify-items: center; padding-inline: .25rem; font-variant-numeric: tabular-nums; }
@media (max-width: 570px) {
  .schedule-form, .schedule-picker-options:not(.schedule-picker-times) { grid-template-columns: 1fr; }
  .schedule-picker { position: fixed; inset: auto 0 0; width: 100%; max-width: none; margin: 0; border-radius: 1.5rem 1.5rem 0 0; }
  .schedule-picker-body { padding-bottom: calc(1.125rem + env(safe-area-inset-bottom)); }
}
.slot-remove { min-height: 2.75rem; padding: .375rem .625rem; font-size: .875rem; color: var(--soft); }
.slot-remove:hover { text-decoration: underline; }
.schedule-extra > summary, .schedule-maintenance summary { min-height: 2.75rem; padding-block: .625rem; color: var(--soft); font-size: .875rem; cursor: pointer; }
.schedule-maintenance { border-top: 1px solid var(--rule); }
.schedule-maintenance .btn { min-height: 44px; margin: 8px 0; }
.schedule-buttons { margin-top: .75rem; }
.schedule-buttons:not(:has(.paper-action:not([hidden]))) { display: none; }
@media (max-width: 719px) {
  .schedule-buttons {
    position: sticky;
    z-index: 5;
    bottom: calc(var(--tabs) + env(safe-area-inset-bottom));
    padding-block: .5rem;
    background: var(--settings-background);
  }
}
.schedule-board :is([role=alert], .hint):empty, .paper-settings-section > [role=status]:empty { display: none; }
.schedule-board [role=alert] { margin-top: 10px; }
.schedule-add { width: 100%; margin-top: var(--settings-gap); min-height: 3.25rem; padding: .5rem .875rem; border: 1px solid var(--rule); border-radius: .75rem; color: var(--settings-accent); font-weight: 700; font-size: 1rem; }
.schedule-add:hover { border-color: var(--settings-accent); background: var(--settings-selected); }
.channel-settings summary small { margin-inline-start: auto; color: var(--soft); font-size: .8125rem; }
.channel-settings > summary::after { margin-inline-start: .25rem; }
.channel-settings .ic { width: 1.5rem; height: 1.5rem; }
.dev-panel { display: grid; gap: .875rem; padding: var(--settings-pad); border: 1px solid var(--rule); border-radius: var(--settings-radius); background: var(--paper-pale); }
.dev-panel h2 { font-size: clamp(1.25rem, 4vw, 1.5rem); }
.dev-mode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .375rem 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); }
.dev-mode b { font-size: .9375rem; }
.dev-mode label { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-size: .875rem; cursor: pointer; }
.dev-mode input { flex: none; width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--ink); }
.dev-grid { display: grid; gap: .75rem; }
.dev-card { display: flex; flex-direction: column; gap: .625rem; min-width: 0; padding: .875rem; border: 1px solid var(--rule); border-radius: 1rem; background: var(--paper-hi); }
.dev-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .375rem .625rem; }
.dev-card h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.dev-card h3 .ic { width: 1.625rem; height: 1.625rem; }
.dev-cost { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .375rem; padding: .25rem .625rem; border-radius: .5rem; background: var(--paper-pale); color: var(--soft); font-size: .8125rem; font-weight: 700; }
.dev-cost.billed { background: var(--paper-ink); color: var(--paper-white); }
.dev-cost small { font-size: .6875rem; font-weight: 400; }
.dev-controls { display: grid; align-content: start; gap: .625rem; }
.dev-controls .sample-control { display: grid; gap: .625rem; }
.dev-controls .sample-control[hidden] { display: none; }
.dev-controls .btn { width: 100%; min-height: 2.75rem; padding: .5rem .875rem; font-size: .875rem; }
.dev-controls .field label { font-size: .875rem; }
.dev-quota { color: var(--ink); font-size: .875rem; font-weight: 700; }
.dev-target { color: var(--soft); font-size: .875rem; }
.dev-target b { margin-inline-start: .25rem; color: var(--ink); }
.dev-card [role=status]:empty { position: absolute; }
@media (min-width: 700px) {
  .dev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.page.message-preview { max-width: 54rem; }
.message-preview-head { margin-bottom: 1.5rem; }
.message-preview-head .view-title { font-size: clamp(1.625rem, 5vw, 2.75rem); line-height: 1.2; }
.message-preview-grid { display: grid; align-items: start; gap: 1rem; }
.message-chat { max-width: none; min-width: 0; }
.message-chat h2 { font-size: 1rem; }
.message-chat-body { display: grid; gap: 1.25rem; padding: clamp(.875rem, 3vw, 1.25rem); }
.message-example { min-width: 0; }
.message-example-title { margin-bottom: .5rem; color: #263943; font-size: .875rem; }
.message-link-status { margin-top: .5rem; color: #263943; font-size: .8125rem; }
.message-card { max-width: 21rem; overflow: hidden; border-radius: 1rem; background: #fff; color: #1d272d; box-shadow: 0 1px 3px #18262e24; }
.message-card-main { display: block; color: inherit; text-decoration: none; }
.message-card-heading { padding: .625rem .875rem; font-size: .875rem; font-weight: 700; }
.message-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #ede9e5; }
.message-card-image.wide { aspect-ratio: 2 / 1; }
.message-card-copy { padding: .75rem .875rem; overflow-wrap: anywhere; }
.message-card-copy h4 { font-size: 1.0625rem; line-height: 1.35; }
.message-card-copy p { margin-top: .375rem; color: #4b5053; font: .875rem/1.45 var(--sans); white-space: pre-line; }
.message-card-actions { display: grid; gap: .375rem; padding: 0 .625rem .625rem; }
.message-card-action {
  display: grid; place-items: center; min-height: 2.75rem; padding: .375rem .625rem; border-radius: .5rem;
  background: #f1f3f4; color: inherit; font-size: .875rem; font-weight: 700; text-align: center; text-decoration: none;
}
.message-card-action:hover { background: #e2e8eb; }
.message-card :focus-visible { outline-offset: -3px; }
@media (min-width: 640px) {
  .message-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

