:root {
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: #233449;
  background: #eef3f7;
  font-synthesis: none;
  --blue: #1559b7;
  --muted: #728094;
  --line: #e6ecf2;
  --header: 78px;
  --sidebar: 300px;
  --shadow: 0 8px 30px #2334490b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #79aaf0;
  outline-offset: 3px;
}
button {
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.hidden {
  display: none !important;
}
svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}
button svg {
  pointer-events: none;
}
button [data-icon] {
  display: flex;
}
.app-header {
  height: var(--header);
  position: fixed;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 40;
  gap: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  text-decoration: none;
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -1.2px;
}
.brand-light {
  font-weight: 450;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-top: 6px;
  color: #728094;
}
.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 34px;
  transform: skewY(-15deg);
}
.brand-mark i {
  display: block;
  width: 8px;
  height: 23px;
  background: var(--blue);
  border-radius: 2px;
}
.brand-mark i:nth-child(2) {
  height: 30px;
}
.brand-mark i:nth-child(3) {
  height: 36px;
}
.header-divider {
  height: 25px;
  width: 1px;
  background: var(--line);
  margin-left: 20px;
}
.header-title {
  font-size: 13px;
  font-weight: 550;
  color: #6a798b;
}
#top-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.preview-badge {
  font-size: 11px;
  color: #728094;
  display: flex;
  align-items: center;
  gap: 7px;
}
.preview-badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a0acb8;
}
.preview-badge.connected:before {
  background: #4a9674;
}
.top-bar-btn,
.language-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.top-bar-btn:hover,
.language-btn:hover {
  background: #f4f7fa;
}
.language-btn {
  border: 0;
  padding: 9px 0;
}
.language-btn img,
.language-option img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}
#language-selector {
  position: relative;
}
.language-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  padding: 6px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 150px;
}
.language-option {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 0;
  background: none;
  padding: 10px;
  width: 100%;
  border-radius: 5px;
  font-size: 13px;
}
.language-option:hover,
.language-option.active {
  background: #eef4fc;
}
#explorer-sidebar {
  position: fixed;
  left: 0;
  top: var(--header);
  bottom: 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 0;
}
.site-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
}
.site-icon {
  width: 39px;
  height: 43px;
  display: grid;
  place-items: center;
  background: #f0f5fc;
  border: 1px solid #e2ebf8;
  border-radius: 10px;
  color: var(--blue);
}
h1 {
  font-size: 16px;
  letter-spacing: -0.35px;
  margin: 0;
  font-weight: 650;
}
.site-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.overview-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 11px;
  text-align: left;
  background: #edf4fe;
  color: var(--blue);
  border: 1px solid #dce9fb;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}
