* { box-sizing: border-box; }
.home { max-width: 640px; margin: 64px auto; padding: 24px; }
.home h1 { margin-bottom: 24px; }
.home h2 { margin-bottom: 20px; }
.home label { display: block; margin-bottom: 8px; }
.home input[type="text"] { max-width: none; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.home button, .home a { display: inline-block; padding: 12px 18px; border: 1px solid #cdd5de; border-radius: 6px; background: white; color: #334356; text-decoration: none; }
.home .primary { background: #334f72; color: white; border-color: #334f72; }
body { margin: 0; background: #f3f4f6; color: #222b36; font: 15px/1.5 system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #678bbd; outline-offset: 3px; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; max-width: 1560px; margin: auto; padding: 32px; align-items: start; }
.lesson-header { padding: 0 0 24px; }
.heading-row, .exercise-heading, .review, .call-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .13em; color: #647080; }
.role-badge { background: #e5eaf0; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
h1 { margin: 12px 0 6px; font-size: 30px; line-height: 1.2; letter-spacing: -.03em; }
#lesson-help { margin: 0; color: #657080; font-size: 14px; }
.exercises { display: grid; gap: 16px; }
.exercise { min-width: 0; padding: 24px; border: 1px solid #dde2e8; border-left: 3px solid #dde2e8; border-radius: 10px; background: white; transition: border-color .15s, background .15s; }
.exercise-heading { justify-content: flex-start; margin-bottom: 14px; }
.number { color: #85909e; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
h2 { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 600; }
.sentence { display: block; margin-bottom: 12px; font-size: 16px; }
input[type="text"] { display: block; width: 100%; max-width: 420px; border: 1px solid #cdd5de; background: #fafbfc; border-radius: 6px; padding: 10px 12px; color: #222b36; }
input::placeholder { color: #8a94a1; }
input[readonly] { background: #f2f4f7; cursor: default; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid #dce1e8; border-radius: 6px; background: #fafbfc; cursor: pointer; }
.choices label:has(input:checked) { border-color: #8399b7; background: #edf2f8; }
.choices input { accent-color: #486c9a; margin: 0; width: 16px; height: 16px; }
[data-role="teacher"] .choices label { cursor: default; }
[data-role="teacher"] .choices input { opacity: 1; }
.review { border-top: 1px solid #edf0f3; margin-top: 18px; padding-top: 12px; min-height: 34px; }
[data-mark-label] { font-size: 12px; color: #7c8794; }
.mark-buttons { display: flex; gap: 6px; }
.mark-buttons button { width: 34px; height: 30px; border: 1px solid #dce1e8; border-radius: 5px; color: #526071; background: white; font-size: 17px; line-height: 1; }
.exercise[data-mark="correct"] { border-color: #9ec6b2; border-left-color: #438361; background: #f8fcfa; }
.exercise[data-mark="wrong"] { border-color: #dbb0ae; border-left-color: #b35b57; background: #fffafa; }
.exercise[data-mark="correct"] [data-mark-label] { color: #34734f; }
.exercise[data-mark="wrong"] [data-mark-label] { color: #a04b47; }
.mark-buttons [data-mark="correct"][aria-pressed="true"] { background: #e4f1e9; border-color: #7fac91; color: #34734f; }
.mark-buttons [data-mark="wrong"][aria-pressed="true"] { background: #f8e8e7; border-color: #cd9290; color: #a04b47; }
.call-panel { position: sticky; top: 24px; border: 1px solid #dce1e8; border-radius: 10px; background: white; padding: 16px; text-align: center; }
.call-heading { margin-bottom: 14px; }
.call-heading span { font-size: 12px; color: #83909c; }
.videos { position: relative; height: clamp(260px, 42vh, 500px); background: #151a21; border-radius: 7px; overflow: hidden; }
video { background: #151a21; object-fit: contain; }
#remote { width: 100%; height: 100%; }
#local { position: absolute; width: 32%; min-width: 85px; max-width: 160px; aspect-ratio: 16/9; bottom: 10px; right: 10px; border: 1px solid #87929f; border-radius: 5px; transform: scaleX(-1); }
#status { margin: 16px 0 8px; font-size: 14px; }
#hint { color: #657080; margin: 8px 0; font-size: 13px; }
#hint:empty { display: none; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.controls button { padding: 10px 8px; border: 1px solid #dce1e8; border-radius: 6px; background: #f1f4f7; color: #334356; font-size: 12px; }
.controls button[aria-pressed="true"] { background: #f6eddc; border-color: #dfcba4; color: #725225; }
#hangup { grid-column: 1 / -1; background: #a84b4b; border-color: #a84b4b; color: white; }
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .call-panel { position: static; }
  .videos { height: 280px; }
  .exercise { padding: 18px; }
  h1 { font-size: 26px; }
}
