:root {
  color-scheme: dark;
  --ink: #ecf0df;
  --muted: #adc1b8;
  --mint: #beefac;
  --edge: #354a42;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101a18;
  color: var(--ink);
  font:
    16px/1.45 system-ui,
    sans-serif;
}
button,
a {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid #fff69e;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
header {
  height: 70px;
  padding: 0 clamp(18px, 4.3vw, 82px);
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--edge);
  background: #101a18;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 30px);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -1.15px;
}
.brand svg {
  width: 32px;
  color: var(--mint);
}
.edition,
.kicker,
.spec,
.fig,
.maphead small,
.step small,
.orbit-hint,
.scale,
.maphead > span {
  font: 11px/1.4 var(--mono);
  letter-spacing: 1.4px;
}
.edition {
  border-left: 1px solid var(--edge);
  padding-left: 15px;
  color: var(--muted);
  font-size: 10px;
}
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #0c1614;
  border: 1px solid var(--edge);
  border-radius: 28px;
  padding: 3px;
}
nav button {
  border-radius: 22px;
  padding: 6px 17px;
  font-size: 13px;
  color: var(--muted);
}
nav .on {
  background: #2e4038;
  color: #eef6e4;
}
.round,
.close {
  border: 1px solid var(--edge);
  border-radius: 50%;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
}
.round svg {
  width: 16px;
}
.round:hover,
.tools button:hover,
nav button:hover {
  color: var(--mint);
  background: #24372f;
}
header .round + .round {
  margin-left: -7px;
}
.plate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #152823;
  min-height: 435px;
  height: clamp(435px, 66vh, 730px);
  border-bottom: 1px solid var(--edge);
}
.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 69% 47%,
    #36564a 0%,
    #203b32 27%,
    #172c25 56%,
    #15231f 83%
  );
}
.field:after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(field.svg) center/cover;
  opacity: 0.8;
}
article {
  position: relative;
  z-index: 2;
  width: 43%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 0 28px clamp(22px, 6vw, 120px);
  pointer-events: none;
}
article button {
  pointer-events: auto;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbe9b9;
  font-size: 10px;
}
.slash {
  opacity: 0.5;
}
.mark {
  width: 19px;
  height: 1px;
  background: var(--mint);
}
h1 {
  font: normal clamp(54px, 6.4vw, 110px) / 0.99 var(--serif);
  letter-spacing: -0.055em;
  margin: 23px 0 0;
}
h1 em {
  color: var(--mint);
  font-weight: 400;
}
article p {
  color: #c3d1c8;
  max-width: 345px;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.55;
  margin: 19px 0 23px;
}
.primary {
  color: #14291f;
  background: var(--mint);
  font-weight: 650;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 25px;
  border-radius: 5px;
  padding: 13px 18px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary span {
  font-size: 20px;
  line-height: 1;
}
.primary:hover {
  background: #d4ffc2;
  transform: translateY(-2px);
}
.fig {
  position: absolute;
  bottom: 18px;
  color: #a4b9a8;
  letter-spacing: 0.3px;
  font-size: 11px;
}
.fig b {
  padding: 0 7px;
  font-weight: 400;
  color: #6d8977;
}
.fig i {
  font: italic 14px var(--serif);
}
.scene {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  isolation: isolate;
}
.scene > canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
.scene > canvas:active {
  cursor: grabbing;
}
.orbit-ring {
  position: absolute;
  pointer-events: none;
  left: 50%;
  top: 53%;
  border: 1px solid #c9f2bf30;
  width: 78%;
  height: 46%;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}
.r2 {
  width: 65%;
  height: 68%;
  transform: translate(-50%, -50%) rotate(26deg);
  border: 1px dashed #c9f2bf22;
}
.spec,
.scale,
.orbit-hint {
  position: absolute;
  color: #bbcdc0;
  font-size: 10px;
  letter-spacing: 1px;
  pointer-events: none;
}
.spec {
  right: 7%;
  top: 25px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.spec i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b5e7a8;
}
.scale {
  right: 7%;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.scale i {
  display: inline-block;
  width: 34px;
  height: 6px;
  border: 1px solid #c5d4c6;
  border-top: 0;
}
.orbit-hint {
  left: 50%;
  bottom: 21px;
  transform: translateX(-50%);
  text-transform: none;
  letter-spacing: 0.1px;
}
.tools {
  position: absolute;
  right: 5%;
  top: 38%;
  display: grid;
  gap: 4px;
}
.tools button {
  border: 1px solid #718c7866;
  border-radius: 4px;
  background: #152820a8;
  width: 30px;
  height: 30px;
  line-height: 1;
}
.scene #pin {
  position: absolute;
  left: 60%;
  top: 54%;
  display: flex;
  align-items: center;
  padding: 7px 0;
  background: transparent;
}
.scene #pin span {
  width: 15px;
  height: 15px;
  border: 1px solid #f0f9dc;
  border-radius: 50%;
  background: #d9eac06b;
  box-shadow: 0 0 0 4px #e0ffd323;
}
.scene #pin:after {
  content: "";
  width: 29px;
  height: 1px;
  background: #d6e4c5;
  order: 1;
}
.scene #pin b {
  order: 2;
  background: #162a21e8;
  border: 1px solid #91a98a82;
  border-radius: 3px;
  padding: 4px 8px;
  font: 11px var(--mono);
  color: #e0eacb;
}
.map {
  padding: 19px clamp(18px, 4.3vw, 82px) 89px;
}
.maphead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.maphead h2 {
  font: 24px var(--serif);
  letter-spacing: -0.7px;
  margin: 0;
}
.maphead > span {
  color: var(--mint);
  font-size: 10px;
}
.maphead b {
  font-weight: normal;
  color: #8ca299;
}
.maphead > div {
  height: 1px;
  flex: 1;
  background: var(--edge);
}
.maphead small {
  color: var(--muted);
  font-size: 9px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.step {
  display: grid;
  position: relative;
  align-content: end;
  text-align: left;
  border: 1px solid #34473e;
  border-radius: 4px;
  min-height: 85px;
  padding: 11px 12px;
  background: #18241f;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.15s;
}
.step:hover {
  background: #263c30;
}
.step[aria-current="true"] {
  border-color: #99bf8d;
  background: #263a2e;
}
.step canvas {
  width: 58%;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
  opacity: 0.83;
}
.step small {
  font-size: 9px;
  color: #b5c8b6;
}
.step strong {
  font: 16px var(--serif);
  text-shadow: 0 1px 5px #0c1811;
}
.step span {
  position: absolute;
  left: 12px;
  top: 9px;
  background: var(--mint);
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
#note {
  position: absolute;
  z-index: 5;
  bottom: 45px;
  right: 8%;
  max-width: 310px;
  padding: 12px 16px;
  background: #e4efce;
  color: #192e22;
  border-radius: 5px;
  box-shadow: 0 7px 28px #08100f66;
  font-size: 14px;
}
dialog {
  max-width: min(410px, 90vw);
  border: 1px solid #7c9580;
  background: #1c3026;
  padding: 30px;
  border-radius: 8px;
  color: var(--ink);
}
dialog::backdrop {
  background: #051410bd;
}
dialog h2 {
  font: 36px var(--serif);
  margin: 12px 0;
}
dialog p {
  color: #d2e2d6;
}
.close {
  float: right;
  font-size: 20px;
}
#labPanel {
  position: absolute;
  inset: 11% 7% 10% 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}
