/* Selected atlas, integrated with the main page. */
body[data-atlas-preview] .ms {background:transparent;--paper:var(--page-bg);--ink:var(--charcoal);}
body[data-atlas-preview] .ms-v2 {padding-top:0;padding-bottom:64px;}
body[data-atlas-preview] .ms-atlas {grid-template-columns:132px minmax(0,1fr);gap:32px;}
body[data-atlas-preview] .ms-atlas-content {grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);gap:30px;align-items:start;}
body[data-atlas-preview] .ms-atlas-photo {background:transparent;display:grid;gap:12px;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo {height:410px;border-radius:8px;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo img {object-position:50% 52%;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo img[src*="posture"] {object-position:50% 24%;}
body[data-atlas-preview] .ms-atlas-details {display:grid;grid-template-columns:1fr 1fr;gap:12px;}
body[data-atlas-preview] .ms-atlas-details .ms-photo {height:230px;border-radius:8px;}
body[data-atlas-preview] .ms-atlas-details .ms-photo img {object-position:50% 45%;}
body[data-atlas-preview] .ms-atlas-details .ms-atlas-life img {object-position:50% 22%;}
body[data-atlas-preview] .ms-atlas-details figcaption {font-size:9px;padding:28px 12px 12px;}
body[data-atlas-preview] .ms-atlas-copy {padding:6px 0 0;}
body[data-atlas-preview] .ms-v2 .ms-copy h3 {font-size:clamp(30px,2.6vw,39px);}
body[data-atlas-preview] .ms-v2 .ms-body {font-size:13px;line-height:1.85;}
body[data-atlas-preview] .ms-atlas-copy>.ms-diagram {height:350px;margin:20px 0 0;padding:0;border:0;background:transparent;overflow:visible;}
body[data-atlas-preview] .ms-atlas-copy>.ms-diagram img {width:100%;height:calc(100% - 24px);flex:none;object-fit:contain;}
body[data-atlas-preview] .ms-diagram figcaption {padding:8px 0 0;line-height:16px;}
body[data-atlas-preview] .ms-atlas-bottom {padding-top:17px;gap:22px;}
body[data-atlas-preview] .ms-atlas-bottom p {font-size:12px;}
@media(min-width:1101px){body[data-atlas-preview] .ms-atlas>.ms-tabs {position:sticky;top:110px;}}
@media(max-width:1100px) and (min-width:761px){
body[data-atlas-preview] .ms-atlas {grid-template-columns:100px minmax(0,1fr);gap:20px;}
body[data-atlas-preview] .ms-atlas-content {gap:22px;grid-template-columns:1fr 1fr;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo {height:380px;}
body[data-atlas-preview] .ms-atlas-details .ms-photo {height:200px;}
body[data-atlas-preview] .ms-atlas-details figcaption {font-size:8px;padding:25px 8px 9px;}
body[data-atlas-preview] .ms-atlas-copy>.ms-diagram {height:310px;}
}
@media(max-width:760px){
body[data-atlas-preview] .ms-v2 {padding-top:0;padding-bottom:36px;}
body[data-atlas-preview] .ms-atlas {display:block;}
body[data-atlas-preview] .ms-atlas-content {grid-template-columns:1fr;gap:28px;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo {height:auto;aspect-ratio:1.12;}
body[data-atlas-preview] .ms-atlas-details .ms-photo {height:auto;aspect-ratio:3/4;}
body[data-atlas-preview] .ms-atlas-copy>.ms-diagram {height:360px;max-width:450px;margin:20px auto 0;}
body[data-atlas-preview] .ms-atlas-copy {padding:0;}
body[data-atlas-preview] .ms-atlas-bottom {display:block;}
}
@media(prefers-reduced-motion:reduce){body[data-atlas-preview] .ms-photo img{animation:none;}}
/* Portrait originals retain the whole product and the seated posture. */
@media(min-width:1101px){
body[data-atlas-preview] .ms-atlas-photo {grid-template-columns:1.5fr 1fr;align-items:stretch;}
body[data-atlas-preview] .ms-atlas-photo>.ms-photo {height:660px;}
body[data-atlas-preview] .ms-atlas-details {grid-template-columns:1fr;grid-template-rows:1fr 1fr;}
body[data-atlas-preview] .ms-atlas-details .ms-photo {height:324px;}
body[data-atlas-preview] .ms-atlas-details .ms-atlas-life img {object-position:50% 30%;}
}
/* Each drawing keeps its own proportions; explanations share its space. */
body[data-atlas-preview] .ms-explanation {margin-top:24px;padding-top:22px;border-top:1px solid var(--line);display:grid;gap:22px;align-items:center;}
body[data-atlas-preview] .ms-explanation .ms-diagram {background:transparent;border:0;margin:0;padding:0;overflow:visible;min-width:0;}
body[data-atlas-preview] .ms-explanation .ms-diagram img {width:100%;height:auto;object-fit:contain;}
body[data-atlas-preview] .ms-explanation .ms-diagram figcaption {font-size:9px;text-align:center;}
body[data-atlas-preview] .ms-explanation.is-portrait {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;}
body[data-atlas-preview] .ms-explanation.is-wide .ms-diagram {width:100%;max-width:320px;justify-self:center;}
body[data-atlas-preview] .ms-topic-seat .ms-explanation.is-wide .ms-diagram {max-width:380px;}
body[data-atlas-preview] .ms-explanation.is-wide .ms-points {display:grid;grid-template-columns:1fr 1fr;gap:24px;}
/* Цветной 3D-рендер рычага: без multiply (он для гравюр) */
body[data-atlas-preview] .ms-topic-lever .ms-diagram img {mix-blend-mode:normal;}
body[data-atlas-preview] .ms-topic-lever .ms-explanation.is-portrait .ms-diagram {max-width:none;}
body[data-atlas-preview] .ms-points {display:grid;gap:26px;}
body[data-atlas-preview] .ms-point-number {font-size:10px;letter-spacing:.1em;color:#98765b;display:block;margin-bottom:8px;}
body[data-atlas-preview] .ms-point h4 {font-size:15px;line-height:1.35;font-weight:500;letter-spacing:-.02em;margin:0 0 9px;}
body[data-atlas-preview] .ms-point p {font-size:12px;line-height:1.75;color:#776f65;margin:0;}
body[data-atlas-preview] .ms-takeaway {border-top:1px solid var(--line);padding-top:16px;margin:24px 0 0;font-family:Cormorant,Georgia,serif;font-size:23px;font-style:italic;line-height:1.25;color:#796550;}
/* «Угол»: кадры держат зону таз ↔ округлый угол */
body[data-atlas-preview] .ms-topic-seat .ms-atlas-photo>.ms-photo img {object-position:50% 62%;}
body[data-atlas-preview] .ms-topic-seat .ms-atlas-details .ms-atlas-detail img {object-position:50% 58%;}
body[data-atlas-preview] .ms-topic-seat .ms-atlas-details .ms-atlas-life img {object-position:50% 58%;}
body[data-atlas-preview] .ms-topic-upright .ms-atlas-photo>.ms-photo img {object-position:50% 50%;}
body[data-atlas-preview] .ms-topic-upright .ms-atlas-details .ms-atlas-life img {object-position:50% 48%;}
body[data-atlas-preview] .ms-topic-gap .ms-atlas-photo>.ms-photo img {object-position:50% 46%;}
body[data-atlas-preview] .ms-topic-gap .ms-atlas-details .ms-atlas-detail img {object-position:50% 62%;}
@media (min-width:761px) and (max-width:1100px) {
 body[data-atlas-preview] .ms-explanation.is-portrait {grid-template-columns:1fr;}
 body[data-atlas-preview] .ms-explanation.is-portrait .ms-diagram {max-width:220px;justify-self:center;}
 body[data-atlas-preview] .ms-explanation.is-wide .ms-points {grid-template-columns:1fr;gap:18px;}
}
@media (max-width:760px) {
 body[data-atlas-preview] .ms-topic-seat .ms-atlas-photo>.ms-photo {aspect-ratio:4/5;}
 body[data-atlas-preview] .ms-explanation {gap:20px;}
 body[data-atlas-preview] .ms-explanation.is-portrait {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;}
 body[data-atlas-preview] .ms-point h4 {font-size:14px;}
 body[data-atlas-preview] .ms-point p {font-size:12px;line-height:1.65;}
 body[data-atlas-preview] .ms-topic-upright .ms-atlas-photo>.ms-photo {aspect-ratio:2/3;}
}
@media (max-width:360px) {
 body[data-atlas-preview] .ms-explanation.is-wide .ms-points {grid-template-columns:1fr;}
 body[data-atlas-preview] .ms-explanation.is-portrait {grid-template-columns:1fr;}
 body[data-atlas-preview] .ms-explanation.is-portrait .ms-diagram {max-width:220px;justify-self:center;}
}

/* Фон: sandstone-wash вместо скрытого .form-fn__tint + мягкий стык с FAQ и футером */
body[data-atlas-preview] #mechanics-context.form-fn {
  isolation: isolate;
}
body[data-atlas-preview] #mechanics-context.form-fn::before {
  content: "";
  position: absolute;
  inset: -56px 0 -40px;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image:
    radial-gradient(ellipse 78% 28% at 18% 18%, rgba(234, 214, 192, 0.78) 0%, rgba(234, 214, 192, 0) 72%),
    radial-gradient(ellipse 64% 24% at 86% 32%, rgba(220, 188, 158, 0.46) 0%, rgba(220, 188, 158, 0) 74%),
    radial-gradient(ellipse 90% 26% at 48% 58%, rgba(236, 218, 196, 0.58) 0%, rgba(236, 218, 196, 0) 76%),
    radial-gradient(ellipse 72% 22% at 36% 86%, rgba(226, 204, 178, 0.4) 0%, rgba(226, 204, 178, 0) 74%),
    linear-gradient(180deg, transparent 8%, rgba(232, 212, 188, 0.14) 52%, rgba(232, 212, 188, 0.26) 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 88px, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 88px, #000 calc(100% - 56px), transparent 100%);
}

/* FAQ подхватывает хвост wash — без плоского шва после «Зон» */
body[data-atlas-preview] .site-faq {
  position: relative;
  isolation: isolate;
}
body[data-atlas-preview] .site-faq::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(260px, 42%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 90% at 28% 0%, rgba(232, 212, 188, 0.38) 0%, rgba(232, 212, 188, 0) 72%),
    radial-gradient(ellipse 58% 80% at 80% 8%, rgba(220, 188, 158, 0.24) 0%, rgba(220, 188, 158, 0) 74%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

/* Крем → уголь футера: градиент в margin-top футера, без ножа */
body[data-atlas-preview] .site-footer {
  position: relative;
}
body[data-atlas-preview] .site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: clamp(72px, 9vw, 120px);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(247, 241, 232, 0) 0%,
    rgba(130, 112, 92, 0.08) 26%,
    rgba(72, 66, 58, 0.32) 58%,
    rgba(48, 46, 43, 0.78) 84%,
    #302e2b 100%
  );
}
