/* Virtual Tour Studio v50.21 — refinement of existing workflows only.
   This layer does not add product capabilities. It closes visual and state
   inconsistencies in Dashboard, Publish Center, Studio and public player. */
:root{
  --v521-ink:#12151d;
  --v521-muted:#667085;
  --v521-line:#dfe3ea;
  --v521-soft:#f6f7f9;
  --v521-accent:#625cf2;
  --v521-accent-soft:#f1f0ff;
  --v521-success:#147a55;
  --v521-warning:#a56514;
  --v521-danger:#b93845;
  --v521-shadow:0 18px 50px rgba(17,24,39,.075);
}

body.v521-existing-perfection :where(button,a,input,select,textarea):focus-visible{
  outline:3px solid rgba(98,92,242,.34)!important;
  outline-offset:3px!important;
}
body.v521-existing-perfection :where(button,a){touch-action:manipulation}

/* Dashboard: reduce visual noise, keep one clear hierarchy and preserve real data. */
body.v47-dashboard.v521-existing-perfection .v47-page-head h1{
  letter-spacing:-.045em!important;
  line-height:.98!important;
}
body.v47-dashboard.v521-existing-perfection .v508-dashboard-overview{align-items:stretch!important}
body.v47-dashboard.v521-existing-perfection .v47-continue-copy{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
body.v47-dashboard.v521-existing-perfection .v47-continue-copy h2{
  max-width:590px!important;
  font-size:clamp(34px,2.45vw,40px)!important;
  line-height:1.035!important;
  letter-spacing:-.045em!important;
}
body.v47-dashboard.v521-existing-perfection .v47-continue-copy p{font-size:13px!important;color:#aeb4c2!important}
body.v47-dashboard.v521-existing-perfection .v47-continue-copy .v47-btn{min-height:44px!important}
body.v47-dashboard.v521-existing-perfection .v508-workspace-card{
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  border-radius:26px!important;
}
body.v47-dashboard.v521-existing-perfection .v508-workspace-steps{display:grid!important;gap:9px!important}
body.v47-dashboard.v521-existing-perfection .v508-workspace-steps>div{
  border:1px solid #eceef2!important;
  background:#f8f9fb!important;
}
body.v47-dashboard.v521-existing-perfection #recentGrid .v47-card-copy>b,
body.v47-dashboard.v521-existing-perfection #mediaGrid .v47-card-copy>b,
body.v47-dashboard.v521-existing-perfection #publishedGrid .v47-card-copy>b{
  white-space:normal!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  line-height:1.3!important;
}
body.v47-dashboard.v521-existing-perfection #quickStartGrid>button{
  grid-template-columns:46px minmax(0,1fr) 28px!important;
  padding:16px!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease!important;
}
body.v47-dashboard.v521-existing-perfection #quickStartGrid>button:hover{
  transform:translateY(-2px)!important;
  border-color:#ccd1dc!important;
  box-shadow:0 16px 36px rgba(24,27,36,.08)!important;
}
body.v47-dashboard.v521-existing-perfection #quickStartGrid>button>span{min-width:0!important}
body.v47-dashboard.v521-existing-perfection #quickStartGrid>button>span>b{
  display:block!important;
  color:var(--v521-ink)!important;
  line-height:1.25!important;
}
body.v47-dashboard.v521-existing-perfection #quickStartGrid>button>span>small{
  display:block!important;
  margin-top:4px!important;
  color:#72798a!important;
  line-height:1.4!important;
}
body.v47-dashboard.v521-existing-perfection .v47-create-type,
body.v47-dashboard.v521-existing-perfection .v47-source{
  position:relative!important;
  overflow:hidden!important;
}
body.v47-dashboard.v521-existing-perfection .v47-create-type.selected::after,
body.v47-dashboard.v521-existing-perfection .v47-source.selected::after{
  content:"✓";
  position:absolute;
  right:13px;
  top:13px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--v521-accent);
  color:#fff;
  font-size:12px;
  font-weight:900;
  box-shadow:0 7px 18px rgba(98,92,242,.24);
}
body.v47-dashboard.v521-existing-perfection .v47-create-type.selected,
body.v47-dashboard.v521-existing-perfection .v47-source.selected{padding-right:48px!important}

