:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #102033;
  --muted: #64748b;
  --line: #d8e1ec;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #06b6d4;
  --green: #16a34a;
  --orange: #f59e0b;
  --purple: #7c3aed;
  --red: #dc2626;
  --yellow: #fde047;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
  --radius: 8px;
  --control-h: 42px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    Arial,
    sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #eef6ff;
  position: relative;
  flex: 0 0 auto;
}

.brand-mark span {
  position: absolute;
  width: 24px;
  height: 10px;
  border: 2px solid var(--primary);
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
}

.brand-mark span:first-child {
  transform: rotate(42deg);
}

.brand-mark span:last-child {
  transform: rotate(-42deg);
  border-color: var(--cyan);
}

.brand h1,
.brand p,
.model-title-row h2,
.model-title-row p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.brand p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-meta {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 360px;
  gap: 16px;
  padding: 16px;
}

.model-rail,
.lesson-panel,
.model-area {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.model-rail,
.lesson-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-area {
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  gap: 14px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.panel-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.model-list {
  display: grid;
  gap: 10px;
}

.model-card {
  width: 100%;
  min-height: 82px;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--model-accent, var(--primary));
  border-radius: var(--radius);
  background: #ffffff;
  padding: 11px 10px;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.model-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--model-accent, var(--primary)) 45%, var(--line));
}

.model-card.is-active {
  background: color-mix(in srgb, var(--model-accent, var(--primary)) 8%, #ffffff);
  border-color: color-mix(in srgb, var(--model-accent, var(--primary)) 58%, var(--line));
}

.model-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.model-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.model-card small {
  display: inline-flex;
  margin-top: 8px;
  color: var(--model-accent, var(--primary));
  font-size: 11px;
  font-weight: 800;
}

.model-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.chapter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.model-title-row h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.2;
}

.model-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.model-badges span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stage-tab {
  min-width: 118px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 10px;
  text-align: left;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.stage-tab strong,
.stage-tab span {
  display: block;
}

.stage-tab strong {
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
}

.stage-tab span {
  margin-top: 2px;
  font-size: 10px;
  color: inherit;
  opacity: 0.75;
}

.stage-tab.is-active {
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.5);
  color: var(--primary-dark);
}

.model-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(0deg, rgba(241, 245, 249, 0.75), rgba(255, 255, 255, 0.95)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.12) 0 1px, transparent 1px 72px);
}

.model-stage.is-teacher {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.visual-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dna-visual-wrap {
  padding: 0;
}

.visual-wrap svg {
  width: min(100%, 900px);
  height: auto;
  max-height: 100%;
  display: block;
}

.dna-3d-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: grid;
  place-items: stretch;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.05), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.82));
}

.dna-3d-shell:active {
  cursor: grabbing;
}

.dna-3d-shell.is-panning,
.dna-3d-shell.is-panning:active {
  cursor: move;
}

.dna-viewport {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.dna-webgl-shell {
  height: clamp(360px, 58vh, 620px);
  min-height: 360px;
  overflow: hidden;
}

.dna-webgl-stack {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
  align-self: stretch;
  align-content: start;
}

.dna-webgl-viewport-frame {
  position: absolute;
  inset: 0;
}

.dna-webgl-host {
  position: absolute;
  inset: 0;
}

.dna-webgl-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.dna-webgl-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.dna-webgl-label {
  position: absolute;
  max-width: min(220px, 38vw);
  padding: 5px 8px;
  border: 1px solid rgba(216, 225, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--label-color, #0f172a);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.dna-reference-disclosure {
  width: min(100%, 920px);
  justify-self: center;
  border: 1px solid rgba(216, 225, 236, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dna-reference-toggle {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.dna-reference-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dna-reference-toggle strong {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-dark);
  font-size: 12px;
}

.dna-reference-disclosure.is-open .dna-reference-toggle {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius) var(--radius) 0 0;
}

.dna-reference-panel-wrap[hidden] {
  display: none;
}

.dna-reference-panel {
  position: static;
  width: auto;
  max-height: 270px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 0;
  background: rgba(248, 250, 252, 0.72);
  box-shadow: none;
  cursor: default;
  user-select: text;
  touch-action: pan-y;
}

.dna-reference-panel section {
  display: grid;
  gap: 7px;
}

.dna-reference-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.dna-reference-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.dna-reference-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 46px;
  padding: 5px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
}

.dna-reference-card--nucleotide {
  grid-template-columns: 72px minmax(0, 1fr);
}

.dna-reference-card strong,
.dna-reference-card span,
.dna-reference-card p {
  display: block;
}

.dna-reference-card strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
}

.dna-reference-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
}

