:root {
  --cream: #05080d;
  --cream-soft: #0c121a;
  --cream-deep: #19202b;
  --paper: rgba(9, 14, 22, 0.88);
  --brand-yellow: #ffe100;
  --ink: #111315;
  --ink-soft: #dce4e7;
  --ink-mute: #a8b1b8;
  --muted: rgba(231, 238, 241, 0.72);
  --muted-2: rgba(255, 225, 0, 0.72);
  --line: rgba(255, 225, 0, 0.18);
  --line-soft: rgba(255, 255, 255, 0.11);
  --shadow-card: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-panel: 0 28px 72px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: var(--font-inter, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: var(--font-bricolage, "Bricolage Grotesque"), "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: var(--font-playfair, "Playfair Display"), Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--cream);
  color: #eef4f3;
  font-family: var(--font-sans);
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brand-yellow);
  color: #000;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.campus-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 26%, rgba(82, 138, 214, 0.18), transparent 32%),
    radial-gradient(circle at 36% 62%, rgba(22, 86, 122, 0.22), transparent 38%),
    linear-gradient(180deg, #08172b 0%, #061020 52%, #020611 100%);
}

.campus-shell::before {
  content: none;
}

.campus-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 60% 12%, rgba(79, 146, 224, 0.1), transparent 36%),
    radial-gradient(ellipse at 44% 24%, rgba(44, 115, 176, 0.13), transparent 44%),
    radial-gradient(ellipse at 50% 54%, transparent 0 58%, rgba(2, 14, 32, 0.18) 84%, rgba(1, 8, 20, 0.42) 100%),
    linear-gradient(180deg, rgba(5, 22, 46, 0.06) 0%, rgba(4, 15, 32, 0.04) 44%, rgba(2, 10, 24, 0.18) 100%);
}

#campusCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  touch-action: none;
}

.topbar,
.area-rail,
.detail-panel,
.camera-panel,
.label-layer,
.status-pill,
.load-panel {
  z-index: 12;
}

.topbar {
  position: fixed;
  left: clamp(28px, 4.4vw, 76px);
  right: clamp(28px, 4.4vw, 76px);
  top: clamp(24px, 4vw, 48px);
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(300px, 520px) auto;
  gap: 32px;
  align-items: start;
  pointer-events: none;
}

.title-block {
  max-width: 520px;
  pointer-events: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--brand-yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--brand-yellow);
}

h1 {
  max-width: 560px;
  color: #f7f9f4;
  text-shadow: 0 12px 46px rgba(0, 0, 0, 0.36);
  font-family: var(--font-display);
  font-size: 86px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  width: min(440px, 100%);
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
  pointer-events: auto;
}

.control-hint {
  position: fixed;
  left: clamp(610px, 47vw, 820px);
  top: clamp(24px, 4vw, 48px);
  z-index: 12;
  display: flex;
  width: min(520px, calc(100vw - 760px));
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 0;
  border: 1px solid rgba(255, 225, 0, 0.18);
  background: rgba(6, 10, 16, 0.76);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  color: #f7f9f4;
  backdrop-filter: blur(12px);
  padding: 13px 15px;
  pointer-events: none;
}

.control-hint span {
  color: #f7f9f4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.control-hint span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  background: var(--brand-yellow);
  vertical-align: 2px;
}

.control-hint small {
  width: 100%;
  border-top: 1px solid rgba(255, 225, 0, 0.15);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding-top: 10px;
  white-space: nowrap;
}

.action-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 225, 0, 0.16);
  background: rgba(8, 12, 18, 0.78);
  color: #f7f9f4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 20px;
  text-transform: uppercase;
  transition:
    transform 0.25s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.action-button:hover,
.action-button.is-active {
  background: rgba(255, 225, 0, 0.12);
  border-color: rgba(255, 225, 0, 0.42);
  color: #fffce8;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.action-button.strong {
  background: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: #000;
}

.action-button.strong:hover {
  background: rgba(8, 12, 18, 0.92);
  border-color: rgba(255, 225, 0, 0.5);
  color: var(--brand-yellow);
}

.area-rail {
  position: fixed;
  left: clamp(28px, 4.4vw, 76px);
  top: 50%;
  z-index: 11;
  display: grid;
  gap: 8px;
  width: 170px;
  transform: translateY(-30%);
}

.area-button {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 11, 17, 0.68);
  color: rgba(232, 240, 242, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  padding: 0 12px;
  text-align: left;
  transition:
    transform 0.28s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.area-button::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 0;
  background: var(--brand-yellow);
  transition: width 0.3s var(--ease);
}

.area-button span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: #05070b;
  color: var(--brand-yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.area-button strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-button:hover,
.area-button.active {
  border-color: rgba(255, 225, 0, 0.35);
  background: rgba(13, 18, 26, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  color: #f7f9f4;
  transform: translateX(4px);
}

.area-button.active::before {
  width: 5px;
}

.area-button.active span {
  background: var(--brand-yellow);
  color: #000;
}

.detail-panel {
  position: fixed;
  right: clamp(28px, 4.4vw, 76px);
  bottom: clamp(28px, 4.4vw, 56px);
  z-index: 10;
  width: min(438px, calc(100vw - 56px));
  max-height: min(650px, calc(100vh - 160px));
  overflow: auto;
  border: 1px solid rgba(255, 225, 0, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 42%),
    rgba(7, 11, 17, 0.78);
  box-shadow: var(--shadow-panel);
  color: #f7f9f4;
  padding: 26px;
  backdrop-filter: blur(14px);
}

.detail-panel::-webkit-scrollbar {
  width: 8px;
}

.detail-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.detail-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 225, 0, 0.3);
}

.panel-heading {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
}

.area-index {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  background: #05070b;
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.area-type,
.list-title,
.focus-box span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin-top: 8px;
  color: #f7f9f4;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.area-cn {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.area-description {
  margin-top: 24px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.72;
}

.metric-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
}

.metric-chip {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  padding: 12px 13px;
}

.metric-chip strong {
  display: block;
  color: #f7f9f4;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
}

.metric-chip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.focus-box {
  margin-top: 22px;
  border-left: 5px solid var(--brand-yellow);
  background: rgba(3, 5, 8, 0.94);
  color: #fff;
  padding: 22px 22px 24px;
}

.focus-box h3 {
  margin-top: 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

.focus-box p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.program-list-wrap {
  margin-top: 24px;
}

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

.program-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
}

.program-list strong {
  min-width: 0;
  color: #e7eeef;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.program-list span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
}

.label-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.hotspot-label {
  position: absolute;
  display: block;
  width: 220px;
  height: 108px;
  border: 0;
  background: transparent;
  color: #f7f9f4;
  padding: 0;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  transition:
    transform 0.3s var(--ease),
    filter 0.3s var(--ease),
    opacity 0.3s var(--ease);
  white-space: nowrap;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.42));
}

.hotspot-label::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42px;
  height: 66px;
  border-left: 1px solid rgba(255, 225, 0, 0.68);
  opacity: 0;
  transform: translateX(-50%);
  transition:
    border-color 0.3s var(--ease),
    opacity 0.3s var(--ease);
}

.hotspot-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 225, 0, 0.92);
  border-radius: 999px;
  background: rgba(255, 225, 0, 0.92);
  box-shadow: 0 0 16px rgba(255, 225, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, 50%);
  transition:
    opacity 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.hotspot-tag {
  position: absolute;
  left: 50%;
  top: 0;
  display: inline-flex;
  height: 38px;
  max-width: 210px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 225, 0, 0.24);
  border-radius: 999px;
  background: rgba(13, 14, 16, 0.88);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.38),
    0 0 20px rgba(255, 225, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 0;
  transform: translateX(-50%);
  transition:
    padding 0.28s var(--ease),
    transform 0.28s var(--ease),
    background 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
  backdrop-filter: blur(10px);
}

