/* Lab Maya: lembar praktikum (tujuan, langkah, tabel pengamatan, laporan).
   Satu berkas untuk ketiga aplikasi; warna dan posisi diatur per tema. */
.lm-root, .lm-inline {
  --lm-bg: linear-gradient(150deg, #0d1c27f5, #07121bf7);
  --lm-surface: #0f2230;
  --lm-line: #22405580;
  --lm-text: #dde9f1;
  --lm-muted: #8aa6b9;
  --lm-accent: #3c9ad9;
  --lm-accent-ink: #ffffff;
  --lm-gold: #e9bb71;
  --lm-goal: #e9bb71;
  --lm-question: #74d0f4;
  --lm-input: #0a1925;
  --lm-shadow: 0 18px 50px #0007;
  --lm-z: 50;
  --lm-z-panel: 60;
}
.lm-theme-human {
  --lm-bg: linear-gradient(150deg, #13242bf5, #0b171df7);
  --lm-surface: #142a31;
  --lm-line: #b9c7c324;
  --lm-text: #dfeae8;
  --lm-muted: #93aab0;
  --lm-accent: #b8d9cf;
  --lm-accent-ink: #10241f;
  --lm-gold: #cebfa8;
  --lm-goal: #cebfa8;
  --lm-question: #9ad9c8;
  --lm-input: #0c1b21;
}
.lm-theme-karya {
  --lm-bg: #f6f1e7;
  --lm-surface: #ece4d4;
  --lm-line: #cdbfa6;
  --lm-text: #1f2b26;
  --lm-muted: #5d6b62;
  --lm-accent: #1f3a30;
  --lm-accent-ink: #f6f1e7;
  --lm-gold: #94621f;
  --lm-goal: #b88a3c;
  --lm-question: #2d6a55;
  --lm-input: #fffdf8;
  --lm-shadow: 0 18px 50px #1d2a2433;
}
.lm-root button, .lm-root input, .lm-root textarea, .lm-inline button { font: inherit; }
.lm-root [hidden] { display: none !important; }
.lm-root svg, .lm-inline svg { width: 18px; height: 18px; flex: none; }

/* Dok: tombol praktikum yang selalu siap. */
.lm-dock {
  position: fixed; right: 18px; bottom: 18px; z-index: var(--lm-z);
  display: flex; align-items: stretch; gap: 6px; padding: 6px;
  border: 1px solid var(--lm-line); border-radius: 16px;
  background: var(--lm-bg); color: var(--lm-text); box-shadow: var(--lm-shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  max-width: calc(100vw - 24px);
}
.lm-dock-main {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px;
  padding: 4px 12px 4px 4px; border: 0; border-radius: 11px; background: transparent;
  color: inherit; cursor: pointer; text-align: left;
}
.lm-dock-main:hover { background: #ffffff10; }
.lm-theme-karya .lm-dock-main:hover { background: #1f3a3010; }
.lm-dock-icon {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 10px; background: var(--lm-accent); color: var(--lm-accent-ink);
}
.lm-dock-text { display: grid; min-width: 0; line-height: 1.15; }
.lm-dock-text small { font-size: 9px; font-weight: 700; letter-spacing: .16em; color: var(--lm-gold); }
.lm-dock-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.lm-dock-record {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px;
  padding: 0 14px; border: 0; border-radius: 11px; cursor: pointer;
  background: var(--lm-accent); color: var(--lm-accent-ink); font-size: 13px; font-weight: 700;
}
.lm-dock-record i {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--lm-gold); color: #1b1408;
  font: 700 10px/18px system-ui, sans-serif; font-style: normal; text-align: center;
}
.lm-dock-record i:empty, .lm-dock-record i:is([data-zero]) { display: none; }

/* Panel lembar praktikum. */
.lm-panel {
  position: fixed; top: 14px; right: 14px; bottom: 14px; z-index: var(--lm-z-panel);
  width: min(430px, calc(100vw - 28px)); display: flex; flex-direction: column;
  border: 1px solid var(--lm-line); border-radius: 18px; overflow: hidden;
  background: var(--lm-bg); color: var(--lm-text); box-shadow: var(--lm-shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: lm-in .22s ease-out;
}
@keyframes lm-in { from { opacity: 0; transform: translateX(16px); } }
.lm-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px;
  border-bottom: 1px solid var(--lm-line);
}
.lm-head > div { flex: 1; min-width: 0; }
.lm-head-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--lm-accent); color: var(--lm-accent-ink); flex: none;
}
.lm-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--lm-gold); }
.lm-head h2 { margin: 2px 0 0; font-size: 19px; font-weight: 600; line-height: 1.2; color: var(--lm-text); }
.lm-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--lm-line); border-radius: 10px; background: transparent;
  color: var(--lm-text); cursor: pointer;
}
.lm-icon:hover { background: #ffffff12; }
.lm-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 26px; }
.lm-lead { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--lm-muted); }
.lm-student { display: grid; grid-template-columns: 1fr 104px; gap: 8px; margin-bottom: 16px; }
.lm-student label, .lm-label { display: grid; gap: 5px; font-size: 12px; color: var(--lm-muted); }
.lm-label { margin: 12px 0 0; }
.lm-root input, .lm-root textarea {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--lm-line);
  border-radius: 9px; background: var(--lm-input); color: var(--lm-text); font-size: 15px;
}
.lm-root textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.lm-root input::placeholder, .lm-root textarea::placeholder { color: var(--lm-muted); opacity: .8; }
.lm-root input:focus, .lm-root textarea:focus { outline: 2px solid var(--lm-accent); outline-offset: 1px; }
.lm-stations { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lm-station {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--lm-line); border-radius: 13px; background: var(--lm-surface);
  color: inherit; text-align: left; cursor: pointer;
}
.lm-station:hover, .lm-station.is-active { border-color: var(--lm-accent); }
.lm-num {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px;
  border: 1px solid var(--lm-gold); color: var(--lm-gold); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lm-station-text { display: grid; gap: 3px; min-width: 0; }
.lm-station-text b { font-size: 15px; font-weight: 600; }
.lm-station-text small { font-size: 12.5px; line-height: 1.45; color: var(--lm-muted); }
.lm-station-text em { font-size: 11px; font-style: normal; letter-spacing: .04em; color: var(--lm-gold); }
.lm-foot { margin: 16px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--lm-muted); }