.dna-reference-card p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.dna-reference-structure {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.dna-reference-structure polygon,
.dna-reference-structure path,
.dna-reference-structure circle {
  fill: var(--base-color);
  stroke: #334155;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.dna-reference-structure line {
  stroke: #64748b;
  stroke-width: 2.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.dna-reference-structure .purine-shared-edge {
  stroke: #334155;
  stroke-width: 1.8;
}

.dna-reference-structure text {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
}

.dna-reference-nucleotide .phosphate-node {
  fill: #06b6d4;
  stroke: #0891b2;
}

.dna-reference-nucleotide .sugar-node {
  fill: #fbbf24;
  stroke: #d97706;
}

.dna-reference-nucleotide .base-ring {
  fill: var(--base-color);
}

.dna-reference-nucleotide .phosphate-label,
.dna-reference-nucleotide .sugar-label {
  font-size: 10px;
}

.rna-webgl-layout {
  width: 100%;
  min-width: 0;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 280px);
  gap: 10px;
}

.rna-webgl-stack {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
  align-self: stretch;
  align-content: start;
}

.rna-webgl-shell {
  min-width: 0;
}

.protein-webgl-stack {
  width: 100%;
}

.protein-webgl-shell {
  min-width: 0;
}

.membrane-webgl-stack {
  width: 100%;
}

.plant-cell-part-switcher {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.plant-cell-part-switcher__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plant-cell-part-switcher__head strong {
  color: var(--text);
  font-size: 13px;
}

.plant-cell-part-switcher__buttons {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.plant-cell-part-button {
  min-width: 112px;
  min-height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-left: 4px solid var(--part-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  cursor: pointer;
  padding: 6px 9px;
  text-align: left;
}

.plant-cell-part-button strong,
.plant-cell-part-button span {
  display: block;
  color: inherit;
}

.plant-cell-part-button strong {
  font-size: 12px;
  line-height: 1.2;
}

.plant-cell-part-button span {
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.2;
  opacity: 0.76;
}

.plant-cell-part-button.is-active {
  border-color: color-mix(in srgb, var(--part-color) 48%, #cbd5e1);
  background: color-mix(in srgb, var(--part-color) 12%, #ffffff);
  color: #0f172a;
}

.membrane-webgl-shell {
  min-width: 0;
  height: clamp(430px, 62vh, 700px);
  min-height: 430px;
  background:
    radial-gradient(circle at 50% 38%, rgba(125, 211, 252, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(240, 249, 255, 0.96) 0%, rgba(224, 242, 254, 0.86) 44%, rgba(255, 241, 202, 0.82) 100%);
}

.membrane-state-control {
  width: min(310px, calc(100% - 24px));
}

.membrane-state-control label + label {
  margin-top: 8px;
}

.active-transport-stage-note {
  border-color: rgba(220, 38, 38, 0.16);
}

.active-transport-2d-shell {
  position: relative;
  width: 100%;
  height: clamp(430px, 66vh, 720px);
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 20%, rgba(125, 211, 252, 0.2), transparent 42%),
    linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  touch-action: pan-y;
  user-select: none;
}

.active-transport-2d-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.active-transport-2d-svg [data-part] {
  cursor: pointer;
}

.active-transport-2d-membrane circle,
.active-transport-2d-membrane path {
  vector-effect: non-scaling-stroke;
}

.active-transport-2d-membrane .lipid-tail {
  fill: none;
  stroke-linecap: round;
}

.active-transport-2d-membrane .lipid-tail-shadow {
  stroke: rgba(14, 165, 233, 0.16);
  stroke-width: 4.6;
}

.active-transport-2d-membrane .lipid-tail-core {
  stroke: url(#lipidTail2d);
  stroke-width: 2.7;
}

.active-transport-2d-carrier path {
  vector-effect: non-scaling-stroke;
}

.active-transport-2d-carrier [data-carrier-left],
.active-transport-2d-carrier [data-carrier-right] {
  stroke: rgba(15, 23, 42, 0.22);
  stroke-width: 2.2;
}

.active-transport-2d-carrier [data-carrier-grooves] path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 4;
  stroke-linecap: round;
}

.active-transport-2d-atpase text,
.active-transport-2d-nucleotide text,
.active-transport-2d-labels text,
.active-transport-2d-callouts text,
[data-transported-ion] text {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 5px;
}

.active-transport-2d-atpase text {
  fill: #7c2d12;
  font-size: 14px;
  text-anchor: middle;
}

.active-transport-2d-labels text,
.active-transport-2d-callouts text {
  fill: #0f172a;
  font-size: 18px;
}

.active-transport-2d-labels .tiny {
  fill: #1d4ed8;
  font-size: 14px;
}

.active-transport-2d-labels path,
.active-transport-2d-callouts path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 7 7;
  opacity: 0.7;
}

[data-transported-ion] text {
  fill: #ffffff;
  font-size: 10px;
  text-anchor: middle;
  stroke: rgba(88, 28, 135, 0.74);
  stroke-width: 2px;
}

.active-transport-2d-nucleotide .phosphate-bond {
  stroke: #9a3412;
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
}

.active-transport-2d-nucleotide .nucleotide-bond {
  fill: none;
  stroke: #9a3412;
  stroke-width: 2;
  stroke-linecap: round;
}

.active-transport-2d-nucleotide .adenine-ring {
  fill: #fde68a;
  stroke: #d97706;
  stroke-width: 1.7;
}

.active-transport-2d-nucleotide .adenine-ring-small {
  fill: #fcd34d;
}

.active-transport-2d-nucleotide .ribose-ring {
  fill: #fdba74;
  stroke: #d97706;
  stroke-width: 1.8;
}

.active-transport-2d-nucleotide [data-atp-label],
.active-transport-2d-nucleotide [data-adp-label] {
  fill: #9a3412;
  font-size: 15px;
  text-anchor: middle;
}

.active-transport-2d-phosphate path {
  fill: none;
  stroke: #0891b2;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.active-transport-2d-phosphate text {
  fill: #0e7490;
  font-size: 9px;
  text-anchor: middle;
  stroke: rgba(255, 255, 255, 0.74);
  stroke-width: 2px;
}

.active-transport-2d-note {
  max-width: min(390px, calc(100% - 24px));
}

.active-transport-2d-control {
  top: auto;
  right: auto;
  left: 12px;
  bottom: 58px;
  z-index: 5;
  width: min(360px, calc(100% - 24px));
}

.active-transport-2d-shell .dna-feedback {
  z-index: 5;
}

.transport-2d-shell {
  position: relative;
  width: 100%;
  height: clamp(430px, 66vh, 720px);
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 20%, rgba(125, 211, 252, 0.2), transparent 42%),
    linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  touch-action: pan-y;
  user-select: none;
}

.transport-2d-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.transport-2d-title-block text:first-child {
  fill: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 5px;
}

.transport-2d-title-block text:last-child {
  fill: #475569;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 4px;
}

.transport-2d-labels path {
  marker-end: url("#transport2dArrow");
}

.transport-2d-flow-path {
  fill: none;
  stroke: rgba(37, 99, 235, 0.68);
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-dasharray: 14 13;
  opacity: 0.72;
}

.transport-2d-flow-path.red {
  stroke: rgba(220, 38, 38, 0.68);
}

.transport-2d-membrane-window {
  fill: none;
  stroke: rgba(255, 255, 255, 0.56);
  stroke-width: 13px;
  stroke-linecap: round;
  opacity: 0.68;
}

.transport-2d-token {
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}

.transport-2d-token text {
  fill: #0f172a;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3px;
}

.transport-2d-token.ion text,
.transport-2d-token.sodium text {
  fill: #ffffff;
  stroke: rgba(15, 23, 42, 0.45);
  stroke-width: 2px;
}

.transport-2d-callout text {
  fill: #0f172a;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 5px;
}

.transport-2d-channel-shell,
.transport-2d-carrier [data-transport-carrier-left],
.transport-2d-carrier [data-transport-carrier-right] {
  stroke: rgba(15, 23, 42, 0.24);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.transport-2d-channel-shell {
  fill: url("#channelProtein2d");
}

.transport-2d-channel-pore {
  fill: rgba(15, 23, 42, 0.32);
  stroke: rgba(255, 255, 255, 0.46);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.transport-2d-helix {
  fill: none;
  stroke: rgba(14, 116, 144, 0.78);
  stroke-width: 13px;
  stroke-linecap: round;
  opacity: 0.86;
  vector-effect: non-scaling-stroke;
}

.transport-2d-helix.light {
  stroke: rgba(224, 242, 254, 0.9);
  stroke-width: 11px;
}

.transport-2d-channel-gate {
  fill: none;
  stroke: rgba(15, 23, 42, 0.56);
  stroke-width: 7px;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.transport-2d-carrier path {
  vector-effect: non-scaling-stroke;
}

.transport-2d-carrier[data-transport-part] {
  cursor: pointer;
}

.transport-2d-carrier [data-transport-carrier-cavity],
.transport-2d-carrier [data-transport-carrier-channel],
.transport-2d-carrier [data-transport-carrier-pocket] {
  pointer-events: none;
}

.transport-2d-note {
  max-width: min(460px, calc(100% - 24px));
}

.transport-2d-control {
  z-index: 6;
}

.transport-2d-feedback {
  z-index: 6;
}

.transport-2d-comparison-shell {
  height: clamp(460px, 70vh, 760px);
  min-height: 460px;
}

.transport-2d-comparison-svg {
  min-height: 460px;
}

.transport-2d-panel {
  opacity: 0.92;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.transport-2d-panel.is-current {
  opacity: 1;
  filter: drop-shadow(0 14px 18px rgba(15, 23, 42, 0.16));
}

.transport-2d-panel-frame {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 2;
}

.transport-2d-panel.is-current .transport-2d-panel-frame {
  stroke: rgba(245, 158, 11, 0.82);
  stroke-width: 3.5;
}

.transport-2d-panel-outside {
  fill: rgba(224, 242, 254, 0.56);
}

.transport-2d-panel-inside {
  fill: rgba(253, 230, 138, 0.28);
}

.transport-2d-panel-title {
  fill: #0f172a;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 4px;
}

.transport-2d-panel-title.second-line {
  font-size: 15px;
}

.transport-2d-panel-subtitle,
.transport-2d-panel-note,
.transport-2d-zone-mini,
.transport-2d-mode-tag {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
}

.transport-2d-panel-subtitle {
  fill: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  text-anchor: middle;
  stroke-width: 3px;
}

.transport-2d-panel-note {
  fill: #334155;
  font-size: 10.8px;
  font-weight: 850;
  text-anchor: middle;
  stroke-width: 3px;
}

.transport-2d-zone-mini {
  fill: #475569;
  font-size: 11px;
  font-weight: 850;
  stroke-width: 3px;
}

.transport-2d-mode-tag {
  fill: #0f172a;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  stroke-width: 4px;
}

.transport-2d-mini-membrane .lipid-tail {
  fill: none;
  stroke-linecap: round;
}

.transport-2d-mini-membrane .lipid-tail-shadow {
  stroke: rgba(14, 165, 233, 0.16);
  stroke-width: 3.6;
}

.transport-2d-mini-membrane .lipid-tail-core {
  stroke: url("#lipidTail2d");
  stroke-width: 2.2;
}

.transport-2d-mini-flow {
  fill: none;
  stroke: rgba(37, 99, 235, 0.66);
  stroke-width: 4.4px;
  stroke-linecap: round;
  stroke-dasharray: 10 10;
  opacity: 0.78;
}

.transport-2d-mini-flow.red {
  stroke: rgba(220, 38, 38, 0.72);
}

.transport-2d-mini-lipid-window {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 9px;
  stroke-linecap: round;
  opacity: 0.78;
}

.transport-2d-mini-channel-shell,
.transport-2d-mini-carrier [data-mini-left],
.transport-2d-mini-carrier [data-mini-right],
.transport-2d-mini-atpase path {
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.transport-2d-mini-channel-shell {
  fill: url("#channelProtein2d");
  stroke: #0e7490;
  stroke-width: 2.2px;
}

.transport-2d-mini-channel-pore {
  fill: rgba(15, 23, 42, 0.34);
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.6px;
}

.transport-2d-mini-gate {
  fill: none;
  stroke: rgba(15, 23, 42, 0.56);
  stroke-width: 4.4px;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.transport-2d-mini-carrier [data-mini-left],
.transport-2d-mini-carrier [data-mini-right] {
  stroke: rgba(15, 23, 42, 0.22);
  stroke-width: 2px;
}

.transport-2d-mini-carrier [data-mini-cavity] {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.4px;
}

.transport-2d-mini-carrier [data-mini-channel-shadow],
.transport-2d-mini-carrier [data-mini-pocket] {
  pointer-events: none;
}

.transport-2d-mini-carrier [data-mini-pocket] {
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 1.2px;
}

.transport-2d-mini-atpase text {
  fill: #7c2d12;
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2px;
}

.transport-2d-mini-atp {
  pointer-events: none;
}

.transport-2d-mini-token text {
  font-size: 9.5px;
}

.transport-2d-mini-token.glucose text {
  font-size: 8.5px;
}

.transport-integrated-shell {
  display: grid;
  grid-template-rows: auto auto minmax(420px, auto) auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  align-items: start;
}

.transport-integrated-svg {
  grid-row: 3;
  height: auto;
  min-height: 0;
  aspect-ratio: 1280 / 660;
}

.transport-integrated-shell .transport-2d-note {
  position: static;
  grid-row: 1;
  justify-self: stretch;
  max-width: none;
  margin: 10px 12px 0;
}

.transport-integrated-shell .transport-2d-control {
  position: static;
  grid-row: 2;
  justify-self: stretch;
  width: auto;
  max-width: none;
  margin: 8px 12px 0;
}

.transport-integrated-shell .transport-2d-feedback {
  position: static;
  grid-row: 4;
  min-height: 32px;
  margin: 8px 12px 10px;
}

.transport-integrated-membrane .lipid-tail {
  fill: none;
  stroke-linecap: round;
}

.transport-integrated-membrane .lipid-tail-shadow {
  stroke: rgba(14, 165, 233, 0.16);
  stroke-width: 4.6;
}

.transport-integrated-membrane .lipid-tail-core {
  stroke: url("#lipidTail2d");
  stroke-width: 2.7;
}

.transport-integrated-module {
  opacity: 0.32;
  transition: opacity 0.2s ease;
}

.transport-integrated-module.is-current {
  opacity: 1;
}

.transport-integrated-label,
.transport-integrated-sublabel {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
}

.transport-integrated-label {
  fill: #0f172a;
  font-size: 17px;
  font-weight: 900;
  stroke-width: 5px;
}

.transport-integrated-sublabel {
  fill: #475569;
  font-size: 12px;
  font-weight: 850;
  stroke-width: 4px;
}

.transport-integrated-token text {
  font-size: 10px;
}

.transport-integrated-channel-shell,
.transport-integrated-channel-pore,
.transport-integrated-channel-mouth,
.transport-integrated-channel-gate,
.transport-integrated-module.carrier [data-integrated-carrier-left],
.transport-integrated-module.carrier [data-integrated-carrier-right],
.transport-integrated-module.carrier [data-integrated-carrier-cavity],
.transport-integrated-module.carrier [data-integrated-carrier-channel],
.transport-integrated-module.carrier [data-integrated-pocket],
.transport-integrated-module.carrier [data-integrated-facilitated-pocket-recess],
.transport-integrated-module.carrier [data-integrated-cotransport-pocket-recess],
.transport-integrated-active-reuse .active-transport-2d-carrier path {
  vector-effect: non-scaling-stroke;
}

.transport-integrated-channel-shell {
  fill: url("#proteinChannelUnified2d");
  stroke: #0e7490;
  stroke-width: 2.4px;
  stroke-linejoin: round;
}

.transport-integrated-channel-pore {
  fill: rgba(15, 23, 42, 0.3);
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.6px;
}

.transport-integrated-channel-mouth {
  fill: rgba(15, 23, 42, 0.26);
  stroke: rgba(255, 255, 255, 0.48);
  stroke-width: 1.4px;
}

.transport-integrated-channel-gate {
  fill: url("#proteinChannelUnified2d");
  stroke: rgba(15, 23, 42, 0.24);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-integrated-particles .transport-integrated-particle-glow {
  opacity: 0.11;
}

.transport-integrated-particles .transport-integrated-particle-core {
  stroke: rgba(15, 23, 42, 0.18);
  stroke-width: 0.85px;
  vector-effect: non-scaling-stroke;
}

.transport-integrated-module.carrier [data-integrated-carrier-left],
.transport-integrated-module.carrier [data-integrated-carrier-right],
.transport-integrated-active-reuse .active-transport-2d-carrier [data-carrier-left],
.transport-integrated-active-reuse .active-transport-2d-carrier [data-carrier-right] {
  stroke: rgba(15, 23, 42, 0.22);
  stroke-width: 2.2px;
}

.transport-integrated-module.carrier [data-integrated-carrier-cavity] {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1.5px;
}

.transport-integrated-module.carrier [data-integrated-pocket] {
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.2px;
}

.transport-integrated-module.carrier [data-integrated-pocket-recess] {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.05px;
  vector-effect: non-scaling-stroke;
}

.transport-integrated-module.carrier [data-integrated-facilitated-pocket-recess] {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.05px;
  vector-effect: non-scaling-stroke;
}

.transport-integrated-module.carrier [data-integrated-cotransport-pocket-recess] {
  stroke: none;
  vector-effect: non-scaling-stroke;
}

.transport-integrated-atp-particle text,
.transport-integrated-labeled-particle text {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 3px;
}

.transport-integrated-atp-particle text {
  font-size: 19px;
}
}

.transport-integrated-active-reuse .active-transport-2d-atpase text {
  font-size: 14px;
}

.transport-integrated-active-reuse [data-phosphate-link] {
  stroke-linecap: round;
}

.protein-state-control {
  width: min(340px, calc(100% - 24px));
}

.protein-progress-marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.protein-progress-marks span:first-child {
  text-align: left;
}

.protein-progress-marks span:last-child {
  text-align: right;
}

.protein-stage-note {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  max-width: min(330px, calc(100% - 24px));
  padding: 9px 11px;
  border: 1px solid rgba(216, 225, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  pointer-events: none;
}

.rna-type-panel {
  min-width: 0;
  max-height: clamp(360px, 58vh, 620px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(216, 225, 236, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rna-type-heading {
  display: grid;
  gap: 2px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.rna-type-heading strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.rna-type-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rna-type-list {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.rna-type-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.84);
}

.rna-type-card.is-emphasized {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(240, 253, 250, 0.9);
}

.rna-type-card strong,
.rna-type-card span,
.rna-type-card p {
  display: block;
}

.rna-type-card strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.rna-type-card span {
  margin-top: 2px;
  color: #0f766e;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
}

.rna-type-card p {
  margin: 4px 0 0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
}

.rna-type-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  border-radius: 6px;
}

.rna-type-svg text {
  fill: #0f172a;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
}

.rna-type-svg .rna-type-title {
  font-size: 24px;
  stroke: none;
  stroke-width: 0;
}

.rna-reference-nucleotide .hydroxyl-node {
  fill: #ec4899;
  stroke: #be185d;
}

.rna-reference-nucleotide .hydroxyl-label {
  font-size: 6px;
  fill: #831843;
  stroke-width: 1.8px;
}

.dna-webgl-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}

.dna-webgl-loading[hidden] {
  display: none;
}

.dna-hit {
  cursor: pointer;
}

.dna-floating-label-layer {
  pointer-events: none;
}

.dna-base-text {
  font-family:
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-weight: 900;
  fill: #0f172a;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4.5px;
}

.dna-floating-label {
  font-size: 14px;
  font-weight: 800;
  fill: #102033;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 5px;
}

.dna-label-line {
  pointer-events: none;
}

.dna-hud text {
  fill: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.dna-feedback {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(216, 225, 236, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.dna-state-control {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(260px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(216, 225, 236, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  cursor: default;
}

.dna-state-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.dna-state-header strong {
  color: var(--primary);
}

.dna-state-control label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dna-state-control input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.stage-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.stage-caption strong {
  font-size: 14px;
}

.stage-caption span {
  color: var(--muted);
  font-size: 12px;
}

.view-chip {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lesson-content {
  display: grid;
  gap: 12px;
}

.lesson-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}

.lesson-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lesson-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.lesson-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.structure-legend {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.lesson-actions {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.lesson-practice-button {
  width: 100%;
}

.legend-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 16%, transparent);
}

.control-bar {
  position: relative;
  bottom: auto;
  z-index: 20;
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.control-button {
  height: var(--control-h);
  min-width: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.control-button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.38);
}

.control-button.primary,
.control-button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.control-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.control-button .button-label {
  display: inline-flex;
}

.model-label {
  font-size: 16px;
  font-weight: 800;
  fill: #102033;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 5px;
}

.tiny-label {
  font-size: 12px;
  font-weight: 800;
  fill: #475569;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4px;
}

.hidden-labels .model-label,
.hidden-labels .tiny-label,
.hidden-labels .label-line {
  display: none;
}

.highlight-on .focus-target {
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.88));
}

.playing .motion-target {
  animation: soft-motion calc(4s / var(--speed-factor, 1)) ease-in-out infinite alternate;
}

.playing .transport-particle {
  animation: travel calc(3s / var(--speed-factor, 1)) linear infinite;
}

.transport-comparison {
  width: min(100%, 1280px);
  max-height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.visual-wrap.transport-visual-wrap {
  overflow-x: auto;
}

.visual-wrap svg.transport-comparison {
  width: min(100%, 1280px);
}

.transport-bg.outside {
  fill: url("#transportOutside");
}

.transport-bg.inside {
  fill: url("#transportInside");
}

.transport-zone-label,
.transport-gradient-label,
.transport-mode-title,
.transport-mode-subtitle,
.transport-mode-note,
.transport-energy-label,
.transport-legend-strip text {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.transport-zone-label {
  fill: #134263;
  font-size: 22px;
  font-weight: 850;
}

.transport-gradient-label {
  font-size: 20px;
  font-weight: 900;
}

.transport-gradient-label.high {
  fill: #C84D4C;
}

.transport-gradient-label.low {
  fill: #276F8B;
}

.transport-legend-strip text:first-child {
  fill: #134263;
  font-size: 24px;
  font-weight: 900;
}

.transport-legend-strip text:last-child {
  fill: #475569;
  font-size: 16px;
  font-weight: 750;
}

.transport-lipid {
  animation: transport-lipid-sway calc(3.4s / var(--speed-factor, 1)) ease-in-out infinite alternate;
  animation-delay: var(--lipid-delay, 0s);
  animation-play-state: paused;
  transform-box: fill-box;
  transform-origin: center;
}

.transport-lipid circle {
  fill: #F8D67A;
  stroke: #C99C3B;
  stroke-width: 1.5px;
}

.transport-lipid path {
  fill: none;
  stroke: rgba(61, 82, 92, 0.72);
  stroke-width: 4.2px;
  stroke-linecap: round;
}

.transport-mode {
  opacity: 0.82;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.transport-mode.is-current {
  opacity: 1;
}

.highlight-on .transport-mode:not(.is-current) {
  opacity: 0.3;
}

.transport-mode-frame {
  fill: rgba(255, 255, 255, 0.42);
  stroke: rgba(19, 66, 99, 0.14);
  stroke-width: 2px;
}

.transport-mode.is-current .transport-mode-frame {
  fill: rgba(255, 255, 255, 0.66);
  stroke: rgba(245, 158, 11, 0.72);
  stroke-width: 4px;
  filter: drop-shadow(0 12px 16px rgba(15, 23, 42, 0.12));
}

.transport-mode-title {
  fill: #134263;
  font-size: 19px;
  font-weight: 900;
  text-anchor: middle;
}

.transport-mode-subtitle {
  fill: #64748B;
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.transport-mode-note {
  fill: #134263;
  font-size: 15px;
  font-weight: 850;
  text-anchor: middle;
}

.transport-energy-label {
  fill: #276F8B;
  font-size: 13px;
  font-weight: 850;
  text-anchor: middle;
}

.transport-energy-label.consumes {
  fill: #C84D4C;
}

.transport-protein path:first-child {
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.channel-protein path:first-child {
  fill: url("#channelBlue");
  stroke: #276F8B;
}

.carrier-protein path:first-child {
  stroke-width: 5px;
}

.carrier-assisted path:first-child {
  fill: url("#carrierPurple");
  stroke: #6D28D9;
}

.carrier-active path:first-child {
  fill: url("#activeRed");
  stroke: #8F1D2C;
}

.carrier-cotransport path:first-child {
  fill: url("#cotransportGreen");
  stroke: #316857;
}

.channel-hole {
  fill: rgba(12, 50, 76, 0.72);
}

.carrier-pocket {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(19, 66, 99, 0.28);
  stroke-width: 2px;
}

.sodium-pocket {
  fill: rgba(56, 189, 248, 0.46);
}

.sugar-pocket {
  fill: rgba(245, 158, 11, 0.42);
}

.transport-flow-arrow {
  fill: none;
  stroke: rgba(37, 99, 235, 0.72);
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
}

.transport-flow-head {
  fill: rgba(37, 99, 235, 0.72);
}

.transport-flow-arrow.active-up,
.transport-flow-arrow.cotransport-paired {
  stroke: rgba(200, 77, 76, 0.82);
}

.transport-flow-head.active-head,
.transport-flow-head.paired {
  fill: rgba(200, 77, 76, 0.82);
}

.transport-token,
.transport-atp,
.transport-pi {
  transform-box: fill-box;
  transform-origin: center;
}

.transport-token circle {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 2px;
}

.transport-token text,
.transport-atp text,
.transport-pi text {
  fill: #0F172A;
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.transport-token.oxygen circle {
  fill: #EF4444;
}

.transport-token.small circle {
  fill: #38BDF8;
}

.transport-token.ion circle {
  fill: #7C3AED;
}

.transport-token.glucose circle {
  fill: #FACC15;
}

.transport-token.glucose path {
  stroke: #92400E;
  stroke-width: 2px;
  stroke-linecap: round;
}

.transport-atp circle {
  fill: #F9AEBC;
  stroke: #C84D4C;
  stroke-width: 3px;
}

.transport-pi circle {
  fill: #FFFFFF;
  stroke: #C84D4C;
  stroke-width: 3px;
}

.transport-animated {
  animation-play-state: paused;
}

.playing .transport-animated {
  animation-play-state: running;
}

.free-one {
  animation: transport-free-pass calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.free-two {
  animation: transport-free-pass calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
  animation-delay: calc(-1.35s / var(--speed-factor, 1));
}

.free-three {
  animation: transport-free-pass-soft calc(4.8s / var(--speed-factor, 1)) ease-in-out infinite;
  animation-delay: calc(-2.1s / var(--speed-factor, 1));
}

.channel-ion-a {
  animation: transport-channel-pass calc(3.8s / var(--speed-factor, 1)) linear infinite;
}

.channel-ion-b {
  animation: transport-channel-pass calc(3.8s / var(--speed-factor, 1)) linear infinite;
  animation-delay: calc(-1.65s / var(--speed-factor, 1));
}

.carrier-assisted {
  animation: carrier-assisted-cycle calc(3.6s / var(--speed-factor, 1)) ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.carrier-substrate-a {
  animation: carrier-substrate-down calc(3.6s / var(--speed-factor, 1)) ease-in-out infinite;
}

.carrier-substrate-b {
  animation: carrier-substrate-release calc(3.6s / var(--speed-factor, 1)) ease-in-out infinite;
}

.carrier-active {
  animation: carrier-active-cycle calc(3.9s / var(--speed-factor, 1)) ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.active-ion {
  animation: active-ion-up calc(3.9s / var(--speed-factor, 1)) ease-in-out infinite;
}

.atp-one {
  animation: atp-pulse calc(3.9s / var(--speed-factor, 1)) ease-in-out infinite;
}

.adp-one {
  animation: product-pop calc(3.9s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pi-one {
  animation: product-pop calc(3.9s / var(--speed-factor, 1)) ease-in-out infinite;
  animation-delay: calc(0.12s / var(--speed-factor, 1));
}

.carrier-cotransport {
  animation: cotransport-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.co-sodium {
  animation: cotransport-sodium calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.co-sugar {
  animation: cotransport-sugar calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.hidden-labels .transport-zone-label,
.hidden-labels .transport-gradient-label,
.hidden-labels .transport-mode-subtitle,
.hidden-labels .transport-mode-note,
.hidden-labels .transport-energy-label,
.hidden-labels .transport-legend-strip {
  display: none;
}

@keyframes soft-motion {
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(4px);
  }
}

@keyframes travel {
  from {
    transform: translateX(-80px);
  }
  to {
    transform: translateX(85px);
  }
}

@keyframes transport-lipid-sway {
  from {
    transform: translateY(-2px);
  }
  to {
    transform: translateY(2px);
  }
}

@keyframes transport-free-pass {
  0% {
    opacity: 0.2;
    transform: translate(0, 0) scale(0.88);
  }
  18% {
    opacity: 1;
  }
  55% {
    transform: translate(8px, 150px) scale(1);
  }
  100% {
    opacity: 0.15;
    transform: translate(-4px, 320px) scale(0.86);
  }
}

@keyframes transport-free-pass-soft {
  0% {
    opacity: 0.2;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-8px, 150px);
  }
  100% {
    opacity: 0.15;
    transform: translate(9px, 302px);
  }
}

@keyframes transport-channel-pass {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  16% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(318px);
  }
}

@keyframes carrier-assisted-cycle {
  0%,
  100% {
    transform: scaleX(1) scaleY(1);
  }
  35% {
    transform: scaleX(1.08) scaleY(0.95);
  }
  58% {
    transform: scaleX(0.92) scaleY(1.04);
  }
}

@keyframes carrier-substrate-down {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.88);
  }
  16% {
    opacity: 1;
  }
  42% {
    opacity: 1;
    transform: translateY(84px) scale(1);
  }
  74% {
    opacity: 0.95;
    transform: translateY(238px) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translateY(314px) scale(0.82);
  }
}

@keyframes carrier-substrate-release {
  0%,
  55% {
    opacity: 0;
    transform: translateY(-130px) scale(0.84);
  }
  68% {
    opacity: 1;
    transform: translateY(-38px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.88);
  }
}

@keyframes carrier-active-cycle {
  0%,
  100% {
    transform: scaleX(1) scaleY(1);
  }
  28% {
    transform: scaleX(0.92) scaleY(1.04);
  }
  55% {
    transform: scaleX(1.12) scaleY(0.93);
  }
}

@keyframes active-ion-up {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.9);
  }
  16% {
    opacity: 1;
  }
  56% {
    opacity: 1;
    transform: translateY(-184px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-345px) scale(0.84);
  }
}

@keyframes atp-pulse {
  0%,
  18% {
    opacity: 1;
    transform: scale(1);
  }
  45% {
    opacity: 0.25;
    transform: translate(-34px, -24px) scale(0.68);
  }
  100% {
    opacity: 0.15;
    transform: translate(-42px, -36px) scale(0.62);
  }
}

@keyframes product-pop {
  0%,
  34% {
    opacity: 0;
    transform: scale(0.5);
  }
  52% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.2;
    transform: translateY(-26px) scale(0.76);
  }
}

@keyframes cotransport-cycle {
  0%,
  100% {
    transform: scaleX(1) scaleY(1);
  }
  38% {
    transform: scaleX(1.08) scaleY(0.94);
  }
  66% {
    transform: scaleX(0.94) scaleY(1.05);
  }
}

@keyframes cotransport-sodium {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  14% {
    opacity: 1;
  }
  76% {
    opacity: 1;
    transform: translate(16px, 318px);
  }
  100% {
    opacity: 0;
    transform: translate(18px, 342px);
  }
}

@keyframes cotransport-sugar {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  18% {
    opacity: 1;
  }
  76% {
    opacity: 1;
    transform: translate(-12px, -318px);
  }
  100% {
    opacity: 0;
    transform: translate(-14px, -342px);
  }
}

.transport-dynamic-comparison .transport-mode-frame {
  fill: rgba(255, 255, 255, 0.46);
}

.transport-free-track {
  fill: none;
  stroke: rgba(37, 99, 235, 0.22);
  stroke-width: 16px;
  stroke-linecap: round;
  stroke-dasharray: 4 18;
}

.transport-membrane-gap path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.46);
  stroke-width: 10px;
  stroke-linecap: round;
}

.transport-protein-complex {
  transform-box: fill-box;
  transform-origin: center;
}

.transport-protein-complex .transport-animated,
.transport-protein-complex .carrier-domain,
.transport-protein-complex .transport-helix,
.transport-protein-complex .protein-pocket,
.transport-protein-complex .binding-site,
.transport-protein-complex .carrier-gate,
.transport-protein-complex .channel-gate,
.transport-protein-complex .pump-head,
.transport-protein-complex .pump-phosphate {
  transform-box: fill-box;
  transform-origin: center;
}

.protein-shell,
.carrier-domain,
.pump-head {
  stroke-linejoin: round;
  stroke-linecap: round;
}

.protein-shell.channel-shell {
  fill: url("#channelBlue");
  stroke: #276F8B;
  stroke-width: 4.5px;
}

.channel-pore {
  fill: rgba(12, 50, 76, 0.58);
  stroke: rgba(255, 255, 255, 0.54);
  stroke-width: 3px;
  animation: channel-pore-cycle calc(3.8s / var(--speed-factor, 1)) ease-in-out infinite;
}

.transport-helix {
  fill: none;
  stroke-width: 13px;
  stroke-linecap: round;
  opacity: 0.82;
}

.channel-helix-a,
.channel-helix-b,
.channel-helix-c,
.channel-helix-d {
  stroke: rgba(39, 111, 139, 0.86);
  animation: channel-helix-breathe calc(3.8s / var(--speed-factor, 1)) ease-in-out infinite;
}

.channel-helix-b,
.channel-helix-c {
  stroke: rgba(126, 204, 235, 0.95);
}

.protein-loop {
  fill: none;
  stroke: rgba(19, 66, 99, 0.55);
  stroke-width: 7px;
  stroke-linecap: round;
}

.channel-gate,
.carrier-gate {
  fill: none;
  stroke: rgba(15, 23, 42, 0.52);
  stroke-width: 7px;
  stroke-linecap: round;
}

.channel-gate-top {
  animation: channel-gate-top-cycle calc(3.8s / var(--speed-factor, 1)) ease-in-out infinite;
}

.channel-gate-bottom {
  animation: channel-gate-bottom-cycle calc(3.8s / var(--speed-factor, 1)) ease-in-out infinite;
}

.channel-water {
  fill: rgba(224, 247, 255, 0.9);
  animation: channel-water-cycle calc(3.8s / var(--speed-factor, 1)) ease-in-out infinite;
}

.carrier-domain {
  stroke-width: 4.5px;
}

.assisted-left,
.assisted-right {
  fill: url("#carrierPurple");
  stroke: #6D28D9;
}

.assisted-left {
  animation: assisted-left-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.assisted-right {
  animation: assisted-right-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.assisted-helix-a,
.assisted-helix-b {
  stroke: rgba(124, 58, 237, 0.78);
  animation: assisted-helix-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.protein-pocket {
  fill: rgba(255, 255, 255, 0.62);
  stroke: rgba(19, 66, 99, 0.3);
  stroke-width: 2.2px;
}

.carrier-pocket-main {
  animation: assisted-pocket-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.carrier-gate-top {
  animation: carrier-top-gate-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.carrier-gate-bottom {
  animation: carrier-bottom-gate-cycle calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.binding-site {
  fill: rgba(255, 255, 255, 0.12);
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2px;
  stroke-dasharray: 4 4;
  animation: binding-site-pulse calc(4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-domain-left,
.pump-domain-right,
.pump-head {
  fill: url("#activeRed");
  stroke: #8F1D2C;
}

.pump-domain-left {
  animation: pump-left-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-domain-right {
  animation: pump-right-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-helix-a,
.pump-helix-b {
  stroke: rgba(200, 77, 76, 0.78);
  animation: pump-helix-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-pocket {
  animation: pump-pocket-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-gate-top {
  animation: pump-top-gate-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-gate-bottom {
  animation: pump-bottom-gate-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-head {
  stroke-width: 4px;
  animation: pump-head-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.pump-phosphate {
  fill: #FFFFFF;
  stroke: #C84D4C;
  stroke-width: 3px;
  animation: pump-phosphate-cycle calc(4.2s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-left,
.cotransport-right {
  fill: url("#cotransportGreen");
  stroke: #316857;
}

.cotransport-left {
  animation: cotransport-left-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-right {
  animation: cotransport-right-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-helix-a,
.cotransport-helix-b {
  stroke: rgba(49, 104, 87, 0.78);
  animation: cotransport-helix-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-gate-top {
  animation: cotransport-top-gate-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-gate-bottom {
  animation: cotransport-bottom-gate-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.cotransport-site-a,
.cotransport-site-b,
.sodium-pocket,
.sugar-pocket {
  animation: cotransport-site-cycle calc(4.4s / var(--speed-factor, 1)) ease-in-out infinite;
}

.protein-state-label {
  fill: #334155;
  font-size: 11px;
  font-weight: 850;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 4px;
  stroke-linejoin: round;
}

@keyframes channel-pore-cycle {
  0%,
  100% {
    transform: scaleX(0.72);
    opacity: 0.58;
  }
  28%,
  70% {
    transform: scaleX(1.18);
    opacity: 0.92;
  }
}

@keyframes channel-helix-breathe {
  0%,
  100% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(var(--helix-shift, 2px));
  }
}

@keyframes channel-gate-top-cycle {
  0%,
  100% {
    transform: translateY(4px) scaleX(0.78);
  }
  28%,
  72% {
    transform: translateY(-8px) scaleX(1.36);
  }
}

@keyframes channel-gate-bottom-cycle {
  0%,
  100% {
    transform: translateY(-4px) scaleX(0.78);
  }
  28%,
  72% {
    transform: translateY(8px) scaleX(1.32);
  }
}

@keyframes channel-water-cycle {
  0%,
  100% {
    opacity: 0.15;
    transform: translateY(-12px);
  }
  35%,
  78% {
    opacity: 0.95;
    transform: translateY(12px);
  }
}

@keyframes assisted-left-cycle {
  0%,
  100% {
    transform: translate(-7px, -6px) rotate(-4deg);
  }
  28% {
    transform: translate(2px, 0) rotate(0deg);
  }
  62% {
    transform: translate(8px, 8px) rotate(5deg);
  }
}

@keyframes assisted-right-cycle {
  0%,
  100% {
    transform: translate(7px, -6px) rotate(4deg);
  }
  28% {
    transform: translate(-2px, 0) rotate(0deg);
  }
  62% {
    transform: translate(-8px, 8px) rotate(-5deg);
  }
}

@keyframes assisted-helix-cycle {
  0%,
  100% {
    transform: translateY(-6px);
  }
  45% {
    transform: translateY(7px);
  }
}

@keyframes assisted-pocket-cycle {
  0%,
  100% {
    transform: translateY(-12px) scale(1.12);
    opacity: 0.95;
  }
  38% {
    transform: translateY(4px) scale(0.78);
    opacity: 0.48;
  }
  68% {
    transform: translateY(22px) scale(1.1);
    opacity: 0.9;
  }
}

@keyframes carrier-top-gate-cycle {
  0%,
  100% {
    transform: translateY(-12px) scaleX(1.25);
  }
  35%,
  70% {
    transform: translateY(7px) scaleX(0.64);
  }
}

@keyframes carrier-bottom-gate-cycle {
  0%,
  42% {
    transform: translateY(-4px) scaleX(0.66);
  }
  68%,
  100% {
    transform: translateY(12px) scaleX(1.28);
  }
}

@keyframes binding-site-pulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.9);
  }
  34%,
  58% {
    opacity: 0.86;
    transform: scale(1.12);
  }
}

@keyframes pump-left-cycle {
  0%,
  100% {
    transform: translate(7px, 8px) rotate(5deg);
  }
  35% {
    transform: translate(0, 0) rotate(0deg);
  }
  66% {
    transform: translate(-8px, -8px) rotate(-5deg);
  }
}

@keyframes pump-right-cycle {
  0%,
  100% {
    transform: translate(-7px, 8px) rotate(-5deg);
  }
  35% {
    transform: translate(0, 0) rotate(0deg);
  }
  66% {
    transform: translate(8px, -8px) rotate(5deg);
  }
}

@keyframes pump-helix-cycle {
  0%,
  100% {
    transform: translateY(8px);
  }
  55% {
    transform: translateY(-8px);
  }
}

@keyframes pump-pocket-cycle {
  0%,
  100% {
    transform: translateY(20px) scale(1.1);
    opacity: 0.92;
  }
  36% {
    transform: translateY(2px) scale(0.76);
    opacity: 0.5;
  }
  66% {
    transform: translateY(-20px) scale(1.08);
    opacity: 0.88;
  }
}

@keyframes pump-top-gate-cycle {
  0%,
  38% {
    transform: translateY(7px) scaleX(0.65);
  }
  64%,
  100% {
    transform: translateY(-12px) scaleX(1.3);
  }
}

@keyframes pump-bottom-gate-cycle {
  0%,
  34% {
    transform: translateY(12px) scaleX(1.28);
  }
  60%,
  100% {
    transform: translateY(-7px) scaleX(0.65);
  }
}

@keyframes pump-head-cycle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  36% {
    transform: translateY(-10px) scale(0.92);
  }
  65% {
    transform: translateY(-22px) scale(1.06);
  }
}

@keyframes pump-phosphate-cycle {
  0%,
  28% {
    opacity: 0;
    transform: scale(0.5);
  }
  43%,
  74% {
    opacity: 1;
    transform: scale(1.18);
  }
  100% {
    opacity: 0;
    transform: scale(0.7);
  }
}

@keyframes cotransport-left-cycle {
  0%,
  100% {
    transform: translate(-9px, -7px) rotate(-5deg);
  }
  34% {
    transform: translate(1px, 0) rotate(0deg);
  }
  66% {
    transform: translate(8px, 9px) rotate(5deg);
  }
}

@keyframes cotransport-right-cycle {
  0%,
  100% {
    transform: translate(9px, -7px) rotate(5deg);
  }
  34% {
    transform: translate(-1px, 0) rotate(0deg);
  }
  66% {
    transform: translate(-8px, 9px) rotate(-5deg);
  }
}

@keyframes cotransport-helix-cycle {
  0%,
  100% {
    transform: translateY(-7px);
  }
  56% {
    transform: translateY(9px);
  }
}

@keyframes cotransport-top-gate-cycle {
  0%,
  100% {
    transform: translateY(-12px) scaleX(1.24);
  }
  35%,
  68% {
    transform: translateY(7px) scaleX(0.68);
  }
}

@keyframes cotransport-bottom-gate-cycle {
  0%,
  45% {
    transform: translateY(-7px) scaleX(0.66);
  }
  70%,
  100% {
    transform: translateY(12px) scaleX(1.28);
  }
}

@keyframes cotransport-site-cycle {
  0%,
  100% {
    transform: translateY(-18px) scale(1.12);
    opacity: 0.9;
  }
  42% {
    transform: translateY(0) scale(0.78);
    opacity: 0.48;
  }
  72% {
    transform: translateY(26px) scale(1.08);
    opacity: 0.88;
  }
}

@keyframes cotransport-sugar {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.9);
  }
  16% {
    opacity: 1;
  }
  42% {
    opacity: 1;
    transform: translate(-18px, 95px) scale(1);
  }
  76% {
    opacity: 1;
    transform: translate(-20px, 318px) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translate(-18px, 342px) scale(0.84);
  }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr) 316px;
  }

  .rna-webgl-layout {
    grid-template-columns: minmax(300px, 1fr) 220px;
  }

  .rna-type-card {
    grid-template-columns: 1fr;
  }

  .control-button .button-label {
    display: none;
  }
}

@media (max-width: 1320px) {
  .app-shell {
    padding-bottom: 166px;
  }

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

  .workspace {
    grid-template-columns: 1fr;
  }

  .model-rail {
    order: 1;
  }

  .model-area {
    order: 2;
    grid-template-rows: auto minmax(280px, auto) auto;
  }

  .lesson-panel {
    order: 3;
  }

  .model-list {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    overflow-x: auto;
  }

  .control-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .control-group {
    justify-content: center;
    flex-wrap: wrap;
  }

  .control-button .button-label {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .topbar,
  .workspace,
  .control-bar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .model-title-row {
    flex-direction: column;
  }

  .model-title-row h2 {
    font-size: 20px;
  }

  .model-badges {
    justify-content: flex-start;
  }

  .model-list {
    grid-template-columns: 1fr;
  }

  .model-stage {
    min-height: 300px;
  }

  .visual-wrap.transport-visual-wrap {
    justify-items: start;
    padding: 12px;
  }

  .visual-wrap.transport-visual-wrap svg.transport-comparison {
    width: 760px;
    max-width: none;
  }

  .dna-3d-shell {
    grid-template-rows: auto minmax(240px, 1fr) auto;
    min-height: 390px;
  }

  .dna-state-control {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    width: auto;
    margin: 10px 12px 0;
  }

  .dna-reference-card p {
    display: none;
  }

  .dna-viewport {
    grid-row: 2;
    min-height: 240px;
  }

  .dna-feedback {
    position: static;
    grid-row: 3;
    min-height: 32px;
    margin: 0 12px 10px;
    font-size: 12px;
  }

  .stage-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-button {
    min-width: 48px;
    padding: 0 9px;
  }

  .rna-webgl-layout {
    grid-template-columns: 1fr;
  }

  .rna-type-panel {
    max-height: none;
    overflow: visible;
  }

  .rna-type-card {
    grid-template-columns: 1fr;
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  .dna-webgl-shell {
    grid-template-rows: auto minmax(320px, 54vh) auto auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .dna-webgl-viewport-frame {
    position: relative;
    inset: auto;
    grid-row: 2;
    place-self: stretch;
    min-height: 320px;
    height: min(54vh, 500px);
  }

  .dna-webgl-shell .dna-state-control {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    width: auto;
    margin: 10px 12px 0;
  }

  .dna-webgl-shell .dna-feedback {
    position: static;
    grid-row: 3;
    min-height: 32px;
    margin: 0 12px 8px;
    font-size: 12px;
  }

  .dna-reference-panel {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .dna-reference-list {
    grid-template-columns: 1fr;
  }

  .rna-webgl-layout {
    grid-template-columns: 1fr;
  }

  .rna-webgl-shell {
    grid-template-rows: auto minmax(320px, 54vh) auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .rna-webgl-shell .dna-webgl-viewport-frame {
    position: relative;
    inset: auto;
    grid-row: 2;
    place-self: stretch;
    min-height: 320px;
    height: min(54vh, 500px);
  }

  .rna-webgl-shell .rna-state-control {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    width: auto;
    margin: 10px 12px 0;
  }

  .rna-webgl-shell .dna-feedback {
    position: static;
    grid-row: 3;
    min-height: 32px;
    margin: 0 12px 8px;
    font-size: 12px;
  }

  .protein-webgl-shell .protein-stage-note {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    max-width: none;
    margin: 10px 12px 0;
  }

  .protein-webgl-shell .dna-feedback {
    position: static;
    grid-row: 3;
    min-height: 32px;
    margin: 0 12px 8px;
    font-size: 12px;
  }

  .protein-webgl-shell {
    grid-template-rows: auto auto minmax(320px, 54vh) auto;
  }

  .protein-webgl-shell .protein-state-control {
    position: static;
    grid-row: 2;
    justify-self: stretch;
    width: auto;
    margin: 8px 12px 0;
  }

  .protein-webgl-shell .dna-webgl-viewport-frame {
    grid-row: 3;
  }

  .protein-webgl-shell .dna-feedback {
    grid-row: 4;
  }

  .membrane-webgl-shell {
    grid-template-rows: auto minmax(330px, 56vh) auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .membrane-webgl-shell .membrane-state-control {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    width: auto;
    margin: 10px 12px 0;
  }

  .membrane-webgl-shell .dna-webgl-viewport-frame {
    position: relative;
    inset: auto;
    grid-row: 2;
    place-self: stretch;
    min-height: 330px;
    height: min(56vh, 520px);
  }

  .membrane-webgl-shell .dna-feedback {
    position: static;
    grid-row: 3;
    min-height: 32px;
    margin: 0 12px 8px;
    font-size: 12px;
  }

  .active-transport-2d-shell,
  .transport-2d-shell {
    display: grid;
    grid-template-rows: auto auto auto auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .active-transport-2d-shell .active-transport-2d-note,
  .transport-2d-shell .transport-2d-note {
    position: static;
    grid-row: 1;
    justify-self: stretch;
    max-width: none;
    margin: 10px 12px 0;
  }

  .active-transport-2d-svg,
  .transport-2d-svg {
    grid-row: 3;
    min-height: 0;
    height: auto;
    aspect-ratio: 960 / 560;
  }

  .transport-2d-comparison-svg {
    aspect-ratio: 1280 / 660;
  }

  .transport-integrated-svg {
    aspect-ratio: 1280 / 660;
  }

  .active-transport-2d-control {
    position: static;
    grid-row: 2;
    justify-self: stretch;
    width: auto;
    margin: 8px 12px 0;
    padding: 8px 10px;
  }

  .active-transport-2d-control .dna-state-header {
    margin-bottom: 5px;
  }

  .active-transport-2d-control label {
    gap: 4px;
    font-size: 11.5px;
  }

  .active-transport-2d-shell .dna-feedback,
  .transport-2d-shell .dna-feedback {
    position: static;
    grid-row: 4;
    min-height: 32px;
    margin: 6px 12px 8px;
    font-size: 12px;
  }
}

.internal-session-bar {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: min(520px, calc(100vw - 28px));
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(166, 229, 241, 0.2);
  border-radius: 12px;
  background: rgba(28, 47, 68, 0.86);
  box-shadow: 0 14px 34px rgba(3, 16, 30, 0.24);
  color: #f8fbff;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.internal-session-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-session-bar button {
  border: 1px solid rgba(166, 229, 241, 0.22);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(166, 229, 241, 0.12);
  color: #a6e5f1;
  font: inherit;
  cursor: pointer;
}

.internal-session-bar button:hover {
  background: rgba(166, 229, 241, 0.2);
}

.studio-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: 1fr;
  font-family:
    "Inter",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    Arial,
    sans-serif;
  background:
    linear-gradient(180deg, rgba(18, 32, 48, 0.2), rgba(18, 32, 48, 0.86) 76%),
    linear-gradient(110deg, rgba(166, 229, 241, 0.1), transparent 34%),
    linear-gradient(90deg, rgba(166, 229, 241, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(166, 229, 241, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 126, 169, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(88, 126, 169, 0.08) 1px, transparent 1px),
    var(--studio-page-bg, #263d58);
  background-size: auto, auto, 28px 28px, 28px 28px, 140px 140px, 140px 140px, auto;
}

.studio-shell::before,
.studio-shell::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.studio-shell::before {
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 36%, rgba(166, 229, 241, 0.11) 36.12%, transparent 36.55%),
    linear-gradient(110deg, transparent 0 74%, rgba(80, 146, 165, 0.12) 74.12%, transparent 74.55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 38%);
  opacity: 0.88;
}

.studio-shell::after {
  top: 24px;
  right: 44px;
  width: 360px;
  height: 160px;
  border-top: 1px solid rgba(166, 229, 241, 0.2);
  border-right: 1px solid rgba(166, 229, 241, 0.16);
  transform: skewX(-18deg);
}

.studio-sidebar {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 14px;
  border-right: 1px solid rgba(166, 229, 241, 0.14);
  background:
    linear-gradient(180deg, rgba(27, 45, 66, 0.96), rgba(21, 35, 52, 0.98)),
    var(--studio-sidebar-bg, #1f344d);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.05),
    18px 0 44px rgba(3, 16, 30, 0.12);
  color: #d9e9f2;
  backdrop-filter: blur(18px);
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 8px;
  color: #f8fbff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.studio-brand::after {
  content: "";
  width: 30px;
  height: 1px;
  margin-left: auto;
  background: linear-gradient(90deg, rgba(166, 229, 241, 0), rgba(166, 229, 241, 0.72));
}

.studio-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid rgba(166, 229, 241, 0.32);
  box-shadow:
    0 0 0 4px rgba(166, 229, 241, 0.08),
    0 14px 32px rgba(3, 16, 30, 0.24);
}

.studio-nav {
  display: grid;
  gap: 10px;
}

.studio-nav-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 14px;
  background: transparent;
  color: rgba(217, 233, 242, 0.68);
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.studio-nav-button:hover {
  transform: translateX(2px);
  color: #f8fbff;
  border-color: rgba(166, 229, 241, 0.24);
  background: rgba(166, 229, 241, 0.09);
  box-shadow: 0 10px 26px rgba(3, 16, 30, 0.18);
}

.studio-nav-button.is-active {
  color: #f8fbff;
  background:
    linear-gradient(90deg, rgba(166, 229, 241, 0.22), rgba(80, 146, 165, 0.24)),
    var(--studio-sidebar-active, #5092a5);
  border-color: rgba(166, 229, 241, 0.32);
  box-shadow:
    inset 3px 0 0 rgba(166, 229, 241, 0.95),
    0 14px 30px rgba(3, 16, 30, 0.2);
}

.studio-nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(166, 229, 241, 0.18);
  background:
    linear-gradient(135deg, rgba(94, 126, 169, 0.42), rgba(80, 146, 165, 0.28));
  color: #a6e5f1;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.studio-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100vh;
  overflow: auto;
}

.resource-view {
  width: min(var(--studio-content-max, 1520px), calc(100vw - 210px));
  margin: 0 auto;
  padding: 54px 56px 76px;
}

.resource-header {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
  border-bottom: 1px solid rgba(166, 229, 241, 0.18);
  padding-bottom: 26px;
}

.resource-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(360px, 52vw);
  height: 2px;
  background: linear-gradient(90deg, #a6e5f1, rgba(80, 146, 165, 0.72), transparent);
}

.resource-header::before {
  content: "BIO_MODEL_DB // ONLINE";
  position: absolute;
  left: 0;
  top: 0;
  color: #a6e5f1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.resource-header h1 {
  margin: 0;
  color: var(--studio-text, #f8fbff);
  font-family:
    "Source Han Serif SC",
    "Noto Serif SC",
    "SimSun",
    serif;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.resource-header p {
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(217, 233, 242, 0.72);
  font-size: 16px;
  line-height: 1.6;
}

.resource-header-meta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(166, 229, 241, 0.24);
  border-radius: 999px;
  background: rgba(31, 52, 77, 0.72);
  color: #a6e5f1;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(3, 16, 30, 0.18);
  backdrop-filter: blur(14px);
}

.resource-grid {
  counter-reset: model-card;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--studio-card-min, 300px), 1fr));
  gap: var(--studio-card-gap, 28px);
}

.resource-card.model-card {
  counter-increment: model-card;
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(166, 229, 241, 0.16);
  border-left: 3px solid color-mix(in srgb, var(--model-accent, #a6e5f1) 68%, #a6e5f1);
  border-radius: var(--studio-card-radius, 18px);
  padding: 0;
  background:
    linear-gradient(180deg, rgba(49, 75, 105, 0.82), rgba(31, 52, 77, 0.94)),
    var(--studio-card-bg, #243a54);
  box-shadow:
    0 24px 64px rgba(3, 16, 30, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.resource-card.model-card::after {
  content: counter(model-card, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  color: rgba(248, 251, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.resource-card.model-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #a6e5f1, rgba(80, 146, 165, 0.2));
  opacity: 0.72;
}

.resource-card.model-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 229, 241, 0.42);
  box-shadow:
    0 30px 76px rgba(3, 16, 30, 0.38),
    0 0 0 1px rgba(166, 229, 241, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.resource-card.model-card.is-active {
  background: linear-gradient(180deg, rgba(55, 85, 120, 0.9), rgba(31, 52, 77, 0.96));
  border-color: rgba(166, 229, 241, 0.5);
  box-shadow:
    0 0 0 3px rgba(166, 229, 241, 0.12),
    0 0 42px rgba(166, 229, 241, 0.16),
    0 24px 64px rgba(3, 16, 30, 0.34);
}

.resource-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--studio-thumb-ratio, 16 / 9);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(35, 56, 82, 0.92), rgba(42, 68, 98, 0.76)),
    linear-gradient(90deg, rgba(166, 229, 241, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(166, 229, 241, 0.055) 1px, transparent 1px),
    #22364f;
  background-size: auto, 22px 22px, 22px 22px, auto;
  border-bottom: 1px solid rgba(166, 229, 241, 0.14);
}

.resource-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(166, 229, 241, 0.1) 50%, transparent 52%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18% 82%, rgba(255, 255, 255, 0.08));
  opacity: 0.72;
}

.resource-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
  transition:
    transform 240ms ease,
    filter 240ms ease;
}

.resource-card.model-card:hover .resource-thumb svg {
  transform: scale(1.03);
  filter: saturate(1.1) contrast(1.03);
}

.resource-card-body {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px 22px 58px;
}

.resource-card-body::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  align-self: end;
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 46px;
  width: calc(100% - 44px);
  background: linear-gradient(90deg, rgba(166, 229, 241, 0.24), rgba(166, 229, 241, 0.04));
}

.resource-card-body::after {
  content: "进入模型";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  color: #f8fbff;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  background:
    linear-gradient(#a6e5f1, #a6e5f1) right center / 18px 2px no-repeat,
    linear-gradient(45deg, transparent 45%, #a6e5f1 47% 58%, transparent 60%) right 1px center / 10px 10px no-repeat;
}

.resource-card.model-card small {
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #a6e5f1;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.resource-card.model-card strong {
  color: var(--studio-text, #f8fbff);
  font-family:
    "Source Han Serif SC",
    "Noto Serif SC",
    "Microsoft YaHei",
    serif;
  font-size: 23px;
  line-height: 1.28;
  font-weight: 700;
}

.resource-card.model-card span.resource-card-body,
.resource-card.model-card .resource-card-body span {
  margin: 0;
}

.resource-card.model-card .resource-card-body span {
  color: rgba(217, 233, 242, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.resource-empty {
  min-height: 520px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed rgba(166, 229, 241, 0.24);
  border-radius: 8px;
  background: rgba(31, 52, 77, 0.58);
  color: rgba(217, 233, 242, 0.74);
  text-align: center;
}

.resource-empty-mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(248, 251, 255, 0.88) 0 22%, transparent 23%),
    linear-gradient(135deg, rgba(166, 229, 241, 0.28), rgba(80, 146, 165, 0.38));
}

.resource-empty strong {
  color: #f8fbff;
  font-size: 22px;
  font-weight: 900;
}

.resource-empty span {
  font-size: 15px;
}

[data-portal-current="models"] .resource-empty {
  display: none;
}

[data-portal-current]:not([data-portal-current="models"]) .resource-grid,
[data-portal-current]:not([data-portal-current="models"]) .resource-header-meta {
  display: none;
}

[data-app-view="library"] .player-view,
[data-app-view="player"] .resource-view {
  display: none;
}

.player-view {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
}

.player-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.back-to-library {
  min-width: 128px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d9e4e8;
  border-radius: 8px;
  background: #ffffff;
  color: #176b86;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.back-to-library:hover {
  background: #eef9fb;
}

.player-topbar .model-title-row {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.player-content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.player-view .model-area {
  padding: 14px;
  grid-template-rows: auto minmax(420px, 1fr) auto;
}

.player-view .control-bar {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  flex-direction: row;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-tuning-access="locked"] [data-action="teacher"] {
  display: none !important;
}

.model-stage.is-tuning-preview {
  border-color: rgba(20, 184, 166, 0.62);
  box-shadow:
    inset 0 0 0 2px rgba(20, 184, 166, 0.12),
    0 0 0 3px rgba(20, 184, 166, 0.08);
}

.model-stage .visual-wrap {
  transform-origin: center center;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    opacity 120ms ease;
  will-change: transform, filter, opacity;
}

.tuning-panel {
  position: fixed;
  top: 88px;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(90, 116, 128, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.tuning-panel[hidden] {
  display: none !important;
}

.tuning-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tuning-panel-header span,
.tuning-section h3,
.tuning-note span {
  display: block;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.tuning-panel-header strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.tuning-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.tuning-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #f8fbfc;
}

.tuning-section h3 {
  margin: 0;
}

.structure-tuning {
  background: #f0fdfa;
  border-color: rgba(20, 184, 166, 0.24);
}

.structure-tuning[hidden] {
  display: none !important;
}

.structure-tuning-controls {
  display: grid;
  gap: 10px;
}

.tuning-control,
.tuning-note {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.tuning-control span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tuning-control strong {
  color: #0f766e;
  font-size: 12px;
}

.tuning-control input[type="range"] {
  width: 100%;
  accent-color: #0f766e;
}

.tuning-control input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 4px;
  border: 1px solid #d3e1e8;
  border-radius: var(--radius);
  background: #ffffff;
  cursor: pointer;
}

.tuning-control select,
.tuning-note textarea {
  width: 100%;
  border: 1px solid #d3e1e8;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tuning-control select {
  height: 38px;
  padding: 0 10px;
}

.tuning-note textarea {
  min-height: 74px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

.tuning-switch {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.tuning-switch input {
  width: 18px;
  height: 18px;
  accent-color: #0f766e;
}

.tuning-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tuning-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.tuning-save {
  background: #0f766e;
  color: #ffffff;
}

.tuning-reset {
  background: #ffffff;
  color: #334155;
}

.tuning-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(20, 184, 166, 0.09);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .player-content {
    grid-template-columns: 1fr;
  }

  .player-view .lesson-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .studio-shell::after {
    display: none;
  }

  .studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .studio-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
  }

  .studio-brand {
    min-height: 44px;
    flex: 0 0 auto;
    font-size: 14px;
  }

  .studio-brand img {
    width: 34px;
    height: 34px;
  }

  .studio-nav {
    display: flex;
    gap: 8px;
    min-width: max-content;
  }

  .studio-nav-button {
    width: auto;
    min-height: 42px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .studio-nav-button:hover {
    transform: none;
  }

  .studio-main {
    min-height: 0;
  }

  .resource-view {
    width: 100%;
    padding: 20px 14px 40px;
  }

  .resource-header {
    min-height: auto;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 18px;
  }

  .resource-header h1 {
    font-size: 26px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .player-view {
    min-height: 0;
    padding: 10px;
  }

  .player-topbar {
    grid-template-columns: 1fr;
  }

  .back-to-library {
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 12px;
  }

  .player-topbar .model-title-row {
    display: grid;
    gap: 10px;
  }

  .player-view .model-area {
    padding: 10px;
    grid-template-rows: auto minmax(360px, 1fr) auto;
  }

  .player-view .control-bar {
    overflow-x: auto;
    align-items: center;
    flex-wrap: nowrap;
  }

  .tuning-panel {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    max-height: min(76vh, 620px);
  }

  .internal-session-bar {
    top: auto;
    right: 10px;
    bottom: 10px;
  }
}

/* Modern light science homepage, approved sidebar concept */
.studio-shell {
  --science-ink: #17324d;
  --science-muted: #54708f;
  --science-teal: #1f91aa;
  --science-cyan: #89e4f5;
  --science-green: #2ac7a2;
  --science-paper: #f5fbff;
  --science-line: rgba(31, 145, 170, 0.16);
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  color: var(--science-ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 251, 255, 0.74) 430px, rgba(245, 251, 255, 0.98)),
    var(--studio-page-bg, var(--science-paper));
  background-size: auto, auto;
}

.studio-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 14%, rgba(137, 228, 245, 0.5), transparent 27%),
    radial-gradient(circle at 27% 8%, rgba(42, 199, 162, 0.12), transparent 27%);
  background-size: auto, auto;
}

.studio-shell::after {
  display: none;
}

.organelle-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

[data-app-view="player"] .organelle-background,
[data-app-view="player"] .organelle-gesture-layer {
  display: none;
}

.organelle-gesture-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.organelle-gesture-handle {
  position: absolute;
  width: var(--handle-width, 132px);
  height: var(--handle-height, 88px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.organelle-gesture-handle.is-dragging {
  cursor: grabbing;
}

.organelle-webgl-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.organelle-webgl-background[hidden] {
  display: none !important;
}

.organelle-webgl-background canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.organelle-webgl-handle {
  position: absolute;
  width: var(--hit-width, 150px);
  height: var(--hit-height, 110px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.organelle-webgl-handle.is-dragging {
  cursor: grabbing;
}

.organelle-svg-background[hidden] {
  display: none !important;
}

.organelle-svg-background,
.organelle-svg-background * {
  pointer-events: none !important;
}

.organelle-bg-drift {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 2 / 1;
  animation: organelleBackgroundDrift var(--dur) ease-in-out infinite alternate;
  animation-delay: var(--delay);
  transform: translate3d(0, 0, 0);
}

.organelle-bg-drift.is-nucleus-drift {
  aspect-ratio: 1 / 1;
}

.organelle-bg-item {
  width: 100%;
  height: 100%;
  pointer-events: none;
  cursor: grab;
  opacity: 0.18;
  transform: rotate(calc(var(--base-rotate) + var(--drag-rotate))) scale(1);
  transform-origin: 50% 50%;
  transition:
    opacity 220ms ease,
    filter 220ms ease,
    transform 160ms ease;
  filter: saturate(1.18) drop-shadow(0 18px 30px rgba(23, 50, 77, 0.1));
  mix-blend-mode: multiply;
}

.organelle-bg-item:hover,
.organelle-bg-item.is-dragging {
  opacity: 0.34;
  filter: saturate(1.24) drop-shadow(0 20px 34px rgba(23, 50, 77, 0.16));
}

.organelle-bg-item.is-dragging {
  cursor: grabbing;
}

.organelle-bg-item svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: organelleBackgroundFlip var(--flip-dur) ease-in-out infinite alternate;
}

.organelle-bg-item.is-dragging svg {
  animation-play-state: paused;
}

.organelle-bg-item svg * {
  pointer-events: visiblePainted;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.organelle-bg-item.is-dragging svg * {
  cursor: grabbing;
}

.organelle-bg-item.is-chloroplast ellipse {
  fill: rgba(139, 217, 143, 0.48);
  stroke: rgba(40, 143, 85, 0.66);
  stroke-width: 5;
}

.organelle-bg-item.is-chloroplast path {
  fill: none;
  stroke: rgba(40, 143, 85, 0.42);
  stroke-width: 4;
  stroke-linecap: round;
}

.organelle-bg-item.is-chloroplast .organelle-grana rect {
  fill: rgba(58, 178, 82, 0.64);
  stroke: rgba(28, 130, 69, 0.38);
  stroke-width: 2;
}

.organelle-bg-item.is-mitochondrion path:first-child {
  fill: rgba(255, 168, 86, 0.44);
  stroke: rgba(232, 117, 53, 0.56);
  stroke-width: 5;
}

.organelle-bg-item.is-mitochondrion .organelle-cristae {
  fill: none;
  stroke: rgba(238, 92, 71, 0.74);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.organelle-bg-item.is-mitochondrion .organelle-cristae.soft {
  stroke: rgba(255, 228, 169, 0.62);
  stroke-width: 4;
}

.organelle-bg-item.is-golgi path {
  fill: none;
  stroke: rgba(34, 165, 195, 0.58);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.organelle-bg-item.is-golgi circle {
  fill: rgba(37, 157, 191, 0.44);
  stroke: rgba(19, 128, 160, 0.46);
  stroke-width: 3;
}

.organelle-bg-item.is-nucleus circle:first-child {
  fill: rgba(165, 109, 232, 0.34);
  stroke: rgba(121, 71, 199, 0.52);
  stroke-width: 5;
}

.organelle-bg-item.is-nucleus .organelle-inner {
  fill: rgba(181, 139, 237, 0.18);
  stroke: rgba(121, 71, 199, 0.32);
  stroke-width: 3;
}

.organelle-bg-item.is-nucleus .organelle-nucleolus {
  fill: rgba(111, 77, 204, 0.46);
  stroke: rgba(82, 55, 162, 0.46);
  stroke-width: 3;
}

.organelle-bg-item.is-nucleus .organelle-pores circle {
  fill: rgba(91, 65, 165, 0.34);
}

.organelle-bg-item.is-nucleus .organelle-chromatin {
  fill: none;
  stroke: rgba(101, 74, 185, 0.5);
  stroke-width: 4;
  stroke-linecap: round;
}

.studio-sidebar,
.studio-main {
  position: relative;
  z-index: 4;
}

@keyframes organelleBackgroundDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  52% {
    transform: translate3d(var(--dx), var(--dy), 0);
  }

  100% {
    transform: translate3d(calc(var(--dx) * -0.55), calc(var(--dy) * 0.72), 0);
  }
}

@keyframes organelleBackgroundFlip {
  0% {
    transform: perspective(520px) rotateY(-14deg) rotateX(4deg);
  }

  100% {
    transform: perspective(520px) rotateY(18deg) rotateX(-6deg);
  }
}

.studio-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 224px;
  min-height: calc(100vh - 48px);
  margin: 24px 0 24px 28px;
  padding: 28px 20px;
  border: 1px solid rgba(80, 146, 165, 0.2);
  border-radius: 34px;
  color: var(--science-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(226, 244, 250, 0.92) 48%, rgba(213, 237, 245, 0.96) 100%),
    var(--studio-sidebar-bg, #ffffff);
  box-shadow: 0 24px 60px rgba(23, 50, 77, 0.13);
  backdrop-filter: blur(18px);
}

.studio-brand {
  min-height: auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 0 0 14px;
  color: var(--science-ink);
  font-size: 16px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.studio-brand span {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  width: 100%;
  text-align: justify;
  text-align-last: justify;
  white-space: nowrap;
}

.studio-brand::after {
  content: "ANDER BIOLOGY STUDIO";
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  width: 100%;
  height: auto;
  margin-top: 0;
  padding: 4px 5px;
  box-sizing: border-box;
  border: 1px solid rgba(137, 228, 245, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #17324d, #235f79);
  color: #dff8ff;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(23, 50, 77, 0.16);
}

.studio-brand img {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  padding: 5px;
  border: 1px solid rgba(80, 146, 165, 0.3);
  border-radius: 50%;
  background: #eefaff;
  box-shadow:
    0 0 0 4px rgba(80, 146, 165, 0.08),
    0 12px 28px rgba(38, 61, 88, 0.14);
}

.studio-nav {
  gap: 13px;
  margin-top: 28px;
}

.studio-nav-button {
  min-height: 60px;
  padding: 0 14px;
  border: 1px solid rgba(31, 145, 170, 0.17);
  border-radius: 18px;
  color: var(--science-muted);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06);
}

.studio-nav-button span:last-child {
  display: grid;
  gap: 6px;
  line-height: 1.1;
}

.studio-nav-button span:last-child::after {
  color: rgba(94, 126, 169, 0.72);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.studio-nav-button[data-portal-section="models"] span:last-child::after {
  content: "Biology Models";
}

.studio-nav-button[data-portal-section="exams"] span:last-child::after {
  content: "Exam Papers";
}

.studio-nav-button[data-portal-section="books"] span:last-child::after {
  content: "Studio Books";
}

.studio-nav-button[data-portal-section="courses"] span:last-child::after {
  content: "Studio Courses";
}

.studio-nav-button.is-active span:last-child::after {
  color: rgba(255, 255, 255, 0.64);
}

.studio-nav-button:hover {
  transform: translateX(3px);
  border-color: rgba(80, 146, 165, 0.28);
  background: rgba(255, 255, 255, 0.96);
}

.studio-nav-button.is-active {
  color: #ffffff;
  border-color: rgba(23, 50, 77, 0.96);
  background:
    linear-gradient(135deg, rgba(23, 50, 77, 0.98), rgba(31, 145, 170, 0.96)),
    var(--studio-sidebar-active, var(--science-ink));
  box-shadow: 0 16px 34px rgba(23, 50, 77, 0.19);
}

.studio-nav-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(31, 145, 170, 0.22);
  border-radius: 12px;
  color: var(--science-teal);
  background: rgba(137, 228, 245, 0.18);
}

.studio-nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-nav-button.is-active .studio-nav-icon {
  color: var(--science-cyan);
  border-color: rgba(166, 229, 241, 0.32);
  background: rgba(255, 255, 255, 0.13);
}

.studio-sidebar-ornament {
  margin-top: auto;
  margin-bottom: -22px;
  min-height: 248px;
  padding: 24px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.studio-sidebar-ornament img {
  width: min(162px, 92%);
  max-height: min(312px, calc(100vh - 426px));
  object-fit: contain;
  object-position: center bottom;
  border-radius: 18px;
  opacity: 0.62;
  mix-blend-mode: multiply;
  filter: saturate(0.9) contrast(0.94);
}

.studio-main {
  min-width: 0;
  color: var(--science-ink);
}

.resource-view {
  width: min(var(--studio-content-max, 1360px), calc(100vw - 292px));
  margin: 0 auto;
  padding: 50px 28px 70px;
}

.resource-header {
  position: relative;
  min-height: 410px;
  display: grid;
  grid-template-columns: minmax(600px, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: 28px;
  margin: 0 0 40px;
  padding: 34px 0 40px;
  border: 0;
}

.resource-header::before {
  content: "BIOLOGY INTERACTIVE MODELS";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--science-teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.resource-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(80, 146, 165, 0.28), transparent);
}

.resource-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 780px;
  transform: translateY(-14px);
}

.resource-header h1 {
  max-width: 780px;
  margin: 0;
  color: var(--science-ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(30px, 2.62vw, 38px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
  white-space: pre-line;
}

.resource-header p {
  max-width: 720px;
  margin: 0;
  color: #7892b5;
  font-size: clamp(16px, 1.12vw, 19px);
  line-height: 1.45;
  font-weight: 500;
}

.resource-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.learning-map-action,
.hero-primary-action,
.hero-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.learning-map-action {
  justify-content: flex-start;
  gap: 12px;
  width: min(508px, 100%);
  min-height: 70px;
  padding: 10px 18px 10px 12px;
  border: 1px solid rgba(31, 145, 170, 0.2);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(38, 61, 88, 0.98), rgba(31, 145, 170, 0.92)),
    #263d58;
  box-shadow:
    0 18px 38px rgba(38, 61, 88, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.learning-map-action:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 46px rgba(38, 61, 88, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.learning-map-action-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(166, 229, 241, 0.52);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.learning-map-action-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #a6e5f1;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.learning-map-action-copy {
  display: grid;
  gap: 7px;
  text-align: left;
}

.learning-map-action-copy strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: 0;
}

.learning-map-action-copy small {
  color: rgba(224, 250, 255, 0.78);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-primary-action {
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #263d58, #5092a5);
  box-shadow: 0 16px 30px rgba(38, 61, 88, 0.22);
}

.hero-secondary-action {
  padding: 0 22px;
  color: var(--science-ink);
  border: 1px solid rgba(80, 146, 165, 0.22);
  background: rgba(255, 255, 255, 0.76);
}

.resource-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 118px));
  gap: 12px;
  margin-top: 2px;
}

.resource-hero-stats span {
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  border: 1px solid rgba(31, 145, 170, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 250, 254, 0.58));
  box-shadow: 0 12px 24px rgba(23, 50, 77, 0.06);
}

.resource-hero-stats strong {
  color: var(--science-ink);
  font-size: 21px;
  line-height: 1;
}

.resource-hero-stats small {
  color: var(--science-muted);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.1;
}

.resource-hero-preview {
  position: relative;
  min-height: 320px;
}

.hero-preview-panel {
  position: relative;
  min-height: 320px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(31, 145, 170, 0.24);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(234, 250, 255, 0.76)),
    radial-gradient(circle at 75% 20%, rgba(137, 228, 245, 0.44), transparent 34%);
  box-shadow: 0 28px 70px rgba(23, 50, 77, 0.13);
}

.hero-preview-panel::before,
.hero-preview-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(80, 146, 165, 0.16);
  border-radius: 999px;
  pointer-events: none;
}

.hero-preview-panel::before {
  width: 430px;
  height: 430px;
  right: -160px;
  top: -170px;
}

.hero-preview-panel::after {
  width: 250px;
  height: 250px;
  left: -90px;
  bottom: -130px;
}

.hero-preview-topline,
.hero-preview-footer {
  position: relative;
  z-index: 2;
}

.hero-preview-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--science-teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.hero-preview-topline i {
  width: 62px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(80, 146, 165, 0.16), rgba(166, 229, 241, 0.98));
}

.hero-preview-stage {
  position: relative;
  height: 204px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 24px;
}

.hero-preview-carousel {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
}

.hero-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0);
  filter: saturate(1.08) contrast(1.02);
  transition:
    opacity 680ms ease,
    transform 760ms cubic-bezier(0.22, 0.72, 0.18, 1),
    clip-path 760ms cubic-bezier(0.22, 0.72, 0.18, 1);
  will-change: opacity, transform, clip-path;
}

.hero-preview-image.is-active {
  z-index: 6;
  opacity: 1;
}

.hero-preview-image.is-entering {
  z-index: 8;
}

.hero-preview-image.is-leaving {
  z-index: 7;
  opacity: 0;
}

.hero-preview-carousel[data-transition="slide-up"] .hero-preview-image.is-entering {
  animation: heroPreviewEnterUp 760ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.hero-preview-carousel[data-transition="slide-up"] .hero-preview-image.is-leaving {
  transform: translate3d(0, -24%, 0) scale(0.985);
}

.hero-preview-carousel[data-transition="slide-down"] .hero-preview-image.is-entering {
  animation: heroPreviewEnterDown 760ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.hero-preview-carousel[data-transition="slide-down"] .hero-preview-image.is-leaving {
  transform: translate3d(0, 24%, 0) scale(0.985);
}

.hero-preview-carousel[data-transition="slide-left"] .hero-preview-image.is-entering {
  animation: heroPreviewEnterLeft 760ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.hero-preview-carousel[data-transition="slide-left"] .hero-preview-image.is-leaving {
  transform: translate3d(-26%, 0, 0) scale(0.985);
}

.hero-preview-carousel[data-transition="fan"] .hero-preview-image.is-entering {
  transform-origin: 8% 92%;
  animation: heroPreviewEnterFan 820ms cubic-bezier(0.18, 0.72, 0.18, 1) both;
}

.hero-preview-carousel[data-transition="fan"] .hero-preview-image.is-leaving {
  transform-origin: 92% 8%;
  transform: rotate(9deg) translate3d(16%, -10%, 0) scale(0.98);
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
}

@keyframes heroPreviewEnterUp {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0) scale(1.02);
  }
}

@keyframes heroPreviewEnterDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0) scale(1.02);
  }
}

@keyframes heroPreviewEnterLeft {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0) scale(1.02);
  }
}

@keyframes heroPreviewEnterFan {
  from {
    opacity: 0;
    transform: rotate(-12deg) translate3d(-18%, 12%, 0) scale(1.02);
    clip-path: polygon(0 100%, 0 100%, 0 100%, 0 100%);
  }
}

.preview-dna-strand {
  position: absolute;
  top: 14px;
  width: 12px;
  height: 188px;
  border-radius: 999px;
  background: linear-gradient(180deg, #37d7a1, #7d66f1);
  box-shadow: 0 16px 28px rgba(80, 146, 165, 0.16);
}

.preview-dna-left {
  left: 43%;
  transform: rotate(-25deg);
}

.preview-dna-right {
  left: 55%;
  transform: rotate(25deg);
}

.preview-dna-rung {
  position: absolute;
  left: 42%;
  width: 98px;
  height: 6px;
  border-radius: 999px;
  background: rgba(94, 126, 169, 0.38);
  transform: rotate(0deg);
}

.preview-dna-rung.rung-1 { top: 48px; }
.preview-dna-rung.rung-2 { top: 84px; left: 41%; width: 112px; }
.preview-dna-rung.rung-3 { top: 121px; }
.preview-dna-rung.rung-4 { top: 158px; left: 41%; width: 112px; }

.preview-cell-ring {
  position: absolute;
  left: 16px;
  bottom: 18px;
  width: 154px;
  height: 96px;
  border: 10px solid rgba(80, 146, 165, 0.22);
  border-radius: 44% 56% 48% 52%;
  transform: rotate(-10deg);
}

.preview-cell-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #5092a5;
  box-shadow: 0 0 0 6px rgba(166, 229, 241, 0.42);
}

.preview-cell-dot.dot-1 { right: 48px; top: 56px; }
.preview-cell-dot.dot-2 { left: 84px; top: 68px; background: #37d7a1; }
.preview-cell-dot.dot-3 { right: 128px; bottom: 42px; background: #7d66f1; }

.hero-preview-footer {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 145, 170, 0.15);
}

.hero-preview-footer strong {
  color: var(--science-ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 19px;
  line-height: 1.18;
  font-weight: 900;
}

.hero-preview-footer small {
  color: #7892b5;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
}

.resource-header-meta {
  display: none;
}

[data-portal-current]:not([data-portal-current="models"]) .resource-hero-actions,
[data-portal-current]:not([data-portal-current="models"]) .resource-hero-stats,
[data-portal-current]:not([data-portal-current="models"]) .resource-hero-preview {
  display: none;
}

[data-portal-current]:not([data-portal-current="models"]) .resource-header {
  min-height: 240px;
  grid-template-columns: 1fr;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(var(--studio-card-min, 196px), 1fr));
  gap: var(--studio-card-gap, 22px);
  align-items: start;
  counter-reset: none;
}

#model-library-list {
  scroll-margin-top: 24px;
}

.resource-card.model-card {
  min-height: 0;
  grid-template-rows: auto auto;
  align-content: center;
  align-self: start;
  overflow: hidden;
  padding: 20px 0;
  border: 1px solid rgba(31, 145, 170, 0.15);
  border-radius: min(var(--studio-card-radius, 24px), 26px);
  color: var(--science-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.9)),
    var(--studio-card-bg, #ffffff);
  box-shadow: 0 18px 42px rgba(23, 50, 77, 0.09);
}

.resource-card.model-card::before,
.resource-card.model-card::after {
  display: none;
}

.resource-card.model-card:hover {
  transform: translateY(-6px);
  border-color: rgba(31, 145, 170, 0.34);
  box-shadow: 0 24px 54px rgba(23, 50, 77, 0.14);
}

.resource-card.model-card.is-active {
  border-color: rgba(31, 145, 170, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.9)),
    var(--studio-card-bg, #ffffff);
  box-shadow: 0 18px 42px rgba(23, 50, 77, 0.09);
}

.resource-thumb {
  width: auto;
  margin: 0 20px;
  overflow: hidden;
  border: 1px solid rgba(31, 145, 170, 0.13);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 22%, rgba(137, 228, 245, 0.52), transparent 34%),
    linear-gradient(135deg, rgba(246, 253, 255, 0.94), rgba(232, 247, 251, 0.86));
}

.resource-thumb::after {
  display: none;
}

.resource-thumb svg {
  width: 100%;
  height: 100%;
  filter: saturate(1.03) contrast(1.01);
}

.resource-thumb-image {
  position: relative;
  background: linear-gradient(135deg, rgba(246, 253, 255, 0.94), rgba(232, 247, 251, 0.86));
}

.resource-thumb-image img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
}

.resource-thumb-image svg {
  display: none;
}

.resource-thumb-image.is-fallback svg {
  display: block;
}

.resource-card-body {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 16px 20px 0;
  background: transparent;
}

.resource-card-body::before,
.resource-card-body::after {
  display: none;
}

.resource-card.model-card small {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 8px;
  border: 1px solid rgba(31, 145, 170, 0.18);
  border-radius: 9px;
  color: var(--science-teal);
  background: rgba(137, 228, 245, 0.18);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.resource-card.model-card strong {
  color: var(--science-ink);
  font-size: clamp(15px, 0.96vw, 18px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-card.model-card .resource-card-body span {
  color: #7892b5;
  font-size: 13px;
  line-height: 1.28;
  font-weight: 500;
  margin-top: 2px;
}

.resource-empty {
  border: 1px solid rgba(80, 146, 165, 0.18);
  border-radius: 26px;
  color: var(--science-ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(38, 61, 88, 0.08);
}

.resource-empty span {
  color: var(--science-muted);
}

.learning-map-page {
  min-height: 100vh;
  color: var(--science-ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(166, 229, 241, 0.38), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(124, 102, 241, 0.12), transparent 28%),
    linear-gradient(135deg, #f7fcff 0%, #eef9fb 52%, #f8fbef 100%);
}

.learning-map-page::before,
.learning-map-page::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(80, 146, 165, 0.16);
  border-radius: 999px;
}

.learning-map-page::before {
  width: 680px;
  height: 680px;
  right: -240px;
  top: -220px;
}

.learning-map-page::after {
  width: 520px;
  height: 520px;
  left: -220px;
  bottom: -250px;
}

.learning-map-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.learning-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.learning-map-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.learning-map-brand img {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #263d58;
  box-shadow: 0 14px 30px rgba(38, 61, 88, 0.18);
}

.learning-map-brand span {
  display: grid;
  gap: 4px;
}

.learning-map-brand strong {
  color: var(--science-ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.learning-map-brand small {
  color: #7892b5;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.learning-map-back {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(31, 145, 170, 0.18);
  border-radius: 999px;
  color: var(--science-ink);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(23, 50, 77, 0.08);
}

.learning-map-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 24px;
  padding: 22px 0 6px;
}

.learning-map-kicker {
  margin: 0 0 10px;
  color: var(--science-teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.learning-map-hero h1 {
  margin: 0;
  color: var(--science-ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.learning-map-hero p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #7892b5;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 600;
}

.learning-map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  width: min(370px, 100%);
}

.learning-map-summary span {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgba(31, 145, 170, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 30px rgba(23, 50, 77, 0.07);
}

.learning-map-summary strong {
  color: var(--science-ink);
  font-size: 21px;
  line-height: 1;
}

.learning-map-summary small {
  color: var(--science-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.learning-map-board {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(31, 145, 170, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 50%, rgba(166, 229, 241, 0.3), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(234, 250, 255, 0.68));
  box-shadow: 0 28px 70px rgba(23, 50, 77, 0.12);
}

.learning-map-board::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(80, 146, 165, 0.1);
  border-radius: 28px;
  pointer-events: none;
}

.learning-map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.learning-map-lines path {
  fill: none;
  stroke: rgba(31, 145, 170, 0.28);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 9 13;
}

.learning-map-lines .learning-map-soft-line {
  stroke: rgba(124, 102, 241, 0.16);
  stroke-width: 1.4;
  stroke-dasharray: none;
}

.learning-map-center,
.learning-node {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(31, 145, 170, 0.18);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(23, 50, 77, 0.1);
  backdrop-filter: blur(12px);
}

.learning-map-center {
  left: 50%;
  top: 50%;
  width: 230px;
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border-radius: 30px;
  text-align: center;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 18%, rgba(166, 229, 241, 0.55), transparent 48%),
    linear-gradient(135deg, rgba(38, 61, 88, 0.96), rgba(31, 145, 170, 0.9));
}

.learning-map-center span,
.learning-map-center small {
  color: rgba(224, 250, 255, 0.78);
  font-weight: 900;
}

.learning-map-center span {
  font-size: 12px;
  letter-spacing: 0.18em;
}

.learning-map-center strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
}

.learning-map-center small {
  font-size: 12px;
  line-height: 1.25;
}

.learning-node {
  width: 250px;
  min-height: 178px;
  display: grid;
  grid-template-rows: 82px auto auto auto;
  gap: 6px;
  padding: 14px;
  border-radius: 24px;
  color: var(--science-ink);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.learning-node:hover {
  transform: translateY(-5px);
  border-color: rgba(31, 145, 170, 0.34);
  box-shadow: 0 24px 54px rgba(23, 50, 77, 0.15);
}

.learning-node img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border: 1px solid rgba(31, 145, 170, 0.12);
  border-radius: 16px;
  background: rgba(247, 252, 255, 0.9);
}

.learning-node span {
  color: var(--science-teal);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.learning-node strong {
  color: var(--science-ink);
  font-size: 17px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
}

.learning-node small {
  color: #7892b5;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
}

.node-dna { left: 76px; top: 54px; }
.node-rna { left: 52px; top: 220px; }
.node-protein { left: 84px; bottom: 54px; }
.node-membrane { right: 72px; top: 50px; }
.node-transport { right: 44px; top: 220px; }
.node-cell { right: 82px; bottom: 54px; }

.internal-session-bar {
  border: 1px solid rgba(94, 126, 169, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 32px rgba(38, 61, 88, 0.08);
  backdrop-filter: blur(14px);
}

.internal-session-bar span {
  color: var(--science-ink);
}

.internal-session-bar button,
.internal-session-bar a {
  border-radius: 14px;
}

[data-cover-capture="true"].studio-shell {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #edf9ff 0%, #f9fbef 100%) !important;
}

[data-cover-capture="true"] .studio-sidebar,
[data-cover-capture="true"] .resource-view,
[data-cover-capture="true"] .player-topbar,
[data-cover-capture="true"] .lesson-panel,
[data-cover-capture="true"] .control-bar,
[data-cover-capture="true"] .stage-strip,
[data-cover-capture="true"] .internal-session-bar,
[data-cover-capture="true"] .tuning-panel {
  display: none !important;
}

html[data-cover-capture="true"] .internal-session-bar,
html[data-cover-capture="true"] .tuning-panel {
  display: none !important;
}

[data-cover-capture="true"] .studio-main,
[data-cover-capture="true"] .player-view,
[data-cover-capture="true"] .player-content,
[data-cover-capture="true"] .model-area,
[data-cover-capture="true"] .model-stage {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

[data-cover-capture="true"] .model-stage {
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(166, 229, 241, 0.34), transparent 36%),
    linear-gradient(180deg, #edf9ff 0%, #f9fbef 100%) !important;
}

[data-cover-capture="true"] .model-stage .visual-wrap {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  transform: none !important;
}

@media (max-width: 1180px) {
  .studio-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .studio-sidebar {
    width: 204px;
    margin-left: 20px;
  }

  .resource-view {
    width: calc(100vw - 264px);
    padding-right: 24px;
    padding-left: 24px;
  }

  .resource-header {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .resource-hero-preview {
    display: none;
  }

  .learning-map-hero {
    align-items: start;
    flex-direction: column;
  }

  .learning-map-summary {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .studio-shell {
    display: block;
    min-height: 100vh;
    background-size: auto, 30px 30px, 30px 30px, auto;
  }

  .studio-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: auto;
    max-height: 82px;
    min-height: auto;
    margin: 0;
    padding: 12px;
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .studio-sidebar::-webkit-scrollbar {
    display: none;
  }

  .studio-sidebar-ornament {
    display: none;
  }

  .studio-brand {
    grid-template-columns: 42px max-content;
    flex: 0 0 auto;
    gap: 10px;
    font-size: 15px;
    padding: 0;
  }

  .studio-brand::after {
    display: none;
  }

  .studio-brand img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }

  .studio-nav {
    display: flex;
    gap: 8px;
    min-width: max-content;
    margin: 0;
  }

  .studio-nav-button {
    width: auto;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    white-space: nowrap;
  }

  .studio-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
  }

  .resource-view {
    width: 100%;
    padding: 34px 16px 46px;
  }

  .resource-header {
    padding-top: 32px;
    margin-bottom: 28px;
  }

  .resource-header h1 {
    max-width: 100%;
    font-size: clamp(27px, 7vw, 30px);
    line-height: 1.22;
  }

  .resource-header p {
    font-size: 16px;
  }

  .resource-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-hero-stats span {
    padding: 12px 10px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .learning-map-shell {
    width: min(100% - 28px, 760px);
    padding-top: 18px;
  }

  .learning-map-header,
  .learning-map-hero {
    align-items: start;
    flex-direction: column;
  }

  .learning-map-summary {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .learning-map-board {
    min-height: auto;
    display: grid;
    gap: 14px;
    padding: 18px;
  }

  .learning-map-lines {
    display: none;
  }

  .learning-map-center,
  .learning-node {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }

  .learning-node {
    min-height: 0;
  }
}

.model-stage-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.model-stage-fullscreen:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(239, 246, 255, 0.94);
}

.model-stage-fullscreen svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html.model-css-fullscreen-active,
html.model-css-fullscreen-active body {
  overflow: hidden;
}

.model-area:fullscreen,
.model-area.is-css-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 52% 34%, rgba(137, 228, 245, 0.2), transparent 44%),
    linear-gradient(180deg, #f8fcff 0%, #eef8fb 100%);
  box-shadow: none;
}

.model-area.is-css-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 220;
}

.model-area:fullscreen .stage-strip,
.model-area.is-css-fullscreen .stage-strip {
  max-height: 96px;
  padding-bottom: 2px;
  overflow-x: auto;
  overflow-y: hidden;
}

.model-area:fullscreen .stage-tab,
.model-area.is-css-fullscreen .stage-tab {
  min-height: 56px;
}

.model-area:fullscreen .model-stage,
.model-area.is-css-fullscreen .model-stage {
  min-height: 0 !important;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 18px;
  overflow: hidden;
}

.model-area:fullscreen .control-bar,
.model-area.is-css-fullscreen .control-bar {
  position: static;
  width: 100%;
  min-height: 60px;
  margin: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.model-area:fullscreen .visual-wrap,
.model-area.is-css-fullscreen .visual-wrap {
  min-height: 0;
  height: 100%;
  padding: 0;
}

.model-area:fullscreen .visual-wrap > svg,
.model-area.is-css-fullscreen .visual-wrap > svg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.model-area:fullscreen .dna-webgl-stack,
.model-area:fullscreen .rna-webgl-stack,
.model-area:fullscreen .protein-webgl-stack,
.model-area:fullscreen .membrane-webgl-stack,
.model-area.is-css-fullscreen .dna-webgl-stack,
.model-area.is-css-fullscreen .rna-webgl-stack,
.model-area.is-css-fullscreen .protein-webgl-stack,
.model-area.is-css-fullscreen .membrane-webgl-stack {
  height: 100%;
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
}

.model-area:fullscreen .rna-webgl-layout,
.model-area.is-css-fullscreen .rna-webgl-layout {
  min-height: 0;
  height: 100%;
}

.model-area:fullscreen .plant-cell-webgl-stack,
.model-area.is-css-fullscreen .plant-cell-webgl-stack {
  grid-template-rows: auto minmax(0, 1fr);
}

.model-area:fullscreen .dna-3d-shell,
.model-area:fullscreen .dna-webgl-shell,
.model-area:fullscreen .rna-webgl-shell,
.model-area:fullscreen .protein-webgl-shell,
.model-area:fullscreen .membrane-webgl-shell,
.model-area:fullscreen .plant-cell-webgl-shell,
.model-area:fullscreen .active-transport-2d-shell,
.model-area:fullscreen .transport-2d-shell,
.model-area:fullscreen .transport-2d-comparison-shell,
.model-area.is-css-fullscreen .dna-3d-shell,
.model-area.is-css-fullscreen .dna-webgl-shell,
.model-area.is-css-fullscreen .rna-webgl-shell,
.model-area.is-css-fullscreen .protein-webgl-shell,
.model-area.is-css-fullscreen .membrane-webgl-shell,
.model-area.is-css-fullscreen .plant-cell-webgl-shell,
.model-area.is-css-fullscreen .active-transport-2d-shell,
.model-area.is-css-fullscreen .transport-2d-shell,
.model-area.is-css-fullscreen .transport-2d-comparison-shell {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden;
}

.model-area:fullscreen .dna-webgl-viewport-frame,
.model-area.is-css-fullscreen .dna-webgl-viewport-frame {
  position: absolute;
  inset: 0;
  min-height: 0 !important;
  height: auto !important;
}

.model-area:fullscreen .active-transport-2d-svg,
.model-area:fullscreen .transport-2d-svg,
.model-area:fullscreen .transport-2d-comparison-svg,
.model-area.is-css-fullscreen .active-transport-2d-svg,
.model-area.is-css-fullscreen .transport-2d-svg,
.model-area.is-css-fullscreen .transport-2d-comparison-svg {
  min-height: 0 !important;
  height: 100%;
}

.model-area:fullscreen .stage-caption,
.model-area.is-css-fullscreen .stage-caption {
  margin: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.site-record-footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin: 40px auto 0;
  padding: 18px 12px 0;
  color: rgba(84, 112, 143, 0.82);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.site-record-footer a {
  color: rgba(84, 112, 143, 0.9);
  text-decoration: none;
}

.site-record-footer a:hover {
  color: var(--science-teal);
  text-decoration: underline;
}

.foundation-page {
  min-height: 100vh;
  margin: 0;
  color: var(--science-ink, #17324d);
  background:
    radial-gradient(circle at 16% 12%, rgba(166, 229, 241, 0.42), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 246, 209, 0.54), transparent 30%),
    linear-gradient(135deg, #f4fcff 0%, #f8fbef 100%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.72;
}

.foundation-shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.foundation-card {
  border: 1px solid rgba(80, 146, 165, 0.18);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(23, 50, 77, 0.13);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.foundation-hero {
  padding: 34px 36px 26px;
  border-bottom: 1px solid rgba(80, 146, 165, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 249, 253, 0.72)),
    radial-gradient(circle at 88% 20%, rgba(31, 145, 170, 0.1), transparent 32%);
}

.foundation-kicker {
  margin: 0 0 10px;
  color: var(--science-teal, #1f91aa);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.foundation-hero h1 {
  margin: 0;
  color: var(--science-ink, #17324d);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.foundation-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: #6f86a5;
  font-size: 17px;
  font-weight: 700;
}

.foundation-content {
  padding: 30px 36px 36px;
}

.foundation-content h2 {
  margin: 28px 0 10px;
  color: var(--science-ink, #17324d);
  font-size: 20px;
  line-height: 1.35;
}

.foundation-content h2:first-child {
  margin-top: 0;
}

.foundation-content p,
.foundation-content li {
  color: #526b88;
  font-size: 15.5px;
}

.foundation-content ul {
  margin: 10px 0 0;
  padding-left: 1.25em;
}

.foundation-note {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid rgba(31, 145, 170, 0.18);
  border-radius: 18px;
  background: rgba(232, 249, 253, 0.54);
  color: #526b88;
  font-weight: 700;
}

.foundation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.foundation-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(31, 145, 170, 0.22);
  border-radius: 999px;
  color: var(--science-teal, #1f91aa);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.foundation-actions a.primary {
  color: #fff;
  background: linear-gradient(135deg, #17324d, #1f91aa);
  box-shadow: 0 14px 26px rgba(23, 50, 77, 0.18);
}

.foundation-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 22px 12px 0;
  color: #7d93ae;
  font-size: 12.5px;
  font-weight: 800;
}

.foundation-footer a {
  color: #7d93ae;
  text-decoration: none;
}

.foundation-footer a:hover {
  color: var(--science-teal, #1f91aa);
  text-decoration: underline;
}

@media (max-width: 820px) {
  html,
  body,
  .studio-shell {
    max-width: 100%;
    overflow-x: hidden;
  }

  .studio-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    padding: 12px 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    overflow: visible;
  }

  .studio-brand {
    grid-template-columns: 42px auto;
    justify-content: center;
    max-width: 100%;
  }

  .studio-brand span {
    white-space: nowrap;
  }

  .studio-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 0 4px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-left: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .studio-nav::-webkit-scrollbar {
    display: none;
  }

  .studio-nav-button {
    flex: 0 0 clamp(168px, 48vw, 214px);
    min-width: 0;
    min-height: 46px;
  }

  .resource-view {
    padding-top: 18px;
  }

  .resource-header {
    padding-top: 18px;
    margin-top: 0;
  }

  .player-view {
    overflow-x: hidden;
  }

  .player-view .control-bar,
  .model-area:fullscreen .control-bar,
  .model-area.is-css-fullscreen .control-bar {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    padding: 10px;
    overflow: visible;
  }

  .player-view .control-group,
  .model-area:fullscreen .control-group,
  .model-area.is-css-fullscreen .control-group {
    display: contents;
  }

  .player-view .control-button,
  .model-area:fullscreen .control-button,
  .model-area.is-css-fullscreen .control-button {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 8px;
    border-radius: 14px;
    gap: 6px;
    font-size: 13px;
  }

  .player-view .control-button svg,
  .model-area:fullscreen .control-button svg,
  .model-area.is-css-fullscreen .control-button svg {
    width: 16px;
    height: 16px;
  }

  .player-view .control-button .button-label,
  .model-area:fullscreen .control-button .button-label,
  .model-area.is-css-fullscreen .control-button .button-label {
    display: inline-flex;
  }

  .site-record-footer {
    margin-top: 28px;
    padding-top: 8px;
    font-size: 12px;
  }

  .foundation-shell {
    width: min(100% - 20px, 980px);
    padding: 16px 0 32px;
  }

  .foundation-card {
    border-radius: 22px;
  }

  .foundation-hero,
  .foundation-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .foundation-hero {
    padding-top: 26px;
  }
}

@media (max-width: 520px) {
  .studio-sidebar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .studio-brand {
    grid-template-columns: 40px auto;
    gap: 9px;
    font-size: 14px;
  }

  .studio-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }

  .studio-nav {
    gap: 8px;
  }

  .studio-nav-button {
    flex-basis: 178px;
    min-height: 44px;
    padding: 0 10px;
  }

  .studio-nav-button span:last-child {
    font-size: 15px;
  }

  .studio-nav-button span:last-child::after {
    margin-top: 4px;
    font-size: 10px;
  }

  .resource-view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .resource-header {
    padding-top: 12px;
    margin-bottom: 20px;
  }

  .resource-hero-copy {
    gap: 16px;
    padding-top: 26px;
    transform: none;
  }

  .resource-header::before {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .resource-header h1 {
    font-size: clamp(30px, 9.2vw, 38px);
    line-height: 1.16;
  }

  .resource-header p {
    font-size: 15px;
    line-height: 1.38;
  }

  .learning-map-action {
    width: 100%;
    min-height: 64px;
  }

  .player-view {
    padding: 8px;
  }

  .player-content {
    gap: 10px;
  }

  .player-view .model-area {
    padding: 8px;
    grid-template-rows: auto minmax(330px, 58vh) auto;
  }

  .player-view .model-stage {
    min-height: 330px;
  }

  .player-view .control-bar,
  .model-area:fullscreen .control-bar,
  .model-area.is-css-fullscreen .control-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    border-radius: 16px;
  }

  .player-view .control-button,
  .model-area:fullscreen .control-button,
  .model-area.is-css-fullscreen .control-button {
    height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }

  .lesson-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