.overview-button > span:nth-child(2) {
  flex: 1;
}
.overview-button small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 4px;
  color: #5e7fa7;
}
.overview-button:hover {
  background: #e0edff;
}
.overview-button > span:last-child svg {
  width: 15px;
}
.directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 1px 14px;
}
.directory-heading h2 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
}
.directory-heading > span {
  font-size: 10px;
  padding: 3px 7px;
  background: #f0f3f7;
  border-radius: 5px;
  color: #6a798b;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  height: 40px;
  padding: 0 10px;
  color: #8c9bae;
}
.search-field svg {
  width: 16px;
}
.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 12px;
  outline: none;
  color: #233449;
}
.search-field:focus-within {
  border-color: #79aaf0;
  box-shadow: 0 0 0 3px #79aaf01a;
}
.search-field kbd {
  font: 10px inherit;
  background: #f4f6f8;
  padding: 1px 5px;
  border-radius: 3px;
  color: #a2adbb;
}
.floor-tabs {
  display: flex;
  gap: 3px;
  margin: 12px 0 18px;
  background: #f3f5f8;
  padding: 3px;
  border-radius: 7px;
}
.floor-tabs button {
  flex: 1;
  border: 0;
  background: none;
  color: #7c8897;
  font-size: 11px;
  padding: 7px 3px;
  border-radius: 5px;
}
.floor-tabs button.active {
  background: #fff;
  color: #284568;
  box-shadow: 0 1px 4px #23344912;
}
#room-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -10px;
  padding: 0 10px;
  scrollbar-width: thin;
  scrollbar-color: #dce3ec transparent;
}
.room-group-title {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8391a1;
  font-weight: 500;
  padding: 5px 9px;
  margin: 9px 0 5px;
}
.room-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 9px;
  text-align: left;
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  margin: 2px 0;
}
.room-row:hover {
  background: #f4f7fb;
}
.room-row.active {
  background: #eff5ff;
  border-color: #d6e6fb;
}
.room-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #f1f5fa;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  color: #809cc2;
}
.room-symbol svg {
  width: 17px;
  height: 17px;
}
.room-row.active .room-symbol {
  background: #dae9ff;
  color: var(--blue);
  border-color: #d0e2fa;
}
.room-copy {
  flex: 1;
}
.room-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.room-copy small {
  display: block;
  color: #8a97a6;
  font-size: 10px;
  margin-top: 3px;
}
.room-floor {
  font-size: 9px;
  color: #8d9aab;
  padding: 3px 5px;
  background: #f4f6f8;
  border-radius: 4px;
}
.room-row.active .room-copy strong {
  color: var(--blue);
}
.empty-rooms {
  padding: 24px 10px;
  color: #728094;
  font-size: 12px;
  line-height: 1.7;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  margin-top: 16px;
  color: #8a99aa;
}
.sidebar-footer svg {
  width: 17px;
}
.sidebar-footer p {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
}
#map-viewport {
  position: fixed;
  left: var(--sidebar);
  top: var(--header);
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #eef3f7;
}
#map-viewport > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#label-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.map-heading {
  position: absolute;
  left: 30px;
  top: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.breadcrumb {
  font-size: 10px;
  color: #8190a1;
  display: flex;
  gap: 9px;
  align-items: center;
}
.breadcrumb > span:last-child {
  color: #566b83;
}
.map-heading h2 {
  font-size: 23px;
  letter-spacing: -0.75px;
  font-weight: 500;
  margin: 10px 0;
}
.view-switch {
  position: absolute;
  right: 28px;
  top: 30px;
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #ffffffea;
  border: 1px solid #dfe7ef;
  border-radius: 9px;
  z-index: 6;
  box-shadow: var(--shadow);
}
.view-switch button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  padding: 8px 11px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #8190a2;
}
.view-switch svg {
  width: 15px;
  height: 15px;
}
.view-switch button.active {
  background: #1559b7;
  color: white;
}
.map-tools {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 5px;
  background: #fffffff2;
  border: 1px solid #dfe7ef;
  border-radius: 11px;
  box-shadow: var(--shadow);
}
.map-tools button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 37px;
  border: 0;
  background: none;
  border-radius: 6px;
  color: #647991;
}
.map-tools button:hover,
.map-tools button[aria-pressed="true"] {
  background: #edf4ff;
  color: var(--blue);
}
.map-tools svg {
  width: 18px;
  height: 18px;
}
.tool-divider {
  height: 1px;
  background: #e6ecf2;
  margin: 4px;
}
.map-footer {
  position: absolute;
  inset: auto 28px 21px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 4;
  pointer-events: none;
}
.map-legend {
  display: flex;
  gap: 14px;
  padding: 10px 13px;
  background: #ffffffb8;
  border: 1px solid #ffffffb0;
  border-radius: 7px;
  backdrop-filter: blur(10px);
}
.map-legend span {
  font-size: 9px;
  color: #748396;
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.legend-storage {
  background: #4a85bd;
}
.legend-office {
  background: #8999a7;
}
.legend-landscape {
  background: #648c70;
}
.gesture-hint {
  font-size: 9px;
  color: #8796a5;
}
.gesture-hint span {
  margin: 0 5px;
}
#compass {
  width: 43px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #65798f;
  font-size: 9px;
  gap: 1px;
  pointer-events: auto;
}
#compass svg {
  width: 29px;
  height: 29px;
}
.label,
.room-label {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  user-select: none;
  color: #425a77;
  background: #ffffffeb;
  padding: 6px 10px;
  border: 1px solid #d6e1ee;
  border-radius: 6px;
  font-size: 10px;
  box-shadow: 0 3px 12px #24374b0c;
}
.room-label {
  font-size: 9px;
  padding: 4px 7px;
}
.locker-label {
  font-size: 10px;
}
.control-panel {
  position: absolute;
  right: 79px;
  top: 50%;
  transform: translateY(-50%);
  width: 227px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 10px;
  z-index: 10;
  overflow: hidden;
}
.control-panel.collapsed {
  display: none;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.panel-header h4 {
  font-size: 12px;
  margin: 0;
}
.panel-toggle {
  border: 0;
  background: none;
  color: #728094;
}
.panel-body {
  padding: 4px 16px 12px;
}
.panel-body > div {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  margin-top: 14px;
  color: #697b8f;
}
.panel-body input {
  accent-color: var(--blue);
}
.panel-body label {
  cursor: pointer;
}
#locker-label-controls {
  top: 113px;
  transform: none;
  right: 28px;
  width: 200px;
}
#info-panel {
  position: absolute;
  left: 30px;
  bottom: 80px;
  width: 258px;
  background: #fffffff5;
  backdrop-filter: blur(12px);
  border: 1px solid #fff;
  box-shadow: 0 10px 40px #23344914;
  border-radius: 12px;
  z-index: 8;
  padding: 17px 18px;
}
.selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #8a98a7;
}
.icon-button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  width: 25px;
  height: 25px;
  color: #7b8b9c;
  border-radius: 5px;
}
.icon-button:hover {
  background: #edf3fa;
}
.icon-button svg {
  width: 16px;
  height: 16px;
}
#info-panel h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 8px 0 3px;
}
#selection-meta {
  font-size: 11px;
  color: #8392a3;
  margin: 4px 0 12px;
}
#info-status-container {
  font-size: 10px;
  color: #71839a;
  margin: 10px 0;
}
#occupancy-stats {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 8px 0;
  color: #728094;
}
.primary-button {
  width: 100%;
  padding: 11px 14px;
  margin-top: 10px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 600;
}
.primary-button:hover {
  background: #104b9d;
}
#occupancy-bar {
  height: 4px;
  background: #80b398;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
