@charset "UTF-8";

:root {
  --ink: #172130;
  --muted: #606b7b;
  --paper: #fafbff;
  --white: #fff;
  --line: #d9dfec;
  --blue: #244de8;
  --blue-soft: #eaf0ff;
  --orange: #b55136;
  --orange-soft: #fff0e8;
  --green: #18725b;
  --green-soft: #eaf6ef;
  --red: #ad3f3f;
  --accent-line: #c9d4ff;
  --primary-hover: #1c3ec4;
  --surface-tint: #f0f3ff;
  --control-bg: #f7f9ff;
  --speech-line: #c9d4ff;
  --speech-bg: #ffffff;
  --highlight-ink: #172130;
  --highlight-bg: #ffe878;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [data-curve-surface]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
button { touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; top: -100px; z-index: 20; padding: 14px 20px; background: var(--ink); color: white; }
.skip-link:focus { top: 8px; left: 8px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 32px 18px 24px; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; margin-bottom: 32px; font-size: 22px; font-weight: 800; letter-spacing: -.8px; text-decoration: none; }
.brand-symbol { width: 39px; height: 39px; border-radius: 12px; background: var(--blue); color: white; flex-shrink: 0; }
.brand-symbol svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
#topic-nav { display: flex; flex-direction: column; gap: 5px; }
.topic-button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 9px; background: transparent; padding: 12px 14px; text-align: left; font-size: 16px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.topic-button:hover { background: var(--paper); }
.topic-button.active { color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.topic-button .nav-symbol { width: 23px; text-align: center; font-family: "Avenir Next", Arial, sans-serif; font-size: 18px; font-weight: 600; color: #8a9faa; }
.topic-button.active .nav-symbol { color: var(--blue); }
.topic-button:last-child { margin-bottom: 16px; }
main { margin-left: 224px; padding: 32px clamp(22px, 3.4vw, 58px); max-width: 1660px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.course { font-size: 16px; font-weight: 550; color: var(--muted); margin-bottom: 10px; }
h1 { font-size: clamp(27px, 2.7vw, 38px); line-height: 1.2; letter-spacing: -1.6px; font-weight: 800; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; border: 1px solid var(--accent-line); border-radius: 10px; padding: 10px 16px; background: var(--control-bg); color: var(--muted); font-size: 17px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.text-button:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.text-button:disabled { opacity: .45; cursor: default; }
.book-icon { width: 22px; height: 22px; line-height: 20px; text-align: center; border: 1.6px solid currentColor; border-radius: 50%; font-family: Arial, sans-serif; }
.button-group { display: inline-flex; padding: 4px; background: #eaf0ff; border-radius: 10px; gap: 3px; }
.button-group button { padding: 9px 24px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 650; }
.button-group button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px #17213012; }
.step-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 20px; }
.step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; border: 0; border-bottom: 3px solid var(--line); padding: 7px 2px 14px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1.3; }
.step > span:first-child { width: 23px; height: 23px; flex-shrink: 0; text-align: center; line-height: 23px; font-family: "Avenir Next", Arial, sans-serif; font-size: 13px; border-radius: 50%; background: #eaf0ff; }
.step.current { color: var(--blue); border-color: var(--blue); font-weight: 750; }
.step.current > span:first-child { background: var(--blue); color: white; }
.step.done > span:first-child { background: #dceee4; color: var(--green); }
.practice-board { min-height: 566px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); border: 1px solid var(--line); background: var(--white); border-radius: 18px; box-shadow: 0 8px 28px #17213004; overflow: hidden; scroll-margin-top: 65px; }
.source-panel { padding: 31px clamp(22px, 2.5vw, 38px); background: var(--control-bg); border-right: 1px solid var(--line); }
.source-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 27px; }
.source-header h2 { font-size: 21px; font-weight: 750; letter-spacing: -.6px; }
.source-panel .button-group { background: var(--line); padding: 3px; }
.source-panel .button-group button { padding: 8px 12px; font-size: 14px; }
.resource-line { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 28px; }
.resource-line strong { font-weight: 750; }
.data-table { width: 100%; border-spacing: 0; table-layout: fixed; text-align: center; }
.data-table caption { text-align: left; font-size: 16px; color: var(--muted); margin-bottom: 17px; line-height: 1.5; }
.data-table th { font-weight: 650; }
.data-table thead th { padding: 7px 0 22px; font-size: 17px; }
.data-table th:first-child { width: 25%; }
.good-heading { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.good-icon { width: 43px; height: 43px; color: var(--ink); }
.data-table tbody tr:first-child > * { border-top: 1px solid var(--line); }
.data-table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.data-table tbody th { font-size: 18px; text-align: left; }
.data-table tbody td { padding: 23px 12px; }
.actor { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; }
.actor-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--blue); flex-shrink: 0; }
.actor-b .actor-dot { background: var(--orange); }
.data-number { font-family: "Avenir Next", Arial, sans-serif; font-weight: 600; font-size: 37px; line-height: 1.1; letter-spacing: -1px; }
.actor-a .data-number { color: var(--blue); }
.actor-b .data-number { color: var(--orange); }
.data-number small { font-family: "Apple SD Gothic Neo", sans-serif; font-size: 15px; margin-left: 3px; font-weight: 500; letter-spacing: 0; }
.resource-foot { margin-top: 22px; color: var(--muted); line-height: 1.6; font-size: 16px; }
.work-panel { padding: 34px clamp(22px, 2.7vw, 40px); display: flex; flex-direction: column; }
.question-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; color: var(--blue); font-size: 16px; font-weight: 750; }
.question-top .question-index { font-size: 16px; color: var(--muted); font-weight: 500; }
#question-title { font-size: clamp(23px, 2.1vw, 29px); font-weight: 800; line-height: 1.45; letter-spacing: -.9px; word-break: keep-all; }
#question-title:focus { outline: none; }
.question-description { margin-top: 15px; color: var(--muted); font-size: 17px; line-height: 1.65; word-break: keep-all; }
.reveal-instruction { margin-top: 21px; color: var(--muted); font-size: 16px; }
.blank-list { margin: 18px 0 24px; }
.blank-row { padding: 17px 0; border-bottom: 1px solid var(--line); }
.blank-line-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.blank-label { font-size: 18px; font-weight: 650; flex: 1 1 90px; min-width: 0; }
.forgone-label { display: block; font-size: 16px; font-weight: 500; color: var(--muted); margin-top: 7px; }
.answer-blank { display: flex; align-items: center; justify-content: center; min-width: 112px; max-width: 100%; min-height: 52px; padding: 9px 15px; border: 1.5px dashed var(--speech-line); border-radius: 8px; background: var(--surface-tint); color: var(--blue); font-size: 21px; font-weight: 750; }
.answer-blank:hover { border-color: var(--blue); background: var(--blue-soft); }
.answer-blank.revealed { border-style: solid; border-color: var(--accent-line); background: var(--blue-soft); }
.blank-stroke { width: 49px; height: 15px; border-bottom: 2px solid var(--speech-line); }
.blank-unit { font-size: 16px; color: var(--muted); }
.blank-explanation { margin-top: 13px; font-size: 16px; color: var(--muted); line-height: 1.65; word-break: keep-all; }
.practice-footer { margin-top: auto; padding-top: 10px; }
.practice-footer .text-button { display: block; margin-left: auto; margin-bottom: 13px; color: var(--muted); }
.practice-footer .text-button:disabled { opacity: .4; cursor: default; }
.practice-footer .primary-button { font-size: 16px; }
.practice-board.summary-board { grid-template-columns: minmax(240px, .75fr) minmax(0, 1.75fr); min-height: 0; }
.summary-board .source-panel { padding: 24px 22px; }
.summary-board .source-header { flex-wrap: wrap; margin-bottom: 20px; }
.summary-board .source-header h2 { font-size: 20px; }
.summary-board .resource-line { margin-bottom: 18px; gap: 6px; }
.summary-board .data-table caption { font-size: 16px; margin-bottom: 12px; }
.summary-board .data-table thead th { padding-bottom: 15px; font-size: 16px; }
.summary-board .data-table tbody th { font-size: 17px; }
.summary-board .data-table tbody td { padding: 17px 5px; }
.summary-board .data-number { font-size: 30px; }
.summary-board .good-icon { width: 34px; height: 34px; }
.summary-work { padding: 23px 25px 18px; min-width: 0; }
.summary-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; }
.summary-heading #question-title { font-size: 25px; }
.summary-heading > span { color: var(--muted); font-size: 16px; }
.summary-table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 17px; }
.summary-table th, .summary-table td { padding: 10px 9px; border: 1px solid var(--line); }
.summary-table thead th { background: var(--blue-soft); font-size: 17px; font-weight: 750; }
.summary-table thead th:first-child { width: 110px; }
.summary-table tbody th { background: var(--control-bg); text-align: left; font-size: 16px; line-height: 1.5; font-weight: 650; word-break: keep-all; }
.summary-table .answer-blank { min-width: 82px; min-height: 43px; padding: 6px 11px; font-size: 19px; }
.summary-table .blank-stroke { width: 36px; height: 13px; }
.summary-answer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.summary-answer > span { color: var(--muted); font-size: 16px; }
.summary-prompt { font-size: 16px; line-height: 1.5; margin-bottom: 7px; word-break: keep-all; }
.summary-inline, .summary-range { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 16px; }
.summary-range { justify-content: center; flex-wrap: nowrap; gap: 5px; }
.summary-range .answer-blank { min-width: 64px; }
.summary-range > span { font-size: 15px; white-space: nowrap; }
.summary-explanations .blank-explanation { border-top: 1px solid var(--line); padding-top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 53px; width: 100%; padding: 15px 18px; border: 0; border-radius: 10px; background: var(--blue); color: white; font-size: 17px; font-weight: 750; }
.primary-button:hover { background: var(--primary-hover); }
.fraction { display: inline-flex; vertical-align: middle; flex-direction: column; align-items: center; font-size: .85em; line-height: 1.15; padding: 0 3px; }
.fraction > span:first-child { border-bottom: 1.4px solid currentColor; min-width: 100%; text-align: center; padding: 0 3px 2px; }
.fraction > span:last-child { padding-top: 2px; }
.exchange { margin-top: 24px; padding: 18px; background: var(--blue-soft); border-radius: 11px; }
.exchange-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.exchange-row + .exchange-row { margin-top: 15px; }
.exchange-row .actor { font-size: 16px; }
.exchange-quantity { text-align: center; font-size: 18px; font-weight: 750; }
.exchange-arrow { color: var(--blue); padding: 5px 0 0; }
.graph { margin-top: 22px; width: 100%; max-height: 240px; }
.graph text { font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 14px; fill: var(--muted); }
.graph .point-label { fill: var(--blue); font-weight: 750; }
.graph .axis { stroke: #8a9faa; stroke-width: 1.3; }
.graph .curve { stroke: var(--blue); stroke-width: 3; fill: none; }
dialog { width: min(620px, calc(100% - 28px)); max-height: 88vh; padding: 30px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); box-shadow: 0 24px 80px #17213033; }
dialog::backdrop { background: #17213066; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.dialog-heading h2 { font-size: 26px; letter-spacing: -.9px; }
.icon-button { width: 42px; height: 42px; border: 0; background: var(--paper); border-radius: 50%; font-size: 26px; flex-shrink: 0; }
.concept-list { margin: 22px 0 0; }
.concept-list > div { padding: 19px 0; border-top: 1px solid var(--line); }
.concept-list dt { color: var(--blue); font-size: 19px; font-weight: 750; margin-bottom: 9px; }
.concept-list dd { font-size: 17px; line-height: 1.7; margin: 0; }
.formula { margin-top: 12px; padding: 13px 16px; border-radius: 8px; background: var(--paper); font-size: 16px; }

.concept-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.learning-board { display: block; }
.absolute-active .page-header { display: none; }
.absolute-active { padding-top: 20px; }
.absolute-active .learn-view { padding: 16px 24px; }
.absolute-active .learn-topic { margin-bottom: 4px; }
.absolute-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 12px 0; }
.absolute-toolbar .text-button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 17px; }
.absolute-toolbar [data-learn-action="absolute-play"] { border-color: var(--accent-line); background: var(--surface-tint); color: var(--blue); }
.absolute-toolbar [data-learn-action="absolute-play"]::before { content: '▶'; font-size: 13px; }
.absolute-toolbar [data-learn-action="absolute-play"][aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.absolute-toolbar [data-learn-action="absolute-play"][aria-pressed="true"]::before { content: 'Ⅱ'; }
.absolute-toolbar .text-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.absolute-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.absolute-example { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.absolute-example.is-current { border-color: var(--blue); box-shadow: none; }
.absolute-example-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.absolute-example-heading h3 { display: flex; align-items: center; min-height: 56px; font-size: 23px; line-height: 1.35; word-break: keep-all; }
.absolute-example-heading > strong { color: var(--blue); font-size: 18px; }
.absolute-condition { font-size: 18px; margin: 6px 0 8px; word-break: keep-all; }
.absolute-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: center; }
.absolute-table th, .absolute-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.absolute-table tr > :first-child { border-left: 1px solid var(--line); width: 64px; }
.absolute-table thead th { border-top: 1px solid var(--line); background: #eaf0ff; font-size: 18px; }
.absolute-example:nth-child(2) .absolute-table thead th { background: #edf4f2; }
.absolute-table tbody th { font-size: 20px; background: var(--control-bg); }
.absolute-table th button { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; width: 100%; min-height: 44px; padding: 6px 3px; border: 0; background: transparent; font-size: 23px; font-weight: 750; }
.absolute-table th small { font-size: 16px; font-weight: 500; }
.absolute-table tbody th button { flex-direction: column; width: calc(100% - 8px); min-height: 66px; margin: 4px auto; gap: 2px; border: 1px solid var(--accent-line); border-radius: 6px; background: white; color: var(--blue); font-size: 20px; }
.absolute-table tbody th button small { min-height: 17px; font-size: 13px; font-weight: 650; }
.absolute-table tbody th button[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); }
.absolute-table tbody th button:hover:not(:disabled) { background: #ffe39a; }
.absolute-feedback { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding: 16px; border: 2px solid #e6a02f; border-radius: 12px; background: #fff5cb; font-size: 21px; line-height: 1.6; }
.absolute-feedback strong { white-space: nowrap; margin-left: 8px; }
.absolute-feedback.is-correct { background: #e1f4e9; border-color: #24836b; }
.absolute-feedback.is-retry { border-color: #c6504c; }
.absolute-table td { position: relative; height: 76px; padding: 8px 2px 24px; line-height: 1.2; }
.absolute-table td > strong { display: inline-block; font: 650 39px/1 "Avenir Next", Arial, sans-serif; }
.absolute-unit { font-size: 16px; margin-left: 4px; }
.absolute-stamp { position: absolute; left: 0; right: 0; bottom: 5px; font-size: 15px; line-height: 18px; font-weight: 750; }
.absolute-table .absolute-column { background: var(--blue-soft); }
.absolute-table th.absolute-column { box-shadow: inset 0 4px var(--blue); }
.absolute-comparing > strong { animation: absolute-compare .7s ease-in-out 2; }
@keyframes absolute-compare { 50% { color: var(--blue); transform: translateY(-3px); } }
.absolute-table .absolute-winner { position: relative; background: #e1f4e9; color: #096951; box-shadow: inset 0 0 0 2px #24836b; }
.absolute-winner.absolute-column > strong { animation: gain-pop .4s ease-out; }
.absolute-explanation { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 86px; margin-top: 14px; padding: 10px 16px; border-radius: 10px; background: var(--blue-soft); font-size: 19px; line-height: 1.4; }
.absolute-explanation strong { color: var(--blue); }
.absolute-equation { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 26px; line-height: 1.2; font-weight: 750; }
.absolute-equation small { font-size: 17px; margin-left: 4px; font-weight: 500; }
.absolute-question { font-size: 24px; font-weight: 700; }
.absolute-active .learn-footer { margin-top: 12px; padding-top: 12px; }
.absolute-active .learn-takeaway { font-size: 17px; margin-top: 10px; }
.learn-view { padding: 32px 36px 27px; }
.learn-topic { display: block; color: var(--blue); font-size: 16px; font-weight: 750; margin-bottom: 11px; }
.learn-heading #question-title { font-size: clamp(24px, 2.3vw, 32px); }
.learn-controls { margin: 23px 0 24px; }
.country-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 23px; }
.production-toolbar { display: flex; justify-content: flex-end; margin: 10px 0 14px; }
.production-country.learn-country { padding: 0; border: 1px solid var(--accent-line); background: var(--surface-tint); }
.production-country.learn-country.actor-b { border-color: #e4bba5; background: #fff6ef; }
.production-country .learn-country-header { padding: 18px; border-bottom: 1px solid var(--line); background: var(--blue-soft); }
.production-country.actor-b .learn-country-header { border-color: #efd6c7; background: #ffeadc; }
.production-country .learn-country-header .actor { font-size: 23px; }
.production-conditions { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 18px 0; font-size: 17px; line-height: 1.5; }
.production-conditions > span { white-space: nowrap; }
.production-allocation { --rice-color: var(--blue); --clothes-color: #56836e; padding: 16px 18px 0; }
.actor-b .production-allocation { --rice-color: var(--orange); }
.allocation-labels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; font-size: 18px; }
.allocation-labels > span { display: grid; gap: 3px; text-align: center; }
.allocation-labels strong { font-size: 22px; }
.allocation-product { display: flex; justify-content: center; align-items: center; gap: 5px; }
.allocation-product .good-icon { width: 23px; height: 23px; }
.allocation-worker-floor { position: relative; height: 76px; margin-top: 8px; overflow: hidden; }
.allocation-workplace { position: absolute; inset: 0 50% 0 0; margin-right: 4px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--blue-soft); }
.workplace-clothes { inset: 0 0 0 50%; margin-right: 0; margin-left: 4px; border-color: #bed7ca; background: var(--green-soft); }
.actor-b .workplace-rice { border-color: #edbea8; background: var(--orange-soft); }
.allocation-worker { position: absolute; display: flex; justify-content: center; width: 7%; height: 27px; color: var(--rice-color); transform: translateX(-50%); transition: left .38s ease, top .38s ease, color .25s ease; }
.allocation-worker-1 { color: var(--clothes-color); }
.allocation-worker svg { width: 20px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.allocation-worker svg circle { fill: currentColor; stroke: none; }
@media (prefers-reduced-motion: reduce) { .allocation-worker { transition: none; } }
.allocation-labels > span:first-child { color: var(--rice-color); }
.allocation-labels > span:last-child { color: var(--clothes-color); }
.production-slider { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 48px; padding: 0; margin: 3px 0 0; background: transparent; cursor: ew-resize; touch-action: pan-y; }
.production-slider::-webkit-slider-runnable-track { height: 18px; border-radius: 9px; background: linear-gradient(to right, var(--rice-color), var(--clothes-color)); }
.production-slider::-moz-range-track { height: 18px; border-radius: 9px; background: linear-gradient(to right, var(--rice-color), var(--clothes-color)); }
.production-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 28px; height: 38px; margin-top: -10px; border: 2px solid var(--rice-color); border-radius: 8px; background: white; box-shadow: 0 2px 5px #17213025; }
.production-slider::-moz-range-thumb { width: 24px; height: 34px; border: 2px solid var(--rice-color); border-radius: 8px; background: white; box-shadow: 0 2px 5px #17213025; }
.production-sectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 15px; }
.production-sector { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 15px 10px 12px; }
.sector-heading { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sector-heading h3 { font-size: 21px; font-weight: 750; }
.sector-heading .good-icon { width: 33px; height: 33px; }
.sector-workers { text-align: center; font-size: 16px; color: var(--muted); margin: 10px 0; }
.production-sector .worker-tokens { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; min-height: 42px; align-content: start; margin: 0 0 13px; }
.production-sector .worker-token { display: flex; justify-content: center; }
.production-sector .worker-token svg { height: 19px; max-width: 15px; }
.production-sector .product-tokens { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; min-height: 121px; padding-bottom: 6px; }
.production-sector .product-token { height: 25px; border-radius: 5px; }
.production-sector .product-token .good-icon { width: 23px; height: 23px; }
.production-quantity { display: block; margin: 6px 0 13px; text-align: center; color: var(--blue); font: 650 34px/1.25 "Avenir Next", Arial, sans-serif; }
.actor-b .production-quantity { color: var(--orange); }
.production-quantity small { font: 500 17px "Apple SD Gothic Neo", sans-serif; margin-left: 4px; }
.production-change { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 15px; border-top: 1px solid var(--line); line-height: 1.3; }
.actor-b .production-change { border-color: #efd6c7; }
.change-amount { padding: 8px 10px; border-radius: 8px; }
.change-caption { display: block; margin-bottom: 5px; font-size: 16px; font-weight: 600; }
.change-amount > div { display: flex; align-items: center; justify-content: center; gap: 7px; }
.change-amount strong { font-size: 25px; font-weight: 800; white-space: nowrap; }
.production-change .change-gain { color: #08735d; background: #ddf1e7; }
.production-change .change-loss { color: #ad2435; background: #fbe0e4; }
.change-link { font-size: 25px; color: var(--muted); text-align: center; }
.change-good-icon { position: relative; display: inline-flex; flex-shrink: 0; }
.change-good-icon .good-icon { width: 27px; height: 27px; color: inherit; }
.change-loss .change-good-icon::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 2px; background: currentColor; transform: rotate(-35deg); }
.has-change .change-amount strong { animation: gain-pop .25s ease-out both; }
.production-sector.is-loss { border: 2px solid #dc6370; padding: 14px 9px 11px; background: #fff5f5; }
.production-sector.is-gain { border-color: #8dbca6; background: #f4faf6; }
.production-sector.is-loss .production-quantity { color: #b52e3b; }
.production-sector .product-token.token-lost { position: relative; background: #f9d8dd; color: #b52e3b; opacity: .68; animation: loss-drop .5s ease-out both; }
.product-token.token-lost::after { content: ''; position: absolute; left: 1px; right: 1px; top: 48%; height: 2px; background: #b52e3b; transform: rotate(-35deg); }
.production-sector .product-token.token-gained { background: #d5eddd; color: var(--green); animation: gain-pop .3s ease-out both; }
@keyframes loss-drop { from { transform: translateY(-7px); opacity: 1; } to { transform: translateY(3px); opacity: .68; } }
@keyframes gain-pop { from { transform: scale(.8); } to { transform: scale(1); } }
.learn-country { border: 1px solid var(--line); border-radius: 13px; padding: 21px 24px 0; background: var(--control-bg); overflow: hidden; }
.learn-country.actor-b { background: #fffcfa; border-color: #efe3dc; }
.learn-country-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 20px; }
.learn-country-header > span:last-child { color: var(--muted); font-size: 16px; }
.worker-tokens { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 22px 0; }
.worker-token { color: var(--blue); }
.actor-b .worker-token { color: var(--orange); }
.worker-token svg { height: 28px; max-width: 20px; width: 100%; fill: currentColor; }
.worker-token path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.worker-token.makes-clothes { color: #8a9faa; }
.production-heading { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 18px; }
.production-heading .good-icon { width: 36px; height: 36px; }
.production-heading strong { margin-left: auto; color: var(--blue); font: 600 40px/1.2 "Avenir Next", Arial, sans-serif; }
.actor-b .production-heading strong { color: var(--orange); }
.production-heading strong small { font-size: 17px; font-family: "Apple SD Gothic Neo", sans-serif; font-weight: 600; margin-left: 5px; }
.product-tokens { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-content: start; gap: 10px 8px; min-height: 100px; padding: 0 0 15px; color: var(--blue); }
.product-token { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 7px; background: var(--blue-soft); }
.product-token .good-icon { width: 29px; height: 29px; }
.actor-b .product-tokens { color: var(--orange); }
.actor-b .product-token { background: var(--orange-soft); }
.country-foot { padding: 15px 0; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.learn-result { margin-top: 24px; padding: 19px 22px; background: var(--blue-soft); border-radius: 10px; font-size: 19px; line-height: 1.7; word-break: keep-all; }
.learn-result strong { color: var(--blue); font-weight: 800; }
.cost-quiz { margin-top: 24px; padding: 7px 24px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--blue-soft); }
.cost-quiz-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 24px 0; font-size: 26px; line-height: 1.6; font-weight: 600; letter-spacing: -.5px; word-break: keep-all; }
.cost-quiz-line + .cost-quiz-line { border-top: 1px solid var(--accent-line); }
.cost-quiz-line > span strong { font-weight: 800; }
.cost-quiz .answer-blank { display: inline-flex; min-width: 160px; min-height: 64px; padding: 8px 18px; font-size: 26px; line-height: 1.3; }
.cost-quiz .blank-stroke { width: 88px; }
.cost-quiz .answer-blank.revealed { background: white; }
.yeonuk-quiz { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 24px; }
.yeonuk-quiz > img { width: 100px; height: 140px; object-fit: contain; image-rendering: pixelated; }
.yeonuk-quiz-bubble { position: relative; padding: 24px; border: 2px solid var(--speech-line); border-radius: 20px; background: var(--speech-bg); }
.yeonuk-quiz-bubble::before { content: ''; position: absolute; left: -15px; top: 28px; width: 24px; height: 24px; background: var(--speech-bg); border-left: 2px solid var(--speech-line); border-bottom: 2px solid var(--speech-line); transform: rotate(45deg); }
.yeonuk-quiz h3 { margin: 12px 0 20px; font-size: 26px; line-height: 1.6; word-break: keep-all; }
.cost-choices { display: flex; gap: 12px; flex-wrap: wrap; }
.cost-choices button { display: inline-flex; align-items: center; gap: 6px; min-width: 116px; min-height: 64px; padding: 10px 16px; border: 2px solid var(--accent-line); border-radius: 10px; background: white; font-size: 24px; font-weight: 750; }
.cost-choices button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.cost-feedback { margin: 20px 0; padding: 14px; border-radius: 10px; font-size: 21px; line-height: 1.7; word-break: keep-all; }
.cost-feedback.is-correct { background: #e1f4e9; color: #096951; }
.cost-feedback.is-retry { background: #fff0ed; color: #a63a35; }
@media (max-width: 680px) {
  .yeonuk-quiz { grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
  .yeonuk-quiz > img { width: 64px; height: 100px; }
  .yeonuk-quiz-bubble { padding: 16px; }
  .yeonuk-quiz h3 { font-size: 21px; }
  .cost-choices button { min-width: 0; padding: 8px 12px; font-size: 21px; }
  .cost-feedback { font-size: 19px; }
}
.learn-takeaway { color: var(--muted); font-size: 17px; line-height: 1.7; margin-top: 14px; word-break: keep-all; }
.learn-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.learn-action-primary { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 49px; padding: 13px 20px; color: white; background: var(--blue); border: 0; border-radius: 9px; font-size: 17px; font-weight: 750; }
.learn-action-primary:hover { background: var(--primary-hover); }
.learn-action-primary:disabled { background: var(--accent-line); }
.learn-action-row { display: flex; align-items: center; gap: 18px; margin: 24px 0; }
.learn-action-row button:disabled, .learn-footer .text-button:disabled { opacity: .45; cursor: default; }
.lost-token, .actor-b .lost-token { position: relative; color: #8a9faa; background: transparent; border: 1px dashed var(--line); }
.lost-token::after { content: ''; position: absolute; inset: 50% 5px auto; height: 1.5px; background: #8a9faa; transform: rotate(-38deg); }
.clothes-line { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 18px 0; font-size: 18px; }
.clothes-line .good-icon { width: 31px; height: 31px; }
.loss-label { margin-left: auto; font-size: 16px; color: var(--muted); }
.opportunity-product { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 22px; margin: 30px 0 0; }
.opportunity-arrow { text-align: center; margin: 14px 0 10px; color: #8a9faa; font-size: 23px; }
.opportunity-label { text-align: center; color: var(--muted); font-size: 17px; }
.opportunity-amount { display: flex; justify-content: center; align-items: center; min-height: 96px; gap: 9px; font-size: 49px; font-family: "Avenir Next", Arial, sans-serif; font-weight: 600; color: var(--blue); }
.actor-b .opportunity-amount { color: var(--orange); }
.comparative-condition-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; }
.comparative-condition-table caption { padding-bottom: 12px; text-align: left; font-size: 20px; font-weight: 700; }
.comparative-condition-table th, .comparative-condition-table td { border: 1px solid var(--line); padding: 6px 8px; }
.comparative-condition-table thead th { background: var(--blue-soft); font-size: 18px; line-height: 1.5; }
.comparative-condition-table th:first-child { width: 18%; }
.comparative-condition-table td { font-size: 18px; }
.comparative-condition-table td > strong { font-size: 32px; margin-right: 4px; }
.comparative-condition-table .actor-a { background: var(--surface-tint); }
.comparative-condition-table .actor-b { background: #fff6ef; }
.comparative-condition-table .opportunity-amount { min-height: 50px; font-size: 34px; }
.comparative-condition-table .answer-blank { min-width: 85px; min-height: 48px; padding: 8px; }
.comparative-condition-table .blank-stroke { width: 46px; }
.comparative-condition-table .country-winner th { color: #096951; background: #e1f4e9; box-shadow: inset 0 0 0 2px #24836b; }
.comparison-cost-task { text-align: center; font-size: 18px; }
.comparison-cost-choices { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.comparison-cost-choices button { display: inline-flex; align-items: center; gap: 4px; justify-content: center; min-width: 70px; min-height: 50px; padding: 8px; border: 2px solid var(--accent-line); border-radius: 8px; background: white; font-size: 21px; }
.comparison-cost-choices button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.comparison-cost-feedback { margin: 14px 0; font-size: 19px; line-height: 1.5; word-break: keep-all; }
.comparative-pick-row { padding: 20px 0; }
.comparative-pick-row + .comparative-pick-row { border-top: 1px solid var(--accent-line); }
.comparative-pick-row h3 { margin-bottom: 16px; font-size: 24px; line-height: 1.5; }
.comparative-picks { display: flex; flex-wrap: wrap; gap: 14px; }
.comparative-picks button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 138px; min-height: 62px; padding: 12px 20px; border: 2px solid var(--accent-line); border-radius: 10px; background: white; font-size: 25px; font-weight: 750; }
.comparative-picks .is-correct { color: #096951; background: #e1f4e9; border-color: #24836b; }
.comparative-picks .is-wrong { color: #ad2435; border-color: #d46b79; background: #fff0f2; }
.comparative-pick-feedback { margin-top: 14px; font-size: 20px; line-height: 1.6; }
.comparative-continue { padding-bottom: 20px; }
.comparative-continue button { min-height: 48px; padding: 10px 18px; font-size: 20px; }
.opportunity-amount small { font-family: "Apple SD Gothic Neo", sans-serif; font-size: 20px; font-weight: 500; }
.comparative-rule { font-size: 22px; line-height: 1.7; margin: -5px 0 24px; word-break: keep-all; }
.comparative-rule strong { color: var(--blue); }
.country-winner { outline: 2px solid var(--green); outline-offset: -1px; }
.trade-country { container-type: inline-size; padding-bottom: 18px; }
.ppf-rule { margin: 18px 0 0; font-size: 21px; line-height: 1.7; word-break: keep-all; }
.ppf-rule strong { color: var(--blue); }
.ppf-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 18px 0 14px; font-size: 16px; color: var(--muted); }
.ppf-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ppf-legend i { width: 24px; border-top: 3px solid var(--ink); }
.ppf-legend .legend-other { border-top: 2px dashed #8a9faa; }
.ppf-legend .legend-consumption { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--green); }
.ppf-panel { color: var(--blue); margin: 12px 0 18px; }
.actor-b .ppf-panel { color: var(--orange); }
.ppf-graph { display: block; width: 100%; height: auto; overflow: visible; }
.ppf-graph text { fill: var(--muted); font: 16px "Apple SD Gothic Neo", sans-serif; }
.ppf-graph .ppf-axis-label { fill: var(--ink); font-size: 18px; font-weight: 650; }
.ppf-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.ppf-axis { fill: none; stroke: #8a9faa; stroke-width: 1.5; }
.ppf-area { fill: currentColor; opacity: .07; }
.ppf-other { fill: none; stroke: #8a9faa; stroke-width: 2; stroke-dasharray: 5 5; }
.ppf-line { fill: none; stroke: currentColor; stroke-width: 3; }
.ppf-start { fill: white; stroke: #8a9faa; stroke-width: 2; }
.ppf-point { fill: currentColor; stroke: white; stroke-width: 2; }
.ppf-push { stroke: currentColor; stroke-width: 7; opacity: .25; }
.ppf-graph .ppf-direction { fill: currentColor; font-size: 19px; font-weight: 800; }
.ppf-moving { animation: ppf-push .85s ease-in-out both; }
@keyframes ppf-push { from { transform: translate(var(--point-dx), var(--point-dy)); } to { transform: translate(0, 0); } }
.ppf-consumption { fill: var(--green); stroke: white; stroke-width: 2; }
.ppf-consumption-link { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 4 4; }
.ppf-graph .ppf-consumption-label { fill: var(--green); font-size: 18px; font-weight: 750; }
.ppf-cost { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; font-size: 18px; color: var(--ink); }
.ppf-cost strong { color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.actor-b .ppf-cost strong { color: var(--orange); }
.ppf-choice { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; font-size: 18px; color: var(--ink); }
.ppf-choice .answer-blank { min-height: 44px; min-width: 106px; font-size: 21px; }
.ppf-choice .answer-blank:disabled { cursor: default; opacity: 1; }
.curve-active .page-header { display: none; }
.curve-active .learn-view { padding: 22px 26px; }
.curve-active .learn-footer { margin-top: 14px; padding-top: 14px; }
.curve-active .learn-topic { margin-bottom: 6px; }
.curve-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.curve-graphic { max-width: 360px; margin: 0 auto; }
.curve-legend { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 18px; }
.curve-cost-table { width: 100%; border-collapse: collapse; text-align: center; }
.curve-cost-table caption { padding-bottom: 10px; text-align: left; font-size: 18px; font-weight: 750; }
.curve-cost-table th, .curve-cost-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.curve-cost-table thead th { font-size: 17px; font-weight: 600; background: var(--blue-soft); }
.curve-cost-table tbody th, .curve-cost-table td { font-size: 20px; }
.curve-minor-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.curve-graph[data-curve-surface] { cursor: crosshair; touch-action: manipulation; }
.curve-graph .curve-tick { font-size: 13px; }
.curve-draft { color: var(--blue); }
.curve-draft path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 4 4; }
.curve-draft circle { fill: white; stroke: currentColor; stroke-width: 3; }
.curve-draft text { font-size: 18px; fill: currentColor; font-weight: 750; paint-order: stroke; stroke: white; stroke-width: 4px; }
.curve-draft.is-wrong { color: #ba3d42; }
.curve-assistant { position: relative; margin: 20px 0 0 62px; min-width: 0; z-index: 8; filter: drop-shadow(0 6px 12px #17213018); }
.curve-coach-bubble { min-width: 0; padding: 14px; border: 2px solid var(--speech-line); border-radius: 14px; background: var(--speech-bg); }
.curve-coach-heading { display: flex; align-items: center; gap: 10px; }
.curve-coach-heading img { position: absolute; left: -62px; bottom: 8px; width: 56px; height: 80px; object-fit: contain; image-rendering: pixelated; }
.curve-coach-bubble .yeonuk-name { font-size: 20px; }
.curve-coach-bubble h3 { margin: 7px 0 12px; font-size: 21px; line-height: 1.5; word-break: keep-all; }
.curve-point-feedback { font-size: 19px; line-height: 1.6; margin: 10px 0; word-break: keep-all; }
.curve-point-feedback.is-correct { color: #096951; }
.curve-point-feedback.is-retry { color: #a63a35; }
.curve-actor-0 { color: var(--blue); }
.curve-actor-1 { color: var(--orange); }
.curve-actor-1 .curve-line { stroke-dasharray: 7 4; }
.curve-dot { fill: currentColor; stroke: white; stroke-width: 2; animation: gain-pop .2s ease-out; transform-box: fill-box; transform-origin: center; }
.ppf-graph .curve-dot-label { font-size: 18px; font-weight: 750; fill: currentColor; }
.ppf-graph .curve-line-label { font-size: 18px; font-weight: 750; fill: currentColor; paint-order: stroke; stroke: white; stroke-width: 4px; stroke-linejoin: round; }
.curve-draw-actions { display: flex; margin-top: 7px; }
.curve-draw-actions button { flex: 1; min-height: 44px; border: 1px solid var(--blue); padding: 9px; border-radius: 6px; background: var(--blue); color: white; font-size: 16px; font-weight: 700; }
.curve-draw-actions button:disabled { opacity: .4; cursor: default; }
.curve-drawing > .curve-assistant { grid-column: 1 / -1; margin: 0 0 0 62px; }
.curve-drawing .curve-coach-bubble h3 { margin: 8px 0 0; }
.curve-drawing .curve-point-feedback { margin: 6px 0 0; }
.curve-drawing .curve-draw-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.curve-drawing .curve-draw-actions button { flex: 0 1 auto; min-height: 48px; padding: 10px 16px; font-size: 18px; }
@media (max-width: 680px) {
  .curve-drawing > .curve-assistant { margin-left: 54px; }
  .curve-drawing .curve-draw-actions button { flex: 1 1 100%; }
}
.curve-cost-value { color: var(--blue); font-size: 21px; }
.actor-b .curve-cost-value { color: var(--orange); }
.trade-workplaces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trade-workplace { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; background: white; text-align: center; }
.trade-workplace.is-specialized { border-color: var(--blue); background: var(--blue-soft); }
.actor-b .trade-workplace.is-specialized { border-color: var(--orange); background: var(--orange-soft); }
.trade-good { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 21px; }
.trade-good .good-icon { width: 30px; height: 30px; }
.trade-worker-count { font-size: 20px; font-weight: 750; margin-top: 9px; }
.trade-workplace .worker-tokens { grid-template-columns: repeat(6, minmax(0, 1fr)); min-height: 60px; margin: 10px 0; gap: 4px 2px; align-content: start; }
.trade-made { border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px; white-space: nowrap; }
.trade-made strong { font: 650 29px/1.2 "Avenir Next", Arial, sans-serif; color: var(--blue); }
.actor-b .trade-made strong { color: var(--orange); }
.worker-moved { animation: worker-gather .85s ease-in-out both; }
@keyframes worker-gather { from { transform: translateX(calc(var(--worker-origin) * (50cqw + 6px))); } to { transform: translateX(0); } }
.trade-total { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 23px; font-size: 20px; }
.trade-total-gain { background: var(--green-soft); color: var(--green); padding: 6px 10px; border-radius: 6px; font-weight: 750; }
.trade-route { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 22px 0; }
.trade-lanes { display: grid; gap: 10px; min-width: 0; }
.trade-lane { position: relative; height: 63px; color: var(--blue); }
.trade-lane::before { content: ''; position: absolute; left: 0; right: 0; top: 46px; border-top: 2px dashed currentColor; opacity: .3; }
.trade-lane strong { display: block; text-align: center; font-size: 18px; }
.trade-parcel { position: absolute; left: calc(100% - 108px); top: 29px; display: flex; gap: 4px; width: 108px; background: white; color: var(--blue); animation: parcel-exchange 1.1s ease-in-out both; }
.trade-parcel .good-icon { color: inherit; width: 24px; height: 30px; flex: 1; }
.lane-1 { color: var(--orange); }
.lane-1 .trade-parcel { color: var(--orange); width: 80px; left: 0; animation-name: parcel-return; }
@keyframes parcel-exchange { from { left: 0; } to { left: calc(100% - 108px); } }
@keyframes parcel-return { from { left: calc(100% - 80px); } to { left: 0; } }
.trade-benefits h3 { font-size: 24px; margin: 24px 0 18px; }
.trade-benefit { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.trade-before-after { display: grid; grid-template-columns: 1fr 24px 1fr; margin: -23px 60px 13px 72px; color: var(--muted); font-size: 16px; text-align: center; }
.trade-benefit-row { display: grid; grid-template-columns: 72px 1fr 24px 1fr 60px; gap: 0; align-items: center; min-height: 49px; font-size: 26px; text-align: center; }
.trade-benefit-row > span:first-child { font-size: 18px; text-align: left; }
.trade-benefit-row small { font-size: 14px; margin-left: 3px; }
.trade-benefit-row > span:nth-child(3) { color: var(--muted); font-size: 20px; }
.trade-benefit-row em { font-size: 16px; font-style: normal; color: var(--muted); }
.trade-benefit-row.has-gain { color: var(--green); background: #f1faf5; border-radius: 6px; }
.trade-benefit-row.has-gain em { color: var(--green); font-weight: 750; }
.learn-price-controls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 24px 0 0; }
.learn-price-controls button { border: 1.5px solid var(--line); background: white; border-radius: 8px; padding: 13px 6px; font-size: 18px; font-weight: 650; }
.learn-price-controls button[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.profit-label { margin: 24px -24px 0; padding: 16px; text-align: center; border-top: 1px solid var(--line); background: var(--surface-tint); font-size: 19px; font-weight: 750; }
.profit-positive { color: var(--green); background: var(--green-soft); }
.profit-negative { color: var(--red); background: #fbefef; }

@media (min-width: 1600px) { main { margin-right: auto; } }
@media (max-width: 1180px) {
  .sidebar { width: 194px; padding: 28px 12px 22px; }
  .brand { font-size: 20px; gap: 8px; padding: 0 4px; }
  .brand-symbol { width: 34px; height: 34px; }
  .topic-button { padding: 12px 11px; gap: 9px; font-size: 16px; }
  main { margin-left: 194px; padding: 33px 25px; }
  .practice-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .source-panel, .work-panel { padding: 27px 23px; }
  .source-header { flex-wrap: wrap; margin-bottom: 22px; }
  .step { font-size: 14px; gap: 5px; }
  .data-table tbody td { padding: 23px 8px; }
  .data-number { font-size: 33px; }
}
@media (max-width: 960px) {
  .sidebar { position: static; width: auto; padding: 18px 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 0 17px; }
  #topic-nav { flex-direction: row; gap: 6px; overflow-x: auto; padding-bottom: 12px; }
  .topic-button { width: auto; padding: 11px 15px; gap: 7px; }
  .topic-button:last-child { margin-bottom: 0; }
  .topic-button .nav-symbol { display: none; }
  main { margin-left: 0; padding: 30px 28px; }
  .page-header { margin-bottom: 25px; }
  .practice-board { min-height: 540px; }
  .learn-view { padding: 28px; }
  .learn-country { padding: 20px 18px 0; }
}
@media (max-width: 680px) {
  :root { font-size: 16px; }
  .sidebar { padding: 16px 17px 0; }
  .brand { font-size: 19px; }
  .brand-symbol { width: 32px; height: 32px; border-radius: 10px; }
  .topic-button { padding: 10px 13px; font-size: 15px; }
  main { padding: 26px 17px 35px; }
  .page-header { display: block; position: relative; }
  .course { font-size: 14px; margin-bottom: 8px; }
  h1 { font-size: 27px; letter-spacing: -1.1px; }
  #concept-button { position: absolute; right: 0; top: -6px; font-size: 14px; gap: 5px; margin-top: 2px; }
  .book-icon { width: 18px; height: 18px; line-height: 16px; font-size: 13px; }
  .button-group button { padding: 8px 20px; font-size: 15px; }
  .new-case { font-size: 14px; gap: 5px; }
  .step-nav { gap: 5px; margin-bottom: 18px; }
  .step { justify-content: center; border-bottom-width: 2px; gap: 0; padding: 5px 0 11px; }
  .step .step-label { display: none; }
  .step > span:first-child { width: 25px; height: 25px; line-height: 25px; font-size: 13px; }
  .practice-board { display: block; border-radius: 14px; }
  .source-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px; }
  .source-header { flex-wrap: nowrap; margin-bottom: 18px; }
  .source-header h2 { font-size: 19px; }
  .source-panel .button-group button { font-size: 13px; padding: 8px 10px; }
  .resource-line { margin-bottom: 17px; font-size: 16px; }
  .data-table caption { margin-bottom: 12px; font-size: 15px; }
  .data-table thead th { padding-bottom: 15px; }
  .good-icon { width: 33px; height: 33px; }
  .good-heading { flex-direction: column; justify-content: center; gap: 6px; font-size: 16px; }
  .data-table tbody td { padding: 18px 10px; }
  .data-number { font-size: 32px; }
  .data-table tbody th { font-size: 17px; }
  .resource-foot { margin-top: 14px; font-size: 15px; }
  .work-panel { padding: 25px 24px 28px; }
  .summary-work { padding: 23px 16px 18px; }
  .summary-heading #question-title { font-size: 24px; }
  .summary-heading > span { font-size: 15px; }
  .summary-table th, .summary-table td { padding: 10px 5px; }
  .summary-table thead th:first-child { width: 82px; }
  .summary-table thead th, .summary-table tbody th { font-size: 15px; }
  .summary-table .answer-blank { min-width: 70px; padding: 6px; font-size: 18px; }
  .summary-answer > span { font-size: 15px; }
  .summary-board .source-header { flex-wrap: nowrap; }
  .question-top { margin-bottom: 16px; font-size: 15px; }
  #question-title { font-size: 25px; }
  .question-description { font-size: 16px; }
  .exchange-row { gap: 7px; }
  .exchange-quantity { font-size: 16px; }
  .exchange-row .actor { font-size: 15px; gap: 5px; }
  .learn-view { padding: 23px 20px; }
  .learn-heading #question-title { font-size: 26px; }
  .learn-topic { font-size: 15px; }
  .country-pair { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .learn-country { padding: 19px 20px 0; }
  .learn-country-header { font-size: 19px; }
  .worker-tokens { margin: 19px 0; }
  .product-tokens { min-height: 92px; }
  .learn-result { font-size: 18px; padding: 17px; }
  .cost-quiz { padding: 4px 18px; }
  .cost-quiz-line { font-size: 23px; padding: 20px 0; gap: 10px; }
  .cost-quiz .answer-blank { min-width: 144px; min-height: 60px; font-size: 24px; }
  .learn-takeaway { font-size: 16px; }
  .learn-footer { gap: 10px; }
  .learn-footer .text-button { font-size: 15px; gap: 5px; }
  .learn-action-primary { font-size: 15px; padding: 12px 14px; gap: 10px; }
  .learn-action-row { gap: 11px; }
  .learn-action-row .text-button { font-size: 14px; }
  .loss-label { font-size: 15px; }
  .opportunity-product { margin-top: 25px; }
  .comparative-rule { font-size: 20px; }
  .opportunity-amount { min-height: 78px; font-size: 44px; }
  .trade-total { flex-wrap: wrap; gap: 10px; font-size: 17px; }
  .trade-controls { display: flex; }
  .trade-controls button { flex: 1; padding: 10px 6px; font-size: 15px; }
  .ppf-rule { font-size: 19px; }
  .trade-country { padding: 18px 14px; }
  .trade-route { gap: 8px; }
  .trade-route .actor { font-size: 17px; gap: 5px; }
  .trade-benefit { padding: 16px 12px; }
  .trade-benefit-row { grid-template-columns: 68px 1fr 20px 1fr 54px; }
  .trade-benefit-row > span:first-child { font-size: 17px; }
  .trade-benefit-row small { margin-left: 1px; }
  .trade-before-after { margin: 12px 54px 6px 68px; grid-template-columns: 1fr 20px 1fr; }
  .learn-price-controls { gap: 6px; }
  .learn-price-controls button { font-size: 16px; padding: 12px 3px; }
  dialog { padding: 24px; }
}
@media (min-width: 681px) and (max-height: 780px) {
  .absolute-active .learn-topic { display: none; }
  .absolute-active .learn-heading #question-title { font-size: 26px; }
  .curve-active .learn-view { padding: 16px 22px; }
  .curve-active .learn-topic { display: none; }
  .curve-active .learn-heading #question-title { font-size: 26px; }
  .curve-active .curve-graphic { max-width: 300px; }
}
@media (max-width: 680px) {
  .curve-active .learn-view { padding: 20px 14px; }
  .absolute-active .learn-view { padding: 21px 16px; }
  .absolute-tables { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .absolute-example { padding: 12px; }
  .absolute-example-heading h3 { font-size: 21px; }
  .absolute-example-heading > strong { font-size: 17px; }
  .absolute-table td > strong { font-size: 34px; }
  .absolute-table th button { font-size: 21px; }
  .absolute-explanation { padding: 14px; font-size: 18px; }
  .absolute-equation { font-size: 26px; gap: 8px; }
  .production-change { padding: 9px 12px; gap: 6px; }
  .change-amount { padding: 7px; }
  .change-amount > div { flex-direction: column; gap: 3px; }
  .change-amount strong { font-size: 22px; }
  .change-caption { font-size: 15px; text-align: center; }
  .curve-workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .curve-active .learn-footer { align-items: stretch; flex-direction: column-reverse; }
  .curve-legend { gap: 9px; }
}
.coached-active { padding-top: 20px; }
.coached-active .page-header { display: none; }
.coached-active .coached-lesson { padding: 20px 26px; }
.lesson-title { font-size: 25px; margin-bottom: 14px; }
.coached-lesson .lesson-visuals { min-width: 0; }
.coached-lesson .lesson-tools:empty { display: none; }
.coached-lesson .absolute-toolbar { margin: 0 0 16px; }
.coached-lesson .curve-graphic { max-width: 440px; }
.coached-lesson .learn-footer { margin-top: 18px; }
.trade-lesson { position: relative; }
.trade-lesson .lesson-title { font-size: 23px; margin-bottom: 12px; }
.trade-lesson .lesson-heading { min-height: 44px; padding-right: 150px; }
.coached-active.trade-active { padding-top: 12px; padding-bottom: 16px; }
.trade-active .step-nav { margin-bottom: 12px; }
.trade-reset { position: absolute; top: 20px; right: 26px; min-height: 44px; font-size: 16px; }
.trade-point-workspace { display: grid; grid-template-columns: minmax(0,1fr) 230px; align-items: center; gap: 22px; }
.trade-map { width: 100%; max-width: 440px; margin: 0 auto; }
.trade-slopes { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 26px; font-size: 16px; }
.trade-slopes > span { display: inline-flex; align-items: center; gap: 5px; }
.trade-slopes::before { content: '기울기'; color: var(--muted); }
.trade-lesson .ppf-graph { width: 100%; height: auto; }
.trade-curve { color: var(--blue); }
.trade-curve.actor-b { color: var(--orange); }
.trade-curve.actor-b .ppf-line { stroke-dasharray: 6 3; }
.ppf-graph .trade-line-name { fill: currentColor; font-size: 18px; font-weight: 750; paint-order: stroke; stroke: white; stroke-width: 3px; }
.trade-phase-3 .trade-line-name { display: none; }
.trade-point-control { cursor: pointer; outline: none; }
.trade-point-halo { fill: transparent; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 3 3; }
.trade-point-control:hover .trade-point-halo, .trade-point-control:focus-visible .trade-point-halo { stroke-width: 3px; stroke-dasharray: none; fill: currentColor; fill-opacity: .1; }
.trade-map-legend { display: flex; justify-content: center; gap: 16px; min-height: 23px; font-size: 15px; color: var(--muted); }
.trade-map-legend > span { display: flex; align-items: center; gap: 5px; }
.trade-map-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.trade-map-legend .legend-before { background: white; border: 2px solid #8a9faa; }
.trade-map-legend .legend-consumption { background: var(--green); }
.trade-point-table { width: 100%; border-collapse: collapse; text-align: center; }
.trade-point-table caption { text-align: left; padding-bottom: 7px; font-size: 18px; font-weight: 750; }
.trade-point-table thead th { padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; color: var(--muted); }
.trade-point-table small { font-size: 12px; margin-left: 2px; }
.trade-point-table tbody th { padding: 6px 4px; font-size: 18px; }
.trade-point-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); font: 650 25px/1.2 "Avenir Next",Arial,sans-serif; }
.trade-exchange-rate { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 10px 0 14px; font-size: 20px; font-weight: 700; }
.trade-exchange-rate .good-icon { width: 23px; height: 23px; }
.trade-narrator { position: fixed; right: 24px; bottom: 16px; width: 260px; z-index: 8; filter: drop-shadow(0 6px 12px #17213018); }
.trade-narrator > img { position: absolute; left: -66px; bottom: 8px; width: 60px; height: 90px; object-fit: contain; image-rendering: pixelated; pointer-events: none; animation: yeonuk-float 3.2s ease-in-out infinite; }
.trade-coach-bubble { position: relative; padding: 14px; border: 2px solid var(--speech-line); border-radius: 14px; background: var(--speech-bg); }
.trade-coach-bubble::before { content: ''; position: absolute; left: -10px; bottom: 28px; width: 16px; height: 16px; background: var(--speech-bg); border-left: 2px solid var(--speech-line); border-bottom: 2px solid var(--speech-line); transform: rotate(45deg); }
.trade-narrator p { margin-top: 7px; font-size: 18px; line-height: 1.5; word-break: keep-all; }
.trade-narrator .yeonuk-name { font-size: 18px; }
.trade-coach-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trade-coach-heading .yeonuk-name { min-width: 0; }
.trade-narrator .text-button { flex-shrink: 0; min-height: 44px; margin: 0; padding: 8px 10px; font-size: 16px; color: var(--blue); }
.trade-narrator mark { color: var(--highlight-ink); background: var(--highlight-bg); font-weight: 750; padding: 0 .08em; }
.trade-lesson:has(.yeonuk-modal[open]) .trade-narrator { visibility: hidden; }
.trade-lesson .learn-footer { margin-top: 8px; padding-top: 8px; }
.trade-lesson .learn-action-primary { min-height: 44px; padding: 10px 16px; font-size: 17px; }
@media (min-width:961px) and (min-height:800px) { .trade-map { max-width: 520px; } }
@media (min-width:681px) and (max-width:960px) {
  body:has(.trade-active) .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 12px; }
  body:has(.trade-active) .brand { margin: 0; }
  body:has(.trade-active) #topic-nav { padding: 0; }
}
@media (max-width:680px) {
  .trade-point-workspace { grid-template-columns: 1fr; gap: 18px; }
  .trade-point-readout { max-width: 320px; width: 100%; margin: 0 auto; }
  .trade-narrator img { width: 32px; height: 46px; }
  .trade-reset { right: 14px; }
  .trade-slopes { gap: 8px; font-size: 14px; }
}
.yeonuk-modal { position: fixed; inset: 144px 0 20px; margin: auto; width: min(720px, calc(100% - 40px)); height: fit-content; max-height: calc(100dvh - 164px); padding: 32px; border: 2px solid var(--speech-line); border-radius: 24px; background: var(--speech-bg); overflow: visible; box-shadow: 7px 8px 0 #244de818; }
.yeonuk-modal[open] { display: flex; flex-direction: column; }
.yeonuk-modal > :not(.yeonuk-speech) { flex-shrink: 0; }
.yeonuk-modal::backdrop { background: #17213083; }
.yeonuk-modal::before, .yeonuk-modal::after { content: ''; position: absolute; clip-path: polygon(0 100%, 100% 0, 82% 100%); pointer-events: none; }
.yeonuk-modal::before { right: 104px; top: -23px; width: 34px; height: 25px; background: var(--speech-line); }
.yeonuk-modal::after { right: 107px; top: -16px; width: 26px; height: 19px; background: var(--speech-bg); }
.modal-yeonuk { position: absolute; right: 60px; top: -126px; width: 156px; height: 195px; object-fit: contain; image-rendering: pixelated; pointer-events: none; animation: yeonuk-float 3.2s ease-in-out infinite; }
.curve-coach-heading img, .yeonuk-quiz > img { animation: yeonuk-float 3.2s ease-in-out infinite; }
@keyframes yeonuk-float { 0%, 100% { transform: translate(0, 0) rotate(-2deg); } 50% { transform: translate(-6px, -8px) rotate(2deg); } }
.yeonuk-name { font-size: 23px; font-weight: 850; color: var(--blue); }
.yeonuk-modal h3 { margin: 13px 0 15px; padding-right: 35px; font-size: 30px; line-height: 1.4; }
.yeonuk-speech { min-height: 0; overflow-y: auto; font-size: 26px; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word; }
.yeonuk-speech { position: relative; }
.yeonuk-speech:has(.feedback-copy) { padding: 16px; }
.feedback-copy { padding: 22px; border: 1px solid #c5dfd5; border-radius: 12px; background: #f2faf5; }
.feedback-copy.is-retry { border-color: #e9cdb1; background: #fff8ee; }
.speech-reserved, .speech-pending { opacity: 0; }
.speech-typed { position: absolute; inset: 0; pointer-events: none; }
.yeonuk-speech p + p { margin-top: 16px; }
.yeonuk-speech strong { color: var(--blue); }
.yeonuk-speech mark, .yeonuk-quiz-bubble mark, .curve-coach-bubble mark, .speech-highlight { color: var(--highlight-ink); background: var(--highlight-bg); font-weight: 750; padding: 0 .08em; border-radius: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.yeonuk-speech mark strong, .speech-highlight strong { color: inherit; }
.speech-typed mark { background: none; padding: 0; }
.speech-highlight:empty { background: none; padding: 0; }
.yeonuk-speech .absolute-explanation { background: transparent; padding: 0; margin: 0; min-height: 0; font-size: inherit; line-height: inherit; }
.yeonuk-speech .absolute-equation { margin-bottom: 12px; }
.coach-confirm { width: 100%; margin-top: 24px; font-size: 21px; }
.coach-close { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-tint); font-size: 28px; color: var(--muted); z-index: 1; }
@media (max-width: 680px) {
  .coached-active .coached-lesson { padding: 18px 14px; }
  .yeonuk-modal { inset: 124px 0 12px; width: calc(100% - 24px); max-height: calc(100dvh - 136px); padding: 22px; }
  .yeonuk-modal h3 { font-size: 26px; }
  .yeonuk-speech { font-size: 22px; line-height: 1.65; }
  .modal-yeonuk { width: 130px; height: 168px; top: -105px; }
  .yeonuk-speech:has(.feedback-copy) { padding: 12px; }
  .feedback-copy { padding: 18px; }
}
@media (max-height: 540px) {
  .yeonuk-modal { inset: 96px 0 12px; max-height: calc(100dvh - 108px); padding: 20px; }
  .modal-yeonuk { width: 96px; height: 122px; top: -78px; }
  .yeonuk-modal .yeonuk-name { font-size: 20px; }
  .yeonuk-modal h3 { margin: 8px 0; font-size: 24px; }
  .yeonuk-modal .yeonuk-speech { font-size: 21px; line-height: 1.5; }
  .yeonuk-modal .coach-dialog-actions { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

.comparative-lesson .learn-controls { margin: 4px 0 14px; }
.comparative-lesson .comparative-quiz { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; padding: 14px; margin-top: 16px; }
.comparative-lesson .comparative-pick-row { padding: 0; border: 0; }
.comparative-lesson .comparative-pick-row h3 { font-size: 20px; margin-bottom: 10px; }
.comparative-lesson .comparative-picks { gap: 8px; }
.comparative-lesson .comparative-picks button { min-width: 100px; min-height: 46px; padding: 8px 12px; font-size: 21px; }
.comparative-lesson .comparative-pick-feedback { margin-top: 8px; font-size: 18px; }
.comparative-lesson .comparative-continue { grid-column: 1 / -1; padding-bottom: 0; }
@media (max-width: 600px) {
  .comparative-condition-table thead th { font-size: 15px; }
  .comparative-condition-table th, .comparative-condition-table td { padding: 6px 4px; }
  .comparative-condition-table th:last-child { width: 33%; }
  .comparative-condition-table td > strong, .comparative-condition-table .opportunity-amount { font-size: 28px; }
  .comparative-condition-table .actor { font-size: 16px; gap: 4px; white-space: nowrap; }
  .comparative-condition-table .opportunity-amount { gap: 4px; }
  .comparative-condition-table .answer-blank { min-width: 48px; }
  .comparative-condition-table .blank-stroke { width: 28px; }
  .comparative-condition-table .opportunity-amount small { font-size: 17px; }
  .comparative-lesson .comparative-quiz { grid-template-columns: 1fr; }
}

main:has(.comparative-lesson) { padding-top: 12px; padding-bottom: 16px; }
main:has(.comparative-lesson) .step-nav { margin-bottom: 12px; }
.coached-active .comparative-lesson { padding: 16px 24px; }
.comparative-lesson .lesson-title { margin-bottom: 8px; }
.comparative-lesson .learn-footer { margin-top: 12px; padding-top: 10px; }
.comparative-condition-table caption { padding-bottom: 8px; }
@media (min-width:681px) and (max-width:960px) {
  body:has(.comparative-lesson) .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 12px; }
  body:has(.comparative-lesson) .brand { margin: 0; }
  body:has(.comparative-lesson) #topic-nav { padding: 0; }
}

.absolute-question { margin-bottom: 16px; font-size: 20px; font-weight: 700; line-height: 1.5; word-break: keep-all; }

.absolute-cell-choice { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.absolute-cell-choice:hover { background: #244de810; }
.absolute-cell-choice:focus-visible { outline-offset: -4px; }

.curve-draw-actions:empty { display: none; }
@media (max-width: 680px) {
  .curve-assistant { position: relative; right: auto; bottom: auto; width: auto; margin: 18px 0 0 54px; }
  .curve-coach-heading img { left: -54px; width: 48px; height: 70px; }
}

.comparison-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 2px solid var(--speech-line); border-radius: 22px; background: var(--speech-bg); color: var(--ink); overflow: auto; box-shadow: 6px 7px 0 #244de818; }
.comparison-dialog::backdrop { background: #17213083; }
.comparison-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-tint); font-size: 29px; color: var(--muted); }
.coach-close:hover, .comparison-close:hover { border-color: var(--accent-line); background: var(--blue-soft); color: var(--blue); }
.comparison-modal-heading { display: flex; align-items: center; gap: 12px; padding-right: 28px; }
.comparison-modal-heading img { object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.comparison-modal-heading .yeonuk-name { font-size: 17px; }
.comparison-modal-heading h3 { margin-top: 4px; font-size: 24px; line-height: 1.4; }
.comparison-unit-costs { width: 100%; border-collapse: collapse; margin: 22px 0; text-align: center; font-size: 19px; line-height: 1.5; }
.comparison-unit-costs th, .comparison-unit-costs td { padding: 10px 12px; border: 1px solid var(--line); }
.comparison-unit-costs thead { background: var(--blue-soft); }
.comparison-unit-costs tbody th { width: 45%; font-weight: 600; }
.comparison-unit-costs tbody td { background: white; }
.comparison-question { font-size: 24px; line-height: 1.5; text-align: center; word-break: keep-all; }
.comparison-dialog .comparison-cost-choices { gap: 12px; margin: 24px 0 10px; }
.comparison-dialog .comparison-cost-choices button { min-width: 132px; min-height: 72px; padding: 12px; font-size: 26px; }
.comparison-dialog .comparison-cost-feedback { color: #a63a35; text-align: center; }
.comparison-correct { margin-top: 14px; font-size: 18px; color: #096951; text-align: center; }
.comparison-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.comparison-modal-actions button { min-height: 46px; padding: 10px 14px; border: 1px solid var(--accent-line); border-radius: 8px; background: white; font-size: 17px; font-weight: 700; }
.comparison-modal-actions button:last-child { background: var(--blue); border-color: var(--blue); color: white; }
.comparison-review { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 6px 10px; border: 1px dashed var(--accent-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.cost-balance { position: relative; height: 230px; margin: 12px 0 6px; overflow: clip; }
.balance-stand { position: absolute; left: calc(50% - 50px); top: 8px; width: 100px; height: 222px; fill: var(--blue-soft); stroke: #698a99; stroke-width: 5; stroke-linejoin: round; }
.balance-assembly { position: absolute; inset: 20px 0 0; transform-origin: 50% 0; animation: cost-weigh 2.8s ease-in-out both; }
.balance-beam { position: absolute; left: 90px; right: 90px; height: 6px; border-radius: 3px; background: var(--muted); }
.balance-pan { position: absolute; top: 0; width: 180px; height: 180px; transform-origin: 50% 0; animation: cost-counterweigh 2.8s ease-in-out both; }
.balance-left { left: 0; }
.balance-right { right: 0; }
.balance-cables { position: absolute; inset: 0; width: 100%; height: 170px; fill: none; stroke: #698a99; stroke-width: 2; }
.balance-pan-content { position: absolute; top: 43px; left: 12px; right: 12px; height: 102px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--blue); }
.balance-pan-content small { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 650; white-space: nowrap; }
.balance-measure { text-align: center; margin: 12px 0 0; font-size: 18px; font-weight: 650; }
.balance-pan-content strong { display: flex; align-items: center; gap: 5px; font-size: 23px; font-weight: 750; white-space: nowrap; }
.balance-pan-content .worker-tokens { display: flex; justify-content: center; gap: 4px; min-height: 40px; margin: 0; }
.balance-pan-content .worker-token svg { height: 40px; width: 28px; }
.balance-product { color: #096951; animation: product-convert 2.8s ease-in-out both; }
.balance-equation { display: grid; grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); align-items: stretch; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--control-bg); text-align: center; }
.balance-choice-context { grid-column: 1 / -1; margin: 0 0 4px; font-size: 18px; line-height: 1.5; font-weight: 500; word-break: keep-all; }
.balance-choice { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.balance-choice h4 { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 650; word-break: keep-all; }
.balance-choice-amount { display: flex; align-items: center; justify-content: center; gap: 7px; }
.balance-choice-amount strong { display: inline-flex; align-items: center; gap: 5px; font-size: 26px; white-space: nowrap; }
.balance-equation .good-icon { width: 28px; height: 28px; flex-shrink: 0; }
.balance-choice-arrow { align-self: center; font-size: 28px; color: var(--muted); }
.balance-equation-product { color: #096951; background: #e8f5ef; border-color: #bbdfce; animation: balance-reveal .7s 1.6s both; }
@keyframes cost-weigh { 0% { transform: rotate(-7deg); } 35% { transform: rotate(5deg); } 70% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
@keyframes cost-counterweigh { 0% { transform: rotate(7deg); } 35% { transform: rotate(-5deg); } 70% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes product-convert { 0%,45% { opacity: 0; transform: translateY(-10px); } 65%,100% { opacity: 1; transform: translateY(0); } }
@keyframes balance-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .comparison-dialog { padding: 18px; }
  .comparison-modal-heading h3 { font-size: 21px; }
  .comparison-question { font-size: 22px; }
  .comparison-unit-costs { font-size: 17px; margin: 16px 0; }
  .comparison-dialog .comparison-cost-choices { gap: 6px; }
  .comparison-dialog .comparison-cost-choices button { min-width: 82px; padding: 8px; font-size: 22px; }
  .balance-pan { width: 130px; }
  .balance-beam { left: 65px; right: 65px; }
  .balance-pan-content { left: 5px; right: 5px; }
  .balance-pan-content strong { font-size: 18px; }
  .balance-pan-content small { font-size: 16px; }
  .balance-equation { grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr); gap: 7px; padding: 12px 8px; }
  .balance-choice { padding: 12px 5px; gap: 9px; }
  .balance-choice h4 { font-size: 17px; }
  .balance-choice-amount { flex-wrap: wrap; gap: 5px; }
  .balance-choice-amount strong { font-size: 22px; }
  .balance-choice-arrow { font-size: 24px; }
  .comparison-modal-actions { flex-wrap: wrap; gap: 8px; }
  .comparison-modal-actions button { flex: 1; font-size: 16px; padding: 9px; }
}

@media (max-width: 680px) {
  .trade-narrator { position: relative; right: auto; bottom: auto; width: auto; margin: 18px 0 0 60px; }
  .trade-narrator > img { left: -60px; width: 54px; height: 80px; }
}

.trade-compare-trigger { display: block; width: 100%; min-height: 46px; padding: 10px; border: 1px solid var(--accent-line); border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 17px; font-weight: 750; }
.trade-comparison-note { margin: 20px 0; font-size: 18px; line-height: 1.6; word-break: keep-all; }
.trade-consumption-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.trade-consumption-table caption { padding-bottom: 12px; text-align: left; font-size: 18px; font-weight: 650; }
.trade-consumption-table th, .trade-consumption-table td { border: 1px solid var(--line); padding: 14px 8px; }
.trade-consumption-table thead th { background: var(--blue-soft); font-size: 18px; }
.trade-consumption-table th:first-child { width: 18%; }
.trade-consumption-table thead small { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; font-weight: 500; }
.trade-consumption-table .actor { font-size: 21px; white-space: nowrap; gap: 6px; }
.trade-consumption-table tbody th { background: var(--control-bg); }
.trade-consumption-table td { font-size: 28px; font-weight: 650; white-space: nowrap; }
.trade-consumption-table .trade-consumption-after { color: #096951; background: #eaf6ef; }
.trade-consumption-gain { display: inline-block; padding: 6px 10px; border-radius: 7px; background: #def1e5; color: #096951; font-size: 20px; font-weight: 750; }
.trade-comparison-result { margin-top: 22px; text-align: center; font-size: 23px; line-height: 1.6; font-weight: 650; }
.trade-comparison-result mark { color: #096951; background: #def1e5; padding: 0 4px; }
.trade-comparison-actions { display: flex; justify-content: center; margin-top: 22px; }
.trade-lesson:has(.trade-consumption-dialog[open]) .trade-narrator { visibility: hidden; }
@media (max-width: 600px) {
  .trade-comparison-note { font-size: 17px; margin: 16px 0; }
  .trade-consumption-table caption { font-size: 17px; }
  .trade-consumption-table th, .trade-consumption-table td { padding: 12px 4px; }
  .trade-consumption-table thead th { font-size: 17px; }
  .trade-consumption-table .actor { font-size: 17px; gap: 4px; }
  .trade-consumption-table td { font-size: 22px; }
  .trade-consumption-gain { padding: 4px 5px; font-size: 16px; }
  .trade-comparison-result { font-size: 21px; }
}

.summary-active { padding-top: 18px; padding-bottom: 18px; }
.summary-active .page-header { display: none; }
.practice-board.summary-board { display: block; min-height: 0; }
.summary-board .summary-work { padding: 16px 24px 12px; }
.summary-heading { margin-bottom: 10px; }
.summary-heading > span { font-size: 17px; }
.summary-board .source-panel { margin-bottom: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--control-bg); }
.summary-board .source-header { flex-wrap: nowrap; gap: 14px; margin-bottom: 8px; }
.summary-board .source-header h3 { font-size: 20px; line-height: 1.4; font-weight: 750; word-break: keep-all; }
.summary-board .source-header .button-group { flex-shrink: 0; }
.summary-board .source-header button { min-height: 38px; font-size: 17px; padding: 7px 14px; }
.summary-source-condition { margin: 0 0 8px; font-size: 18px; line-height: 1.5; word-break: keep-all; }
.summary-board .data-table { border-collapse: collapse; }
.summary-board .data-table th, .summary-board .data-table td { border: 1px solid var(--line); padding: 7px 8px; }
.summary-board .data-table thead th { font-size: 18px; background: var(--blue-soft); }
.summary-board .data-table tbody th { font-size: 20px; text-align: center; }
.summary-board .good-heading { flex-direction: row; justify-content: center; gap: 8px; font-size: 20px; }
.summary-board .good-icon { width: 26px; height: 26px; }
.summary-board .data-number { font-size: 32px; }
.summary-board .data-number small { font-size: 18px; }
.summary-table thead th:first-child { width: 70%; }
.summary-table thead th { font-size: 18px; }
.summary-table .summary-question-row th { padding: 14px 12px; font-size: 19px; line-height: 1.5; font-weight: 600; }
.summary-question-number { color: var(--blue); font-weight: 800; margin-right: 5px; }
.summary-table .answer-blank { min-width: 110px; min-height: 48px; font-size: 21px; }
.summary-answer > span { font-size: 17px; }
.summary-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.practice-page-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; padding: 0; border: 1px solid var(--accent-line); border-radius: 50%; background: var(--control-bg); color: var(--blue); font-size: 30px; line-height: 1; }
.practice-page-arrow:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--blue); }
.practice-page-arrow:disabled { opacity: .4; }
.practice-page-next { background: var(--blue); border-color: var(--blue); color: #fff; }
.practice-page-next:hover { background: var(--primary-hover); }
.practice-page-middle { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; gap: 12px; }
.practice-page-position { font-size: 20px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.practice-page-replay { font-size: 26px; }
.practice-page-arrow .enter-shortcut { display: none; }
@media(max-width:680px) {
 .summary-navigation { gap: 8px; }
 .practice-page-arrow { flex-basis: 44px; width: 44px; height: 44px; font-size: 27px; }
 .practice-page-middle { gap: 10px; }
 .practice-page-position { font-size: 18px; }
}
@media (min-width:681px) and (max-width:960px) {
  body:has(.summary-active) .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 12px; }
  body:has(.summary-active) .brand { margin: 0; }
  body:has(.summary-active) #topic-nav { padding: 0; }
}
@media (max-width:680px) {
  .summary-board .summary-work { padding: 18px 14px 10px; }
  .summary-board .source-panel { padding: 12px; }
  .summary-board .source-header { flex-wrap: wrap; }
  .summary-board .source-header h3 { font-size: 19px; }
  .summary-board .data-table th, .summary-board .data-table td { padding: 10px 5px; }
  .summary-board .data-table .actor { gap: 4px; white-space: nowrap; font-size: 18px; }
  .summary-board .good-heading { flex-wrap: wrap; gap: 4px; font-size: 17px; }
  .summary-board .good-icon { width: 24px; height: 24px; }
  .summary-board .data-number { font-size: 28px; }
  .summary-board .data-number small { font-size: 16px; }
  .summary-table thead th:first-child { width: 62%; }
  .summary-table .summary-question-row th { padding: 12px 8px; font-size: 18px; }
  .summary-table .answer-blank { min-width: 70px; padding: 6px; font-size: 20px; }
  .summary-answer > span { font-size: 16px; }
}

.summary-question-row .blank-explanation { margin: 6px 0 0; font-size: 17px; line-height: 1.5; font-weight: 400; }

/* Keep production data visible while the learner answers Yeonuk's question. */
.production-lesson .lesson-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.production-lesson .production-toolbar { margin: 0; }
.production-lesson .learn-country-header { padding: 10px 14px; }
.production-lesson .production-conditions { padding: 8px 14px 0; }
.production-lesson .production-allocation { padding: 8px 14px 0; }
.production-lesson .production-sectors { padding: 10px; gap: 10px; }
.production-lesson .production-sector { padding: 10px 6px; }
.production-lesson .production-sector.is-loss { padding: 9px 5px; }
.production-lesson .product-tokens { min-height: 0; }
.production-quiz-mode .production-sectors { display: none; }
.production-quiz-mode .yeonuk-quiz { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.production-quiz-mode .yeonuk-quiz > img { width: 56px; height: 90px; }
.production-quiz-mode .yeonuk-quiz-bubble { padding: 12px 18px; }
.production-quiz-mode .yeonuk-quiz h3 { font-size: 21px; line-height: 1.4; margin: 4px 0 12px; }
.production-quiz-mode .yeonuk-quiz h3 br { display: none; }
.production-quiz-mode .yeonuk-name { font-size: 18px; }
.production-quiz-mode .cost-choices button { min-height: 48px; min-width: 100px; font-size: 21px; padding: 6px 12px; }
.production-quiz-mode .cost-feedback { margin: 10px 0 0; padding: 10px; font-size: 18px; line-height: 1.5; }
.production-lesson .learn-footer { margin-top: 14px; padding-top: 14px; }
@media (min-width:681px) and (max-width:960px) {
  body:has(.coached-active) .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 12px; }
  body:has(.coached-active) .brand { margin: 0; }
  body:has(.coached-active) #topic-nav { padding: 0; }
}
@media (max-width:680px) {
  .production-lesson .lesson-tools { flex-wrap: wrap; }
  .production-quiz-mode .yeonuk-quiz { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .production-quiz-mode .yeonuk-quiz > img { width: 40px; height: 60px; }
  .production-quiz-mode .cost-choices button { min-width: 72px; padding: 6px 8px; }
}
.production-lesson .sector-workers { display: none; }
.production-lesson .production-quantity { margin-bottom: 6px; }
.production-lesson .production-sector .worker-tokens { margin-bottom: 6px; }
.production-lesson .production-change { padding-top: 6px; padding-bottom: 6px; }
.production-quiz-mode .production-allocation,
.production-quiz-mode .cost-choices:has(button:disabled) { display: none; }
.production-quiz-mode .cost-feedback p { margin: 6px 0 0; }
.production-quiz-mode .cost-quiz { margin-top: 16px; }
.production-quiz-mode .cost-quiz-line { padding: 12px 0; font-size: 21px; }
.coached-active .production-lesson { padding-top: 14px; padding-bottom: 14px; }
main:has(.production-lesson) .step-nav { margin-bottom: 12px; }
.production-lesson .lesson-title { margin-bottom: 10px; }
.production-lesson .production-sector .worker-tokens { min-height: 20px; }
.production-lesson .sector-heading .good-icon { width: 26px; height: 26px; }

.point-success-ring { fill: none; stroke: var(--blue); stroke-width: 3px; transform-box: fill-box; transform-origin: center; pointer-events: none; animation: point-success-burst .8s ease-out both; }
.answer-reveal { animation: answer-reveal-pulse .55s ease-out both; }
@keyframes point-success-burst { 0% { opacity: 1; transform: scale(.7); } 100% { opacity: 0; transform: scale(3.5); } }
@keyframes answer-reveal-pulse { 0% { box-shadow: 0 0 0 0 #244de866; } 45% { box-shadow: 0 0 0 6px #244de825; } 100% { box-shadow: 0 0 0 0 #244de800; } }

.curve-resource { display: block; margin-bottom: 10px; padding: 10px 12px; border-radius: 8px; background: var(--blue-soft); color: var(--ink); font-size: 21px; font-weight: 800; }

.lesson-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.lesson-heading .lesson-title { min-width: 0; margin: 0; line-height: 1.45; word-break: keep-all; }
.coach-help-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 9px; min-height: 48px; padding: 4px 15px 4px 6px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--surface-tint); color: var(--blue); font-size: 17px; font-weight: 750; line-height: 1.3; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.coach-help-portrait { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); }
.coach-help-portrait img { width: 28px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.coach-help-button:hover { background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 2px 5px #17213012; }
.coach-help-button:active { background: var(--blue-soft); }
@media (max-width:680px) {
  .lesson-heading { align-items: flex-start; gap: 10px; }
  .coach-help-button { min-height: 44px; gap: 6px; padding: 4px 10px 4px 5px; font-size: 16px; }
  .coach-help-portrait { width: 30px; height: 30px; }
  .coach-help-portrait img { width: 24px; height: 34px; }
  .coach-help-name { display: none; }
}

.production-lesson .lesson-tools { justify-content: flex-end; }

.curve-draw-actions { flex-direction: column; gap: 8px; }
.curve-draw-actions .curve-redraw { border-color: var(--accent-line); border-radius: 10px; background: var(--control-bg); color: var(--muted); }

.coached-active .terms-lesson { padding: 22px 24px; }
.terms-range-view { min-width: 0; }
.terms-choice-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 3px 0 22px; }
.terms-product-buttons { display: flex; gap: 9px; }
.terms-example-button { min-height: 46px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--control-bg); color: var(--blue); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.terms-product-buttons button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 11px 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 21px; font-weight: 700; }
.terms-product-buttons [aria-pressed="true"] { border: 2px solid var(--blue); color: var(--blue); background: var(--blue-soft); }
.terms-good-label { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; white-space: nowrap; }
.terms-emoji { flex: none; font-family: "Apple Color Emoji","Segoe UI Emoji",sans-serif; font-weight: 400; line-height: 1.15; }
.terms-product-title { margin: 0; font-size: 28px; line-height: 1.5; letter-spacing: -.6px; word-break: keep-all; }
.terms-guide { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin: 24px 0 0; }
.terms-guide > img { flex: none; width: 64px; height: 76px; object-fit: contain; image-rendering: pixelated; animation: yeonuk-float 3.2s ease-in-out infinite; }
.terms-guide .trade-coach-bubble { flex: 1; min-width: 0; }
.terms-guide .trade-coach-bubble::before { top: calc(50% - 8px); bottom: auto; }
.terms-guide .yeonuk-name { font-size: 18px; overflow-wrap: anywhere; }
.terms-guide p { margin: 10px 0 0; font-size: 20px; line-height: 1.6; word-break: keep-all; }
.terms-guide mark > span { white-space: nowrap; }
.terms-guide mark { color: var(--highlight-ink); background: var(--highlight-bg); font-weight: 750; }
@media (max-width:680px) {
  .terms-guide { display: block; position: relative; padding-top: 62px; }
  .terms-guide > img { position: absolute; left: 12px; top: 0; width: 44px; height: 52px; }
  .terms-guide .trade-coach-bubble::before { left: 24px; top: -10px; bottom: auto; border-bottom: 0; border-top: 2px solid var(--speech-line); }
  .terms-guide .trade-coach-bubble { padding: 12px; }
  .terms-guide p { font-size: 18px; }
}
@media (prefers-reduced-motion:reduce) { .terms-guide > img { animation: none; } }
.terms-numberline { margin: 24px 0 0; container-type: inline-size; }
.terms-cost-markers { position: relative; height: 126px; }
.terms-bound { position: absolute; bottom: 0; width: max-content; min-width: 0; text-align: center; color: var(--blue); transform: translateX(-50%); }
.terms-bound[data-country="1"] { color: var(--orange); }
.terms-bound h4 { position: absolute; top: 35px; width: clamp(52px,calc(33.333cqw - 46px),180px); margin: 0; font-size: 20px; line-height: 1.55; word-break: keep-all; transform: translateY(-50%); }
.terms-lower.terms-bound h4 { right: calc(100% + 16px); text-align: right; }
.terms-upper.terms-bound h4 { left: calc(100% + 16px); text-align: left; }
.terms-bound h4 > span { display: block; font-size: 17px; font-weight: 600; }
.terms-marker-stem { display: block; margin: 8px auto 0; width: 1px; height: 24px; background: currentColor; }
.terms-axis { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); height: 14px; }
.terms-axis-segment { border-top: 3px dashed var(--accent-line); margin-top: 5px; }
.terms-mutual { border-top: 6px solid var(--green); margin-top: 3px; }
.terms-axis::after { content: ''; position: absolute; top: 1px; right: 0; width: 12px; height: 12px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
.terms-lower { left: 33.3333%; }
.terms-upper { left: 66.6667%; }
.terms-open-end { position: absolute; top: -4px; width: 24px; height: 24px; border: 4px solid var(--green); border-radius: 50%; background: var(--white); transform: translateX(-50%); }
.terms-axis-values { position: relative; height: 116px; margin-top: 10px; pointer-events: none; }
.terms-value { display: flex; align-items: center; justify-content: center; gap: 5px; height: 70px; color: var(--blue); font-size: 31px; font-weight: 750; }
.terms-value[data-country="1"] { color: var(--orange); }
.terms-value > span:last-child { font-size: 20px; }
.terms-cost-fraction { position: relative; display: inline-grid; vertical-align: middle; font: 700 1em/1.1 "Avenir Next",Arial,sans-serif; text-align: center; }
.terms-cost-fraction > span { display: block; padding: 2px 5px; }
.terms-cost-fraction::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1.5px; background: currentColor; pointer-events: none; }
.terms-axis-zero { position: absolute; top: 6px; font-size: 21px; color: var(--muted); }
.terms-axis-zero { left: 0; }
.terms-numberline figcaption { margin-bottom: 18px; text-align: right; color: var(--muted); font-size: 18px; line-height: 1.5; }
.terms-axis button { padding: 0; cursor: pointer; }
.terms-axis-segment { position: relative; margin: 0; border: 0; height: 112px; background: transparent; }
.terms-axis-segment::before { content: ''; position: absolute; left: 0; right: 0; top: 5px; border-top: 3px dashed var(--red); }
.terms-axis-segment::after { content: ''; position: absolute; top: 14px; bottom: 0; left: 0; right: 0; background: #f9dddd; border-bottom: 1px solid var(--red); }
.terms-axis-segment.terms-mutual::after { background: #d3ecdf; border-color: var(--green); }
.terms-segment-label { position: absolute; z-index: 1; top: 42px; left: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); font-size: 18px; line-height: 1.5; text-align: center; word-break: keep-all; }
.terms-segment-label strong { font-size: 21px; color: var(--red); }
.terms-mutual .terms-segment-label, .terms-mutual .terms-segment-label strong { color: var(--green); }
.terms-axis-segment:hover::after, .terms-axis-segment:focus-visible::after { box-shadow: inset 0 0 0 2px var(--accent-line); }
.terms-axis-segment:hover::before { border-top-color: var(--red); }
.terms-axis-segment.terms-mutual::before { top: 3px; border-top: 6px solid var(--green); }
@keyframes terms-invite {
  0%, 35%, 100% { background: var(--invite-base); box-shadow: inset 0 0 0 0 transparent; }
  17.5% { background: var(--invite-fill); box-shadow: inset 0 0 0 3px var(--invite-line); }
}
.terms-axis-segment { --invite-base: #f9dddd; --invite-fill: #f0abab; --invite-line: var(--red); --invite-delay: .6s; }
.terms-mutual { --invite-base: #d3ecdf; --invite-fill: #a8d9bf; --invite-line: var(--green); --invite-delay: 1.8s; }
.terms-high { --invite-delay: 3s; }
@media (prefers-reduced-motion:no-preference) {
  .terms-range-view[data-phase="done"] .terms-axis.is-inviting .terms-axis-segment::after { animation: terms-invite 3.6s ease-in-out var(--invite-delay) infinite; }
  .terms-lesson:has(dialog[open]) .terms-axis-segment::after { animation-play-state: paused; }
}
@media (prefers-reduced-motion:reduce) { .terms-axis-segment::after { box-shadow: inset 0 0 0 2px var(--invite-line); } }
.terms-open-end { z-index: 2; }
.terms-open-end::after { content: ''; position: absolute; inset: -14px; }
.terms-open-end:hover { box-shadow: 0 0 0 5px var(--green-soft); }
.terms-axis::after { pointer-events: none; }
.terms-rate-demo { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px 20px; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-tint); }
.terms-rate-equation { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 25px; font-weight: 700; }
.terms-rate-base, .terms-rate-payment { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.terms-rate-payment { color: var(--green); }
.terms-rate-demo .terms-cost-fraction { font-size: 28px; }
.terms-range-view[aria-busy="true"] button { cursor: wait; }
.terms-lesson .learn-footer { margin-top: 20px; padding-top: 18px; }
@media(max-width:680px) {
  .coached-active .terms-lesson { padding: 20px 14px; }
  .terms-choice-bar { gap: 10px; }
  .terms-product-buttons { flex: 1 0 100%; }
  .terms-example-button { margin-left: auto; }
  .terms-product-buttons button { flex: 1; padding: 10px 5px; font-size: 19px; }
  .terms-product-title { font-size: 24px; }
  .terms-numberline { margin-top: 24px; }
  .terms-cost-markers { height: 126px; }
  .terms-bound h4 { width: clamp(68px,calc(33.333cqw - 36px),150px); font-size: 16px; line-height: 1.4; letter-spacing: -.4px; }
  .terms-lower.terms-bound h4 { right: calc(100% + 4px); }
  .terms-upper.terms-bound h4 { left: calc(100% + 4px); }
  .terms-bound h4 > span { font-size: 14px; }
  .terms-value { font-size: 27px; }
  .terms-value > span:last-child { font-size: 17px; }
  .terms-axis-zero { font-size: 18px; }
  .terms-numberline figcaption { font-size: 16px; }
  .terms-segment-label { left: 5px; right: 5px; font-size: 16px; }
  .terms-segment-label strong { font-size: 18px; }
  .terms-mutual .terms-segment-label strong { font-size: 16px; white-space: nowrap; }
  .terms-rate-demo { flex-direction: column; gap: 10px; padding: 12px 6px; }
  .terms-rate-equation { font-size: clamp(18px,5vw,22px); gap: 6px; }
  .terms-rate-demo .terms-cost-fraction { font-size: 1.15em; }

}

.summary-explanation-dialog { width: min(650px,calc(100% - 32px)); }
.solution-context { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 16px; text-align: center; font-size: 19px; font-weight: 650; line-height: 1.5; }
.solution-context > .good-icon { width: 30px; height: 30px; }
.solution-comparison { display: grid; grid-template-columns: minmax(0,1fr) 40px minmax(0,1fr); gap: 10px; align-items: stretch; }
.solution-actor, .solution-operand { display: grid; align-content: center; justify-items: center; gap: 12px; min-width: 0; min-height: 155px; padding: 16px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-tint); text-align: center; }
.solution-actor.actor-b { background: #fff7f0; }
.solution-actor .actor { font-size: 23px; }
.solution-value { color: var(--blue); font-size: 42px; font-weight: 800; line-height: 1.25; }
.solution-actor.actor-b .solution-value { color: var(--orange); }
.solution-value small { margin-left: 5px; font-size: 19px; font-weight: 600; }
.solution-winner { box-shadow: inset 0 0 0 2px var(--green); }
.solution-winner-label { padding: 5px 12px; border-radius: 999px; background: #ddefe6; color: var(--green); font-size: 18px; }
.solution-operator { align-self: center; text-align: center; font-size: 34px; font-weight: 800; color: var(--muted); }
.solution-product { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 21px; }
.solution-product .good-icon { width: 30px; height: 30px; }
.solution-operand > span { color: var(--muted); font-size: 17px; }
.solution-calculation { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0; font-size: 30px; font-weight: 750; }
.solution-calculation > span:not(.fraction) { color: var(--muted); }
.solution-result { display: grid; justify-items: center; gap: 10px; margin-top: 18px; padding: 16px; border: 1px solid #bfddce; border-radius: 12px; background: var(--green-soft); text-align: center; line-height: 1.5; }
.solution-result > span { font-size: 18px; }
.solution-result > strong { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; color: var(--green); font-size: 25px; }
.solution-result .good-icon { width: 32px; height: 32px; }
.solution-result small { font-size: 20px; }
.summary-explanation-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
@media (max-width:600px) {
  .solution-context { font-size: 18px; margin-top: 16px; }
  .solution-comparison { grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); gap: 5px; }
  .solution-actor, .solution-operand { padding: 12px 6px; min-height: 145px; gap: 10px; }
  .solution-actor .actor { font-size: 20px; }
  .solution-value { font-size: 34px; }
  .solution-value small { font-size: 17px; margin-left: 3px; }
  .solution-operator { font-size: 28px; }
  .solution-product { font-size: 19px; }
  .solution-product .good-icon { width: 24px; height: 24px; }
  .solution-operand > span { font-size: 16px; }
  .solution-result { padding: 12px; }
  .solution-result > strong { font-size: 22px; }
  .solution-result > span { font-size: 17px; }
  .summary-explanation-actions button { width: 100%; }
}

/* Navigation keeps the previous action visible without competing with the next. */
.learn-footer > .text-button {
  min-height: 52px; padding: 12px 20px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--control-bg); color: var(--ink); font-size: 20px;
}
.learn-footer > .text-button:hover:not(:disabled) {
  border-color: var(--blue); background: var(--blue-soft); color: var(--blue);
}
.learn-footer > .learn-action-primary {
  min-height: 52px; padding: 12px 20px; font-size: 20px;
}
@media (max-width:680px) {
  .learn-footer { flex-direction: column-reverse; align-items: stretch; }
  .learn-footer > .text-button { align-self: flex-start; }
}

.coach-dialog-title h3 { min-width: 0; overflow-wrap: anywhere; }
.coach-dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.coach-page-count { color: var(--muted); font-size: 18px; font-weight: 650; white-space: nowrap; }
.coach-dialog-actions { display: flex; gap: 12px; align-items: stretch; margin-top: 24px; }
.coach-dialog-actions .coach-confirm { flex: 1; width: auto; margin-top: 0; }
.coach-page-previous { padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: transparent; font-size: 20px; font-weight: 650; }
.coach-page-previous:disabled { opacity: .4; }
@media (max-width:680px) {
  .coach-dialog-actions { flex-wrap: wrap; }
  .coach-dialog-actions .coach-confirm { flex-basis: 100%; order: -1; }
  .coach-page-previous { font-size: 18px; }
}

.comparative-condition-table .opportunity-cost-cell.is-comparing { background: #fff1b8; box-shadow: inset 0 0 0 2px #d9a824; animation: cost-comparison-cue .7s ease-out; }
.comparative-quiz > .comparative-pick-row:only-child { grid-column: 1 / -1; }
@keyframes cost-comparison-cue { from { background: #ffdf69; } to { background: #fff1b8; } }

.trade-table-intro { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px 28px; border: 2px solid var(--speech-line); border-radius: 22px; background: var(--speech-bg); overflow: auto; }
.trade-table-intro::backdrop { background: #17213083; }
.trade-table-intro > .learn-action-primary { width: 100%; margin-top: 18px; font-size: 20px; }
.trade-table-awaiting { visibility: hidden; }
.trade-table-flight { position: fixed; z-index: 100; transform-origin: top left; pointer-events: none; background: white; box-shadow: 0 6px 24px #17213022; }

@media (max-width:680px) { .trade-table-intro { padding: 20px 14px; } }

.trade-point-control { cursor: grab; touch-action: none; user-select: none; }
.trade-point-control.is-dragging { cursor: grabbing; }
.trade-point-control.is-dragging .trade-point-halo { stroke-dasharray: none; stroke-width: 2px; }

.trade-curve > .ppf-point.ppf-moving { animation-duration: 1.25s; }
.trade-point-readout tr.is-changing { background: var(--surface-tint); box-shadow: inset 3px 0 var(--blue); }
.trade-point-readout tr.is-changing td { color: var(--blue); }
.trade-point-readout tr.is-changing:nth-child(2) { background: #fff0e5; box-shadow: inset 3px 0 var(--orange); }
.trade-point-readout tr.is-changing:nth-child(2) td { color: var(--orange); }

.trade-point-table { table-layout: fixed; font-variant-numeric: tabular-nums; }

.production-quiz-mode .lesson-visuals { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); align-items: start; gap: 24px; }
.production-quiz-mode .production-countries { display: block; }
.production-quiz-mode .production-allocation { display: block; }
.production-quiz-mode .production-sectors { display: grid; }
.production-quiz-mode .production-sector .worker-tokens,
.production-quiz-mode .production-sector .product-tokens { display: none; }
.production-quiz-mode .yeonuk-quiz { margin-top: 0; grid-template-columns: 44px minmax(0,1fr); gap: 10px; }
.production-quiz-mode .yeonuk-quiz > img { width: 44px; height: 76px; }
.production-quiz-mode .yeonuk-quiz-bubble { padding: 18px; }
.production-quiz-mode .yeonuk-quiz h3 { font-size: 23px; line-height: 1.55; }
.production-quiz-mode .cost-choices { flex-wrap: wrap; }
.production-quiz-mode .cost-choices button { min-width: 78px; }
.production-quiz-mode .cost-feedback { font-size: 20px; }
@media (max-width:680px) {
  .production-quiz-mode .lesson-visuals { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .production-quiz-mode .yeonuk-quiz h3 { font-size: 22px; }
}

.advantage-review-dialog { width: min(860px, calc(100% - 32px)); background: #fff; }
.advantage-map { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 9%; margin-top: 20px; }
.advantage-lens { position: relative; min-width: 0; }
.advantage-lens h4 { margin: 0; text-align: center; font-size: 27px; }
.advantage-criterion { margin: 6px 0 18px; text-align: center; font-size: 18px; word-break: keep-all; }
.advantage-criterion mark { color: var(--highlight-ink); background: var(--highlight-bg); font-weight: 750; }
.advantage-homes { display: grid; gap: 18px; }
.advantage-home { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 142px; padding: 12px; border: 2px solid var(--accent-line); border-radius: 18px; background: var(--blue-soft); }
.advantage-home.actor-b { border-color: #edbea8; background: #fff2e9; }
.advantage-home .actor { font-size: 23px; font-weight: 800; }
.advantage-products { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.advantage-product { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 12px; background: #fff; color: var(--blue); font-size: 25px; box-shadow: 0 2px 0 var(--accent-line); }
.actor-b .advantage-product { color: #b9502e; box-shadow: 0 2px 0 #eac6b7; }
.advantage-product .good-icon { width: 30px; height: 30px; }
.advantage-home p { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 0; font-size: 18px; }
.advantage-home.no-advantage { border-style: dashed; background: #faf9f7; border-color: #d8cfc9; }
.advantage-empty { margin: 15px 0; font-size: 21px; color: #74798b; }
.advantage-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.advantage-links > path { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.advantage-rice-link { stroke: var(--blue); }
.advantage-clothes-link { stroke: #bc552f; stroke-dasharray: 250; animation: advantage-connect 1.1s ease-out both; }
.comparative-clothes .advantage-product { animation: advantage-arrive .4s .8s ease-out both; }
.advantage-mobile-arrow { display: none; }
.advantage-conclusion { margin: 20px 0 0; text-align: center; font-size: 22px; line-height: 1.6; word-break: keep-all; }
.advantage-conclusion strong { color: #156f5b; }
.advantage-review-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.advantage-review-actions button { font-size: 20px; }
@keyframes advantage-connect { from { stroke-dashoffset: 250; } to { stroke-dashoffset: 0; } }
@keyframes advantage-arrive { from { opacity: 0; transform: translateX(-12px) scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width:600px) {
  .advantage-review-dialog { padding: 20px 16px; }
  .advantage-map { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .advantage-homes { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
  .advantage-home { padding: 10px 6px; min-height: 156px; }
  .advantage-home .actor { font-size: 21px; }
  .advantage-products { gap: 5px; }
  .advantage-product { gap: 4px; padding: 6px; font-size: 21px; }
  .advantage-product .good-icon { width: 23px; height: 25px; }
  .advantage-home p { font-size: 17px; gap: 3px; }
  .advantage-empty { font-size: 18px; }
  .advantage-links { display: none; }
  .advantage-mobile-arrow { display: block; text-align: center; color: var(--muted); font-size: 18px; }
  .advantage-criterion { margin-bottom: 12px; }
  .advantage-conclusion { font-size: 20px; }
  .advantage-review-actions button { width: 100%; }
}
@media (prefers-reduced-motion:reduce) {
  .advantage-clothes-link, .comparative-clothes .advantage-product { animation: none; }
}

/* Teacher choices stay separate from the student's lesson progress. */
.teacher-settings-trigger { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--control-bg); color: var(--muted); font: inherit; font-size: 16px; font-weight: 750; cursor: pointer; }
.teacher-settings-trigger > span { font-size: 22px; }
.teacher-settings-trigger:hover { border-color: var(--blue); color: var(--blue); }
.teacher-settings-dialog { width: min(900px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 30px; border: 1px solid var(--accent-line); border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 20px 80px #17213030; }
.teacher-settings-dialog::backdrop { background: #17213083; }
.teacher-settings-dialog form { margin: 0; }
.teacher-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.teacher-settings-heading h2 { margin: 0; font-size: 29px; line-height: 1.4; }
.teacher-character-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.teacher-character-field legend { margin: -10px 0 20px; font-size: 17px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.teacher-character-field legend { margin-bottom: 10px; }
.teacher-characters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.teacher-people { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 12px; }
.teacher-custom-art { display: grid; place-items: center; height: 132px; font-size: 50px; color: var(--blue); }
.teacher-image-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.teacher-image-note { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.teacher-image-feedback { margin: 8px 0 0; color: #b52a43; font-size: 17px; line-height: 1.5; }
.teacher-image-feedback:empty { display: none; }
img[src^="data:image/png;base64,"] { image-rendering: auto; }
.teacher-character { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--control-bg); color: inherit; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.teacher-character img { width: 110px; height: 132px; object-fit: contain; image-rendering: pixelated; }
.teacher-character[aria-pressed="true"] { border-color: var(--blue); background: var(--surface-tint); color: var(--blue); }
.teacher-character-check { display: none; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; line-height: 24px; }
.teacher-character[aria-pressed="true"] .teacher-character-check { display: block; }
.teacher-character:hover { border-color: var(--speech-line); }
.teacher-intro-field input { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: 10px; color: inherit; font: inherit; font-size: 20px; font-weight: 500; background: #fff; }
.teacher-intro-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; align-items: start; margin: 28px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.teacher-intro-editor { display: grid; gap: 18px; min-width: 0; }
.teacher-preview { position: sticky; top: 0; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-tint); }
.teacher-preview h3 { margin: 0 0 18px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.teacher-preview-scene { display: grid; justify-items: center; gap: 14px; }
.teacher-preview-scene > img { width: 88px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.teacher-preview-scene > img[src^="data:"] { image-rendering: auto; }
.teacher-preview-bubble { position: relative; min-width: 0; width: 100%; padding: 20px; border: 2px solid var(--speech-line); border-radius: 16px; background: var(--white); }
.teacher-preview-bubble::before { content: ''; position: absolute; top: -9px; left: calc(50% - 8px); width: 14px; height: 14px; border-top: 2px solid var(--speech-line); border-left: 2px solid var(--speech-line); background: var(--white); transform: rotate(45deg); }
.teacher-preview-name { display: block; margin-bottom: 8px; font-size: 18px; font-weight: 750; color: var(--blue); overflow-wrap: anywhere; }
.teacher-preview-title { display: block; margin-bottom: 10px; font-size: 23px; line-height: 1.4; overflow-wrap: anywhere; }
.teacher-preview-speech { font-size: 19px; line-height: 1.65; overflow-wrap: anywhere; }
.teacher-preview-speech p { margin: 8px 0 0; }
.teacher-preview-speech strong, .teacher-preview-speech mark { color: var(--highlight-ink); background: var(--highlight-bg); }
.teacher-auto-intro { margin: -8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; word-break: keep-all; }
.teacher-settings-footer { position: sticky; bottom: -30px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 8px 0 -16px; padding: 18px 0; border-top: 1px solid var(--line); background: var(--white); }
.teacher-storage-info { min-width: 0; }
.teacher-settings-footer p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; word-break: keep-all; }
#teacher-storage-note:empty { display: none; }
#teacher-storage-note[role="alert"] { margin-top: 8px; color: var(--red); }
.teacher-settings-actions { display: flex; gap: 10px; flex-shrink: 0; }
.teacher-cancel, .teacher-intro-settings { padding: 12px 20px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--control-bg); color: var(--muted); font: inherit; font-size: 18px; font-weight: 750; cursor: pointer; }
.teacher-intro-settings { align-self: start; }
.yeonuk-name, .coach-help-name { overflow-wrap: anywhere; }
@media (max-width: 960px) {
  body .sidebar { position: relative; }
  .sidebar .teacher-settings-trigger { position: absolute; top: 14px; right: 24px; margin: 0; min-height: 40px; padding: 6px 12px; }
  body:has(.coached-active) .sidebar, body:has(.summary-active) .sidebar { padding-right: 148px; }
}
@media (max-width: 680px) {
  body:has(.coached-active) .sidebar, body:has(.summary-active) .sidebar { padding-right: 17px; }
  .sidebar .teacher-settings-trigger { top: 14px; right: 17px; font-size: 15px; min-height: 36px; padding: 4px 10px; }
  .teacher-settings-dialog { padding: 20px; border-radius: 18px; }
  .teacher-settings-heading { margin-bottom: 18px; }
  .teacher-settings-heading h2 { font-size: 24px; }
  .teacher-characters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .teacher-character { font-size: 16px; padding: 10px; }
  .teacher-character img { width: 62px; height: 88px; }
  .teacher-custom-art { height: 88px; }
  .teacher-people { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .teacher-intro-workspace { grid-template-columns: 1fr; gap: 24px; margin-top: 22px; padding-top: 20px; }
  .teacher-preview { position: static; padding: 16px; }
  .teacher-preview-bubble { padding: 16px; }
  .teacher-preview-speech { font-size: 18px; }
  .teacher-settings-footer { flex-direction: column; align-items: stretch; }
  .teacher-settings-actions { justify-content: flex-end; }
  .teacher-settings-footer .learn-action-primary { flex: 1; }
}
.teacher-intro-field { display: grid; gap: 8px; margin: 0; font-size: 18px; font-weight: 750; }
.teacher-intro-field textarea { resize: vertical; width: 100%; min-height: 118px; max-height: 240px; border: 1px solid var(--accent-line); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 19px; font-weight: 500; line-height: 1.6; color: inherit; background: #fff; }
.teacher-intro-field textarea::placeholder { color: var(--muted); opacity: 1; }
.teacher-custom-intro { white-space: pre-wrap; }
@media (max-width: 680px) {
  .teacher-settings-footer { bottom: -20px; gap: 12px; padding: 14px 0; margin-bottom: -12px; }
}

.past-paper-view { grid-column: 1 / -1; padding: 24px; }
.past-paper-view h2 { margin: 0; font-size: 28px; }
.past-paper-heading { margin-bottom: 22px; }
.activity-tabs { grid-template-columns: repeat(var(--activity-tab-count,3),minmax(0,1fr)); }
.activity-tabs .step { min-width: 0; min-height: 58px; flex-wrap: nowrap; cursor: pointer; }
.activity-tab-label { min-width: 0; line-height: 1.45; word-break: keep-all; }
.step:hover:not(.current) { color: var(--blue); }
.past-paper-heading p { margin: 10px 0 0; font-size: 19px; line-height: 1.6; font-weight: 650; word-break: keep-all; }
.past-paper-heading p span { white-space: nowrap; color: var(--muted); font-weight: 500; }
.past-paper-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; align-items: start; }
.past-paper-original { min-width: 0; }
.past-question-image { display: block; width: 100%; height: auto; }
.past-zoom-trigger { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; cursor: zoom-in; }
.past-zoom-label { display: flex; align-items: center; justify-content: center; gap: 7px; width: fit-content; min-height: 36px; margin: 8px 0 0 auto; padding: 5px 10px; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--blue-soft); font-size: 16px; line-height: 24px; font-weight: 700; }
.past-zoom-label svg { flex-shrink: 0; }
.past-zoom-trigger:is(:hover,:focus-visible) .past-zoom-label { border-color: var(--blue); background: var(--blue); color: white; }
.past-paper-original:has(.past-zoom-trigger:is(:hover,:focus-visible)) { border-color: var(--blue); }
.past-answer-panel { position: sticky; top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--control-bg); }
.past-answer-panel h3 { margin: 0 0 18px; font-size: 21px; line-height: 1.4; word-break: keep-all; }
.past-answer-choices { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.past-answer-choices button { width: 57px; height: 53px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 29px; cursor: pointer; }
.past-answer-choices button[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.past-answer-choices button.is-correct { border-color: #10846c; background: #e3f3eb; color: #08745f; }
.past-answer-choices button.is-wrong { border-color: #c74860; background: #fce7eb; color: #a72640; }
.past-answer-choices button:disabled { opacity: 1; cursor: default; }
.past-check, .past-retry { width: 100%; }
.past-result { position: relative; padding: 16px 12px; margin: 18px -4px; border: 1px solid #b4dace; border-radius: 12px; background: #edf8f2; }
.past-result.is-wrong { border-color: #e9cfaa; background: #fff9ed; }
.past-result h4 { margin: 0 0 14px; font-size: 20px; }
.past-answer-key { display: grid; gap: 6px; margin-bottom: 18px; }
.past-answer-key strong { font-size: 28px; color: #08745f; }
.past-answer-key span { color: var(--muted); font-size: 17px; }
.past-result-table { width: 100%; border-collapse: collapse; font-size: 17px; text-align: center; }
.past-result-table caption { text-align: left; font-weight: 750; margin-bottom: 8px; }
.past-result-table th, .past-result-table td { border-bottom: 1px solid #ccdfd6; padding: 10px 3px; }
.past-result-table thead th { font-size: 15px; white-space: nowrap; }
.past-result-table td strong { font-size: 23px; }
.past-result-table td span { display: block; margin-top: 4px; font-size: 16px; font-weight: 750; color: #08745f; }
.past-cost-result td strong { font-size: 21px; }
.past-cost-result td span { font-size: 15px; font-weight: 500; color: var(--ink); }
.past-lower-cost { background: #d6eee3; color: #08745f; }
.past-specialize { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 16px; }
.past-specialize strong { display: block; margin-top: 4px; color: #08745f; font-size: 20px; }
.past-retry { padding: 11px 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: #fff; color: var(--muted); font: inherit; font-weight: 750; cursor: pointer; }
.past-image-dialog { width: min(1100px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--accent-line); border-radius: 18px; }
.past-image-dialog::backdrop { background: #17213083; }
.past-image-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 19px; }
.past-image-heading .icon-button { flex-shrink: 0; }
.past-image-scroll { max-height: calc(100dvh - 130px); overflow: auto; }
.past-image-scroll img { display: block; width: 100%; min-width: 800px; height: auto; }
@media (max-width: 680px) {
  .past-paper-view { padding: 22px 18px; }
  .past-paper-workspace { grid-template-columns: 1fr; gap: 22px; }
  .past-paper-heading p { font-size: 18px; }
  .past-answer-panel { position: static; }
  .past-answer-choices { flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
  .past-answer-choices button { width: 46px; height: 48px; flex-shrink: 1; }
}

.trade-exchange-trigger { width: 100%; margin: 0 0 10px; padding: 11px 10px; border: 1px solid var(--accent-line); border-radius: 10px; color: var(--blue); background: #fff; font: inherit; font-size: 16px; font-weight: 750; cursor: pointer; }
.trade-exchange-dialog { width: min(940px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 30px; border: 2px solid var(--speech-line); border-radius: 24px; background: #fff; color: var(--ink); }
.trade-exchange-dialog::backdrop { background: #17213083; }
.trade-exchange-dialog h3 { margin: 0 40px 26px 0; font-size: 30px; line-height: 1.4; }
.exchange-stage { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: center; }
.exchange-country { padding: 20px 18px; border: 2px solid var(--accent-line); border-radius: 18px; background: var(--surface-tint); }
.exchange-country.actor-b { border-color: #ecc7b4; background: #fff6f0; }
.exchange-country h4 { margin: 0 0 22px; font-size: 26px; }
.exchange-country .actor { font-size: inherit; }
.exchange-stock { display: flex; align-items: center; gap: 8px; min-height: 72px; border-top: 1px solid var(--line); font-size: 22px; }
.exchange-stock .good-icon { width: 30px; height: 30px; flex-shrink: 0; }
.exchange-stock strong { margin-left: auto; font-size: 38px; }
.exchange-stock small { align-self: center; font-size: 17px; }
.exchange-transfer { display: grid; gap: 20px; }
.exchange-lane { padding: 10px 10px 0; border-radius: 12px; text-align: center; }
.exchange-route { margin-bottom: 4px; color: var(--muted); font-size: 17px; font-weight: 650; }
.exchange-lane > strong { font-size: 25px; }
.exchange-track { position: relative; height: 60px; margin: 4px 0; }
.exchange-track-arrow { display: block; width: 1.5em; margin: 0 auto; color: var(--accent-line); font-size: 55px; line-height: 60px; transform: scaleX(2); }
.exchange-lane-1 .exchange-track-arrow { color: #e9c9b8; }
.exchange-cargo { position: absolute; top: 10px; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); opacity: 0; }
.exchange-cargo .good-icon { width: 33px; height: 33px; }
.exchange-lane-1 .exchange-cargo { background: #fff0e5; color: var(--orange); }
.is-playing .exchange-cargo { animation: exchange-deliver 800ms linear var(--cargo-delay) both; }
.is-playing .exchange-lane-1 .exchange-cargo { animation-name: exchange-deliver-back; }
@keyframes exchange-deliver { 0% { left: 0; opacity: 0; transform: scale(.8); } 10% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { left: calc(100% - 40px); opacity: 0; transform: scale(.8); } }
@keyframes exchange-deliver-back { 0% { left: calc(100% - 40px); opacity: 0; transform: scale(.8); } 10% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { left: 0; opacity: 0; transform: scale(.8); } }
.trade-exchange-dialog[data-phase="rice"] .exchange-lane-0 { background: var(--surface-tint); }
.trade-exchange-dialog[data-phase="clothes"] .exchange-lane-1 { background: #fff2e8; }
.exchange-status { margin: 26px 0; padding: 16px; border-radius: 12px; background: var(--surface-tint); text-align: center; font-size: 23px; font-weight: 750; line-height: 1.4; word-break: keep-all; }
.trade-exchange-dialog[data-phase="done"] .exchange-status { background: #e4f4eb; color: #08745f; }
.exchange-actions { display: flex; justify-content: space-between; gap: 16px; }
.exchange-replay { padding: 12px 18px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--control-bg); color: var(--muted); font: inherit; font-size: 17px; font-weight: 750; cursor: pointer; }
.trade-lesson:has(.trade-exchange-dialog[open]) .ppf-moving { animation-play-state: paused; }
.trade-lesson:has(.trade-exchange-dialog[open]) .trade-narrator { visibility: hidden; }
@media (max-width: 680px) {
  .trade-exchange-dialog { padding: 22px 18px; }
  .trade-exchange-dialog h3 { font-size: 25px; margin-bottom: 20px; }
  .exchange-stage { grid-template-columns: 1fr 1fr; gap: 12px; }
  .exchange-country { padding: 14px 10px; }
  .exchange-country h4 { font-size: 22px; margin-bottom: 12px; }
  .exchange-stock { gap: 4px; min-height: 58px; font-size: 18px; }
  .exchange-stock .good-icon { width: 22px; height: 22px; }
  .exchange-stock strong { font-size: 29px; }
  .exchange-stock small { font-size: 14px; }
  .exchange-transfer { grid-column: 1 / -1; grid-row: 2; gap: 6px; }
  .exchange-route { font-size: 16px; }
  .exchange-lane > strong { font-size: 21px; }
  .exchange-track { height: 48px; }
  .exchange-track-arrow { line-height: 48px; font-size: 45px; }
  .exchange-status { font-size: 19px; margin: 18px 0; padding: 12px; }
  .exchange-actions { gap: 8px; }
  .exchange-replay { padding: 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .is-playing .exchange-cargo { animation: none; } }

/* 반복연습의 교환은 두 생산자 사이를 오가는 상품으로 읽는다. */
.practice-quantity { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; font-size: 21px; line-height: 1.4; }
.practice-quantity .good-icon { width: 27px; height: 27px; }
.practice-quantity strong { font-size: 1.25em; }
.practice-exchange { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr) minmax(0,1fr); align-items: center; gap: 10px; padding: 12px 0; }
.practice-exchange > .actor { justify-self: center; font-size: 23px; }
.practice-exchange-flows { display: grid; gap: 8px; }
.practice-exchange-flows > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 14px; border-radius: 8px; background: var(--blue-soft); }
.practice-exchange-flows > div + div { background: #fff0e6; }
.practice-exchange-flows > div > span[aria-label] { font-size: 29px; line-height: 1; }
.practice-situation { margin: 12px 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; }
.practice-situation > p { margin: 0; font-size: 18px; line-height: 1.5; word-break: keep-all; }
.practice-stock { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr); align-items: center; gap: 8px; }
.practice-stock > section { display: grid; align-content: center; gap: 12px; min-height: 125px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.practice-stock > section > span:first-child { font-size: 17px; color: var(--muted); }
.practice-stock > b { text-align: center; font-size: 28px; }
.practice-profit-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-top: 10px; }
.practice-profit-pair .solution-actor > span:not(.actor):not(.practice-quantity) { font-size: 17px; }
.practice-profit { padding: 7px 12px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 21px; }
.practice-profit.is-loss { color: #b52740; background: #fce2e7; }
@media (max-width: 600px) {
  .practice-quantity { font-size: 18px; gap: 3px; }
  .practice-quantity .good-icon { width: 22px; height: 22px; }
  .practice-exchange { grid-template-columns: minmax(0,1fr) minmax(0,2.6fr) minmax(0,1fr); gap: 4px; }
  .practice-exchange > .actor { font-size: 18px; gap: 4px; }
  .practice-exchange-flows > div { padding: 7px 6px; gap: 4px; }
  .practice-situation { padding: 10px; }
  .practice-situation > p { font-size: 17px; }
  .practice-profit-pair { gap: 6px; }
  .practice-profit-pair .solution-actor { padding: 12px 6px; }
  .practice-profit { padding: 6px; font-size: 18px; }
}
@media (min-width: 601px) {
  .practice-exchange { padding: 5px 0; }
  .practice-exchange-flows { gap: 4px; }
  .practice-exchange-flows > div { padding: 4px 12px; }
  .practice-situation { margin: 10px 0; padding: 8px 14px; }
  .summary-board:has(.practice-situation) .source-panel { margin-bottom: 10px; padding-top: 10px; padding-bottom: 10px; }
  .summary-board:has(.practice-situation) .data-table th, .summary-board:has(.practice-situation) .data-table td { padding-top: 5px; padding-bottom: 5px; }
}

.practice-graph-legend { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 19px; }
.practice-line { width: 28px; border-top: 3px solid var(--blue); margin-right: 18px; }
.practice-line.actor-b { border-top-color: var(--orange); border-top-style: dashed; }
.practice-bank-graph { display: block; width: 100%; max-height: 270px; font-family: inherit; overflow: visible; }
.practice-bank-graph text { font-size: 19px; fill: var(--muted); }
.practice-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.practice-axis { fill: none; stroke: #8a9faa; stroke-width: 1.5; }
.practice-bank-curve { fill: none; stroke: var(--blue); stroke-width: 3; }
.practice-bank-curve.actor-b { stroke: var(--orange); stroke-dasharray: 7 4; }
.practice-bank-graph .practice-intercept { font-weight: 750; fill: var(--blue); paint-order: stroke; stroke: var(--control-bg); stroke-width: 4px; }
.practice-bank-graph .practice-intercept.actor-b { fill: var(--orange); }
.practice-bank-graph .practice-axis-title { font-size: 19px; font-weight: 750; fill: var(--ink); }
.practice-planned-point { fill: var(--ink); stroke: white; stroke-width: 2; }
.practice-bank-graph .practice-point-label { font-size: 21px; fill: var(--ink); font-weight: 800; }
.practice-point-resources { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 12px; margin: 12px 0; font-size: 19px; }
.summary-table .revealed { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .practice-bank-graph text { font-size: 32px; }
  .practice-bank-graph .practice-axis-title { font-size: 34px; }
  .practice-bank-graph .practice-point-label { font-size: 34px; }
  .practice-point-resources { font-size: 18px; }
}
@media (min-width: 800px) {
  .practice-materials.has-exchange { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(250px,1fr); gap: 14px; align-items: center; margin-bottom: 14px; }
  .summary-board .practice-materials.has-exchange > .source-panel { margin: 0; }
  .practice-materials.has-exchange > .practice-situation { margin: 0; }
  .practice-materials.has-exchange .practice-exchange { grid-template-columns: 1fr 1fr; margin-top: 12px; }
  .practice-materials.has-exchange .practice-exchange > .actor:first-child { grid-column: 1; grid-row: 1; justify-self: start; }
  .practice-materials.has-exchange .practice-exchange > .actor:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
  .practice-materials.has-exchange .practice-exchange-flows { grid-column: 1 / -1; grid-row: 2; }
  .practice-materials.has-exchange .practice-bank-graph text { font-size: 24px; }
  .practice-materials.has-exchange .source-header { flex-wrap: wrap; }
}

.production-study-aside { min-width: 0; }
.production-condition-table { width: 100%; margin-bottom: 18px; border-collapse: collapse; border: 1px solid var(--line); font-size: 20px; }
.production-condition-table caption { padding: 0 0 10px; font-size: 22px; font-weight: 750; text-align: left; }
.production-condition-table caption span { float: right; color: var(--muted); font-size: 18px; font-weight: 600; line-height: 1.7; }
.production-condition-table thead th { padding: 9px 12px; background: var(--blue-soft); font-size: 18px; }
.production-condition-table tbody th, .production-condition-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: center; }
.production-condition-table tbody th { font-weight: 650; }
.production-condition-table .good-icon { display: inline-block; width: 26px; height: 26px; margin-right: 5px; vertical-align: middle; }
.production-condition-table td strong { color: var(--blue); font-size: 28px; }
.production-study-aside .yeonuk-quiz { margin-top: 0; }
.production-quiz-mode:has(.production-study-aside) .production-conditions { display: none; }
@media (max-width: 600px) {
  .production-condition-table caption { font-size: 21px; }
  .production-condition-table caption span { float: none; display: block; }
  .production-condition-table thead th { padding: 8px; font-size: 17px; }
}

.learn-next-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; min-width: 0; }
.learn-next-actions > .learn-action-primary { min-height: 52px; padding: 12px 20px; font-size: 20px; }
.animation-replay, .curve-draw-actions .animation-replay { min-height: 48px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--control-bg); color: var(--muted); font-size: 18px; font-weight: 700; }
.animation-replay:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.summary-explanation-actions { gap: 10px; }
.curve-draw-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.curve-draw-actions .curve-redraw { grid-column: 1 / -1; }
@media (max-width: 680px) {
  .learn-next-actions { width: 100%; }
  .learn-next-actions > .learn-action-primary { flex: 1 1 220px; }
  .curve-draw-actions { grid-template-columns: minmax(0,1fr); }
  .summary-explanation-actions { flex-wrap: wrap; }
}

.brand-name { font-size: 18px; white-space: nowrap; }
.landing-active {
  --ink: #172130;
  --muted: #606b7b;
  --blue: #244de8;
  --blue-soft: #eaf0ff;
  --line: #d9dfec;
  --primary-hover: #1c3ec4;
  min-height: 100vh;
  background: #fafbff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.landing-active .sidebar {
  position: relative; inset: auto; width: 91%; max-width: 1528px; height: auto; min-height: 98px;
  margin: 0 auto 44px; padding: 0; flex-direction: row; align-items: center; justify-content: space-between;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.landing-active .brand { margin: 0; padding: 0; gap: 12px; }
.landing-active .brand-name { font-size: 22px; }
.landing-active .brand-name::after { content: '.'; color: var(--blue); }
.landing-active .brand-symbol { width: 33px; height: 33px; border-radius: 0; background: none; color: var(--blue); }
.landing-active #topic-nav { display: none; }
.landing-active .teacher-settings-trigger {
  position: static; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
  width: auto; min-height: 0; margin: 0; padding: 7px 0 7px 15px;
  border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 650;
}
.teacher-settings-avatar { display: grid; place-items: center; width: 37px; height: 37px; }
.teacher-settings-avatar img { width: 34px; height: 34px; object-fit: contain; }
.landing-active .teacher-settings-trigger > span { font-size: inherit; }
.landing-active .teacher-settings-trigger > svg { display: none; }
.landing-active main { width: 91%; max-width: 1528px; margin: 0 auto; padding: 0 0 28px; }
.landing-active .page-header { display: none; }
.practice-board.landing-board { display: block; border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 0; }
.landing { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-areas: 'heading routes' 'school routes' 'footer footer'; column-gap: 7%; word-break: keep-all; }
.landing-heading { grid-area: heading; min-width: 0; padding: 0 0 32px; }
.landing-heading #question-title { margin: 0; color: var(--ink); font-size: clamp(46px,5.25vw,80px); font-weight: 850; letter-spacing: -.065em; line-height: 1.15; }
.landing-title-kicker, .landing-title-line { display: block; }
.landing-title-line { white-space: nowrap; }
.landing-title-line em { font-style: normal; color: var(--blue); }
.landing-edition { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; color: var(--blue); line-height: 1.3; letter-spacing: -.8px; }
.landing-edition strong { font-size: 30px; font-weight: 750; white-space: nowrap; }
.landing-edition-course { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 9px; border: 1px solid #c9d4ff; border-radius: 4px; background: var(--blue-soft); font-size: 19px; font-weight: 650; white-space: nowrap; }
.landing-edition-course b { font-family: 'Avenir Next',Arial,sans-serif; font-size: 23px; font-weight: 700; }
.landing-illustration { display: block; width: 100%; max-width: 380px; height: 150px; object-fit: contain; object-position: left center; margin-top: 24px; }
.landing-school { grid-area: school; min-width: 0; align-self: end; margin: 0; padding-top: 24px; border-top: 1px solid var(--line); }
#school-form { display: grid; grid-template-columns: minmax(0,1fr) 64px; column-gap: 8px; }
.school-intro, .school-privacy { grid-column: 1 / -1; }
.school-intro h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.4px; line-height: 1.4; }
.school-entry-help,.school-feedback { margin: 8px 0 0; color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.4; }
.school-feedback:empty { display: none; }
.school-intro:has(.school-feedback:not(:empty)) .school-entry-help { display: none; }
.school-fields { grid-column: 1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 8px; margin-top: 13px; }
.school-fields label { min-width: 0; }
.school-fields input { width: 100%; min-width: 0; height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font-size: 15px; }
.school-fields input::placeholder { color: var(--muted); }
.school-save { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 64px; height: 48px; margin-top: 13px; padding: 3px; border: 0; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.school-save > span { font: 26px/1 'Avenir Next',Arial,sans-serif; }
.landing-active .school-save .keyboard-hint { border: 0; padding: 0; background: none; color: var(--blue); font-size: 12px; line-height: 1.2; }
.school-save:hover { background: #dce4ff; }
.school-privacy { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.school-privacy a { color: var(--blue); white-space: nowrap; text-underline-offset: 3px; }
.landing-grid { grid-area: routes; display: flex; flex-direction: column; gap: 15px; min-width: 0; min-height: 555px; }
.landing-card { position: relative; display: grid; grid-template-columns: 44px minmax(0,1fr) 24px; align-items: center; flex: 1; gap: 23px; min-width: 0; min-height: 160px; padding: 27px 26px; border: 1px solid var(--line); border-radius: 6px; background: white; text-align: left; color: var(--ink); transition: transform .18s,border-color .18s; }
.landing-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.landing-learn { grid-template-columns: minmax(0,1fr) 145px; background: var(--blue-soft); border-color: #c9d4ff; }
.landing-card-copy { display: grid; grid-column: 2; grid-row: 1; gap: 12px; min-width: 0; }
.landing-learn .landing-card-copy { grid-column: 1; }
.landing-card-title { font-size: 27px; font-weight: 750; letter-spacing: -.7px; line-height: 1.2; }
.landing-learn .landing-card-title { color: var(--blue); }
.landing-card-description { max-width: 215px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.landing-card-arrow { grid-column: 3; grid-row: 1; color: var(--blue); font: 28px/1 'Avenir Next',Arial,sans-serif; }
.landing-learn .landing-card-arrow { grid-column: auto; grid-row: auto; position: absolute; right: 20px; top: 20px; font-size: 24px; }
.landing-art { grid-column: 1; grid-row: 1; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--blue); }
.landing-learn .landing-art { grid-column: 2; width: 145px; height: 110px; }
.landing-art svg { width: 100%; height: auto; overflow: visible; font-family: inherit; }
.landing-curve-a { stroke: var(--blue); fill: var(--blue); }
.landing-curve-b { stroke: #dc592e; fill: #dc592e; }
path.landing-curve-a, path.landing-curve-b { fill: none; }
.landing-label-a { fill: var(--blue); }
.landing-label-b { fill: #dc592e; }
.landing-variables { display: flex; align-items: center; gap: 2px; font: italic 29px 'Avenir Next',Arial,sans-serif; letter-spacing: -3px; }
.landing-variables > span { font-size: 20px; font-style: normal; }
.landing-paper-icon { display: grid; place-items: center; width: 29px; height: 36px; border: 1.5px solid currentColor; font: 26px 'Avenir Next',Arial,sans-serif; }
.landing-footer { grid-area: footer; border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; }
.usage-counts { display: flex; justify-content: flex-end; gap: 17px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.usage-counts strong { margin-left: 8px; color: var(--muted); font-family: 'Avenir Next',Arial,sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.usage-counts > span+span { border-left: 1px solid var(--line); padding-left: 17px; }
@media(min-width:1500px) {
  .landing-active .sidebar { margin-bottom: 55px; }
  .landing-heading #question-title { font-size: 86px; }
  .landing-edition strong { font-size: 34px; }
  .landing-grid { min-height: 610px; }
  .landing-card-title { font-size: 31px; }
}
@media(max-width:1100px) {
  .landing-active .sidebar { margin-bottom: 36px; }
  .landing { column-gap: 6%; }
  .landing-edition { gap: 11px; margin-top: 25px; }
  .landing-edition strong { font-size: 28px; }
  .landing-card { padding: 24px 23px; gap: 19px; }
  .landing-card-title { font-size: 24px; }
  .landing-card-description { font-size: 15px; }
  .landing-learn { grid-template-columns: minmax(0,1fr) 130px; }
  .landing-learn .landing-art { width: 130px; height: 100px; }
}
@media(max-width:850px) {
  .landing-active .sidebar { min-height: 80px; margin-bottom: 32px; }
  .landing-active .brand-name { font-size: 20px; }
  .landing-active .brand-symbol { width: 29px; height: 29px; }
  .landing-active .teacher-settings-trigger { font-size: 13px; }
  .landing { column-gap: 5%; }
  .landing-heading #question-title { font-size: 45px; }
  .landing-edition { gap: 10px; }
  .landing-edition-course { padding: 6px 8px; font-size: 17px; }
  .landing-edition-course b { font-size: 22px; }
  .landing-edition strong { font-size: 26px; }
  .landing-illustration { max-width: 340px; height: 135px; margin-top: 23px; }
  .landing-heading { padding-bottom: 28px; }
  .landing-grid { min-height: 530px; }
  .landing-card { gap: 16px; padding: 24px 20px; }
  .landing-card-title { font-size: 23px; }
  .landing-card-description { font-size: 14px; }
  .landing-learn { grid-template-columns: minmax(0,1fr) 105px; }
  .landing-learn .landing-art { width: 105px; height: 85px; }
  .school-fields { gap: 6px; }
  .school-fields input { font-size: 14px; padding: 10px; }
}
@media(max-width:600px) {
  .landing-active .sidebar { min-height: 73px; width: 88%; margin-bottom: 29px; }
  .landing-active main { width: 88%; }
  .landing-active .brand { gap: 8px; }
  .landing-active .brand-name { font-size: 18px; }
  .landing-active .brand-symbol { width: 26px; height: 26px; }
  .landing-active .teacher-settings-trigger { font-size: 12px; gap: 4px; padding: 5px 0; }
  .teacher-settings-avatar { width: 27px; height: 27px; }
  .teacher-settings-avatar img { width: 27px; height: 27px; }
  .landing { display: flex; flex-direction: column; }
  .landing-heading { padding: 0 0 28px; }
  .landing-heading #question-title { font-size: clamp(41px,11.8vw,64px); }
  .landing-edition { margin-top: 24px; }
  .landing-edition-course { font-size: 18px; }
  .landing-edition strong { font-size: 27px; }
  .landing-illustration { max-width: 350px; height: 145px; margin-top: 24px; }
  .landing-school { align-self: stretch; padding-top: 22px; margin-bottom: 28px; }
  .school-fields input { font-size: 15px; padding: 10px 12px; }
  .landing-grid { min-height: 0; gap: 12px; }
  .landing-card { min-height: 145px; padding: 23px 20px; gap: 18px; }
  .landing-card-title { font-size: 24px; }
  .landing-learn { grid-template-columns: minmax(0,1fr) 125px; }
  .landing-learn .landing-art { width: 125px; height: 95px; }
  .landing-card-copy { gap: 9px; }
  .landing-footer { margin-top: 28px; }
  .usage-counts { justify-content: center; }
}
@media(max-width:360px) {
  .landing-active .brand-name { font-size: 16px; }
  .landing-active .brand-symbol { width: 22px; height: 22px; }
  .landing-active .teacher-settings-trigger { font-size: 11px; }
  .landing-active .teacher-settings-avatar, .landing-active .teacher-settings-avatar img { width: 23px; height: 23px; }
  .landing-edition { gap: 9px; }
  .landing-edition-course { font-size: 16px; padding: 6px 7px; }
  .landing-edition strong { font-size: 24px; }
  .landing-illustration { height: 125px; }
  .school-fields input { font-size: 14px; padding: 10px; }
  .landing-card { padding: 22px 17px; gap: 15px; }
  .landing-card-title { font-size: 21px; }
  .landing-card-description { font-size: 13px; }
  .landing-learn { grid-template-columns: minmax(0,1fr) 102px; }
  .landing-learn .landing-art { width: 102px; height: 82px; }
}
@media(prefers-reduced-motion:reduce) { .landing-card { transition: none; } .landing-card:hover { transform: none; } }

.privacy-page { margin: 0 auto; max-width: 850px; padding: 40px 24px; font-size: 19px; line-height: 1.8; }
.privacy-page h1 { font-size: 32px; margin: 24px 0; }
.privacy-page h2 { font-size: 23px; margin: 32px 0 10px; }
.privacy-page p { margin: 12px 0; }
.privacy-page a { color: var(--blue); }
.keyboard-hint { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--accent-line); border-bottom-width: 2px; border-radius: 5px; background: #fff9; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; }

.has-enter-hint { gap: 10px; }
button.has-enter-hint { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.enter-shortcut { flex: 0 0 auto; pointer-events: none; }
.enter-shortcut.shortcut-paused { visibility: hidden; }
.summary-table .answer-blank { min-height: 78px; flex-direction: column; gap: 4px; }

/* Opaque custom pictures need their whole frame clear of the speech bubble. */
.modal-yeonuk[src^="data:image/"] { top: auto; bottom: calc(100% + 18px); right: 40px; width: 112px; height: 112px; }
.production-quiz-mode .yeonuk-quiz:has(> img[src^="data:image/"]) { gap: 24px; }
@media (max-width:680px) { .modal-yeonuk[src^="data:image/"] { right: 24px; width: 96px; height: 96px; } }
@media (max-height:540px) { .modal-yeonuk[src^="data:image/"] { width: 64px; height: 64px; } }
@media (max-height:540px) and (min-width:480px) {
  .yeonuk-modal .coach-dialog-actions { flex-wrap: nowrap; gap: 8px; margin-top: 8px; }
  .yeonuk-modal .coach-dialog-actions .coach-confirm { flex-basis: auto; order: 0; }
}
@media (max-width:360px) {
  .yeonuk-modal:has(.modal-yeonuk[src^="data:image/"]) { inset: 96px 0 12px; max-height: calc(100dvh - 108px); padding: 18px; }
  .modal-yeonuk[src^="data:image/"] { width: 64px; height: 64px; }
}
.yeonuk-modal:has(.modal-yeonuk[src^="data:image/"]) .coach-page-previous:disabled { display: none; }

/* Past-paper reading and the visual lesson each get their own workspace. */
.past-paper-heading { margin-bottom: 16px; }
.past-paper-heading p { font-size: 18px; }
.past-view-switch { margin: 0 0 20px; max-width: 100%; }
.past-view-switch button { white-space: normal; }
.past-view-switch button:disabled { opacity: .55; }
.past-paper-original { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: white; }
.past-answer-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.past-answer-choices button { width: 100%; min-width: 44px; }
.past-open-lesson { width: 100%; margin-bottom: 10px; font-size: 17px; white-space: normal; }
.past-answer-feedback { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--control-bg); }
.past-answer-feedback .past-result { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; }
.past-answer-feedback .past-result h4 { margin: 0; font-size: 18px; line-height: 1.4; word-break: keep-all; }
.past-answer-feedback .past-answer-key { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 0; }
.past-answer-feedback .past-answer-key strong { font-size: 24px; }
.past-answer-actions { display: flex; align-items: center; gap: 10px; }
.past-answer-actions :is(.past-open-lesson,.past-retry) { width: auto; min-height: 48px; margin: 0; padding: 12px 16px; line-height: 1.4; }
@media(max-width:680px) {
  .past-answer-feedback { margin-top: 16px; padding: 14px; }
  .past-answer-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .past-answer-actions :is(.past-open-lesson,.past-retry) { width: 100%; padding-inline: 8px; }
}
.past-lesson-steps { display: grid; grid-template-columns: repeat(auto-fit,minmax(88px,1fr)); gap: 7px; margin-bottom: 18px; }
.past-lesson-steps button { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 9px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--control-bg); color: var(--muted); font-size: 16px; font-weight: 700; }
.past-lesson-steps button span { font-size: 15px; }
.past-lesson-steps button[aria-current="step"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.past-lesson-heading, .past-lesson-tools, .past-lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.past-lesson-heading h3 { font-size: 24px; }
.past-lesson-tools { justify-content: flex-end; }
.past-lesson-heading { margin-bottom: 18px; }
.past-lesson-visual { max-width: 760px; margin: 0 auto; }
.past-lesson-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.past-analysis-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; text-align: center; font-size: 21px; }
.past-analysis-table caption { margin-bottom: 10px; text-align: left; font-size: 19px; font-weight: 750; }
.past-analysis-table th, .past-analysis-table td { padding: 14px 8px; border: 1px solid var(--line); }
.past-analysis-table thead { background: var(--blue-soft); font-size: 18px; }
.past-analysis-table tbody th { background: var(--control-bg); white-space: nowrap; }
.past-low { display: inline-block; padding: 4px 8px; border-radius: 5px; background: var(--green-soft); color: var(--green); }
.past-analysis-graph { display: block; width: 100%; max-height: 300px; overflow: visible; }
.past-analysis-graph text { font-family: inherit; fill: var(--muted); font-size: 20px; }
.past-analysis-graph .past-axis-title { font-weight: 750; fill: var(--ink); font-size: 22px; }
.past-country-curve { color: var(--blue); }
.past-country-curve.actor-b { color: var(--orange); }
.past-ppf-line { stroke: currentColor; stroke-width: 3; fill: none; }
.actor-b .past-ppf-line { stroke-dasharray: 7 4; }
.past-before-dot { fill: white; stroke: currentColor; stroke-width: 2; }
.past-now-dot { fill: currentColor; stroke: white; stroke-width: 2; }
.past-point-label { fill: currentColor !important; font-weight: 750; paint-order: stroke; stroke: white; stroke-width: 4px; stroke-linejoin: round; }
.past-point-route { stroke: currentColor; stroke-width: 2; fill: none; stroke-dasharray: 5 4; opacity: .65; }
.past-analysis-graph .is-consumption { color: var(--green); stroke: var(--green); }
.past-analysis-graph .past-point-label.is-consumption { fill: var(--green) !important; stroke: white; }
.past-analysis-graph .past-now-dot.is-consumption { fill: var(--green); stroke: white; }
.past-moving-point { animation: past-point-move 1.4s ease-in-out both; }
@keyframes past-point-move { from { transform: translate(var(--past-dx),var(--past-dy)); } to { transform: translate(0,0); } }
.past-graph-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 4px 0 18px; font-size: 17px; }
.past-graph-key > span:last-child { color: var(--muted); }
.past-takeaway, .past-exchange-flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--green-soft); font-size: 21px; }
.past-takeaway strong { color: var(--green); }
.past-exchange-flow { margin-bottom: 16px; background: var(--blue-soft); font-size: 19px; }
.past-calculation-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.past-calculation-pair section { padding: 24px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-tint); text-align: center; }
.past-calculation-pair .actor-b { background: var(--orange-soft); }
.past-calculation-pair h4 { margin: 0 0 16px; font-size: 23px; }
.past-calculation-pair p, .past-calculation-pair > section > span { font-size: 17px; color: var(--muted); }
.past-calculation-pair section > div { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; font-size: 30px; }
.past-option-review { display: grid; gap: 10px; }
.past-option-verdict { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--control-bg); font-size: 18px; line-height: 1.6; }
.past-option-verdict > strong { color: var(--red); }
.past-option-verdict.is-correct { background: var(--green-soft); border-color: #b4dace; }
.past-option-verdict.is-correct > strong { color: var(--green); }
@media(max-width:680px) {
 .past-answer-choices { grid-template-columns: repeat(5,minmax(0,1fr)); }
 .past-answer-choices button { min-width: 0; }
 .past-lesson-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .past-lesson-heading, .past-lesson-tools { align-items: stretch; }
 .past-lesson-tools { width: 100%; justify-content: space-between; gap: 8px; }
 .past-lesson-tools .text-button { padding: 8px 10px; font-size: 15px; }
 .past-analysis-table { font-size: 18px; }
 .past-analysis-table th, .past-analysis-table td { padding: 10px 5px; }
 .past-analysis-table thead { font-size: 16px; }
 .past-analysis-table caption { font-size: 18px; }
 .past-analysis-graph text { font-size: 27px; }
 .past-analysis-graph .past-axis-title { font-size: 28px; }
 .past-graph-key { font-size: 16px; gap: 10px; }
 .past-calculation-pair { gap: 10px; }
 .past-calculation-pair section { padding: 16px 8px; }
 .past-calculation-pair section > div { font-size: 24px; }
 .past-calculation-pair p, .past-calculation-pair > section > span { font-size: 16px; }
 .past-option-verdict { grid-template-columns: 1fr; gap: 5px; }
 .past-lesson-footer > .learn-next-actions { width: 100%; }
 .past-takeaway, .past-exchange-flow { padding: 14px 10px; font-size: 19px; gap: 12px; }
}
@media(prefers-reduced-motion:reduce) { .past-moving-point { animation: none; } }

.past-paper-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
.past-paper-heading p { margin: 0; font-size: 17px; }
@media(max-width:680px) {
 .past-analysis-graph text { font-size: 34px; }
 .past-analysis-graph .past-axis-title { font-size: 36px; }
}
@media(max-width:360px) {
 .past-analysis-graph text { font-size: 38px; }
 .past-analysis-graph .past-axis-title { font-size: 40px; }
}

.past-result:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media(min-width:800px) {
 .past-lesson-visual > .past-analysis-graph { max-height: 270px; }
 .past-lesson-visual:has(> .past-analysis-table):has(> .past-analysis-graph) { display: grid; grid-template-columns: minmax(230px,.85fr) minmax(0,1.15fr); gap: 10px 18px; align-items: center; }
 .past-lesson-visual:has(> .past-analysis-graph) > .past-analysis-table { grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; }
 .past-lesson-visual:has(> .past-analysis-table) > .past-analysis-graph { grid-column: 2; grid-row: 1; max-height: 300px; }
 .past-lesson-visual:has(> .past-analysis-table) > .past-graph-key { grid-column: 2; grid-row: 2; margin: 0; }
 .past-lesson-visual:has(> .past-analysis-table) .past-analysis-graph text { font-size: 24px; }
 .past-lesson-visual:has(> .past-analysis-table) .past-analysis-graph .past-axis-title { font-size: 26px; }
}

@media (prefers-color-scheme: dark) {
  :root { --highlight-ink: #142d39; --highlight-bg: #e8ca67; }
}

/* 5단계 그래프의 단위 변화 → 기회비용 */
.trade-graph-cost { padding: 7px 11px; min-height: 40px; border: 1px solid var(--accent-line); border-radius: 8px; color: var(--blue); background: var(--blue-soft); font: inherit; font-weight: 750; }
.trade-graph-cost:hover { border-color: var(--blue); }
.graph-cost-dialog { inset: 112px 0 12px; max-height: calc(100dvh - 124px); width: min(1020px,calc(100% - 40px)); padding: 24px; }
.graph-cost-heading { display: flex; align-items: center; gap: 16px; padding-right: 44px; margin-bottom: 14px; }
.graph-cost-dialog h3 { font-size: 27px; margin: 0; word-break: keep-all; }
.graph-cost-dialog h3 span { white-space: nowrap; }
.graph-cost-dialog > .modal-yeonuk, .graph-cost-dialog > .modal-yeonuk[src^="data:image/"] { top: auto; bottom: calc(100% + 12px); right: 42px; width: 76px; height: 76px; object-fit: contain; }
.graph-cost-dialog > .graph-cost-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.graph-cost-steps { display: flex; gap: 8px; padding: 0; margin: 0 0 15px; list-style: none; font-size: 17px; color: var(--muted); }
.graph-cost-steps [role="tab"] { flex: 1; min-width: 0; min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 3px solid var(--line); border-radius: 6px 6px 0 0; background: transparent; color: inherit; font: inherit; text-align: center; word-break: keep-all; }
.graph-cost-steps [role="tab"]:hover { background: var(--blue-soft); }
.graph-cost-steps [aria-selected="true"] { border-color: var(--blue); color: var(--blue); font-weight: 750; }
.graph-cost-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: center; gap: 22px; }
.graph-cost-plot { width: 100%; display: block; color: var(--blue); font-family: inherit; }
.graph-cost-plot text { fill: var(--muted); font-size: 20px; font-family: inherit; }
.graph-cost-plot .graph-cost-axis { fill: var(--ink); font-size: 23px; font-weight: 750; }
.graph-cost-line { fill: none; stroke: currentColor; stroke-width: 4; }
.graph-cost-guide { fill: none; stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 2; }
.graph-cost-origin { fill: var(--speech-bg); stroke: currentColor; stroke-width: 3; }
.graph-cost-point { fill: currentColor; stroke: var(--speech-bg); stroke-width: 3; }
.graph-cost-point.is-moving { animation: graph-cost-move 1.25s ease-in-out both; }
.graph-cost-x-change, .graph-cost-y-change { color: var(--green); }
.graph-cost-x-change path, .graph-cost-y-change path { fill: none; stroke: currentColor; stroke-width: 3; }
.graph-cost-x-change text, .graph-cost-y-change text { fill: currentColor; font-size: 24px; font-weight: 750; paint-order: stroke; stroke: var(--speech-bg); stroke-width: 5px; }
.graph-cost-y-change { animation: graph-cost-read .7s ease-out both; }
.graph-cost-changes { display: grid; grid-template-columns: 1fr 32px 1fr; align-items: center; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.graph-cost-changes[aria-hidden="true"] { visibility: hidden; }
.graph-cost-changes > div { display: grid; justify-items: center; gap: 6px; }
.graph-change-heading { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 700; }
.graph-change-heading .good-icon { width: 24px; height: 24px; }
.graph-cost-changes strong { display: flex; align-items: center; gap: 4px; font-size: 24px; white-space: nowrap; }
.graph-cost-changes strong > span:not(.fraction) { font-size: 18px; font-weight: 600; }
.graph-change-loss strong { color: var(--red); }
.graph-change-gain strong { color: var(--green); }
.graph-change-gain .is-pending { color: var(--muted); font-size: 19px; font-weight: 500; }
.graph-change-link { color: var(--muted); font-size: 30px; text-align: center; }
.graph-cost-reading.yeonuk-speech { font-size: 21px; line-height: 1.6; overflow: visible; }
.graph-cost-copy p { margin: 0; }
.graph-cost-copy p + p { margin-top: 14px; }
.graph-cost-rule { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 19px; text-align: center; margin-top: 12px; }
.graph-cost-rule > .fraction { font-size: 1em; }
.graph-cost-conversion { text-align: center; margin-top: 16px; padding: 12px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--blue-soft); }
.graph-cost-conversion-label { font-size: 18px; }
.graph-cost-fractions { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 8px; font-size: 25px; }
.graph-cost-reduced { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; color: var(--blue); animation: graph-cost-reduce .8s ease-out both; }
.graph-cost-answer { display: grid; gap: 4px; text-align: center; margin-top: 12px; }
.graph-cost-answer > span { font-size: 19px; }
.graph-cost-answer > strong { color: var(--green); font-size: 27px; }
.graph-cost-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.graph-cost-footer .learn-action-primary { font-size: 19px; min-height: 48px; padding: 10px 15px; }
@keyframes graph-cost-move { from { transform: translate(var(--point-dx),var(--point-dy)); } to { transform: translate(0,0); } }
@keyframes graph-cost-read { from { opacity: 0; } to { opacity: 1; } }
@keyframes graph-cost-reduce { from { opacity: 0; transform: translateX(-20px) scale(.7); } to { opacity: 1; transform: translateX(0) scale(1); } }
@media(max-width:680px) {
 .graph-cost-dialog { inset: 108px 0 12px; max-height: calc(100dvh - 120px); width: calc(100% - 24px); padding: 12px 18px; }
 .graph-cost-dialog > .modal-yeonuk, .graph-cost-dialog > .modal-yeonuk[src^="data:image/"] { width: 64px; height: 64px; }
 .graph-cost-dialog h3 { font-size: 24px; }
 .graph-cost-heading { display: block; padding-right: 0; }
 .graph-cost-heading .yeonuk-name { padding-right: 44px; }
 .graph-cost-heading h3 { margin-top: 8px; }
 .graph-cost-layout { grid-template-columns: 1fr; gap: 18px; }
 .graph-cost-steps { font-size: 16px; gap: 5px; margin-bottom: 8px; }
 .graph-cost-changes strong { font-size: 22px; }
 .graph-cost-changes strong > span:not(.fraction) { font-size: 17px; }
 .graph-cost-plot text { font-size: 29px; }
 .graph-cost-plot .graph-cost-axis { font-size: 30px; }
 .graph-cost-plot .graph-cost-x-change text, .graph-cost-plot .graph-cost-y-change text { font-size: 30px; }
 .graph-cost-footer { flex-wrap: wrap; margin-top: 12px; padding-top: 10px; }
 .graph-cost-footer .learn-action-primary { flex: 1; min-width: 0; padding: 10px 8px; font-size: 18px; }
 .graph-cost-footer .enter-shortcut { display: none; }
 .graph-cost-footer .animation-replay { padding: 9px; font-size: 17px; }
}
@media(prefers-reduced-motion:reduce) {
 .graph-cost-point.is-moving, .graph-cost-y-change, .graph-cost-reduced { animation: none; }
}

@media(max-height:540px) {
 .graph-cost-dialog { inset: 12px 0; max-height: calc(100dvh - 24px); padding: 12px 16px; }
 .graph-cost-dialog > .modal-yeonuk, .graph-cost-dialog > .modal-yeonuk[src^="data:image/"] { top: 8px; bottom: auto; right: 62px; width: 40px; height: 40px; }
 .graph-cost-heading { display: flex; margin-bottom: 7px; padding-right: 110px; }
 .graph-cost-heading .yeonuk-name { font-size: 18px; }
 .graph-cost-dialog h3 { font-size: 21px; margin: 0; }
 .graph-cost-steps { margin-bottom: 8px; }
 .graph-cost-steps [role="tab"] { padding: 4px 0; }
 .graph-cost-footer { margin-top: 8px; padding-top: 8px; }
 .graph-cost-footer button { min-height: 40px; padding: 7px 10px; }
 .graph-cost-footer .enter-shortcut { display: none; }
}

@media(max-height:540px), (max-width:680px) {
 .graph-cost-dialog[data-step="3"] .graph-cost-reading { order: -1; display: flex; flex-direction: column; align-items: stretch; }
 .graph-cost-math { display: grid; grid-template-columns: 1fr; gap: 4px; }
 .graph-cost-rule { font-size: 17px; line-height: 1.4; gap: 8px; margin-top: 0; }
 .graph-cost-dialog[data-step="3"] .graph-cost-math { order: -1; margin-bottom: 16px; }
 .graph-cost-conversion, .graph-cost-answer { margin-top: 8px; }
 .graph-cost-conversion { padding: 8px; }
 .graph-cost-conversion-label { font-size: 16px; }
 .graph-cost-fractions { font-size: 21px; gap: 10px; margin-top: 4px; }
 .graph-cost-answer > span { font-size: 17px; }
 .graph-cost-answer > strong { font-size: 24px; }
}

@media(max-height:540px) and (min-width:540px) {
 .graph-cost-math { grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; }
}

/* Exam choices share the concept lesson's tables, balance, graphs and motion. */
.past-option-dialog { inset: 112px 0 12px; width: min(1000px,calc(100% - 40px)); max-height: calc(100dvh - 124px); padding: 24px; }
.past-option-dialog > .modal-yeonuk, .past-option-dialog > .modal-yeonuk[src^="data:image/"] { top: auto; bottom: calc(100% + 12px); right: 50px; width: 76px; height: 76px; object-fit: contain; }
.past-option-heading h3 { margin: 4px 0 14px; font-size: 26px; }
.past-option-dialog > .past-option-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px; }
.past-option-claim { margin: 0 0 16px; font-size: 22px; line-height: 1.5; font-weight: 650; word-break: keep-all; }
.past-option-visual { min-width: 0; }
.past-option-visual .absolute-example { border-color: var(--line); box-shadow: none; }
.past-option-visual .absolute-example-heading h3 { min-height: 0; margin: 0 0 10px; font-size: 22px; }
.past-option-visual .absolute-table th small { display: block; font-size: 16px; }
.past-option-visual .absolute-table td { height: 84px; }
.past-option-visual .absolute-table td strong { font-size: 36px; }
.past-option-visual .absolute-condition, .past-option-visual .comparative-condition-table caption { font-size: 20px; }
.past-option-visual .trade-map { max-width: 510px; margin: auto; }
.past-option-visual .trade-consumption-table { margin-top: 16px; table-layout: auto; }
.past-option-visual .trade-consumption-table th, .past-option-visual .trade-consumption-table td { padding: 12px 4px; }
.past-option-visual .trade-consumption-gain { padding: 4px; font-size: 18px; }
.past-option-dialog .yeonuk-speech { overflow: visible; font-size: 22px; line-height: 1.65; margin-top: 18px; }
.past-option-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.past-option-actions button { min-height: 48px; }
.past-option-actions .animation-replay { flex: 0 0 auto; white-space: nowrap; }
.past-option-actions .coach-confirm { width: auto; flex: 0 1 auto; min-width: 0; margin: 0; }
@media(min-width:681px) {
 .past-option-body:has(.comparison-balance) { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); align-content: start; align-items: center; gap: 16px 24px; }
 .past-option-body:has(.comparison-balance) .past-option-claim { grid-column: 1 / -1; margin-bottom: 0; }
 .past-option-body:has(.comparison-balance) .yeonuk-speech { margin: 0; }
 .past-option-visual .cost-balance { height: 190px; }
 .past-option-visual .balance-stand { height: 180px; }
 .past-option-visual .balance-cables { height: 140px; }
 .past-option-visual .balance-pan-content { top: 28px; height: 102px; }
 .past-option-visual .balance-choice { padding: 10px; gap: 8px; }
 .past-option-visual .balance-choice h4 { font-size: 16px; }
 .past-option-visual .balance-choice-amount strong { font-size: 23px; }
 .past-option-visual:has(> .trade-consumption-table) { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: center; gap: 16px; }
 .past-option-visual .trade-consumption-table td { font-size: 22px; }
}
@media(max-width:680px) {
 .past-option-dialog { width: calc(100% - 24px); padding: 18px; }
 .past-option-heading h3 { font-size: 22px; }
 .past-option-dialog > .past-option-body { display: flex; flex-direction: column; }
 .past-option-claim, .past-option-dialog .yeonuk-speech { font-size: 20px; flex-shrink: 0; }
 .past-option-dialog .yeonuk-speech { order: 1; margin: 0 0 18px; }
 .past-option-visual { order: 2; flex-shrink: 0; }
 .past-option-visual .graph-cost-layout { grid-template-columns: minmax(0,1fr); gap: 8px; }
 .past-option-visual .absolute-example { padding: 12px; }
 .past-option-visual .absolute-table td strong { font-size: 30px; }
 .past-option-visual .absolute-table td { height: 76px; }
 .past-option-visual .absolute-table th, .past-option-visual .absolute-unit { font-size: 17px; }
 .past-option-visual .absolute-table .absolute-stamp { font-size: 14px; }
 .past-option-actions { gap: 8px; }
 .past-option-actions button { padding: 10px; font-size: 17px; }
 .past-option-visual .balance-pan { width: 46%; }
 .past-option-visual .balance-beam { left: 23%; right: 23%; }
 .past-option-visual .balance-pan-content small { flex-wrap: wrap; justify-content: center; white-space: normal; }
 .past-option-visual .balance-choice-amount { flex-wrap: wrap; }
 .past-option-visual .balance-choice-amount strong { font-size: 21px; flex-wrap: wrap; justify-content: center; white-space: normal; }
 .past-option-visual .trade-consumption-table { table-layout: fixed; }
 .past-option-visual .trade-consumption-table th, .past-option-visual .trade-consumption-table td { padding: 10px 3px; white-space: normal; }
 .past-option-visual .trade-consumption-table td { font-size: 19px; }
 .past-option-visual .trade-consumption-table .actor { font-size: 16px; gap: 3px; }
 .past-option-visual .trade-consumption-table .actor-dot { display: none; }
 .past-option-visual .trade-consumption-gain { white-space: normal; font-size: 17px; }
 .past-option-visual .trade-consumption-table thead th { font-size: 16px; }
}
@media(max-height:540px) {
 .past-option-dialog { inset: 12px 0; max-height: calc(100dvh - 24px); }
 .past-option-dialog > .modal-yeonuk, .past-option-dialog > .modal-yeonuk[src^="data:image/"] { top: 8px; bottom: auto; right: 62px; width: 40px; height: 40px; }
}
@media(prefers-reduced-motion:no-preference) {
 .past-option-dialog[open] { animation: past-option-arrive .22s ease-out; }
}
@keyframes past-option-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media(max-width:600px) {
 .activity-tabs .step { justify-content: flex-start; align-items: center; gap: 6px; }
}
@media(max-width:380px) {
 .activity-tabs .step > span:first-child { display: none; }
}

.yeonuk-modal[data-intro="true"] > .modal-yeonuk { top: auto; bottom: calc(100% + 12px); right: 50px; width: 76px; height: 76px; object-fit: contain; }
@media(max-height:540px) {
 .yeonuk-modal[data-intro="true"] > .modal-yeonuk { top: 8px; bottom: auto; right: 62px; width: 40px; height: 40px; }
}

/* A안의 화면 위계를 학습·연습·기출·퀴즈에 공유한다. */
body:not(.landing-active) { -webkit-font-smoothing: antialiased; }
body:not(.landing-active) .sidebar {
  position: relative; inset: auto; display: flex; flex-direction: row; align-items: center;
  flex-wrap: nowrap; gap: 24px; width: 91%; max-width: 1528px; min-height: 88px; height: auto;
  margin: 0 auto; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
body:not(.landing-active) .sidebar .brand { margin: 0; padding: 0; gap: 10px; flex-shrink: 0; }
body:not(.landing-active) .brand-name { font-size: 20px; letter-spacing: -.8px; }
body:not(.landing-active) .brand-name::after { content: '.'; color: var(--blue); }
body:not(.landing-active) .brand-symbol { width: 31px; height: 31px; border-radius: 0; background: none; color: var(--blue); }
body:not(.landing-active) .sidebar #topic-nav { display: flex; flex-direction: row; gap: 4px; margin-left: auto; padding: 0; overflow: visible; }
body:not(.landing-active) .topic-button {
  width: auto; min-height: 44px; margin: 0; padding: 11px 14px; border-radius: 4px;
  color: var(--muted); font-size: 15px; font-weight: 650; gap: 0;
}
body:not(.landing-active) .topic-button .nav-symbol { display: none; }
body:not(.landing-active) .topic-button.active { color: var(--blue); background: var(--blue-soft); font-weight: 750; }
body:not(.landing-active) .sidebar .teacher-settings-trigger {
  position: static; width: auto; margin: 0; min-height: 44px; padding: 4px 0 4px 8px;
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 0;
  background: transparent; font-size: 14px; font-weight: 650; color: var(--ink); flex-shrink: 0;
}
body:not(.landing-active) .teacher-settings-trigger > span { font-size: inherit; }
body:not(.landing-active) .teacher-settings-trigger > svg { display: none; }
body:not(.landing-active) .teacher-settings-avatar, body:not(.landing-active) .teacher-settings-avatar img { width: 31px; height: 31px; }
body:not(.landing-active) #main { width: 91%; max-width: 1528px; margin: 0 auto; padding: 22px 0 32px; }
body:not(.landing-active) .step-nav { gap: 8px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
body:not(.landing-active) .step {
  min-height: 52px; align-items: center; justify-content: flex-start; padding: 11px 12px;
  border: 1px solid transparent; border-radius: 4px; font-size: 15px; gap: 9px;
}
body:not(.landing-active) .step.current { border-color: #c9d4ff; background: var(--blue-soft); }
body:not(.landing-active) .step > span:first-child { font-size: 13px; background: transparent; }
body:not(.landing-active) .step.current > span:first-child { background: var(--blue); color: white; }
body:not(.landing-active) .practice-board { min-height: 0; border-radius: 6px; box-shadow: none; }
body:not(.landing-active) :is(.learning-board,.summary-board,.quiz-board) { border: 0; background: transparent; overflow: visible; }
body:not(.landing-active) .coached-lesson, body:not(.landing-active) .summary-board .summary-work { padding: 0; }
body:not(.landing-active) .lesson-heading { margin-bottom: 24px; }
body:not(.landing-active) :is(.lesson-title,.summary-heading #question-title,.past-paper-view h2,.quiz-setup h2,.quiz-final h2) {
  font-size: clamp(29px,3.1vw,42px); line-height: 1.3; font-weight: 800; letter-spacing: -1.3px;
}
body:not(.landing-active) .lesson-title { margin-bottom: 0; }
body:not(.landing-active) .summary-heading { margin-bottom: 22px; }
body:not(.landing-active) .absolute-toolbar { margin-bottom: 20px; }
body:not(.landing-active) :is(.absolute-example,.learn-country,.source-panel,.practice-situation,.bundle-stock-table,.curve-condition-panel,.production-study-aside,.past-answer-panel,.past-paper-original) { border-radius: 6px; }
body:not(.landing-active) .absolute-example { padding: 20px; background: white; border-color: var(--line); }
body:not(.landing-active) .absolute-example.is-current { border-color: var(--blue); }
body:not(.landing-active) .absolute-example:nth-child(2) .absolute-table thead th { background: var(--control-bg); }
body:not(.landing-active) .absolute-example-heading h3 { font-size: 23px; }
body:not(.landing-active) .summary-board .source-panel { padding: 20px; margin-bottom: 20px; background: white; }
body:not(.landing-active) .summary-table { background: white; border: 1px solid var(--line); border-radius: 6px; }
body:not(.landing-active) .summary-table thead { background: var(--blue-soft); }
body:not(.landing-active) .practice-question-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 20px; overflow: visible; }
body:not(.landing-active) .practice-question-nav button { flex-basis: 130px; min-height: 60px; border-radius: 4px; background: white; }
body:not(.landing-active) .practice-question-nav button[aria-current=step] { background: var(--blue-soft); box-shadow: inset 0 -3px var(--blue); }
body:not(.landing-active) .summary-navigation { margin-top: 18px; }
body:not(.landing-active) .past-paper-view { padding: 20px; }
body:not(.landing-active) .past-paper-heading { margin-bottom: 14px; }
body:not(.landing-active) .past-answer-panel { border-color: var(--line); background: var(--control-bg); }
@media(min-width:681px) {
  .past-paper-workspace { grid-template-columns: minmax(0,auto) 220px; justify-content: center; gap: 20px; }
  .past-question-image { width: auto; max-width: 100%; max-height: max(388px,calc(100dvh - 382px)); margin-inline: auto; }
  .past-answer-panel { padding: 16px; }
  .past-answer-choices { grid-template-columns: 1fr; margin-bottom: 0; }
  .past-answer-choices button { height: auto; min-height: 64px; font-size: 32px; }
}
@media(min-width:1101px) {
  .past-paper-view:has(.past-paper-workspace) { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px 20px; }
  body:not(.landing-active) .past-paper-view:has(.past-paper-workspace) .past-paper-heading { display: block; margin: 0; }
  .past-paper-view:has(.past-paper-workspace) .past-paper-heading p { margin-top: 6px; }
  .past-paper-view:has(.past-paper-workspace) > .past-view-switch { align-self: center; margin: 0; }
  .past-paper-workspace { grid-column: 1 / -1; }
}
body:not(.landing-active) .past-lesson-heading h3 { font-size: 28px; letter-spacing: -.7px; }
body:not(.landing-active) .past-lesson-steps button { border-radius: 4px; }
body:not(.landing-active) .quiz-setup, body:not(.landing-active) .quiz-work { padding: 26px; border-radius: 6px; box-shadow: none; }
body:not(.landing-active) .quiz-question { font-size: clamp(25px,2.5vw,34px); letter-spacing: -.8px; }
body:not(.landing-active) .quiz-options button { border-radius: 6px; }
body:not(.landing-active) :is(.quiz-scoreboard button,.quiz-skill-nav button,.quiz-team-count button,.quiz-team-fields input) { border-radius: 4px; }
body:not(.landing-active) :is(.learn-action-primary,.text-button,.animation-replay,.practice-material-new,.coach-help-button,.button-group,.button-group button,.comparison-modal-actions button,.past-answer-choices button) { border-radius: 4px; }
body:not(.landing-active) .learn-action-primary { box-shadow: none; }
body:not(.landing-active) .coach-help-button { background: white; box-shadow: none; border-color: var(--line); }
dialog:is(.yeonuk-modal,.comparison-dialog,.teacher-settings-dialog,.quiz-result-dialog,.quiz-explanation,.trade-table-intro,.trade-exchange-dialog,.past-image-dialog) {
  border-width: 1px; border-color: var(--accent-line); border-radius: 10px; background: white; box-shadow: 0 18px 55px #17213026;
}
.teacher-settings-heading h2 { font-weight: 800; letter-spacing: -1px; }
:is(.teacher-character,.teacher-settings-dialog input,.teacher-settings-dialog textarea,.teacher-intro-preview,.teacher-profile-fields) { border-radius: 6px; }
body:not(.landing-active) :is(.yeonuk-quiz-bubble,.curve-coach-bubble,.trade-coach-bubble,.past-result,.quiz-feedback,.solution-result,.bundle-gain-pair > div,.teacher-preview,.teacher-preview-bubble) { border-radius: 6px; }
body:not(.landing-active) :is(.curve-assistant,.trade-narrator) { filter: none; }
@media(min-width:681px) and (max-height:900px) {
  body:not(.landing-active) #main { padding-top: 18px; padding-bottom: 12px; }
  body:not(.landing-active) .step-nav { padding-bottom: 12px; margin-bottom: 18px; }
  body:not(.landing-active) .lesson-heading { margin-bottom: 18px; }
  body:not(.landing-active) .production-lesson .lesson-tools { margin-bottom: 4px; }
  body:not(.landing-active) .production-lesson .allocation-worker-floor { height: 64px; }
  body:not(.landing-active) .coached-lesson .learn-footer { margin-top: 12px; padding-top: 10px; }
  body:not(.landing-active) .coached-lesson .curve-graphic { max-width: 350px; }
  body:not(.landing-active) .curve-assistant { margin-top: 14px; }
  body:not(.landing-active) .curve-coach-bubble { padding: 12px; }
}
@media(max-width:1100px) {
  body:not(.landing-active) .sidebar { gap: 16px; min-height: 80px; }
  body:not(.landing-active) .brand-name { font-size: 18px; }
  body:not(.landing-active) .topic-button { padding: 10px 11px; font-size: 14px; }
  body:not(.landing-active) .step { font-size: 14px; padding: 10px; gap: 7px; }
  body:not(.landing-active) .absolute-example { padding: 16px; }
}
@media(max-width:850px) {
  body:not(.landing-active) .sidebar { gap: 10px; min-height: 76px; }
  body:not(.landing-active) .brand-symbol { width: 27px; height: 27px; }
  body:not(.landing-active) .brand-name { font-size: 17px; }
  body:not(.landing-active) .topic-button { padding: 9px 8px; font-size: 13px; }
  body:not(.landing-active) .sidebar .teacher-settings-trigger { font-size: 12px; gap: 4px; }
  body:not(.landing-active) .teacher-settings-avatar, body:not(.landing-active) .teacher-settings-avatar img { width: 27px; height: 27px; }
  body:not(.landing-active) .step { font-size: 12px; padding: 9px 7px; gap: 5px; }
  body:not(.landing-active) .step-nav { gap: 5px; }
}
@media(max-width:680px) {
  body:not(.landing-active) .sidebar { width: 88%; flex-wrap: wrap; padding: 14px 0 12px; gap: 12px; }
  body:not(.landing-active) .sidebar .brand { order: 1; }
  body:not(.landing-active) .sidebar .teacher-settings-trigger { order: 2; margin-left: auto; }
  body:not(.landing-active) .sidebar #topic-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); order: 3; width: 100%; flex-basis: 100%; gap: 4px; margin: 0; }
  body:not(.landing-active) .topic-button { justify-content: center; min-height: 44px; white-space: normal; text-align: center; word-break: keep-all; padding: 8px 3px; font-size: 13px; }
  body:not(.landing-active) #main { width: 88%; padding-top: 18px; padding-bottom: 26px; }
  body:not(.landing-active) .step-nav { margin-bottom: 20px; padding-bottom: 14px; }
  body:not(.landing-active) .step { min-height: 44px; padding: 8px 5px; font-size: 12px; }
  body:not(.landing-active) .step > span:first-child { width: 20px; height: 20px; font-size: 12px; }
  body:not(.landing-active) .lesson-heading { margin-bottom: 20px; }
  body:not(.landing-active) :is(.lesson-title,.summary-heading #question-title,.past-paper-view h2,.quiz-setup h2,.quiz-final h2) { font-size: 28px; letter-spacing: -1px; }
  body:not(.landing-active) .absolute-example { padding: 12px; }
  body:not(.landing-active) .absolute-example-heading h3 { font-size: 21px; }
  body:not(.landing-active) .summary-board .source-panel { padding: 14px; }
  body:not(.landing-active) .past-paper-view { padding: 20px 14px; }
  body:not(.landing-active) .past-lesson-heading h3 { font-size: 24px; }
  body:not(.landing-active) .quiz-setup, body:not(.landing-active) .quiz-work { padding: 20px 14px; }
  body:not(.landing-active) .quiz-question { font-size: 25px; }
  body:not(.landing-active) .practice-question-nav button { flex-basis: 108px; }
}
@media(max-width:360px) {
  body:not(.landing-active) .brand-name { font-size: 16px; }
  body:not(.landing-active) .step { padding-left: 4px; padding-right: 4px; gap: 4px; }
  body:not(.landing-active) .lesson-title { font-size: 26px; }
}

/* Keep feedback in the reading flow, including restored answers. */
:is(.feedback-copy.is-correct, .cost-feedback.is-correct, .comparison-correct,
    .comparative-pick-feedback.is-correct, .curve-point-feedback.is-correct) {
  padding: 14px 18px;
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 20px;
  font-weight: 550;
  line-height: 1.65;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  :is(.feedback-copy.is-correct, .cost-feedback.is-correct, .comparison-correct,
      .comparative-pick-feedback.is-correct, .curve-point-feedback.is-correct) {
    padding: 12px 14px;
    font-size: 18px;
  }
}

/* Celebrate a new correct answer without adding a second check badge. */
.answer-celebrate { position: relative; }
.answer-celebrate::before, .answer-celebrate::after {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  content: '';
  width: 20px;
  height: 20px;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.answer-celebrate::before { background: var(--blue); right: 24px; top: 4px; }
.answer-celebrate::after { background: #c38713; right: 50px; top: 18px; width: 12px; height: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .answer-celebrate { animation: answer-celebrate .65s cubic-bezier(.2,.8,.25,1); }
  .answer-celebrate::before { animation: answer-sparkle .85s ease-out; }
  .answer-celebrate::after { animation: answer-sparkle .75s .1s ease-out; }
}
@keyframes answer-celebrate {
  0% { transform: translateY(5px) scale(.98); background: #d6e2ff; }
  38% { transform: translateY(-2px) scale(1.012); box-shadow: 0 0 0 5px #244de81a; }
  70% { transform: translateY(1px) scale(.998); }
  100% { transform: none; box-shadow: 0 0 0 0 #244de800; }
}
@keyframes answer-sparkle {
  0% { opacity: 0; transform: translateY(8px) scale(.3) rotate(-20deg); }
  25% { opacity: 1; transform: translateY(-5px) scale(1.15) rotate(8deg); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-22px) scale(.6) rotate(25deg); }
}
