:root {
  --bg-0: #163157;
  --bg-1: #10294b;
  --bg-2: #0e213d;
  --panel: rgba(17, 33, 63, 0.72);
  --edge: rgba(130, 180, 255, 0.32);
  --text: #e6efff;
  --sub: #a9bddf;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, #2a5a97 0%, transparent 45%),
    radial-gradient(circle at 80% 100%, #2d376f 0%, transparent 35%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2) 100%);
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
}

.glass {
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 22px rgba(110, 160, 255, 0.08), 0 12px 26px rgba(0, 0, 0, 0.28);
}

.left-panel {
  display: none;
  padding: 14px;
  overflow: auto;
}

.left-panel h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.08;
}

.hint {
  margin: 0 0 12px;
  color: var(--sub);
  font-size: 13px;
}

.card {
  margin-bottom: 10px;
  border: 1px solid rgba(130, 180, 255, 0.28);
  border-radius: 14px;
  padding: 10px;
  background: rgba(7, 15, 30, 0.52);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.row {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.env-tools button {
  width: 100%;
}

.env-manual {
  display: grid;
  gap: 6px;
  width: 100%;
}

.env-row {
  display: grid;
  gap: 6px;
  align-items: center;
}

.env-row:first-child {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.env-row:last-child {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px;
}

.env-row button {
  width: 92px;
  white-space: nowrap;
  padding: 10px 12px;
  min-width: 92px;
  font-size: 14px;
  justify-self: end;
}

.env-row input {
  min-width: 0;
}

#envStatus {
  line-height: 1.5;
}

label {
  font-size: 12px;
  color: var(--sub);
  display: grid;
  gap: 4px;
}

select, input, button { font: inherit; }

select,
input[type="number"] {
  width: 100%;
  border: 1px solid rgba(132, 183, 255, 0.38);
  border-radius: 10px;
  background: #0d1a33;
  color: var(--text);
  padding: 8px;
  font-size: 14px;
}

.fixed-field {
  width: 100%;
  border: 1px solid rgba(132, 183, 255, 0.38);
  border-radius: 10px;
  background: #0d1a33;
  color: var(--text);
  padding: 8px;
  font-size: 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

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

.stat {
  border: 1px solid rgba(131, 169, 247, 0.3);
  border-radius: 9px;
  background: rgba(24, 33, 61, 0.48);
  padding: 6px 8px;
}

.stat .k {
  color: var(--sub);
  font-size: 11px;
}

.stat .v {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 700;
}

.note ul {
  margin: 0;
  padding-left: 16px;
  color: #cddafd;
  font-size: 12px;
  line-height: 1.5;
}

.center-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  z-index: 1;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

.center-panel header {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  padding: 0;
  pointer-events: none;
}

.center-panel h2 {
  display: none;
}

#sceneCanvas {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: block;
  background: #172f54;
}

.floating-label {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -140%);
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(255, 89, 225, 0.18);
  border: 1px solid rgba(255, 89, 225, 0.5);
  color: #ffd9fb;
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s ease;
}

.scene-screen-readout {
  position: absolute;
  display: none;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -50%);
  min-width: 56px;
  padding: 3px 7px;
  border-radius: 5px;
  text-align: center;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  font-size: clamp(11px, 1.1vw, 16px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.scene-screen-readout.visible {
  opacity: 1;
}

.scene-screen-readout--main {
  border: 1px solid rgba(255, 97, 72, 0.68);
  background: rgba(6, 10, 16, 0.86);
  color: #ff523d;
  text-shadow: 0 0 6px rgba(255, 76, 48, 0.92), 0 0 14px rgba(255, 76, 48, 0.48);
}

.scene-screen-readout--motor {
  border: 1px solid rgba(108, 220, 255, 0.7);
  background: rgba(6, 27, 72, 0.82);
  color: #a8e9ff;
  text-shadow: 0 0 6px rgba(116, 220, 255, 0.92), 0 0 14px rgba(68, 180, 255, 0.48);
}

.scene-tool-btn {
  position: absolute;
  z-index: 5;
  min-width: 86px;
  min-height: 38px;
  border: 1px solid rgba(255, 104, 225, 0.62);
  border-radius: 10px;
  background: rgba(124, 60, 132, 0.78);
  color: #ffe6fb;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 8, 28, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.scene-tool-btn:hover {
  background: rgba(145, 71, 154, 0.88);
  transform: translateY(-1px);
}

.scene-tool-btn.is-active {
  border-color: rgba(110, 221, 255, 0.74);
  background: rgba(40, 104, 126, 0.86);
  color: #e9fbff;
}

.right-panel {
  display: none;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.action-btn {
  border: 1px solid rgba(133, 173, 255, 0.36);
  border-radius: 14px;
  background: rgba(8, 16, 32, 0.88);
  color: var(--text);
  padding: 11px 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.2;
}

.action-btn.effect-btn {
  background: linear-gradient(135deg, rgba(18, 56, 92, 0.96), rgba(23, 90, 126, 0.92));
  border-color: rgba(126, 230, 255, 0.56);
  color: #eafaff;
  box-shadow: inset 0 0 18px rgba(92, 207, 255, 0.12);
}

.top-tools {
  position: fixed;
  inset: 14px 16px auto 16px;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.top-tools__left {
  display: flex;
  gap: 10px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.top-tools__right {
  display: flex;
  gap: 10px;
  pointer-events: auto;
  justify-content: flex-end;
}

.top-tools .action-btn {
  pointer-events: auto;
  min-width: 116px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
}

.gas-select-tool {
  pointer-events: auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(134, 216, 255, 0.58);
  border-radius: 10px;
  background: rgba(10, 36, 68, 0.9);
  color: #eafaff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(2, 12, 24, 0.18);
}

.gas-select-tool select {
  min-width: 86px;
  height: 30px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(170, 222, 255, 0.55);
  border-radius: 8px;
  background: rgba(7, 23, 43, 0.94);
  color: #ffffff;
  font-weight: 800;
  outline: none;
}

.experiment-help-btn {
  background: rgba(12, 47, 78, 0.92);
  border-color: rgba(116, 216, 255, 0.62);
  color: #eafaff;
}

.hose-switch-btn {
  background: rgba(21, 80, 92, 0.94);
  border-color: rgba(126, 230, 255, 0.62);
  color: #eafaff;
}

.hose-switch-btn.is-gas-bottle {
  background: linear-gradient(135deg, rgba(26, 94, 128, 0.96), rgba(21, 154, 111, 0.92));
}

.discharge-view-btn {
  background: linear-gradient(135deg, rgba(18, 56, 92, 0.96), rgba(26, 118, 148, 0.92));
  border-color: rgba(126, 230, 255, 0.62);
  color: #eafaff;
}

.reference-btn {
  background: rgba(8, 18, 35, 0.82);
  border-color: rgba(158, 198, 255, 0.52);
}

.data-record-btn {
  background: rgba(10, 36, 68, 0.9);
  border-color: rgba(134, 216, 255, 0.58);
}

.top-tools .data-record-btn {
  min-width: 106px;
  padding-inline: 17px;
}

.electrode-switch-btn {
  background: rgba(15, 45, 68, 0.86);
  border-color: rgba(119, 221, 255, 0.5);
}

.home-return-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  min-width: 116px;
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(8, 18, 35, 0.86);
  border-color: rgba(158, 198, 255, 0.58);
  color: #eaf6ff;
}

.learning-home {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: auto;
  color: #172033;
  background: #f7fbff;
}

.learning-home.hidden {
  display: none;
}

.learning-home__masthead {
  height: 34px;
  background:
    linear-gradient(90deg, rgba(23, 132, 216, 0.82), rgba(72, 191, 93, 0.45)),
    linear-gradient(135deg, #d8efff, #ffffff 54%, #c7e9ff);
  border-bottom: 1px solid rgba(8, 98, 164, 0.14);
}

.learning-home__layout {
  width: min(1760px, calc(100vw - 84px));
  min-height: calc(100vh - 34px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  padding: 44px 0 48px;
}

.learning-nav {
  align-self: start;
  min-height: calc(100vh - 126px);
  background: linear-gradient(180deg, #d9f0ff 0%, #f7fcff 100%);
  box-shadow: 0 18px 45px rgba(26, 112, 183, 0.12);
}

.learning-brand {
  height: 142px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 38px;
  background: #1297e4;
  color: #fff;
}

.learning-brand__mark {
  font-size: 58px;
  line-height: 0.9;
  font-weight: 700;
}

.learning-brand b,
.learning-brand small {
  display: block;
  line-height: 1.12;
}

.learning-brand b {
  font-size: 24px;
}

.learning-brand small {
  font-size: 18px;
  font-weight: 600;
}

.learning-nav__item {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(10, 105, 160, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: rgba(195, 225, 244, 0.84);
  color: #8ea7b8;
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.learning-nav__item.active,
.learning-nav__item--start:hover {
  background: #49bd42;
  color: #fff;
}

.learning-nav__item:not(.active):hover {
  background: #e2f3ff;
  color: #1878bb;
}

.learning-nav__item--feedback {
  border-top-color: rgba(73, 189, 66, 0.3);
}

.learning-content {
  min-width: 0;
  background: #fff;
  padding: 0 34px 40px;
  box-shadow: 0 16px 50px rgba(35, 89, 140, 0.08);
}

.learning-breadcrumb {
  height: 62px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d7dde4;
  color: #263344;
  font-size: 21px;
  font-weight: 700;
}

.learning-breadcrumb::before {
  content: "";
  width: 15px;
  height: 19px;
  margin-right: 12px;
  background: #8b949f;
  clip-path: polygon(50% 0, 88% 16%, 100% 52%, 50% 100%, 0 52%, 12% 16%);
}

.learning-section {
  display: none;
  max-width: 1120px;
  padding: 70px 0 0 112px;
}

.learning-section.active {
  display: block;
}

.learning-section h2 {
  margin: 0 0 22px;
  color: #151923;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;
}

.learning-section h3 {
  margin: 28px 0 12px;
  color: #17496f;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.learning-section p,
.learning-section li {
  color: #1f2633;
  font-family: "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  line-height: 1.82;
  text-align: justify;
}

.learning-section p {
  margin: 0 0 14px;
  text-indent: 2em;
}

.learning-section ol {
  margin: 0;
  padding-left: 26px;
}

.self-check-card {
  margin-top: 24px;
  padding: 26px 30px 28px;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(31, 64, 96, 0.08);
}

.self-check-meta {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  background: #e8f5ff;
  color: #17496f;
  font-size: 16px;
  font-weight: 800;
}

.learning-section .self-check-type {
  margin: 18px 0 12px;
  color: #151923;
  font-size: 24px;
}

.self-check-question,
.self-check-answer {
  white-space: pre-line;
  color: #1f2633;
  font-family: "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  line-height: 1.86;
  text-align: left;
}

.self-check-question {
  min-height: 190px;
}

.self-check-answer {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid #49bd42;
  background: #f4fbf1;
  color: #1f3f23;
  font-weight: 700;
}

.self-check-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.self-check-actions button {
  min-width: 128px;
  min-height: 44px;
  border: 1px solid #1878bb;
  border-radius: 6px;
  background: #1878bb;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.self-check-actions button:first-child {
  background: #ffffff;
  color: #1878bb;
}

.self-check-actions button:hover {
  filter: brightness(1.05);
}

.self-check-assessment {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid #d9e6f1;
}

.self-check-response,
.self-check-reflection {
  display: grid;
  gap: 8px;
}

.self-check-response > span,
.self-check-reflection > span {
  color: #17496f;
  font-size: 17px;
  font-weight: 800;
}

.self-check-response textarea,
.self-check-reflection textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #b9d4e7;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafdff;
  color: #1f2633;
  font: 16px/1.65 "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  outline: none;
}

.self-check-response textarea:focus,
.self-check-reflection textarea:focus {
  border-color: #1878bb;
  box-shadow: 0 0 0 3px rgba(24, 120, 187, 0.14);
}

.self-check-completion,
.self-check-submit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.self-check-completion button,
.self-check-submit-row button {
  min-height: 42px;
  border: 1px solid #1878bb;
  border-radius: 6px;
  padding: 0 16px;
  background: #1878bb;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.self-check-completion button.is-complete {
  border-color: #359348;
  background: #eaf8ed;
  color: #226e33;
}

.self-check-submit-row {
  padding-top: 4px;
}

.self-check-submit-row button {
  border-color: #0f766e;
  background: #0f766e;
}

.self-check-completion button:hover,
.self-check-submit-row button:hover {
  filter: brightness(1.06);
}

.self-check-progress {
  color: #3d5b72;
  font-size: 15px;
  font-weight: 700;
}

.learning-section .feedback-report-intro {
  max-width: 920px;
  margin-bottom: 20px;
  color: #49647a;
  font-size: 17px;
  line-height: 1.65;
  text-indent: 0;
}

.feedback-report {
  display: grid;
  gap: 18px;
  padding-bottom: 30px;
}

.feedback-score-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.feedback-score-metric {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid #cfe0ee;
  border-radius: 9px;
  background: #f7fbff;
}

.feedback-score-metric strong,
.feedback-score-metric span {
  display: block;
}

.feedback-score-metric strong {
  color: #17496f;
  font-size: 30px;
  line-height: 1.1;
}

.feedback-score-metric span {
  color: #60758a;
  font-size: 14px;
  font-weight: 700;
}

.feedback-score-metric--score {
  border-color: #9edb9a;
  background: #f3fff2;
}

.feedback-score-metric--score strong,
.feedback-score-metric--award strong {
  color: #258439;
}

.feedback-score-metric--deduction {
  border-color: #f2c7b7;
  background: #fff8f4;
}

.feedback-score-metric--deduction strong {
  color: #bd5638;
}

.learning-section .feedback-score-progress {
  margin: 0;
  padding: 13px 16px;
  border-left: 4px solid #1878bb;
  background: #eef7fd;
  color: #294e69;
  font-size: 15px;
  line-height: 1.6;
  text-indent: 0;
}

.feedback-report-section {
  padding: 18px 20px;
  border: 1px solid #d5e4ef;
  border-radius: 9px;
  background: #fff;
}

.learning-section .feedback-report-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.feedback-report-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-section .feedback-report-section li {
  padding: 8px 10px;
  border-radius: 5px;
  background: #f7fafc;
  color: #334b5e;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.feedback-report-section--award {
  border-left: 4px solid #49bd42;
}

.feedback-report-section--award li {
  color: #256d34;
}

.feedback-report-section--deduction {
  border-left: 4px solid #e97b55;
}

.feedback-report-section--deduction li {
  color: #9f452e;
}

.feedback-report-pending {
  border: 1px solid #d5e4ef;
  border-radius: 9px;
  background: #f9fcff;
  overflow: hidden;
}

.feedback-report-pending > summary {
  padding: 15px 18px;
  color: #17496f;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.feedback-report-pending .feedback-report-section {
  border: 0;
  border-top: 1px solid #d5e4ef;
  border-radius: 0;
}

.learning-list {
  margin: 0 0 8px;
  padding-left: 24px;
}

.learning-list--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}

.learning-target-list {
  display: block;
}

.learning-list > li > ol {
  list-style: none;
  counter-reset: operation-substep;
  padding-left: 0;
}

.learning-list > li > ol > li {
  counter-increment: operation-substep;
  position: relative;
  padding-left: 3.2em;
}

.learning-list > li > ol > li::before {
  content: "（" counter(operation-substep) "）";
  position: absolute;
  left: 0;
}

.phys-var {
  font-style: italic;
  font-weight: 800;
  margin-left: 0.18em;
  margin-right: 0.18em;
}

.unit {
  font-style: normal;
  font-weight: inherit;
}

.learning-formula .phys-var,
.inline-frac .phys-var {
  margin-left: 0;
  margin-right: 0;
}

.inline-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 1.4em;
  margin: 0 0.16em;
  text-align: center;
  vertical-align: middle;
  transform: translateY(-0.06em);
  line-height: 0.92;
  font-size: 0.92em;
}

.inline-frac > span:first-child {
  border-bottom: 1.6px solid currentColor;
  padding: 0 0.2em 0.03em;
}

.inline-frac > span:last-child {
  padding: 0.03em 0.2em 0;
}

.learning-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 10px;
  border-left: 4px solid #1297e4;
  background: #f1f8ff;
  padding: 16px 18px;
  color: #123450;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  overflow-x: auto;
  white-space: nowrap;
}

.math-var,
.math-eq {
  flex: 0 0 auto;
}

.math-var sub,
.phys-var sub {
  font-size: 0.68em;
  line-height: 0;
}

.math-frac {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 280px;
  text-align: center;
  vertical-align: middle;
}

.math-num,
.math-den {
  display: block;
  padding: 0 12px;
}

.math-num {
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
}

.math-den {
  padding-top: 4px;
  font-size: 0.88em;
  font-weight: 700;
}

.learning-highlight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0 36px;
}

.learning-highlight > span,
.learning-grid > div {
  border-left: 4px solid #49bd42;
  background: #eef8ff;
  padding: 14px 16px;
  color: #17496f;
  font-weight: 800;
}

.learning-highlight > span > b {
  display: block;
  margin-bottom: 6px;
  color: #14334e;
}

.learning-highlight > span {
  min-height: 150px;
  padding: 22px 24px;
  font-size: 18px;
  line-height: 1.75;
}

.learning-highlight > span > b {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.35;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.learning-grid > div > b,
.learning-grid > div > span {
  display: block;
}

.learning-grid > div > span {
  margin-top: 8px;
  color: #394c5f;
  font-family: "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
}

.learning-table-wrap {
  width: 100%;
  margin: 16px 0 22px;
  overflow-x: auto;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: #fff;
}

.learning-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #1f2633;
  font-family: "IBM Plex Sans", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.learning-table th,
.learning-table td {
  border-bottom: 1px solid #d8e4ef;
  border-right: 1px solid #e4edf5;
  padding: 11px 12px;
  color: #1f2633;
  text-align: left;
  vertical-align: middle;
}

.learning-table th {
  background: #e8f5ff;
  color: #17496f;
  font-weight: 800;
  white-space: nowrap;
}

.learning-table td:first-child {
  color: #17496f;
  font-weight: 800;
  white-space: nowrap;
}

.learning-table tr:last-child td {
  border-bottom: 0;
}

.learning-table th:last-child,
.learning-table td:last-child {
  border-right: 0;
}

.learning-table--compact {
  min-width: 680px;
  font-size: 16px;
}

.learning-actions {
  margin-top: 26px;
}

.report-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.video-download-note {
  margin-bottom: 16px;
  color: #60758a;
}

.video-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.video-download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid #cfe0ee;
  border-radius: 10px;
  background: #f7fbff;
}

.video-download-card.is-ready {
  border-color: #a9dca5;
  background: #f5fff4;
}

.video-download-card__index {
  color: #49bd42;
  font-size: 24px;
  font-weight: 900;
}

.video-download-card b,
.video-download-card small {
  display: block;
}

.video-download-card b {
  color: #173a58;
  font-size: 17px;
}

.video-download-card small {
  margin-top: 5px;
  color: #60758a;
  font-size: 14px;
  line-height: 1.45;
}

.video-download-card__action {
  border-radius: 7px;
  background: #49bd42;
  color: #fff;
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.video-download-card__action.is-pending {
  background: #aebdca;
}

.learning-primary,
.experiment-entry__home {
  border: 0;
  border-radius: 8px;
  background: #49bd42;
  color: #fff;
  padding: 13px 24px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.learning-primary--link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.experiment-entry {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(6, 16, 31, 0.72);
  backdrop-filter: blur(8px);
}

.experiment-entry.hidden {
  display: none;
}

.experiment-entry__inner {
  width: min(940px, calc(100vw - 40px));
  padding: 36px;
  border: 1px solid rgba(142, 194, 255, 0.5);
  border-radius: 8px;
  background: rgba(10, 26, 50, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.experiment-entry__eyebrow {
  margin: 0 0 10px;
  color: #9fd8ff;
  font-size: 14px;
}

.experiment-entry h1 {
  margin: 0 0 24px;
  font-size: 42px;
  line-height: 1.12;
}

.experiment-entry__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.experiment-entry__status {
  min-height: 24px;
  margin: 14px 2px 0;
  color: #1767ad;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.experiment-entry__status.is-error {
  color: #b52b34;
}

.experiment-choice {
  min-height: 108px;
  border: 1px solid rgba(150, 207, 255, 0.5);
  border-radius: 8px;
  background: rgba(22, 55, 92, 0.88);
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
}

.experiment-entry__home {
  margin-top: 18px;
  width: 100%;
  background: rgba(73, 189, 66, 0.94);
}

.reference-modal {
  width: min(520px, 92vw);
}

.reference-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0;
}

.action-btn.primary {
  background: linear-gradient(135deg, #14a1be, #3a2aa6 80%);
  border-color: rgba(180, 255, 243, 0.45);
}

.action-btn:hover,
button:hover { filter: brightness(1.08); }

.modal {
  position: fixed;
  z-index: 50;
  margin: 0;
  border: 1px solid rgba(150, 188, 255, 0.52);
  border-radius: 12px;
  background: #0a1d3add;
  color: var(--text);
  width: min(520px, 88vw);
  max-height: 74vh;
  overflow: auto;
  padding: 12px;
}

.modal.nonmodal-dialog[open] {
  pointer-events: auto;
}

.modal.nonmodal-dialog[open]::backdrop {
  display: none;
  background: transparent;
  pointer-events: none;
}

.modal.instrument-modal {
  width: min(920px, 92vw);
  max-height: 88vh;
}

#mainPowerDialog {
  width: min(920px, calc(100vw - 96px));
  max-height: 74vh;
  padding: 10px 14px 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 33, 64, 0.98), rgba(9, 33, 48, 0.98));
}

#mainPowerDialog h3 {
  margin: 0 0 8px;
  cursor: move;
  font-size: clamp(20px, 1.45vw, 28px);
  user-select: none;
  touch-action: none;
}

#sparkPowerDialog {
  width: min(560px, 70vw);
  max-height: 92vh;
  padding: 10px 12px 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 32, 59, 0.98), rgba(8, 27, 43, 0.98));
}

#sparkPowerDialog h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.4vw, 25px);
}

#sparkPowerDialog .device-panel--spark {
  width: min(100%, calc(82vh - 72px));
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-color: rgba(159, 191, 224, 0.72);
  background: #f4f1e8;
}

