:root {
  color-scheme: dark;
  --navy-950: #04101a;
  --navy-900: #071522;
  --navy-800: #0c2333;
  --ink: #122b3a;
  --muted: #69808d;
  --line: #cfe0e8;
  --paper: #f7fbfd;
  --white: #ffffff;
  --cyan: #19d3c5;
  --cyan-dark: #008f8c;
  --orange: #ffb84a;
  --pink: #ff597e;
  --shadow: 0 2rem 5rem rgb(0 12 22 / 0.25);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  /* Size units of the wayfinder column: 1vw / 1vh in landscape; rescaled for the portrait layout below. */
  --vw: 1vw;
  --vh: 1vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--navy-950);
}

button,
input,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.kiosk-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--navy-900);
}

.ad-zone {
  position: relative;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background: #0b2434;
}

.ad-zone--left {
  border-right: 1px solid rgb(255 255 255 / 0.11);
}

.ad-zone--right {
  border-left: 1px solid rgb(255 255 255 / 0.11);
}

.ad-media,
.ad-media > img,
.ad-media > video,
.ad-fallback {
  width: 100%;
  height: 100%;
}

.ad-media > img,
.ad-media > video {
  display: block;
  object-fit: cover;
  background: #071522;
  animation: mediaFade 600ms ease both;
}

.ad-zone__badge {
  position: absolute;
  right: clamp(0.7rem, calc(1.1 * var(--vw)), 2rem);
  bottom: clamp(0.8rem, calc(1.4 * var(--vh)), 2.4rem);
  z-index: 3;
  padding: 0.45em 0.75em;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 999px;
  color: rgb(255 255 255 / 0.8);
  background: rgb(3 16 26 / 0.36);
  backdrop-filter: blur(16px);
  font-size: clamp(0.55rem, calc(0.6 * var(--vw)), 1.3rem);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.ad-fallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.4rem, calc(2.2 * var(--vw)), 4.5rem);
  color: white;
  background:
    radial-gradient(circle at 78% 18%, rgb(255 255 255 / 0.22), transparent 25%),
    linear-gradient(155deg, var(--fallback-a), var(--fallback-b));
  animation: none;
}

.ad-fallback::before {
  position: absolute;
  inset: 7% 11% auto auto;
  width: 42%;
  aspect-ratio: 1;
  border: clamp(0.5rem, calc(0.8 * var(--vw)), 1.7rem) solid rgb(255 255 255 / 0.15);
  border-radius: 50%;
  content: "";
}

.ad-fallback small {
  margin-bottom: 0.8em;
  font-size: clamp(0.65rem, calc(0.8 * var(--vw)), 1.55rem);
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  opacity: 0.72;
}

.ad-fallback strong {
  max-width: 10ch;
  font-size: clamp(1.8rem, calc(3.1 * var(--vw)), 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.ad-fallback p {
  max-width: 18ch;
  margin: 1em 0 calc(6 * var(--vh));
  font-size: clamp(0.8rem, calc(1 * var(--vw)), 2rem);
  line-height: 1.45;
  opacity: 0.76;
}

.wayfinder {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: clamp(1rem, calc(1.2 * var(--vw)), 2.6rem) clamp(1rem, calc(1.6 * var(--vw)), 3.4rem) clamp(1rem, calc(1.4 * var(--vw)), 3rem);
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgb(25 211 197 / 0.13), transparent 34%),
    #edf5f8;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(3.5rem, calc(5.5 * var(--vh)), 8rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, calc(1 * var(--vw)), 1.7rem);
}

.brand__mark {
  display: grid;
  width: clamp(2.4rem, calc(3 * var(--vw)), 5.8rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 28%;
  color: #05232e;
  background: var(--cyan);
  box-shadow: 0 0.9rem 2rem rgb(0 143 140 / 0.24);
  font-size: clamp(1.2rem, calc(1.6 * var(--vw)), 3rem);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(0.95rem, calc(1.15 * var(--vw)), 2.3rem);
}

.brand small {
  margin-top: 0.2em;
  color: var(--muted);
  font-size: clamp(0.62rem, calc(0.65 * var(--vw)), 1.3rem);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: clamp(0.75rem, calc(0.82 * var(--vw)), 1.5rem);
  font-weight: 800;
}

.icon-button {
  display: grid;
  width: clamp(2.5rem, calc(2.7 * var(--vw)), 5rem);
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgb(255 255 255 / 0.76);
  box-shadow: 0 0.5rem 1.5rem rgb(24 55 72 / 0.1);
  cursor: pointer;
}

.icon-button--dark {
  color: white;
  background: rgb(255 255 255 / 0.1);
}

.language-button {
  min-height: clamp(2.5rem, calc(2.7 * var(--vw)), 5rem);
  padding: 0 clamp(0.85rem, calc(1 * var(--vw)), 1.8rem);
  border: 1px solid rgb(0 143 140 / 0.2);
  border-radius: 999px;
  color: #075d61;
  background: rgb(255 255 255 / 0.78);
  box-shadow: 0 0.5rem 1.5rem rgb(24 55 72 / 0.08);
  font-weight: 900;
  cursor: pointer;
}

.wayfinder[dir="rtl"] {
  text-align: right;
}

.wayfinder[dir="rtl"] .map-stage,
.wayfinder[dir="rtl"] svg {
  direction: ltr;
}

.wayfinder[dir="rtl"] .search-box__icon {
  margin-right: 0;
  margin-left: 0.55em;
}

.search-panel {
  position: relative;
  z-index: 20;
  width: min(92%, 64rem);
  margin: clamp(0.7rem, calc(1 * var(--vh)), 1.7rem) auto clamp(0.8rem, calc(1.4 * var(--vh)), 2.2rem);
}

.search-panel > label {
  display: block;
  margin: 0 0 0.5em 0.25em;
  color: #274857;
  font-size: clamp(0.8rem, calc(0.8 * var(--vw)), 1.5rem);
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: clamp(3.7rem, calc(6 * var(--vh)), 7.2rem);
  padding: 0 clamp(0.8rem, calc(1 * var(--vw)), 1.8rem);
  border: 2px solid transparent;
  border-radius: clamp(1rem, calc(1.1 * var(--vw)), 2rem);
  background: white;
  box-shadow: 0 1.1rem 3rem rgb(26 70 89 / 0.14);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--cyan-dark);
  box-shadow: 0 1.1rem 3rem rgb(0 143 140 / 0.17);
}

.search-box__icon {
  margin-right: 0.55em;
  color: var(--cyan-dark);
  font-size: clamp(1.5rem, calc(1.8 * var(--vw)), 3.5rem);
  transform: rotate(-18deg);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(1rem, calc(1.2 * var(--vw)), 2.3rem);
  font-weight: 700;
}

.search-box input::placeholder {
  color: #8ca0aa;
  font-weight: 500;
}

.search-box button {
  width: 2.3em;
  height: 2.3em;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #edf4f6;
  font-size: clamp(1rem, calc(1.1 * var(--vw)), 2rem);
  cursor: pointer;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  left: 0;
  max-height: min(calc(42 * var(--vh)), 30rem);
  padding: 0.5rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.98);
  box-shadow: var(--shadow);
}