.hotspot-tag i {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 225, 0, 0.86);
  border-radius: 999px;
  background: #05070b;
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    width 0.3s var(--ease),
    height 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.hotspot-tag b {
  display: block;
  max-width: 0;
  overflow: hidden;
  color: rgba(255, 253, 247, 0.95);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateX(-6px);
  transition:
    max-width 0.28s var(--ease),
    opacity 0.24s var(--ease),
    transform 0.24s var(--ease);
  white-space: nowrap;
}

.hotspot-label.active {
  transform: translate(-50%, -106%);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.22));
}

.hotspot-label:hover .hotspot-tag,
.hotspot-label.active .hotspot-tag {
  padding: 0 13px 0 0;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(13, 14, 16, 0.92);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.48),
    0 0 26px rgba(255, 225, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hotspot-label.active::before {
  border-left-color: rgba(255, 225, 0, 0.78);
  opacity: 1;
}

.hotspot-label.active::after {
  border-color: rgba(255, 225, 0, 1);
  background: var(--brand-yellow);
  opacity: 1;
}

.hotspot-label:hover .hotspot-tag i {
  border-color: rgba(255, 209, 0, 1);
}

.hotspot-label:hover .hotspot-tag b,
.hotspot-label.active .hotspot-tag b {
  max-width: 160px;
  opacity: 1;
  transform: translateX(0);
}

.hotspot-label.active .hotspot-tag i {
  border-color: rgba(255, 225, 0, 0.95);
  background: var(--brand-yellow);
  color: var(--ink);
}

.hotspot-label:focus-visible {
  outline: none;
}

.hotspot-label:focus-visible .hotspot-tag {
  box-shadow: 0 0 0 4px rgba(255, 209, 0, 0.2);
}

.hotspot-label:focus-visible .hotspot-tag i {
  box-shadow: 0 0 0 4px rgba(255, 209, 0, 0.24);
}

.camera-panel {
  position: fixed;
  left: clamp(28px, 4.4vw, 76px);
  bottom: clamp(24px, 4vw, 42px);
  z-index: 12;
  width: min(410px, calc(100vw - 56px));
  border: 1px solid rgba(255, 225, 0, 0.16);
  background: rgba(7, 11, 17, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  color: #f7f9f4;
  padding: 14px;
  backdrop-filter: blur(14px);
}

.camera-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.camera-panel-head span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
}

.camera-panel-head strong {
  display: block;
  margin-top: 5px;
  color: #f7f9f4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.camera-panel-head button {
  min-width: 64px;
  height: 30px;
  border: 1px solid rgba(255, 225, 0, 0.28);
  background: #05070b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.camera-panel-head button.is-copied {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
  color: #000;
}

.camera-grid {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 7px 12px;
  padding-top: 12px;
}

.camera-grid span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.5;
}

.camera-grid code,
.camera-preset-text {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
}

.camera-preset-text {
  display: block;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  overflow: hidden;
  padding-top: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 12;
  min-width: 118px;
  background: rgba(5, 7, 11, 0.92);
  color: var(--brand-yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 11px 14px;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s var(--ease);
}

.status-pill.is-muted {
  opacity: 0;
  visibility: hidden;
}

.load-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--line);
  background: rgba(7, 11, 17, 0.88);
  box-shadow: var(--shadow-panel);
  color: #f7f9f4;
  padding: 22px;
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  transition:
    opacity 0.5s var(--ease),
    visibility 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.load-panel span {
  display: block;
  color: #f7f9f4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
  text-transform: uppercase;
}

.load-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -48%);
}

.load-bar {
  height: 5px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.load-bar i {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--brand-yellow);
  transform-origin: left center;
  transition: width 0.18s ease;
}

@media (max-width: 1100px) {
  .topbar {
    left: 24px;
    right: 24px;
    grid-template-columns: 1fr auto;
  }

  h1 {
    font-size: 68px;
  }

  .subtitle {
    display: none;
  }

  .control-hint {
    position: static;
    width: min(460px, 100%);
    margin-top: 18px;
  }

  .area-rail {
    left: 24px;
    width: 154px;
  }

  .camera-panel {
    left: 24px;
    bottom: 24px;
    width: min(360px, calc(100vw - 48px));
  }

  .detail-panel {
    right: 24px;
    bottom: 24px;
    width: min(400px, calc(100vw - 48px));
    max-height: min(600px, calc(100vh - 136px));
  }
}