#sparkPowerDialog .device-panel__bg {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: fill;
}

.spark-power-display {
  position: absolute;
  left: 31.5%;
  top: 13.2%;
  width: 37%;
  height: 15.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #c4332b;
  font: 900 clamp(35px, 5vw, 72px)/1 Consolas, monospace;
  letter-spacing: 0.06em;
  text-shadow: 0 0 7px rgba(190, 34, 28, 0.5);
  transform: translateY(0.4em);
  pointer-events: none;
}

.spark-power-display.is-on {
  color: #ff342b;
  text-shadow: 0 0 8px rgba(255, 35, 26, 0.94), 0 0 20px rgba(255, 32, 20, 0.62);
}

#sparkPowerDialog .spark-power-knob {
  left: 31.5%;
  top: 76%;
  width: 24%;
  padding: 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.spark-power-knob-help {
  position: absolute;
  left: 19%;
  top: 90.2%;
  width: 42%;
  color: #333238;
  font-size: clamp(10px, 0.9vw, 14px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}

#sparkPowerDialog .spark-power-knob:focus,
#sparkPowerDialog .spark-power-knob:focus-visible,
#sparkPowerDialog .spark-power-knob:hover,
#sparkPowerDialog .spark-power-knob:active {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

#sparkPowerDialog .spark-power-knob::after {
  display: none;
}