.search-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: clamp(0.8rem, calc(1 * var(--vh)), 1.3rem);
  border: 0;
  border-radius: 0.8rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result:active,
.search-result:hover {
  background: #eaf7f7;
}

.search-result__icon {
  display: grid;
  width: 2.7em;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 0.8em;
  color: #056e6c;
  background: #d8f5f1;
  font-size: clamp(0.8rem, calc(0.9 * var(--vw)), 1.6rem);
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  font-size: clamp(0.85rem, calc(0.9 * var(--vw)), 1.7rem);
}

.search-result small,
.search-result__floor {
  margin-top: 0.2em;
  color: var(--muted);
  font-size: clamp(0.65rem, calc(0.67 * var(--vw)), 1.2rem);
}

.map-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(151 185 200 / 0.45);
  border-radius: clamp(1.2rem, calc(1.5 * var(--vw)), 3rem);
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 1.8rem 4.5rem rgb(14 46 62 / 0.14);
  backdrop-filter: blur(18px);
}

.map-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.8rem, calc(1.15 * var(--vw)), 2rem) clamp(1rem, calc(1.4 * var(--vw)), 2.6rem) 0;
}

.eyebrow {
  color: var(--cyan-dark);
  font-size: clamp(0.56rem, calc(0.58 * var(--vw)), 1.1rem);
  font-weight: 900;
  letter-spacing: 0.18em;
}

.map-card__heading h1 {
  margin: 0.25em 0 0;
  font-size: clamp(1rem, calc(1.25 * var(--vw)), 2.5rem);
  letter-spacing: -0.025em;
}

.floor-switcher {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: #e7f0f3;
}

.stacked-view-badge {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.45em 0.85em 0.45em 0.5em;
  color: #496672;
  font-size: clamp(0.65rem, calc(0.68 * var(--vw)), 1.25rem);
  font-weight: 900;
  white-space: nowrap;
}

.stacked-view-badge i {
  display: grid;
  width: 2em;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--navy-800);
  font-style: normal;
}

.floor-button {
  min-width: clamp(2.5rem, calc(2.8 * var(--vw)), 5.5rem);
  min-height: clamp(2.4rem, calc(2.6 * var(--vw)), 5rem);
  border: 0;
  border-radius: 999px;
  color: #607984;
  background: transparent;
  font-size: clamp(0.7rem, calc(0.74 * var(--vw)), 1.4rem);
  font-weight: 900;
  cursor: pointer;
}

.floor-button.is-active {
  color: white;
  background: var(--navy-800);
  box-shadow: 0 0.5rem 1.2rem rgb(5 31 45 / 0.22);
}

.map-stage {
  position: relative;
  min-height: 0;
}

#campusMap {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.building-art {
  pointer-events: none;
}

.floor-callout rect {
  fill: rgb(10 39 54 / 0.82);
  stroke: rgb(255 255 255 / 0.75);
  stroke-width: 2;
}

