/* ---------- Three-dimensional terrain map ---------- */

.map3d {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(57, 83, 67, 0.18), transparent 65%),
    #0b1412;
}

.map-stage.mode-3d .map3d {
  display: block;
}

.map-stage.mode-3d #sandbox {
  display: none;
}

.map-stage.mode-3d .map-zoom-badge,
.map-stage.mode-3d .mobile-map-hint {
  display: none;
}

.map3d::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 50% 44%, transparent 44%, rgba(4, 10, 7, 0.1) 72%, rgba(4, 10, 7, 0.45) 100%);
  pointer-events: none;
}

#map3dCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#map3dCanvas.is-grabbing {
  cursor: grabbing;
}

#map3dCanvas.is-pickable {
  cursor: pointer;
}

.map3d-labels {
  position: absolute;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
}

.map-stage.is-3d-ready .map3d-labels {
  opacity: 1;
}

.map3d-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  transform: translate3d(-9999px, -9999px, 0);
}

.map3d-plaque {
  position: absolute;
  z-index: 45;
  top: 16px;
  left: 16px;
  width: 283px;
  padding: 12px 15px 11px;
  color: #2a3d34;
  border: 1px solid rgba(232, 219, 191, 0.5);
  background: rgba(238, 229, 211, 0.91);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.map3d-plaque::before {
  position: absolute;
  inset: 5px;
  content: "";
  border: 1px dashed rgba(104, 90, 65, 0.28);
}

.map3d-plaque span {
  position: relative;
  display: block;
  color: #8b7654;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 1.45px;
}

.map3d-plaque strong {
  position: relative;
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 2.4px;
  line-height: 1.2;
}

.map3d-plaque small {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  color: #6b6557;
  font-size: 8px;
  letter-spacing: 1px;
}

.map3d-plaque small i {
  color: #8a7250;
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.7px;
}

.map3d-plaque-note {
  position: relative;
  display: block;
  margin-top: 6px;
  color: #7b6f59;
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.map3d-views {
  position: absolute;
  z-index: 44;
  top: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  color: var(--ui-muted);
  border: 1px solid rgba(223, 196, 145, 0.18);
  background: rgba(14, 26, 22, 0.78);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.map3d-views > span {
  padding: 0 5px 0 4px;
  color: var(--ui-muted-2);
  font-size: 8px;
  letter-spacing: 1px;
}

.map3d-views button {
  height: 24px;
  padding: 0 8px;
  color: var(--ui-muted);
  border: 1px solid transparent;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.5px;
  transition: 160ms ease;
}

.map3d-views button:hover {
  color: var(--ui-text);
}

.map3d-views button.is-active {
  color: #f5e8ce;
  border-color: rgba(198, 162, 101, 0.3);
  background: rgba(198, 162, 101, 0.12);
}

.map3d-hint {
  position: absolute;
  z-index: 42;
  bottom: 14px;
  left: 14px;
  padding: 6px 9px;
  color: rgba(241, 233, 218, 0.66);
  border: 1px solid rgba(232, 220, 194, 0.12);
  background: rgba(12, 22, 18, 0.78);
  font-size: 8.5px;
  letter-spacing: 0.8px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.map3d-loading {
  position: absolute;
  z-index: 50;
  top: 50%;
  left: 50%;
  padding: 10px 14px;
  color: var(--gold-soft);
  border: 1px solid rgba(198, 162, 101, 0.25);
  background: rgba(14, 26, 22, 0.9);
  font-size: 10px;
  letter-spacing: 1px;
  transform: translate(-50%, -50%);
  transition: opacity 250ms ease;
}

.map-stage.is-3d-ready .map3d-loading {
  opacity: 0;
  pointer-events: none;
}

/* terrain labels */

.city3d {
  position: absolute;
  top: 0;
  left: 0;
  color: #273d34;
  font-family: var(--font-map);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(244, 235, 216, 0.98),
    0 0 5px rgba(244, 235, 216, 0.95),
    0 0 10px rgba(244, 235, 216, 0.6);
  transform: translate(-50%, calc(-100% - 6px));
}

.city3d--major {
  color: #58352d;
  font-size: 16px;
  letter-spacing: 1.8px;
}

.map3d-anchor[data-city="新安镇"] .city3d {
  transform: translate(calc(-50% + 24px), calc(-100% - 8px));
}

.city3d--medium {
  font-size: 12px;
  letter-spacing: 1.1px;
}

.city3d--minor {
  color: #596356;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.86;
}

.city3d--water {
  color: #477d7a;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  opacity: 0.9;
}

.city3d--sea {
  color: #3f7277;
  font-size: 13px;
  letter-spacing: 4px;
}

.city3d--region {
  color: #665c45;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 9px;
  opacity: 0.26;
  text-shadow: 0 1px 0 rgba(244, 235, 216, 0.6);
}

.city3d--rail {
  color: #604c34;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  opacity: 0.92;
}

.map3d-anchor.is-quiz-hidden {
  display: none !important;
}

/* unit billboards */

.unit3d {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 72px;
  padding: 5px 9px 5px 8px;
  color: #213f46;
  border: 1px solid #61797d;
  border-left: 3px solid #4e6a6f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), transparent 56%),
    rgba(231, 235, 230, 0.96);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.27);
  font-family: var(--font-ui);
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 18px));
  transition:
    transform 160ms ease,
    opacity 300ms ease,
    box-shadow 160ms ease;
}

.unit3d::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: calc(18px + var(--label-lift, 0px));
  content: "";
  background: linear-gradient(#5b7378, rgba(91, 115, 120, 0.08));
}

.unit3d::before {
  position: absolute;
  top: calc(100% + var(--label-lift, 0px) - 2px);
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: #f3e6cc;
  box-shadow: 0 0 0 1px rgba(91, 115, 120, 0.78);
}

.unit3d:hover,
.unit3d:focus-visible {
  transform: translate(-50%, calc(-100% - 22px));
  box-shadow: 0 10px 23px rgba(0, 0, 0, 0.34);
  outline: none;
}

.unit3d:focus-visible {
  border-color: var(--gold-soft);
}

.unit3d--pla {
  color: #6e2b25;
  border-color: #a54537;
  border-left-color: #a33a2e;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.6), transparent 56%),
    rgba(242, 226, 201, 0.96);
}

.unit3d--pla::after {
  background: linear-gradient(#a44537, rgba(164, 69, 55, 0.08));
}

.unit3d--pla::before {
  box-shadow: 0 0 0 1px rgba(164, 69, 55, 0.8);
}

.unit3d--ghost {
  border-color: #8b7547;
  border-left-color: #8b7547;
  border-style: dashed;
  background: rgba(238, 230, 209, 0.85);
  color: #6c5a38;
}

.unit3d--ghost::after {
  background: linear-gradient(#8b7547, rgba(139, 117, 71, 0.08));
}

.unit3d-mark {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  color: #eef0e8;
  border-radius: 50%;
  background: #4e6a6f;
  font-size: 9px;
  line-height: 1;
}

.unit3d--pla .unit3d-mark {
  background: #a33a2e;
}

.unit3d--ghost .unit3d-mark {
  background: transparent;
  color: #8b7547;
  border: 1px dashed #8b7547;
}

.unit3d-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unit3d-copy b {
  font-family: var(--font-map);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.05;
}

.unit3d-copy small {
  color: #66756d;
  font-size: 8px;
  letter-spacing: 0.35px;
  line-height: 1.1;
}

.unit3d--pla .unit3d-copy small {
  color: #82685d;
}

.unit3d--ghost .unit3d-copy small {
  color: #8a7b5f;
}

.map3d-anchor.is-dim {
  opacity: 0.55;
}

.map3d-anchor.is-unrevealed {
  display: none !important;
}

.map3d-anchor.is-focus .unit3d {
  box-shadow:
    0 7px 19px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(224, 196, 143, 0.45);
}

.map3d-anchor.is-dim .unit3d {
  pointer-events: auto;
}

/* route labels */

.route3d {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: max-content;
  padding: 4px 9px;
  color: #813126;
  border: 1px solid rgba(154, 52, 41, 0.46);
  background: rgba(243, 234, 214, 0.94);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}

.route3d::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 10px;
  content: "";
  background: rgba(129, 49, 38, 0.55);
}

.route3d--enemy {
  color: #4d6465;
  border-color: rgba(74, 99, 100, 0.4);
  background: rgba(239, 241, 231, 0.93);
}

.route3d--enemy::after {
  background: rgba(74, 99, 100, 0.5);
}

.route3d--ghost {
  color: #78623e;
  border-color: rgba(139, 117, 71, 0.46);
  background: rgba(243, 235, 216, 0.93);
}

.route3d--ghost::after {
  background: rgba(139, 117, 71, 0.5);
}

.map3d-anchor.is-route-hidden {
  display: none;
}

/* A / B */

.checkpoint3d {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 6px;
  color: #f9ecd4;
  border: 1px solid rgba(242, 219, 180, 0.8);
  background: rgba(152, 53, 42, 0.97);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.32);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, calc(-100% - 24px));
  transition:
    transform 160ms ease,
    background 180ms ease;
}

