/* =========================================================
   TerraNode 3D-hub — HUD (uk/en)
   ========================================================= */
* { box-sizing: border-box; }

/* Атрибут hidden має перемагати будь-який author-display.
   Без цього правила `#video-missing { display:flex }` перебиває hidden,
   і панель «Відео ще не завантажено» лишається видимою НАВІТЬ коли відео грає. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0d1420;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #e8eef7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* екран помилки (на етапі відлагодження) */
#crash {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 90;
  padding: 14px 18px;
  background: rgba(120, 20, 30, .92);
  border: 1px solid #ff6b6b;
  border-radius: 10px;
  font: 500 13px/1.5 Consolas, monospace;
  color: #fff;
  white-space: pre-wrap;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* ---------------- завантаження: обертальне кільце ---------------- */
/* Малюється одразу з HTML, до підключення модулів, і ховається лише
   після першого реально відмальованого кадру. */
#boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 45%, #16243a, #070b12 70%);
  transition: opacity .5s ease;
}
#boot.done {
  opacity: 0;
  pointer-events: none;
}
/* Якщо сцена так і не піднялася — прибираємо затемнення, щоб не ховати помилку */
#boot.gone { display: none; }

.boot-dial {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* саме кільце: верхня половина світла, нижня — приглушена, як у справжньому індикаторі */
.boot-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid rgba(120, 150, 190, .18);
  border-top-color: #4b8ef0;
  border-right-color: rgba(75, 142, 240, .55);
  animation: boot-spin 1.05s linear infinite;
}
/* друга, тонша кільцевая обвідка — обертається в протилежний бік */
.boot-dial::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid rgba(120, 150, 190, .12);
  border-bottom-color: rgba(75, 142, 240, .45);
  animation: boot-spin-back 2.1s linear infinite;
}
.boot-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4b8ef0;
  box-shadow: 0 0 16px rgba(75, 142, 240, .8);
  animation: boot-pulse 1.05s ease-in-out infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-spin-back { to { transform: rotate(-360deg); } }
@keyframes boot-pulse {
  0%, 100% { opacity: .35; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1); }
}
/* Не рухаємо анімацію у людей, які цього не просять */
@media (prefers-reduced-motion: reduce) {
  .boot-ring,
  .boot-dial::after,
  .boot-core { animation: none; }
}

.boot-logo {
  font: 800 26px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 3px;
  color: #dce7f5;
}
.boot-logo span { color: #4b8ef0; }
.boot-note {
  font: 500 13px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 1.5px;
  color: rgba(220, 231, 245, .55);
  min-height: 14px;
}

/* ---------------- перемикач мови ---------------- */
#lang-switch {
  position: fixed;
  right: 22px;
  top: 22px;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(12, 19, 30, .68);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  z-index: 30;
}
#lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font: 700 12px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 1.5px;
  color: #8ea3bd;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
#lang-switch button.active {
  background: linear-gradient(180deg, #4b8ef0, #2f6fd0);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 111, 208, .45);
}

/* ---------------- приціл ---------------- */
#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity .18s, transform .18s;
}
#crosshair::before, #crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 3px rgba(0, 0, 0, .6);
}
#crosshair::before { left: 12px; top: 0; width: 2px; height: 26px; }
#crosshair::after  { top: 12px; left: 0; height: 2px; width: 26px; }

body.aim-active #crosshair {
  opacity: 1;
  transform: scale(1.25);
}

/* ---------------- підказка обʼєкта ---------------- */
#prompt {
  position: fixed;
  left: 50%;
  bottom: 132px;
  transform: translate(-50%, 10px);
  padding: 12px 22px;
  background: rgba(12, 19, 30, .82);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s, transform .16s;
  max-width: 70vw;
}
#prompt.visible { opacity: 1; transform: translate(-50%, 0); }
#prompt-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
}
#prompt-hint {
  margin-top: 6px;
  font-size: 14px;
  color: #a9bcd4;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, .1);
  font: 600 12px/1.6 "Segoe UI", Arial, sans-serif;
  color: #fff;
}

/* ---------------- банер кімнати ---------------- */
#room-banner {
  position: fixed;
  left: 50%;
  top: 46px;
  transform: translate(-50%, -12px);
  padding: 14px 30px;
  background: rgba(12, 19, 30, .78);
  border: 2px solid #4b8ef0;
  border-radius: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#room-banner.visible { opacity: 1; transform: translate(-50%, 0); }
#room-banner-title { font-size: 24px; font-weight: 700; }
#room-banner-sub { margin-top: 4px; font-size: 14px; color: #a9bcd4; }