.floor-callout text {
  fill: white;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.floor-callout:not(.is-active) {
  opacity: 0.72;
}

.floor-callout.is-active rect {
  fill: #007f7b;
  filter: drop-shadow(0 7px 10px rgb(0 73 73 / 0.3));
}

.floor-base {
  fill: #678695;
}

.floor-stack {
  transition: opacity 350ms ease, filter 350ms ease;
}

.floor-stack.is-muted {
  opacity: 0.27;
  filter: saturate(0.35);
}

.floor-surface {
  fill: url(#floorGradient);
  stroke: #b9d1dc;
  stroke-width: 3;
}

.floor-slab--front {
  fill: #91aeba;
}

.floor-slab--side {
  fill: #7898a6;
}

.room {
  fill: #f7f5ee;
  stroke: #afc2c8;
  stroke-width: 2;
}

.room--accent {
  fill: #dff5f0;
  stroke: #55c5bb;
}

.room-wall--back {
  fill: #dfe7e8;
  stroke: #aebfc4;
  stroke-width: 1.6;
}

.room-wall--side {
  fill: #cbd8dc;
  stroke: #aebfc4;
  stroke-width: 1.5;
}

.room-cutaway--accent .room-wall--back {
  fill: #bfe8df;
}

.window-strip {
  fill: none;
  stroke: #70a7bb;
  stroke-width: 7;
  stroke-linecap: round;
  opacity: 0.74;
}

.furniture {
  fill: #b98d61;
  stroke: #7f684f;
  stroke-width: 1.2;
  opacity: 0.9;
}

.furniture path {
  fill: none;
  stroke: #efe3d3;
  stroke-width: 2;
}

.furniture .monitor {
  fill: #264856;
  stroke: #ecf7f8;
}

.furniture .chair {
  fill: #647c87;
  stroke: #eef5f6;
}

.furniture--bench {
  fill: #aa8059;
}

.furniture--round {
  fill: #d0a370;
}

.room-label-plate {
  fill: rgb(255 255 255 / 0.9);
  stroke: rgb(154 181 191 / 0.55);
  stroke-width: 1;
}

.corridor {
  fill: #edf3f3;
  stroke: #c1d7e0;
  stroke-width: 2;
  stroke-dasharray: 7 8;
}

.room-label {
  fill: #2c4d5b;
  font-size: 20px;
  font-weight: 800;
  pointer-events: none;
}

.room-label--small {
  fill: #718993;
  font-size: 14px;
  font-weight: 700;
}

.floor-tag rect {
  fill: #173c4d;
}

.floor-tag text {
  fill: white;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.connector-point circle {
  fill: #173c4d;
  stroke: white;
  stroke-width: 4;
}

.connector-point text {
  fill: white;
  font-size: 19px;
  font-weight: 900;
}

.connector-guide {
  stroke: #7d9ba8;
  stroke-width: 4;
  stroke-dasharray: 8 9;
  opacity: 0.7;
}

.connector-guide--stairs {
  stroke: rgb(20 67 83 / 0.72);
  stroke-width: 7;
  stroke-dasharray: 4 10;
}

.elevator-shaft--outer {
  stroke: rgb(25 56 70 / 0.64);
  stroke-width: 23;
  stroke-linecap: round;
}

.elevator-shaft--glass {
  stroke: rgb(123 205 218 / 0.5);
  stroke-width: 15;
  stroke-linecap: round;
}

.stair-core rect {
  fill: #d9e0df;
  stroke: #8ca3aa;
  stroke-width: 2;
}

.stair-core path {
  stroke: #839ba4;
  stroke-width: 4;
}

.lift-core__glass {
  fill: rgb(133 205 216 / 0.42);
  stroke: #416c7b;
  stroke-width: 3;
}

.lift-core path {
  fill: none;
  stroke: rgb(37 82 96 / 0.72);
  stroke-width: 2;
}

.glass-frontage rect {
  fill: rgb(83 164 185 / 0.4);
  stroke: #4d899b;
  stroke-width: 2;
}

.glass-frontage path {
  stroke: rgb(238 250 252 / 0.85);
  stroke-width: 2;
}

.connector-label circle {
  fill: #173c4d;
  stroke: white;
  stroke-width: 3;
}

.connector-label--stairs circle {
  fill: #c77a16;
}

.connector-label--lift circle {
  fill: #147a9b;
}

.connector-label text {
  fill: white;
  font-size: 14px;
  font-weight: 900;
}

.connector-label__name {
  fill: #365461 !important;
  font-size: 12px !important;
  paint-order: stroke;
  stroke: white;
  stroke-width: 4;
  stroke-linejoin: round;
}

.route-halo {
  fill: none;
  stroke: rgb(25 211 197 / 0.32);
  stroke-width: 24;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path {
  fill: none;
  stroke: var(--cyan-dark);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#routeGlow);
}

.active-connectors .route-halo {
  stroke-width: 19;
}

.active-connectors .route-path {
  stroke-width: 8;
}

.route-path--vertical {
  stroke: #087f83;
}

.route-mode-stairs .route-path {
  stroke: #e08a1e;
}

.route-mode-stairs .route-halo {
  stroke: rgb(224 138 30 / 0.3);
}

.route-mode-elevator .route-path {
  stroke: #008eaa;
}

.route-mode-elevator .route-halo {
  stroke: rgb(0 142 170 / 0.3);
}

.alternate-route {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 11;
  opacity: 0.72;
}

.alternate-route--stairs {
  stroke: #e08a1e;
}

.alternate-route--elevator {
  stroke: #008eaa;
}

.route-path.is-animating,
.route-halo.is-animating {
  transition: stroke-dashoffset var(--route-duration, 1800ms) cubic-bezier(0.45, 0, 0.2, 1);
}

.map-pin__ring {
  fill: white;
  stroke-width: 7;
}

.map-pin__core {
  fill: currentColor;
}

.map-pin--you {
  color: #ff9b2f;
}

.map-pin--destination {
  color: #ff4f77;
}

.pin-label {
  fill: #173442;
  font-size: 16px;
  font-weight: 900;
  paint-order: stroke;
  stroke: white;
  stroke-width: 5;
  stroke-linejoin: round;
}

.map-legend {
  position: absolute;
  right: 2.2%;
  bottom: 2.2%;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.6rem, calc(0.9 * var(--vw)), 1.5rem);
  padding: clamp(0.55rem, calc(0.7 * var(--vw)), 1rem) clamp(0.7rem, calc(0.9 * var(--vw)), 1.5rem);
  border: 1px solid rgb(160 191 204 / 0.6);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.88);
  box-shadow: 0 0.8rem 1.8rem rgb(21 58 75 / 0.1);
  backdrop-filter: blur(12px);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: #526c78;
  font-size: clamp(0.54rem, calc(0.58 * var(--vw)), 1rem);
  font-weight: 800;
}

.legend-dot {
  display: inline-block;
  width: 0.75em;
  aspect-ratio: 1;
  border-radius: 50%;
}

.legend-dot--you {
  background: var(--orange);
}

.legend-dot--stairs {
  background: #f28c18;
}

.legend-dot--elevator {
  background: #1e78e6;
}

.legend-dot--destination {
  background: var(--pink);
}

.map-hotspot {
  color: #087e83;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.map-hotspot__target {
  fill: #0aa49f;
  stroke: white;
  stroke-width: 4;
  filter: drop-shadow(0 4px 6px rgb(8 50 63 / 0.28));
}

.map-hotspot__plate {
  fill: rgb(255 255 255 / 0.94);
  stroke: rgb(17 111 119 / 0.3);
  stroke-width: 1.5;
  filter: drop-shadow(0 5px 8px rgb(8 50 63 / 0.22));
  transition: fill 160ms ease, stroke 160ms ease;
}

.map-hotspot__label {
  fill: #123947;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.015em;
  pointer-events: none;
}

.map-hotspot:hover .map-hotspot__plate,
.map-hotspot:focus-visible .map-hotspot__plate {
  fill: #dff8f5;
  stroke: #00a99e;
  stroke-width: 2.5;
}

.map-hotspot:focus {
  outline: none;
}

.map-hotspots.has-active-route .map-hotspot:not(.is-selected) {
  opacity: 0;
  pointer-events: none;
}

.map-hotspot.is-selected {
  opacity: 0;
  pointer-events: none;
}

.route-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, calc(0.9 * var(--vw)), 1.4rem);
  padding: clamp(0.75rem, calc(1 * var(--vw)), 1.6rem) clamp(1rem, calc(1.4 * var(--vw)), 2.6rem);
  border-top: 1px solid #dce9ee;
  background: rgb(248 252 253 / 0.94);
}

