:root {
  color-scheme: light;
  --paper: #fafaf5;
  --white: #fffefa;
  --ink: #263d32;
  --green: #315b48;
  --green-dark: #244735;
  --muted: #66756b;
  --line: #dbe2d6;
  --sage: #eaf0e4;
  --cream: #f3f0e5;
  --error: #9b3b2d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif; font-size: 15px; line-height: 1.7; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button, input, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, audio:focus-visible, [tabindex]:focus-visible { outline: 3px solid #a86f36; outline-offset: 4px; }
input:focus-visible { outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif; }
button { border: 0; }
.page-width { width: min(1168px, calc(100% - 80px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 30; padding: 10px 18px; color: white; background: var(--green); transform: translateY(-160%); border-radius: 4px; }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 92px; padding: 20px max(40px, calc((100vw - 1168px) / 2)); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fffefa; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.official-logo { display: block; width: 184px; height: auto; max-height: 51px; object-fit: contain; }
.header-label { font-size: 12px; letter-spacing: .09em; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; }
.header-account { display: flex; align-items: center; gap: 23px; min-width: 0; }
.account-email { font-size: 12px; color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-button { background: none; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #94a48c; white-space: nowrap; }
.text-button span { margin-left: 10px; }
main { min-height: calc(100vh - 178px); }
.session-notice { min-height: 65vh; display: grid; place-items: center; padding: 30px; color: var(--muted); font-size: 14px; }
.welcome { min-height: 650px; display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: 100px; padding-block: 58px 70px; }
.welcome-copy { position: relative; padding-block: 12px; }
.eyebrow { color: #657b5f; font-size: 11px; font-weight: 600; letter-spacing: .13em; }
.eyebrow > span { display: inline-block; width: 6px; height: 6px; margin-right: 9px; margin-bottom: 2px; border-radius: 50%; background: #7b9770; }
.welcome h1 { font-size: clamp(30px, 3.2vw, 43px); font-weight: 500; line-height: 1.5; letter-spacing: .025em; margin: 17px 0 18px; }
.welcome h1 > span { position: relative; z-index: 0; }
.welcome h1 > span::after { content: ""; position: absolute; bottom: 6px; left: -2px; width: calc(100% + 4px); height: 13px; z-index: -1; background: #dfe8d4; border-radius: 50%; }
.welcome-subtitle { color: #536d4c; font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.welcome-description { font-size: 13px; color: var(--muted); line-height: 2; }
.access-notice { font-size: 11px; line-height: 1.9; color: #7a8472; margin-top: 16px; }
.login-card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid #68845c; border-radius: 4px; padding: 38px 40px 30px; box-shadow: 0 10px 36px #2b453508; }
.card-kicker { color: #7b8c6d; font-size: 11px; letter-spacing: .12em; }
.login-card h2 { font-size: 27px; font-weight: 600; margin: 9px 0 10px; letter-spacing: .025em; }
.login-description { font-size: 13px; color: var(--muted); }
form { margin-top: 26px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
input { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cbd6c6; border-radius: 4px; }
input::placeholder { color: #899183; font-size: 13px; }
input + label { margin-top: 19px; }
fieldset:disabled input { color: var(--muted); background: #f3f5ef; }
.primary-button { width: 100%; min-height: 49px; display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 27px; padding: 11px 18px; border-radius: 4px; background: var(--green); color: white; font-size: 14px; text-align: left; transition: background .15s; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled, fieldset:disabled .primary-button { background: #82957d; }
.form-error { color: var(--error); background: #faf0eb; border-left: 3px solid #bd7a5c; padding: 10px 12px; margin-top: 17px; font-size: 13px; }
.login-help { font-size: 11px; color: var(--muted); line-height: 1.85; margin-top: 18px; }
.login-help a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.back-link { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; font-size: 12px; color: #62765b; }
.back-link:hover { color: var(--green-dark); }
.course-selection { padding-block: 66px 80px; }
.course-selection h1 { margin: 12px 0 10px; font-size: clamp(28px, 4vw, 36px); line-height: 1.45; }
.selection-intro, .selection-notice, .selection-empty, .selection-error { color: var(--muted); font-size: 14px; }
.selection-notice, .selection-empty, .selection-error { margin-top: 30px; }
.course-card { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; width: min(100%, 430px); margin-top: 32px; padding: 27px; border: 1px solid var(--line); border-left: 4px solid #68845c; border-radius: 5px; background: var(--white); text-align: left; }
.course-card:hover { background: var(--sage); }
.course-card-kicker { color: #718668; font-size: 12px; letter-spacing: .12em; }
.course-card strong { font-family: "Noto Serif TC", "Songti TC", serif; font-size: 21px; }
.course-card > span:last-child { color: var(--green); font-size: 13px; margin-top: 5px; }
.selection-back { margin-bottom: 20px; }
.dashboard { padding-block: 39px 64px; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding-bottom: 29px; }
.dashboard-heading h1 { font-size: 33px; letter-spacing: .025em; font-weight: 600; line-height: 1.45; margin: 10px 0 9px; overflow-wrap: anywhere; }
.dashboard-heading > div > p:last-child { font-size: 13px; color: var(--muted); }
.course-summary { display: flex; align-items: center; gap: 13px; border-left: 1px solid #ccd7c4; padding-left: 25px; flex-shrink: 0; }
.course-summary strong { font-family: Georgia, serif; color: #6e865e; font-size: 45px; line-height: 1; font-weight: 400; }
.course-summary > span { font-size: 12px; color: #5e7457; }
.course-summary small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.space-navigation { display: flex; align-items: stretch; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 31px; }
.space-navigation > * { display: flex; align-items: center; gap: 9px; padding: 13px 1px 15px; background: transparent; font-size: 13px; white-space: nowrap; }
.space-navigation .space-current { border-bottom: 2px solid #53734b; font-weight: 600; margin-bottom: -1px; }
.space-navigation button:disabled { color: #788175; }
.space-navigation button > span { font-size: 9px; padding: 1px 6px; border-radius: 3px; background: #eaece3; color: #697560; }
.catalog-notice, .catalog-error { padding: 70px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.secondary-button { min-height: 42px; padding: 9px 19px; margin-top: 19px; border: 1px solid #9caf91; color: var(--green); background: #fffefa; border-radius: 4px; font-size: 13px; }
.secondary-button:hover { background: var(--sage); }
.practice-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
.lesson-sidebar { border: 1px solid var(--line); background: #f5f7ee; border-radius: 4px; overflow: hidden; }
.sidebar-heading { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.sidebar-heading h2 { font-size: 16px; font-weight: 600; font-family: inherit; }
.sidebar-heading > span { font-size: 11px; color: #77856d; }
.lesson-navigation { display: grid; }
.appendix-heading { margin: 0; padding: 14px 18px 10px; color: #78866e; border-top: 1px solid var(--line); font-size: 11px; font-weight: 500; letter-spacing: .08em; }
.lesson-button { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 10px; align-items: start; padding: 16px 17px; border-bottom: 1px solid #e2e7da; background: transparent; text-align: left; position: relative; }
.lesson-button:last-child { border-bottom: 0; }
.lesson-button:hover { background: #eef2e5; }
.lesson-button[aria-current="true"] { background: #e5eddc; }
.lesson-button[aria-current="true"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #53734b; }
.lesson-number { font-family: Georgia, serif; color: #7a8d6c; font-size: 16px; line-height: 1.45; padding-top: 1px; }
.lesson-button[aria-current="true"] .lesson-number { color: #375c34; }
.lesson-button-title { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; line-height: 1.6; }
.lesson-button-status { display: flex; gap: 5px; align-items: center; color: #6a7b60; font-size: 10px; margin-top: 5px; }
.status-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #81936f; }
.lesson-button.is-preparing .lesson-button-status { color: #86724f; }
.lesson-button.is-preparing .status-dot { background: #a5906b; }
.lesson-content { min-width: 0; }
.lesson-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 2px 0 22px; }
.lesson-kicker { color: #7e8c70; font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.lesson-heading h2 { font-size: 27px; font-weight: 600; line-height: 1.5; letter-spacing: .025em; margin-top: 7px; overflow-wrap: anywhere; }
.status-badge { font-size: 10px; color: #5d7851; background: #edf2e6; padding: 4px 9px; border: 1px solid #dce6d1; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.status-badge.is-preparing { color: #7b6846; background: #f4f0e5; border-color: #e8dfca; }
.section-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.section-tab { display: flex; gap: 8px; align-items: center; min-height: 42px; border: 1px solid transparent; background: #eff2e9; color: #64745c; padding: 9px 16px; border-radius: 4px; font-size: 13px; }
.section-tab:hover { background: #e5ebdc; }
.section-tab[aria-selected="true"] { background: var(--green); color: white; }
.section-tab-count { font-family: Georgia, serif; font-size: 12px; opacity: .8; }
.practice-panel { padding-top: 22px; }
.section-intro { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.section-intro > p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.item-count { flex-shrink: 0; font-size: 10px; color: #7c8a70; }
.group-audio { padding: 16px 18px; margin-bottom: 18px; border: 1px solid #d2ddc8; border-left: 3px solid #8ca77a; border-radius: 4px; background: #eef3e7; }
.group-audio h3 { font-size: 13px; font-weight: 500; }
.group-audio .audio-area { margin-top: 10px; }
.practice-items { display: grid; gap: 13px; }
.practice-item { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 13px; padding: 21px 23px 20px; border: 1px solid var(--line); background: var(--white); border-radius: 5px; }
.item-number { width: 26px; height: 26px; display: grid; place-items: center; font-family: Georgia, serif; font-size: 12px; color: #7e9070; background: #edf2e7; border-radius: 50%; margin-top: 2px; }
.item-copy { min-width: 0; }
.item-title { font-size: 19px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.item-title[lang="ko"] { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; letter-spacing: .01em; }
.item-prompt { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.item-role { display: inline-flex; align-items: center; min-height: 24px; font-size: 10px; color: #68805a; padding: 2px 8px; margin-bottom: 8px; border-radius: 3px; border: 1px solid #dbe5d2; background: #f0f5e9; }
.audio-area { margin-top: 15px; }
.audio-label { display: block; color: #7c8973; font-size: 10px; margin-bottom: 7px; }
audio { display: block; width: 100%; max-width: 410px; height: 40px; border-radius: 22px; }
.audio-unavailable { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px dashed #d1dac8; border-radius: 4px; color: #7e8974; background: #f5f7f0; font-size: 11px; }
.audio-unavailable:disabled { opacity: 1; }
.audio-error { margin-top: 8px; color: var(--error); font-size: 11px; }
.empty-state { min-height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; text-align: center; padding: 34px 24px; border: 1px dashed #ced9c5; border-radius: 5px; background: #f4f6ee; }
.empty-symbol { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #d4ddca; color: #8a9b78; font-size: 25px; font-family: Georgia, serif; }
.empty-state h3 { font-size: 17px; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.9; white-space: pre-line; }
.role-filter { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.role-filter button { min-height: 35px; padding: 6px 11px; font-size: 11px; color: #6b7c61; border: 1px solid #d5decc; background: transparent; border-radius: 4px; }
.role-filter button[aria-pressed="true"] { color: #355d3b; border-color: #8ba17d; background: #eaf0e1; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 23px 25px; border-top: 1px solid var(--line); color: #7b8970; font-size: 10px; }
.noscript-notice { padding: 24px; text-align: center; }
@media (min-width: 1400px) { .welcome { gap: 140px; } }
@media (max-width: 980px) {
  .page-width { width: calc(100% - 56px); }
  .site-header { padding-inline: 28px; }
  .welcome { gap: 46px; grid-template-columns: 1fr 1fr; }
  .login-card { padding-inline: 28px; }
  .practice-layout { grid-template-columns: 206px minmax(0, 1fr); gap: 25px; }
  .lesson-button { padding-inline: 13px; gap: 7px; }
  .practice-item { padding: 19px 17px; gap: 10px; }
  .lesson-heading h2 { font-size: 24px; }
  .section-tab { padding-inline: 13px; }
}
@media (max-width: 720px) {
  .welcome { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 44px; min-height: auto; }
  .welcome-copy { padding: 0; }
  .welcome h1 { font-size: 35px; margin-block: 13px 16px; }
  .welcome-description { font-size: 13px; }
  .login-card { max-width: 500px; width: 100%; justify-self: center; padding: 28px; }
  .dashboard { padding-top: 28px; }
  .dashboard-heading h1 { font-size: 27px; }
  .dashboard-heading { padding-bottom: 23px; }
  .course-summary { padding-left: 18px; gap: 9px; }
  .course-summary strong { font-size: 35px; }
  .course-summary > span { font-size: 11px; }
  .space-navigation { gap: 21px; margin-bottom: 24px; }
  .space-navigation > * { font-size: 12px; gap: 6px; }
  .practice-layout { grid-template-columns: 1fr; gap: 26px; }
  .sidebar-heading { padding: 12px 15px; }
  .sidebar-heading h2 { font-size: 14px; }
  .lesson-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; gap: 6px; }
  .appendix-heading { grid-column: 1 / -1; padding: 7px 4px 3px; }
  .lesson-button { border: 1px solid #e1e6d9; border-radius: 3px; padding: 10px 8px; display: block; background: #fafbf6; }
  .lesson-button:last-child { border-bottom: 1px solid #e1e6d9; }
  .lesson-button[aria-current="true"] { border-color: #91a77f; }
  .lesson-button[aria-current="true"]::before { display: none; }
  .lesson-number { font-size: 14px; }
  .lesson-button-title { font-size: 11px; margin-top: 3px; }
  .lesson-button-status { font-size: 9px; gap: 4px; }
  .lesson-heading { margin-bottom: 18px; }
  .practice-item { padding: 19px; }
  .section-tabs { padding-bottom: 16px; }
}
@media (max-width: 480px) {
  .page-width { width: calc(100% - 36px); }
  .site-header { min-height: 76px; padding: 16px 18px; gap: 14px; }
  .official-logo { width: 150px; max-height: 44px; }
  .header-label { font-size: 9px; padding: 4px 7px; }
  .header-account { gap: 10px; }
  .account-email { max-width: 105px; font-size: 10px; }
  .logout-button { font-size: 11px; }
  .logout-button span { display: none; }
  .welcome { padding-top: 28px; }
  .welcome .eyebrow { font-size: 10px; }
  .welcome h1 { font-size: 30px; letter-spacing: .015em; }
  .welcome-subtitle { font-size: 13px; }
  .welcome-description { font-size: 12px; }
  .access-notice { font-size: 10px; }
  .login-card { padding: 25px 22px 23px; }
  .login-card h2 { font-size: 23px; }
  .login-description { font-size: 12px; }
  .login-help { font-size: 10px; }
  .dashboard-heading { align-items: flex-start; gap: 15px; }
  .dashboard-heading h1 { font-size: 25px; margin-block: 9px 7px; }
  .dashboard-heading > div > p:last-child { font-size: 12px; }
  .course-summary { display: none; }
  .space-navigation { gap: 0; justify-content: space-between; }
  .space-navigation > * { display: block; font-size: 11px; padding-inline: 0; }
  .space-navigation button > span { display: block; width: fit-content; margin-top: 3px; font-size: 8px; padding-inline: 4px; }
  .space-current { align-self: stretch; padding-top: 20px; }
  .lesson-navigation { gap: 5px; padding: 7px; }
  .lesson-button { padding: 8px 6px; }
  .lesson-button-title { font-size: 10px; }
  .lesson-button-status { font-size: 8px; }
  .lesson-heading { gap: 11px; }
  .lesson-heading h2 { font-size: 23px; }
  .lesson-kicker { font-size: 9px; }
  .status-badge { font-size: 9px; padding: 3px 7px; }
  .section-tabs { gap: 5px; }
  .section-tab { font-size: 11px; padding: 8px 10px; gap: 6px; min-height: 39px; }
  .section-tab-count { font-size: 10px; }
  .practice-panel { padding-top: 18px; }
  .section-intro { align-items: start; gap: 10px; }
  .section-intro > p { font-size: 11px; }
  .item-count { font-size: 9px; padding-top: 2px; }
  .practice-item { padding: 17px 13px; grid-template-columns: 23px minmax(0, 1fr); gap: 9px; }
  .item-number { width: 23px; height: 23px; font-size: 11px; }
  .item-title { font-size: 18px; }
  .item-prompt { font-size: 12px; }
  audio { height: 40px; min-width: 0; }
  .empty-state { padding: 30px 16px; min-height: 245px; }
  .empty-state h3 { font-size: 16px; }
  .empty-state p { font-size: 12px; }
  .site-footer { gap: 12px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
