/* Skin 2.5D cho canvas Knowledge City trên /user/air (renderer: airMap25d.js).
 * Prefix a25- để không đụng style 2D. */

/* Map phủ trọn nền trang (thay nền, không phải card nổi) — chỉ áp cho trang air. */
body.user-shell.air-page .viewport.tutor-viewport,
body.user-shell.air-page main.viewport.tutor-viewport {
  padding: var(--shell-topbar-h, 64px) 0 0 !important;
  scrollbar-gutter: auto;
  overflow: hidden;
}
body.user-shell.air-page .shell-content-column.air-shell-column {
  width: 100%;
  flex: 1 1 auto;
}

.air-map:has(.a25-scene) {
  background:
    radial-gradient(900px 420px at 68% 88%, rgba(255, 179, 107, 0.28), transparent 60%),
    linear-gradient(180deg, #1a1038 0%, #3a1856 48%, #c45a48 86%, #5c2547 100%);
}

.a25-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.a25-sun {
  position: absolute;
  left: 62%;
  bottom: 8%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe0b0 0%, #ffb36b 55%, rgba(255, 179, 107, 0) 72%);
}

.a25-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overflow: hidden;
}
.a25-scene.is-dragging { cursor: grabbing; }
.a25-scene.is-dragging .a25-plate,
.a25-scene.is-dragging .a25-bldg { pointer-events: none; }
.a25-scene.is-dragging * { animation-play-state: paused !important; }
/* Đang xoay: lu mờ nhãn phụ để đọc khối phố; tòa hiện tại vẫn giữ tên. */
.a25-scene.is-dragging .a25-bldg:not(.is-now) .a25-plate { opacity: 0.3; }

.a25-world {
  /* Sân khấu cố định bằng đúng cửa sổ 4×4 — mặt đất KHÔNG dịch khi đổi camera. */
  position: relative;
  transform-style: preserve-3d;
  transform:
    translateY(6px)
    scale(calc(var(--zoom, 1) * var(--uzoom, 1)))
    rotateX(var(--rx, 58deg))
    rotateZ(var(--rz, -45deg));
  --fh: 20px;
}