.route-panel.is-timeout-active > :not(.route-timeout) {
  visibility: hidden;
  pointer-events: none;
}

.route-panel.is-timeout-active {
  min-height: clamp(8rem, calc(8 * var(--vw)), 9rem);
}

.route-timeout {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: clamp(0.45rem, calc(0.7 * var(--vw)), 1.2rem);
  min-width: 0;
  padding: clamp(0.5rem, calc(0.7 * var(--vw)), 1.15rem) clamp(0.7rem, calc(1 * var(--vw)), 1.8rem);
  overflow: hidden;
  background: rgb(244 250 251 / 0.985);
  box-shadow: 0 -0.75rem 2.4rem rgb(9 42 56 / 0.12);
  animation: route-timeout-enter 220ms ease-out both;
}

.route-timeout[hidden] {
  display: none;
}

.route-timeout__countdown {
  display: grid;
  width: clamp(2.7rem, calc(3.4 * var(--vw)), 6rem);
  aspect-ratio: 1;
  place-content: center;
  border: 2px solid rgb(8 142 155 / 0.32);
  border-radius: 50%;
  color: #075a67;
  background: #e1f8f6;
  text-align: center;
}

.route-timeout__countdown strong {
  font-size: clamp(0.95rem, calc(1.25 * var(--vw)), 2.2rem);
  line-height: 0.9;
}

.route-timeout__countdown span {
  margin-top: 0.28em;
  color: #4c7982;
  font-size: clamp(0.42rem, calc(0.46 * var(--vw)), 0.78rem);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.route-timeout__copy {
  display: grid;
  min-width: 0;
  gap: 0.12em;
}

.route-timeout__copy strong {
  overflow: hidden;
  font-size: clamp(0.82rem, calc(0.95 * var(--vw)), 1.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-timeout__copy > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.56rem, calc(0.62 * var(--vw)), 1.08rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-timeout__actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(0.3rem, calc(0.45 * var(--vw)), 0.75rem);
}

.route-timeout__actions .primary-button,
.route-timeout__actions .secondary-button {
  min-height: clamp(2.15rem, calc(2.5 * var(--vw)), 4.6rem);
  padding: 0 clamp(0.55rem, calc(0.72 * var(--vw)), 1.3rem);
  font-size: clamp(0.56rem, calc(0.62 * var(--vw)), 1.08rem);
  white-space: nowrap;
  width: 100%;
}

.route-timeout__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(0.22rem, calc(0.24 * var(--vw)), 0.42rem);
  background: #dce9ed;
}

.route-timeout__progress::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--route-timeout-progress, 100%);
  content: "";
  background: linear-gradient(90deg, #008e9b, #22cfbb);
  transition: width 250ms linear;
}

@keyframes route-timeout-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.route-status {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, calc(0.9 * var(--vw)), 1.4rem);
  min-width: 0;
  margin-right: auto;
}

.route-choices {
  display: flex;
  gap: clamp(0.3rem, calc(0.45 * var(--vw)), 0.7rem);
  padding: 0.28rem;
  border-radius: 999px;
  background: #e7eff2;
}

.route-choices[hidden] {
  display: none;
}

.route-choices button {
  display: flex;
  align-items: center;
  gap: 0.45em;
  min-height: clamp(2.4rem, calc(2.7 * var(--vw)), 5rem);
  padding: 0 clamp(0.65rem, calc(0.8 * var(--vw)), 1.45rem);
  border: 0;
  border-radius: 999px;
  color: #49636f;
  background: transparent;
  font-size: clamp(0.6rem, calc(0.67 * var(--vw)), 1.22rem);
  font-weight: 900;
  cursor: pointer;
}

.route-choices button.is-active {
  color: white;
  background: #153b4d;
  box-shadow: 0 0.45rem 1rem rgb(8 46 61 / 0.2);
}

.route-choice__icon {
  display: grid;
  width: 1.8em;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #f28c18;
}

[data-route-mode="lift"] .route-choice__icon {
  background: #1e78e6;
}

.route-choice__icon--stairs {
  background: #f28c18;
}

.route-choices button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.map-legend [hidden] {
  display: none;
}