.checkpoint3d::after {
  position: absolute;
  top: 100%;
  left: 18px;
  width: 1px;
  height: 24px;
  content: "";
  background: linear-gradient(#a33a2d, rgba(163, 58, 45, 0.12));
}

.checkpoint3d:hover,
.checkpoint3d:focus-visible {
  transform: translate(-50%, calc(-100% - 28px));
  outline: none;
  background: #b24636;
}

.checkpoint3d-letter {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border: 1px solid rgba(249, 236, 212, 0.55);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
}

.checkpoint3d-answer {
  display: none;
  padding-left: 7px;
  color: #fff2d7;
  border-left: 1px solid rgba(255, 241, 215, 0.27);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.4px;
}

.map-stage.is-answer-revealed .checkpoint3d-answer {
  display: inline;
}

.map-stage.is-answer-revealed .checkpoint3d {
  background: rgba(130, 41, 31, 0.99);
}

.checkpoint3d-wrap.is-hidden {
  display: none;
}

@media (max-width: 1280px) {
  .map3d-plaque {
    width: 245px;
  }

  .map3d-plaque strong {
    font-size: 18px;
  }
}

@media (max-width: 1020px) {
  .map3d-plaque {
    top: 12px;
    left: 12px;
  }

  .map3d-hint {
    bottom: 10px;
    left: 10px;
  }
}

@media (max-width: 760px) {
  .map3d-plaque {
    display: none;
  }

  .city3d--rail,
  .city3d--water {
    display: none;
  }

  .city3d--medium {
    color: #4a4b37;
  }

  .map3d-views {
    top: 7px;
    right: 7px;
    padding: 3px;
  }

  .map3d-views > span {
    display: none;
  }

  .map3d-views button {
    height: 22px;
    padding: 0 6px;
    font-size: 8px;
  }

  .map3d-hint {
    bottom: 6px;
    left: 6px;
    padding: 4px 6px;
    font-size: 7.5px;
    letter-spacing: 0.3px;
  }

  .unit3d {
    gap: 4px;
    min-width: 0;
    padding: 3px 5px 3px 4px;
    transform: translate(-50%, calc(-100% - 12px));
  }

  .unit3d::after {
    height: 12px;
  }

  .unit3d:hover,
  .unit3d:focus-visible {
    transform: translate(-50%, calc(-100% - 15px));
  }

  .unit3d-mark {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
    font-size: 7px;
  }

  .unit3d-copy b {
    font-size: 10.5px;
    letter-spacing: 0.3px;
  }

  .unit3d-copy small {
    display: none;
  }

  .city3d--minor {
    display: none;
  }

  .city3d {
    font-size: 8px;
    text-shadow:
      0 1px 0 rgba(244, 235, 216, 0.98),
      0 0 4px rgba(244, 235, 216, 0.95);
  }

  .city3d--major {
    font-size: 12px;
  }

  .city3d--medium {
    font-size: 9px;
  }

  .city3d--sea {
    font-size: 10px;
  }

  .city3d--region {
    display: none;
  }

  .route3d {
    padding: 2px 5px;
    font-size: 8px;
  }

  .checkpoint3d {
    padding: 3px 6px 3px 4px;
    gap: 4px;
    font-size: 8px;
    transform: translate(-50%, calc(-100% - 16px));
  }

  .checkpoint3d::after {
    height: 16px;
  }

  .checkpoint3d-letter {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    font-size: 8px;
  }

  .checkpoint3d-answer {
    padding-left: 4px;
    font-size: 11px;
  }
}

.map3d-anchor.is-layer-hidden {
  display: none !important;
}

.map-stage.mode-2d .map3d {
  display: none;
}

.tool-btn--mode {
  color: var(--gold-soft);
  border-color: rgba(198, 162, 101, 0.2);
}

.tool-btn--mode:hover {
  border-color: rgba(198, 162, 101, 0.42);
}

.map3d-compass {
  position: absolute;
  z-index: 41;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: 38px;
  height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: rgba(241, 233, 218, 0.7);
  font-family: var(--font-map);
  font-size: 10px;
  pointer-events: none;
}

.map3d-compass i {
  position: relative;
  display: block;
  width: 1px;
  height: 27px;
  background: linear-gradient(180deg, rgba(231, 211, 174, 0.85), rgba(231, 211, 174, 0.15));
  transform-origin: 50% 100%;
}

.map3d-compass i::before {
  position: absolute;
  top: -1px;
  left: -4px;
  width: 9px;
  height: 9px;
  content: "";
  border-top: 1px solid #d8c08b;
  border-left: 1px solid #d8c08b;
  transform: rotate(45deg);
}

@media (max-width: 760px) {
  .tool-btn--mode {
    padding: 0 5px;
    font-size: 9px;
  }

  .map3d-compass {
    right: 8px;
    bottom: 8px;
    transform: scale(0.75);
    transform-origin: 100% 100%;
  }
}

.map3d-anchor.is-minor-hidden {
  display: none !important;
}

.map3d-scalebar {
  position: absolute;
  z-index: 43;
  bottom: 47px;
  left: 14px;
  min-width: 168px;
  padding: 7px 9px;
  color: rgba(242, 235, 219, 0.8);
  border: 1px solid rgba(232, 220, 194, 0.13);
  background: rgba(12, 22, 18, 0.8);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.scalebar-title {
  display: block;
  margin-bottom: 6px;
  color: var(--ui-muted-2);
  font-size: 7.5px;
  letter-spacing: 0.8px;
}

.scalebar-line-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scalebar-line {
  position: relative;
  display: block;
  width: 90px;
  height: 7px;
  flex: 0 0 auto;
  max-width: 220px;
  border-right: 1px solid rgba(241, 231, 208, 0.9);
  border-left: 1px solid rgba(241, 231, 208, 0.9);
  background:
    linear-gradient(90deg, rgba(241, 231, 208, 0.9) 0 50%, transparent 50% 100%) center / 100% 1px no-repeat;
  transition: width 140ms linear;
}

.scalebar-line-row b {
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.map3d-elevation {
  position: absolute;
  z-index: 43;
  right: 16px;
  bottom: 82px;
  width: 139px;
  padding: 8px 9px 7px;
  color: var(--ui-muted);
  border: 1px solid rgba(232, 220, 194, 0.12);
  background: rgba(12, 22, 18, 0.8);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.elevation-title {
  display: block;
  margin-bottom: 6px;
  color: var(--ui-muted-2);
  font-size: 7.5px;
  letter-spacing: 0.8px;
}

.elevation-ramp {
  display: block;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #8aa18a 0%, #c9c29a 24%, #b8a071 48%, #967b57 70%, #755f46 88%, #5c503f 100%);
  border: 1px solid rgba(242, 231, 209, 0.15);
}

.elevation-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  color: rgba(236, 226, 204, 0.65);
  font-family: var(--font-mono);
  font-size: 7px;
}

.map3d-elevation small {
  display: block;
  margin-top: 5px;
  color: var(--ui-muted-2);
  font-size: 7.5px;
  letter-spacing: 0.3px;
}

.source-disclaimer-sub {
  margin-top: 7px !important;
}

@media (max-width: 760px) {
  .map3d-scalebar,
  .map3d-elevation {
    display: none;
  }
}


.scalebar-extent {
  display: block;
  margin-top: 5px;
  color: var(--ui-muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.3px;
}

@media (max-width: 760px) {
  .map3d-scalebar {
    display: block;
    bottom: 30px;
    left: 6px;
    transform: scale(0.84);
    transform-origin: left bottom;
  }

  .map3d-elevation {
    display: none;
  }
}

/* Past-step markers stay on the map as compact name chips. */
.map3d-anchor.is-dim {
  opacity: 0.82;
}

.map3d-anchor.is-dim .unit3d {
  gap: 4px;
  min-width: 0;
  padding: 2px 6px 2px 5px;
  background: rgba(238, 230, 211, 0.86);
}

.map3d-anchor.is-dim .unit3d--pla {
  background: rgba(239, 219, 194, 0.86);
}

.map3d-anchor.is-dim .unit3d-copy small {
  display: none;
}

.map3d-anchor.is-dim .unit3d-copy b {
  font-size: 11px;
  letter-spacing: 0.3px;
}

.map3d-anchor.is-dim .unit3d-mark {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
  font-size: 7px;
}

.map3d-anchor.is-dim .unit3d:hover .unit3d-copy small {
  display: block;
}

.map3d-anchor.is-dim .unit3d:hover {
  padding: 4px 8px 4px 6px;
  background: rgba(242, 234, 216, 0.96);
}

.map3d-anchor.is-dim .unit3d:hover .unit3d-copy b {
  font-size: 14px;
}

/* ---------- Projection-sized 3D labels ---------- */
.map3d {
  background: #101915;
}

.map3d::after {
  background: linear-gradient(180deg, rgba(5, 12, 9, 0.08), rgba(5, 12, 9, 0.24));
}

.map3d-plaque,
.map3d-elevation {
  display: none;
}

.city3d {
  color: #10271e;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow:
    0 1px 0 #f7efdf,
    0 0 2px #f7efdf,
    0 0 6px #f7efdf,
    0 0 10px rgba(247, 239, 223, 0.9);
}

.city3d--major {
  color: #4c211a;
  font-size: 30px;
  letter-spacing: 1px;
}

.city3d--medium {
  color: #263a2e;
  font-size: 23px;
  letter-spacing: 0.3px;
}

.city3d--minor {
  color: #344b3e;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 1;
}

.city3d--water {
  color: #236b68;
  font-size: 16px;
  letter-spacing: 0.5px;
  opacity: 1;
}

.city3d--sea {
  color: #236368;
  font-size: 20px;
  letter-spacing: 2px;
}

.city3d--rail {
  color: #574029;
  font-size: 15px;
  letter-spacing: 0;
  opacity: 1;
}

.city3d--region {
  display: none;
}

.map3d-anchor[data-city="新安镇"] .city3d {
  transform: translate(calc(-50% + 135px), calc(-100% - 2px));
}

.map3d-anchor[data-city="运河车站"] .city3d {
  transform: translate(calc(-50% + 24px), 12px);
}

.unit3d {
  gap: 10px;
  min-width: 0;
  padding: 9px 13px 9px 10px;
  color: #172e35;
  border: 2px solid #4e6b70;
  border-left: 6px solid #4e6b70;
  background: #f1f0e8;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.34);
  font-size: 14px;
}

.unit3d--pla {
  color: #5b211a;
  border-color: #a23a2d;
  border-left-color: #a23a2d;
  background: #f7e9d3;
}

.unit3d--ghost {
  color: #5f4b28;
  border-color: #846a37;
  border-left-color: #846a37;
  background: #f1e6cf;
}

.unit3d-copy {
  gap: 2px;
}

.unit3d-copy b {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.15;
}

.unit3d-copy small {
  color: #405650;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

.unit3d--pla .unit3d-copy small {
  color: #754c43;
}

.unit3d--ghost .unit3d-copy small {
  color: #6e5a39;
}

.unit3d-mark {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  font-size: 12px;
  font-weight: 700;
}

.map3d-anchor.is-focus .unit3d {
  outline: 3px solid rgba(255, 217, 142, 0.95);
  outline-offset: 2px;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.4);
}

.map3d-anchor.is-dim {
  opacity: 0.58;
}

.map3d-anchor.is-dim .unit3d {
  gap: 5px;
  padding: 4px 7px;
  border-width: 1px;
  border-left-width: 4px;
  background: #ece9dd;
}

.map3d-anchor.is-dim .unit3d--pla {
  background: #f0e2cd;
}

.map3d-anchor.is-dim .unit3d-copy small {
  display: none;
}

.map3d-anchor.is-dim .unit3d-copy b,
.map3d-anchor.is-dim .unit3d:hover .unit3d-copy b {
  font-size: 17px;
  letter-spacing: 0;
}

.map3d-anchor.is-dim .unit3d-mark {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  font-size: 8px;
}

.route3d {
  padding: 7px 11px;
  color: #6e1f17;
  border: 2px solid rgba(154, 52, 41, 0.66);
  background: #fbf4e6;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.26);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.route3d--enemy {
  color: #294c4f;
  border-color: rgba(49, 82, 85, 0.66);
  background: #f2f4ec;
}

.route3d--ghost {
  color: #665029;
  border-color: rgba(110, 86, 44, 0.66);
}

.checkpoint3d {
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border-width: 2px;
  background: #a83e30;
  font-size: 15px;
  font-weight: 600;
}

.checkpoint3d-letter {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 15px;
  font-weight: 700;
}

.checkpoint3d-answer {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 700;
}

.map3d-views {
  top: 18px;
  right: 18px;
  gap: 5px;
  padding: 5px;
  background: rgba(13, 24, 19, 0.94);
  backdrop-filter: none;
}

.map3d-views > span {
  color: var(--ui-text-soft);
  font-size: 13px;
}

.map3d-views button {
  height: 38px;
  padding: 0 14px;
  color: var(--ui-text-soft);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
}

.map3d-views button.is-active {
  color: #fff;
  border-color: var(--gold-soft);
  background: rgba(214, 181, 119, 0.22);
}

.map3d-hint {
  display: none;
}

.map3d-scalebar {
  bottom: 16px;
  left: 16px;
  min-width: 190px;
  padding: 9px 11px;
  color: #f1f2eb;
  background: rgba(13, 24, 19, 0.92);
  backdrop-filter: none;
}

.scalebar-title,
.scalebar-extent {
  color: var(--ui-text-soft);
  font-size: 12px;
}

.scalebar-line-row b {
  font-size: 14px;
}

.map3d-compass {
  right: 20px;
  bottom: 18px;
  transform: scale(1.15);
  transform-origin: 100% 100%;
}

.is-presenting .city-label-wrap.is-minor,
.is-presenting .map3d-anchor.is-dim {
  display: none !important;
}

.city-label-wrap.is-city-obscured {
  display: none !important;
}

@media (max-width: 1280px) {
  .unit3d-copy b {
    font-size: 20px;
  }

  .unit3d-copy small {
    font-size: 12.5px;
  }

  .city3d--major {
    font-size: 26px;
  }

  .city3d--medium {
    font-size: 21px;
  }
}


@media (max-width: 760px) {
  .map3d-views {
    top: 8px;
    right: 8px;
    padding: 3px;
  }

  .map3d-views > span {
    display: none;
  }

  .map3d-views button {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .unit3d {
    gap: 6px;
    padding: 5px 8px;
    border-width: 1px;
    border-left-width: 4px;
  }

  .unit3d-copy b {
    font-size: 16px;
  }

  .unit3d-copy small {
    display: none;
  }

  .unit3d-mark {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    font-size: 9px;
  }

  .city3d {
    font-size: 14px;
  }

  .city3d--major {
    font-size: 22px;
  }

  .city3d--medium {
    font-size: 18px;
  }

  .city3d--sea {
    font-size: 16px;
  }

  .city3d--minor,
  .city3d--rail,
  .city3d--water {
    display: none;
  }

  .route3d {
    padding: 4px 6px;
    font-size: 13px;
  }

  .checkpoint3d {
    font-size: 12px;
  }

  .checkpoint3d-answer {
    font-size: 15px;
  }

  .map3d-anchor.is-dim .unit3d-copy b,
  .map3d-anchor.is-dim .unit3d:hover .unit3d-copy b {
    font-size: 15px;
  }

  .map3d-hint {
    display: none;
  }

  .map3d-scalebar {
    bottom: 8px;
    left: 8px;
    transform: scale(0.86);
    transform-origin: left bottom;
  }
}