#occupancy-fill {
  height: 100%;
  background: #b5a279;
}
#module-detail-panel {
  position: fixed;
  right: 108px;
  top: 194px;
  width: 245px;
  background: #fffffff5;
  backdrop-filter: blur(10px);
  border: 1px solid #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 15;
  overflow: hidden;
}
.panel-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #7da2d5 !important;
}
.panel-content {
  padding: 20px;
}
.panel-content h2 {
  margin: 0 0 17px;
  font-size: 24px;
}
.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.detail-label {
  font-size: 11px;
  color: #8a98a7;
}
.pill {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  background: #edf3fa;
  color: #5c7492;
  max-width: 150px;
}
.pill-available {
  background: #e7f2eb;
  color: #3b7854;
}
.pill-occupied {
  background: #f5eee1;
  color: #967342;
}
#module-tooltip {
  position: fixed;
  padding: 7px 11px;
  background: #233449ed;
  color: white;
  border-radius: 6px;
  font-size: 11px;
  z-index: 60;
  pointer-events: none;
  transform: translate(14px, 14px);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 8px;
  background: #233449;
  color: white;
  font-size: 12px;
  z-index: 100;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: #23344966;
  backdrop-filter: blur(5px);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(400px, calc(100% - 40px));
  padding: 30px;
  box-shadow: 0 20px 90px #23344933;
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 10px;
  border: 0;
  background: none;
  font-size: 26px;
  color: #8a98a7;
}
.modal-content h2 {
  font-size: 22px;
  margin: 0 0 8px;
}
.modal-content p {
  font-size: 13px;
  color: #728094;
  line-height: 1.7;
}
.modal-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  margin: 8px 0 15px;
}
.modal-btn {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}
.user-info {
  padding: 15px;
  background: #f5f8fb;
  border-radius: 7px;
  margin: 20px 0;
}
.user-email-display {
  display: block;
  font-size: 13px;
  margin-top: 8px;
}
#directory-toggle {
  display: none;
  pointer-events: auto;
}
#scene-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #eef3f7;
  z-index: 20;
  font-size: 13px;
  color: #69809c;
}
.loading-ring {
  width: 22px;
  height: 22px;
  border: 2px solid #d1deed;
  border-top-color: #1559b7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  :root {
    --sidebar: 330px;
  }
  #explorer-sidebar {
    padding-left: 26px;
    padding-right: 26px;
  }
  .room-row {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
@media (max-width: 1100px) {
  :root {
    --sidebar: 260px;
  }
  .app-header {
    padding: 0 22px;
    gap: 20px;
  }
  .header-divider {
    margin-left: 0;
  }
  .gesture-hint {
    display: none;
  }
  .map-heading h2 {
    font-size: 20px;
  }
  .map-heading {
    left: 22px;
  }
  .map-heading .breadcrumb {
    font-size: 9px;
  }
  .view-switch {
    right: 20px;
  }
  .view-switch button {
    padding: 8px;
  }
  .preview-badge {
    display: none;
  }
  .map-tools {
    right: 20px;
  }
  .map-footer {
    left: 22px;
    right: 20px;
  }
  #info-panel {
    left: 22px;
  }
  #module-detail-panel {
    right: 90px;
  }
}
@media (max-width: 760px) {
  :root {
    --header: 66px;
    --sidebar: 0px;
  }
  .app-header {
    padding: 0 18px;
    gap: 12px;
  }
  .brand {
    font-size: 23px;
  }
  .brand-mark {
    transform: scale(0.85) skewY(-15deg);
  }
  .header-title,
  .header-divider,
  .account-label {
    display: none;
  }
  #top-bar {
    gap: 12px;
  }
  .top-bar-btn {
    padding: 7px;
  }
  .site-heading {
    margin-bottom: 19px;
  }
  #explorer-sidebar {
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px #23344918;
    transition: transform 0.22s;
  }
  .directory-open #explorer-sidebar {
    transform: translateX(0);
  }
  .map-heading {
    top: 21px;
    left: 15px;
  }
  .map-heading h2 {
    font-size: 18px;
    letter-spacing: -0.5px;
    max-width: 260px;
  }
  .breadcrumb {
    font-size: 9px;
    gap: 6px;
  }
  #directory-toggle {
    display: grid;
    background: #fff;
    width: 34px;
    height: 34px;
    border: 1px solid #e0e8f1;
  }
  .view-switch {
    top: 100px;
    left: 16px;
    right: auto;
  }
  .map-tools {
    right: 14px;
    top: 48%;
  }
  .map-footer {
    left: 16px;
    right: 15px;
    bottom: 17px;
  }
  .map-legend {
    gap: 10px;
    padding: 9px 10px;
  }
  .map-legend span {
    font-size: 8px;
  }
  #info-panel {
    left: 16px;
    bottom: 75px;
    width: 230px;
    padding: 13px 15px;
  }
  #info-panel h3 {
    font-size: 20px;
  }
  #module-detail-panel {
    top: auto;
    bottom: 76px;
    right: 15px;
    width: 205px;
    max-height: 45vh;
    overflow: auto;
  }
  .panel-content {
    padding: 16px;
  }
  .detail-item {
    margin: 8px 0;
  }
  .detail-label {
    font-size: 10px;
  }
  .pill {
    font-size: 9px;
    max-width: 112px;
  }
  body.detail-view #info-panel {
    bottom: auto;
    top: 160px;
    width: 205px;
  }
  #locker-label-controls {
    right: 15px;
    top: 100px;
    width: 165px;
  }
  .panel-header {
    padding: 10px 12px;
  }
  .panel-header h4 {
    font-size: 10px;
  }
  .panel-body {
    padding: 0 12px 12px;
  }
  .panel-body > div {
    font-size: 10px;
  }
  .control-panel {
    right: 61px;
  }
  .modal-content {
    padding: 25px;
  }
  .map-tools button {
    height: 34px;
    width: 31px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the interior unobstructed on phones; room context becomes a compact tray. */
@media (max-width: 760px) {
  body.detail-view #info-panel {
    top: auto;
    bottom: 76px;
    width: calc(100% - 80px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 10px;
    padding: 12px;
  }
  body.detail-view #info-panel .selection-heading,
  body.detail-view #info-status-container,
  body.detail-view #occupancy-stats {
    display: none;
  }
  body.detail-view #info-panel h3 {
    font-size: 17px;
    margin: 0;
  }
  body.detail-view #selection-meta {
    font-size: 9px;
    margin: 0;
  }
  body.detail-view #btnBackToOverview {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
    width: 94px;
    font-size: 10px;
    padding: 7px 8px;
  }
  body.detail-view #module-detail-panel {
    bottom: 154px;
  }
}

/* The parent page supplies the shared MyStorage header and language switcher. */
:root { --header: 0px; }
.app-header { display: none; }