.spark-power-knob-line-cover {
  position: absolute;
  left: 27.1%;
  top: 83.9%;
  width: 2.4%;
  height: 3.8%;
  border-radius: 45%;
  background: #090a0f;
  box-shadow: 0 0 4px 2px #090a0f;
  pointer-events: none;
}

.spark-power-switch {
  position: absolute;
  left: 66%;
  top: 57%;
  width: 22%;
  height: 14%;
  padding: 5%;
  border: 5px solid #15151a;
  border-radius: 5px;
  background: #460d0b;
  box-shadow: 0 5px 11px rgba(0, 0, 0, 0.42), inset 0 0 12px rgba(0, 0, 0, 0.75);
}

.spark-power-switch__lamp {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(145deg, #8e1812, #3b0807);
}

.spark-power-switch.is-on .spark-power-switch__lamp {
  background: linear-gradient(145deg, #ff593f, #d5150e 62%, #780b08);
  box-shadow: inset 0 0 15px rgba(255, 235, 152, 0.78), 0 0 18px rgba(255, 51, 30, 0.82);
}

.spark-power-switch__labels {
  position: absolute;
  inset: auto -34% -29%;
  display: flex;
  justify-content: space-between;
  color: #1c1b1a;
  font-size: clamp(12px, 1.2vw, 18px);
}

.spark-power-digit-step {
  position: absolute;
  left: 61%;
  top: 78%;
  width: 31%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.spark-power-digit-step button,
.spark-power-digit-step span {
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #30333c;
  border-radius: 5px;
  background: rgba(242, 242, 238, 0.96);
  color: #18191d;
  font-size: clamp(11px, 0.95vw, 15px);
  font-weight: 800;
  line-height: 28px;
  text-align: center;
}

.spark-power-digit-step span {
  grid-column: 1 / -1;
  color: #711711;
  background: rgba(255, 246, 232, 0.97);
  border-color: rgba(113, 23, 17, 0.58);
}

#sparkPowerDialog .modal-actions {
  margin-top: 8px;
}

#motorDialog {
  width: min(560px, 68vw);
  max-height: 74vh;
  padding: 10px;
}

#motorDialog h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

#motorDialog .device-subcontrols {
  display: none;
}

#motorDialog .modal-actions {
  display: none;
}

#motorDialog .device-panel--motor {
  aspect-ratio: 1280 / 1344;
  width: min(100%, calc((74vh - 48px) * 1280 / 1344));
  margin-inline: auto;
}

#motorDialog .device-panel__bg {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: fill;
  object-position: center;
}

#probePowerDialog {
  width: min(560px, 68vw);
  max-height: 86vh;
  padding: 10px;
}

#probePowerDialog .device-subcontrols {
  display: none;
}

#probePowerDialog .device-stepper--probe-current,
#probePowerDialog .device-stepper--probe-voltage {
  display: none;
}

#probePowerDialog .modal-actions {
  display: none;
}

.modal.wide {
  width: min(560px, 62vw);
}

.discharge-view-modal {
  z-index: 60;
  width: min(500px, 44vw);
  max-height: 70vh;
}

.discharge-view-modal .mini {
  margin: -2px 0 8px;
}

.discharge-zoom-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 520;
  border: 1px solid rgba(142, 203, 255, 0.46);
  border-radius: 10px;
  background: #081527;
  box-shadow: inset 0 0 24px rgba(130, 190, 255, 0.18);
}

.phase-map-modal {
  z-index: 61;
  width: min(850px, 82vw);
  max-height: 88vh;
}

.phase-map-modal .mini {
  margin: -2px 0 8px;
}

.discharge-phase-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 980 / 600;
  background: #071426;
  border: 1px solid rgba(142, 203, 255, 0.46);
  border-radius: 10px;
}

.phase-map-summary {
  margin-top: 9px;
  line-height: 1.55;
}

.phase-map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 8px 0 10px;
}

.phase-map-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dcecff;
  font-size: 14px;
}

.phase-map-controls select {
  min-width: 138px;
  padding: 6px 9px;
  border: 1px solid #547ca2;
  border-radius: 6px;
  color: #eef7ff;
  background: #10253d;
}

.modal::backdrop { background: rgba(0, 0, 0, 0.15); }

.ground-notice-modal {
  width: min(380px, 86vw);
  padding: 16px 18px;
}

.ground-notice-message {
  margin: 8px 0 14px;
  font-size: 16px;
  line-height: 1.55;
  color: #f3fbff;
}

.experiment-score-modal {
  width: min(580px, 92vw);
  max-height: min(760px, 84vh);
  padding: 20px 22px;
  background: rgba(8, 27, 53, 0.98);
  border-color: rgba(119, 196, 255, 0.72);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.48), inset 0 0 26px rgba(65, 157, 237, 0.08);
}

.experiment-score-modal h3 {
  margin-bottom: 14px;
  color: #f0f8ff;
}

.experiment-score-overview {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 82px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(92, 205, 194, 0.56);
  border-radius: 8px;
  background: rgba(17, 73, 91, 0.42);
  color: #d9f9f4;
}

.experiment-score-overview__score {
  color: #7be8d5;
  font-size: 48px;
  line-height: 1;
}

.experiment-score-overview__grade {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(150, 207, 255, 0.56);
  border-radius: 6px;
  color: #d8ecff;
  font-size: 15px;
  font-weight: 800;
}

.experiment-score-progress {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(130, 204, 238, 0.32);
  border-radius: 7px;
  background: rgba(23, 73, 111, 0.32);
  color: #cbe9ff;
  font-size: 13px;
  line-height: 1.65;
}

.experiment-score-section {
  padding: 12px 0;
  border-top: 1px solid rgba(145, 194, 255, 0.22);
}

.experiment-score-section h4 {
  margin: 0 0 7px;
  color: #9fd8ff;
  font-size: 14px;
}

.experiment-score-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experiment-score-section li {
  color: #dbeaff;
  font-size: 14px;
  line-height: 1.5;
}

.experiment-score-section--award li { color: #a8f2ce; }
.experiment-score-section--deduction li { color: #ffd2ba; }
.experiment-score-section--improvement li { color: #dce9ff; }

.experiment-score-modal__empty {
  margin: 0;
  color: #dce9ff;
  line-height: 1.6;
}

.unsafe-submission-modal .danger {
  border-color: rgba(255, 170, 133, 0.72);
  background: #b6573f;
  color: #fff;
}

.unsafe-submission-modal .danger:hover {
  background: #cd664b;
}

.help-modal {
  width: min(760px, 92vw);
  padding: 26px 30px;
  background: rgba(9, 28, 52, 0.97);
  border-radius: 18px;
  border-color: rgba(122, 178, 255, 0.68);
}

.help-lead {
  margin: 10px 0 18px;
  color: #f3fbff;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 700;
}

.help-list {
  margin: 0 0 22px 24px;
  padding: 0;
  color: #dceeff;
  font-size: 19px;
  line-height: 1.7;
}

.instrument-intro-body p {
  margin: 0 0 10px;
  color: #e8f5ff;
  line-height: 1.65;
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 20px;
  cursor: move;
  user-select: none;
}

#paschenDialog,
#langmuirDialog {
  padding-top: 0;
}

#paschenDialog h3,
#langmuirDialog h3 {
  position: sticky;
  top: 0;
  z-index: 7;
  margin: 0 -12px 8px;
  padding: 14px 48px 8px 12px;
  background: linear-gradient(180deg, rgba(10, 29, 58, 0.98), rgba(10, 29, 58, 0.92));
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 8;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 1px solid rgba(145, 206, 255, 0.72);
  border-radius: 6px;
  background: rgba(6, 25, 54, 0.86);
  color: #eaf6ff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  box-shadow: inset 0 0 12px rgba(77, 180, 255, 0.2);
}

.modal-close:hover {
  background: rgba(14, 58, 98, 0.94);
}

#paschenDialog .modal-close,
#langmuirDialog .modal-close {
  position: sticky;
  top: 8px;
  float: right;
  margin: -42px 0 10px;
}

.modal.dragging {
  user-select: none;
}

body.dialog-dragging {
  user-select: none;
}

.modal label { margin-top: 6px; }

.modal output {
  display: inline-block;
  color: #d8e9ff;
  margin: 2px 0;
  font-size: 12px;
}

.device-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(151, 192, 255, 0.42);
  border-radius: 8px;
  background: #081427;
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.05), 0 16px 28px rgba(0, 0, 0, 0.25);
}

.device-panel__bg {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(88vh - 92px);
  object-fit: contain;
  object-position: top center;
  user-select: none;
  pointer-events: none;
}

.device-screen {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(90, 210, 255, 0.42);
  background: rgba(4, 16, 34, 0.74);
  color: #eaf7ff;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 8px rgba(125, 223, 255, 0.72), 0 0 18px rgba(80, 170, 255, 0.44);
  box-shadow: inset 0 0 18px rgba(83, 178, 255, 0.28);
  pointer-events: none;
}

