/* New homepage integration: supplied geometry and fonts are retained. */
.chat__msg img{display:block;max-width:100%;max-height:150px;object-fit:contain;border-radius:8px;margin-top:6px}
.chat__msg--info{background:#f3edff;border:1px solid #c7b9ff}.chat__msg--info::before{content:'Информация мастерской';display:block;font-size:.8em;opacity:.7;margin-bottom:4px}
.chat__msg--operator{background:#f3edff}.chat__log{overscroll-behavior:contain}
.chat__msg{font-size:12px;line-height:1.4}.chat__t{font-size:14px;line-height:1.4}.chat__agree span{font-size:10px;line-height:12px}.rq .f input{font-size:16px}
.chat__attach{position:absolute;right:22px;top:205px;width:25px;height:25px;border:0;background:#eee8ff;border-radius:7px;display:grid;place-items:center;cursor:pointer;font-size:17px}
.chat__attach input{position:absolute;opacity:0;width:1px;height:1px}.chat__attach:focus-within{outline:2px solid #876dff}
.chat__t{padding-right:40px}.chat__file-name{position:absolute;left:21px;top:258px;max-width:239px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:7px}
.chat__status{position:absolute;left:21px;right:20px;top:185px;font-size:9px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-legal{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 20px;padding:22px 18px;font-size:11px;line-height:1.5;text-align:center}.home-legal a{color:#6d51ce}.home-legal small{flex-basis:100%;color:#666}
.request-trap{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important}
.hdr__lbl{text-decoration:none}.rq__desc{white-space:normal}.rq .pay__t{font-size:16px}
.rq .agree__t{white-space:normal;width:320px;font-size:10px;line-height:1.35}.rq .agree__t a{white-space:normal}
.chat__desc{white-space:normal;right:20px;font-size:10px;line-height:1.35}
#reviewFullPhotos{flex-wrap:wrap}
.home-delivery{background:#ffedac;padding:10px 18px;border-radius:12px;text-align:center;font-size:12px;line-height:1.4}
.rv__photos{display:flex;gap:6px;align-items:center;background:none!important;box-shadow:none!important;height:44px!important;overflow:visible!important}.rv__photos img{position:static!important;left:auto!important;top:auto!important;width:40px!important;height:40px!important;object-fit:cover;border-radius:7px}
.rv__text{overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical}.review-read-more{position:absolute;left:25px;bottom:12px;border:0;background:transparent;color:#6f53d0;text-decoration:underline;font:inherit;font-size:9px;padding:4px}
.review-full-modal{border:0;border-radius:18px;width:min(600px,90vw);max-height:85dvh;overflow:auto;font:inherit;font-size:14px;line-height:1.6;padding:28px}.review-full-modal::backdrop{background:#161127aa}.review-full-close{position:absolute;right:10px;top:10px;border:0;background:#f1edff;border-radius:50%;width:30px;height:30px;font-size:22px}#reviewFullPhotos{display:flex;gap:8px}#reviewFullPhotos img{width:64px;height:64px;object-fit:cover;border-radius:8px}
@media(max-width:767px){.chat__attach{top:240px;right:26px;width:29px;height:29px}.chat__file-name{left:25px;top:302px;max-width:280px;font-size:8px}.chat__status{left:25px;right:24px;top:220px;font-size:9px;line-height:12px}.chat__t{padding-right:45px;font-size:16px}.chat__msg{font-size:13px}.chat__agree span{font-size:12px;line-height:14px}.home-legal{font-size:10px}.rq .pay__t{font-size:15px}.rq .agree__t{width:270px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Compact messenger composer, with the existing delivery and consent logic. */
#chatPanel{display:flex;flex-direction:column;gap:8px;padding:15px 12px 10px;width:300px;height:330px;max-height:calc(100dvh - 80px)}
#chatPanel>*{position:static;inset:auto;flex-shrink:0}
#chatPanel .chat__x{position:absolute;top:9px;right:9px;width:22px;height:22px}
#chatPanel .chat__ttl{order:0;margin:0;padding-right:24px;font-size:13px;line-height:19px}
#chatPanel .chat__desc{order:1;font-size:10px;line-height:1.4;white-space:normal}
#chatPanel .chat__log{order:2;flex:1;min-height:0;width:auto;height:auto;gap:6px;padding:1px 3px 1px 0}
#chatPanel .chat__msg{font-size:11px;line-height:1.4;padding:7px 9px;border-radius:10px;max-width:91%}
#chatPanel .chat__msg--info::before{font-size:8px;line-height:1.3;margin-bottom:3px}
#chatPanel .chat__sep{display:none}
#chatPanel .chat__status{order:3;margin:0;max-height:29px;overflow:hidden;font-size:9px;line-height:1.4;white-space:normal}
#chatPanel .chat__status:empty,#chatPanel .chat__file-name:empty{display:none}
#chatPanel .chat__file-name{order:4;font-size:9px;line-height:14px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#chatPanel .chat__composer{order:5;display:grid;grid-template-columns:30px minmax(0,1fr) 34px;align-items:end;gap:3px;padding:3px;border:1px solid #d2c8ff;border-radius:12px;background:#fff}
#chatPanel .chat__composer:focus-within{border-color:var(--violet)}
#chatPanel .chat__t{position:static;inset:auto;display:block;min-width:0;width:100%;height:38px;min-height:38px;max-height:80px;padding:10px 3px 7px;box-shadow:none;border:0;border-radius:0;background:transparent;font-size:12px;line-height:18px;overflow-y:auto}
#chatPanel .chat__t.is-bad{box-shadow:inset 0 -2px #ff4d4d}
#chatPanel .chat__attach{position:relative;inset:auto;display:grid;place-items:center;width:30px;height:36px;border:0;border-radius:9px;background:transparent;color:#776d90}
#chatPanel .chat__attach:hover{background:#f4f1ff;color:var(--violet)}
#chatPanel .chat__send{position:static;inset:auto;display:grid;place-items:center;width:34px;height:36px;padding:0;border:0;box-shadow:none;border-radius:9px;background:var(--violet);color:white;cursor:pointer}
#chatPanel .chat__send:hover{background:#7558f1}
#chatPanel .chat__send svg{width:19px;height:19px;display:block}
#chatPanel .chat__agree{order:6;display:flex;align-items:center;gap:6px;width:auto;height:auto;min-height:15px;padding-left:3px;white-space:normal}
#chatPanel .chat__agree>i,#chatPanel .chat__agree>span{position:relative;inset:auto}
#chatPanel .chat__agree i{flex:0 0 11px;width:11px;height:11px}
#chatPanel .chat__agree span{font-size:8px;line-height:12px}

/* Let the restored gallery expand without overlapping later sections. */
.page{height:auto;padding-top:1693px}
.page>#gallery,.page>#styles,.page>#reviews,.page>#bottom{position:relative;left:auto;top:auto;margin:0 auto 90px}
.page>#bottom{margin-bottom:0}
.home-work-gallery{width:1012px;padding:0;background:transparent;border:0;box-shadow:none}
.home-work-gallery .real-gallery__inner{padding:0;max-width:none}
.home-work-gallery h2{margin:0;font-size:28.3px;font-weight:600;line-height:1.2;max-width:750px}
.home-work-gallery .real-gallery__intro{font-size:14px;line-height:1.6;margin:20px 0 30px;color:#333}
.home-work-gallery .real-gallery__hint{display:none}
.home-work-gallery .real-gallery__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:auto;gap:20px;padding:0;overflow:visible;scroll-snap-type:none}
.home-work-gallery .real-gallery__card{min-width:0;border:0;border-radius:13px;background:#f8f6ff;overflow:hidden}
.home-work-gallery .real-gallery__photo{aspect-ratio:1;max-height:330px}
.home-work-gallery .real-gallery__card p{font-size:11px;padding:15px;margin:0;line-height:1.6}
.home-work-gallery .real-gallery__card strong{font-weight:400}
.home-work-gallery .real-gallery__stage{font-size:9px;color:#876dff}
.home-work-gallery:not(.design-gallery-expanded) .real-gallery__card:nth-child(n+7){display:none}
.home-work-gallery .design-gallery-more{display:block;border:1px solid #876dff;background:#fff;color:#000;border-radius:7px;padding:14px 25px;font:inherit;font-size:12px;margin:30px auto 0}

/* Real review photos belong to a separate row below the text. */
.rv .rv__name{left:20px;right:20px;top:16px;font-size:14px;line-height:18px}
.rv .rv__text{left:20px;top:44px;width:319px;height:80px;font-size:12px;line-height:16px;-webkit-line-clamp:5}
.rv .rv__photos{position:absolute;left:20px;right:20px;top:135px;display:flex;align-items:center;gap:6px;width:auto;height:36px!important;overflow:hidden!important;border-radius:0;background:none!important;box-shadow:none!important}
.rv .rv__photos::after{display:none}
.rv .rv__photos img{width:36px!important;height:36px!important;flex:0 0 36px;object-fit:cover;border-radius:6px}
.rv .rv__stars{top:189px}
.rv .review-read-more{left:20px;bottom:13px;padding:0;font-size:10px;line-height:16px}

@media(max-width:767px){
 #chatPanel{width:329px;height:335px;padding:15px 12px 9px}
 #chatPanel .chat__ttl{font-size:14px;line-height:20px}
 #chatPanel .chat__msg{font-size:11px;line-height:1.45}
 #chatPanel .chat__t{font-size:16px;line-height:20px;padding-top:8px}
 #chatPanel .chat__agree span{font-size:9px;line-height:13px}
 .page{padding-top:2465px}
 .page>#gallery,.page>#styles,.page>#reviews{margin-bottom:65px}
 .home-work-gallery{width:360px}
 .home-work-gallery h2{font-size:26px;line-height:1.3}
 .home-work-gallery .real-gallery__intro{font-size:11px;line-height:1.6;margin:17px 0 25px}
 .home-work-gallery .real-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .home-work-gallery .real-gallery__photo{height:auto;aspect-ratio:1}
 .home-work-gallery .real-gallery__card p{font-size:9px;padding:10px}
 .home-work-gallery .real-gallery__stage{font-size:8px}
 .home-work-gallery:not(.design-gallery-expanded) .real-gallery__card:nth-child(n+5){display:none}
 .home-work-gallery .design-gallery-more{font-size:10px;padding:12px 20px}
}

/* Hidden overflow must not create a second horizontal scroll container. */
html,body{overflow-x:clip}
.home-work-gallery.story-step{padding:0}
#chatPanel .chat__msg--info::before{display:none}

/* Mobile: a quarter-height panel, or a single round launcher when closed. */
.chat__launch-plane{display:none}
@media(max-width:767px){
 #chatBtn{right:12px;bottom:calc(var(--chat-bottom-offset,0px) + max(12px,env(safe-area-inset-bottom)));width:40px;height:40px;border-radius:50%;display:grid;place-items:center}
 #chatBtn[aria-expanded="true"]{display:none}
 #chatBtn span,#chatBtn svg:not(.chat__launch-plane){display:none}
 #chatBtn .chat__launch-plane{display:block;position:static;inset:auto;margin:0;width:20px;height:20px;transform:none}
 #chatPanel{right:8px;bottom:calc(var(--chat-bottom-offset,0px) + max(8px,env(safe-area-inset-bottom)));width:min(329px,calc(100vw - 32px));height:var(--chat-mobile-height,25dvh);max-height:var(--chat-mobile-height,25dvh);min-height:0;padding:8px 9px 6px;gap:4px;border-radius:12px}
 #chatPanel .chat__ttl{font-size:11px;line-height:16px;padding-right:22px;white-space:nowrap}
 #chatPanel .chat__x{top:5px;right:6px;width:20px;height:20px}
 #chatPanel .chat__desc{display:none}
 #chatPanel .chat__log{gap:4px}
 #chatPanel .chat__msg{font-size:10px;line-height:1.4;padding:5px 7px}
 #chatPanel .chat__composer{grid-template-columns:26px minmax(0,1fr) 30px;padding:2px;gap:2px;border-radius:9px}
 #chatPanel .chat__t{height:30px;min-height:30px;max-height:30px;padding:5px 1px;font-size:16px;line-height:20px}
 #chatPanel .chat__attach{width:26px;height:30px}
 #chatPanel .chat__send{width:30px;height:30px;border-radius:7px}
 #chatPanel .chat__send svg{width:18px;height:18px}
 #chatPanel .chat__agree{height:12px;min-height:12px;padding-left:1px}
 #chatPanel .chat__agree span{font-size:8px;line-height:10px}
 #chatPanel .chat__agree i{flex-basis:10px;width:10px;height:10px}
 #chatPanel .chat__status{font-size:8px;line-height:10px;max-height:20px}
 #chatPanel .chat__file-name{font-size:8px;line-height:10px}
 .chat.is-short-viewport #chatPanel{padding:5px 7px;gap:2px;overflow-y:auto}
 .chat.is-short-viewport #chatPanel .chat__ttl{display:none}
 .chat.is-short-viewport #chatPanel .chat__log{padding-right:22px}
}

/* Desktop wordmark aligns with the left edge of the main hero. */
@media(min-width:768px){
 .hdr__lbl{left:95px;top:50%;transform:translateY(-50%);font-size:25px;line-height:1.1;font-weight:650;letter-spacing:-.04em;text-decoration:none}
}
