#spatial-calendar {
  --calendar-green: #00e676;
  --calendar-gold: #e6c288;
  --calendar-red: #e05a64;
  --calendar-selection: #5a9fd4;
  --calendar-line: rgba(255, 255, 255, 0.14);
  --calendar-muted: #a1a1aa;
  width: 100%;
  padding: clamp(18px, 3vw, 36px);
  color: #fff;
  background: #090909;
  font-family: "Inter", sans-serif;
}

.calendar-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 24px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--calendar-line);
}

.calendar-location,
.panel-kicker {
  margin: 0 0 8px;
  color: var(--calendar-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-date {
  margin: 0;
  color: #fff;
  font-family: "Syncopate", sans-serif;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 700;
  text-transform: lowercase;
}

.calendar-intro {
  max-width: 660px;
  margin: 0;
  color: #c7c7cc;
  font-size: 15px;
  line-height: 1.65;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 0 20px;
  color: #c7c7cc;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5d626a;
}

.legend-dot.is-available { background: var(--calendar-green); }
.legend-dot.is-inquiry { background: var(--calendar-gold); }
.legend-dot.is-booked { background: var(--calendar-red); }

.floorplan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: start;
}

.floorplan-column { min-width: 0; }

.package-strip {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(90, 159, 212, 0.48);
  border-radius: 2px;
  background: rgba(90, 159, 212, 0.07);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.package-strip:hover,
.package-strip:focus-visible,
.package-strip.is-active {
  border-color: var(--calendar-selection);
  background: rgba(90, 159, 212, 0.15);
}

.package-strip span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.package-strip strong {
  font-size: 14px;
  line-height: 1.3;
}

.package-strip small,
.package-action {
  color: #8fc5ec;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.package-action { white-space: nowrap; }

.map-viewport {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
  border: 1px solid var(--calendar-line);
  background: #050505;
  container-type: inline-size;
}

#floorplan-svg {
  display: block;
  width: 100%;
  height: auto;
}

#labels-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.room-rect {
  fill: #222428;
  stroke: #4b4f55;
  stroke-width: 3px;
  transition: fill 180ms ease, stroke 180ms ease, opacity 180ms ease;
}

g.is-interactive { cursor: pointer; }
g.is-interactive:hover .room-rect,
g.is-interactive:focus-visible .room-rect,
g.is-selected .room-rect {
  fill: #32363c;
  stroke: #fff;
  stroke-width: 6px;
}

g.is-available .room-rect {
  fill: rgba(0, 230, 118, 0.08);
  stroke: var(--calendar-green);
}

g.is-inquiry .room-rect {
  fill: rgba(230, 194, 136, 0.13);
  stroke: var(--calendar-gold);
  stroke-dasharray: 18 10;
}

g.is-booked .room-rect {
  fill: rgba(224, 90, 100, 0.11);
  stroke: var(--calendar-red);
}

g.is-package .room-rect {
  stroke: var(--calendar-selection);
  stroke-width: 7px;
  stroke-dasharray: none;
  animation: package-area-pulse 4s ease-in-out 1;
}

@keyframes package-area-pulse {
  0%, 100% { stroke-opacity: 0.45; }
  45%, 65% { stroke-opacity: 1; }
}

.label-container {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  display: flex;
  width: 18cqw;
  transform: translate(-50%, -50%);
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.label-container.is-interactive {
  pointer-events: auto;
  cursor: pointer;
}

.spatial-label {
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 3px #000;
  text-transform: uppercase;
}

.label-vertical { transform: rotate(-90deg); white-space: nowrap; }
.lbl-xl { font-size: 2.5cqw; }
.lbl-lg { font-size: 1.8cqw; }
.lbl-md { font-size: 1.55cqw; }

.studio-info-panel {
  position: sticky;
  top: 96px;
  padding: clamp(20px, 2.5vw, 30px);
  border: 1px solid var(--calendar-line);
  border-radius: 2px;
  background: #0d0d0e;
}

.studio-info-panel h2 {
  margin: 0 0 14px;
  font-family: "Syncopate", sans-serif;
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.35;
}

.studio-info-panel > p:not(.panel-kicker) {
  margin: 0;
  color: #c7c7cc;
  font-size: 14px;
  line-height: 1.65;
}

.panel-facts {
  margin: 24px 0;
  border-top: 1px solid var(--calendar-line);
}

.panel-facts > div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--calendar-line);
}

.panel-facts dt {
  color: var(--calendar-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.panel-facts dd {
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
}

.panel-actions {
  display: grid;
  gap: 10px;
}

.primary-action,
.secondary-action {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 1px solid #fff;
  border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.primary-action {
  border-color: var(--calendar-green);
  background: var(--calendar-green);
  color: #000;
}

.primary-action:hover { background: #fff; border-color: #fff; }
.secondary-action { color: #fff; }
.secondary-action:hover { background: #fff; color: #000; }

.shared-access-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(230, 194, 136, 0.35);
}

.shared-access-note strong {
  color: var(--calendar-gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.shared-access-note p {
  margin: 8px 0 0;
  color: #b8b8bd;
  font-size: 12px;
  line-height: 1.55;
}

#calendar-picker[hidden] { display: none; }

#calendar-picker {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.picker-content {
  width: min(100%, 420px);
  padding: 20px;
  border: 1px solid #3f3f46;
  border-radius: 2px;
  background: #090909;
  color: #fff;
}

.picker-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  text-align: center;
}

.picker-header strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.picker-nav-btn,
.picker-close {
  min-height: 42px;
  border: 1px solid #52525b;
  border-radius: 2px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.picker-nav-btn { font-size: 25px; }
.picker-nav-btn:hover,
.picker-close:hover { background: #fff; color: #000; }

.picker-weekdays,
.picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.picker-weekdays { margin-bottom: 5px; }

.picker-weekdays span {
  padding: 5px 0;
  color: var(--calendar-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-align: center;
  text-transform: uppercase;
}

.picker-day,
.picker-empty {
  aspect-ratio: 1;
}

.picker-day {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #27272a;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  cursor: pointer;
}

.picker-day:hover,
.picker-day.is-selected {
  border-color: var(--calendar-green);
  color: var(--calendar-green);
}

.picker-close {
  width: 100%;
  margin-top: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .calendar-summary,
  .floorplan-layout {
    grid-template-columns: 1fr;
  }

  .studio-info-panel { position: static; }
}

@media (max-width: 560px) {
  #spatial-calendar { padding: 16px; }

  .calendar-summary { gap: 12px; }
  .calendar-intro { font-size: 13px; }
  .calendar-legend { gap: 12px; font-size: 9px; }

  .package-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .package-action { white-space: normal; }

  .map-viewport { width: 100%; }
  .lbl-xl { font-size: 5cqw; }
  .lbl-lg { font-size: 4cqw; }
  .lbl-md { font-size: 3.3cqw; }

  .studio-info-panel h2 { font-size: 17px; }
  .panel-facts > div { grid-template-columns: 82px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .room-rect { transition: none; }
  g.is-package .room-rect { animation: none; }
}