.route-status__icon {
  display: grid;
  flex: 0 0 auto;
  width: clamp(2.5rem, calc(3 * var(--vw)), 5.7rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #086c6b;
  background: #d7f5f1;
  font-size: clamp(1.2rem, calc(1.6 * var(--vw)), 3rem);
  font-weight: 900;
}

.route-status strong,
.route-status span {
  display: block;
}

.route-status strong {
  overflow: hidden;
  font-size: clamp(0.78rem, calc(0.88 * var(--vw)), 1.65rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-status > div {
  min-width: 0;
}

/* Long instructions wrap to two lines instead of pushing the buttons off the panel. */
.route-panel > .primary-button,
.route-panel > .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.route-status div > span {
  display: -webkit-box;
  margin-top: 0.25em;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.6rem, calc(0.64 * var(--vw)), 1.15rem);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: clamp(2.6rem, calc(2.9 * var(--vw)), 5.4rem);
  padding: 0 clamp(1rem, calc(1.25 * var(--vw)), 2.3rem);
  border-radius: 999px;
  font-size: clamp(0.7rem, calc(0.75 * var(--vw)), 1.4rem);
  font-weight: 900;
  cursor: pointer;
}

.danger-button--solid {
  border-color: #ff597e;
  color: white;
  background: #c92f54;
  box-shadow: 0 0.75rem 1.8rem rgb(201 47 84 / 0.24);
}

.primary-button {
  border: 0;
  color: #06262c;
  background: var(--cyan);
  box-shadow: 0 0.75rem 1.8rem rgb(25 211 197 / 0.24);
}

.secondary-button {
  border: 1px solid #b8ccd5;
  color: #284754;
  background: white;
}

.danger-button {
  border: 1px solid rgb(255 89 126 / 0.4);
  color: #ff8ba5;
  background: rgb(255 89 126 / 0.08);
}

.settings-dialog {
  width: min(54rem, calc(88 * var(--vw)));
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 1.5rem;
  color: white;
  background: #0b2231;
  box-shadow: 0 3rem 8rem rgb(0 0 0 / 0.45);
}

.settings-dialog::backdrop {
  background: rgb(2 10 16 / 0.72);
  backdrop-filter: blur(10px);
}

.settings-card {
  max-height: 88vh;
  padding: clamp(1.5rem, calc(2.5 * var(--vw)), 3rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #4d6c7b #102e40;
  scrollbar-width: thin;
  touch-action: pan-y;
}

.settings-card__header,
.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-card h2 {
  margin: 0.25em 0 0;
  font-size: clamp(1.4rem, calc(2 * var(--vw)), 2.5rem);
}

.settings-card > p {
  color: #a6bdc8;
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.7rem 0;
}

.media-zone-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.025);
}

.upload-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 10rem;
  padding: 1.3rem;
  border: 1px dashed #4d6c7b;
  border-radius: 1rem 1rem 0 0;
  background: rgb(255 255 255 / 0.04);
  cursor: pointer;
}

.upload-card:hover {
  border-color: var(--cyan);
  background: rgb(25 211 197 / 0.05);
}

.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-card span {
  font-weight: 900;
}

.upload-card small {
  margin-top: 0.45rem;
  color: #89a4b0;
}

.upload-card strong {
  margin-top: auto;
  color: var(--cyan);
}

.media-list {
  display: grid;
  max-height: 13rem;
  gap: 0.45rem;
  padding: 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #4d6c7b #102e40;
  scrollbar-width: thin;
  touch-action: pan-y;
}

.media-list__empty {
  margin: 0;
  padding: 0.7rem;
  color: #89a4b0;
  font-size: 0.82rem;
  text-align: center;
}

.media-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.045);
}

.media-item__details {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.15rem;
}

.media-item__thumbnail {
  flex: 0 0 auto;
  width: 3.6rem;
  height: 2.8rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 0.55rem;
  object-fit: cover;
  background: #071522;
}

.media-item__details strong {
  overflow: hidden;
  color: #edf7fa;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-item__details small {
  color: #89a4b0;
  font-size: 0.68rem;
}

.media-item__remove {
  display: grid;
  flex: 0 0 auto;
  width: 2.4rem;
  min-height: 2.4rem;
  place-items: center;
  border: 1px solid rgb(255 89 126 / 0.4);
  border-radius: 50%;
  color: #ff8ba5;
  background: rgb(255 89 126 / 0.08);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.media-item__remove:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.duration-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem 1rem;
  padding: 1rem 0 1.7rem;
  color: #d9e6eb;
  font-weight: 800;
}

.duration-setting input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cyan);
}

.kiosk-setting {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.7rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 1rem;
  color: #d9e6eb;
  background: rgb(255 255 255 / 0.04);
}

.kiosk-setting > span {
  font-weight: 900;
}

.kiosk-setting > small {
  color: #89a4b0;
  line-height: 1.45;
}

.kiosk-setting select {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.35rem;
  padding: 0 0.9rem;
  border: 1px solid #4d6c7b;
  border-radius: 0.75rem;
  color: white;
  background: #102e40;
  cursor: pointer;
}

.admin-settings,
.exit-settings {
  margin-bottom: 1.2rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.04);
}

.admin-settings h3,
.exit-settings h3 {
  margin: 0;
  color: #edf7fa;
  font-size: 1rem;
}

.admin-settings p,
.exit-settings p {
  margin: 0.35rem 0 0;
  color: #89a4b0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.password-grid label,
.security-card label {
  display: grid;
  gap: 0.4rem;
  color: #d9e6eb;
  font-size: 0.76rem;
  font-weight: 800;
}

.security-card label[hidden] {
  display: none;
}

.password-grid input,
.security-card input {
  width: 100%;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid #4d6c7b;
  border-radius: 0.75rem;
  color: white;
  background: #102e40;
  outline: none;
}

.password-grid input:focus,
.security-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgb(25 211 197 / 0.14);
}

.admin-settings__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.9rem;
}

.form-status {
  min-height: 1.2em;
  color: #6ee7d8;
  font-size: 0.76rem;
  font-weight: 700;
}

.form-status--error,
.form-status.is-error {
  color: #ff9bb1;
}

.exit-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: rgb(255 89 126 / 0.28);
  background: rgb(255 89 126 / 0.045);
}

.kiosk-protection__label {
  display: block;
  margin-bottom: 0.25rem;
  color: #89a4b0;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kiosk-protection__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  color: #6ee7d8;
  font-size: 0.76rem;
}

.kiosk-protection__status::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.25rem rgb(110 231 216 / 0.12);
  content: "";
}

.kiosk-protection__status[data-state="pending"],
.kiosk-protection__status[data-state="preview"] {
  color: #ffd27a;
}

.hold-exit-button {
  position: relative;
  min-width: 13rem;
  min-height: 3.2rem;
  overflow: hidden;
  border: 1px solid rgb(255 89 126 / 0.55);
  border-radius: 999px;
  color: #ffafc1;
  background: rgb(255 89 126 / 0.08);
  font-weight: 900;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.hold-exit-button__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #c92f54;
}

