:root {
  color-scheme: light;
  --paper: #f6f3e9; --surface: #fffef9; --ink: #273c34; --muted: #657168;
  --green: #285c48; --green-soft: #e9f1e6; --gold: #edb655; --gold-soft: #fbf0d5;
  --gold-ink: #805c22; --rust: #ad5338; --line: #dedfd2;
  --body-font: "Yuanti SC", "Hiragino Maru Gothic ProN", "Microsoft YaHei", "PingFang SC", sans-serif;
  --number-font: "Avenir Next Rounded", "Trebuchet MS", "Yuanti SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 16px/1.65 var(--body-font); background: radial-gradient(ellipse at 92% 6%, #e7eacb99, transparent 34%), radial-gradient(ellipse at 0% 60%, #f5deba55, transparent 32%), radial-gradient(#9eaa9826 .8px, transparent .8px), var(--paper); background-size: auto, auto, 18px 18px, auto; }
button, input { font: inherit; }
button, summary { cursor: pointer; touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; transition: background .16s ease, border-color .16s ease; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, summary:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 10px 16px; color: white; background: var(--green); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.page { max-width: 1280px; margin: auto; padding: 28px 36px; }
.topbar { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { flex-shrink: 0; width: 42px; height: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 9px; background: var(--green); border-radius: 13px; transform: rotate(-5deg); }
.brand-mark i { background: #f2edcb; border-radius: 3px; }
.brand-mark i:last-child { background: var(--gold); }
.brand-title { display: block; font-size: 18px; font-weight: 700; letter-spacing: .06em; }
.brand-subtitle { display: block; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
h1 { margin: 0 0 3px; font-size: 27px; line-height: 1.4; letter-spacing: -.025em; }
h1 em { color: var(--green); font-style: normal; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.intro p { margin: 0; color: var(--muted); font-size: 13px; }
.course-switcher { z-index: 8; position: relative; justify-self: end; }
.operation-picker { display: flex; align-items: center; gap: 9px; margin: 24px 0 20px; }
.picker-label { padding-right: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.operation-button { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 15px; min-height: 54px; border: 1px solid var(--line); border-radius: 12px; background: #fffef9a8; color: var(--ink); text-align: left; font-size: 14px; font-weight: 700; }
.operation-button b { font: 700 27px/1 var(--number-font); color: var(--green); }
.operation-button small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.operation-button:hover { background: var(--green-soft); border-color: #a6baa5; }
.operation-button[aria-pressed="true"] { color: var(--surface); background: var(--green); border-color: var(--green); box-shadow: 0 3px 0 #183f2e; }
.operation-button[aria-pressed="true"] b, .operation-button[aria-pressed="true"] small { color: var(--surface); }
.practice-area { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 18px; align-items: stretch; }
.workshop { display: flex; flex-direction: column; min-width: 0; padding: 22px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 5px 0 #e5e4d9, 0 14px 34px #34472a08; }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.board-label { font-size: 13px; font-weight: 700; color: var(--green); }
.question-count { color: var(--muted); font: 700 13px var(--number-font); }
.challenge { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 225px; padding: 20px 16px; margin-top: 10px; border-radius: 17px; background: radial-gradient(ellipse at 50% 100%, #e9efd980, transparent 70%), repeating-linear-gradient(0deg, transparent 0 30px, #dde1d82e 30px 31px); text-align: center; }
.challenge-tag { display: inline-flex; padding: 3px 12px; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 12px; }
.equation { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 2.5vw, 30px); margin: 12px 0; font: 700 clamp(44px, 5.8vw, 76px)/1.2 var(--number-font); font-variant-numeric: tabular-nums; }
.number-a { color: var(--green); }
.number-b { color: var(--gold-ink); }
.equation-symbol { color: #8a9386; font-size: .6em; font-weight: 400; }
.question-mark { min-width: 58px; color: #82907a; border-bottom: 3px solid var(--line); }
.question-prompt { max-width: 570px; margin: 2px 0 12px; font-size: 16px; line-height: 1.7; }
.thinking-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; }
.little-block { display: inline-block; flex-shrink: 0; width: 15px; height: 15px; border-radius: 4px; background: var(--gold); box-shadow: inset 0 -3px #d69b36; transform: rotate(-7deg); }
.answer-form { margin-top: 20px; }
.answer-fields { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.answer-field { min-width: 0; flex: 0 1 150px; font-size: 13px; color: var(--green); font-weight: 700; }
.answer-field > span { display: block; margin-bottom: 5px; }
.answer-field input { display: block; width: 100%; height: 53px; padding: 7px 12px; border: 2px solid #b7c8b0; border-radius: 11px; background: #fbfcf7; color: var(--ink); font: 700 26px/1.3 var(--number-font); text-align: center; }
.answer-field input::placeholder { font: 13px var(--body-font); color: var(--muted); }
.answer-field input[aria-invalid="true"] { border-color: var(--rust); background: #fcf1e9; }
.answer-help { margin: 7px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; }
.button:hover:not(:disabled) { background: var(--green-soft); }
.button.primary { background: var(--green); color: var(--surface); border-color: var(--green); box-shadow: 0 3px 0 #183f2e; }
.button.primary:hover:not(:disabled) { background: #214c3b; }
.check-button { min-height: 53px; }
.feedback-area { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; min-height: 68px; margin: 12px 0; padding: 8px 12px; border-radius: 12px; background: #f3f4e9; }
.feedback { margin: 0; color: var(--muted); font-size: 14px; }
.feedback-area[data-status="correct"] { background: var(--green-soft); }
.feedback-area[data-status="correct"] .feedback { color: var(--green); font-weight: 700; }
.feedback-area[data-status="incorrect"], .feedback-area[data-status="invalid"] { background: #fcf1e9; }
.feedback-area[data-status="incorrect"] .feedback, .feedback-area[data-status="invalid"] .feedback { color: #97472e; }
.help-button { color: var(--green); padding: 8px 12px; min-height: 44px; }
.board-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.board-bottom > span { color: var(--muted); font-size: 12px; }
.companion { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.coach { flex: 1; position: relative; min-height: 0; padding: 18px 20px; border: 1px solid #e9dcb7; border-radius: 22px; background: var(--gold-soft); }
.coach-heading { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid #e7d9b4; }
.coach-icon { font-size: 28px; color: var(--gold-ink); }
.coach-heading h2 { margin: 0; font-size: 15px; }
.coach-heading small { display: block; font-size: 11px; font-weight: 400; color: #796c4c; }
.coach-section { margin-top: 15px; }
.coach-label { color: var(--gold-ink); font-size: 12px; font-weight: 700; }
.coach-question { margin: 5px 0 0; font-size: 19px; line-height: 1.45; font-weight: 700; }
.coach-copy { margin: 5px 0 0; color: #655d49; font-size: 13px; line-height: 1.7; }
.expected { border-top: 1px dashed #d9cba7; margin-top: 14px; padding-top: 6px; }
.expected summary { min-height: 40px; display: flex; align-items: center; gap: 8px; list-style: none; font-size: 12px; color: var(--gold-ink); }
.expected summary::before { content: "+"; font: 20px var(--number-font); }
.expected[open] summary::before { content: "−"; }
.expected p { margin: 4px 0; font-size: 13px; color: #655d49; line-height: 1.8; }
.progress-note { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 17px; border: 1px solid var(--line); border-radius: 14px; background: #fffef970; font-size: 12px; color: var(--muted); }
.progress-note strong { color: var(--green); font: 700 19px var(--number-font); padding: 0 3px; }
.progress-note small { color: var(--muted); font-size: 11px; }
.bottom-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 22px; font-size: 11px; color: var(--muted); }
.bottom-note > span:first-child { color: var(--green); }
.bottom-note b { color: #a3ad9a; padding: 0 7px; }
.explanation-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0 12px; }
.explanation-heading > div { min-width: 0; }
.explanation-heading h2 { margin: 0; font-size: 18px; line-height: 1.5; }
.explanation-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.explanation-heading .button { flex-shrink: 0; }
.lesson-frame-space { min-width: 0; position: relative; }
.lesson-frame { width: 100%; min-height: 400px; display: block; border: 0; }
.loading-note { padding: 60px 24px; text-align: center; color: var(--green); background: var(--green-soft); border: 1px solid var(--line); border-radius: 20px; }
.noscript-note { margin: 30px; }
@keyframes question-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.challenge.new-question { animation: question-in .28s ease-out; }

@media (min-width: 960px) and (min-height: 620px) {
  .page { height: calc(100dvh - 1px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 12px; padding: 18px 28px; }
  .topbar { grid-row: 1; }
  .operation-picker { grid-row: 2; margin: 0; }
  .practice-area { grid-row: 3; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .workshop { min-height: 0; padding: 16px 24px; }
  .challenge { min-height: 175px; padding: 12px; }
  .bottom-note { grid-row: 4; margin: 0; }
  .expected { position: relative; }
  .expected[open] p { position: absolute; bottom: calc(100% + 5px); left: -8px; right: -8px; z-index: 4; margin: 0; padding: 14px; border: 1px solid #d9cba7; border-radius: 12px; background: var(--gold-soft); box-shadow: 0 8px 28px #273c3425; }
  .page.is-explaining { grid-template-rows: auto minmax(0, 1fr) auto; }
  .page.is-explaining .operation-picker { display: none; }
  .page.is-explaining .bottom-note { grid-row: 3; }
  .explanation-area { grid-row: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; min-height: 0; }
  .explanation-heading { margin: 0; }
  .explanation-heading p { display: none; }
  .lesson-frame-space { min-height: 0; }
  .lesson-frame { height: 100%; min-height: 0; }
}
@media (min-width: 960px) and (min-height: 620px) and (max-height: 740px) {
  .page { padding: 12px 24px; gap: 9px; }
  .topbar { grid-template-columns: 210px minmax(0, 1fr) auto; gap: 16px; }
  h1 { font-size: 24px; }
  .operation-button { padding: 6px 13px; min-height: 49px; }
  .workshop { padding: 10px 20px; }
  .challenge { min-height: 165px; margin-top: 6px; padding: 8px 12px; }
  .equation { font-size: 58px; margin: 8px 0; }
  .question-prompt { font-size: 15px; margin-bottom: 7px; }
  .answer-form { margin-top: 10px; }
  .answer-field > span { margin-bottom: 3px; line-height: 1.5; }
  .answer-field input, .check-button { height: 46px; min-height: 46px; }
  .answer-help { margin-top: 5px; line-height: 1.5; }
  .feedback-area { min-height: 57px; margin: 9px 0; }
  .board-bottom { padding-top: 9px; }
  .coach { padding: 13px 16px; }
  .coach-heading { padding-bottom: 8px; }
  .coach-section { margin-top: 10px; }
  .coach-question { font-size: 18px; }
  .coach-copy { line-height: 1.6; }
  .expected { margin-top: 10px; }
  .progress-note { padding: 8px 16px; }
  .companion { gap: 9px; }
}
@media (min-width: 960px) and (max-width: 1090px) {
  .picker-label { display: none; }
  .operation-button { gap: 9px; padding-left: 12px; padding-right: 10px; }
  .topbar { grid-template-columns: 195px minmax(0, 1fr) auto; gap: 14px; }
  .brand-subtitle { display: none; }
  h1 { font-size: 24px; }
  .practice-area { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
  .workshop { padding-left: 18px; padding-right: 18px; }
  .answer-fields { gap: 10px; }
  .answer-field { flex-basis: 125px; }
  .check-button { padding-left: 12px; padding-right: 12px; font-size: 13px; }
  .feedback-area { justify-content: flex-start; }
  .feedback { font-size: 13px; }
}
@media (min-width: 960px) and (min-height: 620px) and (max-height: 660px) {
  .page { grid-template-rows: auto auto minmax(0, 1fr); }
  .page.is-explaining { grid-template-rows: auto minmax(0, 1fr); }
  .bottom-note { display: none; }
}
@media (max-width: 959px), (max-height: 619px) {
  .page { padding: 22px 24px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 22px; }
  .intro { grid-row: 2; grid-column: 1 / -1; }
  .course-switcher { grid-column: 2; grid-row: 1; }
  .operation-picker { flex-wrap: wrap; }
  .picker-label { flex-basis: 100%; }
  .operation-button { flex: 1 1 110px; }
  .practice-area { grid-template-columns: minmax(0, 1fr); }
  .coach { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .coach-heading, .coach-section:first-of-type, .expected { grid-column: 1 / -1; }
  .progress-note { grid-template-columns: 1fr 1fr; }
  .progress-note small { grid-column: 1 / -1; }
  .lesson-frame { height: 850px; }
}
@media (max-width: 600px) {
  .page { padding: 20px 16px 26px; }
  .brand-title { font-size: 16px; }
  .brand-subtitle { font-size: 10px; }
  .brand-mark { width: 34px; height: 34px; padding: 7px; gap: 3px; }
  .brand { gap: 8px; }
  .topbar { gap: 22px 10px; }
  h1 { font-size: 25px; }
  .intro p { margin-top: 8px; font-size: 13px; }
  .operation-picker { gap: 8px; margin: 20px 0; }
  .operation-button { flex-basis: calc((100% - 16px) / 3); padding: 8px 9px; gap: 6px; }
  .operation-button b { font-size: 23px; }
  .operation-button small { font-size: 10px; }
  .operation-button.mixed { flex-grow: 1; }
  .workshop { padding: 17px 16px; border-radius: 20px; }
  .challenge { min-height: 210px; padding: 12px 5px; }
  .equation { gap: 13px; font-size: 50px; }
  .question-mark { min-width: 42px; }
  .question-prompt { font-size: 15px; }
  .thinking-note { font-size: 11px; }
  .answer-fields { flex-wrap: wrap; gap: 10px; }
  .answer-field { flex: 1 1 110px; }
  .check-button { width: 100%; margin-top: 3px; }
  .answer-help { text-align: left; font-size: 11px; }
  .feedback-area { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 12px; }
  .feedback { font-size: 13px; }
  .board-bottom > span { max-width: 150px; }
  .board-bottom .button { flex-shrink: 0; padding: 8px 12px; }
  .coach { display: block; padding: 18px; }
  .explanation-heading { align-items: flex-start; }
  .explanation-heading h2 { font-size: 17px; }
  .explanation-heading .button { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 370px) {
  .page { padding: 17px 12px 24px; }
  .brand-subtitle { display: none; }
  .brand-title { font-size: 15px; }
  .brand-mark { width: 31px; height: 31px; }
  .equation { font-size: 44px; gap: 10px; }
  .operation-button { font-size: 13px; }
  .operation-button small { display: none; }
  .workshop { padding-left: 12px; padding-right: 12px; }
  .challenge-tag { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.course-trigger { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 12px; color: var(--green); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 0 #e5e4d9; font-size: 14px; font-weight: 700; white-space: nowrap; }
.course-trigger:hover, .course-trigger[aria-expanded="true"] { background: var(--green-soft); border-color: #a6baa5; }
.course-trigger svg { width: 17px; height: 17px; flex-shrink: 0; }
.course-trigger .course-chevron { width: 12px; height: 12px; transition: transform .18s ease; }
.course-trigger[aria-expanded="true"] .course-chevron { transform: rotate(180deg); }
.course-dialog { --course-columns: 3; --course-mobile-columns: 2; --dialog-edge: #d8dfd0; --dialog-card: #faf9f1; position: fixed; inset: 0; width: min(calc(100vw - 48px), calc(var(--course-columns) * 320px + 64px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 26px; border: 1px solid var(--dialog-edge); border-radius: 28px; color: var(--ink); background: radial-gradient(ellipse at 100% 0%, #e9efda80, transparent 45%), var(--surface); box-shadow: 0 6px 0 #cdd1bf, 0 28px 100px #172f3340; font-family: var(--body-font); line-height: 1.5; overflow: auto; overscroll-behavior: contain; }
.course-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 20px; animation: course-dialog-in .22s ease-out; }
.course-dialog::backdrop { background: #253c3359; backdrop-filter: blur(5px); animation: course-backdrop-in .2s ease-out; }
.course-dialog-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.course-dialog-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 56px; height: 56px; padding: 12px; border-radius: 17px; background: var(--green); box-shadow: inset 0 -4px #1d4736; transform: rotate(-5deg); }
.course-dialog-mark i { background: #f4efcf; border-radius: 3px; }
.course-dialog-mark i:last-child { background: var(--gold); }
.course-dialog-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.course-dialog-count { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.course-dialog-heading h2 { margin: 5px 0 7px; font-size: 30px; line-height: 1.35; letter-spacing: -.03em; }
.course-dialog-heading h2 span { color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.course-dialog-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.course-close { display: grid; place-items: center; align-self: start; width: 44px; height: 44px; padding: 0; color: var(--green); border: 1px solid var(--dialog-edge); border-radius: 50%; background: #f1f3e9; }
.course-close:hover { background: #e1e9d8; border-color: #b7c5ae; }
.course-close svg { width: 18px; height: 18px; }
.course-dialog-body { min-width: 0; min-height: 0; margin: -5px; padding: 5px; overflow: auto; overscroll-behavior: contain; scroll-padding: 6px; }
.course-list { display: grid; grid-template-columns: repeat(var(--course-columns), minmax(0, 1fr)); align-items: stretch; gap: 14px; padding: 0; margin: 0; list-style: none; }
.course-list > li { min-width: 0; display: flex; }
.course-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; width: 100%; min-height: 210px; padding: 20px 18px; border: 1px solid var(--dialog-edge); border-radius: 19px; color: var(--ink); background: linear-gradient(145deg, #fffef9, var(--dialog-card)); box-shadow: 0 3px 0 #e8e7db; text-align: left; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.course-option:hover { transform: translateY(-3px); border-color: #9db69a; background: var(--green-soft); box-shadow: 0 5px 0 #dce5d3, 0 8px 20px #285c480d; }
.course-option[aria-current="page"] { border-color: #769978; background: linear-gradient(145deg, #f0f6eb, #e3eddc); box-shadow: 0 3px 0 #d2dfc8, inset 0 0 0 1px #b1c5a4; }
.course-symbol { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; color: var(--surface); background: var(--green); box-shadow: inset 0 -4px #163d2f, 0 3px 8px #273c3409; font: 700 32px/1 var(--number-font); }
.course-symbol.subtract { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 -4px #d69b36; }
.course-symbol.multiply { background: #ecd8c7; color: #874c35; box-shadow: inset 0 -4px #d0b39a; }
.course-symbol.divide { background: #c4d9cb; color: var(--green); box-shadow: inset 0 -4px #9cbaa7; }
.course-symbol.practice-symbol { background: #f4e5c3; color: var(--gold-ink); box-shadow: inset 0 -4px #e7d1a1; }
.course-copy { display: block; flex: 1; min-width: 0; width: 100%; }
.course-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.course-topline strong { font-size: 20px; line-height: 1.4; }
.course-current { position: absolute; top: 23px; right: 16px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; color: var(--green); background: #d6e6cf; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.course-current::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.course-description { display: block; min-height: 40px; margin: 7px 0 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.course-topics { display: flex; flex-wrap: wrap; gap: 5px; }
.course-topics span { padding: 3px 7px; border: 1px solid #e2e7d9; border-radius: 6px; color: var(--green); background: #fffef9b3; font-size: 11px; line-height: 1.5; }
.course-arrow { position: absolute; top: 29px; right: 19px; display: grid; place-items: center; width: 18px; height: 18px; color: #6b876a; font-size: 21px; transition: transform .18s ease; }
.course-option:hover .course-arrow { transform: translateX(3px); }
.course-dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--dialog-edge); color: var(--muted); font-size: 12px; }
.course-dialog-footer > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--green); }
.course-footer-blocks { display: inline-flex; align-items: flex-end; gap: 3px; }
.course-footer-blocks i { display: block; width: 8px; height: 10px; border-radius: 2px; background: #8fae86; }
.course-footer-blocks i:nth-child(2) { height: 14px; background: var(--gold); }
.course-footer-blocks i:last-child { height: 18px; background: var(--green); }
.course-dialog-footer kbd { padding: 2px 6px; margin-right: 4px; border: 1px solid var(--dialog-edge); border-radius: 5px; background: #f5f4eb; font: 11px var(--number-font); }
.course-trigger:focus-visible, .course-dialog :is(button, a):focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
@keyframes course-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes course-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 960px) and (max-height: 780px) {
  .course-dialog { padding: 18px 22px; }
  .course-dialog[open] { gap: 14px; }
  .course-dialog-mark { width: 46px; height: 46px; padding: 10px; gap: 4px; border-radius: 14px; }
  .course-dialog-heading h2 { margin: 3px 0 5px; font-size: 26px; }
  .course-dialog-heading p { font-size: 13px; }
  .course-list { gap: 12px; }
  .course-option { min-height: 176px; padding: 12px; gap: 8px; border-radius: 16px; }
  .course-symbol { width: 38px; height: 38px; font-size: 28px; border-radius: 10px; }
  .course-topline strong { font-size: 19px; }
  .course-current { top: 17px; right: 12px; }
  .course-arrow { top: 24px; right: 15px; }
  .course-description { min-height: 32px; margin: 5px 0 7px; font-size: 12px; }
  .course-topics { gap: 4px; }
  .course-topics span { padding: 2px 5px; }
  .course-dialog-footer { padding-top: 10px; }
}
@media (max-width: 959px) {
  .course-dialog { width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 22px; border-radius: 23px; }
  .course-dialog[open] { gap: 18px; }
  .course-dialog-header { gap: 12px; }
  .course-dialog-mark { width: 46px; height: 46px; padding: 10px; gap: 4px; }
  .course-dialog-heading h2 { font-size: 25px; }
  .course-list { grid-template-columns: repeat(var(--course-mobile-columns), minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .course-trigger { gap: 5px; padding: 8px 10px; font-size: 13px; }
  .course-trigger > svg:first-child { display: none; }
  .course-dialog { padding: 18px 16px; }
  .course-dialog-header { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
  .course-dialog-mark { display: none; }
  .course-dialog-kicker { gap: 8px; font-size: 11px; }
  .course-dialog-heading h2 { font-size: 23px; }
  .course-dialog-heading p { font-size: 12px; }
  .course-list { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .course-option { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; min-height: 0; padding: 16px 14px; gap: 12px; border-radius: 15px; }
  .course-symbol { width: 38px; height: 38px; border-radius: 10px; font-size: 28px; }
  .course-copy { padding-right: 0; }
  .course-topline strong { font-size: 18px; }
  .course-current { position: static; padding: 2px 6px; font-size: 10px; }
  .course-description { min-height: 0; margin: 5px 0 8px; font-size: 12px; }
  .course-topics { gap: 4px; }
  .course-topics span { padding: 2px 5px; font-size: 10px; }
  .course-arrow { display: none; }
  .course-dialog-footer { padding-top: 11px; font-size: 11px; }
  .course-escape-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .course-dialog, .course-dialog::backdrop, .course-option, .course-arrow, .course-chevron { animation: none !important; transition: none !important; }
  .course-option:hover { transform: none; }
}
@media print { .course-dialog { display: none !important; } }
