/* The approved reading workspace: warm paper, restrained controls, real evidence. */
.cabinet-learning {
  color-scheme: light;
  --cream: #f7f5ef;
  --paper: #fffdf9;
  --sidebar: #f3f0e9;
  --ink: #18212f;
  --muted: #606b7c;
  --line: #dcd8ce;
  --amber: #f3a23b;
  --amber-deep: #844910;
  --amber-pale: #fff1dc;
  --error: #8e3930;
  --error-paper: #fae9e6;
  --sans: "Onest", "Golos Text", "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --reading: Georgia, "Times New Roman", serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-control: 7px;
  --radius-message: 12px;
  --radius-composer: 16px;
  --motion-fast: 150ms;
  --ease-response: cubic-bezier(.2, .7, .3, 1);
}

.cabinet-learning {

* { box-sizing: border-box; }
[hidden] { display: none !important; }

& { background: var(--cream); color: var(--ink); font: 15px/1.6 var(--sans); }
::selection { background: var(--amber-pale); color: var(--ink); }
button, select, textarea, input { font: inherit; }
a { color: inherit; }
button, select, .photo-label { touch-action: manipulation; }
button, select, summary, .photo-label { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber-deep); outline-offset: 3px; }
button:disabled, select:disabled, textarea:disabled { cursor: not-allowed; color: var(--muted); background: var(--sidebar); }
button:disabled { border-color: var(--line); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(20px, 2vw, 25px); line-height: 1.3; font-weight: 650; letter-spacing: -.025em; margin-bottom: 0; overflow-wrap: anywhere; }
h2 { font-size: 18px; line-height: 1.4; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.4; }
ul, ol { padding-left: var(--space-6); }
.muted, .field-note { color: var(--muted); }
.field-note { font: 12px/1.6 var(--sans); margin: var(--space-2) 0 0; }
.skip-link { position: fixed; top: var(--space-2); left: var(--space-2); transform: translateY(-200%); padding: var(--space-3); background: var(--paper); z-index: 30; }
.skip-link:focus { transform: none; }
.learning-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100dvh; }
.learning-shell.theory-open { grid-template-columns: 236px minmax(0, 1fr) minmax(300px, 340px); }
.lesson-sidebar { background: var(--sidebar); border-right: 1px solid var(--line); padding: var(--space-8) var(--space-6); overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.brand { text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.04em; display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; }
.brand-mark { width: 25px; height: 25px; border: 2px solid var(--ink); border-radius: 50%; position: relative; flex: 0 0 auto; }
.brand-mark::after { content: ""; position: absolute; width: 23px; height: 9px; border: 1.5px solid var(--amber-deep); border-radius: 50%; top: 6px; left: -1px; transform: rotate(-35deg); }
.workspace-label { color: var(--muted); font-size: 12px; line-height: 1.45; margin-bottom: var(--space-1); }
.lesson-sidebar > .workspace-label { margin: var(--space-4) 0 var(--space-2); }
.lesson-sidebar h2 { margin-bottom: 0; font-size: 14px; }
#lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.lesson-link { text-decoration: none; display: block; min-height: 44px; padding: var(--space-3); border-radius: var(--radius-control); overflow-wrap: anywhere; line-height: 1.45; }
.lesson-link:hover { background: var(--cream); }
.lesson-link[aria-current="page"] { background: var(--paper); box-shadow: inset 3px 0 var(--amber); font-weight: 600; }
.lesson-link small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: var(--space-1); }
.new-lesson { margin-top: var(--space-6); border-top: 1px solid var(--line); padding-top: var(--space-2); }
summary { min-height: 44px; padding: var(--space-3) 0; }
#start-lesson-form { display: grid; gap: var(--space-2); }
#start-lesson-form label { font-size: 13px; margin-top: var(--space-2); }
#start-lesson-form .field-note { margin: 0 0 var(--space-2); }
select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-2) var(--space-3); background: var(--paper); color: var(--ink); }
select { overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot { margin: auto 0 0; padding-top: var(--space-8); color: var(--muted); font-size: 12px; }
.learning-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lesson-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-8); border-bottom: 1px solid var(--line); }
.lesson-header > div { min-width: 0; }
.mode-notice { color: var(--amber-deep); background: var(--amber-pale); margin: 0; padding: var(--space-2) var(--space-8); font-size: 12px; }
.material-notice { padding: var(--space-2) var(--space-8); margin: 0; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.chat-scroll { overflow-y: auto; flex: 1; min-height: 100px; scrollbar-gutter: stable; }
.reading-column { width: min(100%, 800px); margin: 0 auto; padding: var(--space-8) var(--space-8) var(--space-6); }
.lesson-empty { padding: var(--space-8) 0; }
.lesson-empty p { color: var(--muted); max-width: 50ch; }
.current-task { padding-bottom: var(--space-6); margin-bottom: var(--space-8); border-bottom: 1px solid var(--line); }
.current-task h2 { margin: var(--space-2) 0 var(--space-4); }
.math-text, .message-body, .theory-body { font: 18px/1.8 var(--reading); overflow-wrap: anywhere; white-space: pre-wrap; }
.messages { list-style: none; margin: 0; padding: 0; }
.message { margin: 0 0 var(--space-8); }
.message-meta { margin: 0 0 var(--space-2); color: var(--muted); font-size: 12px; }
.message.student { background: var(--sidebar); border-radius: var(--radius-message); margin-left: var(--space-8); padding: var(--space-4) var(--space-6); }
.message.student .message-body { font: 16px/1.75 var(--sans); }
.message.assistant { padding: 0 var(--space-1); }
.theory-link { display: inline-block; color: var(--amber-deep); min-height: 44px; padding: var(--space-2) 0; font: 14px/1.7 var(--sans); text-underline-offset: 4px; }
.message-photos { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.message-photos a { display: grid; gap: var(--space-1); font-size: 12px; color: var(--muted); }
.message-photos img { width: 104px; height: 136px; object-fit: cover; border-radius: var(--radius-control); background: var(--paper); }
.message-photo-note { margin-top: var(--space-2); color: var(--muted); font-size: 13px; }
.processing-status { min-height: 24px; margin: var(--space-4) 0; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; min-width: 44px; padding: var(--space-2) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--ink); background: var(--paper); text-align: center; line-height: 1.4; transition: background var(--motion-fast) var(--ease-response); }
.button:hover:not(:disabled) { background: var(--sidebar); }
.button:active:not(:disabled) { background: var(--amber-pale); }
.button.primary { background: var(--amber); border-color: var(--amber); font-weight: 600; }
.button.primary:hover:not(:disabled) { background: var(--amber-pale); border-color: var(--amber-deep); }
.button.primary:disabled { background: var(--sidebar); border-color: var(--line); }
.button.quiet { background: transparent; }
.action-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lesson-controls { border-top: 1px solid var(--line); padding-top: var(--space-6); }
.hint-controls { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; gap: var(--space-3); padding-top: var(--space-6); }
.hint-controls > label { font-size: 13px; }
.hint-controls > p { grid-column: 1 / -1; margin: 0; }
.lesson-progress { border-top: 1px solid var(--line); margin-top: var(--space-6); font-size: 13px; }
.lesson-progress p { margin: var(--space-2) 0; }
.lesson-progress li { margin-bottom: var(--space-2); }
.composer-wrap { padding: var(--space-2) var(--space-6) var(--space-3); border-top: 1px solid var(--line); background: var(--cream); flex-shrink: 0; }
.composer { max-width: 736px; margin: 0 auto; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-composer); background: var(--paper); }
.composer > label { display: block; font-size: 11px; color: var(--muted); margin: 0; }
.composer textarea { display: block; resize: none; height: 44px; min-height: 44px; max-height: min(180px, 25dvh); border-color: transparent; padding: var(--space-2) var(--space-1); font-size: 16px; line-height: 1.5; }
textarea::placeholder { color: var(--muted); }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-1); padding-top: 0; border-top: 0; }
.composer-tools { display: flex; gap: var(--space-1); align-items: center; }
.composer-help { position: relative; }
.composer-help > summary { display: flex; align-items: center; justify-content: center; padding: var(--space-2); min-width: 44px; min-height: 44px; border-radius: var(--radius-control); color: var(--muted); list-style: none; }
.composer-help > summary::-webkit-details-marker { display: none; }
.composer-help > summary:hover, .composer-help[open] > summary { background: var(--sidebar); }
.composer-help-content { position: absolute; bottom: calc(100% + var(--space-2)); left: -64px; width: min(320px, calc(100vw - 48px)); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); z-index: 20; }
.attachments:empty { display: none; }
.hint-location { margin: var(--space-2) 0 var(--space-4); padding: var(--space-3) var(--space-4); background: var(--amber-pale); border-radius: var(--radius-control); font: 17px/1.8 var(--reading); white-space: pre-wrap; overflow-wrap: anywhere; }
.hint-location-label { margin-top: var(--space-3); }
.theory-preview { margin: 0; padding: 0 var(--space-4) var(--space-2); border-bottom: 1px solid var(--line); background: var(--paper); flex-shrink: 0; }
.theory-preview > summary { font-weight: 600; }
.theory-preview-body { max-height: 120px; overflow-y: auto; padding: 0 var(--space-1); }
.theory-preview-body h3 { font-size: 14px; margin-bottom: var(--space-2); }
.theory-preview .theory-body { font-size: 15px; line-height: 1.6; }
.theory-preview > .button { font-size: 13px; padding: var(--space-2) 0; }
.send-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.photo-control { position: relative; }
#photo-input { width: 1px; height: 1px; position: absolute; left: var(--space-3); top: var(--space-3); opacity: 0; }
.photo-control:focus-within .photo-label { outline: 3px solid var(--amber-deep); outline-offset: 3px; }
.photo-control:has(input:disabled) .photo-label { color: var(--muted); cursor: not-allowed; }
.attachments { list-style: none; display: grid; gap: var(--space-2); margin: var(--space-2) 0 0; padding: 0; }
.attachment { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; }
.attachment img { width: 40px; height: 52px; object-fit: cover; border-radius: var(--radius-control); }
.attachment span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.request-error { background: var(--error-paper); color: var(--error); padding: var(--space-3) var(--space-8); font-size: 13px; }
.request-error p { margin: 0 0 var(--space-2); }
.request-error button { margin-right: var(--space-2); }
.clarification { border-left: 3px solid var(--amber); padding: var(--space-4) var(--space-6); margin-bottom: var(--space-8); background: var(--paper); }
.clarification blockquote { white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--space-4) 0; font: 18px/1.7 var(--reading); }
.clarification form { display: grid; gap: var(--space-2); }
.clarification label { font-size: 13px; }
.clarification .button { justify-self: start; }
.theory-panel { border-left: 1px solid var(--line); background: var(--paper); overflow-y: auto; min-width: 0; }
.theory-content { padding: var(--space-6); }
.theory-heading { display: flex; justify-content: space-between; align-items: start; gap: var(--space-3); }
.theory-heading h2 { margin: var(--space-1) 0 var(--space-6); }
#theory-index { list-style: none; padding: 0 0 var(--space-4); margin: 0; border-bottom: 1px solid var(--line); }
#theory-index a { min-height: 44px; padding: var(--space-2) 0; display: block; font-size: 13px; text-underline-offset: 3px; }
.theory-section { padding: var(--space-6) 0; border-bottom: 1px solid var(--line); scroll-margin-top: var(--space-6); }
.theory-section h3 { margin-bottom: var(--space-3); }
.theory-section.is-highlighted { background: var(--amber-pale); box-shadow: 0 0 0 var(--space-3) var(--amber-pale); border-radius: var(--radius-control); }
.theory-body { font-size: 17px; }
.katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: var(--space-2); }
.katex { max-width: 100%; }
dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-composer); }
dialog::backdrop { background: rgb(24 33 47 / 45%); }
.theory-dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; }
.confirmation-dialog { max-width: min(480px, calc(100% - 32px)); padding: var(--space-6); }
.confirmation-dialog p { color: var(--muted); }
@media (max-width: 1150px) {
  .learning-shell, .learning-shell.theory-open { grid-template-columns: 216px minmax(0, 1fr); }
  .theory-panel { display: none; }
  .lesson-sidebar { padding: var(--space-6) var(--space-4); }
  .hint-controls { grid-template-columns: 1fr 1fr; }
  .hint-controls > label { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .learning-shell, .learning-shell.theory-open { display: flex; flex-direction: column; height: auto; min-height: 100dvh; }
  .lesson-sidebar { flex: none; padding: var(--space-3) var(--space-4); border-right: 0; border-bottom: 1px solid var(--line); gap: var(--space-2); }
  .brand { font-size: 18px; }
  .lesson-sidebar > .workspace-label, .sidebar-foot { display: none; }
  #lesson-list { display: flex; overflow-x: auto; padding-bottom: var(--space-1); }
  #lesson-list li { flex: 0 0 auto; max-width: 260px; }
  .lesson-link { font-size: 13px; padding: var(--space-2) var(--space-3); }
  .new-lesson { margin-top: 0; padding-top: 0; border-top: 0; }
  #start-lesson-form { grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-3); padding-bottom: var(--space-3); }
  #start-lesson-form > label { margin: 0; }
  #unit-select { grid-column: 1; grid-row: 2; }
  #lesson-minutes { grid-column: 2; grid-row: 2; }
  #start-lesson-form .field-note, #start-lesson { grid-column: 1 / -1; }
  .learning-main { flex: 1; min-height: 560px; }
  .lesson-header { padding: var(--space-4); position: sticky; top: 0; z-index: 10; background: var(--cream); }
  .lesson-header h1 { font-size: 18px; }
  .mode-notice, .material-notice, .request-error { padding-inline: var(--space-4); }
  .chat-scroll { overflow-y: auto; max-height: 58dvh; min-height: 220px; }
  .reading-column { padding: var(--space-6) var(--space-4); }
  .math-text, .message-body { font-size: 17px; }
  .message.student { margin-left: var(--space-4); padding: var(--space-3) var(--space-4); }
  .hint-controls { grid-template-columns: 1fr; }
  .composer-wrap { padding: var(--space-2) var(--space-3) max(var(--space-2), env(safe-area-inset-bottom)); }
  .composer { padding: var(--space-2); }
  .composer-row { align-items: stretch; }
  .send-actions { flex: 1; }
  .send-actions .button { flex: 1; }
  .photo-control { width: auto; }
  .composer-row { flex-wrap: nowrap; gap: var(--space-1); }
  .composer-row .button { padding-inline: var(--space-2); font-size: 12px; }
  .composer-tools { gap: 0; }
  .composer-help > summary { min-width: 44px; }
  .composer-help-content { left: -56px; }
  .send-actions { flex-wrap: nowrap; }
  .theory-preview-body { max-height: 88px; }
  .composer .field-note { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition-duration: 0s; animation-duration: 0s; }
}
@media print {
  .lesson-sidebar, .composer-wrap, .lesson-controls, .mode-notice, .lesson-header > button { display: none; }
  .learning-shell { display: block; height: auto; }
  .chat-scroll { overflow: visible; max-height: none; }
  .theory-panel:not([hidden]) { display: block; border: 0; }
}

/* A study notebook: dates and explanations, not dashboard decoration. */
.study-nav { display: grid; gap: var(--space-1); margin-bottom: var(--space-6); }
.study-nav a { padding: var(--space-2) var(--space-3); min-height: 44px; text-decoration: none; border-radius: var(--radius-control); }
.study-nav a[aria-current="page"] { background: var(--paper); font-weight: 650; box-shadow: inset 3px 0 var(--amber); }
.lesson-room { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.study-view { overflow-y: auto; flex: 1; padding: var(--space-12) clamp(20px, 5vw, 72px); }
.study-view > * { max-width: 850px; margin-left: auto; margin-right: auto; }
.study-heading { margin-bottom: var(--space-8); }
.study-heading h1 { font: 38px/1.2 var(--reading); letter-spacing: -.02em; }
.study-intro { max-width: 62ch; font: 20px/1.7 var(--reading); margin-bottom: var(--space-8); }
.study-list { list-style: none; padding: 0; margin: var(--space-6) 0; }
.study-item { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.study-item h2 { margin: 0 0 var(--space-2); }
.study-item p { margin: var(--space-2) 0; }
.study-date { font-variant-numeric: tabular-nums; color: var(--muted); }
.study-item .button { margin-top: var(--space-3); text-decoration: none; }
.study-section { margin-top: var(--space-12); }
.study-section h2 { margin-bottom: var(--space-4); }
.study-form { max-width: 520px; display: grid; gap: var(--space-4); }
.study-form label { display: grid; gap: var(--space-2); }
.study-form input[type="number"], .study-form input[type="text"] { width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--ink); }
.study-form fieldset { border: 0; padding: 0; margin: 0; }
.study-days { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.study-days label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.study-days input { width: 18px; height: 18px; accent-color: var(--amber-deep); }
.study-summary { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: var(--space-2) var(--space-6); }
.study-summary dt { color: var(--muted); }
.study-summary dd { margin: 0; }
.study-note { border-left: 3px solid var(--amber); padding-left: var(--space-4); color: var(--muted); }
#study-status:empty { display: none; }
#study-status { color: var(--amber-deep); }
@media (max-width: 700px) {
  .study-nav { display: flex; gap: var(--space-1); margin: 0; flex-wrap: wrap; }
  .study-nav a { padding: var(--space-2); }
  .study-view { overflow: visible; padding: var(--space-8) var(--space-4); }
  .study-heading h1 { font-size: 32px; }
  .study-item { grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); }
  .study-summary { grid-template-columns: 1fr; gap: var(--space-1); }
  .study-summary dd { margin-bottom: var(--space-3); }
  .study-section { margin-top: var(--space-8); }
}

}

/* One global navigation; the lesson rail contains only lesson context. */
.app-sidebar { overflow-y: auto; }
.app-topbar h1:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 4px; }
.sidebar-nav a, .cabinet-menu-nav a { display: block; padding: 12px 14px; min-height: 44px; border-radius: 7px; text-decoration: none; color: var(--ink-soft); font-size: 15px; }
.sidebar-nav [aria-current="page"], .cabinet-menu-nav [aria-current="page"] { background: var(--cream-deep); color: var(--ink); font-weight: 650; }
.cabinet-nav-group { margin-top: 24px; }
.cabinet-nav-label { color: var(--muted); font-size: 12px; margin: 0 14px 8px; }
.sidebar-nav > a:last-child { margin-top: 24px; border-top: 1px solid var(--line); }
.sidebar-nav a:focus-visible, .cabinet-menu-nav a:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 2px; }
.cabinet-menu { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--cream); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.cabinet-menu::backdrop { background: rgb(24 33 47 / 45%); }
.cabinet-menu-nav button { display: block; width: 100%; min-height: 44px; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 12px 14px; }
.cabinet-menu-nav button.active { background: var(--cream-deep); }
.cabinet-lesson-history { display: grid; gap: 8px; text-decoration: none; color: inherit; padding: 24px 0; border-top: 1px solid var(--line); }
.cabinet-sprint-summary { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 24px; }
.cabinet-learning .learning-shell, .cabinet-learning .learning-shell.theory-open { height: calc(100dvh - 80px); grid-template-columns: 200px minmax(0, 1fr); }
.cabinet-learning .learning-shell:has(#lesson-room[hidden]) { grid-template-columns: minmax(0, 1fr); }
.cabinet-learning .learning-shell:has(#lesson-room[hidden]) > .lesson-sidebar { display: none; }
.cabinet-learning .lesson-header h2 { margin: 0; font-size: 22px; }
.cabinet-learning .study-heading h2 { font: 36px/1.2 var(--reading); }
.cabinet-learning .mode-notice { font-size: 12px; }
@media (min-width: 1400px) {
 .cabinet-learning .learning-shell.theory-open { grid-template-columns: minmax(0, 1fr) 340px; }
 .cabinet-learning .learning-shell.theory-open > .lesson-sidebar { display: none; }
}
@media (max-width: 1400px) { .cabinet-learning .theory-panel { display: none; } }
@media (max-width: 700px) {
 .mobile-bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
 .mobile-bottom-nav button { min-width: 44px; min-height: 44px; font-size: 12px; }
 .cabinet-learning .learning-shell, .cabinet-learning .learning-shell.theory-open { height: auto; min-height: calc(100dvh - 140px); display: flex; }
 .cabinet-learning .lesson-sidebar { flex: none; }
 .cabinet-learning .lesson-header { position: static; }
 .cabinet-learning .lesson-header h2 { font-size: 18px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
 .cabinet-learning .lesson-header { padding-block: var(--space-3); }
 .cabinet-learning .chat-scroll { min-height: 220px; max-height: 58dvh; }
 .cabinet-learning .learning-main { min-height: 0; }
 .cabinet-learning .study-heading h2 { font-size: 30px; }
 .cabinet-learning .learning-shell, .cabinet-learning .learning-shell.theory-open { height: calc(100dvh - 140px); min-height: 0; }
 .cabinet-learning .lesson-sidebar { display: none; }
 .cabinet-learning .chat-scroll { min-height: 0; max-height: none; }
 .cabinet-learning .composer-wrap { padding-bottom: var(--space-2); }
 .cabinet-learning .theory-preview-body { max-height: 64px; }
}