[dir="rtl"] .hold-exit-button__progress {
  inset: 0 0 0 auto;
}

.hold-exit-button.is-holding .hold-exit-button__progress {
  width: 100%;
  transition: width 3s linear;
}

.hold-exit-button__label {
  position: relative;
  z-index: 1;
}

.security-dialog {
  width: min(28rem, calc(88 * var(--vw)));
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 1.5rem;
  color: white;
  background: #0b2231;
  box-shadow: 0 3rem 8rem rgb(0 0 0 / 0.5);
}

.security-dialog::backdrop {
  background: rgb(2 10 16 / 0.78);
  backdrop-filter: blur(12px);
}

.security-card {
  display: grid;
  gap: 1rem;
  padding: 2rem;
}

.security-card__icon {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 50%;
  color: #06262c;
  background: var(--cyan);
  box-shadow: 0 0.75rem 1.8rem rgb(25 211 197 / 0.2);
}

.security-card__icon--danger {
  color: white;
  background: #c92f54;
}

.security-card h2,
.security-card p {
  margin: 0;
}

.security-card p {
  color: #a6bdc8;
  line-height: 1.5;
}

.security-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.security-dialog[dir="rtl"] {
  text-align: right;
}

@media (max-width: 760px) {
  .password-grid {
    grid-template-columns: 1fr;
  }

  .exit-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .hold-exit-button {
    width: 100%;
  }
}

.settings-dialog[dir="rtl"] {
  text-align: right;
}

@keyframes mediaFade {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- 2.5D campus view ---------- */

.view-button {
  min-height: clamp(2.2rem, calc(2.4 * var(--vw)), 4.6rem);
  padding: 0 1.1em;
  border: 0;
  border-radius: 999px;
  color: #607984;
  background: transparent;
  font-size: clamp(0.66rem, calc(0.7 * var(--vw)), 1.3rem);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.view-button.is-active {
  color: white;
  background: var(--navy-800);
  box-shadow: 0 0.5rem 1.2rem rgb(5 31 45 / 0.22);
}

.map-stage[data-renderer="webgl"] #campusSvg,
.map-stage:not([data-renderer="webgl"]) #campus3d {
  display: none;
}

/* ---------- realistic WebGL campus ---------- */

.campus3d {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 0 1rem 1rem;
  background: #dde8ee;
}

.campus3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.campus3d-canvas.is-panning {
  cursor: grabbing;
}

.campus3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  direction: ltr;
}

.c3d-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  padding: 0.42em 0.85em 0.42em 0.6em;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 999px;
  color: #102a38;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 0.35rem 1rem rgb(6 26 38 / 0.22);
  font: 800 clamp(0.56rem, calc(0.6 * var(--vw)), 1.15rem) / 1.1 Inter, "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  translate: -50% calc(-100% - 12px);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 260ms ease;
}

.c3d-label::after {
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 2px;
  height: 11px;
  background: rgb(255 255 255 / 0.85);
  box-shadow: 0 0 3px rgb(0 0 0 / 0.25);
  content: "";
  translate: -50% 0;
}

.c3d-label i {
  width: 0.62em;
  height: 0.62em;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9);
}

.campus3d-overlay[dir="rtl"] .c3d-label {
  direction: rtl;
}

.c3d-label.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.campus3d-overlay.has-selection .c3d-label:not(.is-selected) {
  opacity: 0.4;
}

.campus3d-overlay.has-selection .c3d-label--minor:not(.is-selected) {
  opacity: 0;
  pointer-events: none;
}

.campus3d-overlay.has-selection .c3d-label.is-hidden {
  opacity: 0;
}

.c3d-label.is-selected {
  z-index: 2;
  color: white;
  border-color: #2fd8c8;
  background: #0b5f63;
  font-size: clamp(0.68rem, calc(0.74 * var(--vw)), 1.4rem);
}

.c3d-pin {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  color: #ff9b2f;
}

.c3d-pin--destination {
  color: #ff4f77;
}

.c3d-pin__dot,
.c3d-pin__pulse {
  position: absolute;
  border-radius: 50%;
  translate: -50% -50%;
}

.c3d-pin__dot {
  width: 18px;
  height: 18px;
  border: 4px solid white;
  background: currentColor;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.35);
}

.c3d-pin__pulse {
  width: 54px;
  height: 54px;
  background: currentColor;
  opacity: 0.3;
  animation: c3dPulse 2s ease-out infinite;
}

.c3d-pin b {
  position: absolute;
  bottom: 16px;
  left: 0;
  padding: 0.38em 0.8em;
  border-radius: 999px;
  color: white;
  background: #0c2333;
  font-size: clamp(0.56rem, calc(0.58 * var(--vw)), 1.1rem);
  letter-spacing: 0.05em;
  white-space: nowrap;
  translate: -50% 0;
  box-shadow: 0 0.35rem 1rem rgb(6 26 38 / 0.3);
}

.floor-switcher[hidden] {
  display: none;
}

.c3d-room {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  justify-items: center;
  max-width: 11em;
  margin: 0;
  padding: 0.22em 0.55em;
  border: 0;
  border-radius: 0.5em;
  color: #173442;
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 0.2rem 0.6rem rgb(6 26 38 / 0.16);
  font: 700 clamp(0.5rem, calc(0.52 * var(--vw)), 1rem) / 1.15 Inter, "Segoe UI", Arial, sans-serif;
  text-align: center;
  translate: -50% -50%;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 220ms ease;
}

.c3d-room span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c3d-room small {
  color: #5d7783;
  font-size: 0.8em;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.c3d-room.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.c3d-room.is-selected {
  z-index: 3;
  color: white;
  background: #0b5f63;
  box-shadow: 0 0 0 3px rgb(47 216 200 / 0.55), 0 0.4rem 1rem rgb(6 26 38 / 0.3);
  font-size: clamp(0.62rem, calc(0.66 * var(--vw)), 1.25rem);
}

.c3d-room.is-selected small {
  color: #bff5ef;
}

.campus3d-overlay.is-open .c3d-label:not(.is-selected) {
  opacity: 0;
  pointer-events: none;
}

@keyframes c3dPulse {
  from { transform: scale(0.4); opacity: 0.45; }
  to { transform: scale(1.5); opacity: 0; }
}


#campusSvg {
  --u: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

#campusSvg.is-panning {
  cursor: grabbing;
}

