:root {
  --academy-bg: #020d15;
  --academy-panel: rgba(5, 24, 35, 0.96);
  --academy-panel-soft: rgba(10, 38, 51, 0.9);
  --academy-line: rgba(80, 177, 202, 0.28);
  --academy-cyan: #20d9f2;
  --academy-cyan-soft: #68edff;
  --academy-green: #5ee67a;
  --academy-orange: #ffad20;
  --academy-muted: #8ea7b2;
  --academy-text: #f3fbff;
}

body.academy-map-open {
  overflow: hidden;
  background: var(--academy-bg);
}

body.academy-map-open #app > :not(.world-shell) {
  display: none !important;
}

.world-shell,
.world-shell *,
.world-shell *::before,
.world-shell *::after {
  box-sizing: border-box;
}

.world-shell {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: block;
  overflow: hidden;
  color: var(--academy-text);
  background:
    radial-gradient(circle at 45% 30%, rgba(22, 117, 141, 0.12), transparent 42%),
    #020d15;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  isolation: isolate;
}

.world-shell button,
.world-shell input {
  font: inherit;
}

.world-shell button:focus-visible,
.world-shell input:focus-visible,
.world-stage-wrap:focus-visible {
  outline: 3px solid var(--academy-cyan-soft);
  outline-offset: 2px;
}

.academy-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 64px;
  z-index: 30;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 191, 214, 0.3);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(4, 21, 31, 0.93), rgba(3, 17, 26, 0.88));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px) saturate(125%);
}

.academy-brand {
  width: 260px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-right: 1px solid var(--academy-line);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.academy-brand > span:last-child {
  display: grid;
  line-height: 1;
}

.academy-brand strong {
  font-size: 1.08rem;
  color: #fff;
}

.academy-brand b {
  margin-top: 6px;
  color: var(--academy-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
}

.academy-logo-mark {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 217, 240, 0.45);
  border-radius: 14px;
  color: var(--academy-cyan);
  background: linear-gradient(145deg, rgba(23, 80, 99, 0.8), rgba(4, 27, 39, 0.9));
  box-shadow: inset 0 0 18px rgba(32, 217, 242, 0.08), 0 0 20px rgba(32, 217, 242, 0.08);
}

.academy-logo-mark svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.hud-context {
  display: grid;
  gap: 3px;
  padding-left: 22px;
}

.hud-context small {
  color: var(--academy-cyan);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hud-context strong {
  font-size: 0.95rem;
}

.hud-stats {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
}

.hud-stat {
  min-width: 98px;
  height: 43px;
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: 16px 19px;
  align-items: center;
  padding: 4px 12px 4px 8px;
  border: 1px solid rgba(78, 152, 173, 0.36);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(13, 40, 53, 0.9), rgba(5, 25, 35, 0.9));
  box-shadow: inset 0 0 13px rgba(41, 174, 198, 0.04);
}

.hud-stat > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  color: var(--academy-cyan);
  font-size: 1rem;
}

.hud-stat.xp > span {
  color: var(--academy-orange);
}

.hud-stat.credits > span {
  color: #42e7a3;
}

.hud-stat.stars > span {
  color: #ffd04d;
}

.hud-stat small {
  color: #7594a2;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.hud-stat strong {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
}

.hud-profile {
  width: 48px;
  height: 48px;
  border: 2px solid var(--academy-cyan);
  border-radius: 50%;
  overflow: hidden;
  color: transparent;
  background: #0a3955 url("./industrial-avatar.png") center 14% / 165% auto no-repeat;
  box-shadow: 0 0 18px rgba(32, 217, 242, 0.25);
  font-weight: 900;
  cursor: pointer;
}

.academy-nav {
  position: absolute;
  top: 94px;
  left: 14px;
  bottom: 18px;
  width: 86px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 7px;
  border: 1px solid rgba(75, 174, 198, 0.32);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(3, 20, 30, 0.92), rgba(4, 25, 36, 0.86));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), inset 0 0 32px rgba(32, 217, 242, 0.025);
  backdrop-filter: blur(15px) saturate(120%);
}

.academy-nav button {
  position: relative;
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #91a8b3;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.academy-nav button:hover {
  color: #fff;
  background: rgba(21, 74, 91, 0.38);
  transform: translateY(-1px);
}

