:root {
  --jf-v1-bg: #020713;
  --jf-v1-surface: rgba(3, 12, 26, 0.72);
  --jf-v1-surface-strong: rgba(5, 18, 38, 0.86);
  --jf-v1-line: rgba(72, 196, 255, 0.32);
  --jf-v1-line-strong: rgba(73, 211, 255, 0.74);
  --jf-v1-cyan: #42d8ff;
  --jf-v1-blue: #0b8cff;
  --jf-v1-violet: #a259ff;
  --jf-v1-mint: #21f2a4;
  --jf-v1-amber: #ffd166;
  --jf-v1-text: rgba(246, 251, 255, 0.96);
  --jf-v1-muted: rgba(208, 230, 246, 0.72);
  --jf-v1-dim: rgba(172, 199, 219, 0.54);
  --jf-v1-radius: 22px;
  --jf-v1-shadow: 0 26px 90px rgba(0, 0, 0, 0.46), 0 0 42px rgba(0, 163, 255, 0.08);
}

.jf-world-body {
  background: radial-gradient(circle at 50% 0%, rgba(23, 103, 255, 0.18), transparent 36%), #020713;
  color: var(--jf-v1-text);
}

.jf-world-shell::before {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 22%, rgba(0, 205, 255, 0.09), transparent 30%),
    radial-gradient(circle at 88% 52%, rgba(162, 89, 255, 0.12), transparent 32%),
    radial-gradient(circle at 12% 72%, rgba(0, 224, 255, 0.08), transparent 30%),
    linear-gradient(90deg, rgba(1, 6, 18, 0.42), transparent 22%, transparent 76%, rgba(1, 6, 18, 0.5));
  mix-blend-mode: screen;
  opacity: 1;
}