/* ---------------- мінікарта ---------------- */
#minimap-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 8px;
  background: rgba(12, 19, 30, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
#minimap { display: block; border-radius: 6px; }
.mm-caption {
  margin-top: 6px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7f93ad;
}

/* ---------------- службове ---------------- */
#stats {
  position: fixed;
  left: 20px;
  bottom: 20px;
  font: 500 12px/1 "Consolas", "SF Mono", monospace;
  color: rgba(255, 255, 255, .55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

#help {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 18px;
  background: rgba(12, 19, 30, .6);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  font-size: 12.5px;
  color: #b6c6da;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
#help b { color: #fff; }

#brand {
  position: fixed;
  left: 22px;
  top: 20px;
  font: 800 20px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
#brand span { color: #4b8ef0; }
#brand i {
  display: block;
  margin-top: 4px;
  font: 500 11px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 2px;
  font-style: normal;
  color: rgba(255, 255, 255, .6);
}

/* ---------------- затемнення ---------------- */
#fade {
  position: fixed;
  inset: 0;
  background: #05080e;
  opacity: 0;
  pointer-events: none;
  transition: opacity .85s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
#fade.visible { opacity: 1; }
#loading-label {
  font-size: 22px;
  font-weight: 600;
  color: #cfdcec;
  letter-spacing: .3px;
}

/* ---------------- оверлеї ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(20, 38, 62, .82), rgba(5, 9, 16, .94));
  backdrop-filter: blur(5px);
  z-index: 40;
  padding: 24px;
}
.overlay.visible { display: flex; }

/* Тонка векторна схема заповнює вільну верхню частину стартового екрана.
   На сенсорних пристроях і вузьких вікнах її немає — картка входу не змінюється. */
#overlay-intro { isolation: isolate; }
#intro-geodesy-art {
  position: absolute;
  z-index: 0;
  top: 2.5vh;
  left: 50%;
  width: min(1180px, 96vw);
  height: min(26vh, 280px);
  transform: translateX(-50%);
  opacity: .84;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, .13));
}
#intro-geodesy-art img { display:block; width:100%; height:100%; object-fit:contain; }
#overlay-intro .panel { position:relative; z-index:1; }
@media (max-width: 720px) {
  #intro-geodesy-art { display:none; }
}
body.touch #intro-geodesy-art { display:none !important; }

.panel {
  width: min(620px, 92vw);
  padding: 38px 42px;
  background: linear-gradient(160deg, rgba(24, 36, 54, .96), rgba(14, 21, 33, .96));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  text-align: center;
}
.panel.small { width: min(420px, 92vw); padding: 30px 34px; }
.panel.wide { width: min(760px, 94vw); padding: 30px 30px 22px; }

.logo {
  font: 800 34px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.logo span { color: #4b8ef0; }

.panel h1 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.35;
}
.panel h2 { margin: 0 0 14px; font-size: 20px; font-weight: 650; }
.panel p {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #a9bcd4;
}
.panel .hint { margin-top: 16px; font-size: 12.5px; color: #7f93ad; }

button.primary {
  appearance: none;
  border: 0;
  padding: 14px 34px;
  font: 650 16px/1 "Segoe UI", Arial, sans-serif;
  color: #fff;
  background: linear-gradient(180deg, #4b8ef0, #2f6fd0);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(47, 111, 208, .45);
  transition: transform .12s, box-shadow .12s;
}
button.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(47, 111, 208, .55); }
button.primary:active { transform: translateY(1px); }

button.ghost {
  appearance: none;
  margin-top: 16px;
  padding: 10px 26px;
  font: 500 14px/1 "Segoe UI", Arial, sans-serif;
  color: #b6c6da;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  cursor: pointer;
}
button.ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* ---------------- відео-оверлей ---------------- */
#video-overlay { z-index: 60; padding: 24px; }
.video-frame {
  position: relative;
  width: min(960px, 96vw);
  background: rgba(8, 14, 22, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
#video-title-bar {
  padding: 14px 56px 14px 24px;
  font: 700 18px/1.2 "Segoe UI", Arial, sans-serif;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(75,142,240,.16), transparent);
}
#video-player {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #000;
}
#video-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px 56px;
  text-align: center;

}
#video-missing h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
#video-missing p {
  margin: 0 0 24px;
  max-width: 480px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #a9bcd4;
}
#video-missing .video-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
#video-missing .video-actions .ghost { margin-top: 0; }
#video-close-x {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .12s;
}
#video-close-x:hover { background: rgba(255, 255, 255, .2); }

