.tspc-root {
  margin: 0;
  padding: clamp(1.5rem, 3.2vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(150deg, #0b1d23 0%, #132932 54%, #1d2226 100%);
  color: #ffffff;
  border-top: 2px solid #1aa3be;
  border-bottom: 2px solid #1aa3be;
  font-family: var(--tcr-font-sans, 'Inter', system-ui, sans-serif);
  box-sizing: border-box;
  overflow: hidden;
  --tspc-g-closets: 0.95;
  --tspc-g-wallbeds: 0.3;
  --tspc-g-office: 0.3;
  --tspc-g-pantry: 0.3;
  --tspc-g-specialties: 0.3;
  --tspc-g-laundry: 0.3;
  --tspc-g-mudroom: 0.3;
  --tspc-g-garages: 0.3;
  --tspc-spine-offset: 0px;
}

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

.tspc-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.tspc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1rem;
}

.tspc-head-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.tspc-eyebrow {
  margin: 0 0 0.28rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9dd8e4;
}

.tspc-root .tspc-title {
  margin: 0 0 0.32rem;
  font-family: var(--tcr-font-display, 'Quicksand', system-ui, sans-serif);
  font-size: clamp(1.42rem, 2.7vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  color: #ffffff;
}

.tspc-sub {
  margin: 0;
  font-size: clamp(0.88rem, 1.4vw, 0.98rem);
  font-weight: 300;
  line-height: 1.5;
  color: #d6e4e8;
  max-width: 62ch;
}

.tspc-head-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.tspc-sync-btn {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(157, 216, 228, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #eef6f8;
  font: 600 0.85rem/1.1 var(--tcr-font-sans, 'Inter', system-ui, sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tspc-sync-btn:hover {
  border-color: #9dd8e4;
  background: rgba(26, 163, 190, 0.22);
}

.tspc-sync-btn.tspc-is-on {
  background: #0a6575;
  border-color: #ffdfa0;
  color: #ffffff;
  box-shadow: 0 6px 18px -10px rgba(255, 223, 160, 0.55);
}

.tspc-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7cc9d8;
  flex: 0 0 auto;
}

.tspc-sync-btn.tspc-is-on .tspc-sync-dot {
  background: #ffdfa0;
  box-shadow: 0 0 8px #ffdfa0;
}

.tspc-sync-btn:focus-visible,
.tspc-room-btn:focus-visible {
  outline: 3px solid #ffdfa0;
  outline-offset: 2px;
}

.tspc-slot {
  flex: 0 0 auto;
}

.tspc-stage {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(26, 163, 190, 0.4);
  background: #0b1d23;
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.7);
}

.tspc-svg {
  display: block;
  width: 100%;
  height: auto;
}

.tspc-room {
  cursor: pointer;
}

.tspc-room-bg {
  transition: fill 0.3s ease;
}

.tspc-room-ring {
  opacity: 0;
  transition: opacity 0.28s ease;
}

.tspc-room-closets .tspc-room-glow { opacity: var(--tspc-g-closets); }
.tspc-room-wallbeds .tspc-room-glow { opacity: var(--tspc-g-wallbeds); }
.tspc-room-office .tspc-room-glow { opacity: var(--tspc-g-office); }
.tspc-room-pantry .tspc-room-glow { opacity: var(--tspc-g-pantry); }
.tspc-room-specialties .tspc-room-glow { opacity: var(--tspc-g-specialties); }
.tspc-room-laundry .tspc-room-glow { opacity: var(--tspc-g-laundry); }
.tspc-room-mudroom .tspc-room-glow { opacity: var(--tspc-g-mudroom); }
.tspc-room-garages .tspc-room-glow { opacity: var(--tspc-g-garages); }

.tspc-stage[data-tspc-active="closets"] .tspc-room-closets .tspc-room-ring,
.tspc-stage[data-tspc-active="wallbeds"] .tspc-room-wallbeds .tspc-room-ring,
.tspc-stage[data-tspc-active="office"] .tspc-room-office .tspc-room-ring,
.tspc-stage[data-tspc-active="pantry"] .tspc-room-pantry .tspc-room-ring,
.tspc-stage[data-tspc-active="specialties"] .tspc-room-specialties .tspc-room-ring,
.tspc-stage[data-tspc-active="laundry"] .tspc-room-laundry .tspc-room-ring,
.tspc-stage[data-tspc-active="mudroom"] .tspc-room-mudroom .tspc-room-ring,
.tspc-stage[data-tspc-active="garages"] .tspc-room-garages .tspc-room-ring {
  opacity: 1;
}

.tspc-stage[data-tspc-active="closets"] .tspc-room-closets .tspc-room-bg,
.tspc-stage[data-tspc-active="wallbeds"] .tspc-room-wallbeds .tspc-room-bg,
.tspc-stage[data-tspc-active="office"] .tspc-room-office .tspc-room-bg,
.tspc-stage[data-tspc-active="pantry"] .tspc-room-pantry .tspc-room-bg,
.tspc-stage[data-tspc-active="specialties"] .tspc-room-specialties .tspc-room-bg,
.tspc-stage[data-tspc-active="laundry"] .tspc-room-laundry .tspc-room-bg,
.tspc-stage[data-tspc-active="mudroom"] .tspc-room-mudroom .tspc-room-bg,
.tspc-stage[data-tspc-active="garages"] .tspc-room-garages .tspc-room-bg {
  fill: #18353f;
}

.tspc-conduit-flow {
  stroke-dashoffset: var(--tspc-spine-offset);
}

.tspc-bp {
  opacity: 0.42;
}

.tspc-wall-line,
.tspc-bp-line {
  stroke-dasharray: 2600;
  stroke-dashoffset: 0;
}

/* Pre-arrival blueprint-ready state only when JS + motion preference active */
@media (prefers-reduced-motion: no-preference) {
  html.tcrfx-js .tspc-root:not(.tspc-ready):not(.tspc-arrive) .tspc-millwork {
    opacity: 0.14;
  }
  html.tcrfx-js .tspc-root:not(.tspc-ready):not(.tspc-arrive) .tspc-room-glow {
    opacity: 0.08;
  }
  html.tcrfx-js .tspc-root:not(.tspc-ready):not(.tspc-arrive) .tspc-wall-line,
  html.tcrfx-js .tspc-root:not(.tspc-ready):not(.tspc-arrive) .tspc-bp-line {
    stroke-dashoffset: 2600;
  }
}

.tspc-root.tspc-arrive .tspc-wall-line,
.tspc-root.tspc-arrive .tspc-bp-line {
  animation: tspc-draw-plan 1.2s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}

.tspc-root.tspc-arrive .tspc-millwork {
  animation: tspc-fill-millwork 1.05s 0.55s ease-out both;
}

.tspc-root.tspc-arrive .tspc-room-glow {
  animation: tspc-bloom-glow 0.9s 1.1s ease-out both;
}

@keyframes tspc-draw-plan {
  0% { stroke-dashoffset: 2600; }
  100% { stroke-dashoffset: 0; }
}

@keyframes tspc-fill-millwork {
  0% { opacity: 0.14; }
  100% { opacity: 1; }
}

@keyframes tspc-bloom-glow {
  0% { opacity: 0.08; }
  100% { opacity: 0.55; }
}

.tspc-caption {
  margin-top: 0.9rem;
}

.tspc-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 223, 160, 0.42);
  background: rgba(10, 101, 117, 0.34);
}

.tspc-detail-badge {
  font-family: var(--tcr-font-display, 'Quicksand', system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.94rem;
  color: #ffdfa0;
  letter-spacing: 0.02em;
}

.tspc-detail-text {
  font-size: 0.9rem;
  color: #f0f6f8;
  line-height: 1.4;
}

.tspc-rooms {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.tspc-room-btn {
  width: 100%;
  height: 100%;
  min-height: 44px;
  text-align: left;
  padding: 0.68rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 216, 228, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #dce7eb;
  font: inherit;
  display: grid;
  align-content: start;
  gap: 0.25rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.24s ease, border-color 0.24s ease;
}

.tspc-room-btn:hover {
  background: rgba(26, 163, 190, 0.16);
  border-color: rgba(157, 216, 228, 0.56);
}

.tspc-item.tspc-is-active .tspc-room-btn {
  background: rgba(10, 101, 117, 0.44);
  border-color: #ffdfa0;
  color: #ffffff;
}

.tspc-item-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tspc-item-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9dd8e4;
  background: rgba(26, 163, 190, 0.22);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  line-height: 1.2;
}

.tspc-item.tspc-is-active .tspc-item-num {
  background: #ffdfa0;
  color: #0e242a;
}

.tspc-item-name {
  font-family: var(--tcr-font-display, 'Quicksand', system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.94rem;
  color: #ffffff;
  line-height: 1.2;
}

.tspc-item-desc {
  font-size: 0.79rem;
  line-height: 1.4;
  color: #dbe6ea;
}

@media (max-width: 860px) {
  .tspc-rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
}

@media (max-width: 440px) {
  .tspc-room-btn {
    padding: 0.62rem 0.68rem;
  }
  .tspc-item-desc {
    font-size: 0.75rem;
  }
}

html.tcrm-paused .tspc-root * {
  animation-play-state: paused !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .tspc-root,
  .tspc-root * {
    animation: none !important;
    transition: none !important;
  }
  .tspc-root .tspc-millwork { opacity: 1 !important; }
  .tspc-root .tspc-wall-line,
  .tspc-root .tspc-bp-line { stroke-dashoffset: 0 !important; }
}