.academy-nav button.active {
  color: var(--academy-cyan);
  border-color: rgba(32, 217, 242, 0.62);
  background: linear-gradient(145deg, rgba(10, 87, 108, 0.65), rgba(6, 39, 52, 0.75));
  box-shadow: inset 0 0 22px rgba(32, 217, 242, 0.1), 0 0 17px rgba(32, 217, 242, 0.12);
}

.academy-nav button.active::before {
  content: "";
  position: absolute;
  left: -9px;
  width: 3px;
  height: 42px;
  border-radius: 3px;
  background: var(--academy-cyan);
  box-shadow: 0 0 10px var(--academy-cyan);
}

.academy-nav button > span {
  font-size: 1.62rem;
  line-height: 1;
}

.academy-nav button small {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.world-map-area {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #03131d;
}

.world-map-area::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 16, 24, 0.54), transparent 18%, transparent 80%, rgba(3, 16, 24, 0.58)),
    linear-gradient(180deg, rgba(1, 10, 16, 0.5), transparent 18%, transparent 76%, rgba(1, 9, 14, 0.5)),
    radial-gradient(circle at 50% 48%, transparent 28%, rgba(0, 5, 10, 0.34) 100%);
}

.map-title-card {
  position: absolute;
  z-index: 12;
  top: 96px;
  left: 116px;
  width: 250px;
  padding: 13px 15px;
  border: 1px solid rgba(70, 179, 202, 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(5, 27, 39, 0.9), rgba(6, 43, 55, 0.78));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px) saturate(125%);
}

.map-title-card span {
  color: var(--academy-cyan);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.map-title-card h1 {
  margin: 4px 0 3px;
  color: #fff;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.map-title-card p {
  margin: 0;
  color: #b7c9d0;
  font-size: 0.74rem;
  line-height: 1.4;
}

.map-controls {
  position: absolute;
  z-index: 14;
  top: 94px;
  right: 354px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(74, 170, 192, 0.4);
  border-radius: 999px;
  background: rgba(4, 24, 35, 0.84);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.map-controls button {
  width: 37px;
  height: 35px;
  border: 0;
  color: var(--academy-cyan-soft);
  background: transparent;
  font-size: 1.08rem;
  font-weight: 900;
  cursor: pointer;
}

.map-controls button:hover {
  background: rgba(32, 217, 242, 0.13);
}

.map-controls output {
  min-width: 49px;
  color: #d9f8ff;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.world-stage-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #061b27;
  box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.45), 0 13px 33px rgba(0, 0, 0, 0.26);
  overscroll-behavior: contain;
  scrollbar-color: #1b667b #061923;
  scrollbar-width: thin;
}

.world-stage-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.world-stage-wrap::-webkit-scrollbar-track {
  background: #061923;
}

.world-stage-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #061923;
  border-radius: 99px;
  background: #1b667b;
}

.world-stage {
  position: relative;
  width: max(100vw, 177.683vh);
  height: max(100vh, 56.28vw);
  min-width: 100%;
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 16, 24, 0.08), rgba(2, 12, 18, 0.22)),
    image-set(
      url("./industrial-campus-realistic.webp") type("image/webp"),
      url("./automation-map.svg") type("image/svg+xml")
    ) center / 100% 100% no-repeat;
  transform: translateZ(0);
  transform-origin: 0 0;
}

.world-stage.zoom-85 { transform: translateZ(0) scale(0.85); }
.world-stage.zoom-90 { transform: translateZ(0) scale(0.9); }
.world-stage.zoom-95 { transform: translateZ(0) scale(0.95); }
.world-stage.zoom-100 { transform: translateZ(0) scale(1); }
.world-stage.zoom-105 { transform: translateZ(0) scale(1.05); }
.world-stage.zoom-110 { transform: translateZ(0) scale(1.1); }
.world-stage.zoom-115 { transform: translateZ(0) scale(1.15); }
.world-stage.zoom-120 { transform: translateZ(0) scale(1.2); }
.world-stage.zoom-125 { transform: translateZ(0) scale(1.25); }
.world-stage.zoom-130 { transform: translateZ(0) scale(1.3); }
.world-stage.zoom-135 { transform: translateZ(0) scale(1.35); }
.world-stage.zoom-140 { transform: translateZ(0) scale(1.4); }
.world-stage.zoom-145 { transform: translateZ(0) scale(1.45); }
.world-stage.zoom-150 { transform: translateZ(0) scale(1.5); }

.world-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  box-shadow: inset 0 0 85px rgba(0, 4, 9, 0.72);
}