/* ---------------- список розділів ---------------- */
#menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 8px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}
.menu-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
  text-align: left;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  color: #e2eaf5;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s, transform .12s;
}
.menu-item:hover {
  background: rgba(75, 142, 240, .16);
  border-color: rgba(75, 142, 240, .5);
  transform: translateX(2px);
}
.menu-item .dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mi-title { font-size: 14.5px; font-weight: 600; }
.mi-sub { font-size: 12px; color: #8ea3bd; }

#menu-list::-webkit-scrollbar { width: 8px; }
#menu-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border-radius: 4px;
}

/* ---------------- сенсорні контроли ---------------- */
#touch-controls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 35;
}
body.touch #touch-controls { display: block; }

#touch-joystick {
  position: absolute;
  left: 28px;
  bottom: 32px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(12, 19, 30, .55);
  border: 2px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  touch-action: none;
}
#touch-joystick-knob {
  position: absolute;
  left: 50%; top: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4b8ef0, #2f6fd0);
  box-shadow: 0 6px 18px rgba(47, 111, 208, .55);
  transition: transform .05s linear;
  pointer-events: none;
}

#touch-action,
#touch-menu,
#touch-pause {
  position: absolute;
  width: 78px; height: 78px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  background: rgba(12, 19, 30, .55);
  color: #fff;
  font: 800 28px/1 "Segoe UI", Arial, sans-serif;
  pointer-events: auto;
  touch-action: none;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#touch-action { right: 32px; bottom: 130px; font-size: 30px; background: linear-gradient(180deg, #4b8ef0, #2f6fd0); }
#touch-menu   { right: 130px; bottom: 32px; font-size: 36px; }
#touch-pause  { right: 32px; bottom: 32px; font-size: 22px; }

@media (max-width: 720px) {
  #help { display: none; }
  #minimap-wrap { transform: scale(.82); transform-origin: bottom right; }
  #brand i { display: none; }
  #lang-switch { right: 16px; top: 16px; }
}

/* ---------------- тач-запити ---------------- */
body.touch #help { display: none; }
body.touch #crosshair { display: none; }
body.touch #stats { font-size: 11px; left: 12px; bottom: 12px; }
body.touch #minimap-wrap { display: none; }
/* ---------------- оверлей зворотного звʼязку ---------------- */
#feedback-overlay { z-index: 70; padding: 24px; }

.fb-frame {
  position: relative;
  width: min(560px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 34px 36px 30px;
  background: linear-gradient(160deg, rgba(24, 36, 54, .97), rgba(13, 20, 31, .97));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), 0 0 0 1px rgba(120, 180, 255, .06) inset;
}

.fb-x {
  position: absolute;
  right: 14px; top: 12px;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #a9bcd4;
  font: 400 22px/1 "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.fb-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.fb-head { text-align: center; margin-bottom: 22px; }
.fb-at {
  font: 800 30px/1 "Segoe UI", Arial, sans-serif;
  color: #f5c451;
  text-shadow: 0 0 18px rgba(245, 196, 81, .55);
  margin-bottom: 10px;
}
.fb-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .3px;
}
.fb-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #a9bcd4;
}

.fb-form { display: flex; flex-direction: column; gap: 15px; }