.lm-goal, .lm-question {
  margin: 0; padding: 10px 12px; border-left: 3px solid var(--lm-goal); border-radius: 9px;
  background: color-mix(in srgb, var(--lm-goal) 9%, transparent); font-size: 14px; line-height: 1.55;
}
.lm-question { margin-top: 16px; border-left-color: var(--lm-question); background: color-mix(in srgb, var(--lm-question) 9%, transparent); }
.lm-goal b, .lm-question b {
  display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lm-goal);
}
.lm-question b { color: var(--lm-question); }
.lm-step { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--lm-line); }
.lm-step h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--lm-text); }
.lm-step h3 span {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--lm-accent); color: var(--lm-accent-ink); font-size: 12.5px; font-weight: 700;
}
.lm-tip { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--lm-muted); }
.lm-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.55; }
.lm-steps li + li { margin-top: 4px; }
.lm-primary, .lm-secondary, .lm-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.lm-primary { width: 100%; margin-top: 10px; border: 0; background: var(--lm-accent); color: var(--lm-accent-ink); }
.lm-secondary { flex: 1; border: 1px solid var(--lm-accent); background: transparent; color: var(--lm-text); }
.lm-ghost { min-height: 34px; margin-top: 8px; padding: 4px 10px; border: 1px solid var(--lm-line); background: transparent; color: var(--lm-muted); font-size: 12px; font-weight: 500; }
.lm-primary:hover { filter: brightness(1.08); }
.lm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lm-chips a {
  padding: 5px 10px; border: 1px solid var(--lm-line); border-radius: 999px; color: var(--lm-text);
  font-size: 12.5px; text-decoration: none; background: var(--lm-surface);
}
.lm-chips a:hover { border-color: var(--lm-accent); }
.lm-table-wrap { margin-top: 12px; overflow-x: auto; }
.lm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lm-table caption { text-align: left; padding-bottom: 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--lm-muted); }
.lm-table th { padding: 6px; text-align: left; font-size: 11px; font-weight: 600; color: var(--lm-gold); border-bottom: 1px solid var(--lm-gold); }
.lm-table td { padding: 7px 6px; vertical-align: top; line-height: 1.45; border-bottom: 1px solid var(--lm-line); }
.lm-table td:first-child { width: 22px; color: var(--lm-muted); }
.lm-table td:last-child { width: 30px; }
.lm-del { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--lm-muted); cursor: pointer; }
.lm-del:hover { background: #ff6b6b22; color: #ff9b9b; }
.lm-del svg { width: 15px; height: 15px; }
.lm-empty { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--lm-muted); }
.lm-note { margin-top: 18px; font-size: 13px; color: var(--lm-muted); }
.lm-note summary { cursor: pointer; min-height: 32px; }
.lm-note p { margin: 4px 0 0; line-height: 1.55; }
.lm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Bar "Catat" yang muncul di dalam alat milik aplikasi. */
.lm-inline {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 9px 10px; border: 1px solid var(--lm-gold); border-radius: 12px;
  background: var(--lm-bg); color: var(--lm-text); box-shadow: 0 6px 20px #0003;
}
.lm-inline { flex-wrap: wrap; flex: 1 1 100%; box-sizing: border-box; }
.lm-theme-karya.lm-inline { position: static; box-shadow: none; }
.lm-inline-note {
  flex: 1 1 100%; box-sizing: border-box; min-height: 40px; padding: 8px 11px; border: 1px solid var(--lm-line);
  border-radius: 9px; background: var(--lm-input); color: var(--lm-text); font: inherit; font-size: 15px;
}
.lm-inline-note::placeholder { color: var(--lm-muted); }
.lm-inline-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--lm-accent); color: var(--lm-accent-ink); flex: none; }
.lm-inline-text { flex: 1; display: grid; min-width: 0; line-height: 1.2; }
.lm-inline-text small { font-size: 9px; font-weight: 700; letter-spacing: .16em; color: var(--lm-gold); }
.lm-inline-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-inline button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0;
  border-radius: 9px; background: var(--lm-accent); color: var(--lm-accent-ink); font-size: 13px; font-weight: 700; cursor: pointer;
}
.lm-inline .lm-inline-sheet { padding: 0 9px; background: transparent; border: 1px solid var(--lm-line); color: var(--lm-text); }