.device-screen--main {
  left: 4.55%;
  top: 27.8%;
  width: 46.8%;
  height: 41%;
  border-color: rgba(180, 215, 255, 0.28);
  background: rgba(3, 8, 16, 0.82);
  color: #ff4b38;
  font-size: clamp(24px, 5.1vw, 54px);
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  text-shadow: 0 0 8px rgba(255, 54, 34, 0.85), 0 0 20px rgba(255, 80, 40, 0.42);
}

#mainPowerDialog .device-panel--main {
  aspect-ratio: 2.43 / 1;
  min-height: 0;
  max-height: calc(74vh - 92px);
  background: #101b25;
  border-color: rgba(150, 188, 255, 0.48);
  border-radius: 8px;
}

#mainPowerDialog .device-panel__bg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

#mainPowerDialog .device-screen--main {
  inset: auto;
  left: 4.6%;
  top: 26.5%;
  width: 56.0%;
  height: 34.7%;
  display: block;
  border: 1px solid rgba(122, 184, 246, 0.88);
  border-radius: 0;
  padding: 0;
  background: rgba(3, 8, 16, 0.86);
  box-shadow: inset 0 0 18px rgba(83, 178, 255, 0.12);
}

#mainPowerDialog .device-knob--main,
#mainPowerDialog .device-stepper--main,
#mainPowerDialog .device-digit-step--main,
#mainPowerDialog .main-power-switch {
  z-index: 4;
  pointer-events: auto;
}

.main-power-switch {
  position: absolute;
  left: 61.1%;
  top: 31.2%;
  width: 17.8%;
  height: 25.6%;
  border: 1px solid rgba(135, 191, 255, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 19, 36, 0.9), rgba(4, 12, 24, 0.96)),
    radial-gradient(circle at 50% 20%, rgba(95, 170, 255, 0.18), transparent 48%);
  box-shadow: inset 0 0 24px rgba(79, 154, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-rows: 1fr 1.35fr;
  align-items: center;
  justify-items: center;
  padding: 6% 7%;
  color: #d7e9ff;
}

.main-power-switch__state {
  font-size: clamp(18px, 2vw, 36px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  color: #aabbd0;
  text-shadow: 0 0 10px rgba(110, 170, 255, 0.28);
}

.main-power-switch__track {
  position: relative;
  width: min(72%, 170px);
  aspect-ratio: 2.25 / 1;
  border: 2px solid rgba(204, 222, 242, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, #16263a, #071424);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.55);
}

.main-power-switch__thumb {
  position: absolute;
  left: 8%;
  top: 50%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(145deg, #f5f1df, #bdb59a 62%, #5c5546);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.46), inset 3px 3px 8px rgba(255, 255, 255, 0.66);
  transition: left 0.16s ease, background 0.16s ease;
}

.main-power-switch.is-on {
  border-color: rgba(104, 255, 151, 0.68);
  box-shadow: inset 0 0 28px rgba(62, 255, 121, 0.22), 0 0 20px rgba(78, 255, 134, 0.16);
}

.main-power-switch.is-on .main-power-switch__state {
  color: #65ff8b;
  text-shadow: 0 0 10px rgba(76, 255, 126, 0.92), 0 0 22px rgba(49, 255, 105, 0.44);
}

.main-power-switch.is-on .main-power-switch__track {
  border-color: rgba(126, 255, 167, 0.72);
  background: linear-gradient(180deg, #123726, #092111);
}

.main-power-switch.is-on .main-power-switch__thumb {
  left: 54%;
  background: linear-gradient(145deg, #f8fff4, #8aff9e 62%, #278f44);
}

.main-power-readout {
  position: relative;
  width: 100%;
  height: 100%;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
}

.main-power-meter {
  position: absolute;
  min-width: 0;
  white-space: nowrap;
}

.main-power-meter strong {
  display: block;
  font-size: clamp(16px, 2.18vw, 38px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
}

.main-power-meter em {
  font-size: 0.92em;
  font-style: normal;
}

.main-power-meter span {
  display: block;
  margin-top: 0.18em;
  color: #fff7fb;
  font-size: clamp(8px, 0.86vw, 15px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 70, 56, 0.82);
}

.main-power-meter--current {
  left: 3.8%;
  top: 18%;
  max-width: 47%;
}

.main-power-meter--current strong {
  color: #58f878;
  text-shadow: 0 0 10px rgba(74, 255, 105, 0.92), 0 0 22px rgba(42, 255, 84, 0.62);
}

.main-power-meter--voltage {
  left: 47.2%;
  top: 18%;
  max-width: 50%;
}

.main-power-meter--voltage strong {
  color: #ff4c3b;
  text-shadow: 0 0 10px rgba(255, 65, 50, 0.95), 0 0 22px rgba(255, 84, 45, 0.56);
}

.main-power-meter--power {
  left: 22.5%;
  top: 57%;
  max-width: 48%;
}

.main-power-meter--power strong {
  color: #9fbeff;
  text-shadow: 0 0 10px rgba(143, 184, 255, 0.95), 0 0 22px rgba(83, 135, 255, 0.58);
}

.main-rack-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(167, 194, 238, 0.2) 0%, transparent 23%),
    radial-gradient(ellipse at 86% 10%, rgba(244, 234, 206, 0.2), transparent 22%),
    linear-gradient(106deg, #283a5a 0%, #102032 36%, #151c22 100%);
  box-shadow: inset 0 0 0 1px rgba(150, 188, 255, 0.16), inset 0 0 42px rgba(0, 0, 0, 0.48);
  overflow: hidden;
  color: #d9dde5;
  font-family: "IBM Plex Sans", "Sora", Arial, sans-serif;
}

.main-rack-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 6%),
    radial-gradient(ellipse at 22% 1%, rgba(235, 244, 255, 0.24), transparent 18%),
    radial-gradient(ellipse at 96% 2%, rgba(255, 251, 232, 0.2), transparent 16%);
  pointer-events: none;
}

.main-rack-panel__shine {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.16), transparent 22% 82%, rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(172deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 42px);
  mix-blend-mode: screen;
  opacity: 0.58;
  pointer-events: none;
}

.main-rack-lcd {
  position: absolute;
  left: 3.2%;
  top: 13.8%;
  width: 67.2%;
  height: 42.8%;
  border: 1px solid rgba(131, 169, 212, 0.5);
  background:
    radial-gradient(circle at 10% 20%, rgba(70, 118, 142, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(4, 16, 26, 0.95), rgba(9, 22, 34, 0.9));
  box-shadow: inset 0 0 24px rgba(20, 95, 155, 0.28), 0 0 24px rgba(45, 110, 180, 0.18);
  padding: 2.6% 3.1%;
}

.main-rack-meter {
  position: absolute;
  min-width: 0;
}

.main-rack-meter strong {
  display: block;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  font-size: clamp(30px, 3.6vw, 70px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
}

.main-rack-meter em {
  font-size: 0.92em;
  font-style: normal;
}

.main-rack-meter span {
  display: block;
  margin-top: 0.25em;
  font-size: clamp(13px, 1.45vw, 27px);
  font-weight: 900;
  color: #f4f6ff;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 55, 45, 0.78);
}

.main-rack-meter--current {
  left: 4.6%;
  top: 18%;
}

.main-rack-meter--current strong {
  color: #58f878;
  text-shadow: 0 0 10px rgba(74, 255, 105, 0.9), 0 0 22px rgba(42, 255, 84, 0.62);
}

.main-rack-meter--voltage {
  left: 50.8%;
  top: 18%;
}

.main-rack-meter--voltage strong {
  color: #ff4c3b;
  text-shadow: 0 0 10px rgba(255, 65, 50, 0.95), 0 0 22px rgba(255, 84, 45, 0.56);
}

.main-rack-meter--power {
  left: 18.6%;
  top: 57%;
}

.main-rack-meter--power strong {
  color: #9fbeff;
  text-shadow: 0 0 10px rgba(143, 184, 255, 0.95), 0 0 22px rgba(83, 135, 255, 0.58);
}

.main-rack-lcd__trace {
  position: absolute;
  left: 48.5%;
  top: 20%;
  width: 46.5%;
  height: 64%;
  border-left: 2px solid rgba(139, 178, 227, 0.62);
  border-right: 2px solid rgba(139, 178, 227, 0.62);
  border-bottom: 2px solid rgba(139, 178, 227, 0.62);
  opacity: 0.9;
}

.main-rack-labels {
  position: absolute;
  left: 73.2%;
  width: 20.2%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  align-items: center;
  color: #f4f0e9;
  font-weight: 800;
  font-size: clamp(17px, 1.95vw, 35px);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.86), 0 0 7px rgba(190, 190, 255, 0.45);
}

.main-rack-labels--top {
  top: 25.2%;
}

.main-rack-labels--bottom {
  top: 45.8%;
}

.main-rack-buttons {
  position: absolute;
  left: 73.2%;
  width: 20.2%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
}

.main-rack-buttons--top {
  top: 34%;
}

.main-rack-buttons--bottom {
  top: 54.2%;
}

.main-rack-buttons span {
  width: 68%;
  aspect-ratio: 2.4;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #f6f4e6 0%, #dddccf 42%, #9b9a8e 100%);
  box-shadow: inset 0 -5px 7px rgba(40, 38, 31, 0.32), 0 4px 6px rgba(0, 0, 0, 0.28);
}

.main-rack-title {
  position: absolute;
  left: 8%;
  bottom: 7.6%;
  color: #f3f4fb;
  font-weight: 900;
  font-size: clamp(40px, 4.6vw, 92px);
  letter-spacing: 0;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.95), 0 0 5px rgba(180, 180, 255, 0.7);
}

.device-screen--probe {
  left: 8.4%;
  top: 15.0%;
  width: 83.6%;
  height: 24.8%;
  border-color: rgba(180, 215, 255, 0.28);
  background: rgba(3, 8, 16, 0.82);
  color: #ff4b38;
}

.power-lcd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  justify-content: stretch;
  padding: 2.5% 3%;
  overflow: hidden;
  border-width: 1px;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1), transparent 28%),
    linear-gradient(135deg, rgba(2, 8, 14, 0.95), rgba(8, 14, 22, 0.88));
}

.power-lcd--probe {
  grid-template-rows: 1fr;
  padding: 3% 2.8%;
}

.power-lcd--probe .power-lcd__cell {
  border-bottom: none;
}

.power-lcd--probe .power-lcd__value {
  font-size: clamp(18px, 3.6vw, 44px);
}

.power-lcd--probe .power-lcd__label {
  font-size: clamp(8px, 1.15vw, 15px);
  margin-top: 6px;
  transform: none;
}

.probe-lcd__error {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 8%;
  padding: 4px 8px;
  border: 1px solid rgba(255, 105, 105, 0.72);
  border-radius: 6px;
  background: rgba(70, 8, 14, 0.72);
  color: #ffd7d7;
  font-size: clamp(10px, 1.2vw, 16px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 45, 45, 0.65);
}

.power-lcd__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  border-bottom: 1px solid rgba(150, 180, 255, 0.42);
}

.power-lcd__cell:nth-child(odd) {
  border-right: 1px solid rgba(150, 180, 255, 0.42);
  padding-right: 4%;
}