.campus-backdrop {
  fill: #e4eef2;
}

.campus-ground__base {
  fill: #f3f8fa;
  stroke: #c9dce4;
  stroke-width: calc(var(--u) * 2);
}

.campus-ground image {
  pointer-events: none;
}

.campus-shadows {
  fill: #0d2c3d;
  opacity: 0.13;
  pointer-events: none;
}

.campus-wall {
  stroke: rgb(40 70 88 / 0.18);
  stroke-width: calc(var(--u) * 0.6);
  stroke-linejoin: round;
}

.campus-roof {
  fill: var(--roof);
  stroke: var(--rim);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.campus-building {
  transition: opacity 400ms ease, filter 400ms ease;
}

.campus-building[role="button"] {
  cursor: pointer;
}

.campus-building[role="button"]:hover .campus-roof,
.campus-building[role="button"]:focus-visible .campus-roof {
  fill: #e3fbf8;
  stroke-width: 2.4;
}

.campus-buildings.has-selection .campus-building:not(.is-selected) {
  opacity: 0.62;
  filter: saturate(0.5);
}

.campus-building.is-selected .campus-roof {
  fill: #2fd8c8;
  stroke: #04746f;
  stroke-width: 2.6;
}

.campus-building.is-selected .campus-wall {
  filter: hue-rotate(-30deg) saturate(1.6);
}

.campus-label {
  cursor: pointer;
  transition: opacity 300ms ease;
}

.campus-label__stem {
  stroke: #24506a;
  stroke-width: 1.6;
  opacity: 0.6;
}

.campus-label__plate {
  fill: rgb(255 255 255 / 0.94);
  stroke: rgb(18 61 84 / 0.18);
  stroke-width: 1;
  filter: drop-shadow(0 3px 6px rgb(4 30 45 / 0.18));
}

.campus-label__text {
  fill: #143446;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.campus-labels .campus-label.is-culled {
  opacity: 0 !important;
  pointer-events: none;
}

.campus-label--minor {
  opacity: 0;
  pointer-events: none;
}

#campusSvg.is-zoomed .campus-label--minor {
  opacity: 1;
  pointer-events: auto;
}

.campus-labels.has-selection .campus-label:not(.is-selected) {
  opacity: 0.35;
}

.campus-labels.has-selection .campus-label--minor:not(.is-selected) {
  opacity: 0;
}

#campusSvg.is-zoomed .campus-labels.has-selection .campus-label--minor:not(.is-selected) {
  opacity: 0.35;
}

.campus-labels .campus-label.is-selected {
  opacity: 1;
  pointer-events: auto;
}

.campus-label.is-selected .campus-label__plate {
  fill: #0b5f63;
  stroke: #2fd8c8;
  stroke-width: 2;
}

.campus-label.is-selected .campus-label__text {
  fill: white;
}

.campus-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.campus-route--halo {
  stroke: rgb(25 211 197 / 0.35);
  stroke-width: calc(var(--u) * 22);
}

.campus-route--path {
  stroke: var(--cyan-dark);
  stroke-width: calc(var(--u) * 8);
}

.campus-route.is-animating {
  transition: stroke-dashoffset var(--route-duration, 1800ms) cubic-bezier(0.45, 0, 0.2, 1);
}

.campus-pin {
  pointer-events: none;
}

.campus-pin__ring {
  fill: white;
  stroke: currentColor;
  stroke-width: 6;
}

.campus-pin__core {
  fill: currentColor;
}

.campus-pin__pulse {
  fill: currentColor;
  opacity: 0.2;
  transform-origin: center;
  animation: campusPulse 2.2s ease-out infinite;
}

.campus-pin--you {
  color: #ff9b2f;
}

.campus-pin--destination {
  color: #ff4f77;
}

.campus-pin__tag rect {
  fill: #0c2333;
}

.campus-pin__tag text {
  fill: white;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

@keyframes campusPulse {
  from { transform: scale(0.6); opacity: 0.35; }
  to { transform: scale(1.6); opacity: 0; }
}

.campus-controls {
  position: absolute;
  top: 2.2%;
  right: 2.2%;
  display: grid;
  gap: 0.45rem;
}

.wayfinder[dir="rtl"] .campus-controls {
  right: auto;
  left: 2.2%;
}

.campus-controls button {
  display: grid;
  width: clamp(2.4rem, calc(2.5 * var(--vw)), 4.8rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(151 185 200 / 0.5);
  border-radius: 0.8rem;
  color: #173442;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 0.6rem 1.4rem rgb(5 31 45 / 0.14);
  font-size: clamp(0.9rem, calc(1 * var(--vw)), 1.9rem);
  font-weight: 900;
  cursor: pointer;
}

.legend-dot--route {
  background: var(--cyan-dark);
}

@media (max-aspect-ratio: 16 / 10) {
  .kiosk-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 3.2fr) minmax(0, 0.9fr);
  }

  .ad-fallback p {
    display: none;
  }
}