.jf-world-shell::after {
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.38)),
    linear-gradient(90deg, rgba(66, 216, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(66, 216, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 96px 96px, 96px 96px;
  opacity: 0.68;
}

.jf-world-topbar {
  top: 18px;
  left: 28px;
  right: 28px;
  min-height: 64px;
  align-items: center;
}

.jf-world-brand {
  min-width: 285px;
  min-height: 66px;
  border-color: rgba(66, 216, 255, 0.42);
  border-radius: 0 28px 28px 0;
  background: linear-gradient(135deg, rgba(2, 12, 30, 0.92), rgba(5, 25, 55, 0.62));
  box-shadow: var(--jf-v1-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 50%, calc(100% - 40px) 100%, 0 100%);
  padding-right: 44px;
}

.jf-world-brand-mark {
  width: 48px;
  height: 48px;
  color: transparent;
  border: 1px solid rgba(75, 211, 255, 0.55);
  background:
    radial-gradient(circle, rgba(193, 249, 255, 0.95), rgba(64, 206, 255, 0.42) 38%, rgba(13, 65, 160, 0.2) 62%, transparent 63%),
    conic-gradient(from 0deg, transparent, rgba(0, 220, 255, 0.9), transparent, rgba(162, 89, 255, 0.8), transparent);
  box-shadow: 0 0 24px rgba(66, 216, 255, 0.58);
}

.jf-world-brand-mark::before,
.jf-world-brand-mark::after {
  content: "";
  position: absolute;
}

.jf-world-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.jf-world-brand small {
  margin-top: 4px;
  color: var(--jf-v1-muted);
  font-size: 13px;
}

.jf-world-status {
  min-height: 42px;
  padding: 0 18px;
  border-color: rgba(66, 216, 255, 0.28);
  background: rgba(5, 16, 34, 0.68);
  color: var(--jf-v1-muted);
}

.jf-world-nav {
  top: 22px !important;
  left: 360px !important;
  right: 250px !important;
  z-index: 12;
  display: flex;
  justify-content: center;
  gap: 22px;
  min-height: 56px;
  padding: 8px 16px;
  border: 1px solid rgba(66, 216, 255, 0.18);
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, rgba(4, 14, 32, 0.72), rgba(3, 10, 25, 0.44));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26), inset 0 -1px 0 rgba(66, 216, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.jf-world-nav button,
.jf-world-nav a {
  min-height: 40px;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(239, 247, 255, 0.88);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0 12px;
  text-shadow: 0 0 16px rgba(66, 216, 255, 0.24);
}

.jf-world-nav button:hover,
.jf-world-nav a:hover,
.jf-world-nav .is-active {
  border-color: rgba(66, 216, 255, 0.36);
  background: linear-gradient(180deg, rgba(35, 152, 255, 0.18), rgba(6, 41, 82, 0.22));
  box-shadow: 0 0 26px rgba(0, 174, 255, 0.24), inset 0 -2px 0 rgba(66, 216, 255, 0.72);
  color: #fff;
}

.jf-world-room-title {
  display: none;
}

body[data-jf-room="candidate"] .jf-world-panel {
  border: 1px solid rgba(66, 216, 255, 0.34);
  background: linear-gradient(145deg, rgba(2, 10, 26, 0.88), rgba(6, 20, 48, 0.76));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 36px rgba(0, 173, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.jf-world-panel-head h2,
.jf-world-panel-head span,
#jf-world-panel-kicker {
  letter-spacing: 0.12em;
}

.jf-world-panel-close,
.jf-dialog-close {
  border-color: rgba(66, 216, 255, 0.36) !important;
  background: rgba(5, 21, 43, 0.65) !important;
}

.jf-candidate-journey,
.jf-candidate-mentor {
  border: 1px solid rgba(66, 216, 255, 0.42);
  background:
    radial-gradient(circle at 30% 0%, rgba(66, 216, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(2, 10, 24, 0.86), rgba(5, 20, 44, 0.68));
  box-shadow: var(--jf-v1-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.14);
  -webkit-backdrop-filter: blur(24px) saturate(1.14);
}

.jf-candidate-journey {
  left: 28px;
  top: 140px;
  width: min(326px, calc(100vw - 40px));
  padding: 18px;
  border-radius: 24px;
}

.jf-candidate-panel-head span,
.jf-mentor-meta {
  color: var(--jf-v1-cyan);
  letter-spacing: 0.18em;
}

.jf-candidate-panel-head strong,
.jf-mentor-card strong {
  font-size: 19px;
  letter-spacing: 0.01em;
}

.jf-candidate-panel-head small {
  color: var(--jf-v1-muted);
}

.jf-candidate-progress {
  height: 7px;
  background: rgba(32, 72, 112, 0.32);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.32);
}

.jf-candidate-progress span {
  background: linear-gradient(90deg, #1bc9ff, #445cff, #a259ff);
  box-shadow: 0 0 24px rgba(66, 216, 255, 0.55), 0 0 30px rgba(162, 89, 255, 0.18);
}

.jf-candidate-step {
  min-height: 76px;
  border-radius: 18px;
  border-color: rgba(66, 216, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(10, 36, 70, 0.52), rgba(4, 14, 31, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.jf-candidate-step::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 52px;
  bottom: -17px;
  width: 1px;
  background: linear-gradient(180deg, rgba(66, 216, 255, 0.5), rgba(162, 89, 255, 0.12));
  pointer-events: none;
}

.jf-candidate-step:last-child::before { display: none; }

.jf-candidate-step-index {
  width: 40px;
  height: 40px;
  background: rgba(3, 15, 34, 0.9);
  border-color: rgba(66, 216, 255, 0.46);
  box-shadow: 0 0 20px rgba(66, 216, 255, 0.12);
}

.jf-candidate-step-copy strong {
  color: rgba(150, 232, 255, 0.92);
}

.jf-candidate-step-copy em {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.jf-candidate-step-status {
  border: 1px solid rgba(66, 216, 255, 0.2);
  background: rgba(5, 17, 36, 0.72);
  color: rgba(210, 240, 255, 0.86);
}

.jf-candidate-step.is-completed {
  border-color: rgba(33, 242, 164, 0.38);
  background: linear-gradient(135deg, rgba(20, 84, 72, 0.38), rgba(3, 18, 33, 0.58));
}
.jf-candidate-step.is-completed .jf-candidate-step-index {
  border-color: rgba(33, 242, 164, 0.74);
  background: rgba(33, 242, 164, 0.2);
  color: #ccfff0;
  box-shadow: 0 0 24px rgba(33, 242, 164, 0.34);
}
.jf-candidate-step.is-active,
.jf-candidate-step.is-in_progress {
  border-color: rgba(66, 216, 255, 0.68);
  background: linear-gradient(135deg, rgba(26, 116, 255, 0.34), rgba(4, 19, 43, 0.68));
  box-shadow: 0 0 28px rgba(0, 163, 255, 0.2), inset 0 0 0 1px rgba(66, 216, 255, 0.06);
}
.jf-candidate-step.is-active .jf-candidate-step-index,
.jf-candidate-step.is-in_progress .jf-candidate-step-index {
  background: rgba(10, 100, 255, 0.26);
  box-shadow: 0 0 28px rgba(66, 216, 255, 0.44);
}
.jf-candidate-step.is-locked { opacity: 0.72; }
.jf-candidate-step.is-final_review {
  border-color: rgba(162, 89, 255, 0.62);
  background: linear-gradient(135deg, rgba(102, 46, 190, 0.28), rgba(4, 14, 31, 0.58));
}
.jf-candidate-step.is-final_review .jf-candidate-step-index {
  border-color: rgba(162, 89, 255, 0.72);
  box-shadow: 0 0 26px rgba(162, 89, 255, 0.38);
}

.jf-candidate-credit-note {
  border-color: rgba(255, 209, 102, 0.32);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.1), rgba(7, 17, 34, 0.38));
  border-radius: 18px;
}

.jf-candidate-mentor {
  right: 28px;
  top: 140px;
  width: min(340px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

.jf-mentor-hologram {
  min-height: 275px;
  border: 0;
  border-bottom: 1px solid rgba(66, 216, 255, 0.24);
  border-radius: 0;
  background:
    radial-gradient(circle at 56% 58%, rgba(66, 216, 255, 0.25), transparent 44%),
    radial-gradient(circle at 70% 30%, rgba(162, 89, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(6, 25, 58, 0.82), rgba(2, 9, 22, 0.58));
}

.jf-mentor-visual {
  position: relative;
  z-index: 2;
  width: 86%;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(66, 216, 255, 0.42));
  animation: jfMentorFloat 5s ease-in-out infinite;
}

.jf-mentor-face { display: none; }

.jf-mentor-ring {
  bottom: 22px;
  width: 190px;
  height: 34px;
  border-color: rgba(66, 216, 255, 0.5);
  box-shadow: 0 0 38px rgba(66, 216, 255, 0.34), inset 0 0 22px rgba(66, 216, 255, 0.16);
}

.jf-mentor-card {
  margin: 0;
  padding: 16px;
}

.jf-mentor-card p {
  color: var(--jf-v1-muted);
}

.jf-mentor-actions button,
.jf-dialog-actions button,
.jf-dialog-input button,
.jf-dialog-mic,
.jf-world-panel-cards a,
.jf-world-panel-cards button {
  min-height: 38px;
  border: 1px solid rgba(66, 216, 255, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 132, 255, 0.18), rgba(5, 18, 38, 0.72));
  color: var(--jf-v1-text);
  box-shadow: 0 0 20px rgba(0, 132, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.jf-mentor-actions button:hover,
.jf-dialog-actions button:hover,
.jf-dialog-input button:hover,
.jf-dialog-mic:hover,
.jf-world-panel-cards a:hover,
.jf-world-panel-cards button:hover {
  border-color: rgba(66, 216, 255, 0.74);
  background: linear-gradient(180deg, rgba(0, 147, 255, 0.3), rgba(6, 31, 70, 0.84));
  box-shadow: 0 0 28px rgba(66, 216, 255, 0.24);
}

.jf-mentor-mini-input {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.jf-mentor-mini-input input {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(66, 216, 255, 0.22);
  border-radius: 13px;
  background: rgba(2, 10, 22, 0.62);
  color: var(--jf-v1-text);
  padding: 0 12px;
}

.jf-mentor-mini-input button {
  width: 42px;
  border: 1px solid rgba(162, 89, 255, 0.52);
  border-radius: 13px;
  background: rgba(162, 89, 255, 0.2);
  color: #fff;
}

.jf-dialog {
  border-color: rgba(66, 216, 255, 0.38);
  background: linear-gradient(135deg, rgba(2, 10, 26, 0.9), rgba(7, 25, 54, 0.78));
  box-shadow: var(--jf-v1-shadow);
}

.jf-dialog-portrait {
  border-color: rgba(66, 216, 255, 0.28);
  background: rgba(4, 18, 40, 0.62);
}

@keyframes jfMentorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 1280px) {
  .jf-world-nav {
    left: 310px !important;
    right: 210px !important;
    gap: 10px;
  }
  .jf-world-nav button,
  .jf-world-nav a {
    font-size: 12px;
    padding: 0 9px;
  }
}

@media (max-width: 980px) {
  .jf-world-topbar {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .jf-world-brand {
    min-width: 240px;
  }
  .jf-world-nav {
    top: 86px !important;
    left: 12px !important;
    right: 12px !important;
    flex-wrap: wrap;
    min-height: 46px;
  }
  .jf-candidate-journey {
    left: 12px;
    right: 12px;
  }
  .jf-mentor-hologram {
    min-height: 210px;
  }
  .jf-mentor-visual {
    height: 190px;
  }
}

@media (max-width: 760px) {
  .jf-world-brand {
    min-width: 190px;
    min-height: 54px;
    padding-right: 36px;
  }
  .jf-world-brand-mark {
    width: 38px;
    height: 38px;
  }
  .jf-world-brand strong { font-size: 15px; }
  .jf-world-brand small { font-size: 11px; }
  .jf-world-status { display: none; }
  .jf-world-mobile-controls {
    z-index: 30;
  }
  .jf-candidate-journey {
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(2, 10, 24, 0.96), rgba(5, 20, 44, 0.92));
  }
  body[data-jf-room="candidate"] .jf-world-panel {
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(2, 10, 24, 0.96), rgba(5, 20, 44, 0.92));
  }
}

/* Visual stabilization v2: compact laptop layout and safer layer spacing. */
html,
body,
.jf-world-shell {
  min-width: 0;
  overflow: hidden;
}

.jf-world-game canvas {
  display: block;
}

.jf-world-nav {
  max-width: min(680px, calc(100vw - 440px));
}

.jf-candidate-journey,
.jf-candidate-mentor,
body[data-jf-room="candidate"] .jf-world-panel {
  transition: width 160ms ease, transform 160ms ease, opacity 160ms ease, max-height 160ms ease;
}

body[data-jf-room="candidate"] .jf-world-panel {
  max-height: min(40vh, 360px);
  overflow: auto;
}

body[data-jf-room="candidate"] .jf-world-panel-cards {
  gap: 10px;
}

body[data-jf-room="candidate"] .jf-world-panel-head {
  gap: 12px;
}

body[data-jf-room="candidate"] .jf-world-panel-head h2 {
  font-size: clamp(18px, 1.45vw, 25px);
}

body[data-jf-room="candidate"] .jf-world-panel p,
body[data-jf-room="candidate"] .jf-world-panel-cards,
body[data-jf-room="candidate"] .jf-world-panel-cards * {
  font-size: clamp(11px, 0.78vw, 13px);
}

@media (max-width: 1500px), (max-height: 850px) {
  .jf-world-topbar {
    top: 10px;
    left: 14px;
    right: 14px;
    min-height: 50px;
  }

  .jf-world-brand {
    min-width: 220px;
    min-height: 52px;
    padding-left: 12px;
    padding-right: 34px;
  }

  .jf-world-brand-mark {
    width: 34px;
    height: 34px;
  }

  .jf-world-brand strong {
    font-size: 15px;
  }

  .jf-world-brand small {
    font-size: 10px;
    margin-top: 2px;
  }

  .jf-world-status {
    min-height: 34px;
    font-size: 11px;
    padding: 0 12px;
  }

  .jf-world-nav {
    top: 18px !important;
    left: 286px !important;
    right: auto !important;
    max-width: calc(100vw - 600px);
    min-height: 44px;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 0 0 20px 20px;
  }

  .jf-world-nav button,
  .jf-world-nav a {
    min-height: 32px;
    padding: 0 9px;
    font-size: 10px;
    border-radius: 12px;
  }

  .jf-candidate-journey {
    left: 16px;
    top: 124px;
    width: 258px;
    max-height: calc(100vh - 150px);
    padding: 12px;
    border-radius: 19px;
  }

  .jf-candidate-panel-head span,
  .jf-mentor-meta {
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .jf-candidate-panel-head strong,
  .jf-mentor-card strong {
    font-size: 15px;
    margin-top: 4px;
  }

  .jf-candidate-panel-head small,
  .jf-mentor-card p,
  .jf-candidate-credit-note span {
    font-size: 10px;
    line-height: 1.3;
  }

  .jf-candidate-progress {
    height: 5px;
    margin: 10px 0;
  }

  .jf-candidate-steps {
    gap: 6px;
  }

  .jf-candidate-step {
    min-height: 54px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .jf-candidate-step::before {
    left: 21px;
    top: 42px;
    bottom: -12px;
  }

  .jf-candidate-step-index {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .jf-candidate-step-copy strong {
    font-size: 8px;
  }

  .jf-candidate-step-copy em {
    font-size: 11px;
    margin-top: 1px;
  }

  .jf-candidate-step-copy small {
    font-size: 9px;
    margin-top: 2px;
    line-height: 1.18;
  }

  .jf-candidate-step-status {
    font-size: 7px;
    padding: 3px 6px;
  }

  .jf-candidate-credit-note {
    margin-top: 8px;
    padding: 8px;
    border-radius: 13px;
  }

  .jf-candidate-credit-note strong {
    font-size: 10px;
  }

  .jf-candidate-mentor {
    right: 16px;
    top: 124px;
    width: 258px;
    border-radius: 19px;
  }

  .jf-mentor-hologram {
    min-height: 138px;
  }

  .jf-mentor-visual {
    height: 128px;
    width: 82%;
  }

  .jf-mentor-ring {
    bottom: 14px;
    width: 132px;
    height: 22px;
  }

  .jf-mentor-card {
    padding: 12px;
  }

  .jf-mentor-actions {
    gap: 6px;
    margin-top: 9px;
  }

  .jf-mentor-actions button,
  .jf-dialog-actions button,
  .jf-dialog-input button,
  .jf-dialog-mic,
  .jf-world-panel-cards a,
  .jf-world-panel-cards button {
    min-height: 30px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 10px;
  }

  .jf-mentor-mini-input {
    gap: 6px;
    margin-top: 9px;
  }

  .jf-mentor-mini-input input {
    min-height: 32px;
    font-size: 10px;
    border-radius: 10px;
  }

  .jf-mentor-mini-input button {
    width: 34px;
    border-radius: 10px;
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    left: 288px;
    right: 288px;
    bottom: 14px;
    max-height: min(32vh, 270px);
    border-radius: 18px;
    padding: 14px;
  }

  body[data-jf-room="candidate"] .jf-dialog {
    right: 14px;
    bottom: 14px;
    width: 360px;
    max-height: 34vh;
  }
}

@media (max-width: 1280px), (max-height: 760px) {
  .jf-world-nav {
    left: 260px !important;
    max-width: calc(100vw - 540px);
    gap: 4px;
  }

  .jf-world-nav button,
  .jf-world-nav a {
    font-size: 9px;
    padding: 0 7px;
  }

  .jf-candidate-journey {
    width: 228px;
    top: 112px;
    padding: 10px;
  }

  .jf-candidate-mentor {
    width: 226px;
    top: 112px;
  }

  .jf-mentor-hologram {
    min-height: 108px;
  }

  .jf-mentor-visual {
    height: 102px;
  }

  .jf-mentor-card p {
    margin-top: 6px;
  }

  .jf-mentor-actions button:nth-child(n+3) {
    display: none;
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    left: 252px;
    right: 252px;
    max-height: min(30vh, 235px);
  }
}

@media (max-width: 1100px) {
  .jf-world-nav {
    left: 12px !important;
    right: 12px !important;
    top: 72px !important;
    max-width: none;
    justify-content: center;
  }

  .jf-candidate-mentor {
    display: none !important;
  }

  .jf-candidate-journey {
    width: 240px;
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    left: 268px;
    right: 12px;
    bottom: 12px;
    max-height: 34vh;
  }
}

@media (max-width: 900px), (max-height: 640px) {
  .jf-world-brand {
    min-width: 192px;
  }

  .jf-world-nav {
    display: none !important;
  }

  .jf-world-mobile-controls {
    display: flex;
  }

  .jf-candidate-journey {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    top: auto;
    width: auto;
    max-height: min(58svh, 430px);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }

  .jf-mobile-map-open .jf-candidate-journey {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-height: min(62svh, 520px);
    z-index: 24;
  }

  body[data-jf-room="candidate"] .jf-dialog {
    display: grid;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: 45svh;
  }
}

/* Visual stabilization v3: real fit mode, no wrapping top menu, no duplicate assistant on candidate. */
body[data-jf-room="candidate"] .jf-world-status {
  display: none !important;
}

body[data-jf-room="candidate"] .jf-world-map {
  display: none !important;
}

body[data-jf-room="candidate"]:not(.jf-candidate-dialog-open) .jf-dialog {
  display: none !important;
}

.jf-world-nav {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  white-space: nowrap !important;
  align-items: center !important;
}
.jf-world-nav::-webkit-scrollbar { display: none; }
.jf-world-nav button,
.jf-world-nav a {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

@media (min-width: 1501px) {
  body[data-jf-room="candidate"] .jf-world-nav {
    left: 300px !important;
    right: 320px !important;
    max-width: none !important;
    top: 16px !important;
    min-height: 46px !important;
    padding: 5px 12px !important;
    gap: 8px !important;
  }
  body[data-jf-room="candidate"] .jf-world-nav button,
  body[data-jf-room="candidate"] .jf-world-nav a {
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-journey {
    top: 118px !important;
    left: 18px !important;
    width: 280px !important;
    max-height: calc(100vh - 142px) !important;
    padding: 13px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-mentor {
    top: 118px !important;
    right: 18px !important;
    width: 260px !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-hologram { min-height: 130px !important; }
  body[data-jf-room="candidate"] .jf-mentor-visual { height: 124px !important; }
  body[data-jf-room="candidate"] .jf-world-panel {
    left: 305px !important;
    right: 300px !important;
    bottom: 14px !important;
    max-height: min(30vh, 250px) !important;
  }
}

@media (max-width: 1500px), (max-height: 850px) {
  body[data-jf-room="candidate"] .jf-world-brand {
    min-width: 210px !important;
  }
  body[data-jf-room="candidate"] .jf-world-nav {
    top: 14px !important;
    left: 244px !important;
    right: 260px !important;
    max-width: none !important;
    min-height: 38px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    border-radius: 0 0 16px 16px !important;
  }
  body[data-jf-room="candidate"] .jf-world-nav button,
  body[data-jf-room="candidate"] .jf-world-nav a {
    min-height: 28px !important;
    font-size: 9px !important;
    padding: 0 7px !important;
    border-radius: 10px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-journey {
    top: 102px !important;
    left: 12px !important;
    width: 220px !important;
    max-height: calc(100vh - 126px) !important;
    padding: 9px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-mentor {
    top: 102px !important;
    right: 12px !important;
    width: 218px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step {
    min-height: 48px !important;
    padding: 7px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step-copy small {
    display: none !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step-status {
    font-size: 6.5px !important;
    padding: 2px 5px !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-hologram {
    min-height: 90px !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-visual {
    height: 86px !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-ring { display: none !important; }
  body[data-jf-room="candidate"] .jf-mentor-card {
    padding: 10px !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-card p {
    display: none !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  body[data-jf-room="candidate"] .jf-mentor-actions button:nth-child(3) {
    grid-column: 1 / -1;
  }
  body[data-jf-room="candidate"] .jf-world-panel {
    left: 244px !important;
    right: 244px !important;
    bottom: 10px !important;
    max-height: min(29vh, 218px) !important;
    padding: 11px !important;
  }
  body[data-jf-room="candidate"] .jf-world-panel-head h2 {
    font-size: 18px !important;
    letter-spacing: 0.08em !important;
  }
}

@media (max-width: 1320px), (max-height: 720px) {
  body[data-jf-room="candidate"] .jf-world-brand {
    min-width: 190px !important;
    min-height: 46px !important;
  }
  body[data-jf-room="candidate"] .jf-world-brand-mark {
    width: 30px !important;
    height: 30px !important;
  }
  body[data-jf-room="candidate"] .jf-world-brand strong { font-size: 13px !important; }
  body[data-jf-room="candidate"] .jf-world-brand small { display: none !important; }
  body[data-jf-room="candidate"] .jf-world-nav {
    left: 212px !important;
    right: 12px !important;
    top: 12px !important;
    justify-content: flex-start !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-mentor {
    display: none !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-journey {
    width: 198px !important;
    top: 88px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-panel-head small,
  body[data-jf-room="candidate"] .jf-candidate-credit-note span {
    display: none !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step {
    min-height: 42px !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step-index {
    width: 24px !important;
    height: 24px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-step-copy strong { font-size: 7px !important; }
  body[data-jf-room="candidate"] .jf-candidate-step-copy em { font-size: 10px !important; }
  body[data-jf-room="candidate"] .jf-world-panel {
    left: 220px !important;
    right: 10px !important;
    max-height: min(30vh, 210px) !important;
  }
}

@media (max-width: 980px), (max-height: 620px) {
  body[data-jf-room="candidate"] .jf-world-nav {
    display: none !important;
  }
  body[data-jf-room="candidate"] .jf-world-mobile-controls {
    display: flex !important;
    top: 70px !important;
    right: 10px !important;
  }
  body[data-jf-room="candidate"] .jf-candidate-journey {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: auto !important;
    max-height: min(54svh, 390px) !important;
    transform: translateY(calc(100% + 26px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 40 !important;
  }
  body[data-jf-room="candidate"].jf-mobile-map-open .jf-candidate-journey {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body[data-jf-room="candidate"] .jf-world-panel {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: min(56svh, 440px) !important;
    z-index: 32 !important;
  }
}

/* -------------------------------------------------------------------------
   Static station-room reset v4
   The candidate lab is now a static world overview: stations stay on the
   mapped floor, the candidate does not walk, and station work opens in a
   centered workstation console instead of a bottom drawer.
   ------------------------------------------------------------------------- */
body[data-jf-room="candidate"] .jf-world-room-title {
  max-width: 34vw;
  pointer-events: none;
}

body[data-jf-room="candidate"] .jf-world-panel {
  position: absolute !important;
  z-index: 90 !important;
  top: 50% !important;
  left: calc(50% + 42px) !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(840px, calc(100vw - 690px)) !important;
  min-width: 560px !important;
  max-height: min(650px, 74vh) !important;
  overflow: auto !important;
  border-radius: 26px !important;
  border: 1px solid rgba(127, 218, 255, 0.44) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 224, 255, 0.15), transparent 36%),
    linear-gradient(135deg, rgba(5, 13, 27, 0.94), rgba(10, 19, 42, 0.92)) !important;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding: 18px !important;
}

body[data-jf-room="candidate"] .jf-world-panel::before {
  content: "WORKSTATION CONSOLE";
  position: absolute;
  right: 58px;
  bottom: 18px;
  color: rgba(226, 240, 255, 0.035);
  font-size: clamp(34px, 4vw, 64px);
  font-weight: 900;
  letter-spacing: 0.12em;
  pointer-events: none;
}

body[data-jf-room="candidate"] .jf-world-panel.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -46%) scale(0.98) !important;
}

body[data-jf-room="candidate"] .jf-world-panel-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(7, 17, 32, 0.98), rgba(7, 17, 32, 0.82));
  border-bottom: 1px solid rgba(127, 218, 255, 0.16);
}

body[data-jf-room="candidate"] .jf-world-panel-head h2 {
  font-size: clamp(22px, 2vw, 34px) !important;
  letter-spacing: 0.06em;
}

body[data-jf-room="candidate"] .jf-world-panel > p {
  max-width: 760px;
  margin-bottom: 16px !important;
  color: rgba(226, 240, 255, 0.78) !important;
}

body[data-jf-room="candidate"] .jf-world-panel-cards {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)) !important;
  gap: 12px !important;
}

body[data-jf-room="candidate"] .jf-world-panel-card {
  border-color: rgba(127, 218, 255, 0.22) !important;
  background: linear-gradient(135deg, rgba(10, 25, 46, 0.86), rgba(13, 20, 43, 0.78)) !important;
  border-radius: 18px !important;
  padding: 14px !important;
}

body[data-jf-room="candidate"] .jf-world-panel-actions button {
  min-height: 36px;
  border-color: rgba(127, 218, 255, 0.42) !important;
  background: rgba(0, 224, 255, 0.08) !important;
}

body[data-jf-room="candidate"] .jf-dialog {
  left: auto !important;
  top: auto !important;
  right: 18px !important;
  bottom: 18px !important;
  width: min(330px, calc(100vw - 36px)) !important;
  max-height: 265px !important;
  z-index: 82 !important;
  border-radius: 18px !important;
  padding: 10px !important;
}

body[data-jf-room="candidate"] .jf-dialog.is-hidden {
  opacity: 0 !important;
  transform: translateY(14px) scale(0.98) !important;
  pointer-events: none !important;
}

body[data-jf-room="candidate"] .jf-dialog-portrait {
  width: 42px !important;
  height: 42px !important;
}

body[data-jf-room="candidate"] .jf-dialog-message,
body[data-jf-room="candidate"] #jf-dialog-message {
  font-size: 12px !important;
  line-height: 1.35 !important;
  max-height: 64px;
  overflow: auto;
}

body[data-jf-room="candidate"] .jf-dialog-actions {
  max-height: 74px;
  overflow: auto;
}

body[data-jf-room="candidate"] .jf-dialog-input {
  grid-template-columns: 1fr auto auto;
}

body[data-jf-room="candidate"] .jf-dialog-language,
body[data-jf-room="candidate"] #jf-dialog-voice-repeat {
  display: none !important;
}

body[data-jf-room="candidate"].jf-workstation-active .jf-world-panel {
  animation: jfWorkstationIn 180ms ease both;
}

@keyframes jfWorkstationIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 1500px), (max-height: 850px) {
  body[data-jf-room="candidate"] .jf-world-panel {
    left: 50% !important;
    width: min(760px, calc(100vw - 430px)) !important;
    min-width: 500px !important;
    max-height: 66vh !important;
    padding: 14px !important;
  }

  body[data-jf-room="candidate"] .jf-world-panel-head {
    margin: -14px -14px 12px;
    padding: 14px;
  }

  body[data-jf-room="candidate"] .jf-world-panel-cards {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  }

  body[data-jf-room="candidate"] .jf-candidate-mentor {
    transform: scale(0.86);
    transform-origin: top right;
  }
}

@media (max-width: 1180px), (max-height: 760px) {
  body[data-jf-room="candidate"] .jf-candidate-mentor {
    display: none !important;
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    width: min(760px, calc(100vw - 360px)) !important;
    min-width: 440px !important;
    max-height: 64vh !important;
  }

  body[data-jf-room="candidate"] .jf-world-room-title {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body[data-jf-room="candidate"] .jf-candidate-journey {
    transform: translateX(-105%);
  }

  body[data-jf-room="candidate"] .jf-world-panel {
    left: 50% !important;
    top: 50% !important;
    width: calc(100vw - 34px) !important;
    min-width: 0 !important;
    max-height: 78vh !important;
  }

  body[data-jf-room="candidate"] .jf-world-panel-cards {
    grid-template-columns: 1fr !important;
  }
}