.power-lcd__cell:nth-child(even) {
  padding-left: 4%;
}

.power-lcd__cell--power {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  border-right: none;
  border-bottom: none;
  padding: 1% 0 0;
}

.power-lcd__value {
  font-size: clamp(13px, 2.35vw, 30px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.power-lcd__label {
  margin-top: 2px;
  color: rgba(230, 240, 255, 0.92);
  font-size: clamp(7px, 0.95vw, 13px);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.power-lcd__voltage {
  color: #ff4d35;
  text-shadow: 0 0 8px rgba(255, 72, 42, 0.95), 0 0 18px rgba(255, 72, 42, 0.55);
}

.power-lcd__current {
  color: #62ff85;
  text-shadow: 0 0 8px rgba(74, 255, 126, 0.9), 0 0 18px rgba(74, 255, 126, 0.45);
}

.power-lcd__power {
  color: #96b8ff;
  text-shadow: 0 0 8px rgba(130, 170, 255, 0.95), 0 0 18px rgba(100, 145, 255, 0.48);
}

.device-screen--motor {
  left: 21.0%;
  top: 22.2%;
  width: 47.1%;
  height: 19.1%;
  border-color: rgba(77, 177, 255, 0.72);
  background: rgba(9, 33, 84, 0.7);
  color: #8ed9ff;
  font-size: clamp(20px, 3.6vw, 38px);
}

.device-panel--motor .device-knob--motor,
.device-panel--motor .device-stepper--motor {
  display: none;
}

.control-lcd {
  display: block;
  padding: 0.24% 0.38%;
  overflow: hidden;
  font-family: "IBM Plex Sans", "Sora", sans-serif;
  font-size: clamp(7px, 0.92vw, 13px);
  line-height: 1.05;
  text-align: left;
  color: #f2fbff;
  background:
    linear-gradient(90deg, rgba(25, 116, 255, 0.54), rgba(30, 64, 190, 0.34)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px);
  text-shadow: 0 0 5px rgba(190, 232, 255, 0.95), 0 0 14px rgba(82, 162, 255, 0.55);
}

#motorDialog .control-lcd {
  font-size: clamp(5px, 0.68vw, 10px);
  line-height: 1;
}

.control-lcd__grid {
  display: grid;
  grid-template-columns: 24% 42% 34%;
  gap: 1px 2px;
  height: 100%;
  align-items: stretch;
}

.control-lcd__row,
.control-lcd__cell {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(214, 244, 255, 0.75);
  padding: 0 2px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

#motorDialog .control-lcd__cell {
  padding: 0 1px;
}

.control-lcd__cell--wide {
  grid-column: span 2;
}

.control-lcd__cell--full {
  grid-column: 1 / -1;
}

.control-lcd__menu {
  font-weight: 800;
}

.control-lcd__value {
  margin-left: 0.22em;
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

.readonly-probe-current,
.readonly-probe-current input,
.device-knob--probe-current:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.control-lcd__alarm {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 4%;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 70, 48, 0.32);
  color: #fff6ef;
  font-size: clamp(7px, 0.9vw, 12px);
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.03em;
  box-shadow: 0 0 12px rgba(255, 55, 40, 0.55);
}

.control-hotspot {
  position: absolute;
  z-index: 3;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: transparent;
  padding: 0;
}

.device-panel--motor:hover .control-hotspot,
.device-panel--motor:hover .control-keypad button {
  border-color: rgba(108, 222, 255, 0.36);
  background: rgba(41, 170, 255, 0.08);
}

.control-hotspot:focus-visible,
.control-keypad button:focus-visible,
.probe-lever:focus-visible {
  outline: 2px solid rgba(117, 230, 255, 0.92);
  outline-offset: 1px;
}

.control-hotspot--f1 { left: 14.0%; top: 22.7%; width: 5.0%; height: 4.4%; }
.control-hotspot--f2 { left: 14.0%; top: 27.7%; width: 5.0%; height: 4.4%; }
.control-hotspot--f3 { left: 14.0%; top: 32.7%; width: 5.0%; height: 4.4%; }
.control-hotspot--f4 { left: 14.0%; top: 37.7%; width: 5.0%; height: 4.3%; }
.control-hotspot--xminus { left: 25.8%; top: 45.0%; width: 4.9%; height: 4.3%; }
.control-hotspot--xplus { left: 31.1%; top: 45.0%; width: 4.9%; height: 4.3%; }
.control-hotspot--delete { left: 58.5%; top: 45.0%; width: 4.9%; height: 4.3%; }
.control-hotspot--confirm { left: 63.8%; top: 45.0%; width: 5.1%; height: 4.3%; }

.control-keypad {
  position: absolute;
  z-index: 3;
  left: 70.2%;
  top: 22.7%;
  width: 15.8%;
  height: 19.2%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3.1% 6.2%;
}

.control-keypad button {
  min-width: 0;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: transparent;
  padding: 0;
}

.probe-lever {
  position: absolute;
  z-index: 4;
  width: 4.6%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(67, 183, 225, 0.5);
  background: rgba(8, 28, 58, 0.28);
  color: rgba(20, 81, 112, 0.72);
  font-size: clamp(10px, 1.4vw, 18px);
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.probe-lever:hover {
  background: rgba(44, 196, 255, 0.18);
  color: #0d5a83;
}

.probe-lever--vup { left: 45.0%; top: 76.5%; }
.probe-lever--vdown { left: 51.8%; top: 76.5%; }
.probe-lever--hleft { left: 72.6%; top: 76.5%; }
.probe-lever--hright { left: 79.3%; top: 76.5%; }

.device-panel--probe .device-knob {
  width: 10.5%;
  cursor: pointer;
}

.device-panel--probe .device-knob--probe-current {
  left: 34.7%;
  top: 58.4%;
  display: none;
}

.device-panel--probe .device-knob--probe-voltage {
  left: 82.5%;
  top: 58.4%;
}

.device-panel--probe .device-stepper--probe-current {
  left: 26.5%;
  top: 74%;
}

.device-panel--probe .device-stepper--probe-voltage {
  left: 76.5%;
  top: 74%;
}

.device-knob {
  position: absolute;
  width: 9.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 34% 28%, #f4f1e4 0 12%, #d9d2bd 31%, #817867 66%, #29251e 100%);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.42), inset -5px -7px 14px rgba(0, 0, 0, 0.34), inset 4px 4px 10px rgba(255, 255, 255, 0.52);
  cursor: ns-resize;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
  transform-origin: center;
  touch-action: none;
}

.device-knob--main {
  cursor: pointer;
}

.device-knob::after {
  content: "";
  position: absolute;
  left: 48%;
  top: 10%;
  width: 5%;
  height: 36%;
  border-radius: 999px;
  background: #15171d;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.55);
}

.device-knob:active {
  filter: brightness(1.08);
}

.device-knob--main {
  left: 87.5%;
  top: 44.5%;
  width: 9.4%;
  border-width: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), inset -7px -9px 18px rgba(0, 0, 0, 0.32), inset 5px 5px 12px rgba(255, 255, 255, 0.56);
}

.device-knob--motor {
  left: 78.4%;
  top: 70.2%;
  width: 8.5%;
}

.device-stepper {
  position: absolute;
  display: flex;
  gap: 6px;
}

.device-stepper button {
  width: 34px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
  background: rgba(8, 19, 36, 0.9);
  color: #e9f5ff;
}

.device-stepper--main {
  right: 9%;
  left: auto;
  bottom: 19.5%;
  top: auto;
}

.device-digit-step {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-digit-step button,
.device-digit-step span {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(102, 169, 245, 0.72);
  background: rgba(8, 19, 36, 0.9);
  color: #e9f5ff;
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  white-space: nowrap;
}

.device-digit-step button {
  min-width: 70px;
}

.device-digit-step span {
  min-width: 58px;
  text-align: center;
  color: #a9d8ff;
  background: rgba(5, 16, 31, 0.72);
}

.device-digit-step--main {
  right: 0.4%;
  left: auto;
  bottom: 7.7%;
  top: auto;
}

#mainPowerDialog .device-stepper button {
  width: clamp(36px, 2.8vw, 52px);
  height: clamp(34px, 2.5vw, 48px);
  border-radius: 10px;
  font-size: clamp(22px, 1.9vw, 34px);
}

#mainPowerDialog .device-digit-step button,
#mainPowerDialog .device-digit-step span {
  height: clamp(32px, 2.5vw, 44px);
  border-radius: 10px;
  font-size: clamp(17px, 1.6vw, 26px);
  line-height: clamp(30px, 2.35vw, 42px);
}

#mainPowerDialog .device-digit-step button {
  min-width: clamp(86px, 6.2vw, 122px);
}

#mainPowerDialog .device-digit-step span {
  min-width: clamp(92px, 6.2vw, 126px);
}

#mainPowerDialog .modal-actions {
  margin-top: 10px;
}

#mainPowerDialog .modal-actions button {
  font-size: clamp(18px, 1.6vw, 26px);
  padding: 7px 16px;
  border-radius: 12px;
}

.device-stepper--motor {
  left: 72%;
  top: 79%;
}

.device-subcontrols {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(132, 183, 255, 0.22);
}

.device-hidden-control {
  display: none;
}

#dataExplain {
  margin-top: 12px;
  color: var(--sub);
  line-height: 1.65;
}

.modal-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button {
  border: 1px solid rgba(122, 186, 255, 0.52);
  border-radius: 9px;
  background: rgba(14, 29, 58, 0.95);
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

#paschenDialog .modal-actions,
#langmuirDialog .modal-actions {
  padding: 8px 0 2px;
}

#paschenDialog .modal-actions.paschen-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: calc(100% - 16px);
  margin: 10px auto 0;
  gap: 8px;
}

#paschenDialog .paschen-actions__row {
  display: grid;
  width: 100%;
  gap: 6px;
}

#paschenDialog .paschen-actions__row--operation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#paschenDialog .paschen-actions__row--export {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#paschenDialog .paschen-actions__row button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

#paschenDialog .paschen-actions__row--operation button {
  min-height: 42px;
  padding: 8px 14px;
  font-size: 14px;
}

#paschenDialog .paschen-actions__row--export button {
  min-height: 40px;
  padding: 7px 10px;
  font-size: 13px;
}

#paschenDialog .modal-actions button,
#langmuirDialog .modal-actions button {
  background: rgba(9, 30, 58, 0.92);
  border-color: rgba(120, 188, 255, 0.45);
}