@media (max-width: 820px) {
  .campus-shell {
    min-height: 680px;
  }

  .topbar {
    left: 18px;
    right: 18px;
    top: 18px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topbar-actions {
    justify-content: start;
  }

  .camera-panel {
    display: none;
  }

  h1 {
    font-size: 56px;
  }

  .control-hint {
    gap: 8px 10px;
    padding: 11px 13px;
  }

  .control-hint small {
    padding-top: 9px;
  }

  .action-button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 11px;
    letter-spacing: 0.07em;
  }

  .area-rail {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: auto;
    gap: 6px;
    transform: none;
  }

  .area-button {
    grid-template-columns: 1fr;
    min-height: 56px;
    justify-items: center;
    gap: 6px;
    padding: 8px 4px;
    text-align: center;
  }

  .area-button:hover,
  .area-button.active {
    transform: translateY(-2px);
  }

  .area-button::before {
    inset: auto -1px -1px -1px;
    width: auto;
    height: 0;
  }

  .area-button.active::before {
    width: auto;
    height: 4px;
  }

  .area-button strong {
    width: 100%;
    font-size: 10px;
  }

  .detail-panel {
    left: 18px;
    right: 18px;
    bottom: 86px;
    width: auto;
    max-height: 42vh;
    padding: 20px;
  }

  .panel-heading {
    grid-template-columns: 54px 1fr;
  }

  .area-index {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }

  .panel-heading h2 {
    font-size: 26px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .status-pill {
    display: none;
  }
}

@media (max-width: 640px) {
  .campus-shell {
    min-height: 620px;
  }

  h1 {
    max-width: 280px;
    font-size: 42px;
  }

  .eyebrow {
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.22em;
  }

  .eyebrow::before {
    width: 22px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .control-hint {
    display: none;
  }

  .detail-panel {
    left: 12px;
    right: 12px;
    bottom: 82px;
    max-height: 40vh;
    padding: 18px;
  }

  .focus-box {
    padding: 18px;
  }

  .focus-box h3 {
    font-size: 23px;
  }

  .area-rail {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 5px;
  }

  .area-button span {
    width: 26px;
    height: 26px;
  }

  .hotspot-label {
    width: 46px;
    height: 78px;
  }

  .hotspot-label::before {
    top: 35px;
    height: 43px;
    border-left-width: 1.5px;
  }

  .hotspot-label::after {
    width: 6px;
    height: 6px;
  }

  .hotspot-tag {
    height: 34px;
  }

  .hotspot-tag i {
    width: 34px;
    min-width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .hotspot-label:hover .hotspot-tag,
  .hotspot-label.active .hotspot-tag {
    padding-right: 10px;
  }

  .hotspot-tag b {
    display: none;
  }
}

/* ============================================================
   1080p / compact desktop  (≈1920×1080 and shorter screens)
   The base desktop layout above is sized for 2K (2560×1440); on a
   1080p screen it looks oversized. These overrides scale the whole
   UI to ~0.72–0.78×. Guarded by min-width:1101px so the tablet /
   phone blocks (≤1100 / ≤820 / ≤640) are never affected, and so
   true 2K/4K screens keep the large layout.
   ============================================================ */
@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .topbar {
    left: clamp(24px, 3vw, 40px);
    right: clamp(24px, 3vw, 40px);
    top: clamp(20px, 2.4vw, 30px);
    gap: 24px;
  }

  h1 {
    font-size: 60px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .subtitle {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  .control-hint {
    left: clamp(560px, 42vw, 720px);
    top: clamp(20px, 2.4vw, 30px);
    width: min(460px, calc(100vw - 680px));
    padding: 10px 13px;
  }

  .control-hint span {
    font-size: 10px;
  }

  .control-hint small {
    font-size: 11px;
    padding-top: 8px;
  }

  .action-button {
    min-height: 36px;
    padding: 0 15px;
    font-size: 12px;
  }

  .area-rail {
    width: 150px;
    gap: 7px;
  }

  .area-button {
    grid-template-columns: 32px 1fr;
    min-height: 44px;
    gap: 10px;
    padding: 0 10px;
  }

  .area-button span {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .area-button strong {
    font-size: 12px;
  }

  .detail-panel {
    right: clamp(24px, 3vw, 40px);
    bottom: clamp(22px, 2.6vw, 32px);
    width: min(384px, calc(100vw - 56px));
    max-height: min(560px, calc(100vh - 132px));
    padding: 20px;
  }

  .panel-heading {
    grid-template-columns: 52px 1fr;
    gap: 12px;
  }

  .area-index {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .panel-heading h2 {
    font-size: 26px;
  }

  .area-cn {
    font-size: 13px;
  }

  .area-description {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.65;
  }

  .metric-strip {
    margin-top: 18px;
    gap: 7px;
  }

  .metric-chip {
    min-height: 50px;
    padding: 10px 11px;
  }

  .metric-chip strong {
    font-size: 12px;
  }

  .metric-chip span {
    font-size: 10px;
  }

  .focus-box {
    margin-top: 18px;
    padding: 16px 18px 18px;
  }

  .focus-box h3 {
    font-size: 22px;
  }

  .focus-box p {
    font-size: 13px;
  }

  .program-list-wrap {
    margin-top: 18px;
  }

  .program-list {
    margin-top: 10px;
  }

  .program-list li {
    padding: 9px 0;
  }

  .program-list strong {
    font-size: 13px;
  }

  .program-list span {
    font-size: 11px;
  }

  .hotspot-label {
    width: 58px;
    height: 106px;
  }

  .hotspot-label::before {
    top: 43px;
    height: 63px;
  }

  .hotspot-label::after {
    width: 7px;
    height: 7px;
  }

  .hotspot-tag {
    height: 36px;
  }

  .hotspot-tag i {
    width: 42px;
    min-width: 42px;
    height: 36px;
    font-size: 15px;
  }

  .hotspot-label:hover .hotspot-tag,
  .hotspot-label.active .hotspot-tag {
    padding-right: 11px;
  }

  .hotspot-tag b {
    font-size: 10px;
  }

  .status-pill {
    bottom: 18px;
    font-size: 10px;
    padding: 9px 12px;
  }
}

/* Remove the top instruction strip so the sky stays open. */
.topbar::before,
.control-hint {
  display: none !important;
}

.topbar {
  pointer-events: none;
}

.title-block,
.topbar-actions {
  pointer-events: auto;
}

.topbar-actions {
  position: fixed !important;
  top: clamp(16px, 2.2vw, 28px) !important;
  right: clamp(16px, 2.2vw, 34px) !important;
  grid-column: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Building selector now lives inside the left application rail on desktop. */
@media (min-width: 1101px) {
  .app-rail .area-rail--sidebar {
    position: static;
    inset: auto;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 12px 9px;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    backdrop-filter: none;
  }

  .area-rail--mobile {
    display: none;
  }

  .app-rail .area-button {
    width: 100%;
    min-height: 62px;
    display: grid;
    grid-template-columns: 24px 20px 1fr;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
      rgba(8, 12, 18, 0.64);
    color: rgba(238, 244, 243, 0.72);
    box-shadow: none;
    text-align: left;
    transform: none;
    backdrop-filter: blur(12px);
  }

  .app-rail .area-button::before {
    inset: 0 auto 0 0;
    width: 0;
    border-radius: 14px 0 0 14px;
    background: var(--brand-yellow);
  }

  .app-rail .area-button span {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    background: #05070a;
    color: var(--brand-yellow);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .app-rail .area-button svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
  }

  .app-rail .area-button strong {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-rail .area-button:hover,
  .app-rail .area-button.active {
    border-color: rgba(255, 225, 0, 0.5);
    background:
      linear-gradient(90deg, rgba(255, 225, 0, 0.16), rgba(255, 255, 255, 0.035)),
      rgba(9, 14, 20, 0.8);
    box-shadow:
      0 12px 30px rgba(255, 225, 0, 0.09),
      inset 0 0 0 1px rgba(255, 225, 0, 0.08);
    color: #fff;
    transform: none;
  }

  .app-rail .area-button.active::before {
    width: 4px;
  }

  .app-rail .area-button.active span {
    background: var(--brand-yellow);
    color: #000;
  }
}

/* Final responsive UI sizing pass.
   2K keeps the fuller dashboard scale; 1080p gets tighter panels and controls. */
@media (min-width: 1101px) {
  .control-hint {
    position: fixed;
    left: 50%;
    top: 54px;
    z-index: 14;
    width: auto;
    max-width: min(820px, calc(100vw - 760px));
    min-height: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .control-hint span {
    display: inline-flex;
    align-items: center;
    color: rgba(248, 251, 247, 0.9);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .control-hint span::before {
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 1px;
    background: var(--brand-yellow);
    box-shadow: 0 0 10px rgba(255, 225, 0, 0.42);
  }

  .control-hint small {
    display: none !important;
  }
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .app-rail {
    inset: 14px auto 14px 14px;
    width: 112px;
    border-radius: 16px;
  }

  .rail-brand {
    min-height: 76px;
    padding: 12px 10px 10px;
    grid-template-columns: 28px 1fr;
    column-gap: 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .brand-mark svg {
    width: 19px;
    height: 19px;
  }

  .rail-brand strong {
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .rail-brand span:not(.brand-mark) {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .app-rail .area-rail--sidebar {
    gap: 7px;
    padding: 9px 7px;
  }

  .app-rail .area-button {
    min-height: 70px;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 13px;
  }

  .app-rail .area-button svg {
    width: 17px;
    height: 17px;
  }

  .app-rail .area-button span {
    width: 23px;
    height: 19px;
    font-size: 9px;
  }

  .app-rail .area-button strong {
    max-width: 82px;
    font-size: 9px;
    line-height: 1.12;
  }

  .rail-mode {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 9px;
  }

  .topbar {
    left: 148px;
    right: 22px;
    top: 18px;
    grid-template-columns: minmax(260px, 380px) 1fr auto;
    gap: 20px;
  }

  .topbar::before {
    left: 134px;
    right: 14px;
    top: 14px;
    height: 62px;
    border-radius: 16px;
  }

  .title-block {
    max-width: 380px;
  }

  h1 {
    max-width: 380px;
    font-size: clamp(48px, 4vw, 62px);
    line-height: 0.96;
  }

  .subtitle {
    width: min(320px, 100%);
    font-size: 13px;
    line-height: 1.58;
  }

  .control-hint {
    top: 45px;
    max-width: min(620px, calc(100vw - 610px));
    gap: 14px;
  }

  .control-hint span {
    font-size: 9px;
    letter-spacing: 0.07em;
  }

  .control-hint span::before {
    width: 4px;
    height: 4px;
    margin-right: 7px;
  }

  .topbar-actions {
    padding: 5px;
    border-radius: 15px;
  }

  .action-button {
    min-width: 112px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .action-button.strong {
    min-width: 124px;
  }

  .detail-panel {
    top: 104px;
    right: 22px;
    width: min(360px, calc(100vw - 44px));
    max-height: calc(100vh - 128px);
    padding: 22px;
    border-radius: 15px;
  }

  .panel-heading {
    grid-template-columns: 50px 1fr;
    gap: 14px;
  }

  .area-index {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  #areaType {
    font-size: 9px;
    letter-spacing: 0.17em;
  }

  #areaTitle {
    font-size: 24px;
    line-height: 1.05;
  }

  #areaDescription {
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.65;
  }

  .metric-grid {
    gap: 8px;
    margin-top: 18px;
  }

  .metric-chip {
    min-height: 48px;
    padding: 10px 12px;
  }

  .focus-box {
    margin-top: 18px;
    padding: 18px;
  }

  .focus-box strong {
    font-size: 22px;
    line-height: 1.05;
  }

  .facility-list {
    margin-top: 16px;
  }

  .facility-list li {
    min-height: 36px;
    padding: 9px 0;
    font-size: 12px;
  }

  .camera-panel {
    left: 148px;
    bottom: 20px;
    width: 308px;
    padding: 14px;
    border-radius: 14px;
  }

  .camera-panel pre {
    font-size: 9px;
    line-height: 1.75;
  }

  .insight-cards {
    left: 430px;
    right: 386px;
    bottom: 106px;
    gap: 10px;
  }

  .insight-card {
    min-height: 128px;
    padding: 13px 14px;
    border-radius: 14px;
  }

  .insight-card h3 {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .utilization-layout {
    grid-template-columns: 82px 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .donut-chart {
    width: 80px;
    height: 80px;
  }

  .donut-chart span {
    font-size: 21px;
  }

  .donut-chart small {
    font-size: 7px;
  }

  .utilization-legend {
    gap: 7px;
  }

  .utilization-legend dt,
  .utilization-legend dd {
    font-size: 10px;
  }

  .chart-value {
    margin-top: 14px;
    font-size: 24px;
  }

  .line-chart,
  .bar-chart {
    bottom: 13px;
    height: 50px;
  }

  .bar-chart {
    gap: 7px;
  }

  .campus-stats {
    left: 430px;
    right: 386px;
    bottom: 20px;
    min-height: 70px;
    border-radius: 14px;
  }

  .stat-card {
    grid-template-columns: 22px 1fr;
    gap: 3px 9px;
    padding: 11px 13px;
  }

  .stat-card svg {
    width: 19px;
    height: 19px;
  }

  .stat-card span {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .stat-card strong {
    font-size: 18px;
  }
}

/* Final override: place the two data cards in the upper right open area. */
@media (min-width: 1101px) {
  .insight-cards {
    position: fixed;
    top: clamp(108px, 11vh, 138px);
    right: clamp(372px, 18vw, 430px);
    bottom: auto;
    left: auto;
    width: clamp(560px, 31vw, 690px);
    height: 132px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    z-index: 18;
  }

  .insight-card {
    min-height: 0;
    height: 132px;
    padding: 15px 16px;
  }

  .chart-value {
    margin-top: 16px;
    font-size: clamp(24px, 1.55vw, 31px);
  }

  .line-chart,
  .bar-chart {
    height: 48px;
    bottom: 14px;
  }

  .bar-chart {
    gap: 7px;
  }
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .insight-cards {
    top: 96px;
    right: 390px;
    left: 560px;
    width: auto;
  }
}

/* 20260623 - move the two dashboard charts into the upper open area. */
.insight-cards {
  top: clamp(104px, 11vh, 136px);
  right: clamp(360px, 18vw, 430px);
  bottom: auto;
  left: auto;
  width: clamp(560px, 31vw, 690px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.insight-card {
  min-height: 132px;
  padding: 15px 16px;
}

.chart-value {
  margin-top: 18px;
  font-size: clamp(24px, 1.65vw, 34px);
}

.line-chart,
.bar-chart {
  height: 50px;
  bottom: 14px;
}

.bar-chart {
  gap: 7px;
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .insight-cards {
    top: 98px;
    right: 310px;
    left: 430px;
    width: auto;
  }
}

@media (max-width: 1100px) {
  .insight-cards {
    display: none;
  }
}

/* 20260623 - data cleanup and quieter yellow usage. */
.insight-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card h3,
.stat-card span {
  font-family: var(--font-display);
}

.insight-card {
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 225, 0, 0.055), transparent 34%),
    linear-gradient(145deg, rgba(20, 26, 32, 0.9), rgba(5, 9, 13, 0.84));
}

.line-stroke,
.line-dots circle {
  stroke: rgba(255, 225, 0, 0.72);
}

.line-fill {
  fill: rgba(255, 225, 0, 0.1);
}

.bar-chart i {
  background: linear-gradient(180deg, rgba(255, 225, 0, 0.7), rgba(164, 130, 38, 0.58));
  box-shadow: 0 0 10px rgba(255, 225, 0, 0.08);
}

.bar-chart i.muted {
  background: linear-gradient(180deg, rgba(190, 198, 196, 0.62), rgba(74, 84, 88, 0.64));
}

.area-button:not(.active):not(.esg-button) {
  border-color: rgba(255, 255, 255, 0.105);
  box-shadow: none;
}

.area-button:not(.active):not(.esg-button) span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(3, 6, 9, 0.76);
  color: rgba(216, 226, 224, 0.74);
}

.area-button:not(.active):not(.esg-button) svg {
  stroke: rgba(218, 229, 229, 0.56);
}

.app-rail .area-button.active {
  border-color: rgba(255, 225, 0, 0.38);
  background:
    linear-gradient(90deg, rgba(255, 225, 0, 0.11), rgba(255, 255, 255, 0.028)),
    rgba(8, 12, 18, 0.84);
  box-shadow:
    inset 3px 0 0 var(--brand-yellow),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.app-rail .area-button.active span {
  background: var(--brand-yellow);
  color: #030303;
}

.hotspot-label:not(.active) {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.34));
}

.hotspot-label:not(.active) .hotspot-tag {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 18, 0.72);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hotspot-label:not(.active) .hotspot-tag i {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(3, 6, 10, 0.86);
  color: rgba(230, 236, 232, 0.7);
}

.hotspot-label:hover .hotspot-tag {
  border-color: rgba(255, 225, 0, 0.34);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(255, 225, 0, 0.08);
}

.hotspot-label:hover .hotspot-tag i {
  border-color: rgba(255, 225, 0, 0.62);
  color: rgba(255, 225, 0, 0.9);
}

.hotspot-label.active .hotspot-tag {
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.46),
    0 0 20px rgba(255, 225, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.detail-panel::after {
  opacity: 0.68;
}

.focus-box {
  border-left-width: 4px;
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .insight-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ESG clean-energy mode and Thailand identity refinements. */
.thai-identity {
  width: min(360px, 100%);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
}

.thai-chip {
  min-width: 118px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: rgba(247, 249, 244, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.thai-chip b {
  color: rgba(247, 249, 244, 0.88);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.thai-flag {
  width: 58px;
  height: 34px;
  display: block;
  border-radius: 3px;
  background:
    linear-gradient(
      180deg,
      #c91d2e 0 16.66%,
      #fff 16.66% 33.33%,
      #243a84 33.33% 66.66%,
      #fff 66.66% 83.33%,
      #c91d2e 83.33% 100%
    );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.thai-chip svg {
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 50%;
  background: rgba(255, 225, 0, 0.12);
  fill: none;
  stroke: var(--brand-yellow);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 0, 0.28),
    0 0 20px rgba(255, 225, 0, 0.1);
}

.app-rail .area-button.esg-button {
  margin-top: 18px;
  border-color: rgba(115, 255, 187, 0.2);
  background:
    radial-gradient(circle at 50% 18%, rgba(115, 255, 187, 0.12), transparent 48%),
    linear-gradient(135deg, rgba(255, 225, 0, 0.075), rgba(255, 255, 255, 0.022)),
    rgba(7, 13, 17, 0.72);
}

.app-rail .area-button.esg-button span {
  width: 38px;
  background: rgba(115, 255, 187, 0.14);
  color: #9dffd0;
}

.app-rail .area-button.esg-button svg {
  stroke: #9dffd0;
}

.app-rail .area-button.esg-button.active {
  border-color: rgba(115, 255, 187, 0.58);
  background:
    radial-gradient(circle at 50% 18%, rgba(115, 255, 187, 0.24), transparent 54%),
    linear-gradient(135deg, rgba(255, 225, 0, 0.18), rgba(115, 255, 187, 0.055)),
    rgba(6, 15, 18, 0.86);
  box-shadow:
    inset 4px 0 0 #9dffd0,
    0 16px 42px rgba(115, 255, 187, 0.12);
}

.app-rail .area-button.esg-button.active span {
  background: #9dffd0;
  color: #04100b;
}

.campus-shell.esg-mode .hotspot-label {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

.esg-hotspot-label {
  position: fixed;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 228px;
  padding: 11px 14px 11px 12px;
  border: 1px solid rgba(157, 255, 208, 0.4);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(157, 255, 208, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(5, 12, 15, 0.86);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(157, 255, 208, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #f8fff9;
  transform: translate(-50%, -100%);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
}

.esg-hotspot-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, rgba(157, 255, 208, 0.9), rgba(157, 255, 208, 0));
  transform: translateX(-50%);
  pointer-events: none;
}

.esg-hotspot-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #9dffd0;
  color: #04100b;
  box-shadow: 0 0 24px rgba(157, 255, 208, 0.3);
  flex: 0 0 auto;
}

.esg-hotspot-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.esg-hotspot-label strong,
.esg-hotspot-label small {
  display: block;
  white-space: nowrap;
}

.esg-hotspot-label strong {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.esg-hotspot-label small {
  margin-top: 3px;
  color: rgba(247, 249, 244, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.esg-hotspot-label.is-entering {
  animation: esgLabelPop 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes esgLabelPop {
  0% {
    transform: translate(-50%, -88%) scale(0.88);
  }
  72% {
    transform: translate(-50%, -102%) scale(1.04);
  }
  100% {
    transform: translate(-50%, -100%) scale(1);
  }
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .thai-identity {
    gap: 10px;
    margin-top: 14px;
  }

  .thai-chip {
    min-width: 104px;
    gap: 7px;
  }

  .thai-chip b {
    font-size: 11px;
  }

  .thai-flag {
    width: 50px;
    height: 29px;
  }

  .thai-chip svg {
    width: 30px;
    height: 30px;
  }

  .app-rail .area-button.esg-button {
    margin-top: 14px;
  }

  .esg-hotspot-label {
    min-width: 210px;
    padding: 10px 12px 10px 10px;
  }

  .esg-hotspot-label strong {
    font-size: 14px;
  }
}

/* Final top bar cleanup: keep instructions as text in the rail, not a floating card. */
@media (min-width: 1101px) {
  .control-hint {
    position: fixed;
    left: 50%;
    top: 44px;
    z-index: 14;
    width: auto;
    max-width: min(760px, calc(100vw - 760px));
    min-height: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .control-hint span {
    display: inline-flex;
    align-items: center;
    color: rgba(248, 251, 247, 0.9);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .control-hint span::before {
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 1px;
    background: var(--brand-yellow);
    box-shadow: 0 0 10px rgba(255, 225, 0, 0.42);
  }

  .control-hint small {
    display: none !important;
  }

  .topbar-actions {
    padding: 6px;
    gap: 0;
  }
}

@media (max-width: 1100px) {
  .control-hint small {
    display: none !important;
  }
}

/* Compact vertical building tabs: icon / building code / label. */
@media (min-width: 1101px) {
  .app-rail .area-button {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px 8px;
    text-align: center;
  }

  .app-rail .area-button svg {
    order: 1;
    width: 20px;
    height: 20px;
  }

  .app-rail .area-button span {
    order: 2;
    width: 26px;
    height: 22px;
    font-size: 10px;
  }

  .app-rail .area-button strong {
    order: 3;
    width: 100%;
    max-width: 92px;
    overflow: visible;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
  }
}

/* ============================================================
   Night digital-twin UI refresh
   Keeps the existing project font stack; this layer only updates
   composition, icon treatment, spacing, and panel styling.
   ============================================================ */
.app-rail,
.campus-stats {
  z-index: 13;
}

.app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 118px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(12, 18, 27, 0.9), rgba(4, 8, 12, 0.86)),
    radial-gradient(circle at 50% 0, rgba(255, 225, 0, 0.11), transparent 34%);
  box-shadow: 22px 0 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-rows: 86px 1fr 64px;
  pointer-events: auto;
}

.rail-brand {
  height: 86px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
}

.brand-mark {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 225, 0, 0.36);
  background: rgba(255, 225, 0, 0.08);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--brand-yellow);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.rail-brand strong {
  color: #f8faf5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.1;
}

.rail-brand span:not(.brand-mark) {
  color: rgba(238, 244, 243, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.rail-menu {
  padding: 22px 0;
}

.rail-item {
  width: 100%;
  height: 86px;
  display: grid;
  place-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(238, 244, 243, 0.58);
  text-transform: uppercase;
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.rail-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-item span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rail-item.active,
.rail-item:hover {
  color: var(--brand-yellow);
  background: linear-gradient(90deg, rgba(255, 225, 0, 0.12), transparent 72%);
  border-color: rgba(255, 225, 0, 0.22);
}

.rail-mode {
  margin: 0 16px 18px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  color: var(--brand-yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-mode i {
  width: 26px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.rail-mode i::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-yellow);
  box-shadow: 0 0 14px rgba(255, 225, 0, 0.65);
}

.topbar {
  left: 160px;
  right: 34px;
  top: 24px;
  grid-template-columns: minmax(300px, 460px) 1fr auto;
  gap: 28px;
}

.topbar::before {
  content: "";
  position: fixed;
  left: 118px;
  right: 0;
  top: 0;
  height: 78px;
  z-index: -1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.74), rgba(6, 10, 16, 0.1));
  backdrop-filter: blur(10px);
}

.title-block {
  max-width: 430px;
}

.eyebrow {
  color: var(--brand-yellow);
}

h1 {
  max-width: 430px;
  font-size: clamp(52px, 4.4vw, 74px);
  line-height: 0.96;
}

.subtitle {
  width: min(370px, 100%);
  font-size: 15px;
  line-height: 1.75;
}

.control-hint {
  left: 50%;
  top: 18px;
  width: min(530px, 33vw);
  min-height: 54px;
  transform: translateX(-50%);
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(7, 11, 17, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

.topbar-actions {
  grid-column: 3;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 17, 0.72);
  backdrop-filter: blur(14px);
}

.action-button {
  gap: 9px;
  min-width: 118px;
  min-height: 40px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  box-shadow: none;
}

.action-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button.strong {
  min-width: 132px;
  color: #05080d;
  background: var(--brand-yellow);
}

.area-rail {
  left: 160px;
  top: 58%;
  bottom: auto;
  width: 170px;
  transform: translateY(-50%);
  gap: 8px;
}

.area-button {
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(8, 12, 18, 0.72);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
}

.area-button.active {
  border-color: rgba(255, 225, 0, 0.4);
  box-shadow: 0 18px 44px rgba(255, 225, 0, 0.08);
}

.detail-panel {
  top: 122px;
  right: 34px;
  bottom: auto;
  width: min(410px, calc(100vw - 56px));
  max-height: calc(100vh - 164px);
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 44%),
    rgba(6, 10, 16, 0.82);
  box-shadow: -18px 24px 68px rgba(0, 0, 0, 0.42);
}

.detail-panel::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 4px;
  background: linear-gradient(180deg, rgba(255, 225, 0, 0), var(--brand-yellow), rgba(255, 225, 0, 0));
  pointer-events: none;
}

.panel-heading {
  grid-template-columns: 58px 1fr;
}

.area-index {
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 225, 0, 0.25);
}

.panel-heading h2 {
  font-size: 28px;
}

.area-type,
.list-title,
.focus-box span,
.camera-panel-head span,
.stat-card span {
  letter-spacing: 0.22em;
}

.metric-chip,
.program-list li {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
}

.focus-box {
  border-radius: 4px;
}

.camera-panel {
  left: 160px;
  bottom: 30px;
  width: 380px;
  border-radius: 8px;
  background: rgba(6, 10, 16, 0.78);
  backdrop-filter: blur(14px);
}

.campus-stats {
  position: fixed;
  left: min(560px, 33vw);
  right: min(470px, 26vw);
  bottom: 34px;
  min-height: 102px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(7, 11, 17, 0.72);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  overflow: hidden;
  pointer-events: auto;
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-content: center;
  padding: 18px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card svg {
  grid-row: 1 / 3;
  align-self: center;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--brand-yellow);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}

.stat-card span {
  color: rgba(238, 244, 243, 0.54);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.stat-card strong {
  color: #f8faf5;
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-card.status-ok strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stat-card.status-ok strong i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #32dc6a;
  box-shadow: 0 0 12px rgba(50, 220, 106, 0.62);
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .app-rail {
    width: 118px;
  }

  .topbar {
    left: 150px;
    right: 28px;
    top: 20px;
  }

  .topbar::before {
    left: 118px;
    height: 76px;
  }

  .control-hint {
    top: 20px;
    width: min(430px, 32vw);
  }

  .area-rail {
    left: 150px;
    top: 58%;
    bottom: auto;
    width: 164px;
  }

  .detail-panel {
    right: 28px;
    top: 112px;
    width: min(404px, calc(100vw - 56px));
    max-height: calc(100vh - 144px);
  }

  .camera-panel {
    left: 150px;
    bottom: 28px;
    width: 342px;
  }

  .campus-stats {
    left: 500px;
    right: 456px;
    bottom: 30px;
    min-height: 88px;
  }

  .stat-card {
    padding: 14px 16px;
  }
}

@media (max-width: 1100px) {
  .app-rail {
    display: none;
  }

  .campus-stats {
    display: none;
  }
}

/* Dashboard chart cards - stronger visual refresh */
.insight-cards {
  position: fixed;
  left: 520px;
  right: 456px;
  bottom: 126px;
  z-index: 14;
  display: grid;
  grid-template-columns: 1.16fr 1fr 1fr;
  gap: 16px;
  pointer-events: auto;
}

.insight-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015) 44%, rgba(0, 0, 0, 0.18)),
    rgba(6, 10, 16, 0.86);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 18px 20px;
}

.insight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  opacity: 0.32;
}

.insight-card h3 {
  position: relative;
  z-index: 1;
  color: #f8faf5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.utilization-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
}

.donut-chart {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 12, 18, 0.96) 0 42%, transparent 43%),
    conic-gradient(var(--brand-yellow) 0 78%, rgba(255, 255, 255, 0.28) 78% 92%, rgba(255, 255, 255, 0.1) 92% 100%);
  box-shadow:
    0 0 34px rgba(255, 225, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.donut-chart span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 31px;
  font-weight: 900;
  line-height: 0.9;
}

.donut-chart small {
  margin-top: 6px;
  color: rgba(238, 244, 243, 0.68);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
}

.utilization-legend {
  display: grid;
  gap: 13px;
  margin: 0;
}

.utilization-legend div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.utilization-legend dt,
.utilization-legend dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.utilization-legend dt {
  color: rgba(238, 244, 243, 0.82);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.utilization-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.utilization-legend div:first-child i {
  background: var(--brand-yellow);
  box-shadow: 0 0 12px rgba(255, 225, 0, 0.56);
}

.utilization-legend dd {
  color: #fff;
}

.card-headline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.trend {
  display: grid;
  gap: 2px;
  color: #38e06b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.trend small {
  color: rgba(238, 244, 243, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.chart-value {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  color: #fff;
  font-size: 31px;
  font-weight: 500;
  line-height: 1;
}

.chart-value small {
  font-size: 12px;
  font-weight: 900;
}

.chart-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 7px;
  color: rgba(238, 244, 243, 0.76);
  font-size: 12px;
  font-weight: 700;
}

.line-chart {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  width: calc(100% - 36px);
  height: 74px;
}

.line-fill {
  fill: rgba(255, 225, 0, 0.08);
}

.line-stroke {
  fill: none;
  stroke: var(--brand-yellow);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-dots circle {
  fill: var(--brand-yellow);
  filter: drop-shadow(0 0 5px rgba(255, 225, 0, 0.68));
}

.bar-chart {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 19px;
  z-index: 1;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
  align-items: end;
}

.bar-chart i {
  display: block;
  min-height: 14px;
  background: linear-gradient(180deg, #ffe100, #dba800);
  box-shadow: 0 0 18px rgba(255, 225, 0, 0.16);
}

.bar-chart i.muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.22));
  box-shadow: none;
}

.campus-stats {
  min-height: 72px;
  opacity: 0.96;
}

.campus-stats .stat-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .insight-cards {
    left: 500px;
    right: 456px;
    bottom: 116px;
    gap: 14px;
  }

  .insight-card {
    min-height: 146px;
    padding: 15px 16px;
  }

  .insight-card h3 {
    font-size: 10px;
  }

  .utilization-layout {
    grid-template-columns: 96px 1fr;
    gap: 14px;
    margin-top: 15px;
  }

  .donut-chart {
    width: 94px;
    height: 94px;
  }

  .donut-chart span {
    font-size: 24px;
  }

  .donut-chart small {
    font-size: 8px;
  }

  .utilization-legend {
    gap: 9px;
  }

  .utilization-legend dt,
  .utilization-legend dd {
    font-size: 11px;
  }

  .chart-value {
    margin-top: 17px;
    font-size: 26px;
  }

  .line-chart {
    bottom: 14px;
    height: 58px;
  }

  .bar-chart {
    bottom: 15px;
    height: 58px;
    gap: 8px;
  }
}

@media (max-width: 1100px) {
  .insight-cards {
    display: none;
  }
}

/* Rounded translucent dashboard pass */
@media (min-width: 1101px) {
  .app-rail {
    inset: 18px auto 18px 18px;
    width: 132px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background:
      radial-gradient(circle at 50% 8%, rgba(255, 225, 0, 0.11), transparent 34%),
      linear-gradient(180deg, rgba(13, 18, 26, 0.82), rgba(5, 8, 13, 0.68));
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(22px) saturate(1.16);
  }

  .rail-brand {
    height: auto;
    min-height: 86px;
    padding: 16px 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent),
      rgba(255, 255, 255, 0.02);
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 225, 0, 0.08);
    box-shadow: 0 0 26px rgba(255, 225, 0, 0.18);
  }

  .rail-brand strong {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .rail-brand span:not(.brand-mark) {
    max-width: 88px;
    margin-inline: auto;
    color: rgba(238, 244, 243, 0.68);
    font-size: 8px;
    letter-spacing: 0.14em;
    line-height: 1.35;
  }

  .rail-menu {
    padding: 12px 10px;
    gap: 8px;
  }

  .rail-item {
    height: 68px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(238, 244, 243, 0.58);
    background: rgba(255, 255, 255, 0.025);
  }

  .rail-item svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.62;
  }

  .rail-item span {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .rail-item.active,
  .rail-item:hover {
    color: var(--brand-yellow);
    border-color: rgba(255, 225, 0, 0.36);
    background:
      radial-gradient(circle at 50% 24%, rgba(255, 225, 0, 0.2), transparent 46%),
      rgba(255, 225, 0, 0.08);
    box-shadow:
      inset 3px 0 0 var(--brand-yellow),
      0 16px 36px rgba(255, 225, 0, 0.08);
  }

  .rail-mode {
    left: 13px;
    right: 13px;
    bottom: 14px;
    border-radius: 13px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
      rgba(2, 5, 9, 0.56);
  }

  .topbar {
    left: 178px;
    right: 34px;
    top: 28px;
    grid-template-columns: minmax(300px, 430px) 1fr auto;
  }

  .topbar::before {
    left: 168px;
    right: 20px;
    top: 18px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.015)),
      rgba(5, 8, 13, 0.54);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }

  .control-hint,
  .topbar-actions,
  .detail-panel,
  .camera-panel,
  .campus-stats,
  .insight-card,
  .area-button {
    border-radius: 16px;
  }

  .control-hint {
    top: 4px;
    width: min(500px, 34vw);
    border-color: rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
      rgba(7, 11, 17, 0.7);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
  }

  .topbar-actions {
    padding: 6px;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
      rgba(7, 11, 17, 0.72);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .action-button {
    min-height: 42px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
  }

  .action-button + .action-button {
    border-left-color: rgba(255, 255, 255, 0.09);
  }

  .action-button.strong {
    border-radius: 11px;
    box-shadow: 0 0 22px rgba(255, 225, 0, 0.18);
  }

  .area-rail {
    left: 178px;
    width: 172px;
    gap: 9px;
  }

  .area-button {
    min-height: 54px;
    border-color: rgba(255, 255, 255, 0.12);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.028)),
      rgba(8, 12, 18, 0.68);
    box-shadow:
      0 14px 32px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
  }

  .area-button.active {
    border-color: rgba(255, 225, 0, 0.48);
    background:
      linear-gradient(135deg, rgba(255, 225, 0, 0.2), rgba(255, 255, 255, 0.045)),
      rgba(8, 12, 18, 0.82);
    box-shadow:
      inset 4px 0 0 var(--brand-yellow),
      0 20px 48px rgba(255, 225, 0, 0.12);
  }

  .detail-panel {
    right: 36px;
    top: 124px;
    border-color: rgba(255, 255, 255, 0.15);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 42%, rgba(0, 0, 0, 0.11)),
      rgba(6, 11, 17, 0.74);
    box-shadow:
      0 30px 90px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(24px) saturate(1.12);
  }

  .detail-panel::after {
    right: 0;
    width: 5px;
    border-radius: 999px;
  }

  .metric-chip,
  .facility-list li,
  .focus-box,
  .camera-panel,
  .campus-stats,
  .insight-card {
    border-radius: 14px;
  }

  .focus-box {
    background:
      linear-gradient(135deg, rgba(255, 225, 0, 0.12), rgba(255, 255, 255, 0.02)),
      rgba(1, 3, 6, 0.84);
  }

  .camera-panel {
    left: 178px;
    border-color: rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
      rgba(6, 10, 16, 0.7);
    backdrop-filter: blur(20px);
  }

  .insight-cards {
    left: 574px;
    right: 456px;
    bottom: 126px;
    gap: 14px;
  }

  .insight-card {
    border-color: rgba(255, 255, 255, 0.16);
    background:
      radial-gradient(circle at 16% 0%, rgba(255, 225, 0, 0.13), transparent 36%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.025) 46%, rgba(0, 0, 0, 0.18)),
      rgba(5, 9, 15, 0.78);
    backdrop-filter: blur(22px);
  }

  .campus-stats {
    left: 574px;
    right: 456px;
    bottom: 30px;
    border-color: rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
      rgba(6, 10, 16, 0.72);
    backdrop-filter: blur(20px);
  }
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .app-rail {
    inset: 16px auto 16px 16px;
    width: 128px;
  }

  .rail-brand {
    min-height: 78px;
    padding: 13px 10px 12px;
  }

  .rail-menu {
    gap: 7px;
    padding: 10px 9px;
  }

  .rail-item {
    height: 62px;
  }

  .topbar {
    left: 168px;
    right: 28px;
    top: 22px;
  }

  .topbar::before {
    left: 158px;
    right: 16px;
    top: 16px;
    height: 68px;
  }

  .area-rail,
  .camera-panel {
    left: 168px;
  }

  .area-rail {
    width: 162px;
  }

  .detail-panel {
    right: 28px;
    top: 112px;
  }

  .insight-cards,
  .campus-stats {
    left: 510px;
    right: 456px;
  }
}

/* Final desktop sidebar layout: building icon, code, then readable label. */
@media (min-width: 1101px) {
  .app-rail .area-rail--sidebar {
    position: static;
    inset: auto;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 12px 9px;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    backdrop-filter: none;
  }

  .area-rail--mobile {
    display: none;
  }

  .app-rail .area-button {
    width: 100%;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
      rgba(8, 12, 18, 0.64);
    color: rgba(238, 244, 243, 0.72);
    box-shadow: none;
    text-align: center;
    transform: none;
    backdrop-filter: blur(12px);
  }

  .app-rail .area-button::before {
    inset: 0 auto 0 0;
    width: 0;
    border-radius: 14px 0 0 14px;
    background: var(--brand-yellow);
  }

  .app-rail .area-button svg {
    order: 1;
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
  }

  .app-rail .area-button span {
    order: 2;
    width: 26px;
    height: 22px;
    border-radius: 2px;
    background: #05070a;
    color: var(--brand-yellow);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .app-rail .area-button strong {
    order: 3;
    width: 100%;
    max-width: 96px;
    min-width: 0;
    overflow: visible;
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
  }

  .app-rail .area-button:hover,
  .app-rail .area-button.active {
    border-color: rgba(255, 225, 0, 0.5);
    background:
      linear-gradient(90deg, rgba(255, 225, 0, 0.16), rgba(255, 255, 255, 0.035)),
      rgba(9, 14, 20, 0.8);
    box-shadow:
      0 12px 30px rgba(255, 225, 0, 0.09),
      inset 0 0 0 1px rgba(255, 225, 0, 0.08);
    color: #fff;
    transform: none;
  }

  .app-rail .area-button.active::before {
    width: 4px;
  }

  .app-rail .area-button.active span {
    background: var(--brand-yellow);
    color: #000;
  }
}

/* Final responsive UI sizing pass.
   2K keeps the fuller dashboard scale; 1080p gets tighter panels and controls. */
@media (min-width: 1101px) {
  .control-hint {
    position: fixed;
    left: 50%;
    top: 54px;
    z-index: 14;
    width: auto;
    max-width: min(820px, calc(100vw - 760px));
    min-height: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .control-hint span {
    display: inline-flex;
    align-items: center;
    color: rgba(248, 251, 247, 0.9);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .control-hint span::before {
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 1px;
    background: var(--brand-yellow);
    box-shadow: 0 0 10px rgba(255, 225, 0, 0.42);
  }

  .control-hint small {
    display: none !important;
  }
}

@media (min-width: 1101px) and (max-width: 1920px),
       (min-width: 1101px) and (max-height: 1120px) {
  .app-rail {
    inset: 14px auto 14px 14px;
    width: 112px;
    border-radius: 16px;
  }

  .rail-brand {
    min-height: 76px;
    padding: 12px 10px 10px;
    grid-template-columns: 28px 1fr;
    column-gap: 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .brand-mark svg {
    width: 19px;
    height: 19px;
  }

  .rail-brand strong {
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .rail-brand span:not(.brand-mark) {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .app-rail .area-rail--sidebar {
    gap: 7px;
    padding: 9px 7px;
  }

  .app-rail .area-button {
    min-height: 70px;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 13px;
  }

  .app-rail .area-button svg {
    width: 17px;
    height: 17px;
  }

  .app-rail .area-button span {
    width: 23px;
    height: 19px;
    font-size: 9px;
  }

  .app-rail .area-button strong {
    max-width: 82px;
    font-size: 9px;
    line-height: 1.12;
  }

  .rail-mode {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 9px;
  }

  .topbar {
    left: 148px;
    right: 22px;
    top: 18px;
    grid-template-columns: minmax(260px, 380px) 1fr auto;
    gap: 20px;
  }

  .topbar::before {
    left: 134px;
    right: 14px;
    top: 14px;
    height: 62px;
    border-radius: 16px;
  }

  .title-block {
    max-width: 380px;
  }

  h1 {
    max-width: 380px;
    font-size: clamp(48px, 4vw, 62px);
    line-height: 0.96;
  }

  .subtitle {
    width: min(320px, 100%);
    font-size: 13px;
    line-height: 1.58;
  }

  .control-hint {
    top: 45px;
    max-width: min(620px, calc(100vw - 610px));
    gap: 14px;
  }

  .control-hint span {
    font-size: 9px;
    letter-spacing: 0.07em;
  }

  .control-hint span::before {
    width: 4px;
    height: 4px;
    margin-right: 7px;
  }

  .topbar-actions {
    padding: 5px;
    border-radius: 15px;
  }

  .action-button {
    min-width: 112px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .action-button.strong {
    min-width: 124px;
  }

  .detail-panel {
    top: 104px;
    right: 22px;
    width: min(360px, calc(100vw - 44px));
    max-height: calc(100vh - 128px);
    padding: 22px;
    border-radius: 15px;
  }

  .panel-heading {
    grid-template-columns: 50px 1fr;
    gap: 14px;
  }

  .area-index {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  #areaType {
    font-size: 9px;
    letter-spacing: 0.17em;
  }

  #areaTitle {
    font-size: 24px;
    line-height: 1.05;
  }

  #areaDescription {
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.65;
  }

  .metric-grid {
    gap: 8px;
    margin-top: 18px;
  }

  .metric-chip {
    min-height: 48px;
    padding: 10px 12px;
  }

  .focus-box {
    margin-top: 18px;
    padding: 18px;
  }

  .focus-box strong {
    font-size: 22px;
    line-height: 1.05;
  }

  .facility-list {
    margin-top: 16px;
  }

  .facility-list li {
    min-height: 36px;
    padding: 9px 0;
    font-size: 12px;
  }

  .camera-panel {
    left: 148px;
    bottom: 20px;
    width: 308px;
    padding: 14px;
    border-radius: 14px;
  }

  .camera-panel pre {
    font-size: 9px;
    line-height: 1.75;
  }

  .insight-cards {
    left: 430px;
    right: 386px;
    bottom: 106px;
    gap: 10px;
  }

  .insight-card {
    min-height: 128px;
    padding: 13px 14px;
    border-radius: 14px;
  }

  .insight-card h3 {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .utilization-layout {
    grid-template-columns: 82px 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .donut-chart {
    width: 80px;
    height: 80px;
  }

  .donut-chart span {
    font-size: 21px;
  }

  .donut-chart small {
    font-size: 7px;
  }

  .utilization-legend {
    gap: 7px;
  }

  .utilization-legend dt,
  .utilization-legend dd {
    font-size: 10px;
  }

  .chart-value {
    margin-top: 14px;
    font-size: 24px;
  }

  .line-chart,
  .bar-chart {
    bottom: 13px;
    height: 50px;
  }

  .bar-chart {
    gap: 7px;
  }

  .campus-stats {
    left: 430px;
    right: 386px;
    bottom: 20px;
    min-height: 70px;
    border-radius: 14px;
  }

  .stat-card {
    grid-template-columns: 22px 1fr;
    gap: 3px 9px;
    padding: 11px 13px;
  }

  .stat-card svg {
    width: 19px;
    height: 19px;
  }

  .stat-card span {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .stat-card strong {
    font-size: 18px;
  }
}
/* Final override at EOF: top placement for the two data chart cards. */
@media (min-width: 1101px) {
  .insight-cards {
    position: fixed;
    top: clamp(108px, 11vh, 138px);
    right: clamp(372px, 18vw, 430px);
    bottom: auto;
    left: auto;
    width: clamp(560px, 31vw, 690px);
    height: 132px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    z-index: 18;
  }

  .insight-card {
    min-height: 0;
    height: 132px;
    padding: 15px 16px;
  }

  .chart-value {
    margin-top: 16px;
    font-size: clamp(24px, 1.55vw, 31px);
  }

  .line-chart,
  .bar-chart {
    height: 48px;
    bottom: 14px;
  }

  .bar-chart {
    gap: 7px;
  }
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .insight-cards {
    top: 96px;
    right: 390px;
    left: 560px;
    width: auto;
  }

  .insight-card {
    padding: 14px 14px;
  }

  .insight-card h3 {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .chart-value {
    margin-top: 14px;
    font-size: 24px;
  }

  .line-chart,
  .bar-chart {
    height: 42px;
    bottom: 14px;
  }

  .bar-chart {
    gap: 6px;
  }
}

/* Align the top metric cards with the right detail panel and leave a clear gutter. */
@media (min-width: 1101px) {
  .insight-cards {
    top: 124px;
    right: 500px;
    left: auto;
    width: clamp(590px, 32vw, 700px);
  }
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .insight-cards {
    top: 112px;
    right: 480px;
    left: auto;
    width: clamp(560px, 37vw, 640px);
  }
}

/* Final UI override: remove the center guide strip after all responsive rules. */
.topbar::before,
.control-hint {
  display: none !important;
}

.topbar {
  pointer-events: none;
}

.title-block,
.topbar-actions {
  pointer-events: auto;
}

.topbar-actions {
  position: fixed !important;
  top: clamp(16px, 2.2vw, 28px) !important;
  right: clamp(16px, 2.2vw, 34px) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 24 !important;
  grid-column: auto !important;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Final UI adjustments requested on the 3D dashboard. */
@media (min-width: 1101px) {
  .action-button.strong svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.25;
  }

  .output-card .chart-value {
    position: absolute;
    top: 16px;
    right: 24px;
    margin-top: 0;
    text-align: right;
  }

  .output-card .chart-label {
    position: absolute;
    top: 48px;
    right: 24px;
    margin-top: 0;
    text-align: right;
  }

  .output-card .bar-chart {
    right: 18px;
    left: 18px;
    bottom: 13px;
    height: 40px;
  }
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .output-card .chart-value {
    top: 14px;
    right: 18px;
  }

  .output-card .chart-label {
    top: 44px;
    right: 18px;
  }

  .output-card .bar-chart {
    height: 36px;
  }
}

/* Operation guide restored at the top center of the 3D page. */
@media (min-width: 1101px) {
  .control-hint {
    position: fixed !important;
    top: clamp(34px, 3.2vw, 58px) !important;
    left: 50% !important;
    z-index: 25 !important;
    display: flex !important;
    width: min(540px, 32vw) !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    padding: 0 18px !important;
    transform: translateX(-50%) !important;
    border: 1px solid rgba(255, 225, 0, 0.28) !important;
    border-radius: 999px !important;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
      rgba(6, 10, 16, 0.62) !important;
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
    backdrop-filter: blur(18px) saturate(1.15) !important;
    pointer-events: none !important;
  }

  .control-hint span {
    font-size: 10px !important;
    letter-spacing: 0.09em !important;
  }

  .control-hint small {
    display: none !important;
  }
}

@media (min-width: 1101px) and (max-width: 1600px) {
  .control-hint {
    width: min(500px, 31vw) !important;
    gap: 10px !important;
    padding: 0 14px !important;
  }

  .control-hint span {
    font-size: 9px !important;
  }
}