.world-path {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.world-path path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.world-path-shadow {
  stroke: rgba(0, 5, 10, 0.76);
  stroke-width: 19;
}

.world-path-line {
  stroke: rgba(195, 215, 221, 0.74);
  stroke-width: 8;
  stroke-dasharray: 2 16;
}

.world-path-complete {
  stroke: var(--academy-green);
  stroke-width: 9;
  stroke-dasharray: 2 15;
  filter: drop-shadow(0 0 7px rgba(94, 230, 122, 0.95));
}

.world-path-current {
  stroke: var(--academy-orange);
  stroke-width: 10;
  stroke-dasharray: 3 14;
  filter: drop-shadow(0 0 8px rgba(255, 173, 32, 0.95));
  animation: routeFlow 2s linear infinite;
}

.world-zone-label {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid rgba(66, 174, 197, 0.3);
  border-radius: 8px;
  color: #d9f7ff;
  background: rgba(3, 24, 35, 0.76);
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.world-zone-label span {
  color: var(--academy-cyan);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.world-zone-label strong {
  font-size: 0.64rem;
  text-transform: uppercase;
}

.world-zone-label.workshop { left: 6%; top: 90%; }
.world-zone-label.factory { left: 67%; top: 73%; }
.world-zone-label.city { left: 67%; top: 31%; }
.world-zone-label.process { left: 6%; top: 20%; }
.world-zone-label.complex { left: 69%; top: 5%; }

.phase-node[data-world-phase="phase-1-first-motor"], .student-avatar[data-avatar-phase="phase-1-first-motor"] { left: 8%; top: 82%; }
.phase-node[data-world-phase="phase-2-motor-seal"], .student-avatar[data-avatar-phase="phase-2-motor-seal"] { left: 18%; top: 74%; }
.phase-node[data-world-phase="phase-3-two-motors"], .student-avatar[data-avatar-phase="phase-3-two-motors"] { left: 29%; top: 80%; }
.phase-node[data-world-phase="phase-4-workshop-gate"], .student-avatar[data-avatar-phase="phase-4-workshop-gate"] { left: 38%; top: 68%; }
.phase-node[data-world-phase="phase-5-conveyor"], .student-avatar[data-avatar-phase="phase-5-conveyor"] { left: 49%; top: 61%; }
.phase-node[data-world-phase="phase-6-piece-counter"], .student-avatar[data-avatar-phase="phase-6-piece-counter"] { left: 60%; top: 67%; }
.phase-node[data-world-phase="phase-7-timed-process"], .student-avatar[data-avatar-phase="phase-7-timed-process"] { left: 70%; top: 57%; }
.phase-node[data-world-phase="phase-8-logistics"], .student-avatar[data-avatar-phase="phase-8-logistics"] { left: 80%; top: 49%; }
.phase-node[data-world-phase="phase-9-traffic-basic"], .student-avatar[data-avatar-phase="phase-9-traffic-basic"] { left: 72%; top: 39%; }
.phase-node[data-world-phase="phase-10-pedestrian"], .student-avatar[data-avatar-phase="phase-10-pedestrian"] { left: 61%; top: 43%; }
.phase-node[data-world-phase="phase-11-maintenance"], .student-avatar[data-avatar-phase="phase-11-maintenance"] { left: 50%; top: 35%; }
.phase-node[data-world-phase="phase-12-smart-crossing"], .student-avatar[data-avatar-phase="phase-12-smart-crossing"] { left: 39%; top: 42%; }
.phase-node[data-world-phase="phase-13-classification"], .student-avatar[data-avatar-phase="phase-13-classification"] { left: 29%; top: 34%; }
.phase-node[data-world-phase="phase-14-automatic-separation"], .student-avatar[data-avatar-phase="phase-14-automatic-separation"] { left: 19%; top: 42%; }
.phase-node[data-world-phase="phase-15-process-tank"], .student-avatar[data-avatar-phase="phase-15-process-tank"] { left: 11%; top: 32%; }
.phase-node[data-world-phase="phase-16-automation-cell"], .student-avatar[data-avatar-phase="phase-16-automation-cell"] { left: 21%; top: 22%; }
.phase-node[data-world-phase="phase-17-batch-production"], .student-avatar[data-avatar-phase="phase-17-batch-production"] { left: 34%; top: 17%; }
.phase-node[data-world-phase="phase-18-quality-diagnostic"], .student-avatar[data-avatar-phase="phase-18-quality-diagnostic"] { left: 48%; top: 24%; }
.phase-node[data-world-phase="phase-19-integrated-line"], .student-avatar[data-avatar-phase="phase-19-integrated-line"] { left: 64%; top: 17%; }
.phase-node[data-world-phase="phase-20-bottling"], .student-avatar[data-avatar-phase="phase-20-bottling"] { left: 82%; top: 20%; }

.phase-node {
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 3px solid rgba(225, 243, 248, 0.78);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #49606a, #1a2a32);
  box-shadow:
    inset 0 0 0 4px rgba(3, 18, 25, 0.72),
    0 5px 0 #071219,
    0 9px 16px rgba(0, 0, 0, 0.48);
  font-weight: 900;
  cursor: pointer;
  transition: transform 170ms ease, filter 170ms ease, box-shadow 170ms ease;
}

.phase-node:hover,
.phase-node:focus-visible {
  z-index: 24;
  transform: translate(-50%, -56%) scale(1.12);
}

.phase-node.completed {
  border-color: #b9ffba;
  color: #072415;
  background: linear-gradient(145deg, #86f18e, #25ad57);
  box-shadow: inset 0 0 0 4px rgba(7, 62, 34, 0.45), 0 5px 0 #126937, 0 0 19px rgba(75, 226, 114, 0.7);
}

.phase-node.current {
  border-color: #fff1b4;
  color: #301d00;
  background: linear-gradient(145deg, #ffd85c, #f28a0b);
  box-shadow: inset 0 0 0 4px rgba(111, 55, 0, 0.38), 0 5px 0 #9a5000, 0 0 25px rgba(255, 174, 31, 0.88);
  animation: currentPulse 1.8s ease-in-out infinite;
}

.phase-node.available {
  border-color: #c4f9ff;
  color: #021e28;
  background: linear-gradient(145deg, #72efff, #14a7ca);
  box-shadow: inset 0 0 0 4px rgba(5, 70, 87, 0.34), 0 5px 0 #08657c, 0 0 18px rgba(32, 217, 242, 0.48);
}

.phase-node.locked {
  border-color: #74868e;
  color: #c2cbd0;
  background: linear-gradient(145deg, #536269, #27353b);
  filter: saturate(0.25);
  opacity: 0.74;
}

.phase-node.selected {
  z-index: 22;
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.node-number,
.node-status {
  font-size: 0.92rem;
}

.node-status.lock {
  font-size: 1.12rem;
}

.phase-stars-map {
  position: absolute;
  left: 50%;
  top: -19px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #ffdf68;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px #000;
}

.phase-label {
  position: absolute;
  left: 50%;
  top: 57px;
  min-width: max-content;
  transform: translateX(-50%) translateY(-2px);
  display: grid;
  gap: 2px;
  padding: 6px 9px;
  border: 1px solid rgba(93, 203, 224, 0.42);
  border-radius: 7px;
  color: #fff;
  background: rgba(3, 22, 32, 0.94);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.4);
  font-size: 0.66rem;
  line-height: 1.1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.phase-label small {
  color: var(--academy-cyan);
  font-size: 0.47rem;
  letter-spacing: 0.12em;
}

.phase-node:hover .phase-label,
.phase-node:focus-visible .phase-label,
.phase-node.current .phase-label,
.phase-node.selected .phase-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.student-avatar {
  position: absolute;
  z-index: 18;
  width: 84px;
  height: 126px;
  transform: translate(-50%, -92%);
  filter: drop-shadow(0 12px 8px rgba(0, 0, 0, 0.62));
  pointer-events: none;
  margin-left: 45px;
  margin-top: -4px;
}

.student-avatar .avatar-shadow {
  position: absolute;
  left: 13px;
  bottom: -3px;
  width: 58px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  filter: blur(2px);
}

.student-avatar img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.student-avatar .avatar-pin {
  position: absolute;
  z-index: 4;
  top: -25px;
  left: 50%;
  width: 23px;
  height: 23px;
  transform: translateX(-50%) rotate(45deg);
  border: 3px solid #f0fdff;
  border-radius: 50% 50% 50% 5px;
  background: #20bce2;
  box-shadow: 0 0 0 5px rgba(32, 217, 242, 0.18), 0 0 18px rgba(32, 217, 242, 0.85);
}

.student-avatar .avatar-pin::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.student-avatar .avatar-you {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -17px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border: 1px solid rgba(131, 233, 249, 0.7);
  border-radius: 999px;
  color: #e9fcff;
  background: rgba(2, 24, 34, 0.9);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.student-avatar.walking img {
  animation: avatarFloat 520ms ease-in-out infinite alternate;
}

.academy-map-footer {
  position: static;
  z-index: 24;
}

.overall-progress {
  position: absolute;
  z-index: 24;
  left: 116px;
  bottom: 18px;
  min-width: 370px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 14px;
  border: 1px solid rgba(63, 160, 182, 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 33, 45, 0.9), rgba(4, 24, 34, 0.86));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px) saturate(125%);
}

.overall-progress > div:last-child {
  min-width: 220px;
  display: grid;
  gap: 4px;
}

.overall-progress span {
  color: var(--academy-cyan);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.overall-progress strong {
  font-size: 0.72rem;
}

.progress-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 5;
}

.progress-ring-track {
  stroke: rgba(65, 118, 132, 0.32);
}

.progress-ring-value {
  stroke: var(--academy-orange);
  stroke-linecap: round;
}

.progress-ring strong {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.7rem;
}

.overall-track,
.mission-progress-track,
.mini-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  display: block;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(79, 123, 137, 0.3);
}

.overall-track::-webkit-progress-bar,
.mission-progress-track::-webkit-progress-bar,
.mini-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(79, 123, 137, 0.3);
}

.overall-track::-webkit-progress-value,
.mission-progress-track::-webkit-progress-value,
.mini-progress::-webkit-progress-value,
.overall-track::-moz-progress-bar,
.mission-progress-track::-moz-progress-bar,
.mini-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #3cdd85, var(--academy-cyan));
  box-shadow: 0 0 8px rgba(32, 217, 242, 0.45);
}

.map-legend {
  position: absolute;
  z-index: 24;
  left: 50%;
  bottom: 18px;
  min-height: 64px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 15px;
  border: 1px solid rgba(63, 160, 182, 0.26);
  border-radius: 12px;
  color: #9cb2bc;
  background: rgba(4, 24, 34, 0.82);
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(13px);
  font-size: 0.62rem;
  font-weight: 700;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #65777f;
}

.map-legend i.completed {
  background: var(--academy-green);
}

.map-legend i.current {
  background: var(--academy-orange);
}

.map-legend i.available {
  background: var(--academy-cyan);
}

.quick-access {
  position: absolute;
  z-index: 29;
  right: 14px;
  bottom: 18px;
  width: 320px;
  min-height: 74px;
  padding: 9px 11px 10px;
  border: 1px solid rgba(75, 169, 192, 0.36);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(8, 35, 47, 0.9), rgba(3, 20, 29, 0.88));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(15px) saturate(125%);
}

.quick-access > span {
  display: block;
  margin-bottom: 6px;
  color: #b5cbd3;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.quick-access > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.quick-access button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(78, 161, 181, 0.3);
  border-radius: 8px;
  color: #cfdee3;
  background: rgba(6, 29, 39, 0.62);
  font-size: 0.53rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.quick-access button:hover {
  border-color: rgba(32, 217, 242, 0.68);
  color: #fff;
  background: rgba(12, 67, 83, 0.72);
}

.quick-access button b {
  color: var(--academy-cyan);
  font-size: 1.05rem;
}

.academy-panel {
  position: absolute;
  top: 94px;
  right: 14px;
  bottom: 110px;
  width: 320px;
  z-index: 28;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(75, 169, 192, 0.38);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(8, 35, 47, 0.92), rgba(3, 20, 29, 0.9));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.035), inset 0 0 35px rgba(32, 217, 242, 0.025);
  backdrop-filter: blur(16px) saturate(125%);
}

.panel-scroll {
  height: 100%;
  overflow: auto;
  padding: 20px;
  scrollbar-color: #1c6274 transparent;
  scrollbar-width: thin;
}

.panel-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--academy-orange);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.panel-kicker strong {
  padding: 5px 8px;
  border: 1px solid rgba(255, 173, 32, 0.38);
  border-radius: 6px;
  color: #ffd477;
  background: rgba(115, 62, 0, 0.22);
}

.panel-world {
  margin: 23px 0 5px;
  color: var(--academy-cyan);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.academy-panel h2 {
  margin: 6px 0 9px;
  color: #fff;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  line-height: 1.08;
}

.academy-panel > .panel-scroll > p,
.mission-lead {
  color: #b4c5cc;
  font-size: 0.79rem;
  line-height: 1.52;
}

.mission-progress,
.level-card {
  margin: 17px 0;
  padding: 12px;
  border: 1px solid rgba(66, 157, 180, 0.28);
  border-radius: 10px;
  background: rgba(7, 32, 43, 0.72);
}

.mission-progress > div:first-child,
.level-card > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mission-progress span,
.level-card span {
  color: #83a6b4;
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mission-progress strong,
.level-card strong {
  color: var(--academy-cyan-soft);
  font-size: 0.76rem;
}

.level-card small {
  display: block;
  margin-top: 8px;
  color: #8ea9b4;
  font-size: 0.64rem;
}

.mission-section {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(93, 142, 156, 0.22);
}

.mission-section h3,
.reward-card h3 {
  margin: 0 0 8px;
  color: var(--academy-orange);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mission-section p {
  margin: 0;
  color: #c1d0d6;
  font-size: 0.75rem;
  line-height: 1.45;
}

.mission-section.requirement.is-locked {
  padding: 12px;
  border: 1px solid rgba(147, 159, 164, 0.25);
  border-radius: 9px;
  background: rgba(90, 100, 105, 0.1);
}

.objective-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.objective-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c9d6db;
  font-size: 0.73rem;
}

.objective-list li span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: 0 0 17px;
  border: 1px solid #607d87;
  border-radius: 50%;
  color: #78929c;
  font-size: 0.65rem;
}

.objective-list li.done span {
  border-color: #3bca6b;
  color: #052d16;
  background: var(--academy-green);
}

.reward-card {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(255, 173, 32, 0.4);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(111, 59, 0, 0.23), rgba(38, 40, 22, 0.35));
}

.reward-card > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reward-card > div span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f3e7c8;
  font-size: 0.7rem;
}