#paschenDialog .modal-actions .report-export-btn,
#langmuirDialog .modal-actions .report-export-btn {
  background: linear-gradient(135deg, #1d7bd8, #14a877);
  border-color: rgba(190, 255, 232, 0.72);
  color: #f8fffb;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(10, 124, 160, 0.22), inset 0 0 14px rgba(255, 255, 255, 0.12);
}
.table-wrap {
  max-height: 200px;
  overflow: auto;
  border: 1px solid rgba(127, 187, 255, 0.35);
  border-radius: 9px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th, td {
  border-bottom: 1px solid rgba(130, 181, 255, 0.2);
  padding: 5px;
  text-align: center;
}

th i,
label i,
.phys-token i {
  font-style: italic;
  font-weight: 400;
}

th sub,
label sub,
.phys-token sub {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: sub;
}

.phys-token {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.field-label-text {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 3px;
}

td input {
  width: 78px;
  background: #0a1327;
  color: var(--text);
  border: 1px solid rgba(120, 164, 255, 0.45);
  border-radius: 6px;
  padding: 3px;
}

canvas {
  background: rgba(15, 32, 58, 0.9);
  border: 1px solid rgba(133, 179, 255, 0.4);
  border-radius: 10px;
  margin-top: 8px;
  width: 100%;
}

#paschenCanvas,
#langmuirCanvas {
  height: 340px;
}

#paschenCanvas {
  cursor: crosshair;
  touch-action: none;
}

.mini {
  color: #d1def9;
  font-size: 12px;
}

.langmuir-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.record-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.record-mode-tabs button.active {
  border-color: #67d5ff;
  background: #123a63;
  color: #fff;
}

.langmuir-position-status {
  margin: 10px 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 213, 255, 0.35);
  border-radius: 7px;
  background: rgba(18, 58, 99, 0.42);
  color: #bfefff;
  font-size: 13px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.langmuir-grid output,
.langmuir-grid input[type="number"] {
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(120, 164, 255, 0.45);
  border-radius: 6px;
  background: #0a1327;
  color: #8cf5c7;
  font-variant-numeric: tabular-nums;
}

.langmuir-manual-table {
  margin-top: 10px;
  max-height: 170px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .learning-home__layout {
    width: min(100vw - 28px, 760px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 0 34px;
  }

  .learning-nav {
    min-height: 0;
  }

  .learning-brand {
    height: 96px;
    padding: 0 26px;
  }

  .learning-nav__item {
    min-height: 48px;
    font-size: 17px;
  }

  .learning-content {
    padding: 0 18px 30px;
  }

  .learning-breadcrumb {
    height: auto;
    min-height: 54px;
    font-size: 16px;
  }

  .learning-section {
    padding: 30px 0 0;
  }

  .learning-section h2 {
    font-size: 24px;
  }

  .learning-section h3 {
    font-size: 19px;
  }

  .learning-section p,
  .learning-section li {
    font-size: 17px;
    line-height: 1.72;
  }

  .feedback-score-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-highlight,
  .learning-grid,
  .video-download-grid,
  .learning-list--two {
    grid-template-columns: 1fr;
  }

  .video-download-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .video-download-card__action {
    grid-column: 1 / -1;
    text-align: center;
  }

  #mainPowerDialog {
    width: min(820px, calc(100vw - 28px));
    max-height: 80vh;
    padding: 10px;
  }

  #mainPowerDialog .device-panel--main {
    max-height: calc(80vh - 88px);
  }

  .learning-formula {
    font-size: 16px;
    overflow-x: auto;
  }

  .learning-table,
  .learning-table--compact {
    min-width: 620px;
    font-size: 15px;
  }

  .experiment-entry__inner { padding: 26px; }
  .experiment-entry h1 { font-size: 32px; }
  .experiment-entry__actions { grid-template-columns: 1fr; }
  .experiment-choice { min-height: 82px; font-size: 19px; }
  .reference-stats { grid-template-columns: 1fr; }
}

.dual-control {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  align-items: center;
}

.dual-control input[type='number'] {
  width: 96px;
  text-align: right;
}

.dual-control input[type='range'] {
  width: 100%;
}

.pressure-confirm-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pressure-confirm-row .mini {
  margin: 0;
  color: var(--sub);
}

#pressureConfirmBtn {
  min-width: 96px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(17, 91, 151, 0.98), rgba(24, 136, 155, 0.98));
}

#pressureConfirmBtn.is-pending {
  border-color: rgba(255, 205, 92, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 205, 92, 0.16);
}

.readonly-control {
  display: grid;
  grid-template-columns: 1fr;
}

.readonly-control input {
  width: 100%;
  border: 1px solid rgba(122, 186, 255, 0.35);
  border-radius: 10px;
  background: rgba(15, 28, 56, 0.92);
  color: var(--text);
  padding: 10px 12px;
  text-align: right;
}

.ai-tutor-btn {
  background: linear-gradient(135deg, #2563eb, #16a34a);
  color: #fff;
  border-color: rgba(186, 230, 253, 0.55);
}

.ai-tutor-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 8px;
  background: rgba(11, 18, 32, 0.96);
  color: #eef6ff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.ai-tutor-panel[hidden] {
  display: none;
}

.ai-tutor-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.ai-tutor-header strong {
  display: block;
  font-size: 16px;
}

.ai-tutor-header span {
  display: block;
  margin-top: 2px;
  color: #a7f3d0;
  font-size: 12px;
}

.ai-tutor-header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ai-tutor-snapshot {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

.ai-tutor-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.26);
  background: rgba(6, 78, 59, 0.28);
  color: #d1fae5;
}

.ai-tutor-score strong {
  color: #6ee7b7;
  font-size: 16px;
}

.ai-tutor-score span {
  color: #bbf7d0;
  font-size: 12px;
  white-space: nowrap;
}

.ai-tutor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.ai-message {
  max-width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.55;
  font-size: 14px;
  white-space: pre-wrap;
}

.ai-message--student {
  margin-left: 44px;
  background: #2563eb;
  color: #fff;
}

.ai-message--assistant {
  margin-right: 18px;
  background: rgba(30, 41, 59, 0.96);
  color: #eef6ff;
}

.ai-message--system {
  background: rgba(22, 163, 74, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #d1fae5;
}

.ai-tutor-quick {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.ai-tutor-quick button {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid rgba(147, 197, 253, 0.32);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
  cursor: pointer;
}

.ai-tutor-input {
  display: flex;
  gap: 8px;
  padding: 12px;
}

.ai-tutor-input input {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  outline: none;
}

.ai-tutor-input button {
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #22c55e;
  color: #052e16;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 720px) {
  .ai-tutor-panel {
    right: 12px;
    bottom: 12px;
    height: min(560px, calc(100vh - 24px));
  }
}

/* Blue-white dialog theme --------------------------------------------------
   Standard application dialogs use the same quiet visual language as the
   supplied reference: white cards, neutral secondary actions and one clear
   blue primary action.  Controls drawn as parts of laboratory instruments
   keep their original hardware styling. */
:root {
  --dialog-blue: #2468d8;
  --dialog-blue-hover: #1f5ec7;
  --dialog-ink: #202938;
  --dialog-body: #5c6675;
  --dialog-line: #d9dee7;
  --dialog-soft: #f6f8fb;
}

.modal {
  border: 1px solid rgba(218, 223, 231, 0.98);
  border-radius: 18px;
  background: #ffffff;
  color: var(--dialog-ink);
  padding: 20px 22px;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08);
}

.modal::backdrop {
  background: rgba(24, 28, 35, 0.46);
  backdrop-filter: blur(1px);
}

.modal:modal:not(.nonmodal-dialog) {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal h3,
#mainPowerDialog h3,
#sparkPowerDialog h3,
#motorDialog h3,
#paschenDialog h3,
#langmuirDialog h3,
.experiment-score-modal h3 {
  color: var(--dialog-ink);
}

.modal .mini,
.modal label,
.modal p,
.ground-notice-message,
.help-lead,
.help-list,
.instrument-intro-body p,
.experiment-score-modal__empty {
  color: var(--dialog-body);
}

#mainPowerDialog,
#sparkPowerDialog,
#motorDialog,
#probePowerDialog,
.help-modal,
.experiment-score-modal {
  background: #ffffff;
  border-color: rgba(218, 223, 231, 0.98);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.24), 0 2px 8px rgba(15, 23, 42, 0.08);
}

#paschenDialog h3,
#langmuirDialog h3 {
  background: linear-gradient(180deg, #ffffff 78%, rgba(255, 255, 255, 0.96));
  border-bottom: 1px solid #e8ebf0;
}

.modal-close {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7a828e;
  box-shadow: none;
  font-size: 20px;
  font-weight: 500;
}

.modal-close:hover {
  border-color: #e2e6ec;
  background: #f5f7fa;
  color: #283142;
  filter: none;
}

.modal-actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.modal-actions button,
#paschenDialog button:not(.modal-close),
#langmuirDialog button:not(.modal-close),
#vacuumDialog button,
.record-mode-tabs button,
#runLangmuirBtn,
#measureLangmuirPointBtn,
#analyzeLangmuirManualBtn,
#clearLangmuirManualBtn {
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid var(--dialog-line);
  border-radius: 8px;
  background: #ffffff;
  color: #3f4856;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 600;
}

.modal-actions button:hover,
#paschenDialog button:not(.modal-close):hover,
#langmuirDialog button:not(.modal-close):hover,
#vacuumDialog button:hover,
.record-mode-tabs button:hover {
  border-color: #b7c8e8;
  background: #f7f9fc;
  color: #2358aa;
  filter: none;
}

