.section.bim-viewer-section{
  --bim-viewer-width: 1240px;
  width: var(--bim-viewer-width);
  max-width: calc(100vw - 24px);
  margin: 18px calc(50% - 620px) 0;
  padding: clamp(18px, 3vw, 26px);
  overflow: visible;
}

.bim-viewer-heading{
  max-width: 820px;
  margin: 0 auto 16px;
  text-align: center;
}

.bim-viewer-section .bim-viewer-title{
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.15;
}

.bim-viewer-heading p{
  margin: 0 auto;
  max-width: 760px;
  color: #dff6ff;
  line-height: 1.7;
}

.bim-viewer-shell{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.bim-viewer-canvas{
  position: relative;
  min-height: 520px;
  height: min(72vh, 720px);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0,224,255,.12), rgba(0,0,0,0) 44%),
    #05070a;
  border: 1px solid rgba(0,217,255,.32);
  box-shadow: 0 18px 42px rgba(0,217,255,.12), inset 0 0 0 1px rgba(255,255,255,.04);
}

.bim-viewer-model{
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  background: transparent;
}

.bim-viewer-model canvas{
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

.bim-viewer-placeholder{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #eaf8ff;
  background:
    radial-gradient(circle at 50% 38%, rgba(0,224,255,.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
}

.bim-viewer-placeholder strong{
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: .01em;
}

.bim-viewer-placeholder span{
  display: block;
  max-width: 430px;
  color: #bfefff;
  line-height: 1.55;
}

.bim-viewer-placeholder[hidden]{
  display: none;
}

.bim-viewer-panel{
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.45fr) minmax(260px, .95fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.bim-viewer-status,
.bim-viewer-info,
.bim-viewer-tip{
  border: 1px solid rgba(0,217,255,.24);
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  color: #dff6ff;
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.bim-viewer-status{
  padding: 12px 13px;
  min-height: 100%;
  font-weight: 700;
}

.bim-viewer-info,
.bim-viewer-tip{
  padding: 12px;
  font-size: .92rem;
}

.bim-viewer-info b{
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.bim-viewer-actions{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.bim-viewer-actions button,
.bim-viewer-actions a{
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,217,255,.36);
  background: rgba(0,217,255,.10);
  color: #eaf8ff;
  font: 800 .86rem/1.2 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.bim-viewer-actions button:hover,
.bim-viewer-actions a:hover{
  transform: translateY(-1px);
  border-color: rgba(0,217,255,.62);
  background: rgba(0,217,255,.16);
}

.bim-viewer-actions button:disabled{
  cursor: wait;
  opacity: .68;
  transform: none;
}

.bim-viewer-actions .primary-control{
  grid-column: span 2;
  background: linear-gradient(90deg, #ffffff, rgba(255,255,255,.86));
  color: #001018;
  border-color: rgba(255,255,255,.72);
}

.bim-viewer-actions .download-link{
  background: rgba(255,255,255,.06);
}

.bim-viewer-tip{
  grid-column: 1 / -1;
}

@media (max-width: 1264px){
  .section.bim-viewer-section{
    --bim-viewer-width: calc(100vw - 24px);
    margin-right: calc(50% - 50vw + 12px);
    margin-left: calc(50% - 50vw + 12px);
  }
}

@media (max-width: 880px){
  .section.bim-viewer-section{
    --bim-viewer-width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .bim-viewer-canvas{
    min-height: 340px;
    height: min(62vh, 520px);
  }

  .bim-viewer-panel{
    grid-template-columns: 1fr;
  }

  .bim-viewer-status{
    min-height: 64px;
  }

  .bim-viewer-tip{
    grid-column: auto;
  }

  .bim-viewer-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px){
  .bim-viewer-canvas{
    min-height: 300px;
    height: 58vh;
  }

  .bim-viewer-actions{
    grid-template-columns: 1fr;
  }

  .bim-viewer-actions .primary-control{
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce){
  .bim-viewer-actions button,
  .bim-viewer-actions a{
    transition: none !important;
  }

  .bim-viewer-actions button:hover,
  .bim-viewer-actions a:hover{
    transform: none;
  }
}