.reward-card b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #ffbf48;
  border-radius: 50%;
  color: #302000;
  background: #ffb523;
  font-size: 0.56rem;
}

.reward-card small {
  display: block;
  margin-top: 9px;
  color: #b8aa8b;
  font-size: 0.58rem;
  line-height: 1.35;
}

.mission-primary,
.mission-secondary {
  width: 100%;
  min-height: 43px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.mission-primary {
  border: 1px solid #ffc45a;
  color: #291800;
  background: linear-gradient(180deg, #ffbd3a, #ed8108);
  box-shadow: 0 7px 18px rgba(214, 104, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.4);
}

.mission-primary:hover:not(:disabled) {
  filter: brightness(1.09);
}

.mission-primary:disabled {
  border-color: #596a72;
  color: #9aa7ac;
  background: #34434a;
  box-shadow: none;
  cursor: not-allowed;
}

.mission-secondary {
  margin-top: 8px;
  border: 1px solid rgba(66, 177, 201, 0.36);
  color: var(--academy-cyan-soft);
  background: rgba(9, 54, 67, 0.52);
}

.mission-world-group {
  margin-top: 18px;
}

.mission-world-group > h3 {
  margin: 0 0 7px;
  color: #7addec;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mission-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid rgba(75, 132, 147, 0.23);
  border-radius: 8px;
  color: #dce8ec;
  background: rgba(8, 36, 47, 0.65);
  text-align: left;
  cursor: pointer;
}

.mission-list-item:hover {
  border-color: rgba(32, 217, 242, 0.55);
  background: rgba(11, 55, 68, 0.8);
}

.mission-list-number {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #607985;
  border-radius: 50%;
  color: #dae6ea;
  background: #263942;
  font-size: 0.65rem;
  font-weight: 900;
}

.mission-list-item.current .mission-list-number {
  border-color: #ffd575;
  color: #291a00;
  background: var(--academy-orange);
}

.mission-list-item.available .mission-list-number {
  border-color: #baf6ff;
  color: #05242e;
  background: var(--academy-cyan);
}

.mission-list-item.completed .mission-list-number {
  border-color: #c3ffc7;
  color: #082c17;
  background: var(--academy-green);
}

.mission-list-item.locked {
  opacity: 0.64;
}

.mission-list-item > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mission-list-item small {
  color: #839da8;
  font-size: 0.5rem;
  text-transform: uppercase;
}

.mission-list-item strong {
  overflow: hidden;
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-list-item > b {
  color: #94b5c0;
  font-size: 0.61rem;
}

.achievement-list {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.achievement {
  display: grid;
  grid-template-columns: 39px 1fr;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(73, 134, 151, 0.28);
  border-radius: 10px;
  background: rgba(7, 32, 43, 0.68);
}

.achievement.done {
  border-color: rgba(94, 230, 122, 0.5);
  background: linear-gradient(135deg, rgba(32, 106, 59, 0.3), rgba(7, 32, 43, 0.7));
}

.achievement-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid #5b7680;
  border-radius: 10px;
  color: #718c96;
  background: #1b3039;
}

.achievement.done .achievement-icon {
  border-color: #6cef8a;
  color: #092f18;
  background: var(--academy-green);
}

.achievement strong {
  font-size: 0.72rem;
}

.achievement p {
  margin: 3px 0 7px;
  color: #8ea5ae;
  font-size: 0.62rem;
}

.achievement small {
  display: block;
  margin-top: 4px;
  color: #7f9ca7;
  font-size: 0.54rem;
  text-align: right;
}

.truth-note {
  padding: 12px;
  border-left: 3px solid var(--academy-cyan);
  color: #acc0c8 !important;
  background: rgba(16, 61, 75, 0.28);
}

.truth-note strong {
  color: #e4faff;
}

.local-ranking-card {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 17px 0;
  padding: 13px;
  border: 1px solid rgba(255, 173, 32, 0.38);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(116, 62, 0, 0.2), rgba(7, 36, 47, 0.75));
}

.ranking-position {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid #d0962e;
  border-radius: 50%;
  color: #ffce72;
  background: #493316;
  font-weight: 900;
}

.local-ranking-card > div {
  min-width: 0;
  display: grid;
}

.local-ranking-card small {
  color: #829ca6;
  font-size: 0.5rem;
}

.local-ranking-card strong {
  overflow: hidden;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-ranking-card p {
  margin: 2px 0 0;
  color: #8ea6af;
  font-size: 0.57rem;
}

.local-ranking-card > b {
  color: var(--academy-orange);
  font-size: 0.65rem;
}

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

.performance-grid > div {
  padding: 10px;
  border: 1px solid rgba(74, 132, 148, 0.25);
  border-radius: 9px;
  background: rgba(7, 31, 42, 0.7);
}

.performance-grid dt {
  color: #809aa5;
  font-size: 0.57rem;
}

.performance-grid dd {
  margin: 3px 0 0;
  color: #f4fbff;
  font-size: 0.9rem;
  font-weight: 900;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 22px auto 12px;
  border: 3px solid var(--academy-cyan);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1a86aa, #0c3b57);
  box-shadow: 0 0 24px rgba(32, 217, 242, 0.25);
  font-size: 1.7rem;
  font-weight: 900;
}

.profile-field {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: #a6bac2;
  font-size: 0.64rem;
  font-weight: 800;
}

.profile-field input,
.profile-field select {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(76, 164, 185, 0.45);
  border-radius: 8px;
  color: #fff;
  background: rgba(2, 17, 25, 0.82);
}

.profile-field select {
  width: 100%;
}

.student-identity-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 16px;
}

.student-identity-summary > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(74, 132, 148, 0.25);
  border-radius: 8px;
  background: rgba(7, 31, 42, 0.7);
}

.student-identity-summary dt {
  color: #809aa5;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.student-identity-summary dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: #eefaff;
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-registration {
  margin: 15px 0;
  padding: 13px;
  border: 1px solid rgba(32, 217, 242, 0.28);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(9, 54, 67, 0.7), rgba(3, 22, 31, 0.74));
}

.student-registration h3 {
  margin: 0 0 2px;
  color: var(--academy-cyan-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.student-registration .profile-field {
  margin-top: 11px;
}

.student-registration .mission-primary {
  margin-top: 13px;
}

.student-ranking-list {
  display: grid;
  gap: 8px;
  margin: 15px 0;
}

.student-ranking-list .local-ranking-card {
  margin: 0;
}

.student-ranking-list .local-ranking-card.active {
  border-color: var(--academy-cyan);
  box-shadow: 0 0 18px rgba(32, 217, 242, 0.12);
}

.world-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid #53d9ee;
  border-radius: 999px;
  color: #e6fbff;
  background: linear-gradient(180deg, #0e5d76, #07384d);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), 0 0 18px rgba(32, 217, 242, 0.18);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.academy-map-open .world-toggle {
  display: none;
}

.evaluation-panel .world-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 174, 201, 0.42);
  border-radius: 9px;
  color: #d8f8ff;
  background: #07354a;
  font-size: 0.77rem;
}

.evaluation-panel .world-summary span {
  flex-basis: 100%;
}

.evaluation-map-return {
  border-color: #46cfe8 !important;
  color: #072631 !important;
  background: #55dff3 !important;
}

.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes currentPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 173, 32, 0.5)); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 193, 77, 1)); }
}