#labPanel > * {
  pointer-events: auto;
}
.lab .scene #pin,
.lab .orbit-hint,
.lab .tools,
.lab .scale {
  display: none;
}
.lab .steps {
  grid-template-columns: repeat(5, 1fr);
}
.lab .step {
  min-height: 67px;
}
.lab .step span {
  display: none;
}
.instrument {
  background: #12251c;
  border: 1px solid #577c60;
  border-radius: 9px;
  padding: clamp(13px, 2vw, 28px);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 28px #06181055;
}
.instrument h3 {
  margin: 0 0 12px;
  font: 21px var(--serif);
}
.instruction {
  font-size: 13px;
  color: #dcebd9;
  margin: 8px 0;
}
.read {
  font: 600 clamp(11px, 1.3vw, 18px) var(--mono);
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.bases {
  display: inline-flex;
  gap: 2px;
}
.base {
  display: inline-block;
  text-align: center;
  color: #081c14;
  border-radius: 3px;
  min-width: 1.26em;
  padding: 3px 0;
  font-weight: bold;
}
.A {
  background: #bde49e;
}
.C {
  background: #83d4dc;
}
.G {
  background: #f4b77a;
}
.T {
  background: #e4a5c5;
}
.empty {
  border: 1px dashed #8caa90;
  color: #b5c3b4;
}
.readbtn,
.labAct {
  padding: 7px 9px;
  border: 1px solid #688a70;
  border-radius: 4px;
  background: #233b2d;
  margin: 3px;
  color: #e9f6de;
  font-size: 13px;
}
.readbtn {
  touch-action: none;
  cursor: grab;
}
.readbtn:hover,
.labAct:hover {
  background: #395a40;
}
.target {
  border: 1px dashed #a2c29c;
  padding: 12px 5px;
  text-align: center;
  border-radius: 4px;
  background: #253c2c;
  margin: 10px 0;
}
.target.hot {
  background: #456444;
}
.message {
  min-height: 2.7em;
  color: #d4ecc2;
  font-size: 13px;
  margin: 9px 0 0;
}
.lab .fig {
  max-width: 90%;
}
.lab #next:disabled {
  opacity: 0.55;
}
.micro {
  position: absolute;
  bottom: 5%;
  font-size: 13px;
  text-align: center;
  background: #182a22f5;
  padding: 9px 16px;
  border-radius: 5px;
  border: 1px solid var(--edge);
}
.dragGhost {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  transform: translate(-50%, -50%);
  margin: 0;
  box-shadow: 0 4px 16px #0008;
}
.legend {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  align-items: center;
  font: 12px var(--mono);
}
@media (min-width: 1500px) {
  .scene {
    right: 3%;
  }
}
@media (max-width: 900px) {
  .edition {
    display: none;
  }
  .kicker {
    gap: 6px;
    font-size: 9px;
  }
  .step {
    padding: 9px;
  }
  .step strong {
    font-size: 14px;
  }
  .step canvas {
    width: 56%;
    opacity: 0.66;
  }
  .scene {
    width: 57%;
  }
  article {
    width: 46%;
    padding-left: 4.3vw;
  }
  .plate {
    min-height: 430px;
  }
  .tools {
    right: 3%;
  }
  .scene #pin {
    left: 55%;
  }
}
@media (max-width: 680px) {
  header {
    height: 55px;
    padding: 0 14px;
    gap: 7px;
  }
  .brand {
    gap: 6px;
    font-size: 21px;
  }
  .brand svg {
    width: 24px;
  }
  .round {
    width: 28px;
    height: 28px;
  }
  header .round + .round {
    margin-left: 0;
  }
  nav button {
    font-size: 11px;
    padding: 5px 9px;
  }
  .plate {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .scene {
    position: relative;
    width: 100%;
    height: clamp(235px, 39svh, 380px);
    order: 1;
  }
  .scene .spec {
    top: 14px;
    right: auto;
    left: 5%;
  }
  .scene .scale {
    bottom: 10px;
  }
  .scene .orbit-hint {
    bottom: 10px;
  }
  .tools {
    right: 4%;
  }
  .scene #pin {
    left: 61%;
  }
  .scene #pin:after {
    width: 14px;
  }
  article {
    width: 100%;
    height: auto;
    order: 2;
    padding: 12px 6% 23px;
    display: block;
  }
  h1 {
    font-size: clamp(38px, 9vw, 56px);
    margin: 8px 0 0;
  }
  h1 br:after {
    content: " ";
  }
  h1 br {
    display: none;
  }
  h1 em:before {
    content: " ";
  }
  article p {
    font-size: 14px;
    max-width: 480px;
    margin: 8px 0 13px;
  }
  .primary {
    font-size: 13px;
    padding: 10px 14px;
  }
  .fig {
    position: static;
    display: inline-block;
    margin-left: 10px;
    font-size: 9px;
  }
  .fig i {
    font-size: 11px;
  }
  .fig b {
    padding: 0 3px;
  }
  .map {
    padding: 14px 4% 40px;
  }
  .steps,
  .lab .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .step,
  .lab .step {
    min-height: 60px;
  }
  .step span {
    top: 6px;
    left: 9px;
  }
  .maphead {
    margin-bottom: 8px;
  }
  .maphead h2 {
    font-size: 21px;
  }
  #note {
    top: 27%;
    bottom: auto;
    left: 8%;
    right: 8%;
    margin: auto;
  }
  .lab .scene {
    min-height: 294px;
  }
  .lab #labPanel {
    inset: 26px 4% 4px;
  }
  .lab .instrument {
    padding: 12px;
  }
  .instrument h3 {
    font-size: 18px;
  }
  .lab .fig {
    display: none;
  }
  .lab .read {
    font-size: 14px;
  }
  .message {
    min-height: 2.4em;
  }
  .field {
    background: radial-gradient(
      ellipse at 45% 25%,
      #375548,
      #1c382c 42%,
      #15231e 77%
    );
  }
  .spec {
    font-size: 9px;
  }
  .step canvas {
    width: 52%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 370px) {
  .fig {
    display: none;
  }
  header {
    gap: 4px;
  }
  .brand {
    font-size: 19px;
  }
  .step strong {
    font-size: 13px;
  }
  .kicker .mark {
    width: 10px;
  }
}