.modal-actions > button:last-child,
.ground-notice-modal .modal-actions button:last-child,
#analyzePaschenBtn,
#runLangmuirBtn,
#pressureConfirmBtn,
#paschenDialog .report-export-btn,
#langmuirDialog .report-export-btn,
.record-mode-tabs button.active {
  border-color: var(--dialog-blue);
  background: var(--dialog-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(36, 104, 216, 0.22);
}

.modal-actions > button:last-child:hover,
.ground-notice-modal .modal-actions button:last-child:hover,
#analyzePaschenBtn:hover,
#runLangmuirBtn:hover,
#pressureConfirmBtn:hover,
#paschenDialog .report-export-btn:hover,
#langmuirDialog .report-export-btn:hover,
.record-mode-tabs button.active:hover {
  border-color: var(--dialog-blue-hover);
  background: var(--dialog-blue-hover);
  color: #ffffff;
  filter: none;
}

.ground-notice-modal {
  width: min(440px, 88vw);
  padding: 24px 24px 22px;
}

.ground-notice-modal h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.ground-notice-message {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.7;
}

.unsafe-submission-modal .danger,
.unsafe-submission-modal .danger:hover {
  border-color: #d94841;
  background: #d94841;
  color: #ffffff;
}

.table-wrap {
  border-color: #dfe4eb;
  background: #ffffff;
}

th,
td {
  border-bottom-color: #e6eaf0;
  color: #3f4856;
}

td input,
.langmuir-grid input[type="number"],
.modal select,
.modal input[type="number"],
.modal input[type="text"] {
  border-color: #d7dde6;
  background: #f8fafc;
  color: #253047;
}

.modal output,
.langmuir-position-status {
  color: #315b91;
}

.langmuir-position-status,
.experiment-score-progress {
  border-color: #dce5f3;
  background: #f4f7fc;
  color: #48627f;
}

.experiment-score-overview {
  border-color: #cdddf5;
  background: #f2f6fd;
  color: #34557f;
}

.experiment-score-overview__score {
  color: var(--dialog-blue);
}

.experiment-score-overview__grade,
.experiment-score-section h4,
.experiment-score-section li,
.experiment-score-section--award li,
.experiment-score-section--deduction li,
.experiment-score-section--improvement li {
  color: #40546e;
}

.experiment-score-section {
  border-top-color: #e2e7ee;
}

@media (max-width: 720px) {
  .modal {
    padding: 18px;
    border-radius: 14px;
  }

  .modal-actions {
    gap: 8px;
  }

  .modal-actions button {
    flex: 1 1 auto;
  }
}

/* Unified blue-white technology interface -------------------------------- */
:root {
  --tech-blue: #1677e8;
  --tech-blue-deep: #0b58ba;
  --tech-blue-bright: #35a7ff;
  --tech-navy: #123a67;
  --tech-border: #83bdec;
  --tech-pale: #eef7ff;
  --tech-white: #ffffff;
}

.top-tools .action-btn,
.home-return-btn,
.scene-tool-btn {
  border: 1px solid var(--tech-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(232, 245, 255, 0.96));
  color: var(--tech-navy);
  box-shadow: 0 7px 18px rgba(22, 102, 178, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.top-tools .action-btn:hover,
.home-return-btn:hover,
.scene-tool-btn:hover {
  border-color: #3f9be4;
  background: linear-gradient(180deg, #ffffff, #dcefff);
  color: #0a54aa;
  box-shadow: 0 9px 22px rgba(22, 102, 178, 0.23), 0 0 0 2px rgba(53, 167, 255, 0.10);
  filter: none;
  transform: translateY(-1px);
}

.top-tools .action-btn:active,
.home-return-btn:active,
.scene-tool-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(22, 102, 178, 0.18);
}

.top-tools .effect-btn,
.top-tools .ai-tutor-btn,
.top-tools .hose-switch-btn.is-gas-bottle,
.scene-tool-btn.is-active {
  border-color: #3f9fe9;
  background: linear-gradient(135deg, var(--tech-blue-deep), var(--tech-blue-bright));
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(18, 111, 214, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.top-tools .effect-btn:hover,
.top-tools .ai-tutor-btn:hover,
.top-tools .hose-switch-btn.is-gas-bottle:hover,
.scene-tool-btn.is-active:hover {
  border-color: #61b8f5;
  background: linear-gradient(135deg, #0a63cd, #299cf3);
  color: #ffffff;
}

.gas-select-tool {
  border: 1px solid var(--tech-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 255, 0.96));
  color: var(--tech-navy);
  box-shadow: 0 7px 18px rgba(22, 102, 178, 0.16);
}

.gas-select-tool select {
  border-color: #9cc9ee;
  background: #ffffff;
  color: #104d88;
  box-shadow: inset 0 1px 3px rgba(19, 73, 121, 0.07);
}

.gas-select-tool select:focus {
  border-color: var(--tech-blue);
  box-shadow: 0 0 0 3px rgba(22, 119, 232, 0.14);
}

.experiment-entry {
  background:
    radial-gradient(circle at 22% 18%, rgba(69, 157, 235, 0.18), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(52, 179, 255, 0.13), transparent 32%),
    rgba(15, 40, 67, 0.68);
  backdrop-filter: blur(10px) saturate(0.9);
}

.experiment-entry__inner {
  position: relative;
  overflow: hidden;
  border: 1px solid #87bce8;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(235, 247, 255, 0.98));
  box-shadow: 0 28px 86px rgba(5, 32, 61, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.experiment-entry__inner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #0d5ec2, #38adff 52%, #0d5ec2);
}

.experiment-entry__eyebrow {
  color: #277bc5;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.experiment-entry h1 {
  color: #12365e;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

.experiment-choice {
  position: relative;
  overflow: hidden;
  border: 1px solid #8fc2ec;
  background: linear-gradient(155deg, #ffffff, #eaf5ff);
  color: #174d82;
  box-shadow: 0 8px 20px rgba(35, 108, 174, 0.10), inset 0 1px 0 #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.experiment-choice::after {
  content: '';
  position: absolute;
  inset: auto 18% 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, transparent, #36a8ff, transparent);
  opacity: 0.72;
}

.experiment-choice:hover,
.experiment-choice:focus-visible {
  border-color: #399de8;
  background: linear-gradient(135deg, #0c67d2, #32a7f5);
  color: #ffffff;
  box-shadow: 0 13px 28px rgba(22, 111, 205, 0.25), 0 0 0 3px rgba(61, 165, 240, 0.12);
  filter: none;
  transform: translateY(-2px);
  outline: none;
}

.experiment-entry__home,
.learning-primary,
.video-download-card__action {
  border: 1px solid #0b64cb;
  background: linear-gradient(135deg, #0c61c9, #2b9ff0);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(21, 104, 199, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.experiment-entry__home:hover,
.learning-primary:hover,
.video-download-card__action:hover {
  border-color: #3eabf3;
  background: linear-gradient(135deg, #0758bd, #198fe4);
  color: #ffffff;
  filter: none;
}

.learning-nav__item.active,
.learning-nav__item--start:hover {
  background: linear-gradient(90deg, #1268cd, #279ce9);
  color: #ffffff;
}

.learning-nav__item--feedback {
  border-top-color: rgba(39, 131, 215, 0.30);
}

.self-check-answer,
.feedback-report-section--award,
.learning-highlight > span,
.learning-grid > div {
  border-left-color: var(--tech-blue);
}

.self-check-answer {
  background: #edf6ff;
  color: #214f7d;
}

.video-download-card.is-ready {
  border-color: #9bc8ed;
  background: #f2f9ff;
}

.video-download-card__index {
  color: var(--tech-blue);
}

.action-btn.primary,
#paschenDialog .report-export-btn,
#langmuirDialog .report-export-btn {
  border-color: #4ca9ec;
  background: linear-gradient(135deg, #0d63cb, #30a3f0);
  color: #ffffff;
}

/* Paschen data operations are a single action group. Keeping four of them
   white made the lower toolbar look unfinished, so all five use the same
   blue glass gradient while retaining their existing hierarchy and layout. */
#paschenDialog .paschen-actions__row button {
  border-color: rgba(48, 151, 231, 0.96);
  background:
    linear-gradient(180deg, rgba(96, 192, 241, 0.98) 0%, rgba(35, 130, 207, 0.98) 48%, rgba(12, 75, 147, 0.99) 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 32, 78, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(0, 35, 91, 0.30),
    0 5px 13px rgba(12, 83, 155, 0.20);
}

/* Override the legacy blue-green report accent inside this all-blue group. */
#paschenDialog .paschen-actions__row .report-export-btn {
  border-color: rgba(48, 151, 231, 0.96);
  background: linear-gradient(180deg, #60c0f1 0%, #2382cf 48%, #0c4b93 100%);
  color: #ffffff;
}

#paschenDialog .paschen-actions__row button:hover {
  border-color: #61c7ff;
  background:
    linear-gradient(180deg, #75d2ff 0%, #2e94df 48%, #0d5db4 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 18px rgba(16, 105, 190, 0.28);
}

#paschenDialog .paschen-actions__row button:active {
  transform: translateY(0);
  background: linear-gradient(180deg, #176fbd 0%, #0d58a8 100%);
  box-shadow: inset 0 2px 5px rgba(0, 31, 78, 0.30);
}

/* White data-entry panels need clearly visible blue controls.  Keep only the
   neutral close icon white/grey; every operation button uses the same blue
   glass hierarchy as the in-scene toolbar. */
#paschenDialog button:not(.modal-close),
#langmuirDialog button:not(.modal-close) {
  border-color: rgba(48, 151, 231, 0.96);
  background: linear-gradient(180deg, #67c6f4 0%, #278bd7 48%, #0d55a5 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 32, 78, 0.58);
  box-shadow: 0 7px 15px rgba(10, 88, 164, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

#paschenDialog button:not(.modal-close):hover,
#langmuirDialog button:not(.modal-close):hover {
  border-color: #70d2ff;
  background: linear-gradient(180deg, #7cd6ff 0%, #329be4 48%, #1264bc 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 9px 19px rgba(10, 88, 164, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

#paschenDialog button:not(.modal-close):active,
#langmuirDialog button:not(.modal-close):active {
  transform: translateY(0);
  background: linear-gradient(180deg, #1c78c7 0%, #0d57a7 100%);
  box-shadow: inset 0 2px 5px rgba(0, 31, 78, 0.30);
}

/* AI tutor is an application popup, so its chrome follows the same palette. */
.ai-tutor-panel {
  border-color: #8abce7;
  background: rgba(248, 252, 255, 0.98);
  color: #173a60;
  box-shadow: 0 22px 70px rgba(7, 50, 91, 0.30);
}

.ai-tutor-header {
  border-bottom-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #0d60c5, #2da2ef);
  color: #ffffff;
}

.ai-tutor-header span {
  color: #d8efff;
}

.ai-tutor-header button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ai-tutor-snapshot {
  border-bottom-color: #dce9f5;
  color: #5b7490;
}

.ai-tutor-score {
  border-bottom-color: #c9dff3;
  background: #eaf5ff;
  color: #245b91;
}

.ai-tutor-score strong,
.ai-tutor-score span {
  color: #176ec4;
}

.ai-message--assistant {
  background: #eaf4ff;
  color: #294f76;
}

.ai-message--system {
  border-color: #b8d8f3;
  background: #f0f8ff;
  color: #285c8d;
}

.ai-tutor-quick {
  border-top-color: #dbe8f3;
}

.ai-tutor-quick button {
  border-color: #acd0ef;
  background: #edf7ff;
  color: #1e609d;
}

.ai-tutor-quick button:hover {
  border-color: #56a8e7;
  background: #dcefff;
  filter: none;
}

.ai-tutor-input input {
  border-color: #aac9e3;
  background: #ffffff;
  color: #193d63;
}

.ai-tutor-input input:focus {
  border-color: var(--tech-blue);
  box-shadow: 0 0 0 3px rgba(22, 119, 232, 0.12);
}

.ai-tutor-input button {
  background: linear-gradient(135deg, #0d63cb, #2a9fec);
  color: #ffffff;
}

/* In-experiment glass controls ------------------------------------------- */
.top-tools .action-btn,
.home-return-btn,
.scene-tool-btn {
  border-color: rgba(153, 222, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(95, 181, 229, 0.80) 0%, rgba(39, 112, 165, 0.78) 52%, rgba(18, 67, 112, 0.84) 100%);
  color: #f7fcff;
  box-shadow:
    0 9px 22px rgba(5, 44, 82, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(5, 44, 82, 0.28);
  text-shadow: 0 1px 2px rgba(5, 38, 72, 0.62);
  backdrop-filter: blur(10px) saturate(1.15);
}

.top-tools .action-btn:hover,
.home-return-btn:hover,
.scene-tool-btn:hover {
  border-color: rgba(190, 238, 255, 0.92);
  background:
    linear-gradient(180deg, rgba(119, 202, 244, 0.88) 0%, rgba(43, 130, 190, 0.86) 52%, rgba(18, 78, 133, 0.90) 100%);
  color: #ffffff;
  box-shadow:
    0 12px 27px rgba(5, 53, 98, 0.28),
    0 0 0 2px rgba(116, 204, 249, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.top-tools .effect-btn,
.top-tools .ai-tutor-btn,
.top-tools .hose-switch-btn.is-gas-bottle,
.scene-tool-btn.is-active {
  border-color: rgba(170, 229, 255, 0.90);
  background:
    linear-gradient(180deg, rgba(72, 182, 248, 0.94) 0%, rgba(17, 111, 211, 0.94) 58%, rgba(8, 72, 158, 0.96) 100%);
  color: #ffffff;
  box-shadow:
    0 10px 25px rgba(4, 70, 151, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 16px rgba(43, 157, 239, 0.14);
}

.gas-select-tool {
  border-color: rgba(153, 222, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(95, 181, 229, 0.80) 0%, rgba(39, 112, 165, 0.78) 52%, rgba(18, 67, 112, 0.84) 100%);
  color: #ffffff;
  box-shadow:
    0 9px 22px rgba(5, 44, 82, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  text-shadow: 0 1px 2px rgba(5, 38, 72, 0.62);
  backdrop-filter: blur(10px) saturate(1.15);
}

.gas-select-tool select {
  border-color: rgba(186, 232, 255, 0.78);
  background: rgba(6, 52, 96, 0.48);
  color: #ffffff;
  box-shadow: inset 0 1px 4px rgba(2, 26, 52, 0.22);
  backdrop-filter: blur(8px);
}

.gas-select-tool select option {
  background: #154d7d;
  color: #ffffff;
}

/* Experiment reference: warm instruction-sheet panel -------------------- */
#experimentReferenceDialog.reference-modal {
  width: min(700px, 86vw);
  padding: 24px 26px 22px;
  border: 1px solid #8fc7df;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.99), rgba(255, 251, 231, 0.99));
  box-shadow:
    0 24px 70px rgba(22, 55, 77, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

#experimentReferenceDialog.reference-modal::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, #0c79b7, #3bb4dc 55%, #0c79b7);
}

#experimentReferenceDialog h3 {
  margin: 5px 0 16px;
  color: #214967;
  font-size: 23px;
}

#experimentReferenceDialog .reference-stats {
  gap: 10px;
  padding: 12px;
  border: 1px solid #b7dce8;
  border-radius: 10px;
  background: rgba(255, 255, 247, 0.82);
  box-shadow: inset 0 1px 8px rgba(97, 132, 143, 0.08);
}

#experimentReferenceDialog .stat {
  position: relative;
  min-height: 58px;
  padding: 9px 13px 10px;
  border: 2px solid rgba(157, 208, 223, 0.88);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 252, 220, 0.98), rgba(255, 242, 184, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 2px 5px rgba(85, 115, 126, 0.07);
}

#experimentReferenceDialog .stat::after {
  content: '';
  position: absolute;
  inset: 5px 7px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
}

#experimentReferenceDialog .stat .k {
  color: #52798d;
  font-size: 12px;
  font-weight: 700;
}

#experimentReferenceDialog .stat .v {
  margin-top: 3px;
  color: #273d4d;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

#experimentReferenceDialog .modal-actions {
  margin-top: 16px;
}

#experimentReferenceDialog .modal-actions button:first-child {
  border-color: #b7d1df;
  background: rgba(255, 255, 255, 0.86);
  color: #3f6072;
}

#experimentReferenceDialog .modal-actions button:last-child {
  border-color: #1484c2;
  background: linear-gradient(180deg, #36aee0, #0b76b8);
  color: #ffffff;
}

/* Pressure gauge: dark digital-instrument treatment ---------------------- */
#vacuumDialog.pressure-gauge-modal {
  width: min(600px, 90vw);
  padding: 0 24px 22px;
  overflow: hidden;
  border: 1px solid rgba(94, 191, 255, 0.92);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(35, 154, 235, 0.22), transparent 34%),
    linear-gradient(145deg, #102f54 0%, #081b35 54%, #06152a 100%);
  color: #edf8ff;
  box-shadow:
    0 26px 70px rgba(1, 18, 41, 0.42),
    0 0 0 1px rgba(174, 224, 255, 0.18) inset,
    0 0 30px rgba(35, 142, 222, 0.18) inset;
}

#vacuumDialog.pressure-gauge-modal::backdrop {
  background: rgba(13, 33, 51, 0.45);
  backdrop-filter: blur(2px);
}

#vacuumDialog .pressure-gauge-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 -24px 18px;
  padding: 11px 56px 11px 24px;
  border-bottom: 1px solid rgba(106, 198, 255, 0.48);
  background: linear-gradient(180deg, rgba(45, 135, 202, 0.72), rgba(13, 65, 112, 0.72));
  color: #eaf8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 27, 60, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#vacuumDialog .pressure-gauge-brand small {
  margin-left: auto;
  color: #8fd6ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#vacuumDialog .pressure-gauge-brand__mark {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 2px solid #9de7ff;
  border-radius: 50%;
  background: #21b7ff;
  box-shadow: 0 0 9px #38c7ff;
}

#vacuumDialog.pressure-gauge-modal h3 {
  margin: 0 0 14px;
  color: #f2f9ff;
  font-size: 25px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 25, 58, 0.74);
}

#vacuumDialog.pressure-gauge-modal .modal-close {
  top: 8px;
  right: 12px;
  border-color: rgba(171, 224, 255, 0.36);
  background: rgba(4, 34, 66, 0.42);
  color: #dff5ff;
}

#vacuumDialog.pressure-gauge-modal .modal-close:hover {
  border-color: #8bdcff;
  background: rgba(25, 114, 177, 0.72);
  color: #ffffff;
}

#vacuumDialog .vacuum-workflow-controls,
#vacuumDialog > label,
#vacuumDialog .pressure-confirm-row {
  border: 1px solid rgba(82, 159, 218, 0.48);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 64, 105, 0.88), rgba(8, 35, 68, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 17, 39, 0.16);
}

#vacuumDialog .vacuum-workflow-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  margin-bottom: 12px;
}

#vacuumDialog .vacuum-workflow-controls .mini {
  margin: 0;
  color: #a9cce6;
  line-height: 1.45;
}

#vacuumDialog > label {
  display: block;
  padding: 13px 14px 15px;
  color: #cae7f8;
  font-size: 13px;
  font-weight: 700;
}

#vacuumDialog .dual-control {
  grid-template-columns: 1fr 118px;
  gap: 14px;
  margin-top: 11px;
}

#vacuumDialog input[type='range'] {
  accent-color: #29b8ff;
  filter: drop-shadow(0 0 4px rgba(36, 181, 255, 0.48));
}

#vacuumDialog input[type='number'] {
  width: 118px;
  min-height: 46px;
  border: 1px solid rgba(78, 184, 255, 0.78);
  border-radius: 10px;
  background: linear-gradient(180deg, #06152a, #0b2645);
  color: #a8ebff;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 0 13px rgba(0, 143, 228, 0.18), 0 0 9px rgba(20, 144, 220, 0.12);
}

#vacuumDialog .pressure-confirm-row {
  margin-top: 12px;
  padding: 12px 14px;
}

