/* Mobile-only working surface; desktop retains the existing layout. */
/* Keep the close control reachable while a long dialog scrolls. */
.workspace{min-height:0}
dialog{overscroll-behavior:contain}
.modal-close{position:sticky;top:12px;right:auto;display:grid;place-items:center;width:44px;height:44px;margin:12px 12px -56px auto;flex-shrink:0}
body:has(dialog[open]){overflow:hidden}
.detail-gallery.small-art{min-height:220px}
.detail-gallery.small-art img{width:144px;height:144px}
.mobile-step-back,.mobile-step-picker,.mobile-next-step,.mobile-price-summary,.mobile-price-hint{display:none}
@media(max-width:900px),(max-width:1024px) and (max-height:600px){
 :root{--mobile-header:65px;--mobile-steps:58px;--mobile-footer:calc(94px + env(safe-area-inset-bottom,0px));--mobile-workspace:calc(100dvh - var(--mobile-header) - var(--mobile-steps) - var(--mobile-footer))}
 body{padding-bottom:var(--mobile-footer)}
 #configuration{position:sticky;top:var(--mobile-header);z-index:8;height:var(--mobile-steps);padding:0 16px 0 8px;display:flex;align-items:center;justify-content:flex-start;gap:8px;overflow:visible}
 #configuration>button[data-step]{display:none}
 #configuration .mobile-step-back{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;font-size:24px;color:#202423;padding:0}
 .mobile-step-picker{display:block;flex:1;min-width:0}
 .mobile-step-picker summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;cursor:pointer;list-style:none}
 .mobile-step-picker summary::-webkit-details-marker{display:none}
 .mobile-step-status{display:flex;align-items:baseline;gap:12px;min-width:0;flex-wrap:wrap}
 #mobile-step-count{font-size:12px;color:#6e746e;white-space:nowrap}
 #mobile-step-name{font-size:16px;font-weight:600;color:#202423;line-height:1.3}
 .mobile-step-chevron{font-size:22px;flex-shrink:0;color:#535c52}
 .mobile-step-menu{position:absolute;top:100%;left:0;right:0;display:grid;background:#fff;border-bottom:1px solid #dce0d9;box-shadow:0 18px 24px #0002;padding:8px 16px 16px;max-height:calc(100dvh - var(--mobile-header) - var(--mobile-steps));overflow:auto;overscroll-behavior:contain}
 #configuration .mobile-step-menu button{display:flex;align-items:center;gap:16px;min-height:48px;padding:12px 16px;text-align:left;font-size:16px;color:#424b40;border-radius:4px}
 #configuration .mobile-step-menu button span{display:inline;font-size:12px;margin:0;color:#747d70}
 #configuration .mobile-step-menu button.active{background:#eef2ea;color:#263422;font-weight:600}
 #configuration .mobile-step-menu button.active:after{content:none}
 .mobile-step-picker summary:focus-visible{outline:2px solid #ff5e2c;outline-offset:2px}

 .workspace{height:var(--mobile-workspace);min-height:320px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(170px,27dvh,235px) minmax(0,1fr)}
 .showroom,.showroom.is-interior{height:100%;min-height:0}
 .showroom-heading{top:12px;left:16px;right:12px;align-items:flex-start}
 .showroom-heading h1{font-size:23px;letter-spacing:-.8px;margin-bottom:5px}
 .showroom-heading p{font-size:12px}
 .view-switch{padding:3px}
 .view-switch button{font-size:12px;min-height:36px;padding:7px 9px}
 .viewer-bottom{left:12px;right:12px;bottom:8px;gap:6px;justify-content:flex-end}
 .specs{display:none}
 .viewer-bottom .icon-button{min-width:40px;width:40px;height:40px;font-size:22px;background:#ffffffe6}
 .showroom.is-interior .viewer-bottom{bottom:8px;right:12px}
 .showroom.is-interior .showroom-heading{top:12px;right:12px}
 .config-panel{min-height:0;overflow:hidden;border-top:1px solid #d5dbd1}
 .step-content{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:20px 16px 28px;scroll-padding:16px;-webkit-overflow-scrolling:touch}
 .panel-bottom{display:none}
 .section-heading{margin-bottom:16px}
 .section-heading h2{font-size:20px}
 .seat-switch button{min-height:44px;font-size:14px}
 .version-list{grid-template-columns:1fr;gap:10px}
 .version-card{padding:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:8px}
 .version-top{grid-column:1/-1}
 .version-top strong{font-size:18px}
 .version-card p{font-size:12px;line-height:1.6;margin:0;align-self:center}
 .version-card b{font-size:16px;font-weight:600;align-self:center;white-space:nowrap}
 .check{width:20px;height:20px;font-size:12px}
 .group-title{font-size:16px;line-height:1.4;margin:25px 0 12px}
 .group-title small{font-size:12px;line-height:1.5}
 .compact-options{grid-template-columns:1fr;gap:12px}
 .compact-card{display:grid;grid-template-columns:94px minmax(0,1fr);border-radius:5px}
 .compact-image{width:94px;height:100%;min-height:112px;aspect-ratio:auto}
 .compact-image img{width:100%;height:100%;object-fit:cover}
 .compact-body{padding:12px;gap:8px;min-width:0}
 .compact-body strong{font-size:14px;line-height:1.5}
 .compact-body .option-action{min-height:44px;font-size:14px;line-height:1.45;margin-top:auto}
 .compact-body p.change-note{font-size:12px;line-height:1.6}
 .included-label{font-size:13px;line-height:1.5;gap:8px}
 .workspace[data-step="1"] .compact-options,.workspace[data-step="2"] .compact-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .workspace[data-step="1"] .compact-card,.workspace[data-step="2"] .compact-card{display:flex;flex-direction:column}
 .workspace[data-step="1"] .compact-image,.workspace[data-step="2"] .compact-image{width:100%;height:100px;min-height:100px}
 .workspace[data-step="3"] .compact-card{display:flex;flex-direction:column}
 .workspace[data-step="3"] .compact-image{width:100%;height:auto;min-height:0;aspect-ratio:1.8}

 .catalog-view{height:var(--mobile-workspace);min-height:320px;overflow-y:auto;overscroll-behavior-y:contain;padding:20px 16px 28px;scroll-padding:16px;-webkit-overflow-scrolling:touch}
 .catalog-heading{gap:14px}
 .catalog-heading h2{font-size:24px}
 .catalog-heading p{font-size:13px;line-height:1.5}
 .catalog-heading .outline{font-size:14px;min-height:44px;padding:10px 14px}
 .search-box{min-height:46px}
 .search-box input{font-size:16px;min-height:44px}
 .catalog-toolbar{gap:12px}
 .filters button{min-height:44px;font-size:14px}
 .filters button small{font-size:12px}
 .scope-link{font-size:13px;white-space:normal;min-height:44px;text-align:left}
 .selected-filter{font-size:13px;min-height:44px}
 .selected-filter input{width:20px;height:20px}
 .catalog-grid{grid-template-columns:1fr;gap:16px}
 .catalog-section-title{font-size:18px;line-height:1.4;margin:8px 0 0}
 .catalog-section-title span{font-size:12px}
 .product-image{aspect-ratio:1.8}
 .product-body{padding:16px}
 .product-body>small{font-size:12px;line-height:1.5}
 .product-body h3{font-size:17px;line-height:1.45}
 .product-body p.product-description{font-size:14px;line-height:1.65;margin-top:14px}
 .product-body p.change-note{font-size:13px;line-height:1.55}
 .product-body .option-action{min-height:48px;font-size:15px}
 .product-body .included-label,.availability-label{font-size:13px;line-height:1.6}
 .image-expand{width:36px;height:36px;font-size:20px}

 .evocars-footer{height:var(--mobile-footer);padding:8px 16px calc(8px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:minmax(0,1fr) minmax(128px,1fr);gap:12px}
 .evocars-footer #summary-button{display:none}
 .evocars-footer .price-block{position:relative;align-self:stretch;justify-content:center;min-width:0;gap:4px}
 .evocars-footer .price-block>span{font-size:12px}
 .evocars-footer .price-block strong{font-size:22px;letter-spacing:-.5px}
 .evocars-footer .price-block .mobile-price-hint{display:block;font-size:11px;color:#bbb;line-height:1.4}
 .mobile-price-summary{display:block;position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;border-radius:3px}
 .mobile-next-step{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;align-self:center;width:100%;min-height:64px;padding:12px 14px;background:#ff5e2c;color:#180b06;text-align:left;border-radius:3px}
 .mobile-next-step:hover{background:#ff784e;color:#180b06}
 #mobile-next-label{font-size:16px;line-height:1.3;font-weight:700}
 #mobile-next-target{font-size:12px;line-height:1.4;font-weight:500}
 #toast{bottom:calc(var(--mobile-footer) + 12px);font-size:13px;line-height:1.5}

 dialog{width:calc(100% - 16px);max-height:calc(100dvh - 24px);border-radius:8px}
 .modal-close{width:44px;height:44px}
 .detail-copy{padding:24px 20px}
 .detail-copy>small{font-size:12px}
 .detail-copy p{font-size:15px;line-height:1.6}
 .detail-copy p.change-note,.detail-copy .availability{font-size:13px;line-height:1.6}
 .detail-copy .option-action{font-size:16px;min-height:48px}
 .gallery-arrows button{width:44px;height:44px;font-size:20px}
 .gallery-arrows span{font-size:13px}
 .summary-content>p{font-size:14px;line-height:1.5}
 .summary-line{font-size:14px;line-height:1.5;align-items:flex-start}
 .summary-line b{font-size:13px}
 .summary-content .primary{font-size:15px;min-height:48px}
 .source-link{font-size:13px;line-height:1.6}
 .showroom.mobile-view-expanded{position:fixed;inset:0;z-index:25;width:100%;height:100dvh;min-height:0}
 .showroom.mobile-view-expanded .showroom-heading{top:calc(18px + env(safe-area-inset-top,0px))}
 .showroom.mobile-view-expanded .viewer-bottom{bottom:calc(20px + env(safe-area-inset-bottom,0px))}
 .showroom.mobile-view-expanded:not(.is-interior) .viewer-bottom{flex-wrap:wrap}
 .showroom.mobile-view-expanded:not(.is-interior) .specs{display:flex;flex-basis:100%;gap:18px;padding:12px;background:#ffffffd9;border-radius:4px}
 .showroom.mobile-view-expanded .specs strong{font-size:20px}
 .showroom.mobile-view-expanded .specs span{font-size:11px;line-height:1.4}
 .showroom.mobile-view-expanded .specs small{font-size:12px}
 .showroom.mobile-view-expanded #fullscreen{width:auto;min-width:44px;padding:0 14px;gap:8px;display:flex}
 .showroom.mobile-view-expanded #fullscreen:after{content:"Свернуть";font-size:14px}
}
@media(max-width:360px){
 .version-card{grid-template-columns:1fr}
 .version-top{grid-column:1}
 .version-card b{font-size:16px}
 .mobile-step-status{gap:4px 10px}
 #mobile-step-name{font-size:15px}
 .evocars-footer{padding-left:12px;padding-right:12px;gap:8px}
 .evocars-footer .price-block strong{font-size:20px}
 .evocars-footer .price-block .mobile-price-hint{font-size:10px}
}
@media(max-width:760px) and (max-height:650px){
 .workspace{grid-template-rows:150px minmax(0,1fr);min-height:280px}
 .catalog-view{min-height:280px}
}
@media(min-width:761px) and (max-width:900px){
 :root{--mobile-header:78px}
 .workspace{grid-template-rows:clamp(260px,34dvh,350px) minmax(0,1fr)}
 .evocars-footer-contacts,.evocars-footer .price-extras{display:none}
 .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1024px) and (max-height:600px) and (orientation:landscape){
 :root{--mobile-header:48px;--mobile-steps:44px;--mobile-footer:70px}
 .evocars-header{height:var(--mobile-header);padding:0 16px}
 .evocars-brand img{width:124px;height:auto}
 .evocars-header .model-switch button{min-width:42px;padding:5px 10px;font-size:12px}
 #configuration .mobile-step-picker summary{min-height:42px}
 .workspace{height:var(--mobile-workspace);min-height:0;grid-template-columns:minmax(0,1fr) minmax(260px,1fr);grid-template-rows:minmax(0,1fr)}
 .config-panel{border-top:0;border-left:1px solid #d5dbd1}
 .step-content{padding:16px}
 .showroom-heading{top:8px;left:12px;right:8px}
 .showroom-heading h1{font-size:20px}
 .showroom-heading p{font-size:11px}
 .view-switch button{font-size:11px;padding:6px;min-height:32px}
 .catalog-view{height:var(--mobile-workspace);min-height:0}
 .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .evocars-footer{padding:6px 16px;grid-template-columns:1fr 1fr}
 .evocars-footer-contacts,.evocars-footer .price-extras{display:none}
 .evocars-footer .price-block strong{font-size:20px}
 .evocars-footer .price-block>span{font-size:11px}
 .mobile-next-step{min-height:54px;padding:8px 14px}
 .evocars-intro{min-height:calc(100svh - var(--mobile-header))}
 .evocars-intro-copy{grid-template-columns:minmax(0,1fr) minmax(245px,.9fr);padding:40px 24px 20px;gap:12px 20px}
 .evocars-intro h2{font-size:clamp(28px,4.5vw,42px)}
 .evocars-intro-description{font-size:14px}
 .evocars-intro-actions{grid-column:2;grid-row:1/3;width:100%;margin:0;gap:6px}
 .evocars-intro-actions .evocars-intro-primary{min-height:54px;font-size:14px;padding:12px 16px}
 .evocars-intro-actions a{min-height:36px;font-size:12px}
 .evocars-contact-card{max-height:calc(100dvh - 60px);overflow-y:auto}
}
