/* Profrazvitie course UI. Rules and provenance: VISUAL_REQUIREMENTS.md.
   This layer changes presentation, never scene geometry or interaction targets. */
@font-face{font-family:Course Gilroy;src:url('assets/brand/Gilroy-Medium.woff2') format('woff2');font-weight:400 500;font-style:normal;font-display:swap}
@font-face{font-family:Course Gilroy;src:url('assets/brand/Gilroy-SemiBold.woff2') format('woff2');font-weight:600 750;font-style:normal;font-display:swap}
@font-face{font-family:Course Gilroy;src:url('assets/brand/Gilroy-ExtraBold.woff2') format('woff2');font-weight:800 900;font-style:normal;font-display:swap}
:root{
  --brand:#6b6ee8;
  --brand-action:#575ad4;
  --brand-hover:#4447b7;
  --brand-soft:#eeedff;
  --gold:#e7a714;
  --gold-ink:#78540a;
  --gold-soft:#faf6e9;
  --ink:#181830;
  --text-muted:#5d6173;
  --surface:#fff;
  --surface-soft:#f3f6fb;
  --line:#d6ddec;
  --radius-card:12px;
  --shadow-card:0 8px 24px #25224d0a;
  font-family:Course Gilroy, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color:var(--ink);
  background:var(--surface-soft);
}
button,input,textarea,select{font-family:inherit}
h1,h2,h3,h4{font-weight:600}
button,a,input,select,textarea,summary{scroll-margin-block:12px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible,
.learning-screen button:focus-visible,.foreman-action select:focus-visible{
  outline:3px solid var(--brand-hover);outline-offset:3px;
}
input[type=checkbox],input[type=range],.course-option input,.foreman-check input{accent-color:var(--brand-action)}

/* One action hierarchy. Cards and image hotspots retain their own shapes. */
.primary-button,.secondary-button,.edit-button,.learning-gear,.journal-turn,
.game-cameras button,.game-viewtools button,.game-panbar button{
  border-radius:50px;min-height:44px;font-weight:600;line-height:1.4;
  transition:background-color .16s,border-color .16s,box-shadow .16s;
}
.primary-button,.journal-turn{
  background:var(--brand-action);color:#fff;border:1px solid var(--brand-action);box-shadow:none;
}
.primary-button:enabled:hover,.journal-turn:enabled:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.secondary-button,.learning-gear,.game-viewtools button,.game-panbar button{
  background:var(--brand-soft);border-color:transparent;color:var(--brand-hover);
}
.secondary-button:enabled:hover,.learning-gear:enabled:hover,.game-viewtools button:enabled:hover,.game-panbar button:enabled:hover{
  background:#e0dfff;border-color:var(--brand);
}
.edit-button{background:#fff;border-color:var(--line);color:var(--ink);box-shadow:none}
.quiet-button,.text-button,.learning-text-button,.scene-screen .intro-back,.scene-motion-button,.scene-replay,
.game-footer .text-button{color:var(--brand-hover)}
.icon-button{width:44px;height:44px;background:var(--brand-soft);color:var(--brand-hover)}
.game-cameras button{background:#fff;color:var(--text-muted);border-color:var(--line)}
.game-cameras button[aria-pressed=true]{background:var(--brand-action);border-color:var(--brand-action);color:#fff}
.scene-motion-button[aria-pressed=true],.game-viewtools button[aria-pressed=true],
.risk-options [aria-pressed=true],.ladder-review-nav button[aria-pressed=true]{
  background:var(--brand-soft);color:var(--brand-hover);border-color:var(--brand-action);
}
.scene-motion-button{border-radius:50px}
.primary-button:disabled,.secondary-button:disabled,.journal-turn:disabled{opacity:1;background:#eef0f5;color:var(--text-muted);border:1px solid var(--line);box-shadow:none}

/* Light cover, original character and composition, editable cover colours. */
.cover{border:1px solid var(--line);box-shadow:var(--shadow-card);border-radius:16px}
.cover h1,.learner-view .cover h1{font-weight:600;letter-spacing:-.025em}
.brand-lockup{box-shadow:none;background:transparent;padding-inline:0}
.brand-lockup img{width:230px}
.cover .eyebrow,.cover .description,.start-hint,.cover-footer{opacity:1}
.cover .eyebrow{font-weight:600}
.cover .audience{background:#ffffffc9;border-color:var(--line);color:var(--ink);border-radius:50px}
.start-button{background:var(--brand-action);color:#fff;border-color:var(--brand-action);box-shadow:none;font-weight:600;min-height:48px}
.start-button:hover{background:var(--brand-hover);transform:none;box-shadow:0 5px 16px #575ad426}
.cover-link{text-decoration-color:currentColor}
.halo-one{background:#e7a71414;box-shadow:0 0 0 38px #6b6ee80a}
.halo-two{border-color:#6b6ee829;background:#6b6ee812}
.halo-orbit{border-color:#6b6ee845}
.blueprint{opacity:.2;background-image:linear-gradient(#6b6ee826 1px,transparent 1px),linear-gradient(90deg,#6b6ee826 1px,transparent 1px)}
.equipment{box-shadow:var(--shadow-card);border:1px solid var(--line)}
.equipment svg,.equipment-two svg{stroke:var(--brand-hover)}
.equipment-three svg{fill:var(--brand-soft)}
.equipment-one svg,.equipment-five svg{fill:#f5d675}
.equipment-four svg{stroke:var(--gold-ink)}
.cover-footer{background:transparent}
.footer-course{background:#fffffff0;border-radius:50px;padding:5px 9px}
.workbench-label,.workspace-note{color:var(--text-muted)}

/* Shared white shell and fixed panels, without changing pinning behaviour. */
.scene-screen.intro-screen,.office-screen,.learning-screen,.game-console{
  color:var(--ink);border-color:var(--line);background:var(--surface);box-shadow:var(--shadow-card);
}
.learning-screen{--learning-muted:var(--text-muted)}
.game-screen{--ink:#181830;--muted:var(--text-muted);--blue:var(--brand-action);--line:#d6ddec}
.intro-topbar,.office-topbar,.learning-topbar,.scene-footer,.office-footer,.lesson-footer,.instruction-footer,
.game-controls{border-color:var(--line);background:var(--surface)}
.game-panbar{background:var(--surface-soft)}
.scene-screen .intro-topbar h2,.office-topbar h2,.scene-footer-meta,.office-footer>p,
.speech-speaker,.actor-name,.actor-name small,.scene-loading,.game-status,.game-progress,.game-lead,
.game-feedback p:not(.game-eyebrow),.game-summary p:not(.game-eyebrow){color:var(--text-muted)}
.speech-bubble,.office-speech,.lesson-speech{border-color:#b9bbd1;box-shadow:var(--shadow-card)}
.speech-bubble[data-speaker]:before,.office-speech:after,.lesson-speech:before{border-color:#b9bbd1}
.speech-lead,.office-speech .speech-lead{color:var(--gold-ink)}
.speech-bubble[data-speaker=worker] .speech-lead{color:var(--brand-hover)}
.speech-line{color:var(--ink)}
.speech-speaker{font-size:12px}
.scene-footer-meta{font-size:12px}
.skip-entrance,.scene-retry,.skip-camera{background:#fff;color:var(--brand-hover);border-color:var(--line)}
.game-feedback,.game-summary{border-color:var(--line);border-radius:var(--radius-card)}
.game-eyebrow,.learning-kicker,.editor-kicker,.dialogue-speaker{color:var(--brand-hover)}

/* Course content: neutral reading surfaces, violet selection, gold notes. */
.learning-description,.lesson-small,.lesson-footer>p,.map-footer,.map-section-number,.map-section-detail,
.map-section-status,.module-topics li small,.lesson-function-figure figcaption,.workplace-item-state,
.foreman-drag-handle,.editor-intro,.intro-lead,label small,.field-help,output,.dialogue-progress,.dialogue-hint{color:var(--text-muted)}
.learning-heading h1{font-weight:600;letter-spacing:-.02em}
.lesson-detail,.lesson-info,.module-topics li,.risk-explanation,.foreman-ladder,.foreman-phase,
.workplace-stage,.workplace-person,.group-target,.workplace-item{
  background:var(--surface-soft);border-color:var(--line);border-radius:var(--radius-card);color:var(--ink);
}
.lesson-detail[open]{background:#fff;border-color:var(--brand)}
.lesson-detail-badge{background:var(--brand-soft);color:var(--brand-hover)}
.lesson-sources a,.risk-metric,.ladder-review-explanation h3,.module-topics li::before{color:var(--brand-hover)}
.lesson-briefing,.map-welcome,.instruction-demonstration{background:var(--gold-soft);border-color:var(--line)}
.lesson-callout,.lesson-draft,.module-preparation,.learning-save-warning{background:var(--gold-soft);color:var(--gold-ink);border-color:#dfc991}
.lesson-callout{border-left-color:var(--gold)}
.map-section{background:#fff;border-color:var(--line);color:var(--ink);border-radius:var(--radius-card)}
.map-section[data-state=available]{border-color:var(--brand);box-shadow:var(--shadow-card)}
.map-section[data-state=available] .map-section-status{color:var(--brand-hover)}
.map-section[data-state=available]:hover{box-shadow:0 8px 24px #575ad41c}
.map-section[data-state=available] .map-section-photo,.map-section[data-state=completed] .map-section-photo{filter:none;opacity:1}
.map-section-status{border-color:var(--line)}
.map-mentor>span,.instruction-dots li[aria-current]{background:var(--brand-action);border-color:var(--brand-action)}
.instruction-map-symbol{color:var(--brand-hover)}
.instruction-map-symbol span,.instruction-map-symbol i,.demo-slide{border-color:var(--line)}
.instruction-dots li{border-color:var(--brand)}
.phone-demo{border-color:var(--ink)}
.phone-demo span{background:var(--brand-soft)}
.phone-demo b{color:var(--brand-hover)}
.phone-demo i{background:var(--ink)}
.memo-open{color:var(--ink);border-color:var(--line);border-left-color:var(--brand);box-shadow:4px 6px 0 var(--brand-soft)}
.memo-open:hover{background:var(--surface-soft)}
.lesson-memo{color:var(--ink);border-color:var(--line)}
.preparation-journal{border-color:var(--line);border-left-color:var(--brand);box-shadow:5px 6px 0 var(--brand-soft)}
.permit-study{border-color:var(--line);border-top-color:var(--brand);background:#fff}
.lesson-function-figure{padding:12px;border:1px solid var(--line);border-radius:var(--radius-card);background:#fff}
.ladder-review-viewport,.m2-photo-window{border-color:var(--line);background:var(--surface-soft)}

/* Exercises retain the semantic success/warning colours and exact hit areas. */
.group-situation{border-color:var(--brand);background:var(--brand-soft);color:var(--ink)}
.group-target:enabled:hover,.workplace-item:enabled:hover{background:var(--brand-soft);border-color:var(--brand)}
.group-none{color:var(--text-muted);border-color:var(--line)}
.workplace-speech{background:var(--gold-soft);border-left-color:var(--gold)}
.workplace-panorama>span{color:var(--ink)}
.workplace-preparation>section,.workplace-empty,.foreman-checks,.foreman-check,.foreman-action{border-color:var(--line)}
.workplace-empty{color:var(--text-muted)}
.foreman-action select{background:#fff;color:var(--ink);border-color:#b9bbd1;border-radius:8px}
/* Preserve result specificity after the neutral card rules above. */
.group-target.is-correct,.workplace-item:disabled{background:#edf7f1;border-color:#39836a;color:#235b49}
.foreman-action[data-error=true]{border-color:#a35d16;background:#fff7ed}

/* Editor, course modal and feedback share the same visual language. */
dialog{color:var(--ink);background:#fff;border:1px solid var(--line);box-shadow:0 24px 90px #18183030}
dialog::backdrop,.lesson-memo::backdrop{background:#18183066}
.editor-dialog details,.course-topics li{border-color:var(--line)}
.editor-dialog label{color:var(--ink)}
.editor-dialog input:not([type=checkbox]):not([type=color]):not([type=range]),.editor-dialog textarea{color:var(--ink);background:var(--surface-soft);border-color:var(--line);border-radius:8px}
input::file-selector-button{background:var(--brand-soft);color:var(--brand-hover)}
.course-topics li:before{color:var(--brand-hover)}
.course-option{background:var(--surface-soft);border-color:var(--line)}
.course-option strong{color:var(--ink)}
.course-option small{color:var(--text-muted)}
.toast{background:var(--ink);border-radius:12px}

@media(max-width:700px){
  .brand-lockup img{width:210px;max-width:100%}
  .scene-footer-meta{font-size:11px}
  .lesson-function-figure{padding:8px}
}
@media(max-height:600px) and (orientation:landscape){.brand-lockup img{width:150px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* T28: readable labels and remaining first-generation blue UI are normalized
   here because theme.css is deliberately loaded after every scene stylesheet. */
.workbench-label,.quiet-button,.workspace-note,.cover .eyebrow,.cover .audience,.cover-link,.start-hint,.cover-footer,.footer-course,
.editor-kicker,label small,.field-help,output,.text-button,.course-topics li::before,.color-fields label,.save-status,
.dialogue-progress,.dialogue-hint,.person-tag small,.scene-footer-meta,.speech-speaker,
.actor-name,.actor-name small,.course-option small,.office-topbar h2,.office-footer>p,
.office-actions .primary-button,.office-actions .secondary-button,.office-speech .speech-speaker,
.game-eyebrow,.game-cameras small,.game-panbar,.game-panbar>span,.game-shot-label,.monitor-idle,.camera-label,
.camera-time,.camera-bottom-label{font-size:12px}
.editor-dialog input[type=file]{font-size:12px!important}
.scene-dialogue-controls .primary-button,.scene-dialogue-controls .secondary-button{font-size:12px}

/* Camera labels stay inside the image and scale with it, but never below 12 px. */
/* Reserve a clock-width and gap so the title wraps before reaching the time. */
.camera-label{font-size:clamp(12px,1.2vw,17px);right:calc(3% + 8ch + 8px);line-height:1.4;overflow-wrap:anywhere}
.camera-label>span:last-child{display:inline-block;margin-left:0;font-size:12px}
.camera-time{font-size:clamp(12px,1vw,14px);white-space:nowrap}
.camera-bottom-label{font-size:clamp(12px,.9vw,13px)}
.monitor-idle{font-size:clamp(12px,.65vw,12px)}

@media(max-width:700px) and (orientation:portrait){
  .scene-screen .intro-topbar h2,.scene-screen .intro-back,.scene-motion-button,.scene-replay,
  .office-topbar h2,.office-topbar .intro-back,.office-topbar .scene-motion-button,
  .office-actions .primary-button,.office-actions .secondary-button{font-size:12px}
  .actor-name{font-size:12px}.actor-name small{font-size:12px}
}
@media(max-height:600px) and (orientation:landscape){
  .scene-screen .intro-topbar h2,.scene-screen .intro-back,.scene-motion-button,.scene-replay,
  .speech-speaker,.actor-name,.actor-name small,.scene-footer-meta,.office-speech .speech-speaker,
  .office-footer>p,.office-actions .primary-button,.office-actions .secondary-button{font-size:12px}
}

/* T43: brand, copy and footer occupy their own rows, including zoom reflow.
   The artwork cannot cover the brand or the organization line. */
.cover{
  display:grid;grid-template-columns:minmax(0,55fr) minmax(0,45fr);
  grid-template-rows:auto 1fr auto;aspect-ratio:auto;height:auto;
  min-height:max(540px,calc(100svh - 124px));
}
.brand-lockup{
  grid-area:1/1;position:relative;top:auto;left:auto;z-index:5;
  width:fit-content;max-width:calc(100% - 48px);min-height:0;
  margin:28px 0 22px 9%;padding:8px 12px;background:var(--surface);
}
.brand-wordmark{font-size:12px;text-transform:uppercase;overflow-wrap:anywhere}
.cover-copy{
  grid-area:2/1;position:relative;top:auto;left:auto;width:auto;
  align-self:center;padding:0 0 28px 9%;min-width:0;
}
.cover-art{
  grid-area:1/2/3/3;position:relative;top:auto;right:auto;
  width:100%;height:auto;min-height:300px;margin:0;overflow:hidden;
}
.cover-footer{
  grid-area:3/1/4/-1;position:relative;bottom:auto;left:auto;right:auto;
  align-items:center;flex-wrap:wrap;padding:14px 5%;gap:8px 20px;
  color:var(--ink);background:var(--surface);min-width:0;
}
.cover-footer>span:first-child{max-width:100%;flex:1 1 240px;overflow-wrap:anywhere}
.footer-course{color:var(--ink);background:var(--surface);white-space:normal;text-align:left}
.cover .cover-link{min-width:44px;min-height:44px}
.cover .start-action{flex-wrap:wrap}
.cover .start-button{max-width:100%;min-width:0;gap:clamp(8px,3vw,34px);overflow-wrap:anywhere}
.cover #startLabel{min-width:0}
.blueprint,.cover-background{pointer-events:none}
.learner-view .cover{height:auto;min-height:100svh}
@media(max-width:700px){
  .cover{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(240px,1fr);min-height:0}
  .brand-lockup{margin:20px 24px;max-width:calc(100% - 48px)}
  .cover-copy{grid-area:2/1;padding:0 24px 20px;width:auto}
  .cover-art{grid-area:4/1;min-height:280px;height:280px;width:100%;margin:0}
  .cover-footer{grid-area:3/1;padding:14px 24px}
  .cover h1,.learner-view .cover h1{font-size:clamp(24px,7.5vw,38px)}
  .cover .start-action{gap:10px 16px;margin-top:20px}
  .cover .cover-secondary{flex-direction:row;flex-wrap:wrap}
  .brand-lockup img{max-width:100%}
  .workbench-actions{flex-wrap:wrap}
}
@media(min-width:701px) and (max-height:600px){
  .cover{min-height:335px}
  .brand-lockup{margin-block:16px}
  .cover-copy{padding-bottom:18px}
  .cover-footer{padding-block:10px}
}

/* T44: the learning shell follows the scene card; content remains module-owned. */
.learning-screen,.learner-view .learning-screen{
  max-width:1000px;margin-inline:auto;border-radius:18px;min-height:0;
  color:var(--ink);background:var(--surface);border-color:var(--line);box-shadow:var(--shadow-card);
}
.learning-topbar{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;min-height:56px;padding:6px 18px;border-color:var(--line);
}
.learning-topbar>#learningTitle{font-size:16px;font-weight:700;line-height:1.3;text-align:center;color:var(--ink);min-width:0;width:auto;order:0}
.learning-topbar .learning-text-button{display:inline-flex;align-items:center;gap:6px;font-size:14px;min-width:44px;min-height:44px;color:var(--brand-hover)}
.learning-top-actions{gap:12px;min-width:0}
.learning-shell-step{font-size:12px;gap:10px;white-space:normal;flex-wrap:wrap;justify-content:flex-end}
.learning-shell-step .scene-step-dots{flex-wrap:wrap;max-width:100%}
.learning-shell-step .scene-step-dots i.is-complete{background:var(--brand-action)}
.learning-topbar .learning-gear{width:44px;min-width:44px;height:44px;padding:9px;justify-content:center;flex-shrink:0;border-radius:var(--radius-card)}
.learning-topbar .learning-gear>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.learning-screen #instructionProgress,.learning-screen #lessonProgress,.learning-screen #m2Progress,.learning-screen #foremanProgress{display:none}
.learning-instructions,.learning-map,.learning-module,.learning-lesson{--shell-gutter:clamp(18px,4vw,40px);padding-inline:var(--shell-gutter);padding-bottom:0}
.learning-screen .learning-shell-footer{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  margin:24px calc(-1 * var(--shell-gutter,0px)) 0;
  padding:12px var(--shell-gutter,18px) max(18px,env(safe-area-inset-bottom,0px));
  background:var(--surface);border-top:1px solid var(--line);
}
.learning-screen .learning-footer-copy{display:flex;flex-direction:column;align-items:flex-start;gap:0;flex:1 1 180px;min-width:0}
.learning-footer-copy>p{font-size:14px;line-height:1.5;color:var(--text-muted);margin:0}
.learning-footer-copy .learning-text-button{font-size:12px;min-width:44px;min-height:44px;color:var(--brand-hover);text-decoration:underline;text-underline-offset:3px}
.learning-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.learning-footer-actions>div{display:contents}
.learning-screen .learning-shell-footer button{flex:0 0 auto;min-width:44px;min-height:44px;white-space:normal;overflow-wrap:anywhere}
.learning-footer-copy #learningToCover{width:auto;align-self:flex-start}
.learning-screen .learning-overview-footer{--shell-gutter:18px;margin-inline:0}
.learning-screen #instructionDots{display:none}
.learning-screen button:focus-visible{outline:3px solid var(--brand-hover);outline-offset:3px}
@media(max-width:700px){
  .learner-view .learning-screen{width:calc(100% - 24px);margin-block:12px}
  .learning-topbar{padding-inline:12px;gap:4px 8px}
  #learningBackLabel{display:none}
  .learning-top-actions{display:contents}
  .learning-topbar #learningGear{grid-column:3;grid-row:1}
  .learning-shell-step{grid-column:1/-1;grid-row:2;justify-content:center;padding-bottom:4px;text-align:center}
  .learning-screen .learning-footer-copy,.learning-footer-actions{width:100%;flex-basis:100%}
  .learning-footer-actions{flex-direction:column;align-items:stretch}
  .learning-screen .learning-footer-actions button{width:100%;flex:none}
  .learning-screen .learning-shell-footer{gap:8px}
}

/* T45: navigation illustrations, section map and programme share scene framing. */
.instruction-demonstration{display:block;background:transparent;border:0;min-height:0;padding:0;margin:24px 0}
.instruction-demo{gap:16px}
.instruction-scene{
  width:100%;max-width:760px;aspect-ratio:16/9;margin-inline:auto;
  position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;
  gap:clamp(12px,2vw,24px);padding:clamp(12px,3vw,32px);overflow:hidden;
  border:1px solid var(--line);border-radius:18px;background:var(--surface-soft);
}
.instruction-gear-illustration{width:clamp(56px,12vw,112px);height:clamp(56px,12vw,112px);flex-shrink:0;color:var(--brand-action)}
.instruction-scene .instruction-map-symbol{max-width:420px;color:var(--brand-hover)}
.instruction-scene .instruction-map-symbol span{width:clamp(24px,4vw,44px);height:clamp(24px,4vw,44px);font-size:clamp(12px,2vw,16px);border-color:var(--line);background:var(--surface)}
.instruction-scene .instruction-map-symbol i{border-color:var(--line)}
.instruction-demo>p{font-size:15px;color:var(--text-muted)}
.instruction-demo>p.learning-kicker{font-size:12px}
.instruction-scene .demo-slide{width:70%;max-width:360px;padding:clamp(10px,2vw,24px);background:var(--surface);border-color:var(--line);box-shadow:var(--shadow-card)}
.instruction-scene .demo-slide strong{font-size:clamp(15px,2vw,23px);margin:10px 0 12px}
.instruction-scene .demo-lines{background:repeating-linear-gradient(var(--line) 0 4px,transparent 4px 12px);height:28px}
.instruction-arrow{position:absolute;top:50%;transform:translateY(-50%);font-size:clamp(24px,4vw,48px);color:var(--brand-action)}
.instruction-arrow-before{left:4%}.instruction-arrow-after{right:4%}
.instruction-scene .phone-demo-space{position:absolute;inset:0;width:auto;height:auto}
.instruction-scene .phone-demo{width:18%;min-width:56px;max-width:140px;height:auto;aspect-ratio:93/158;border-color:var(--ink);background:var(--surface);box-shadow:var(--shadow-card)}
.instruction-scene .phone-demo i{width:25%;left:50%;transform:translateX(-50%);background:var(--ink)}
.instruction-scene .phone-demo b{inset:36% 0 auto;font-size:clamp(16px,2vw,23px);color:var(--brand-hover)}
.learning-map .map-sections{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:16px}
.map-section{flex-direction:column;border-radius:var(--radius-card);border-width:1px;background:var(--surface)}
.map-section-photo{height:auto;min-height:0;width:100%;aspect-ratio:16/9;background-size:cover}
.map-section-body{padding:18px;gap:12px}
.map-section-title{font-size:16px;color:var(--ink)}
.map-section-state{align-self:flex-start;font-size:12px;font-weight:700;line-height:1.5;padding:4px 10px;border:1px solid var(--line);border-radius:50px;background:var(--surface);color:var(--text-muted)}
.map-section[data-state=completed]{border-color:var(--brand-action);background:var(--brand-soft)}
.map-section[data-state=available] .map-section-state,.map-section[data-state=completed] .map-section-state{color:var(--brand-hover);border-color:var(--brand)}
.learning-module .module-topics{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;gap:16px}
.learning-module .module-topics>li{min-width:0;min-height:208px;padding:20px;background:var(--surface);border-color:var(--line);border-radius:var(--radius-card)}
.module-topics>li>div{display:flex;flex-direction:column;align-items:flex-start;gap:12px;flex:1;min-width:0}
.module-topics>li strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere}
.module-topics>li small,.module-topics>li p{font-size:14px;color:var(--text-muted);line-height:1.5;margin:0}
.module-topics>li button{margin-top:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.module-topics>li.module-exercise{background:var(--brand-soft)}
.module-topics>li.module-exercise::before{content:'↗'}
.module-exercise .learning-kicker{font-size:12px;margin:0}
@media(max-width:700px){
  .learning-map .map-sections,.learning-module .module-topics{grid-template-columns:minmax(0,1fr)}
  .map-section{flex-direction:column}
  .map-section-photo{height:auto;min-height:0;width:100%}
  .instruction-demo>button,.demo-arrows,.demo-arrows button{width:100%}
  .demo-arrows{flex-direction:column;gap:10px}
  .learning-module .module-topics>li{padding:18px}
}

/* T44.1: compact mobile panels reserve reading space; desktop layout is unchanged. */
.learning-navigation-menu{position:relative;flex-shrink:0}
.learning-navigation-menu>summary{display:grid;place-items:center;width:44px;height:44px;list-style:none;cursor:pointer;border-radius:var(--radius-card);background:var(--brand-soft);color:var(--brand-hover);font-size:24px}
.learning-navigation-menu>summary::-webkit-details-marker{display:none}
.learning-navigation-links{position:absolute;right:0;top:calc(100% + 4px);min-width:160px;padding:6px 12px;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface);box-shadow:var(--shadow-card);z-index:40}
.learning-navigation-menu:not([open]) .learning-navigation-links{display:none}
.learning-navigation-links .learning-text-button{white-space:nowrap}
@media(max-width:700px),(max-width:900px) and (max-height:450px){
  .learning-screen .learning-shell-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}
  .learning-screen .learning-footer-copy{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0}
  .learning-footer-copy>p{flex:1;min-width:0;font-size:14px;line-height:1.5}
  .learning-screen .learning-footer-copy>#workplaceRepeat,.learning-screen .learning-footer-copy>#foremanRepeat{order:2;width:auto;max-width:120px;min-height:44px;margin:0;padding:0 3px;font-size:12px;line-height:1.3;background:transparent;border:0;box-shadow:none;color:var(--brand-hover);text-decoration:underline;text-underline-offset:3px}
  .learning-screen .learning-footer-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;width:100%;min-width:0}
  .learning-screen .learning-footer-actions .primary-button,.learning-screen .learning-footer-actions .secondary-button{width:100%;min-width:0;min-height:44px;padding:7px 9px;font-size:12px;line-height:1.25}
  .learning-footer-actions #workplaceFinish,.learning-footer-actions>#mapReviewInstructions:only-child{grid-column:1/-1}
  .learning-topbar #learningBackLabel{display:none}
}
@media(max-width:700px){
  .learning-topbar{grid-template-columns:44px minmax(0,1fr) 44px 44px}
  .learning-navigation-menu{grid-column:4;grid-row:1}
  .learning-screen[data-mode=map] .learning-topbar{grid-template-columns:44px minmax(0,1fr) 44px}
  .learning-screen[data-mode=map] .learning-navigation-menu{grid-column:3}
}
@media(min-width:600px) and (max-width:900px) and (max-height:450px){
  .learning-screen .learning-shell-footer{grid-template-columns:minmax(0,1fr) minmax(240px,45%);align-items:center;gap:12px}
  .learning-topbar{grid-template-columns:44px minmax(0,1fr) auto;padding-inline:12px}
}

/* T46: lesson content uses the same framed scenes and reading surfaces. */
:is(#learningLesson,#learningModuleTwoLesson) .lesson-briefing{
  grid-template-columns:120px minmax(0,1fr);gap:20px;padding:20px;margin-bottom:24px;
  border:1px solid var(--line);border-radius:18px;background:var(--surface-soft);
}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-briefing>canvas{width:100%;height:auto;aspect-ratio:3/4;align-self:end;justify-self:start}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-speech{min-width:0;padding:20px;overflow-wrap:anywhere;background:var(--surface);border-color:var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-card)}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-speech::before{left:-7px;top:50%;width:12px;height:12px;transform:rotate(45deg);background:var(--surface);border-color:var(--line)}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-speech .learning-kicker{font-size:12px;letter-spacing:.08em}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-speech>p:last-child,:is(#learningLesson,#learningModuleTwoLesson) .lesson-body{font-size:16px;line-height:1.6}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-cards{gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}
:is(#learningLesson,#learningModuleTwoLesson) :is(.lesson-detail,.lesson-info){padding:20px;border-color:var(--line);border-radius:var(--radius-card);background:var(--surface)}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-detail summary{font-size:16px;min-height:44px;gap:12px}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-detail summary:focus-visible{outline:3px solid var(--brand-hover);outline-offset:3px}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-detail[open]{border-color:var(--brand)}
:is(#learningLesson,#learningModuleTwoLesson) :is(.lesson-function-figure,.m2-site){padding:0;margin:16px 0 24px;border:1px solid var(--line);border-radius:18px;background:var(--surface);overflow:hidden}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-media-frame{display:grid;place-items:center;width:100%;aspect-ratio:16/9;overflow:hidden;background:var(--surface-soft)}
:is(#learningLesson,#learningModuleTwoLesson) .lesson-media-frame>:is(svg,img){display:block;width:100%;height:100%;max-width:100%;max-height:none;margin:0;object-fit:contain;border:0;border-radius:0}
:is(#learningLesson,#learningModuleTwoLesson) :is(.lesson-function-figure,.m2-site)>figcaption{margin:0;padding:14px 18px;font-size:13px;line-height:1.6;color:var(--text-muted);border-top:1px solid var(--line)}
#learningModuleTwoLesson .m2-photo-window{width:100%;aspect-ratio:16/9;border:0;border-radius:0}
/* Keep the original desktop crop and annotation in the same normalized coordinates. */
#learningModuleTwoLesson .m2-site--workzone .m2-photo-window img{width:250%;height:auto;max-height:none;left:-102%;top:-119%}
#learningModuleTwoLesson .m2-zone-mark{left:35%;top:44%;width:33%;height:51%}
#learningModuleTwoLesson .m2-zone-note{font-size:13px;line-height:1.4}
:is(#learningLesson,#learningModuleTwoLesson) .preparation-journal{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
:is(#learningLesson,#learningModuleTwoLesson) .journal-page{padding:24px;background:var(--surface);box-shadow:none}
:is(#learningLesson,#learningModuleTwoLesson) .journal-navigation{padding:16px 20px;border-color:var(--line);gap:12px}
#learningLesson .memo-open{width:100%;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
.lesson-memo{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
#learningLesson .permit-study{padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
#learningLesson .ladder-review-viewport{width:100%;max-width:none;border-color:var(--line);border-radius:18px;background:var(--surface-soft)}
#learningLesson .ladder-steps{padding:20px;border-color:var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
#learningLesson .ladder-steps-text{font-size:16px}
@media(max-width:700px){
  :is(#learningLesson,#learningModuleTwoLesson) .lesson-briefing{grid-template-columns:72px minmax(0,1fr);padding:12px;gap:12px}
  :is(#learningLesson,#learningModuleTwoLesson) .lesson-speech{padding:14px 12px}
  :is(#learningLesson,#learningModuleTwoLesson) .lesson-cards{grid-template-columns:minmax(0,1fr)}
  :is(#learningLesson,#learningModuleTwoLesson) :is(.lesson-detail,.lesson-info){padding:16px}
  :is(#learningLesson,#learningModuleTwoLesson) .journal-page{padding:20px 16px}
  :is(#learningLesson,#learningModuleTwoLesson) .journal-navigation{padding:12px 16px}
  #learningLesson :is(.permit-study,.ladder-steps){padding:16px}
  #learningModuleTwoLesson .m2-zone-note{font-size:12px;right:8px;top:8px;padding:6px 8px}
}

/* T47: игры модуля 1 используют те же рамки, поверхности и размеры, что сцены и уроки. Геометрия и области нажатия не меняются. */
#learningLesson .group-situation{padding:20px 24px;border:1px solid var(--brand);border-radius:18px;background:var(--brand-soft);font-size:18px;line-height:1.55;box-shadow:var(--shadow-card)}
#learningLesson .group-situation[draggable=false]{border-color:var(--line);background:var(--surface-soft);box-shadow:none}
#learningLesson .group-targets{padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface-soft);gap:12px}
#learningLesson .group-target{min-height:260px;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface);color:var(--ink)}
#learningLesson .group-target:enabled:hover{border-color:var(--brand);background:var(--brand-soft)}
#learningLesson .group-target:enabled:focus-visible{outline:3px solid var(--brand-hover);outline-offset:3px}
#learningLesson .group-target.is-correct{border:2px solid #39836a;background:#edf7f1}
#learningLesson .group-none{border-color:var(--line);color:var(--text-muted)}
#learningLesson .group-feedback,#learningWorkplace .group-feedback,#learningForeman .group-feedback{border-radius:var(--radius-card);font-size:16px}
#learningLesson .group-feedback[data-result],#learningWorkplace .group-feedback[data-result],#learningForeman .group-feedback[data-result]{border:1px solid var(--line);border-left-width:4px;padding:14px 16px}
#learningLesson .group-feedback[data-result=wrong],#learningWorkplace .group-feedback[data-result=wrong],#learningForeman .group-feedback[data-result=wrong]{background:var(--gold-soft);border-color:#dfc991;color:var(--gold-ink)}
#learningLesson .group-feedback[data-result=correct],#learningWorkplace .group-feedback[data-result=correct],#learningForeman .group-feedback[data-result=correct]{background:#edf7f1;border-color:#a6cdbb;color:#215b47}

#learningWorkplace .workplace-speech{border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:var(--radius-card);background:var(--brand-soft);color:var(--ink)}
#learningWorkplace .workplace-stage{border:1px solid var(--line);border-radius:18px;background:var(--surface-soft);box-shadow:var(--shadow-card)}
#learningWorkplace .workplace-panorama{height:auto;aspect-ratio:16/6;min-height:150px}
#learningWorkplace .workplace-panorama>span{background:var(--surface);color:var(--ink);border-radius:999px;font-size:13px;padding:6px 14px;box-shadow:0 2px 10px #18183033}
#learningWorkplace .workplace-preparation>section{border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface)}
#learningWorkplace .workplace-person{background:var(--surface-soft);border-radius:var(--radius-card)}
#learningWorkplace .workplace-empty{border:1px dashed var(--line);border-radius:var(--radius-card);color:var(--text-muted)}
#learningWorkplace .workplace-item{min-height:195px;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface);color:var(--ink)}
#learningWorkplace .workplace-item:enabled:hover{border-color:var(--brand);background:var(--brand-soft)}
#learningWorkplace .workplace-item-note{border-radius:var(--radius-card);background:var(--gold-soft);color:var(--gold-ink);border-color:#dfc991}
#learningWorkplace .workplace-item-note[data-result=correct]{background:#edf7f1;color:#215b47;border-color:#a6cdbb}
#learningWorkplace .workplace-result{border:1px solid #a6cdbb;border-left-width:4px;border-radius:18px;background:#edf7f1;box-shadow:var(--shadow-card)}

#learningForeman .foreman-checks,#learningForeman .foreman-readiness,#learningForeman .foreman-ladder,#learningForeman .foreman-phase{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-card)}
#learningForeman .foreman-ladder,#learningForeman .foreman-readiness{background:var(--surface-soft)}
#learningForeman .foreman-ladder-frame{border:1px solid var(--line);border-radius:var(--radius-card)}
#learningForeman .foreman-action{border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface)}
#learningForeman .foreman-phase[data-foreman-phase=pool]{background:var(--surface-soft)}
#learningForeman .foreman-check{border-color:var(--line)}
#learningForeman .foreman-ladder-answers button,#learningForeman .foreman-ladder-nav button{min-height:44px}
@media(max-width:700px){
  #learningLesson .group-targets{padding:12px;gap:10px}
  #learningLesson .group-situation{padding:16px;font-size:16px}
  #learningWorkplace .workplace-panorama{aspect-ratio:16/9;min-height:0}
}