/* Lớp nội dung (tòa/đường/ô) — trượt khi dịch camera rồi dựng lại; đất đứng yên. */
.a25-flow {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.a25-flow.is-panning { transition: transform 0.38s ease; }

.a25-ground {
  /* Tĩnh tuyệt đối: phủ sân khấu + 1 ô đệm mỗi phía cho lúc nội dung trượt. */
  position: absolute;
  inset: -186px -190px;
  background:
    repeating-linear-gradient(0deg, rgba(214, 230, 255, 0.05) 0 1px, transparent 1px 53px),
    repeating-linear-gradient(90deg, rgba(214, 230, 255, 0.05) 0 1px, transparent 1px 53px),
    linear-gradient(135deg, #223d66 0%, #1a3358 46%, #25406b 100%);
  border-radius: 34px;
  border: 1px solid rgba(214, 230, 255, 0.14);
  box-shadow: 0 0 90px rgba(8, 20, 36, 0.55);
}

.a25-plot {
  position: absolute;
  width: 102px;
  height: 82px;
  border: 2px dashed rgba(214, 230, 255, 0.14);
  border-radius: 12px;
  transform: translateZ(0.4px);
}

/* ---------- thửa đất chủ đề (zone) — diện tích a×b tùy số dạng bài ---------- */

.a25-zone {
  position: absolute;
  border-radius: 16px;
  border: 2px solid rgba(214, 230, 255, 0.2);
  background: rgba(214, 230, 255, 0.05);
  transform: translateZ(0.45px);
  pointer-events: none;
}
.a25-zone.is-current {
  border-color: rgba(255, 207, 107, 0.75);
  background: rgba(255, 207, 107, 0.1);
  box-shadow: 0 0 26px rgba(255, 207, 107, 0.22), inset 0 0 30px rgba(255, 207, 107, 0.08);
}
.a25-zone.is-past {
  border-color: rgba(91, 157, 255, 0.55);
  background: rgba(91, 157, 255, 0.08);
}
.a25-zone.is-upcoming { border-style: dashed; }
.a25-zone.is-support {
  border-style: dashed;
  border-color: rgba(127, 214, 178, 0.6);
  background: rgba(127, 214, 178, 0.07);
}
.a25-zone-name {
  position: absolute;
  left: 8px;
  top: 6px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(224, 234, 255, 0.6);
}
.a25-zone.is-current .a25-zone-name { color: rgba(255, 233, 196, 0.92); }
.a25-zone.is-past .a25-zone-name { color: rgba(188, 215, 255, 0.85); }
.a25-zone.is-support .a25-zone-name { color: rgba(159, 231, 200, 0.85); }

.a25-road {
  position: absolute;
  height: 14px;
  margin-top: -7px;
  transform-origin: left center;
  background:
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(255, 255, 255, 0.35) 24px 32px),
    linear-gradient(180deg, rgba(255, 207, 107, 0.92), rgba(232, 168, 60, 0.85));
  border-radius: 7px;
  box-shadow: 0 0 22px rgba(255, 207, 107, 0.35);
}
/* Dòng chảy chỉ ở đoạn chạm tòa đang học — nhẹ GPU, lại chỉ đúng hướng đi. */
.a25-road.is-live { animation: a25roadflow 2.2s linear infinite; }
@keyframes a25roadflow { to { background-position: 56px 0, 0 0; } }
.a25-road.is-end::after {
  content: "";
  position: absolute;
  right: -16px;
  top: -4px;
  width: 18px;
  height: 28px;
  background: #ffcf6b;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Nhánh bổ trợ: mũi tên nét đứt nhỏ màu xanh dương, khuỷu vuông góc. */
.a25-support {
  position: absolute;
  height: 0;
  border-top: 2px dashed #3d8bfd;
  transform-origin: left center;
  opacity: 0.95;
}
.a25-support.is-end::after {
  content: "";
  position: absolute;
  right: -9px;
  top: -5px;
  width: 10px;
  height: 12px;
  background: #3d8bfd;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.a25-support-joint {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  border: 2px solid #3d8bfd;
  background: rgba(12, 24, 48, 0.9);
  transform: translateZ(0.65px);
}

.a25-bldg {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  transform-style: preserve-3d;
  cursor: pointer;
  font: inherit;
  overflow: visible;
  z-index: 1;
}
.a25-bldg.is-selected { z-index: 5; }
.a25-bldg.is-now { z-index: 8; }
.a25-bldg:focus-visible { outline: 2px solid #ffcf6b; outline-offset: 4px; }

.a25-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.16s ease;
}
.a25-bldg:hover .a25-stack,
.a25-bldg.is-selected .a25-stack { transform: translateZ(8px); }

/* Vòng chọn dưới chân tòa đang mở sheet */
.a25-sel {
  position: absolute;
  inset: -12px;
  border: 3px solid rgba(255, 207, 107, 0.9);
  border-radius: 18px;
  transform: translateZ(0.8px);
  box-shadow: 0 0 22px rgba(255, 207, 107, 0.45);
  pointer-events: none;
  animation: a25selpulse 1.6s ease-in-out infinite;
}
@keyframes a25selpulse { 50% { box-shadow: 0 0 38px rgba(255, 207, 107, 0.85); } }

.a25-cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--i) * var(--fh)));
}
.a25-cube i,
.a25-roof i {
  position: absolute;
  display: block;
  border: 1px solid rgba(10, 20, 40, 0.35);
  backface-visibility: hidden;
}
.a25-cube .f-top { inset: 0; transform: translateZ(var(--fh)); background: var(--ct); }
.a25-cube .f-s { left: 0; right: 0; bottom: 0; height: var(--fh); transform-origin: bottom; transform: rotateX(-90deg); background: var(--cs); }
.a25-cube .f-n { left: 0; right: 0; top: 0; height: var(--fh); transform-origin: top; transform: rotateX(90deg); background: var(--cn); }
.a25-cube .f-w { left: 0; top: 0; bottom: 0; width: var(--fh); transform-origin: left; transform: rotateY(-90deg); background: var(--cw); }
.a25-cube .f-e { right: 0; top: 0; bottom: 0; width: var(--fh); transform-origin: right; transform: rotateY(90deg); background: var(--ce); }