#vacuumDialog .pressure-confirm-row .mini {
  color: #8fb8d5;
}

#vacuumDialog button:not(.modal-close) {
  min-height: 44px;
  border: 1px solid #58c8ff;
  border-radius: 10px;
  background: linear-gradient(180deg, #44bdf2 0%, #1684d2 52%, #07519e 100%);
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 35, 82, 0.72);
  box-shadow:
    0 7px 16px rgba(0, 77, 145, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#vacuumDialog button:not(.modal-close):hover {
  border-color: #9fe7ff;
  background: linear-gradient(180deg, #69d4ff 0%, #2598e3 50%, #0b61b6 100%);
  color: #ffffff;
  transform: translateY(-1px);
  filter: none;
}

#vacuumDialog #vacuumPumpToggleBtn[aria-pressed='true'] {
  border-color: #69e4ff;
  background: linear-gradient(180deg, #28c9e9, #0b81bd 55%, #075088);
  box-shadow: 0 0 18px rgba(39, 199, 236, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

#vacuumDialog #pressureOut {
  display: block;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(65, 177, 242, 0.48);
  border-radius: 10px;
  background: rgba(3, 19, 39, 0.86);
  color: #74ddff;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 0 9px rgba(57, 196, 255, 0.48);
  box-shadow: inset 0 0 15px rgba(15, 123, 201, 0.14);
}

#vacuumDialog #pressureOut::before {
  content: '实时读数  ';
  color: #7fabc8;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
}

#vacuumDialog .modal-actions {
  margin-top: 14px;
}

#vacuumDialog .modal-actions button {
  min-width: 112px;
}

@media (max-width: 640px) {
  #vacuumDialog .pressure-gauge-brand small {
    display: none;
  }

  #vacuumDialog .vacuum-workflow-controls {
    grid-template-columns: 1fr;
  }

  #vacuumDialog .dual-control {
    grid-template-columns: 1fr;
  }

  #vacuumDialog input[type='number'] {
    width: 100%;
  }
}

/* Pressure gauge: simplified white control panel ------------------------ */
#vacuumDialog.pressure-gauge-modal {
  width: min(600px, 90vw);
  padding: 28px 26px 26px;
  overflow: visible;
  border: 1px solid #d7e0ea;
  border-radius: 18px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 24px 64px rgba(29, 50, 73, 0.24);
}

#vacuumDialog.pressure-gauge-modal::backdrop {
  background: rgba(40, 57, 73, 0.28);
  backdrop-filter: blur(2px);
}

#vacuumDialog.pressure-gauge-modal h3 {
  margin: 0 46px 18px 0;
  color: #1f2937;
  font-size: 25px;
  letter-spacing: 0;
  text-shadow: none;
}

#vacuumDialog.pressure-gauge-modal .modal-close {
  top: 14px;
  right: 14px;
  border-color: #d7e0ea;
  background: #f4f7fa;
  color: #526273;
}

#vacuumDialog.pressure-gauge-modal .modal-close:hover {
  border-color: #a9bdd0;
  background: #eaf1f7;
  color: #1f2937;
}

#vacuumDialog .vacuum-workflow-controls,
#vacuumDialog > label,
#vacuumDialog .pressure-confirm-row {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #f7f9fc;
  box-shadow: none;
}

#vacuumDialog .vacuum-workflow-controls .mini,
#vacuumDialog .pressure-confirm-row .mini {
  color: #637386;
}

#vacuumDialog > label {
  color: #334155;
}

#vacuumDialog input[type='range'] {
  accent-color: #1684d2;
  filter: none;
}

#vacuumDialog input[type='number'] {
  border-color: #b8c9d9;
  background: #ffffff;
  color: #164f7a;
  box-shadow: inset 0 1px 3px rgba(29, 50, 73, 0.08);
}

#vacuumDialog #pressureOut[hidden] {
  display: none !important;
}
