.doc-two-gates {
  margin: 0.95rem 0 1.1rem;
  padding: 0.95rem 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.doc-two-gates__caption {
  margin: 0 0 0.7rem;
  color: rgba(225, 235, 252, 0.92);
  font-size: 0.92rem;
  line-height: 1.45;
}

.doc-two-gates__layout {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(220px, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.doc-two-gates__stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.18);
  min-height: 420px;
}

.doc-two-gates__mount {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.doc-two-gates__hud {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  right: 0.75rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(6, 10, 22, 0.78) 0%, rgba(4, 6, 14, 0.88) 62%, rgba(6, 8, 18, 0.82) 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.42) inset, 0 10px 28px rgba(0, 0, 0, 0.35);
}

.doc-two-gates__hud-line {
  margin: 0;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.65rem;
  align-items: start;
}

.doc-two-gates__hud-note {
  margin: 0.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: rgba(175, 200, 235, 0.82);
  font-size: 0.82rem;
  line-height: 1.35;
}

.doc-two-gates__hud-badge {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 231, 242, 0.22);
  background: rgba(46, 231, 242, 0.08);
  color: rgba(175, 245, 255, 0.92);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.doc-two-gates__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  background: radial-gradient(ellipse at center, rgba(255, 77, 109, 0.16) 0%, rgba(0, 0, 0, 0.62) 55%, rgba(0, 0, 0, 0.82) 100%);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.doc-two-gates__overlay.is-on {
  opacity: 1;
  transform: scale(1);
}

.doc-two-gates__overlay-x {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 14px 40px rgba(0, 0, 0, 0.45);
  margin: 0 auto 0.35rem;
}

.doc-two-gates__overlay-text {
  margin: 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 215, 225, 0.96);
  font-size: 0.78rem;
}

.doc-two-gates__overlay-sub {
  margin: 0;
  text-align: center;
  color: rgba(230, 205, 225, 0.88);
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 32ch;
}

.doc-two-gates__k {
  color: rgba(180, 205, 255, 0.92);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.doc-two-gates__v {
  color: rgba(240, 246, 255, 0.94);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.88rem;
  line-height: 1.35;
}

.doc-two-gates__controls {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.12);
  padding: 0.85rem 0.85rem 0.75rem;
}

.doc-two-gates__title {
  margin: 0 0 0.55rem;
  color: rgba(235, 245, 255, 0.9);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.doc-two-gates__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(225, 235, 252, 0.92);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5rem;
}

.doc-two-gates__toggle input {
  accent-color: rgba(46, 231, 242, 0.95);
}

.doc-two-gates__sep {
  height: 1px;
  margin: 0.6rem 0 0.65rem;
  background: linear-gradient(90deg, rgba(46, 231, 242, 0.15) 0%, rgba(94, 200, 255, 0.4) 45%, rgba(181, 108, 255, 0.3) 100%);
  border-radius: 999px;
}

.doc-two-gates__btn {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 28, 0.55);
  color: rgba(240, 246, 255, 0.96);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin: 0 0 0.55rem;
}

.doc-two-gates__btn:hover {
  border-color: rgba(46, 231, 242, 0.28);
  background: rgba(12, 18, 34, 0.7);
  transform: translateY(-1px);
}

.doc-two-gates__btn:active {
  transform: translateY(0);
}

.doc-two-gates__btn--ghost {
  background: rgba(0, 0, 0, 0.12);
  color: rgba(205, 225, 255, 0.9);
}

.doc-two-gates__segment {
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  margin: 0 0 0.65rem;
}

.doc-two-gates__seg-btn {
  flex: 1 1 0;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(225, 235, 252, 0.86);
  border-radius: 11px;
  padding: 0.5rem 0.55rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.doc-two-gates__seg-btn:hover {
  opacity: 0.85;
}

.doc-two-gates__seg-btn.is-active {
  opacity: 1;
  color: #fff;
  border-color: rgba(61, 124, 255, 0.25);
  background: linear-gradient(135deg, rgba(46, 231, 242, 0.55), rgba(61, 124, 255, 0.55));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.38) inset, 0 0 18px rgba(61, 124, 255, 0.22);
  transform: scale(1.02);
}

.doc-two-gates__seg-btn:active {
  transform: scale(1.0);
}

.doc-two-gates__hud.is-ping {
  animation: twoGatesHudPing 220ms ease-out;
}

@keyframes twoGatesHudPing {
  0% {
    transform: translateY(6px);
    opacity: 0.72;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.doc-two-gates__hint {
  margin: 0.25rem 0 0;
  color: rgba(180, 200, 235, 0.88);
  font-size: 0.88rem;
  line-height: 1.5;
}

.doc-two-gates__axis {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(6, 10, 22, 0.65) 0%, rgba(4, 6, 14, 0.78) 62%, rgba(6, 8, 18, 0.72) 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.42) inset, 0 10px 28px rgba(0, 0, 0, 0.28);
  padding: 0.5rem 0.55rem;
}

.doc-two-gates__axis-title {
  margin: 0 0 0.35rem;
  color: rgba(210, 225, 255, 0.9);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.doc-two-gates__axis-row {
  margin: 0;
  display: grid;
  gap: 0.2rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.2;
  color: rgba(235, 245, 255, 0.92);
}

.doc-two-gates__axis-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.doc-two-gates__axis-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.doc-two-gates__axis-dot--x {
  background: rgba(46, 231, 242, 0.14);
  border-color: rgba(46, 231, 242, 0.38);
}

.doc-two-gates__axis-dot--y {
  background: rgba(181, 108, 255, 0.14);
  border-color: rgba(181, 108, 255, 0.38);
}

.doc-two-gates__axis-dot--z {
  background: rgba(255, 154, 58, 0.14);
  border-color: rgba(255, 154, 58, 0.42);
}

@media (max-width: 900px) {
  .doc-two-gates__layout {
    grid-template-columns: 1fr;
  }
}