.fb-field { display: flex; flex-direction: column; gap: 7px; }
.fb-field label {
  font: 600 12px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #8ea3bd;
}
.fb-field input,
.fb-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: 400 15px/1.4 "Segoe UI", Arial, sans-serif;
  color: #e8eef7;
  background: rgba(8, 14, 22, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.fb-field textarea { min-height: 112px; resize: vertical; }
.fb-field input::placeholder,
.fb-field textarea::placeholder { color: #64768e; }
.fb-field input:focus,
.fb-field textarea:focus {
  border-color: #4b8ef0;
  box-shadow: 0 0 0 3px rgba(75, 142, 240, .18);
}
.fb-field.bad input,
.fb-field.bad textarea { border-color: #ff6b6b; }

.fb-err {
  display: none;
  font-size: 12px;
  color: #ff8b8b;
}
.fb-field.bad .fb-err { display: block; }

.fb-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}
.fb-actions button.primary { padding: 13px 30px; font-size: 15px; }
.fb-actions button.ghost { margin-top: 0; }

.fb-done { display: none; text-align: center; padding: 10px 0 4px; }
.fb-done.show { display: block; }
.fb-done-icon {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 14px;
  color: #6fd08c;
  text-shadow: 0 0 22px rgba(111, 208, 140, .45);
}
.fb-done-icon.err { color: #ff8b8b; text-shadow: 0 0 22px rgba(255, 139, 139, .4); }
.fb-done h2 { margin: 0 0 10px; font-size: 21px; font-weight: 650; }
.fb-done p { margin: 0 0 22px; font-size: 14px; line-height: 1.65; color: #a9bcd4; }

@media (max-width: 720px) {
  .fb-frame { padding: 28px 22px 24px; }
}

/* ---------------- оверлей лекції ---------------- */
#lecture-overlay { z-index: 65; padding: 24px; }

.lc-frame {
  position: relative;
  width: min(900px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 36px 25px;
  background: linear-gradient(145deg, rgba(16, 27, 44, .99), rgba(7, 14, 25, .99));
  border: 1px solid color-mix(in srgb, var(--lc-accent, #4b8ef0) 30%, transparent);
  border-radius: 24px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .74), 0 0 70px color-mix(in srgb, var(--lc-accent, #4b8ef0) 10%, transparent), 0 0 0 1px rgba(120, 180, 255, .06) inset;
}

.lc-head { margin-bottom: 20px; }
.lc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lc-badge {
  font: 700 12px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #08111d;
  background: var(--lc-accent, #4b8ef0);
  padding: 7px 12px;
  border-radius: 8px;
}
.lc-part {
  font: 500 12.5px/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: .6px;
  color: #8ea3bd;
}
.lc-head h2 {
  margin: 0;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 650;
  line-height: 1.25;
  color: #f2f6fc;
}

.lc-body { margin-top: 22px; }
.lc-slide-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--lc-accent, #4b8ef0) 17%, transparent), transparent 48%),
    linear-gradient(145deg, rgba(24,39,60,.94), rgba(11,19,32,.96));
  box-shadow: 0 18px 50px rgba(0,0,0,.24), 0 1px 0 rgba(255,255,255,.04) inset;
}
.lc-slide-stage::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  right: -120px; bottom: -130px;
  border: 1px solid color-mix(in srgb, var(--lc-accent, #4b8ef0) 27%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 22px color-mix(in srgb, var(--lc-accent, #4b8ef0) 4%, transparent), 0 0 0 46px color-mix(in srgb, var(--lc-accent, #4b8ef0) 3%, transparent);
  pointer-events: none;
}
.lc-slide-rail { display:flex; align-items:center; gap:12px; margin-bottom:28px; position:relative; z-index:1; }
.lc-slide-index { color:var(--lc-accent,#4b8ef0); font:800 13px/1 "Segoe UI",Arial,sans-serif; letter-spacing:1.3px; }
.lc-slide-rail-line { height:1px; width:42px; background:color-mix(in srgb,var(--lc-accent,#4b8ef0) 55%,transparent); }
.lc-slide-count { color:#7488a2; font:700 11px/1 "Segoe UI",Arial,sans-serif; letter-spacing:1px; }
.lc-slide-kicker { margin-left:auto; color:#8295ad; font:700 10px/1 "Segoe UI",Arial,sans-serif; letter-spacing:1.6px; text-transform:uppercase; }
.lc-slide-content { position:relative; z-index:1; }
.lc-slide-content.is-entering { animation: lc-slide-in .28s ease both; }
@keyframes lc-slide-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.lc-slide-title { max-width:720px; margin:0 0 16px; color:#f5f8ff; font-size:clamp(25px,4.1vw,39px); font-weight:720; line-height:1.14; letter-spacing:-.7px; }
.lc-slide-text { max-width:70ch; margin:0; color:#c4d1e2; font-size:clamp(15px,1.8vw,17px); line-height:1.78; }
.lc-slide-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:10px; margin-top:27px; }
.lc-slide-steps[hidden], .lc-slide-table[hidden] { display:none; }
.lc-slide-step { min-height:74px; display:flex; align-items:center; gap:11px; padding:13px 14px; border:1px solid rgba(255,255,255,.09); border-radius:13px; background:rgba(255,255,255,.045); color:#e0e9f6; font-size:13px; line-height:1.42; }
.lc-slide-step-num { flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:color-mix(in srgb,var(--lc-accent,#4b8ef0) 17%,transparent); color:var(--lc-accent,#4b8ef0); font:800 10px/1 "Segoe UI",Arial,sans-serif; }
.lc-slide-table { position:relative; z-index:2; margin-top:22px; }
.lc-table-caption { margin:0 0 8px; color:var(--lc-accent,#4b8ef0); font:700 10px/1.3 "Segoe UI",Arial,sans-serif; letter-spacing:1.2px; text-transform:uppercase; }
.lc-table-scroll { overflow:auto; max-width:100%; -webkit-overflow-scrolling:touch; touch-action:pan-x pan-y; border:1px solid rgba(255,255,255,.13); border-radius:12px; background:rgba(4,10,18,.48); }
.lc-example-grid { width:100%; min-width:790px; border-collapse:collapse; color:#d6e2f0; font:500 10px/1.4 "Segoe UI",Arial,sans-serif; }
.lc-example-grid th,.lc-example-grid td { padding:8px 9px; border-right:1px solid rgba(255,255,255,.07); border-bottom:1px solid rgba(255,255,255,.07); text-align:left; white-space:nowrap; }
.lc-example-grid th { color:#a9bbd2; background:color-mix(in srgb,var(--lc-accent,#4b8ef0) 12%,rgba(10,18,30,.9)); font-weight:700; }
.lc-example-grid td:first-child { color:#fff; font-weight:700; }
.lc-slide-bottom { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:27px; }
.lc-progress-track { flex:1; max-width:200px; height:3px; overflow:hidden; border-radius:4px; background:rgba(255,255,255,.11); }
.lc-progress-track span { display:block; width:0; height:100%; border-radius:inherit; background:var(--lc-accent,#4b8ef0); box-shadow:0 0 12px var(--lc-accent,#4b8ef0); transition:width .25s ease; }
.lc-slide-controls { display:flex; align-items:center; gap:12px; }
.lc-slide-dots { display:flex; align-items:center; gap:7px; }
.lc-slide-dot { width:7px; height:7px; padding:0; border:0; border-radius:10px; background:rgba(206,220,238,.3); cursor:pointer; transition:all .2s ease; }
.lc-slide-dot.active { width:23px; background:var(--lc-accent,#4b8ef0); box-shadow:0 0 12px color-mix(in srgb,var(--lc-accent,#4b8ef0) 55%,transparent); }
.lc-step-btn { min-width:42px; min-height:36px; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 12px; border:1px solid rgba(255,255,255,.13); border-radius:10px; background:rgba(255,255,255,.055); color:#dce7f5; font:650 12px/1 "Segoe UI",Arial,sans-serif; cursor:pointer; transition:all .18s ease; }
.lc-step-btn:hover:not(:disabled) { border-color:var(--lc-accent,#4b8ef0); color:#fff; background:color-mix(in srgb,var(--lc-accent,#4b8ef0) 15%,transparent); }
.lc-step-btn:disabled { opacity:.35; cursor:default; }
.lc-step-btn:focus-visible,.lc-slide-dot:focus-visible { outline:2px solid var(--lc-accent,#4b8ef0); outline-offset:3px; }

.lc-note {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 13px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: #c9d6e6;
}
.lc-note[hidden] { display: none; }
.lc-note-k {
  flex: 0 0 auto;
  font: 700 11px/1.4 "Segoe UI", Arial, sans-serif;
  letter-spacing: .9px;
  text-transform: uppercase;
}
.lc-tip { border-color: rgba(111, 208, 140, .28); background: rgba(111, 208, 140, .08); }
.lc-tip .lc-note-k { color: #6fd08c; }
.lc-warn { border-color: rgba(240, 170, 80, .30); background: rgba(240, 170, 80, .09); }
.lc-warn .lc-note-k { color: #f0aa50; }

.lc-hint {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #6d8099;
  font-style: italic;
}

.lc-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}
.lc-actions button { margin-top: 0; }

@media (max-width: 720px) {
  #lecture-overlay { padding:10px; }
  .lc-frame { width:100%; max-height:96dvh; padding:26px 17px 18px; border-radius:18px; }
  .lc-body { margin-top:16px; }
  .lc-slide-stage { min-height:0; padding:20px 16px 17px; border-radius:16px; }
  .lc-slide-rail { margin-bottom:22px; }
  .lc-slide-title { margin-bottom:12px; font-size:clamp(23px,7vw,31px); }
  .lc-slide-text { font-size:14px; line-height:1.67; }
  .lc-slide-steps { grid-template-columns:1fr; gap:7px; margin-top:19px; }
  .lc-slide-step { min-height:0; padding:10px 11px; }
  .lc-slide-bottom { margin-top:20px; gap:8px; }
  .lc-slide-controls { gap:8px; }
  .lc-step-btn { min-height:38px; padding:0 9px; font-size:11px; }
  .lc-slide-dots { gap:5px; }
  .lc-actions { margin-top:15px; gap:8px; }
  .lc-actions button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-slide-content.is-entering { animation:none; }
  .lc-progress-track span,.lc-slide-dot,.lc-step-btn { transition:none; }
}