@keyframes routeFlow {
  to { stroke-dashoffset: -46; }
}

@keyframes avatarFloat {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-5px) rotate(1deg); }
}

@media (max-width: 1280px) {
  .academy-brand {
    width: 218px;
    padding: 0 14px;
  }

  .hud-context {
    display: none;
  }

  .hud-stat {
    min-width: 82px;
  }

  .academy-nav button {
    min-height: 68px;
  }

  .academy-panel,
  .quick-access {
    width: 304px;
  }

  .map-controls {
    right: 338px;
  }

  .map-legend {
    gap: 9px;
  }
}

@media (max-width: 1050px) {
  .world-map-area {
    padding: 0;
  }

  .academy-panel {
    position: absolute;
    top: 90px;
    right: 10px;
    bottom: 90px;
    width: 296px;
    margin: 0;
    box-shadow: -12px 0 35px rgba(0, 0, 0, 0.5);
  }

  .quick-access {
    display: none;
  }

  .map-controls {
    top: 90px;
    right: 320px;
  }

  .map-title-card {
    top: 90px;
    left: 106px;
  }

  .overall-progress {
    left: 106px;
    bottom: 12px;
  }

  .hud-stat {
    min-width: 70px;
    grid-template-columns: 23px 1fr;
    padding-right: 8px;
  }

  .hud-stat small {
    display: none;
  }

  .hud-stat strong {
    grid-row: 1 / 3;
  }

  .map-legend {
    display: none;
  }
}

