:root {
  --ml-ink: #26345d;
  --ml-ink-soft: #536083;
  --ml-blue: #7fc7ff;
  --ml-blue-deep: #3f8fd3;
  --ml-yellow: #ffe27a;
  --ml-orange: #ff9f6e;
  --ml-pink: #ff8eb8;
  --ml-green: #88dba3;
  --ml-mint: #d8fff0;
  --ml-cream: #fff7d8;
  --ml-white: #ffffff;
  --ml-shadow: rgba(54, 72, 124, 0.24);
  --ml-radius: 18px;
}

.ml-room-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 226, 122, 0.42) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 88% 12%, rgba(255, 142, 184, 0.28) 0 10rem, transparent 10.1rem),
    linear-gradient(180deg, #eaf8ff 0%, #fff7d8 58%, #ffe8c7 100%);
  color: var(--ml-ink);
  font-family: "M PLUS Rounded 1c", "Inter", system-ui, sans-serif;
  overflow-x: hidden;
}

.ml-room-page .ml-room-nav {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 3px solid rgba(63, 143, 211, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(63, 143, 211, 0.12);
}

.ml-room-page .logo {
  background: none;
  -webkit-text-fill-color: currentColor;
}

.ml-room-page .logo a {
  color: var(--ml-blue-deep);
  text-decoration: none;
}

.ml-room-page .nav-link {
  border-radius: 999px;
  color: var(--ml-ink-soft);
}

.ml-room-page .nav-link:hover,
.ml-room-page .nav-link--active {
  background: var(--ml-yellow);
  color: var(--ml-ink);
  text-decoration: none;
}

.ml-room-page .nav-link::after {
  display: none;
}

.ml-room-page .mobile-menu-btn span {
  background: var(--ml-ink);
}

.ml-room-hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: calc(100vh - 80px);
  padding: clamp(6rem, 9vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.ml-room-copy {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.ml-room-kicker {
  color: var(--ml-blue-deep);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

.ml-room-copy h1 {
  color: var(--ml-ink);
  font-size: clamp(2.9rem, 6.8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
  margin: 0 0 1.25rem;
  text-shadow: 0 6px 0 rgba(255, 255, 255, 0.8);
  overflow-wrap: anywhere;
}

.ml-room-copy p,
.ml-room-panel p,
.ml-room-schedule p,
.ml-room-footer p {
  color: var(--ml-ink-soft);
  font-size: 1.05rem;
  line-height: 1.85;
}

.ml-room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.ml-room-button {
  align-items: center;
  background: var(--ml-white);
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 999px;
  box-shadow: 0 9px 0 rgba(38, 52, 93, 0.1), 0 18px 32px rgba(54, 72, 124, 0.12);
  color: var(--ml-ink);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.35rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ml-room-button:hover {
  color: var(--ml-ink);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 0 rgba(38, 52, 93, 0.1), 0 22px 34px rgba(54, 72, 124, 0.16);
}

.ml-room-button--primary {
  background: var(--ml-yellow);
}

.ml-room-stage {
  min-height: clamp(430px, 58vw, 660px);
  perspective: 1050px;
  position: relative;
}

.ml-room-stage::before,
.ml-room-stage::after {
  position: absolute;
  right: clamp(0.6rem, 5vw, 4.2rem);
  z-index: 6;
  pointer-events: none;
}

.ml-room-stage::before {
  content: "MLPシナプスラボ";
  top: clamp(1.2rem, 6vw, 3.4rem);
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 999px;
  background: #fff7d8;
  box-shadow: 0 10px 0 rgba(38, 52, 93, 0.1), 0 18px 26px rgba(63, 143, 211, 0.16);
  color: #26345d;
  font-weight: 800;
  padding: 0.62rem 0.9rem;
}

.ml-room-stage::after {
  content: "窓から入る";
  top: clamp(4.6rem, 10vw, 6.8rem);
  border-radius: 999px;
  background: #ff8eb8;
  color: #26345d;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.48rem 0.75rem;
}

.ml-room-scene {
  width: min(720px, 100%);
  aspect-ratio: 1 / 0.82;
  position: relative;
  margin: 0 auto;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-38deg);
  animation: room-breathe 7s ease-in-out infinite;
}

@keyframes room-breathe {
  0%, 100% { transform: rotateX(58deg) rotateZ(-38deg) translateY(0); }
  50% { transform: rotateX(58deg) rotateZ(-38deg) translateY(-10px); }
}

.room-floor {
  position: absolute;
  inset: 18% 7% 7% 8%;
  background:
    linear-gradient(90deg, rgba(63, 143, 211, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(63, 143, 211, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #fff2b6, #ffd99b);
  background-size: 48px 48px, 48px 48px, auto;
  border: 5px solid #ffbd76;
  border-radius: 26px;
  box-shadow: 0 34px 70px var(--ml-shadow);
  transform: translateZ(0);
}

.room-wall {
  position: absolute;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 45%),
    #bdefff;
  border: 5px solid #79c9ed;
  box-shadow: inset 0 -12px rgba(63, 143, 211, 0.12);
}

.room-wall--left {
  width: 55%;
  height: 31%;
  left: 8%;
  top: 3%;
  border-radius: 24px 24px 8px 8px;
  transform-origin: bottom;
  transform: rotateX(90deg) translateY(2px);
}

.room-wall--right {
  width: 34%;
  height: 48%;
  right: 2%;
  top: 17%;
  border-radius: 24px 24px 8px 8px;
  transform-origin: left;
  transform: rotateY(-90deg) translateX(2px);
}

.room-window {
  width: 27%;
  height: 26%;
  top: 8%;
  left: 56%;
  display: block;
  color: #26345d;
  pointer-events: auto;
  z-index: 14;
  text-decoration: none;
  transform: translateZ(118px) rotateX(-90deg);
  animation: lab-window-pulse 2.6s ease-in-out infinite;
}

.room-window:hover,
.room-window:focus-visible {
  color: #26345d;
  filter: saturate(1.28) drop-shadow(0 22px 18px rgba(38, 52, 93, 0.24));
  text-decoration: none;
}

.window-frame,
.window-glow,
.window-label,
.window-caption,
.window-badge,
.window-arrow {
  position: absolute;
}

.window-frame {
  inset: 0;
  border: 7px solid #26345d;
  border-radius: 18px;
  background:
    linear-gradient(90deg, transparent calc(50% - 3px), rgba(38, 52, 93, 0.9) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(0deg, transparent calc(50% - 3px), rgba(38, 52, 93, 0.9) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(135deg, #d8fff0, #7fc7ff 62%, #ffdc8c);
  box-shadow:
    0 12px 0 #587092,
    14px 20px 0 rgba(88, 112, 146, 0.26),
    0 24px 34px rgba(63, 143, 211, 0.34);
}

.window-frame::before,
.window-frame::after {
  content: "";
  position: absolute;
  background: rgba(38, 52, 93, 0.22);
}

.window-frame::before {
  width: 100%;
  height: 12px;
  left: 8px;
  bottom: -18px;
  border-radius: 0 0 14px 14px;
  transform: skewX(32deg);
}

.window-frame::after {
  width: 13px;
  height: 100%;
  right: -18px;
  top: 8px;
  border-radius: 0 14px 14px 0;
  transform: skewY(30deg);
}

.window-glow {
  inset: 8%;
  border-radius: 999px;
  background: rgba(255, 226, 122, 0.72);
  filter: blur(13px);
}

.window-label {
  left: 50%;
  bottom: -38px;
  min-width: 118px;
  z-index: 4;
  transform: translateX(-50%) translateZ(42px);
  border: 3px solid rgba(38, 52, 93, 0.14);
  border-radius: 999px;
  background: #fff7d8;
  box-shadow: 0 8px 0 rgba(38, 52, 93, 0.12);
  color: #26345d;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5rem 0.7rem;
  text-align: center;
}

.window-caption {
  left: 50%;
  bottom: -70px;
  width: 150px;
  z-index: 4;
  transform: translateX(-50%) translateZ(42px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(38, 52, 93, 0.14);
  color: #3f8fd3;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.42rem 0.58rem;
  text-align: center;
}

.window-badge {
  right: -13px;
  top: -18px;
  z-index: 5;
  border: 3px solid #26345d;
  border-radius: 999px;
  background: #ff8eb8;
  box-shadow: 0 6px 0 rgba(38, 52, 93, 0.16);
  color: #26345d;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
}

.window-arrow {
  right: -38px;
  bottom: -22px;
  z-index: 5;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ml-yellow);
  box-shadow: 0 7px 0 rgba(38, 52, 93, 0.12);
  color: #26345d;
  font-weight: 900;
}

@keyframes lab-window-pulse {
  0%, 100% { filter: drop-shadow(0 16px 14px rgba(63, 143, 211, 0.18)); }
  50% { filter: drop-shadow(0 24px 20px rgba(255, 142, 184, 0.32)); }
}

.room-hotspot {
  border: 0;
  cursor: pointer;
  font: inherit;
  position: absolute;
  transform-style: preserve-3d;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.room-hotspot:hover,
.room-hotspot.is-active {
  filter: saturate(1.2) drop-shadow(0 16px 12px rgba(38, 52, 93, 0.2));
}

.room-hotspot:focus-visible {
  outline: 4px solid var(--ml-pink);
  outline-offset: 6px;
}

.room-board {
  width: 34%;
  height: 19%;
  top: 10%;
  left: 20%;
  background: #34685d;
  border: 7px solid #ffd26f;
  border-radius: 14px;
  box-shadow: 0 8px 0 #d99a4e;
  color: #f9fff2;
  transform: translateZ(92px) rotateX(-90deg);
}

.board-title {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 700;
  margin: 0.55rem auto 0.35rem;
}

.board-line {
  display: block;
  height: 7px;
  margin: 0.4rem auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.board-line--one { width: 68%; }
.board-line--two { width: 46%; }

.board-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ml-yellow);
  display: block;
  margin: 0.4rem auto;
}

.room-desk {
  width: 21%;
  height: 17%;
  background: transparent;
  transform: translateZ(34px);
}

.room-desk--front {
  left: 31%;
  top: 53%;
}

.room-desk--back {
  left: 53%;
  top: 42%;
}

.desk-top,
.lab-top {
  position: absolute;
  inset: 0;
  border: 4px solid #d78250;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffc46f, #ff986a);
  box-shadow: 0 12px 0 #c87348;
}

.desk-leg {
  position: absolute;
  bottom: -20px;
  width: 14px;
  height: 28px;
  border-radius: 7px;
  background: #88563d;
}

.desk-leg--left { left: 20%; }
.desk-leg--right { right: 20%; }

.desk-book {
  position: absolute;
  width: 38%;
  height: 24%;
  top: 19%;
  left: 50%;
  border-radius: 5px;
  background: var(--ml-pink);
  box-shadow: inset 0 -5px rgba(38, 52, 93, 0.12);
}

.desk-book--green {
  background: var(--ml-green);
}

.room-lab {
  width: 27%;
  height: 20%;
  right: 14%;
  bottom: 18%;
  background: transparent;
  transform: translateZ(40px);
}

.lab-top {
  background: linear-gradient(135deg, #d8fff0, #83d9c7);
  border-color: #48a99b;
  box-shadow: 0 12px 0 #3f8f83;
}

.lab-screen {
  position: absolute;
  top: 14%;
  left: 10%;
  width: 42%;
  height: 42%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #26345d;
  color: #d8fff0;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.lab-flask {
  position: absolute;
  bottom: 20%;
  width: 14%;
  height: 34%;
  border-radius: 40% 40% 48% 48%;
  background: var(--ml-pink);
  border: 3px solid rgba(38, 52, 93, 0.16);
}

.lab-flask--one { right: 27%; }
.lab-flask--two {
  right: 10%;
  background: var(--ml-yellow);
}

.room-bookshelf {
  width: 16%;
  height: 28%;
  top: 27%;
  right: 11%;
  background: transparent;
  transform: translateZ(72px) rotateY(-90deg);
}

.shelf-frame {
  position: absolute;
  inset: 0;
  border: 5px solid #b0724f;
  border-radius: 12px;
  background: #ffe4ab;
  box-shadow: 0 10px 0 #8a563d;
}

.book {
  position: absolute;
  bottom: 12%;
  width: 15%;
  border-radius: 5px 5px 2px 2px;
  background: var(--ml-blue);
}

.book--one { height: 56%; left: 18%; }
.book--two { height: 44%; left: 36%; background: var(--ml-pink); }
.book--three { height: 62%; left: 54%; background: var(--ml-green); }
.book--four { height: 38%; left: 72%; background: var(--ml-yellow); }

.room-character {
  position: absolute;
  width: 12%;
  height: 17%;
  left: 18%;
  top: 58%;
  transform: translateZ(62px);
  transform-style: preserve-3d;
}

.character-head {
  position: absolute;
  width: 48%;
  aspect-ratio: 1;
  left: 26%;
  top: 0;
  border-radius: 50%;
  background: #ffd0a8;
  border: 4px solid #26345d;
  box-shadow: inset 0 -7px rgba(38, 52, 93, 0.1);
}

.character-body {
  position: absolute;
  width: 72%;
  height: 54%;
  left: 14%;
  bottom: 7%;
  border-radius: 18px 18px 12px 12px;
  background: var(--ml-blue);
  border: 4px solid #26345d;
}

.character-shadow {
  position: absolute;
  left: 7%;
  bottom: -7%;
  width: 86%;
  height: 22%;
  border-radius: 50%;
  background: rgba(38, 52, 93, 0.16);
}

.ml-room-stage--immersive {
  min-height: clamp(430px, 54vw, 640px);
  perspective: none;
}

.ml-room-stage--immersive::before,
.ml-room-stage--immersive::after {
  display: none;
}

.ml-room-scene--webgl {
  width: min(820px, 100%);
  aspect-ratio: 1.12 / 0.78;
  position: relative;
  margin: 0 auto;
  overflow: visible;
  border-radius: 30px;
  transform: none;
  animation: none;
  filter: drop-shadow(0 34px 54px rgba(54, 72, 124, 0.18));
}

.room-webgl-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 52vw, 610px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 25%, rgba(255, 142, 184, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(234, 248, 255, 0.74), rgba(255, 247, 216, 0.42));
}

.room-lab-portal {
  position: absolute;
  right: clamp(0.7rem, 6%, 2.2rem);
  top: clamp(1rem, 10%, 3rem);
  z-index: 4;
  display: grid;
  gap: 0.18rem;
  min-width: 148px;
  border: 4px solid rgba(38, 52, 93, 0.14);
  border-radius: 18px;
  background: rgba(255, 247, 216, 0.96);
  box-shadow: 0 10px 0 rgba(38, 52, 93, 0.12), 0 24px 34px rgba(63, 143, 211, 0.2);
  color: var(--ml-ink);
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.room-lab-portal:hover,
.room-lab-portal:focus-visible {
  color: var(--ml-ink);
  text-decoration: none;
  transform: translateY(-5px);
  box-shadow: 0 14px 0 rgba(38, 52, 93, 0.12), 0 28px 42px rgba(255, 142, 184, 0.26);
}

.room-lab-portal span {
  justify-self: start;
  border-radius: 999px;
  background: var(--ml-pink);
  color: var(--ml-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.24rem 0.48rem;
}

.room-lab-portal strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.05rem;
  line-height: 1.15;
}

.room-lab-portal small {
  color: var(--ml-blue-deep);
  font-weight: 800;
  line-height: 1.35;
}

.room-topic-pins {
  position: absolute;
  left: clamp(0.7rem, 6%, 2.2rem);
  bottom: clamp(0.8rem, 7%, 2.4rem);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: min(430px, calc(100% - 2rem));
}

.room-topic-pins button {
  min-height: 34px;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 0 rgba(38, 52, 93, 0.08);
  color: var(--ml-ink);
  cursor: pointer;
  font: inherit;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.42rem 0.66rem;
}

.room-topic-pins button:hover,
.room-topic-pins button.is-active {
  background: var(--ml-yellow);
}

.room-webgl-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ml-ink-soft);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.5rem 0.8rem;
}

.ml-room-scene--webgl.is-ready .room-webgl-status {
  display: none;
}

.ml-room-panel,
.ml-room-schedule,
.ml-material-library {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto clamp(2rem, 5vw, 4rem);
}

.ml-room-panel__inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
  background: rgba(255, 255, 255, 0.74);
  border: 4px solid rgba(63, 143, 211, 0.16);
  border-radius: 26px;
  box-shadow: 0 22px 48px rgba(63, 143, 211, 0.14);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.ml-room-panel h2,
.ml-room-schedule h2 {
  color: var(--ml-ink);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

.ml-room-card-stack {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.ml-room-card {
  min-height: 180px;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 18px;
  background: var(--ml-white);
  padding: 1rem;
  box-shadow: 0 9px 0 rgba(38, 52, 93, 0.08);
  opacity: 0.62;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ml-room-card.is-active {
  opacity: 1;
  transform: translateY(-6px);
  background: #fff9d9;
}

.ml-room-card:focus-visible {
  outline: 4px solid var(--ml-pink);
  outline-offset: 4px;
}

.ml-room-card span {
  color: var(--ml-blue-deep);
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ml-room-card h3,
.ml-room-tiles h3 {
  color: var(--ml-ink);
  font-size: 1.08rem;
  letter-spacing: 0;
  margin-bottom: 0.4rem;
}

.ml-room-card p,
.ml-room-tiles p {
  color: var(--ml-ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

.ml-room-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

.ml-room-section-head p:not(.ml-room-kicker) {
  color: var(--ml-ink-soft);
  line-height: 1.75;
  margin: 0;
}

.ml-room-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ml-room-tiles article {
  background: rgba(255, 255, 255, 0.74);
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 20px;
  box-shadow: 0 9px 0 rgba(38, 52, 93, 0.08);
  padding: 1.25rem;
}

.ml-material-library {
  background: rgba(255, 255, 255, 0.72);
  border: 4px solid rgba(255, 159, 110, 0.22);
  border-radius: 28px;
  box-shadow: 0 22px 48px rgba(255, 159, 110, 0.14);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.ml-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.ml-library-toolbar label {
  color: var(--ml-ink-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.ml-library-toolbar select {
  min-height: 42px;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 999px;
  background: var(--ml-white);
  color: var(--ml-ink);
  font: inherit;
  font-weight: 800;
  padding: 0 2.4rem 0 1rem;
}

.ml-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.ml-material-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  gap: 0.8rem;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 20px;
  background: var(--ml-white);
  box-shadow: 0 9px 0 rgba(38, 52, 93, 0.08);
  padding: 1.1rem;
}

.ml-material-card__badge,
.ml-material-card__group {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.ml-material-card__badge {
  background: var(--ml-yellow);
  color: var(--ml-ink);
}

.ml-material-card__group {
  background: rgba(127, 199, 255, 0.22);
  color: var(--ml-blue-deep);
}

.ml-material-card h3 {
  color: var(--ml-ink);
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1.38;
  margin: 0;
}

.ml-material-card p {
  color: var(--ml-ink-soft);
  font-size: 0.94rem;
  line-height: 1.68;
  margin: 0;
}

.ml-material-card__link {
  align-items: center;
  align-self: flex-start;
  background: var(--ml-blue);
  border-radius: 999px;
  color: var(--ml-ink);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  margin-top: auto;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
}

.ml-material-card__link:hover {
  color: var(--ml-ink);
  text-decoration: none;
  transform: translateY(-2px);
}

.ml-viewer-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf8ff 0%, #fff7d8 100%);
  color: var(--ml-ink);
  font-family: "M PLUS Rounded 1c", "Inter", system-ui, sans-serif;
}

.ml-viewer-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 3px solid rgba(63, 143, 211, 0.18);
  box-shadow: 0 12px 28px rgba(63, 143, 211, 0.12);
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
}

.ml-viewer-header h1 {
  color: var(--ml-ink);
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

.ml-viewer-shell {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
  width: min(1480px, calc(100% - 1.5rem));
  margin: 1rem auto 2rem;
}

.ml-viewer-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(63, 143, 211, 0.12);
  padding: 0.8rem;
}

.ml-viewer-sidebar__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ml-ink);
  padding: 0.35rem 0.4rem 0.7rem;
}

.ml-viewer-sidebar__head span {
  color: var(--ml-ink-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.ml-viewer-nav {
  display: grid;
  gap: 0.55rem;
}

.ml-viewer-nav__item {
  display: grid;
  gap: 0.24rem;
  border: 2px solid transparent;
  border-radius: 14px;
  color: var(--ml-ink);
  padding: 0.7rem;
  text-decoration: none;
}

.ml-viewer-nav__item:hover,
.ml-viewer-nav__item.is-active {
  background: #fff9d9;
  border-color: rgba(255, 159, 110, 0.32);
  text-decoration: none;
}

.ml-viewer-nav__item span,
.ml-viewer-nav__item small {
  color: var(--ml-blue-deep);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.ml-viewer-nav__item strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.ml-viewer-content {
  position: relative;
  min-width: 0;
  border: 3px solid rgba(38, 52, 93, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(63, 143, 211, 0.14);
  overflow: hidden;
}

.ml-viewer-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  max-width: min(420px, calc(100% - 2rem));
  border-radius: 16px;
  background: #fff9d9;
  box-shadow: 0 14px 30px rgba(38, 52, 93, 0.16);
  color: var(--ml-ink);
  line-height: 1.7;
  padding: 1rem;
}

.ml-viewer-status[hidden] {
  display: none;
}

.ml-viewer-status.is-loading {
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(63, 143, 211, 0.18);
  padding: 0.8rem 0.9rem;
}

.ml-viewer-loader {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ml-viewer-loader strong,
.ml-viewer-loader small {
  display: block;
}

.ml-viewer-loader strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.ml-viewer-loader small {
  color: var(--ml-ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 0.15rem;
}

.ml-viewer-loader__spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid rgba(63, 143, 211, 0.22);
  border-top-color: var(--ml-blue);
  border-radius: 50%;
  animation: ml-viewer-spin 0.8s linear infinite;
}

.ml-material-root {
  min-height: 70vh;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ml-material-root.is-ready {
  opacity: 1;
}

.ml-material-root pre {
  white-space: pre;
}

.ml-material-root mjx-container[jax="CHTML"][display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0;
}

.ml-material-root mjx-container {
  outline: 0;
}

@keyframes ml-viewer-spin {
  to {
    transform: rotate(360deg);
  }
}

.ml-room-tiles span {
  color: var(--ml-blue-deep);
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.ml-room-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ml-ink);
}

.ml-room-footer p {
  margin: 0.25rem 0 0;
}

.ml-room-footer a {
  color: var(--ml-blue-deep);
  font-weight: 800;
}

@media (max-width: 1024px) {
  .ml-room-hero,
  .ml-room-panel__inner {
    grid-template-columns: 1fr;
  }

  .ml-room-stage {
    min-height: 520px;
    order: -1;
  }
}

@media (max-width: 768px) {
  .ml-room-page .nav-links {
    background: rgba(255, 255, 255, 0.96);
  }

  .ml-room-hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .ml-room-copy h1 {
    font-size: clamp(2.75rem, 12vw, 4rem);
    line-height: 1.05;
  }

  .ml-room-copy p,
  .ml-room-panel p,
  .ml-room-schedule p,
  .ml-room-footer p {
    font-size: 1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ml-room-stage {
    min-height: 390px;
  }

  .ml-room-scene {
    transform: rotateX(56deg) rotateZ(-38deg) scale(0.82);
    transform-origin: center;
  }

  .ml-room-scene--webgl {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    transform: none;
    animation: none;
  }

  .room-webgl-canvas {
    min-height: 390px;
  }

  .room-lab-portal {
    right: 1rem;
    top: 1rem;
  }

  .room-topic-pins {
    left: 0.85rem;
    bottom: 0.85rem;
    max-width: calc(100% - 1.7rem);
  }

  @keyframes room-breathe {
    0%, 100% { transform: rotateX(56deg) rotateZ(-38deg) scale(0.82) translateY(0); }
    50% { transform: rotateX(56deg) rotateZ(-38deg) scale(0.82) translateY(-8px); }
  }

  .ml-room-actions,
  .ml-room-footer,
  .ml-viewer-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ml-room-button {
    width: 100%;
  }

  .ml-room-tiles {
    grid-template-columns: 1fr;
  }

  .ml-library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ml-viewer-header {
    display: flex;
    position: static;
  }

  .ml-viewer-shell {
    grid-template-columns: 1fr;
  }

  .ml-viewer-content {
    order: 1;
  }

  .ml-viewer-sidebar {
    order: 2;
    position: static;
    max-height: 46vh;
  }

  .ml-material-root h1 {
    font-size: clamp(2rem, 8.8vw, 2.7rem) !important;
    line-height: 1.14 !important;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 520px) {
  .ml-room-page {
    background:
      radial-gradient(circle at 8% 34%, rgba(255, 226, 122, 0.28) 0 6rem, transparent 6.1rem),
      radial-gradient(circle at 92% 48%, rgba(255, 142, 184, 0.18) 0 7rem, transparent 7.1rem),
      linear-gradient(180deg, #eaf8ff 0%, #fff7d8 58%, #ffe8c7 100%);
  }

  .ml-room-hero,
  .ml-room-panel,
  .ml-room-schedule,
  .ml-material-library,
  .ml-room-footer {
    width: min(100% - 1rem, 1120px);
  }

  .ml-room-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3.05rem);
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.84);
  }

  .ml-room-copy {
    width: calc(100vw - 1rem);
    max-width: 100%;
  }

  .ml-room-copy p {
    max-width: 100%;
    word-break: break-all;
  }

  .ml-room-stage {
    min-height: 310px;
  }

  .ml-room-scene {
    width: 540px;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%) rotateX(56deg) rotateZ(-38deg) scale(0.58);
  }

  .ml-room-scene--webgl {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .room-webgl-canvas {
    min-height: 330px;
  }

  .room-lab-portal {
    min-width: 128px;
    padding: 0.55rem 0.62rem;
  }

  .room-lab-portal strong {
    font-size: 0.98rem;
  }

  .room-lab-portal small {
    font-size: 0.68rem;
  }

  .room-topic-pins {
    gap: 0.36rem;
  }

  .room-topic-pins button {
    font-size: 0.7rem;
    padding: 0.42rem 0.5rem;
  }

  @keyframes room-breathe {
    0%, 100% { transform: translateX(-50%) rotateX(56deg) rotateZ(-38deg) scale(0.58) translateY(0); }
    50% { transform: translateX(-50%) rotateX(56deg) rotateZ(-38deg) scale(0.58) translateY(-8px); }
  }
}

.mlp-lab-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(40, 97, 161, 0.08) 0 25%, transparent 25% 100%),
    linear-gradient(180deg, #f8fafc 0%, #eef6f4 50%, #fff7ed 100%);
  color: #172033;
  font-family: "M PLUS Rounded 1c", "Inter", system-ui, sans-serif;
}

.mlp-lab-page .mlp-lab-nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(23, 32, 51, 0.1);
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(14px);
}

.mlp-lab-page .logo {
  background: none;
  -webkit-text-fill-color: currentColor;
}

.mlp-lab-page .logo a {
  color: #5f7161;
  text-decoration: none;
}

.mlp-lab-page .nav-link {
  border-radius: 999px;
  color: #4b5563;
}

.mlp-lab-page .nav-link:hover,
.mlp-lab-page .nav-link--active {
  background: #e8efe8;
  color: #172033;
  text-decoration: none;
}

.mlp-lab-page .nav-link::after {
  display: none;
}

.mlp-hero,
.mlp-workbench,
.mlp-lesson-strip,
.mlp-footer {
  width: min(1440px, calc(100% - 2rem));
  margin-inline: auto;
}

.mlp-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 0.92fr);
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
  padding: clamp(5.6rem, 8vw, 6.4rem) 0 clamp(0.85rem, 2vw, 1.3rem);
}

.mlp-kicker {
  color: #2f6f8f;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.mlp-hero h1 {
  max-width: 860px;
  color: #172033;
  font-size: clamp(2rem, 3.8vw, 3.65rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 0.75rem;
}

.mlp-hero p,
.mlp-caption,
.mlp-lesson-strip p,
.mlp-hero__panel p,
.mlp-toolbox p {
  color: #4d5c6d;
  line-height: 1.75;
}

.mlp-hero__copy > p:last-child {
  max-width: 740px;
  font-size: 0.98rem;
  margin: 0;
}

.mlp-hero__panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.mlp-hero__panel div,
.mlp-toolbox,
.mlp-canvas-card,
.mlp-equation-card,
.mlp-flow-card,
.mlp-boundary-card,
.mlp-lesson-strip article {
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.08);
}

.mlp-hero__panel div {
  min-height: 126px;
  padding: 0.9rem;
}

.mlp-hero__panel span,
.mlp-lesson-strip span {
  display: block;
  color: #b45309;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.mlp-hero__panel strong {
  display: block;
  color: #172033;
  font-size: 1.02rem;
  line-height: 1.45;
}

.mlp-hero__panel p {
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0.45rem 0 0;
}

.mlp-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(520px, 1fr) minmax(320px, 420px);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.mlp-toolbox,
.mlp-canvas-card,
.mlp-equation-card,
.mlp-flow-card,
.mlp-boundary-card {
  padding: 1rem;
}

.mlp-toolbox {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mlp-toolbox__head h2,
.mlp-panel-head h2,
.mlp-lesson-strip h2 {
  color: #172033;
  font-size: 1.18rem;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0;
}

.mlp-canvas-card .mlp-panel-head h2 {
  white-space: nowrap;
}

.mlp-control-group {
  display: grid;
  gap: 0.55rem;
}

.mlp-chip,
.mlp-tool-button {
  min-height: 42px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0.65rem 0.85rem;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.mlp-chip:hover,
.mlp-tool-button:hover,
.mlp-chip.is-active {
  background: #e8efe8;
  border-color: #8aa18a;
  transform: translateY(-1px);
}

.mlp-chip:focus-visible,
.mlp-tool-button:focus-visible,
.mlp-edge:focus-visible,
.mlp-node:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.mlp-meter-card {
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 1rem;
}

.mlp-meter-card__label {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.mlp-meter-card strong {
  display: block;
  color: #172033;
  font-size: 1.05rem;
  line-height: 1.4;
}

.mlp-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 0.8rem 0;
}

.mlp-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
  transition: width 0.24s ease;
}

.mlp-meter-card p {
  font-size: 0.9rem;
  margin: 0;
}

.mlp-stat-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.mlp-stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  border-radius: 8px;
  background: #fff7ed;
  padding: 0.65rem 0.8rem;
}

.mlp-stat-list dt {
  color: #5b6472;
  font-size: 0.84rem;
  font-weight: 800;
}

.mlp-stat-list dd {
  color: #172033;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
}

.mlp-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.mlp-panel-head > p {
  max-width: 330px;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0;
  text-align: right;
}

.mlp-board-actions {
  display: grid;
  justify-items: end;
  gap: 0.55rem;
}

.mlp-board-actions p {
  max-width: 340px;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0;
  text-align: right;
}

.mlp-weight-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(78px, auto));
  gap: 0.25rem;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.25rem;
}

.mlp-weight-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.7rem;
}

.mlp-weight-toggle button.is-active {
  background: #172033;
  color: #ffffff;
}

.mlp-network-shell {
  min-height: 540px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 111, 143, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 111, 143, 0.08) 1px, transparent 1px),
    #fbfcfd;
  background-size: 28px 28px;
}

.mlp-network {
  display: block;
  width: 100%;
  height: auto;
  min-height: 540px;
  touch-action: none;
  user-select: none;
}

.mlp-board-bg {
  fill: rgba(255, 255, 255, 0.62);
  stroke: rgba(23, 32, 51, 0.08);
  stroke-width: 2;
}

.mlp-layer-label {
  fill: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.mlp-edge {
  cursor: pointer;
}

.mlp-edge path {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke 0.18s ease, stroke-width 0.18s ease;
}

.mlp-edge:hover path,
.mlp-edge.is-active path {
  stroke: #2f6f8f;
  stroke-width: 11;
}

.mlp-edge.is-inspected path {
  stroke: #f59e0b;
  stroke-width: 13;
}

.mlp-edge__label {
  fill: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  pointer-events: none;
  stroke: #ffffff;
  stroke-width: 4px;
  text-anchor: middle;
}

.mlp-edge.is-active .mlp-edge__label {
  fill: #172033;
}

.mlp-edge.is-inspected .mlp-edge__label {
  fill: #92400e;
}

.mlp-drag-line {
  stroke: #f59e0b;
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-width: 7;
  pointer-events: none;
}

.mlp-node {
  cursor: grab;
}

.mlp-node circle {
  fill: #ffffff;
  stroke: #172033;
  stroke-width: 3;
  filter: drop-shadow(0 10px 10px rgba(23, 32, 51, 0.12));
  transition: fill 0.16s ease, stroke 0.16s ease;
}

.mlp-node--input circle {
  fill: #dbeafe;
}

.mlp-node--hidden circle {
  fill: #dcfce7;
}

.mlp-node--output circle {
  fill: #ffedd5;
}

.mlp-node:hover circle,
.mlp-node.is-selected circle {
  stroke: #f59e0b;
  stroke-width: 5;
}

.mlp-node__label {
  fill: #172033;
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 800;
  pointer-events: none;
  text-anchor: middle;
}

.mlp-node__sub {
  fill: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
}

.mlp-side-stack {
  display: grid;
  gap: 1rem;
}

.mlp-equations {
  display: grid;
  gap: 0.55rem;
}

.mlp-equations p {
  margin: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  padding: 0.7rem;
}

.mlp-equations p.is-muted {
  color: #94a3b8;
}

.mlp-equation-term {
  display: inline-block;
  border-radius: 7px;
  padding: 0.05rem 0.22rem;
  transition: background 0.16s ease, color 0.16s ease;
}

.mlp-equation-term.is-inspected {
  background: #fef3c7;
  color: #92400e;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.32);
}

.mlp-equations__output {
  background: #eef6f4 !important;
  border: 1px solid rgba(47, 111, 143, 0.18);
}

.mlp-flow-card {
  border-color: rgba(47, 111, 143, 0.16);
  background: #f8fbff;
  padding: 0.85rem;
}

.mlp-flow-route {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 0.42rem;
  align-items: center;
  margin: 0.25rem 0 0.65rem;
}

.mlp-flow-route span {
  border-radius: 999px;
  background: #e8efe8;
  color: #172033;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.48rem;
}

.mlp-flow-route i {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6f8f, #f59e0b);
}

.mlp-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.mlp-flow-steps div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.22rem;
  align-items: start;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 0.58rem;
}

.mlp-flow-steps span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #172033;
  color: #ffffff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.mlp-flow-steps strong {
  color: #172033;
  font-size: 0.88rem;
  line-height: 1.35;
}

.mlp-flow-steps p {
  color: #4d5c6d;
  font-size: 0.76rem;
  line-height: 1.5;
  margin: 0;
}

.mlp-boundary-card output {
  min-width: 68px;
  border-radius: 999px;
  background: #172033;
  color: #ffffff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  text-align: center;
}

.mlp-boundary {
  display: block;
  width: 100%;
  aspect-ratio: 18 / 13;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.mlp-caption {
  font-size: 0.86rem;
  margin: 0.7rem 0 0;
}

.mlp-lesson-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mlp-lesson-strip article {
  padding: 1.2rem;
}

.mlp-lesson-strip p {
  margin: 0.55rem 0 0;
}

.mlp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 3rem;
}

.mlp-footer a {
  color: #2f6f8f;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .mlp-workbench {
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  }

  .mlp-side-stack {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  }
}

@media (max-width: 860px) {
  .mlp-hero,
  .mlp-workbench,
  .mlp-side-stack,
  .mlp-lesson-strip {
    grid-template-columns: 1fr;
  }

  .mlp-hero {
    padding-top: 5.2rem;
  }

  .mlp-hero__panel {
    grid-template-columns: 1fr;
  }

  .mlp-network-shell,
  .mlp-network {
    min-height: 430px;
  }

  .mlp-panel-head {
    display: grid;
  }

  .mlp-panel-head > p {
    text-align: left;
  }

  .mlp-board-actions {
    justify-items: start;
  }

  .mlp-board-actions p {
    text-align: left;
  }

  .mlp-flow-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mlp-hero,
  .mlp-workbench,
  .mlp-lesson-strip,
  .mlp-footer {
    width: min(100% - 0.75rem, 1440px);
  }

  .mlp-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .mlp-toolbox,
  .mlp-canvas-card,
  .mlp-equation-card,
  .mlp-boundary-card,
  .mlp-lesson-strip article {
    padding: 0.85rem;
  }

  .mlp-network-shell,
  .mlp-network {
    min-height: 340px;
  }

  .mlp-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
