/* Ширина содержимого и панорамы подстраивается под окно. */
.wrap{width:100%;max-width:1600px;padding-inline:clamp(16px,3vw,48px)}
.grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.card,.panel,.intro{min-width:0;overflow-wrap:anywhere}
.detail-grid .panel p{white-space:pre-line}
.tour{width:100%;aspect-ratio:16/9;min-height:0}
.top,.sub,.sub-actions,.sub-contact{min-width:0}
@media(max-width:1300px){.top{flex-wrap:wrap;min-height:80px}.menu-toggle{display:block;background:transparent;border:1px solid #888;color:#fff;padding:10px;margin-left:auto}.nav{display:none;order:4;flex-basis:100%;align-items:flex-start;flex-direction:column;gap:0}.nav.open{display:flex}.nav a{padding:10px 0}}
@media(max-width:950px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sub{flex-wrap:wrap}.sub-actions,.sub-contact{flex-wrap:wrap}}
@media(max-width:650px){.grid,.detail-grid{grid-template-columns:minmax(0,1fr)}.tour{aspect-ratio:4/3;min-height:220px}.header-brand{min-width:0}.sub-actions,.sub-contact{justify-content:space-between}.top{gap:10px}.callback{white-space:normal}}
@media(max-width:380px){.top{justify-content:space-between}.callback{order:3}.sub-actions,.sub-contact{justify-content:flex-start}.phone{width:100%}footer{overflow-wrap:anywhere}.footer-branch>a{white-space:normal}}

/* Компактные общие плашки для панели и небольших экранов. */
@media(min-width:1051px){
  .top{min-height:0;padding:10px clamp(20px,3vw,48px);gap:20px}
  .header-top{border-bottom-width:2px}
  .header-brand{min-width:180px;gap:12px;font-size:20px;line-height:1.3;letter-spacing:2px}
  .header-brand img{width:40px;height:40px}
  .nav{gap:clamp(16px,2.2vw,35px);font-size:16px}
  .callback{padding:13px 22px}
  .sub{min-height:0;padding:10px clamp(20px,3vw,48px)}
  footer{min-height:0;padding:30px clamp(20px,4vw,64px);gap:30px}
  .footer-logo{font-size:20px;letter-spacing:2px}
  .footer-logo img{width:50px;height:50px}
  .footer-brand .social{margin:10px 0 0 30px}
  .footer-branch{padding-top:8px}
  .footer-branch h3{margin-bottom:10px}
}
@media(max-width:1050px){
  .top{min-height:0;padding:10px 16px;gap:12px}
  .header-top{border-bottom-width:2px}
  .header-brand{min-width:0;gap:10px;font-size:18px;line-height:1.25;letter-spacing:2px}
  .header-brand img{width:38px;height:38px}
  .menu-toggle{padding:9px 12px}
  .callback{padding:11px 16px}
  .sub{min-height:0;padding:10px 16px;gap:12px}
  .sub-actions,.sub-contact{gap:16px}
  .phone{font-size:17px}
  footer{min-height:0;padding:28px 4% 32px;gap:20px;grid-template-columns:minmax(0,1.1fr) repeat(2,minmax(0,1fr))}
  .footer-logo{font-size:16px;letter-spacing:2px;gap:8px}
  .footer-logo img{width:46px;height:46px}
  .footer-brand .social{margin:10px 0 0}
  .footer-branch{padding-top:8px}
  .footer-branch h3{margin:0 0 10px}
  .footer-branch>a{font-size:16px}
}
@media(max-width:650px){
  .top{gap:8px}.header-brand{font-size:16px;letter-spacing:1px}.header-brand img{width:34px;height:34px}
  .callback{padding:10px;font-size:12px}.sub-actions,.sub-contact{width:100%}
  footer{grid-template-columns:repeat(2,minmax(0,1fr));padding:24px 18px;gap:14px 18px}
  .footer-brand{grid-column:1/-1}.footer-branch{padding-top:0}
}
@media(max-width:420px){
  .top{justify-content:space-between}.menu-toggle{margin-left:auto}
  .callback{order:0}.sub-actions,.sub-contact{justify-content:flex-start;gap:10px}
  .phone{width:auto}.footer-branch>a{font-size:14px;white-space:normal}
}
@media(max-width:340px){.callback{order:3}.footer-branch{grid-column:1/-1}}

/* Компактное окно тура сохраняет пропорции на узких экранах. */
.tour{aspect-ratio:auto;height:clamp(240px,45vw,480px);min-height:0}

/* Характеристики объекта располагаются отдельными строками. */
#object .facts{flex-direction:column;align-items:flex-start;gap:8px}

/* Пустые материалы не занимают место; список работ остаётся читаемым. */
#object .detail-grid.no-materials{grid-template-columns:minmax(0,1fr)}
#object .detail-grid.no-materials .panel:first-child{max-width:800px;width:100%}
#object .detail-grid .panel:first-child > .eyebrow{display:none}
#object .detail-grid .panel:nth-child(2) > .eyebrow,#object .detail-grid .panel:nth-child(2) > p,#object .detail-grid .panel:nth-child(2) > a{display:none}
.materials-list{display:grid;gap:12px}.materials-list a{color:#f00060}

/* Компактные характеристики объекта. */
#object .facts{display:block;width:min(100%,420px);margin:22px 0 0}
#object .fact-row{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid #383838;line-height:1.4}
#object .fact-label{color:#999}
#object .fact-value{color:#f7f7f7;text-align:right}

/* Название и характеристики рядом, тур расположен сразу под ними. */
#object:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,340px);column-gap:clamp(24px,5vw,72px);padding-top:48px}
#object .intro{display:contents}
#object .intro > a,#object .intro > h1,#object .intro > p{grid-column:1}
#object .intro > h1{margin:16px 0 0}
#object .intro > p{margin:12px 0 24px}
#object .facts{grid-column:2;grid-row:1 / span 3;align-self:center;width:100%;margin:0 0 24px}
#object .tour,#object .detail-grid{grid-column:1 / -1}
@media(max-width:750px){
  #object:not([hidden]){grid-template-columns:minmax(0,1fr);padding-top:32px}
  #object .intro > a,#object .intro > h1,#object .intro > p{grid-column:1}
  #object .facts{grid-column:1;grid-row:5;margin:20px 0 0;max-width:420px}
  #object .tour{grid-column:1;grid-row:4}
  #object .detail-grid{grid-column:1;grid-row:6}
}

/* Характеристики перенесены в описание; видеоплееры сохраняют пропорции. */
#object .detail-grid .facts{width:100%;max-width:none;margin:0 0 24px}
#object .detail-grid .facts .fact-row:first-child{border-top:1px solid #383838}
#object .materials-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#object .video-card{min-width:0}
#object .video-card iframe{display:block;width:100%;aspect-ratio:9/16;border:0;background:#222}
#object .video-card a{display:inline-block;margin-top:8px;font-size:14px}
@media(max-width:380px){#object .materials-list{grid-template-columns:1fr}}

#object .works-heading{font-size:18px;line-height:1.35;margin:28px 0 12px}
#object .works-heading + p{margin-top:0}

#object .intro > h1{font-size:clamp(32px,4.5vw,48px);line-height:1.1;letter-spacing:-.025em}
#object .detail-grid h2{font-size:clamp(22px,2.5vw,26px);line-height:1.2}

#catalog .card-body .arrow{display:inline-block;margin-top:12px}

#object .facts > p{font-size:13px;margin:8px 0 0}
