.semester-main { max-width: 1190px; padding: clamp(26px, 5vw, 62px) clamp(16px, 4vw, 54px) 64px; margin: auto; }
.semester-context { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 18px; font-size: .9rem; }
.semester-context strong { color: var(--ink); }
.semester-context > span, .semester-context small { color: var(--muted); }
.semester-context small { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; font-size: .84rem; }
.intro { margin-bottom: 30px; }
.intro h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.22; margin: 0; letter-spacing: -.03em; }
.intro p { color: var(--muted); margin: 12px 0 0; }
#topicCards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.topic-card { display: grid; position: relative; grid-template-columns: clamp(78px, 10vw, 110px) 1fr; grid-template-rows: auto auto auto; align-content: center; column-gap: clamp(14px, 2vw, 24px); padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.topic-card:hover, .topic-card:focus-visible { border-color: var(--blue); }
.topic-card img { align-self: center; grid-row: 1 / 4; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px; }
.topic-card small { font-size: var(--type-meta); padding-right: 26px; color: var(--muted); }
.topic-card h2 { margin: 3px 0; font-size: clamp(1.12rem, 2vw, 1.38rem); }
.topic-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-arrow { position: absolute; right: 18px; top: 14px; color: var(--blue); }
.back-to-topics, #resumeTopic { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 14px; color: var(--blue); font-weight: 650; }
.back-to-topics:hover, #resumeTopic:hover { text-decoration: underline; }
.workspace { display: grid; grid-template-columns: minmax(210px, .74fr) minmax(0, 2.15fr); gap: clamp(18px, 4vw, 44px); align-items: start; }
.topics { padding-top: 14px; }
.topics h2 { margin: 0 0 14px; font-size: 1.15rem; }
.topics nav { display: grid; gap: 4px; }
.topics nav a { display: block; padding: 11px 15px; border-radius: 9px; font-weight: 700; }
.topics nav a small { display: block; font-size: .8rem; line-height: 1.5; color: var(--muted); font-weight: 500; }
.topics nav a:hover { background: var(--paper); }
.topics nav a[aria-current="true"] { color: var(--blue); background: var(--blue-soft); }
.mobile-picker { display: none; }
#progress { border-top: 1px solid var(--line); margin: 18px 0 0; padding: 12px 4px 0; font-size: .875rem; color: var(--muted); }
.worksheet { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); }
.worksheet-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px clamp(16px, 3vw, 32px); background: #f3ebd5; }
.worksheet-title p, .worksheet-title h1 { margin: 0; }
.worksheet-title h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.45; }
.worksheet-title .source { font-size: .83rem; color: #62563f; }
#pattern { font-weight: 650; }
#lessonArt { width: min(23%, 132px); height: 90px; object-fit: contain; mix-blend-mode: multiply; }
.practice { padding: 22px clamp(16px, 3vw, 32px) 10px; }
.practice h3 { font-size: 1.14rem; margin: 0 0 8px; }
.practice-mode { display: inline-flex; gap: 3px; min-width: 0; margin: 0 0 16px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: #f2f1e9; }
.practice-mode legend, .practice-mode input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.practice-mode label { cursor: pointer; }
.practice-mode span { display: grid; place-items: center; min-height: 44px; padding: 5px 16px; border-radius: 9px; color: var(--muted); font-weight: 650; }
.practice-mode input:checked + span { color: var(--blue); background: white; box-shadow: 0 1px 4px #303b3926; }
.practice-mode input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.picture-card { display: grid; grid-template-columns: clamp(108px, 16vw, 170px) minmax(0, 1fr); align-items: center; gap: clamp(12px, 2.4vw, 26px); margin: 0; padding: clamp(12px, 2vw, 20px); border: 1px solid #dedbc9; border-radius: 14px; background: #faf7eb; }
.picture-art { display: flex; justify-content: center; align-items: center; aspect-ratio: 1.2; }
.picture-art img { object-fit: contain; min-width: 0; max-width: 100%; max-height: 145px; mix-blend-mode: multiply; }
.picture-art img:not(:only-child) { width: 50%; }
.picture-prompt { margin: 0; font-size: .95rem; line-height: 1.6; }
.picture-cue { margin: .35em 0 0; color: var(--ink); font-weight: 800; font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.24; }
.prompt { margin: 4px 0 10px; }
button, select { font: inherit; color: inherit; }
.practice button, select { cursor: pointer; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 8px 15px; }
.practice button:hover { border-color: var(--blue); }
.practice button:disabled { cursor: default; }
.practice .voice { color: var(--blue); font-weight: 650; }
.practice .voice::before { content: '▶'; font-size: .75em; margin-right: .45em; }
.practice .voice.is-playing::before { content: '■'; }
.practice .voice.listen, #practised { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.practice .small-voice { min-height: 44px; background: transparent; border: 0; padding: 0 6px; margin-left: .4em; font-size: .86rem; }
.listen-options { display: flex; gap: 18px; align-items: center; }
.listen-options label { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); cursor: pointer; }
.listen-options input { accent-color: var(--blue); width: 1em; height: 1em; }
.choices, .actions, .more { display: flex; flex-wrap: wrap; gap: 8px; }
.choices { margin-top: 12px; }
.choices button[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: -2px; }
.choices button.right { color: var(--green); background: #eff5eb; }
.choices button.wrong { color: var(--error); background: #fcf2ec; }
.feedback, #saveStatus { margin: .6em 0 0; font-size: .93rem; }
.feedback:empty, #saveStatus:empty { display: none; }
#compare { margin: 17px 0 20px; border-block: 1px solid var(--line); }
#compare summary, #modelExample summary { padding: 12px 0; cursor: pointer; color: var(--blue); font-weight: 650; }
#modelExample summary { width: fit-content; }
.rule { margin: 2px 0 12px; }
#compare:has(summary[hidden]) { border-top: 0; margin-top: 0; }
#compare:has(summary[hidden]) .rule { padding: 12px 16px; border-radius: 10px; background: var(--blue-soft); }
#examples { list-style: none; padding: 0; margin: 0 0 12px; }
#examples li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
#examples strong, #examples small { display: block; }
#examples small { color: var(--muted); font-size: .85rem; }
#examples .voice { grid-column: 2; grid-row: 1 / 3; }
#examples a { display: inline-block; min-height: 44px; align-content: center; color: var(--blue); text-decoration: underline; }
.model { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--green); font-size: 1.12rem; }
.actions { margin: 15px 0 4px; }
.more { justify-content: space-between; border-top: 1px solid var(--line); margin-top: 22px; padding: 8px 0; }
.more button { background: transparent; color: var(--blue); border-color: transparent; }
#audioStatus:not(:empty) { position: fixed; z-index: 8; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(90%, 34em); padding: 9px 16px; background: var(--ink); color: white; border-radius: 8px; }
@media (max-width: 680px) {
  #topicCards { grid-template-columns: 1fr; gap: 10px; }
  .topic-card { padding: 14px; }
  .workspace { display: block; }
  .intro { margin-bottom: 16px; }
  .topics { padding: 0; margin-bottom: 16px; }
  .topics h2, .topics nav { display: none; }
  .mobile-picker { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 700; }
  #progress { padding: 0; border: 0; margin: 6px 0; }
  .worksheet-title { padding-block: 16px; }
  #lessonArt { width: 23%; height: 70px; }
  .practice { padding-top: 16px; }
  .practice-mode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .practice-mode span { padding-inline: 3px; }
  .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices button { padding-inline: 8px; overflow-wrap: anywhere; }
}
@media (max-width: 410px) {
  .picture-card { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
  .picture-prompt { font-size: .9rem; }
}
