:root {
  --ink: #1c2f2b;
  --muted: #506864;
  --stroke: rgba(28, 47, 43, 0.12);
  --accent: #0090b1;
  --accent-deep: #0090b1;
  --accent-soft: #0090b1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Work Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: #fff;
  background-color: #fff;
}

.page {
  padding: 0;
}

.plan-wrap {
  position: relative;
  height: var(--plan-height, 70vh);
  overflow: hidden;
  background: #f1f1f1;
  width: 100%;
  max-width: 100%;
  min-height: 320px;
}

.svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.svg-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.panzoom {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  cursor: grab;
  touch-action: none;
}

.plan-wrap.is-panning .panzoom {
  cursor: grabbing;
}

.unit {
  cursor: pointer;
  transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
}

.unit:not(.is-active):hover,
.unit:not(.is-active):focus-visible {
  fill: var(--accent-soft);
  filter: none;
}

.unit:not(.is-active):hover [fill]:not([fill="none"]),
.unit:not(.is-active):focus-visible [fill]:not([fill="none"]) {
  fill: var(--accent-soft);
}

.unit.is-active {
  fill: var(--accent-soft);
  stroke: none;
  filter: none;
}

.unit.is-active [fill]:not([fill="none"]) {
  fill: var(--accent-soft);
  stroke: none;
}

.unit:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

.unit:focus {
  outline: none;
}

.unit-labels {
  pointer-events: none;
}

.unit-label {
  font-family: "Work Sans", "Trebuchet MS", sans-serif;
  font-weight: 600;
  fill: #1c2f2b;
  text-rendering: geometricPrecision;
}

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -120%) scale(0.96);
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(28, 47, 43, 0.12);
  box-shadow: 0 18px 40px rgba(12, 29, 28, 0.18);
  padding: 14px 16px 16px;
  min-width: 220px;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 5;
}

.bubble-default {
  z-index: 5;
  pointer-events: none;
}

.bubble-active {
  z-index: 6;
}

.bubble-default.is-visible {
  pointer-events: none;
}

.bubble.is-visible {
  opacity: 1;
  transform: translate(-50%, -125%) scale(1);
  pointer-events: auto;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-right: 1px solid rgba(28, 47, 43, 0.12);
  border-bottom: 1px solid rgba(28, 47, 43, 0.12);
  transform: translateX(-50%) rotate(45deg);
}

.bubble-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bubble-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #0f5f5f;
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}

.bubble-text {
  display: grid;
  gap: 4px;
}

.bubble-tenant {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.bubble-unit {
  font-size: 0.9rem;
  color: var(--muted);
}

.bubble-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f5f5f;
  text-decoration: none;
  margin-top: 6px;
}

.bubble-link::after {
  content: "→";
  font-size: 1rem;
}

.bubble-link:hover {
  color: #0a3f3f;
  text-decoration: underline;
}

.plan-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 6;
}

.floor-switcher {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 47, 43, 0.12);
  box-shadow: 0 10px 24px rgba(12, 29, 28, 0.12);
  z-index: 6;
}

.floor-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.floor-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(28, 47, 43, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.floor-btn:hover {
  background: #fff;
}

.floor-btn.is-active,
.floor-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: rgba(0, 0, 0, 0);
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(28, 47, 43, 0.15);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

.zoom-btn:hover {
  background: #fff;
}

@media (max-width: 640px) {
  .plan-wrap {
    min-height: 280px;
  }

  .plan-controls {
    right: 10px;
    bottom: 10px;
  }

  .floor-switcher {
    left: 10px;
    bottom: 10px;
    gap: 6px;
    padding: 6px 8px;
  }

  .floor-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
}

.bubble-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: none;
  background: rgba(28, 47, 43, 0.08);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.bubble-close:hover {
  background: rgba(28, 47, 43, 0.16);
}