.a25-cube.fl-dim  { --ct: #4d5a85; --cs: #3d486e; --cw: #303a5c; --cn: #364067; --ce: #44507a; }
.a25-cube.fl-lit  { --ct: #ffe9a8; --cs: #f0c46a; --cw: #b98c3f; --cn: #c99a48; --ce: #e3b258; }
.a25-cube.fl-lit .f-top { box-shadow: 0 0 18px rgba(255, 233, 168, 0.4); }
.a25-cube.fl-open { --ct: #ffd98f; --cs: #ff9d5c; --cw: #c46a3a; --cn: #cf7642; --ce: #ea8b4e; }
.a25-cube.fl-open .f-s { animation: a25burn 1.6s ease-in-out infinite; }
.a25-cube.is-target .f-top { box-shadow: inset 0 0 0 3px rgba(255, 247, 220, 0.9), 0 0 18px rgba(255, 157, 92, 0.7); }
@keyframes a25burn {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 157, 92, 0.5); }
  50%      { box-shadow: 0 0 26px rgba(255, 157, 92, 0.95); }
}

.a25-bldg.is-support .a25-cube.fl-lit { --ct: #d9efe2; --cs: #9fcdb2; --cw: #5f8f78; --cn: #6d9e85; --ce: #8fc0a4; }
.a25-bldg.is-ahead .a25-cube.fl-dim {
  --ct: rgba(170, 184, 216, 0.32);
  --cs: rgba(130, 144, 182, 0.28);
  --cw: rgba(104, 116, 152, 0.28);
  --cn: rgba(110, 122, 160, 0.28);
  --ce: rgba(122, 136, 174, 0.28);
}
.a25-bldg.is-ahead .a25-cube i { border-style: dashed; border-color: rgba(200, 214, 244, 0.4); }

/* chóp — footprint 86×68, cao 20 */
.a25-roof {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--n) * var(--fh)));
  pointer-events: none;
}
.a25-roof i { border: 0; }
.a25-roof .r-s { left: 0; right: 0; bottom: 0; height: 40px; clip-path: polygon(50% 0, 0 100%, 100% 100%); transform-origin: bottom; transform: rotateX(-30deg); }
.a25-roof .r-n { left: 0; right: 0; top: 0; height: 40px; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transform: rotateX(30deg); }
.a25-roof .r-w { top: 0; bottom: 0; left: 0; width: 47px; clip-path: polygon(0 0, 100% 50%, 0 100%); transform-origin: left; transform: rotateY(-25deg); }
.a25-roof .r-e { top: 0; bottom: 0; right: 0; width: 47px; clip-path: polygon(100% 0, 100% 100%, 0 50%); transform-origin: right; transform: rotateY(25deg); }
.a25-roof.is-gold .r-s { background: linear-gradient(180deg, #ffe9a8, #f2b95a); }
.a25-roof.is-gold .r-n { background: #b9853c; }
.a25-roof.is-gold .r-w { background: #c99a48; }
.a25-roof.is-gold .r-e { background: #ffda92; }
.a25-roof.is-ghost i { background: rgba(180, 194, 226, 0.12); }

.a25-apex {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform:
    translateZ(calc(var(--z-apex) + 44px))
    rotateZ(calc(var(--rz, -45deg) * -1))
    rotateX(calc(var(--rx, 58deg) * -1));
  pointer-events: none;
}
.a25-apex::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  background: #ffe9a8;
  clip-path: polygon(50% 0, 63% 36%, 100% 50%, 63% 64%, 50% 100%, 37% 64%, 0 50%, 37% 36%);
  filter: drop-shadow(0 0 8px rgba(255, 217, 130, 0.95));
}

.a25-plate {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  margin-left: -56px;
  transform:
    translateZ(var(--z-top))
    rotateZ(calc(var(--rz, -45deg) * -1))
    rotateX(calc(var(--rx, 58deg) * -1))
    translateY(calc(-100% - 10px));
  text-align: center;
  pointer-events: none;
}
.a25-plate strong {
  display: inline-block;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(10, 22, 42, 0.88);
  border: 1px solid rgba(214, 230, 255, 0.24);
  font-size: 10.5px;
  font-weight: 700;
  color: #ffeccb;
  white-space: nowrap;
}
.a25-plate small {
  display: block;
  max-width: 112px;
  margin: 2px auto 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  color: rgba(214, 230, 255, 0.72);
}
/* Chống chữ chèn nhau: tòa phụ chỉ đeo bảng tên ngắn; mô tả hiện khi hover/chọn. */
.a25-bldg:not(.is-now) .a25-plate small { display: none; }
.a25-bldg:not(.is-now):hover .a25-plate small,
.a25-bldg.is-selected .a25-plate small { display: block; }
.a25-bldg:not(.is-now) .a25-plate strong { font-size: 10px; padding: 2px 6px; }
.a25-bldg:hover .a25-plate strong { border-color: #ffcf6b; color: #fff3d6; }
.a25-bldg.is-selected .a25-plate strong { border-color: #ffcf6b; box-shadow: 0 0 14px rgba(255, 207, 107, 0.5); }
.a25-bldg.is-now .a25-plate { transform: translateZ(calc(var(--z-top) + 36px)) rotateZ(calc(var(--rz, -45deg) * -1)) rotateX(calc(var(--rx, 58deg) * -1)) translateY(calc(-100% - 10px)); }
.a25-bldg.is-now .a25-plate strong { background: rgba(64, 40, 8, 0.92); border-color: #ffcf6b; font-size: 12.5px; }
.a25-bldg.is-ahead .a25-plate strong { color: #aab8d8; background: rgba(24, 34, 60, 0.6); border-style: dashed; }

.a25-beacon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform:
    translateZ(calc(var(--z-top) + 68px))
    rotateZ(calc(var(--rz, -45deg) * -1))
    rotateX(calc(var(--rx, 58deg) * -1));
  pointer-events: none;
}
.a25-beacon .beam {
  position: absolute;
  left: -7px;
  bottom: -52px;
  width: 14px;
  height: 47px;
  background: linear-gradient(0deg, rgba(255, 233, 168, 0), rgba(255, 233, 168, 0.45) 45%, rgba(255, 240, 190, 0.95));
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(255, 217, 130, 0.55);
}
.a25-beacon .orb {
  position: absolute;
  left: -11px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff7dc, #ffd982 62%, #f0a93c);
  box-shadow: 0 0 30px 10px rgba(255, 217, 130, 0.9);
  animation: a25orb 2.4s ease-in-out infinite;
}
@keyframes a25orb { 50% { box-shadow: 0 0 44px 16px rgba(255, 217, 130, 1); } }

.a25-stand-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 34px;
  margin: 0;
  transform:
    translateZ(calc(var(--z-top) + 86px))
    rotateZ(calc(var(--rz, -45deg) * -1))
    rotateX(calc(var(--rx, 58deg) * -1))
    translate(-50%, -100%);
  pointer-events: none;
  z-index: 3;
}
.a25-stand-pin i {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: radial-gradient(circle at 35% 30%, #fff7dc, #ffd982 55%, #f0a93c);
  box-shadow: 0 0 18px 6px rgba(255, 217, 130, 0.95);
  border: 2px solid #ffe9a8;
}
.a25-stand-pin span {
  display: block;
  margin-top: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(64, 40, 8, 0.92);
  border: 1px solid #ffcf6b;
  color: #ffe9c4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(0deg);
}

.a25-fog {
  position: absolute;
  width: 168px;
  height: 336px;
  border: 2px dashed rgba(214, 230, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(214, 230, 255, 0.1), rgba(120, 140, 180, 0.16));
  transform: translateZ(1px);
}
.a25-fog-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  margin-left: -75px;
  text-align: center;
  transform: rotateZ(calc(var(--rz, -45deg) * -1)) rotateX(calc(var(--rx, 58deg) * -1));
  color: rgba(224, 234, 255, 0.85);
  font-size: 11px;
}
.a25-fog-label strong { display: block; font-size: 12.5px; color: #eef3ff; }

/* ---------- mũi tên dịch cửa sổ (1 hàng/cột mỗi lần bấm) ---------- */

.a25-nav {
  position: absolute;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 207, 107, 0.35);
  background: rgba(12, 20, 44, 0.78);
  color: #ffe9c4;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.a25-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.a25-nav:hover:not(:disabled) { border-color: #ffcf6b; transform: scale(1.08); }
.a25-nav:disabled { opacity: 0.25; cursor: default; }
.a25-nav-up    { top: 14px; left: 50%; margin-left: -20px; }
.a25-nav-down  { bottom: 14px; left: 50%; margin-left: -20px; }
.a25-nav-left  { left: 14px; top: 50%; margin-top: -20px; }
.a25-nav-right { right: 14px; top: 50%; margin-top: -20px; }
/* Sheet mở thì mũi tên phải né vào trong để không bị che. */
.air-map:has(.a25-sheet) .a25-nav-right { right: 268px; }

.a25-tb-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(170, 184, 216, 0.5);
}

.a25-topic {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 61;
}
.a25-topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  height: auto;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 207, 107, 0.4);
  background: rgba(12, 20, 44, 0.85);
  color: #ffe9c4;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  max-width: min(360px, calc(100vw - 180px));
}
.a25-topic-btn.has-active {
  border-color: rgba(255, 207, 107, 0.55);
  background: rgba(255, 207, 107, 0.1);
}
.a25-topic-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.a25-topic-btn-ch {
  font-size: 10px;
  font-weight: 650;
  color: rgba(255, 233, 196, 0.78);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.a25-topic-btn-now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
  font-weight: 750;
  color: #ffe9c4;
  line-height: 1.2;
}
.a25-topic-btn-topic {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a25-topic-tag {
  flex: none;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.a25-topic-tag.is-live { color: #ffd982; }
.a25-topic-tag.is-stand { color: #9fe7c8; }
.a25-topic-btn:hover { border-color: #ffcf6b; }
.a25-topic-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.a25-topic-ico {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #ffd982, #f0a93c);
  box-shadow: 0 0 8px rgba(255, 217, 130, 0.7);
}
.a25-topic-menu[hidden] { display: none; }
.a25-topic-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-height: min(58vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(214, 230, 255, 0.2);
  background: rgba(12, 20, 44, 0.96);
  box-shadow: 0 14px 34px rgba(4, 10, 24, 0.55);
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 230, 255, 0.16) transparent;
}
.a25-topic-menu::-webkit-scrollbar { width: 6px; }
.a25-topic-menu::-webkit-scrollbar-track { background: transparent; }
.a25-topic-menu::-webkit-scrollbar-thumb {
  background: rgba(214, 230, 255, 0.16);
  border-radius: 99px;
}
/* Tiêu đề nhóm = chương/mạch — phân cấp lớp → chương → chủ đề trong droplist. */
.a25-topic-group {
  padding: 8px 10px 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 218, 244, 0.65);
}
.a25-topic-group:not(:first-child) {
  margin-top: 3px;
  border-top: 1px solid rgba(214, 230, 255, 0.12);
}
.a25-topic-item {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 5px 8px;
  color: #e6edfb;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.a25-topic-item em {
  font-style: normal;
  font-size: 10px;
  color: rgba(207, 218, 244, 0.75);
  white-space: nowrap;
}
.a25-topic-item.is-here em { color: #ffe9c4; }
.a25-topic-item:hover:not(:disabled) { border-color: rgba(255, 207, 107, 0.5); }
.a25-topic-item.is-here { background: rgba(255, 207, 107, 0.14); border-color: rgba(255, 207, 107, 0.4); color: #ffe9c4; }
.a25-topic-item.is-fog { opacity: 0.45; cursor: default; }
.a25-topic-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 6px 10px;
  padding: 2px 0 4px 8px;
  border-left: 1px solid rgba(255, 207, 107, 0.22);
}
.a25-topic-child {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(230, 237, 251, 0.9);
  font: inherit;
  font-size: 10px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.a25-topic-child span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a25-topic-child em {
  flex: none;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.a25-topic-child em.is-live,
.a25-topic-tag.is-live { color: #ffd982; }
.a25-topic-child em.is-stand,
.a25-topic-tag.is-stand { color: #9fe7c8; }
.a25-topic-child:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.a25-topic-child.is-now { color: #ffe9c4; background: rgba(255, 207, 107, 0.1); }
.a25-topic-child.is-standing { box-shadow: inset 2px 0 0 #ffd982; }
.a25-topic-child.is-past { color: #bcd7ff; }
.a25-topic-child:disabled { opacity: 0.4; cursor: default; }
.a25-topic-child .a25-tb-dot { width: 5px; height: 5px; }

/* ---------- chú giải màu (góc trái dưới, kiểu legend biểu đồ) ---------- */

.a25-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 10px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(10, 16, 36, 0.72);
  border: 1px solid rgba(214, 230, 255, 0.14);
  color: rgba(224, 234, 255, 0.85);
  font-size: 11px;
  pointer-events: none;
  max-width: min(560px, calc(100% - 220px));
}
.a25-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.a25-legend .lg {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.a25-legend .lg-lit { background: #ffe9a8; box-shadow: 0 0 6px rgba(255, 233, 168, 0.6); }
.a25-legend .lg-live { background: #ff9d5c; box-shadow: 0 0 6px rgba(255, 157, 92, 0.6); }
.a25-legend .lg-dim { background: #4d5a85; }
.a25-legend .lg-support { background: #3d8bfd; }
.a25-legend .lg-done {
  background: #ffd982;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.a25-legend .lg-demo {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 207, 107, 0.55);
  color: #ffe9c4;
}

/* ---------- Thẻ thông tin tòa nhà (dock phải, không cuộn) ---------- */

.a25-sheet {
  position: absolute;
  right: 12px;
  top: 44px;
  z-index: 3;
  width: min(300px, calc(100% - 24px));
  max-height: calc(100% - 58px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 27, 56, 0.97), rgba(10, 18, 40, 0.95));
  border: 1px solid rgba(255, 207, 107, 0.3);
  box-shadow: 0 14px 32px rgba(4, 10, 24, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #eef3ff;
  font-size: 12px;
  animation: a25sheetin 0.22s ease-out;
}
.a25-sheet-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 6px;
}
.a25-sheet-actions {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(214, 230, 255, 0.12);
  background: linear-gradient(180deg, rgba(10, 18, 40, 0.92), rgba(10, 18, 40, 0.98));
}
@keyframes a25sheetin {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}

.a25-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(214, 230, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #cfdaf4;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.a25-close:hover { border-color: #ffcf6b; color: #ffe9c4; }

.a25-sheet-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  margin: 0 24px 8px 0;
  font-size: 16px;
  font-weight: 800;
  color: #fff3d6;
  line-height: 1.25;
  max-height: calc(1.25em * 2);
}

.a25-floors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}
.a25-floors-empty {
  padding: 8px 6px;
  color: #9fb0d8;
  font-size: 12px;
}
.a25-floor {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 7px;
  border: 1px solid rgba(214, 230, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.a25-floor-idx {
  flex: none;
  min-width: 1.4em;
  font-size: 12px;
  font-weight: 800;
  color: #ffcf6b;
}
.a25-floor:hover { border-color: rgba(255, 207, 107, 0.55); }
.a25-floor .a25-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4d5a85;
}
.a25-floor.is-lit .a25-dot { background: #ffd982; box-shadow: 0 0 8px rgba(255, 217, 130, 0.85); }
.a25-floor.is-live .a25-dot { background: #ff9d5c; box-shadow: 0 0 8px rgba(255, 157, 92, 0.85); animation: a25dotpulse 1.6s ease-in-out infinite; }
@keyframes a25dotpulse { 50% { box-shadow: 0 0 14px rgba(255, 157, 92, 1); } }
.a25-floor-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.3;
}
.a25-floor em { flex: none; font-style: normal; font-size: 11px; color: #9fb0d8; }
.a25-floor.is-picked { border-color: #ffcf6b; background: rgba(255, 207, 107, 0.13); }
.a25-floor.is-picked em { color: #ffe9c4; }
.a25-floor.is-dim { opacity: 0.7; }

.a25-cta {
  flex: 1;
  min-width: 0;
  padding: 4px 3px;
  border-radius: 7px;
  border: 1px solid rgba(214, 230, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #dfe8fb;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.a25-cta:hover:not(:disabled) { border-color: #ffcf6b; color: #ffe9c4; }
.a25-cta.is-busy {
  cursor: wait;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.a25-cta.is-ready {
  border: 0;
  background: linear-gradient(180deg, #ffd982, #f0b04a);
  color: #241705;
  box-shadow: 0 2px 0 #a06a1e;
}
.a25-cta.is-retry { border-color: rgba(255, 157, 92, 0.65); color: #ffc9a3; }
.a25-cta:disabled { cursor: wait; }

@media (max-width: 720px) {
  .a25-sheet {
    right: 10px;
    left: auto;
    top: auto;
    bottom: 10px;
    width: min(280px, calc(100% - 20px));
  }
  @keyframes a25sheetin {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .a25-road.is-live, .a25-cube.fl-open .f-s, .a25-beacon .orb, .a25-sel, .a25-floor .a25-dot { animation: none !important; }
}
