@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300;
  src: url("../../webFonts/Roboto/roboto-v49-latin_latin-ext-300.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url("../../webFonts/Roboto/roboto-v49-latin_latin-ext-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 300;
  src: url("../webfonts/RobotoCondensed/roboto-condensed-v31-latin_latin-ext-300.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 400;
  src: url("../webfonts/RobotoCondensed/roboto-condensed-v31-latin_latin-ext-regular.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --soft: #e7eaf0;
  --line: #d4d8e1;
  --text: #2a3040;
  --muted: #687080;
  --accent: #222738;
  --left-guide: #608b9e;
  --right-guide: #263044;
  --vertical-guide: #707887;
  --edge: #222738;
  --panel: rgba(248, 250, 252, 0.74);
  --shadow: 0 18px 42px rgba(20, 32, 44, 0.11);
  --sans: "Roboto Condensed", Arial, sans-serif;
  --plain: "Roboto", Arial, sans-serif;
  /* Project rule: chapter headings always use M PLUS Rounded 1c Light. */
  --heading: "M PLUS Rounded 1c", var(--plain);
  --heading-weight: 300;
  --heading-strong-weight: 400;
  --heading-stroke-width: 0.22px;
  --chapter-heading-size: clamp(26px, 1.84vw, 33px);
  --chapter-heading-size-ipad: 36px;
  --chapter-heading-line-height: 1.18;
  --round-control-bg: rgba(255, 255, 255, 0.68);
  --round-control-border: rgba(255, 255, 255, 0.92);
  --round-control-hover: #ffe84b;
  --round-control-hover-border: transparent;
  --round-control-ink: #222738;
  --round-control-scale: 1.16;
  --round-control-motion: 170ms cubic-bezier(0.2, 0.75, 0.25, 1);
  --round-control-shadow: 0 3px 8px rgba(34, 39, 56, 0.14);
  --round-control-shadow-hover: 0 4px 10px rgba(34, 39, 56, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: #ede9e4;
}

body {
  margin: 0;
  color: var(--text);
  background: #ede9e4;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
}

:is(
  .basics-lesson-kicker,
  .basics-vanishing-copy h2,
  .ellipse-construction-copy h2,
  .modeling-profile-copy h2,
  .bust-title
) {
  color: #000;
  font-family: var(--heading);
  font-size: var(--chapter-heading-size);
  font-weight: var(--heading-weight);
  line-height: var(--chapter-heading-line-height);
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke: var(--heading-stroke-width) currentColor;
  paint-order: stroke fill;
}

html.is-ipad :is(
  .basics-lesson-kicker,
  .basics-vanishing-copy h2,
  .ellipse-construction-copy h2,
  .modeling-profile-copy h2,
  .bust-title
) {
  font-size: var(--chapter-heading-size-ipad);
}

:is(
  .startup-sound-panel .startup-sound-intro-title,
  .intro-title-geometry-heading,
  .modeling-material-popup-title,
  .bust-step-number,
  .bust-information .bust-step-title
) {
  -webkit-text-stroke: var(--heading-stroke-width) currentColor;
  paint-order: stroke fill;
}

:is(
  .intro,
  .basics-vanishing-copy,
  .ellipse-construction-copy,
  .modeling-profile-copy,
  .bust-information,
  .lesson-note
) :is(h1, h2, h3, p, li) {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
.handle-group:focus-visible,
.horizon-hit:focus-visible,
.front-edge-hit:focus-visible,
.object-hit-line:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 86px;
  padding: 0 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0;
  background: #22232a;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

.brand {
  position: relative;
  display: block;
  width: 200px;
  height: 86px;
  color: inherit;
  line-height: 1;
  text-decoration: none;
}

.brand-logo {
  position: absolute;
  left: 0;
  top: 50%;
  width: 200px;
  height: auto;
  margin: 0;
  transform: translateY(-58%);
  filter: brightness(0) invert(1);
}

.brand-logo[src=""],
.brand-logo:not([src]) {
  display: none;
}

.brand-fallback {
  display: none;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.brand-logo[src=""] + .brand-fallback {
  display: block;
}

.brand-subtitle {
  position: absolute;
  left: 0;
  top: 54px;
  width: 200px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-subtitle span {
  display: inline-block;
  margin: 0 1px;
  font-size: 12px;
}

.lesson-menu-button {
  display: none;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff !important;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fullscreen-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  cursor: pointer;
  transition: color 160ms ease;
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible,
.fullscreen-button.is-active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.fullscreen-button .dock-icon {
  width: 20px;
  height: 20px;
}

@media (min-width: 1051px) {
  .fullscreen-button {
    position: relative;
    left: 38px;
  }
}

.fullscreen-exit-path {
  display: none;
}

.fullscreen-button.is-active .fullscreen-enter-path {
  display: none;
}

.fullscreen-button.is-active .fullscreen-exit-path {
  display: block;
}

body.is-pseudo-fullscreen .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.is-pseudo-fullscreen .site-header > :not(.header-actions),
body.is-pseudo-fullscreen .header-actions > :not(.fullscreen-button) {
  display: none;
}

body.is-pseudo-fullscreen .header-actions {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 201;
}

body.is-pseudo-fullscreen .lesson-mode .workspace,
body.is-pseudo-fullscreen .canvas-scroll.is-three-scene,
body.is-pseudo-fullscreen .three-canvas-layer,
body.is-pseudo-fullscreen .lesson-mode .lesson-svg {
  height: 100dvh;
  min-height: 0;
}

html.is-ipad body.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-ipad body:not(.is-fullscreen-active) {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-ipad .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.is-ipad .site-header > :not(.header-actions),
html.is-ipad body:not(.is-fullscreen-active) .header-actions > :not(.language-switch):not(.header-voice-button):not(.fullscreen-button) {
  display: none;
}

html.is-ipad body:not(.is-fullscreen-active) .site-header > .brand {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  display: block;
  width: 192px;
  height: 42px;
  overflow: hidden;
}

html.is-ipad body:not(.is-fullscreen-active) .brand-logo {
  top: calc(50% + 2px);
  width: 192px;
  transform: translateY(-57%);
  filter: none;
}

html.is-ipad body:not(.is-fullscreen-active) :is(.brand-subtitle, .brand-fallback) {
  display: none !important;
}

html.is-ipad .header-actions {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 201;
}

html.is-ipad body:not(.is-fullscreen-active) .header-voice-button:not([hidden]) {
  display: grid;
}

html.is-ipad body:not(.is-fullscreen-active) .language-switch {
  display: inline-flex;
}

html.is-ipad .dock-button {
  font-weight: 500;
}

@media (min-width: 761px) {
  html.is-ipad .lesson-sidebar {
    top: 84px;
  }
}

html.is-ipad body:not(.is-fullscreen-active) .app-shell,
html.is-ipad body:not(.is-fullscreen-active) .lesson-mode .workspace,
html.is-ipad body:not(.is-fullscreen-active) .canvas-scroll.is-three-scene,
html.is-ipad body:not(.is-fullscreen-active) .three-canvas-layer,
html.is-ipad body:not(.is-fullscreen-active) .lesson-mode .lesson-svg {
  height: 100dvh;
  min-height: 0;
}

@media (orientation: landscape) {
  html.is-ipad body.is-fullscreen-active .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 200;
    height: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    backdrop-filter: none;
  }

  html.is-ipad body.is-fullscreen-active .site-header > :not(.header-actions),
  html.is-ipad body.is-fullscreen-active .header-actions > :not(.language-switch):not(.header-voice-button):not(.fullscreen-button) {
    display: none;
  }

  html.is-ipad body.is-fullscreen-active .header-actions {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 201;
  }

  html.is-ipad body.is-fullscreen-active .header-voice-button:not([hidden]) {
    display: grid;
  }

  html.is-ipad body.is-fullscreen-active .language-switch {
    display: inline-flex;
  }

  html.is-ipad body.is-fullscreen-active .app-shell,
  html.is-ipad body.is-fullscreen-active .lesson-mode .workspace {
    height: 100dvh;
    min-height: 0;
  }

  html.is-ipad body.is-fullscreen-active .lesson-mode .workspace {
    box-sizing: border-box;
    padding-top: 24px;
  }

  html.is-ipad body.is-fullscreen-active .lesson-mode .canvas-scroll,
  html.is-ipad body.is-fullscreen-active .canvas-scroll.is-three-scene,
  html.is-ipad body.is-fullscreen-active .three-canvas-layer,
  html.is-ipad body.is-fullscreen-active .lesson-mode .lesson-svg {
    height: calc(100dvh - 24px);
    min-height: 0;
  }
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.language-switch button {
  min-width: 0;
  height: auto;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  transition: color 150ms ease;
}

.language-switch button:hover {
  background: transparent;
  color: #fff;
}

.language-switch button.is-active {
  background: transparent;
  color: #fff;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}

.lesson-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  height: calc(100vh - 84px);
  padding: 28px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fff;
}

.home-button,
.lesson-link {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: var(--plain);
  font-size: 13px;
  line-height: 1.22;
}

.home-button {
  margin-bottom: 18px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(34, 39, 56, 0.16);
}

.lesson-section {
  margin-top: 22px;
}

.lesson-section-title {
  margin: 0 0 8px;
  color: #6b6863;
  font-family: var(--plain);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-list {
  display: grid;
  gap: 4px;
}

.lesson-link:hover,
.lesson-link.is-active {
  background: rgba(34, 39, 56, 0.1);
}

.lesson-link.is-active {
  color: #222738;
  font-weight: 400;
}

.lesson-soon {
  padding: 6px 10px;
  color: #8a8782;
  font-family: var(--plain);
  font-size: 12px;
}

.lesson-content {
  min-width: 0;
  padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 36px) 70px;
}

.lesson-content:focus,
.lesson-content:focus-visible {
  outline: none;
}

.lesson-content.lesson-mode {
  position: relative;
  padding: 0 0 56px;
}

.intro {
  max-width: 620px;
  min-height: 83px;
  margin-bottom: 16px;
}

.lesson-mode .intro {
  position: absolute;
  top: 42px;
  left: clamp(14px, 3vw, 36px);
  z-index: 8;
  max-width: 420px;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}

.lesson-mode .intro h1 {
  margin-bottom: 14px;
}

.lesson-mode .intro p {
  max-width: 390px;
}

h1 {
  margin: 0 0 8px;
  color: #232633;
  font-size: clamp(22px, 2.7vw, 30px);
  font-weight: 300;
  line-height: 1.08;
}

.intro p,
.explanation p,
.overview-intro {
  margin: 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.workspace {
  position: relative;
  display: block;
  width: 100%;
}

.lesson-mode .workspace {
  --workspace-sky-gradient: radial-gradient(circle at calc(28% + 200px) calc(12% + 200px), rgba(255, 255, 255, 0.52), transparent 42%);
  min-height: calc(100vh - 86px);
  overflow: hidden;
  background:
    var(--workspace-sky-gradient),
    #ede9e4;
}

.lesson-mode .workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    repeating-linear-gradient(0deg, rgba(80, 70, 58, 0.035) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(80, 70, 58, 0.025) 0 1px, transparent 1px 7px);
}

.canvas-scroll {
  position: relative;
  overflow-x: auto;
  padding: 0 0 12px;
  overscroll-behavior-x: contain;
  background: #d4dce6;
}

.lesson-mode .canvas-scroll {
  z-index: 1;
  padding: 0;
  background: transparent;
}

.canvas-scroll.is-three-scene {
  overflow: hidden;
  min-height: calc(100vh - 86px);
}

.lesson-svg {
  display: block;
  width: 100%;
  min-width: 820px;
  margin: 0 auto;
  height: auto;
  aspect-ratio: 5 / 3;
  overflow: visible;
  touch-action: none;
}

.lesson-mode .lesson-svg {
  height: calc(100vh - 86px);
  min-height: 640px;
  min-width: 960px;
}

.canvas-scroll.is-three-scene .lesson-svg {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: calc(100vh - 86px);
  min-width: 0;
  min-height: 0;
  background: transparent;
  cursor: grab;
}

.canvas-scroll.is-three-scene .lesson-svg:active {
  cursor: grabbing;
}

.startup-sound-prompt {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(247, 244, 238, 0.12);
}

.startup-sound-prompt[hidden] {
  display: none;
}

.startup-sound-prompt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.startup-sound-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 44px));
  min-height: min(495px, calc(100vh - 44px));
  padding: 58px 36px 32px;
  border: 1px solid rgba(34, 39, 56, 0.08);
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 16px 58px rgba(37, 33, 28, 0.22);
  color: #222738;
  font-family: var(--plain);
  text-align: center;
  overflow: hidden;
}

.startup-sound-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.startup-sound-panel > * {
  position: relative;
  z-index: 1;
}

.startup-sound-choice {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
}

.startup-sound-wave {
  display: block;
  width: 204px;
  height: 38px;
  margin: 0 auto 14px;
  overflow: visible;
}

.startup-sound-wave-line {
  fill: none;
  stroke: #222738;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.startup-sound-wave-line-main {
  opacity: 0.76;
}

.startup-sound-wave-line.is-main {
  opacity: 0.78;
}

.startup-sound-wave-line.is-secondary {
  opacity: 0.42;
}

.startup-sound-wave-line.is-soft {
  opacity: 0.28;
}

.startup-sound-panel:has(.startup-sound-actions.is-off) .startup-sound-wave-line {
  opacity: 0.46;
}

.startup-sound-panel .startup-sound-intro-title {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--heading);
  font-size: 38px;
  font-weight: var(--heading-weight);
  line-height: 1.06;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-line;
}

.startup-sound-panel .startup-sound-intro-copy {
  max-width: 320px;
  margin: 20px auto 0;
  color: rgba(34, 39, 56, 0.84);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.45;
}

.startup-sound-panel .startup-sound-question {
  margin: 0;
  color: rgba(34, 39, 56, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.startup-sound-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(238px, 100%);
  min-height: 38px;
  margin: 40px auto 0;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transform: translateY(-18px);
}

.startup-sound-actions::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  z-index: 0;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #222738;
  transition: transform 240ms ease;
}

.startup-sound-actions.is-on::before {
  transform: translateX(100%);
}

.startup-sound-actions.is-off::before {
  transform: translateX(0);
}

.startup-sound-button {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #222738;
  font-family: var(--plain);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  outline: 0;
  transition: color 180ms ease;
}

.startup-sound-actions.is-off .startup-sound-button:nth-child(1),
.startup-sound-actions.is-on .startup-sound-button:nth-child(2) {
  color: #fff;
}

@media (max-width: 700px), (max-height: 680px) {
  .startup-sound-prompt {
    padding: 12px;
  }

  .startup-sound-panel {
    width: min(460px, calc(100vw - 24px));
    min-height: min(495px, calc(100vh - 24px));
    padding: 44px 26px 28px;
  }

  .startup-sound-panel .startup-sound-intro-title {
    font-size: 32px;
  }

  .startup-sound-panel .startup-sound-intro-copy {
    margin-top: 16px;
    font-size: 14px;
  }

  .startup-sound-choice {
    padding-top: 24px;
  }

  .startup-sound-panel .startup-sound-question {
    font-size: 12px;
  }
}

.light-step-dock {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}

.light-step-dock[hidden] {
  display: none;
}

.light-step-button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(185, 174, 158, 0.72);
  border-radius: 12px;
  background: #efeae1;
  color: var(--edge);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.light-step-arrow {
  width: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0;
}

.light-step-arrow svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.light-step-button:hover {
  background: var(--edge);
  border-color: var(--edge);
  color: #fff;
  box-shadow: none;
  transform: translateY(-1px);
}

.light-step-button:not(.light-step-arrow) {
  width: 78px;
  min-width: 78px;
  padding-right: 0;
  padding-left: 0;
  border-color: var(--edge);
  background: var(--edge);
  color: #fff;
}

.light-step-button:not(.light-step-arrow):hover {
  border-color: #53b7f9;
  background: #53b7f9;
}

.light-step-button.light-step-playback-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
}

.light-step-playback-button svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.light-step-playback-button svg:first-child {
  fill: currentColor;
  stroke: none;
}

.light-step-playback-button svg[hidden] {
  display: none;
}

.light-step-button:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
}

.light-step-counter {
  min-width: 42px;
  color: var(--edge);
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.three-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100vw;
  height: calc(100vh - 86px);
  min-width: 0;
  transform: none;
  pointer-events: none;
}

.sketch-light-workspace .three-canvas-layer,
.sketch-light-workspace .lesson-svg {
  translate: 0 30px;
  transform: translateY(50px);
}

.geometric-figure-canvas .three-canvas-layer,
.geometric-figure-canvas .lesson-svg {
  transform: translateY(10px);
}

@media (min-width: 1181px) {
  :is(
    .basics-vanishing-copy,
    .ellipse-construction-copy,
    .modeling-profile-copy,
    .bust-information
  ) {
    transform: translateX(40px);
  }

  .sketch-light-workspace .geometric-figure-canvas .three-canvas-layer,
  .sketch-light-workspace .geometric-figure-canvas .lesson-svg {
    transform: translate(-185px, 10px);
  }

  .construction-sketch-workspace .lesson-svg,
  .modeling-profile-workspace .three-canvas-layer,
  .modeling-profile-workspace .lesson-svg {
    transform: translateX(-185px);
  }

  .sketch-light-workspace .geometric-figure-canvas :is(
    .figure-body-selector,
    .figure-pose-dots,
    .figure-work-version-dots,
    .figure-pose-bottom-actions
  ),
  .construction-sketch-workspace .object-toolbar,
  .sketch-light-workspace .object-toolbar,
  .modeling-profile-workspace :is(
    .modeling-profile-toolbar,
    .modeling-point-navigation
  ) {
    margin-left: -185px;
  }
}

.three-canvas-layer.is-interactive {
  z-index: 3;
  pointer-events: auto;
}

.three-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.three-canvas.is-orbiting {
  cursor: grabbing;
}

.intro-3d-workspace {
  min-height: calc(100vh - 86px);
}

.canvas-scroll.intro-3d-canvas {
  background: transparent;
}

.canvas-scroll.intro-3d-canvas .lesson-svg {
  pointer-events: none;
}

.basics-bottom-controls.intro-title-controls {
  opacity: 0;
  z-index: 50;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.intro-title-cube-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.intro-title-cube-scene.is-active {
  cursor: default;
}

.intro-title-cube-scene canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.intro-title-geometry-heading {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 1;
  width: min(88vw, 1180px);
  color: #ebe8e3;
  font-family: var(--heading);
  font-size: clamp(43px, 7.25vw, 110px);
  font-weight: var(--heading-weight);
  line-height: 0.92;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) perspective(760px) rotateX(var(--intro-title-rotate-x, 0deg)) rotateY(var(--intro-title-rotate-y, 0deg));
  transform-style: preserve-3d;
  pointer-events: none;
  user-select: none;
}

.intro-title-geometry-scene.is-text-only .intro-title-geometry-heading {
  font-size: clamp(54px, 9.2vw, 140px);
  transform: translate(-50%, -50%) perspective(480px) rotateX(var(--intro-title-rotate-x, 0deg)) rotateY(var(--intro-title-rotate-y, 0deg));
}

.intro-motif-switch {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 24;
  min-height: 38px;
  padding: 5px 6px;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(210, 215, 222, 0.82);
  border-radius: 999px;
  background: rgba(238, 241, 245, 0.94);
  box-shadow: 0 6px 14px rgba(22, 31, 45, 0.1);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.intro-motif-label {
  padding: 0 7px;
  color: var(--edge);
  font-family: var(--plain);
  font-size: 12px;
  font-weight: 600;
}

.intro-motif-button {
  min-width: 34px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--edge);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 700;
}

.intro-motif-button:hover,
.intro-motif-button.is-active {
  color: #fff;
  background: var(--edge);
  box-shadow: 0 4px 10px rgba(22, 31, 45, 0.09);
}

.intro-3d-copy {
  position: absolute;
  left: clamp(24px, 6vw, 92px);
  bottom: clamp(30px, 8vh, 92px);
  z-index: 4;
  max-width: min(520px, calc(100vw - 48px));
  pointer-events: none;
}

.intro-3d-copy h1 {
  margin: 0;
  color: #202837;
  font-family: var(--sans);
  font-size: clamp(46px, 8vw, 96px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0;
}

.intro-3d-copy p {
  max-width: 460px;
  margin: 14px 0 0;
  color: #5b6573;
  font-family: var(--plain);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.45;
}

.intro-3d-error {
  color: #6a4a4a;
}

.control-hint {
  padding: 8px 9px;
  border: 1px solid rgba(224, 224, 222, 0.88);
  border-radius: 12px;
  background: #fff;
  color: #5f5b56;
  font-family: var(--plain);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.28;
}

.controls {
  position: fixed;
  top: 126px;
  right: clamp(14px, 3vw, 36px);
  z-index: 10;
  width: 218px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segment-button {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f5b56;
  cursor: pointer;
  font-family: var(--plain);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.12;
}

.segment-button.is-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 7px 14px rgba(34, 39, 56, 0.16);
}

.switch {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  color: #474747;
  font-family: var(--plain);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.16;
}

.switch input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.step-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 5px;
  align-items: center;
}

.step-controls.is-hidden {
  display: none;
}

.step-button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.05;
}

.step-button:disabled {
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.58;
}

.step-label {
  color: #777;
  font-family: var(--plain);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.reset-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(34, 39, 56, 0.16);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.14;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.reset-button:hover {
  background: #181d2c;
  box-shadow: 0 10px 22px rgba(34, 39, 56, 0.2);
  transform: translateY(-1px);
}

.explanation {
  max-width: 880px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.explanation p {
  display: grid;
  gap: 6px;
}

.lesson-note {
  max-width: 880px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.lesson-note h2 {
  margin: 0 0 8px;
  color: #333338;
  font-size: 26px;
  font-weight: 300;
}

.lesson-note p {
  margin: 0 0 16px;
  color: var(--muted);
}

.lesson-list-block {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-family: var(--plain);
  font-size: 14px;
  line-height: 1.55;
}

.lesson-list-block li + li {
  margin-top: 5px;
}

.compare-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(34, 39, 56, 0.16);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 15px;
  text-decoration: none;
}

.nav-backdrop {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 1050px) {
  .site-header {
    position: relative;
    padding: 0 24px;
    justify-content: center;
  }

  .header-actions {
    position: absolute;
    right: 24px;
  }

  .lesson-menu-button {
    position: static;
    display: inline-flex;
    align-items: center;
  }

  .app-shell {
    display: block;
  }

  .lesson-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(82vw, 320px);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    background: #fff !important;
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.12);
  }

  .nav-open .lesson-sidebar {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(0, 0, 0, 0.18);
  }

  .workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .controls {
    position: static;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
  .lesson-mode .canvas-scroll {
    overflow-x: hidden;
  }

  .lesson-mode .lesson-svg {
    width: 100%;
    min-width: 0;
    height: calc(100dvh - 86px);
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (max-width: 560px) {
  .brand {
    transform: scale(0.82);
    transform-origin: center center;
  }

  .header-actions {
    right: 12px;
  }

  .language-switch button {
    min-width: 0;
    padding: 5px 0;
  }

  .lesson-content {
    padding-top: 20px;
  }

  .intro {
    min-height: 0;
  }

  .lesson-svg {
    min-width: 920px;
  }

  .controls {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Floating atelier UI */
.app-shell {
  position: relative;
  display: block;
  min-height: calc(100vh - 86px);
}

.lesson-content {
  min-width: 0;
  padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 36px) 70px;
}

.lesson-content.lesson-mode {
  padding: 0;
}

.lesson-sidebar {
  --dock-menu-width: 178px;
  position: fixed;
  left: 14px;
  top: 141px;
  z-index: 70;
  width: 52px;
  max-height: calc(100vh - 165px);
  height: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent !important;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
  transition: width 160ms ease;
}

@media (min-width: 1051px) {
  .lesson-sidebar {
    left: 24px;
  }
}

.lesson-sidebar:hover,
.lesson-sidebar:focus-within,
.dock-pinned .lesson-sidebar {
  width: var(--dock-menu-width);
}

.nav-open .lesson-sidebar {
  width: min(462px, calc(100vw - 28px));
}

.nav-objects-open .lesson-sidebar {
  width: 106px;
}

.nav-objects-open .dock-label {
  opacity: 0;
  transform: translateX(-4px);
}

.nav-open.nav-objects-open .dock-label {
  display: none;
}

.nav-objects-open .dock-section {
  width: 40px;
}

.nav-objects-open .dock-button {
  width: 40px;
}

.dock-section {
  display: grid;
  gap: 4px;
  width: 40px;
  transform: translateX(-2px);
}

.dock-section-bottom {
  margin-top: auto;
}

.dock-button {
  position: relative;
  width: 40px;
  min-width: 0;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  font-family: var(--plain);
  font-size: 13px;
  line-height: 1;
}

.dock-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: #fff;
  filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dock-button > * {
  position: relative;
  z-index: 1;
}

.lesson-sidebar:hover .dock-section,
.lesson-sidebar:focus-within .dock-section,
.dock-pinned .lesson-sidebar .dock-section,
.nav-open .dock-section {
  width: calc(var(--dock-menu-width) - 12px);
  transform: translateX(-2px);
}

.lesson-sidebar:hover .dock-button,
.lesson-sidebar:focus-within .dock-button,
.dock-pinned .lesson-sidebar .dock-button,
.nav-open .dock-button {
  width: 100%;
}

.dock-button:hover,
.dock-button:focus-visible {
  background: transparent;
}

.dock-button:hover::before,
.dock-button:focus-visible::before {
  background: #fff;
  filter: blur(0);
  opacity: 0.88;
  transition-duration: 240ms;
}

.dock-button.is-active {
  background: transparent;
  color: #fff;
}

.dock-button.is-active::before {
  background: #000;
  filter: blur(0);
  opacity: 1;
  transform: translateX(1px);
}

.lesson-sidebar:hover .dock-button::before,
.lesson-sidebar:focus-within .dock-button::before,
.dock-pinned .lesson-sidebar .dock-button::before,
.nav-open .dock-button::before {
  right: 40px;
}

.dock-button:disabled {
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.52;
}

.dock-icon-wrap {
  width: 40px;
  min-width: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
}

.dock-icon {
  width: 21px;
  height: 21px;
  display: block;
  flex: 0 0 auto;
}

.dock-label {
  min-width: 0;
  padding-right: 12px;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.lesson-sidebar:hover .dock-label,
.lesson-sidebar:focus-within .dock-label,
.dock-pinned .dock-label,
.nav-open .dock-label {
  opacity: 1;
  transform: translateX(0);
}

.dock-flyout {
  position: absolute;
  left: var(--dock-menu-width);
  top: 8px;
  bottom: 8px;
  z-index: 1;
  width: calc(100% - var(--dock-menu-width) - 8px);
  max-height: none;
  overflow: auto;
  padding: 8px 12px 8px 16px;
  border: 0;
  border-left: 1px solid rgba(224, 224, 222, 0.82);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dock-flyout[hidden] {
  display: none;
}

.nav-objects-open .dock-flyout {
  left: 48px;
  top: 6px;
  bottom: 6px;
  width: 46px;
  padding: 0 0 0 5px;
  border-left: 1px solid rgba(224, 224, 222, 0.82);
}

.nav-objects-open .flyout-title {
  display: none;
}

.flyout-title {
  margin-bottom: 10px;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 400;
}

.flyout-section-title {
  margin: 14px 0 5px;
  color: #777;
  font-family: var(--plain);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flyout-link {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: var(--plain);
  font-size: 13px;
}

.flyout-link:hover,
.flyout-link.is-active {
  background: rgba(34, 39, 56, 0.1);
}

.flyout-link.is-disabled {
  color: #999;
  cursor: not-allowed;
  opacity: 0.58;
}

.flyout-switch {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  color: #474747;
  font-family: var(--plain);
  font-size: 12px;
}

.flyout-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.object-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.object-choice {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 12px;
}

.object-choice .dock-icon {
  width: 22px;
  height: 22px;
}

.object-choice.is-active,
.object-choice:hover {
  background: rgba(34, 39, 56, 0.08);
}

.object-choice-label {
  display: none;
}

.object-choice.is-disabled {
  color: #9a9a9a;
  cursor: not-allowed;
  opacity: 0.52;
}

.flyout-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--plain);
  font-size: 13px;
  line-height: 1.45;
}

.scene-badge,
.perspective-switch {
  position: absolute;
  z-index: 20;
  border: 1px solid rgba(224, 224, 222, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(16px);
}

.scene-badge {
  top: 14px;
  left: 50%;
  max-width: min(420px, calc(100vw - 420px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: #555;
  font-family: var(--plain);
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
}

.object-toolbar {
  position: absolute;
  z-index: 20;
  top: 25px;
  left: 50%;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: min(520px, calc(100vw - 440px));
  overflow: visible;
  transform: translateX(-50%);
}

.object-toolbar-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.object-toolbar-button:hover {
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--round-control-shadow);
}

.object-toolbar-button.is-active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--round-control-shadow);
}

.object-toolbar .dock-icon {
  width: 21px;
  height: 21px;
}

.object-toolbar-list {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}

.object-toolbar-list::-webkit-scrollbar {
  display: none;
}

.object-toolbar-label,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.perspective-switch {
  top: auto;
  left: 50%;
  right: auto;
  bottom: 18px;
  min-height: 38px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
  border: 1px solid rgba(210, 215, 222, 0.82);
  background: rgba(238, 241, 245, 0.94);
  box-shadow: 0 6px 14px rgba(22, 31, 45, 0.1);
  backdrop-filter: blur(12px);
}

.perspective-label {
  padding: 0 7px;
  color: var(--edge);
  font-family: var(--plain);
  font-size: 12px;
  font-weight: 600;
}

.perspective-button {
  min-width: 34px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--edge);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 700;
}

.perspective-button:hover,
.perspective-button.is-active {
  color: #fff;
  background: var(--edge);
  box-shadow: 0 4px 10px rgba(22, 31, 45, 0.09);
}

.controls {
  display: flex;
  position: fixed;
  top: 104px;
  right: 18px;
  z-index: 66;
  width: 214px;
  padding: 10px 12px;
  flex-direction: column;
  gap: 7px;
  border: 1px solid rgba(224, 224, 222, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-view-open .controls {
  display: flex;
}

.panel-title {
  color: #555;
  font-family: var(--plain);
  font-size: 11px;
  font-weight: 500;
}

.panel-scene-title {
  margin-bottom: 3px;
  color: #333338;
  font-family: var(--plain);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.18;
}

.control-explanation {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(224, 224, 222, 0.9);
}

.control-explanation > summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text);
  font-family: var(--plain);
  font-size: 12px;
  font-weight: 500;
}

.control-explanation > summary::marker {
  color: #777;
}

.control-explanation .explanation-body {
  padding-top: 6px;
}

.floating-explanation {
  display: none;
  position: fixed;
  top: 104px;
  right: 18px;
  z-index: 67;
  width: min(340px, calc(100vw - 96px));
  max-height: calc(100vh - 130px);
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(224, 224, 222, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.explanation-open .floating-explanation {
  display: block;
}

.explanation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--plain);
  font-size: 13px;
}

.panel-spacer {
  flex: 1;
}

.panel-icon-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  cursor: pointer;
}

.explanation-body {
  display: grid;
  gap: 6px;
}

.explanation-body details {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.explanation-body summary {
  cursor: pointer;
  font-family: var(--plain);
  font-size: 12px;
  font-weight: 500;
}

.explanation-body p {
  margin: 7px 0 2px;
  color: var(--muted);
  font-family: var(--plain);
  font-size: 12px;
  line-height: 1.36;
}

.explanation-chip {
  display: none;
}

.explanation-minimized .floating-explanation {
  width: auto;
  padding: 0;
  overflow: visible;
}

.explanation-minimized .explanation-header,
.explanation-minimized .explanation-body {
  display: none;
}

.explanation-minimized .explanation-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  cursor: pointer;
  font-family: var(--plain);
  font-size: 13px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: block;
  background: rgba(0, 0, 0, 0.08);
}

.nav-backdrop[hidden] {
  display: none;
}

.vase-profile-panel {
  width: 240px;
  max-width: 100%;
  padding: 10px 10px 12px;
  border: 1px solid rgba(34, 39, 56, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.vase-profile-panel summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: #2b2f3a;
  list-style: none;
}

.vase-profile-panel summary::-webkit-details-marker {
  display: none;
}

.vase-preset-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
}

.vase-preset-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2b2f3a;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.vase-preset-button.is-active {
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 33, 42, 0.16);
}

.vase-preset-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vase-profile-editor {
  width: 220px;
  height: 300px;
  display: block;
  background: rgba(236, 240, 244, 0.48);
  border-radius: 10px;
}

.vase-profile-grid line {
  stroke: #9aa7b1;
  stroke-width: 0.7;
  opacity: 0.24;
}

.vase-axis {
  stroke: #2b2f3a;
  stroke-width: 1.1;
  stroke-dasharray: 4 4;
  opacity: 0.38;
}

.vase-profile-line {
  fill: none;
  stroke: #282a2d;
  stroke-width: 2;
}

.vase-profile-mirror {
  fill: none;
  stroke: #83a9bb;
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
  opacity: 0.55;
}

.vase-profile-point {
  fill: #fff;
  stroke: #b58a55;
  stroke-width: 2;
  cursor: ew-resize;
}

.vase-profile-point.is-active {
  fill: #b58a55;
}

.vase-profile-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.vase-step-panel {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 45px rgba(31, 37, 47, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.vase-step-panel .step-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f0f2f4;
  color: #202633;
  font-weight: 650;
  cursor: pointer;
}

.vase-step-panel .step-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.vase-step-panel .step-label {
  min-width: 48px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #202633;
}

@media (prefers-reduced-motion: reduce) {
  .lesson-sidebar,
  .dock-label {
    transition: none;
  }
}

@media (max-width: 760px) {
  .light-step-dock {
    bottom: 26px;
    gap: 8px;
    padding: 0;
    transform: translateX(-50%);
  }

  .light-step-button {
    min-width: 38px;
    height: 38px;
    padding: 0 9px;
    font-size: 13px;
  }

  .light-step-arrow {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 20px;
  }

  .light-step-counter {
    min-width: 36px;
    font-size: 12px;
  }

  .lesson-menu-button {
    display: none;
  }

  .lesson-sidebar {
    inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px;
    top: auto;
    width: auto;
    max-height: none;
    padding: 6px;
    flex-direction: row;
    justify-content: center;
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 18px;
  }

  .lesson-sidebar:hover,
  .lesson-sidebar:focus-within,
  .dock-pinned .lesson-sidebar,
  .nav-open .lesson-sidebar {
    width: auto;
  }

  .dock-section {
    display: flex;
    gap: 3px;
    width: auto;
  }

  .dock-section-bottom {
    margin-top: 0;
  }

  .dock-button {
    width: 42px;
    min-width: 42px;
  }

  .dock-icon-wrap {
    width: 42px;
    min-width: 42px;
    flex-basis: 42px;
  }

  .dock-label {
    display: none;
  }

  .dock-flyout,
  .controls,
  .figure-scene-panel,
  .floating-explanation {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(58vh, 430px);
  }

  .figure-scene-panel {
    width: auto;
    bottom: calc(320px + env(safe-area-inset-bottom));
    max-height: min(32vh, 250px);
    overflow: auto;
  }

  .dock-flyout {
    position: fixed;
    padding: 14px;
    border: 1px solid rgba(224, 224, 222, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .scene-badge {
    left: 12px;
    top: 12px;
    max-width: calc(100vw - 24px);
    transform: none;
  }

  .object-toolbar {
    top: 32px;
    left: 12px;
    max-width: calc(100vw - 24px);
    transform: none;
  }

  .perspective-switch {
    left: 50%;
    right: auto;
    bottom: 10px;
    transform: translateX(-50%);
  }
}

@media (max-width: 760px) {
  .sketch-light-workspace .controls {
    display: none;
  }

  .sketch-light-workspace .light-step-dock {
    bottom: calc(94px + env(safe-area-inset-bottom));
  }
}
/* The interactive workspace is intentionally unavailable on phone-sized screens. */
.mobile-device-notice {
  display: none;
}

.mobile-device-notice-en {
  display: none;
}

html[lang="en"] .mobile-device-notice-sk {
  display: none;
}

html[lang="en"] .mobile-device-notice-en {
  display: block;
}

@media (max-width: 599px), (max-height: 599px) and (pointer: coarse) {
  html,
  body {
    min-height: 100%;
    overflow: hidden;
  }

  body > .site-header,
  body > .app-shell,
  body > .startup-sound-prompt {
    display: none !important;
  }

  .mobile-device-notice {
    box-sizing: border-box;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: 32px 28px;
    background: #f2efeb;
    color: #23242c;
    text-align: center;
  }

  .mobile-device-notice-copy {
    width: min(100%, 420px);
  }

  .mobile-device-notice-copy h1 {
    margin: 0;
    font-family: var(--heading);
    font-size: 30px;
    font-weight: var(--heading-weight);
    line-height: 1.15;
    letter-spacing: 0;
  }

  .mobile-device-notice-copy p {
    margin: 18px 0 0;
    font-size: 17px;
    line-height: 1.5;
  }
}