/* Tombol praktikum di header SEMESTA (sejajar ikon pengaturan). */
.lm-header-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; flex: none;
  border: 1px solid #e9bb71b0; border-radius: 10px; background: #e9bb711c; color: #f3e8d2;
  font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; cursor: pointer; white-space: nowrap;
}
.lm-header-btn:hover { background: #e9bb7133; }
.lm-header-btn svg { width: 17px; height: 17px; color: #e9bb71; }
@media (max-width: 1100px) { .lm-header-btn span { display: none; } .lm-header-btn { width: 36px; padding: 0; justify-content: center; } }
@media (max-width: 420px) { .lm-header-btn { width: 30px; height: 32px; border-radius: 9px; } .lm-header-btn svg { width: 16px; height: 16px; } }

/* Pintu masuk praktikum di layar sambutan SEMESTA. */
.lm-welcome {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; margin: 0 0 10px;
  padding: 12px 14px; border: 1px solid #e9bb71; border-radius: 10px; cursor: pointer; text-align: left;
  background: linear-gradient(115deg, #e9bb7126, #3c9ad91c); color: #f3e8d2; font: inherit;
}
.lm-welcome:hover { background: linear-gradient(115deg, #e9bb7140, #3c9ad930); }
.lm-welcome-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: #e9bb71; color: #1d1405; }
.lm-welcome-icon svg { width: 20px; height: 20px; }
.lm-welcome b { display: block; font-size: 15px; font-weight: 600; }
.lm-welcome small { display: block; margin-top: 2px; font-size: 12px; color: #a9c0cf; }

.lm-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 2147483000; max-width: min(460px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 12px; background: #0b1820f2; color: #f1f5f4;
  border: 1px solid #ffffff22; box-shadow: 0 12px 30px #0006; font-size: 13.5px; line-height: 1.45;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.lm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Posisi dok per aplikasi agar tidak menutupi kontrol utama. */
.lm-theme-semesta .lm-dock { right: auto; left: 50%; bottom: auto; top: 102px; transform: translateX(-50%); }
.lm-theme-human .lm-dock { right: 92px; left: auto; bottom: auto; top: 118px; transform: none; }
.lm-theme-karya .lm-dock { right: 18px; bottom: 18px; }
@media (max-width: 760px) {
  .lm-theme-semesta .lm-dock { left: auto; right: 10px; bottom: auto; top: 162px; transform: none; }
}
@media (max-width: 640px) {
  .lm-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(86dvh, 780px); border-radius: 18px; }
  @keyframes lm-in { from { opacity: 0; transform: translateY(18px); } }
  .lm-dock-text b { max-width: 112px; }
  .lm-dock-main { padding-right: 8px; }
  .lm-theme-human .lm-dock { left: auto; right: 10px; top: 112px; transform: none; }
  .lm-dock-text { display: none; }
  .lm-dock-main { padding-right: 4px; }
  .lm-dock { padding: 4px; gap: 4px; border-radius: 13px; }
  .lm-dock-main, .lm-dock-record { min-height: 38px; }
  .lm-dock-icon { width: 32px; height: 32px; }
  .lm-theme-karya .lm-dock { right: 10px; bottom: 12px; }
  .lm-student { grid-template-columns: 1fr 86px; }
}
@media (max-height: 520px) and (min-width: 641px) {
  .lm-dock-text { display: none; }
  .lm-dock { padding: 4px; gap: 4px; border-radius: 13px; }
  .lm-dock-main, .lm-dock-record { min-height: 36px; }
  .lm-dock-icon { width: 32px; height: 32px; }
  .lm-theme-human .lm-dock { top: 90px; bottom: auto; left: auto; right: 112px; transform: none; }
  .lm-theme-semesta .lm-dock { top: 162px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); }
  .lm-panel { top: 8px; bottom: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .lm-panel { animation: none; } .lm-toast { transition: none; } }