/* Publish Center: every score must have a matching explanation. */
body.pc-body.v521-existing-perfection .pc-content{padding-bottom:64px!important}
body.pc-body.v521-existing-perfection .pc-hero{
  border-color:#dfe3ea!important;
  background:linear-gradient(145deg,#fff,#fbfbff)!important;
}
body.pc-body.v521-existing-perfection .pc-hero h1{
  max-width:720px!important;
  font-size:clamp(38px,3.7vw,58px)!important;
  letter-spacing:-.052em!important;
}
body.pc-body.v521-existing-perfection .pc-gate{position:relative!important;overflow:hidden!important}
body.pc-body.v521-existing-perfection .pc-gate::after{
  content:"";
  position:absolute;
  inset:auto 14px 0;
  height:3px;
  border-radius:999px;
  background:#dfe3ea;
}
body.pc-body.v521-existing-perfection .pc-gate.is-high::after{background:#625cf2}
body.pc-body.v521-existing-perfection .pc-gate.is-medium::after{background:#d99b3b}
body.pc-body.v521-existing-perfection .pc-gate.is-low::after{background:#d35a66}
body.pc-body.v521-existing-perfection .pc-gate.is-low b{color:var(--v521-danger)!important}
body.pc-body.v521-existing-perfection .pc-gate.is-medium b{color:var(--v521-warning)!important}
body.pc-body.v521-existing-perfection .pc-grid.two{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  align-items:start!important;
}
body.pc-body.v521-existing-perfection .pc-grid.two>.pc-card{min-height:0!important;height:auto!important}
body.pc-body.v521-existing-perfection .pc-findings{
  min-height:0!important;
  display:grid!important;
  gap:9px!important;
  align-content:start!important;
}
body.pc-body.v521-existing-perfection .pc-findings.v518-findings-empty{min-height:0!important}
body.pc-body.v521-existing-perfection .pc-issue{
  min-height:58px!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr)!important;
  gap:11px!important;
  align-items:start!important;
  padding:12px 13px!important;
  border:1px solid #e3e6ec!important;
  border-radius:14px!important;
  background:#fff!important;
}
body.pc-body.v521-existing-perfection .pc-issue>i{
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#fff4e8!important;
  color:#a56514!important;
  font-style:normal!important;
  font-weight:900!important;
}
body.pc-body.v521-existing-perfection .pc-issue.error>i{background:#fff0f1!important;color:#b93845!important}
body.pc-body.v521-existing-perfection .pc-issue.manual>i{background:#ecf8f2!important;color:#147a55!important}
body.pc-body.v521-existing-perfection .pc-issue>div{min-width:0!important;display:grid!important;gap:3px!important}
body.pc-body.v521-existing-perfection .pc-issue small{
  color:#858b99!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
body.pc-body.v521-existing-perfection .pc-issue span{
  color:#252936!important;
  font-size:12px!important;
  line-height:1.45!important;
}
body.pc-body.v521-existing-perfection .pc-issue em{color:#8a909d!important;font-size:10px!important;font-style:normal!important}
body.pc-body.v521-existing-perfection .pc-empty-mini{
  min-height:128px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:6px!important;
  padding:22px!important;
  border:1px dashed #d5d9e2!important;
  border-radius:16px!important;
  background:#fafbfc!important;
  color:#6f7685!important;
}
body.pc-body.v521-existing-perfection .pc-empty-mini b{color:#252936!important;font-size:13px!important}
body.pc-body.v521-existing-perfection .pc-empty-mini span{font-size:11px!important;line-height:1.5!important}
body.pc-body.v521-existing-perfection .pc-empty-mini.is-success{border-style:solid!important;border-color:#d4eadf!important;background:#f4fbf7!important}
body.pc-body.v521-existing-perfection .pc-link-row>div>span{
  display:block!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#7a8190!important;
}
body.pc-body.v521-existing-perfection .pc-link-row>a{min-width:94px!important;justify-content:center!important}

/* Studio: retain canvas dominance, but stop hiding scene identity and context. */
body.v22-studio.v521-existing-perfection .sidebar{width:252px!important;min-width:252px!important}
body.v22-studio.v521-existing-perfection .scene-room-header{min-height:38px!important;height:auto!important;padding-block:5px!important}
body.v22-studio.v521-existing-perfection .scene-room-header b{
  white-space:normal!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  line-height:1.25!important;
}
body.v22-studio.v521-existing-perfection .scene-row{
  min-height:58px!important;
  height:auto!important;
  padding:7px!important;
  border-radius:12px!important;
}
body.v22-studio.v521-existing-perfection .scene-copy{min-width:0!important}
body.v22-studio.v521-existing-perfection .scene-copy>b{
  white-space:normal!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  line-height:1.22!important;
  font-size:11.5px!important;
}
body.v22-studio.v521-existing-perfection .scene-row.active{
  border-color:#b9b5fb!important;
  background:linear-gradient(90deg,#f0efff,#fafaff)!important;
  box-shadow:inset 3px 0 var(--v521-accent),0 8px 20px rgba(67,58,170,.07)!important;
}
body.v22-studio.v521-existing-perfection .scene-row:focus-visible{outline-offset:-1px!important}
body.v22-studio.v521-existing-perfection .inspector-head,
body.v22-studio.v521-existing-perfection .tabs{
  position:sticky!important;
  top:0!important;
  z-index:12!important;
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(14px)!important;
}
body.v22-studio.v521-existing-perfection .tabs{top:61px!important;border-bottom:1px solid #e5e7ec!important}
body.v22-studio.v521-existing-perfection .tab{min-height:44px!important}
body.v22-studio.v521-existing-perfection .v515-route-card,
body.v22-studio.v521-existing-perfection .v515-route-hero,
body.v22-studio.v521-existing-perfection .selected-hotspot{
  border-radius:18px!important;
  box-shadow:0 10px 28px rgba(20,24,35,.04)!important;
}
body.v22-studio.v521-existing-perfection .v515-route-option small{color:#72798a!important;line-height:1.45!important}
body.v22-studio.v521-existing-perfection .v515-route-actions .btn,
body.v22-studio.v521-existing-perfection .v515-simulator-button{border-radius:13px!important}
body.v22-studio.v521-existing-perfection .viewer-status{line-height:1.45!important}

/* Public player: preserve the scene as the product and refine existing cards. */
body.v521-existing-perfection .intro-card{
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 34px 100px rgba(0,0,0,.42)!important;
}
body.v521-existing-perfection .intro-card h1{letter-spacing:-.05em!important;line-height:1.02!important}
body.v521-existing-perfection .intro-start{min-height:50px!important;border-radius:14px!important}
body.v521-existing-perfection .info-card,
body.v521-existing-perfection .interaction-public-card,
body.v521-existing-perfection .exhibit-public-card{
  border-color:rgba(255,255,255,.17)!important;
  box-shadow:0 34px 100px rgba(0,0,0,.40)!important;
}
body.v521-existing-perfection .interaction-public-options button{min-height:58px!important}
body.v521-existing-perfection .exhibit-public-body,
body.v521-existing-perfection .info-card p{line-height:1.65!important}

@media(max-width:1180px){
  body.v22-studio.v521-existing-perfection .sidebar{width:236px!important;min-width:236px!important}
}
@media(max-width:900px){
  body.pc-body.v521-existing-perfection .pc-grid.two{grid-template-columns:1fr!important}
  body.v22-studio.v521-existing-perfection .sidebar{width:100%!important;min-width:0!important}
}
@media(max-width:620px){
  body.v47-dashboard.v521-existing-perfection .v47-continue-copy h2{font-size:29px!important}
  body.v47-dashboard.v521-existing-perfection #quickStartGrid>button{grid-template-columns:42px minmax(0,1fr) 24px!important;padding:14px!important}
  body.pc-body.v521-existing-perfection .pc-hero h1{font-size:34px!important}
  body.pc-body.v521-existing-perfection .pc-issue{grid-template-columns:28px minmax(0,1fr)!important;padding:11px!important}
  body.v521-existing-perfection .intro-card{padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
}
@media(prefers-reduced-motion:reduce){
  body.v521-existing-perfection *,body.v521-existing-perfection *::before,body.v521-existing-perfection *::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* Final scene-list geometry: full names without stealing canvas width. */
body.v22-studio.v521-existing-perfection .scene-row{
  position:relative!important;
  grid-template-columns:78px minmax(0,1fr)!important;
}
body.v22-studio.v521-existing-perfection .scene-thumb{width:78px!important;height:50px!important}
body.v22-studio.v521-existing-perfection .scene-actions{
  position:absolute!important;
  right:6px!important;
  top:6px!important;
  z-index:3!important;
  opacity:0!important;
  padding:2px!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 8px 20px rgba(20,24,34,.12)!important;
  transition:opacity .14s ease!important;
}
body.v22-studio.v521-existing-perfection .scene-row:hover .scene-actions,
body.v22-studio.v521-existing-perfection .scene-row:focus-within .scene-actions{opacity:1!important}
body.v22-studio.v521-existing-perfection .scene-room-header>div{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:1px!important;
}
body.v22-studio.v521-existing-perfection .scene-room-header small{line-height:1.2!important}
body.v22-studio.v521-existing-perfection .scene-row{min-height:76px!important}
body.v22-studio.v521-existing-perfection .scene-copy>b{-webkit-line-clamp:3!important}