@media (max-width: 760px) {
  .world-shell {
    display: block;
  }

  .academy-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 56px;
    border-radius: 14px;
  }

  .academy-brand {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0 10px;
    border-right: 0;
  }

  .academy-logo-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .academy-brand strong {
    font-size: 0.82rem;
  }

  .academy-brand b {
    font-size: 0.55rem;
  }

  .hud-stats {
    flex: 0 0 auto;
    gap: 5px;
    padding: 0 8px;
  }

  .hud-stat {
    min-width: 55px;
    height: 36px;
    grid-template-columns: 18px 1fr;
    padding: 3px 6px;
  }

  .hud-stat > span {
    font-size: 0.76rem;
  }

  .hud-stat strong {
    font-size: 0.72rem;
  }

  .hud-stat.credits,
  .hud-stat.stars {
    display: none;
  }

  .hud-profile {
    width: 39px;
    height: 39px;
  }

  .academy-nav {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: 58px;
    flex-direction: row;
    justify-content: space-around;
    padding: 5px;
    border: 1px solid rgba(66, 163, 190, 0.28);
    border-radius: 14px;
    border-top: 1px solid rgba(66, 163, 190, 0.28);
  }

  .academy-nav button {
    min-width: 50px;
    min-height: 55px;
    flex: 1 1 0;
    gap: 2px;
  }

  .academy-nav button.active::before {
    left: 50%;
    top: -6px;
    width: 33px;
    height: 3px;
    transform: translateX(-50%);
  }

  .academy-nav button > span {
    font-size: 1.15rem;
  }

  .academy-nav button small {
    font-size: 0.46rem;
  }

  .world-map-area {
    inset: 0;
    padding: 0;
  }

  .academy-panel {
    position: absolute;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 74px;
    width: auto;
    height: min(43vh, 330px);
    border-radius: 13px;
  }

  .panel-scroll {
    padding: 15px;
  }

  .map-title-card {
    top: 74px;
    left: 10px;
    width: 188px;
    padding: 9px 11px;
  }

  .map-title-card h1 {
    font-size: 0.94rem;
  }

  .map-title-card p {
    display: none;
  }

  .map-controls {
    top: 74px;
    right: 10px;
  }

  .overall-progress,
  .map-legend,
  .quick-access {
    display: none;
  }

  .world-zone-label {
    display: none;
  }

  .phase-node {
    width: 44px;
    height: 44px;
  }

  .student-avatar {
    width: 72px;
    height: 108px;
  }

  .phase-node.current .phase-label {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .academy-brand > span:last-child {
    display: none;
  }

  .academy-logo-mark {
    margin-right: auto;
  }

  .hud-stat {
    min-width: 59px;
  }

  .academy-nav button small {
    font-size: 0.42rem;
  }

  .academy-panel {
    height: min(45vh, 340px);
  }

  .map-controls output {
    display: none;
  }

  .map-title-card {
    width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-shell *,
  .world-shell *::before,
  .world-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