@media (max-width: 1100px) {
  .map-legend {
    display: none;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .route-timeout__copy > .eyebrow,
  .route-timeout__copy > span:last-child {
    display: none;
  }
}

/* ---------- Route Here destination panel ---------- */

.destination-card {
  position: absolute;
  left: 50%;
  bottom: 4.5%;
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "icon copy close" "action action action";
  gap: 0.7rem 0.9rem;
  width: min(30rem, 72%);
  padding: clamp(0.8rem, calc(1 * var(--vw)), 1.6rem);
  border: 1px solid rgb(151 185 200 / 0.45);
  border-radius: 1.2rem;
  background: rgb(255 255 255 / 0.96);
  box-shadow: 0 1.2rem 3rem rgb(5 31 45 / 0.28);
  translate: -50% 0;
  animation: destinationCardIn 220ms ease-out;
}

.destination-card[hidden] {
  display: none;
}

.destination-card__icon {
  grid-area: icon;
  display: grid;
  width: clamp(2.6rem, calc(2.8 * var(--vw)), 5rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 0.9rem;
  color: white;
  background: var(--cyan-dark);
  font-weight: 900;
}

.destination-card__copy {
  grid-area: copy;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.destination-card__copy strong {
  color: #102a38;
  font-size: clamp(0.85rem, calc(0.95 * var(--vw)), 1.8rem);
}

.destination-card__copy small {
  color: #5d7783;
  font-size: clamp(0.62rem, calc(0.66 * var(--vw)), 1.2rem);
}

.destination-card__close {
  grid-area: close;
  width: clamp(2.6rem, calc(2.6 * var(--vw)), 4.8rem);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: #355261;
  background: #e7eff2;
  font-size: 1.3em;
  cursor: pointer;
}

.destination-card .primary-button {
  grid-area: action;
  min-height: clamp(2.8rem, calc(3 * var(--vw)), 5.4rem);
}

@keyframes destinationCardIn {
  from { opacity: 0; transform: translateY(0.6rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- floor tags on an opened building ---------- */

.c3d-floor {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 2.75rem; /* 48 dp touch target at the 4K reference scale */
  margin: 0;
  padding: 0.3em 0.8em;
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: 999px;
  color: #355261;
  background: rgb(231 239 242 / 0.92);
  box-shadow: 0 0.3rem 0.8rem rgb(6 26 38 / 0.18);
  font: 800 clamp(0.55rem, calc(0.58 * var(--vw)), 1.1rem) / 1.1 Inter, "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  translate: -100% -50%;
  pointer-events: auto;
  cursor: pointer;
}

.c3d-floor.is-active {
  color: white;
  border-color: #2fd8c8;
  background: #0c2333;
}

.c3d-floor.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Portrait kiosk (BenQ mounted vertically, 2160 x 3840) ----------
   The app is portrait only. Advertising strips above and below the map. Sizes are rescaled so the wayfinder column keeps the proportions
   it had as the 60 % centre column of the landscape layout. */
:root {
  --vw: calc(100vw / 60);
  --vh: 0.6vh;
  /* rem follows the screen height (16 px on a 1920 px tall screen, 32 px on the 4K board), so the layout is
     identical on the board and in a small preview window */
  font-size: calc(100vh / 120);
}

.kiosk-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 20fr) minmax(0, 60fr) minmax(0, 20fr);
}

.wayfinder {
  min-height: 0;
}

.ad-zone--left {
  border-right: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.11);
}

.ad-zone--right {
  border-left: 0;
  border-top: 1px solid rgb(255 255 255 / 0.11);
}

.ad-fallback {
  justify-content: center;
  padding: 0 calc(4 * var(--vw));
}

.ad-fallback::before {
  inset: 12% 6% auto auto;
  width: auto;
  height: 76%;
}

.ad-fallback strong {
  max-width: 18ch;
}

.ad-fallback p {
  display: block;
  max-width: 40ch;
  margin: 0.8em 0 0;
}

/* Controls at the top: the route panel, then the map with the search bar floating across its top edge and the
   floor picker and camera controls just below it. The rest of the map below is for looking at. */
.wayfinder {
  grid-template-rows: auto minmax(0, 1fr);
  padding-top: clamp(0.6rem, calc(0.8 * var(--vw)), 1.8rem);
}

.topbar {
  min-height: clamp(2.8rem, calc(4.2 * var(--vh)), 6rem);
}

.map-stage {
  --search-height: clamp(3.7rem, calc(6 * var(--vh)), 7.2rem);
  --below-search: calc(2.2% + var(--search-height) + 1.2rem);
}

.search-panel {
  position: absolute;
  z-index: 20;
  top: 2.2%;
  right: 2.2%;
  left: 2.2%;
  width: auto;
  margin: 0;
}

/* the placeholder says it; the label stays for screen readers */
.search-panel > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.search-panel .search-box {
  box-shadow: 0 1rem 2.6rem rgb(14 46 62 / 0.28);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.5rem, calc(0.7 * var(--vw)), 1.2rem);
}

.search-row .language-button {
  min-height: var(--search-height);
  box-shadow: 0 1rem 2.6rem rgb(14 46 62 / 0.28);
}

.campus-controls {
  top: var(--below-search);
}

/* map card: route panel first, then the title, then the map */
.map-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.route-panel {
  order: -1;
  border-top: 0;
  border-bottom: 1px solid #dce9ee;
}

.map-card__heading {
  padding-top: clamp(0.6rem, calc(0.8 * var(--vw)), 1.4rem);
  padding-bottom: clamp(0.3rem, calc(0.4 * var(--vw)), 0.8rem);
}

.floor-switcher {
  position: absolute;
  z-index: 5;
  top: var(--below-search);
  left: 2.2%;
  flex-direction: column;
  box-shadow: 0 0.8rem 1.8rem rgb(21 58 75 / 0.14);
}

.floor-switcher[hidden] {
  display: none;
}

.map-legend {
  top: auto;
  right: auto;
  bottom: 2.2%;
  left: 2.2%;
}

.destination-card {
  top: var(--below-search);
  bottom: auto;
}

/* Arabic mirrors the map controls to the left, so the floor picker and legend move to the right */
.wayfinder[dir="rtl"] .floor-switcher,
.wayfinder[dir="rtl"] .map-legend {
  right: 2.2%;
  left: auto;
}

/* Wider windows (desktop preview, a board left in landscape) show the portrait screen centred, as on the board. */
@media (min-aspect-ratio: 9 / 16) {
  :root {
    --vw: calc(100vh * 9 / 16 / 60);
  }

  .kiosk-shell {
    width: calc(100vh * 9 / 16);
    margin: 0 auto;
    box-shadow: 0 0 4rem rgb(0 0 0 / 0.5);
  }
}
