:root{--ink:#27302b;--muted:#6d716d;--cream:#fbfaf5;--orange:#e87939;--orange-dark:#c85c25;--orange-soft:#fff0e4;--pink:#f9e7e8;--green:#dce7d5;--line:#e7e5df;--white:#fff;font-family:Manrope,Arial,sans-serif;color:var(--ink);background:var(--cream);scroll-behavior:smooth}*{box-sizing:border-box}body{margin:0;line-height:1.55;background:var(--cream)}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.95);border-bottom:1px solid var(--line);backdrop-filter:blur(14px)}.header-main{min-height:74px;display:flex;align-items:center;justify-content:space-between;padding:10px max(4vw,32px);position:relative;isolation:isolate}.header-main::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--white)}.brand-block{display:flex;flex-direction:column;width:max-content;line-height:1.15}.brand-block strong{font-size:23px;font-weight:800;letter-spacing:.12em;color:var(--orange)}.brand-block>span{font-size:9px;color:var(--muted);letter-spacing:.025em;margin-top:4px}.brand-dot{color:#b8c9af}.nav{min-height:42px;display:flex;align-items:center;justify-content:center;gap:35px;border-top:1px solid #f1efe9;font-size:12px;font-weight:700}.nav a{position:relative;padding:12px 2px}.nav a::after{content:"";position:absolute;left:50%;right:50%;bottom:7px;height:1px;background:var(--orange);transition:.2s}.nav a:hover,.nav a.is-current{color:var(--orange)}.nav a:hover::after,.nav a.is-current::after{left:0;right:0}.button{border:0;border-radius:3px;background:var(--orange);color:white;padding:15px 22px;font-weight:700;transition:.2s}.button:hover{background:var(--orange-dark);transform:translateY(-1px)}.button--small{padding:10px 16px;font-size:12px}.eyebrow{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--orange);font-weight:800;margin:0 0 14px}.hero{min-height:625px;display:grid;grid-template-columns:1.1fr .9fr;gap:5vw;align-items:center;padding:70px max(8vw,32px);overflow:hidden}.hero h1,h2{font-family:"Playfair Display",Georgia,serif;font-weight:600;line-height:1.08;margin:0}.hero h1{font-size:clamp(45px,5vw,76px);max-width:680px}.hero h1 em{font-style:normal;color:var(--orange)}.lead{font-size:17px;max-width:520px;color:var(--muted);margin:24px 0 30px}.hero__actions{display:flex;align-items:center;gap:26px}.text-link{border:0;background:none;padding:0;font-size:13px;font-weight:800}.text-link:hover{color:var(--orange)}.text-link span,.card-link span{color:var(--orange);font-size:19px;margin-left:5px}.hero__visual{height:500px;background:linear-gradient(145deg,#fff4e9,#f5efe8);position:relative;overflow:hidden;border-radius:180px 180px 12px 12px}.hero__arch{position:absolute;inset:55px 65px 0;border:14px solid #f7f3ed;border-bottom:0;border-radius:220px 220px 0 0;background:#d9e7d3}.hero__curtain{position:absolute;width:33%;height:110%;top:-5%;background:repeating-linear-gradient(90deg,#f7f0e8 0 14px,#e8ddcf 14px 18px);box-shadow:3px 0 18px #896f5630}.hero__curtain--left{left:5%;transform:rotate(3deg);border-radius:0 10px 0 0}.hero__curtain--right{right:5%;transform:rotate(-3deg);border-radius:10px 0 0 0}.hero__visual p{position:absolute;bottom:26px;right:30px;font-size:12px;letter-spacing:.16em;color:white;font-weight:800}.hero__visual p span{font-size:8px;font-weight:500;letter-spacing:.12em}.section{padding:95px max(8vw,32px)}.section-heading{max-width:650px;margin-bottom:45px}.section-heading h2,.about h2,.order h2{font-size:clamp(33px,3.5vw,52px)}.section-heading>p:last-child,.section-heading>div>p{color:var(--muted);font-size:14px}.service-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.service-card{padding:38px 28px 35px;border-right:1px solid var(--line);min-height:315px;display:flex;flex-direction:column;position:relative;isolation:isolate;overflow:hidden;transition:background .3s}.service-card:last-child{border:0}.service-card--featured{background:var(--orange-soft)}.service-card:hover:not(.service-card--featured){background:#fff}.service-card__number{color:var(--orange);font-size:12px;font-weight:800}.service-card h3{font-family:"Playfair Display";font-size:27px;line-height:1.15;margin:36px 0 12px}.service-card p{font-size:13px;color:var(--muted);max-width:290px}.card-link{margin-top:auto;padding:0;border:0;background:none;text-align:left;font-size:13px;font-weight:800}.service-card>*:not(.service-sketch){position:relative;z-index:1}.service-sketch{position:absolute;right:-24px;bottom:-10px;width:76%;height:76%;z-index:-1;fill:none;stroke:var(--orange);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:translateY(8px);transition:opacity .4s,transform .4s;pointer-events:none}.service-card:hover .service-sketch,.service-card:focus-within .service-sketch{opacity:.27;transform:translateY(0)}.section-heading--row{display:flex;justify-content:space-between;max-width:none;align-items:end}.section-heading--row>div:last-child{text-align:right}.gallery-teaser{overflow:hidden}.gallery-marquee{overflow:hidden;margin-inline:calc(max(8vw,32px) * -1);padding:10px 0 22px}.gallery-marquee__track{display:flex;gap:15px;width:max-content;animation:gallery-scroll 52s linear infinite}.gallery-marquee:hover .gallery-marquee__track,.gallery-marquee:focus-within .gallery-marquee__track{animation-play-state:paused}@keyframes gallery-scroll{to{transform:translateX(calc(-50% - 7.5px))}}.marquee-card{width:340px;height:290px;position:relative;overflow:hidden;background:#ddd;flex:none}.marquee-card:nth-child(3n+2){width:275px}.marquee-card img{width:100%;height:100%;object-fit:cover;transition:transform .5s}.marquee-card:hover img{transform:scale(1.035)}.marquee-card span{position:absolute;inset:auto 0 0;padding:38px 18px 16px;color:white;background:linear-gradient(transparent,rgba(23,27,25,.78));display:flex;flex-direction:column}.marquee-card small{font-size:9px;text-transform:uppercase;letter-spacing:.12em}.marquee-card strong{font-family:"Playfair Display";font-size:20px}.about{display:flex;align-items:center;gap:8vw;background:var(--pink);min-height:360px}.about__mark{font-family:"Playfair Display";font-size:200px;color:#fff5f4;line-height:.8}.about>div:last-child{max-width:540px}.about p:last-child{color:var(--muted)}.order{background:#fffdf9;display:grid;grid-template-columns:320px 1fr;gap:7vw}.order__intro{position:sticky;top:145px;height:max-content}.order__intro>p:not(.eyebrow){color:var(--muted);font-size:13px}.order__service-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:28px}.pill{border:1px solid var(--line);border-radius:40px;padding:8px 12px;background:white;font-size:11px;font-weight:700}.pill.is-active{background:var(--orange);border-color:var(--orange);color:white}.order-form{min-width:0}.form-section{border:0;border-top:1px solid var(--line);padding:25px 0 30px;margin:0}.form-section legend{font-family:"Playfair Display";font-size:25px;padding:0 0 18px}.form-section legend span{font-family:Manrope;font-size:11px;color:var(--orange);font-weight:800;margin-right:10px}.form-intro{margin:-8px 0 20px;font-size:12px;color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid__wide{grid-column:1/-1}.form-grid label,.range-field,.conditional-field{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:800}.field-hint{font-size:9px;color:var(--muted);font-weight:500}.form-grid input,.form-grid select,.form-grid textarea,.conditional-field input{border:1px solid var(--line);background:#fff;padding:12px;border-radius:2px;outline-color:var(--orange);font-size:13px;resize:vertical}.checkbox-row{display:flex;gap:25px;flex-wrap:wrap;margin-top:4px;font-size:12px;font-weight:700}.checkbox-row--spaced{margin-top:22px}.checkbox-row label,.consent{display:flex;gap:8px;align-items:flex-start}.conditional-field{display:none;margin-top:18px;max-width:520px}.conditional-field.is-visible{display:flex}.measurement-note{background:var(--green);padding:11px 14px;font-size:11px;margin:15px 0 0}.curtain-items{display:grid;gap:15px}.curtain-item{background:#fff;border:1px solid var(--line);padding:22px}.curtain-item__head{display:flex;justify-content:space-between;align-items:start;margin-bottom:18px}.curtain-item__head small{font-size:9px;color:var(--orange);font-weight:800;text-transform:uppercase;letter-spacing:.1em}.curtain-item__head h3{font-family:"Playfair Display";font-size:24px;margin:2px 0}.remove-curtain{border:0;background:none;color:#a14c3c;font-size:11px;text-decoration:underline}.curtain-item__settings{margin-top:18px}.range-field{grid-column:span 2}.range-field input{accent-color:var(--orange);width:100%}.range-field>div{display:flex;justify-content:space-between;color:var(--muted);font-weight:500}.range-field b{color:var(--orange);font-size:11px}.type-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.type-grid label{position:relative;border:1px solid var(--line);min-height:86px;padding:35px 10px 10px;cursor:pointer;background:#fff;overflow:hidden}.type-grid input{position:absolute;opacity:0}.type-grid label:has(input:checked){border:2px solid var(--orange);background:var(--orange-soft)}.type-grid label::before{content:"";position:absolute;top:10px;left:11px;width:40px;height:18px;border:2px solid #9ba39d;border-bottom:0;border-radius:24px 24px 0 0}.type-grid span{font-size:10px;font-weight:800;line-height:1.25}.add-curtain{width:100%;border:1px dashed #d6a17f;background:var(--orange-soft);color:var(--orange-dark);padding:14px;margin-top:13px;font-size:12px;font-weight:800}.item-limit{font-size:10px;color:var(--muted);text-align:center}.upload{border:1px dashed #cfbda9;min-height:112px;background:var(--orange-soft);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.upload input{display:none}.upload span{font-size:25px;color:var(--orange);line-height:1}.upload strong{font-size:12px}.upload small{color:var(--muted);font-size:10px}.upload-summary{display:flex;justify-content:space-between;align-items:center;margin:8px 0 15px;color:var(--muted)}.upload-summary span{font-size:11px;font-weight:800;color:var(--orange)}.upload-summary small{font-size:9px}.photo-preview{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.photo-preview figure{margin:0;position:relative;width:105px;background:white;border:1px solid var(--line);padding:5px}.photo-preview img,.photo-fallback{width:93px;height:78px;object-fit:cover}.photo-fallback{display:grid;place-items:center;background:var(--green);font-weight:800;font-size:12px}.photo-preview figcaption{padding-top:4px;display:grid}.photo-preview figcaption span{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.photo-preview figcaption small{font-size:7px;color:var(--muted)}.remove-photo{position:absolute;right:-7px;top:-7px;width:22px;height:22px;border-radius:50%;border:0;background:var(--ink);color:white;line-height:1}.address-field{display:none}.address-field.is-visible{display:flex}.consent{margin-top:20px;font-size:11px;color:var(--muted)}.consent a{text-decoration:underline}.estimate-note{display:flex;gap:12px;align-items:start;background:var(--green);padding:14px;margin-bottom:14px;font-size:11px}.estimate-note strong{white-space:nowrap}.estimate-note span{color:#596158}.button--wide{width:100%;display:flex;justify-content:center;gap:7px}.success-message{grid-column:2;text-align:center;padding:70px 25px;background:var(--green)}.success-message>span{display:inline-grid;place-items:center;width:45px;height:45px;border-radius:50%;background:white;color:var(--orange);font-weight:800}.success-message h3{font-family:"Playfair Display";font-size:31px;margin:13px 0 0}.success-message p{color:var(--muted);font-size:13px}.success-message strong{display:block;color:var(--orange);font-size:14px;margin:14px}footer{padding:55px max(8vw,32px) 30px;background:var(--ink);color:white;display:grid;grid-template-columns:1fr 1fr 1fr;gap:30px;position:relative}footer h3{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#f6a273}footer p{font-size:12px;color:#d8ddd8}.brand-block--footer strong{color:#f59c67}.brand-block--footer>span{color:#cbd0cc}.footer-note{position:absolute;bottom:10px;right:8vw;font-size:9px}

/* Страница галереи */
.gallery-hero{padding:80px max(8vw,32px) 50px;max-width:1000px}.gallery-hero h1{font-family:"Playfair Display";font-size:clamp(40px,4.65vw,60px);margin:0;line-height:1}.gallery-hero>p:last-child{max-width:650px;color:var(--muted)}.project-grid{padding:0 max(8vw,32px) 100px;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.project-card{border:0;background:#fff;padding:0;text-align:left;position:relative;overflow:hidden;min-height:380px}.project-card img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover;transition:transform .55s}.project-card:hover img{transform:scale(1.035)}.project-card>span{position:absolute;inset:auto 0 0;padding:60px 20px 20px;color:white;background:linear-gradient(transparent,rgba(22,28,24,.86));display:grid}.project-card small{font-size:9px;letter-spacing:.12em;text-transform:uppercase}.project-card strong{font-family:"Playfair Display";font-size:24px}.project-card em{font-style:normal;font-size:10px;margin-top:8px;color:#ffd2b8}.modal-open{overflow:hidden}.project-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:30px}.project-modal__backdrop{position:absolute;inset:0;background:rgba(25,31,27,.72);backdrop-filter:blur(6px)}.project-dialog{position:relative;width:min(1180px,96vw);height:min(760px,92vh);background:var(--cream);display:grid;grid-template-columns:1.12fr .88fr;z-index:1;overflow:hidden;box-shadow:0 25px 80px rgba(0,0,0,.3)}.modal-close{position:absolute;right:13px;top:10px;z-index:5;border:0;background:#fff;width:36px;height:36px;border-radius:50%;font-size:23px}.project-viewer{padding:28px;background:#eee9e1;display:flex;flex-direction:column;min-width:0}.project-main-image{position:relative;flex:1;min-height:0}.project-main-image>img{width:100%;height:100%;object-fit:cover}.image-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.9);font-size:18px}.image-arrow--prev{left:12px}.image-arrow--next{right:12px}.project-thumbs{display:flex;gap:8px;padding-top:12px;overflow-x:auto}.project-thumbs button{border:2px solid transparent;padding:0;background:none;width:78px;height:58px;flex:none;opacity:.65}.project-thumbs button.is-active{border-color:var(--orange);opacity:1}.project-thumbs img{width:100%;height:100%;object-fit:cover}.project-info{padding:48px 38px 35px;overflow:auto}.project-info h2{font-size:38px}.project-description{color:var(--muted);font-size:13px;margin:16px 0 25px}.project-facts{display:grid;grid-template-columns:1fr 1fr;margin:0 0 22px;border-top:1px solid var(--line)}.project-facts div,.project-curtain dl div{padding:8px 0;border-bottom:1px solid var(--line)}.project-facts div:nth-child(odd){padding-right:15px}.project-facts dt,.project-curtain dt{font-size:9px;color:var(--muted)}.project-facts dd,.project-curtain dd{font-size:11px;font-weight:700;margin:2px 0}.project-curtain{background:white;padding:16px;margin-top:10px}.project-curtain h3{font-family:"Playfair Display";font-size:19px;margin:0 0 8px}.project-curtain dl{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;margin:0}

@media(max-width:900px){.hero,.order{grid-template-columns:1fr}.hero{padding:55px 25px}.hero__visual{height:380px}.section{padding:70px 25px}.service-grid{grid-template-columns:1fr}.service-card{border-right:0;border-bottom:1px solid var(--line);min-height:245px}.section-heading--row{display:block}.section-heading--row>div:last-child{text-align:left}.about{padding:55px 25px}.about__mark{display:none}.order__intro{position:static}.success-message{grid-column:auto}.project-grid{grid-template-columns:repeat(2,1fr);padding-inline:25px}.project-dialog{grid-template-columns:1fr;height:95vh;overflow:auto}.project-viewer{min-height:500px}.project-info{overflow:visible}.gallery-hero{padding-inline:25px}}
@media(max-width:650px){.header-main{padding:9px 15px}.brand-block strong{font-size:18px}.brand-block>span{font-size:7px}.button--small{font-size:10px;padding:9px 11px}.nav{gap:15px;justify-content:flex-start;overflow-x:auto;padding:0 15px}.nav a{white-space:nowrap}.hero{min-height:auto}.hero h1{font-size:45px}.hero__actions{align-items:flex-start;flex-direction:column;gap:15px}.form-grid{grid-template-columns:1fr}.form-grid__wide,.range-field{grid-column:auto}.type-grid{grid-template-columns:1fr 1fr}.upload-summary{align-items:flex-start;flex-direction:column}.estimate-note{flex-direction:column}.project-grid{grid-template-columns:1fr}.project-card{min-height:430px}.project-modal{padding:0}.project-dialog{width:100vw;height:100vh}.project-viewer{padding:14px;min-height:450px}.project-info{padding:28px 20px}.project-info h2{font-size:31px}.project-facts,.project-curtain dl{grid-template-columns:1fr}.modal-close{right:8px;top:8px}.marquee-card{width:280px;height:250px}footer{grid-template-columns:1fr}.footer-note{position:static}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.gallery-marquee__track{animation-play-state:paused}.service-sketch,.marquee-card img,.project-card img{transition:none}}

#services,#gallery,#about,#order,#contacts{scroll-margin-top:132px}

/* Пользовательские иллюстрации карточек основных услуг. */
.service-sketch{background-repeat:no-repeat;background-position:right bottom;background-size:contain}
.service-sketch>*{display:none}
.service-sketch--curtain{background-image:url("assets/service-tailoring.svg")}
.service-sketch--cornices{background-image:url("assets/service-installation.svg")}
.service-sketch--interior{background-image:url("assets/service-decor.svg")}

/* Иллюстрации мягко растворяются возле текста, как прежние линейные эскизы. */
.service-sketch{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.15) 0,rgba(0,0,0,.78) 42%,#000 100%);mask-image:linear-gradient(to right,rgba(0,0,0,.15) 0,rgba(0,0,0,.78) 42%,#000 100%)}
.service-sketch--cornice-image{right:12px;bottom:38px;width:68%;height:auto;background:none}
.project-dialog .project-viewer{min-height:0;overflow:hidden}

.project-dialog .project-main-image{flex:1 1 0;height:0;min-height:0;overflow:hidden;background:#ded8cf}
.project-dialog .project-main-image>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
#projectModal[data-project-id="draped-living-room"] .project-main-image>img,
#projectModal[data-project-id="bright-roman"] .project-main-image>img,
#projectModal[data-project-id="white-textured"] .project-main-image>img{object-fit:contain}

@media(min-width:901px){
  .project-dialog .project-viewer{height:100%}
  .project-dialog .project-main-image{flex:1 1 0;height:0;min-height:0}
}
.project-dialog .project-thumbs{flex:0 0 66px;min-height:66px;overflow:hidden;align-items:end;padding-top:8px}
.project-dialog .project-thumbs button{flex:1 1 0;min-width:0;max-width:78px;height:58px}
@media(max-width:900px){.project-dialog .project-viewer{min-height:500px}.project-dialog .project-main-image{height:auto}}

/* Вертикальная композиция секции услуг при пошаговой прокрутке */
@media (min-width: 901px) {
  .services {
    min-height: calc(100svh - 132px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .services .section-heading {
    margin-bottom: 30px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .services {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .services .section-heading {
    margin-bottom: 22px;
  }

  .services .service-card {
    min-height: clamp(270px, 39vh, 300px);
    padding-top: 30px;
    padding-bottom: 27px;
  }

  .services .service-card h3 {
    margin-top: 28px;
  }
}

/* Уточнения по аннотациям: шапка, калькулятор и контакты */
.site-header {
  border-radius: 0 0 45px 45px;
  overflow: clip;
}

.service-card h3 { margin-top: 10px; }

.calculator-sheet {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e4e8e1;
  border-radius: 18px;
  background: #f3f5f1;
  box-shadow: 0 16px 42px rgba(39, 48, 43, .055);
}

.calculator-sheet .form-section {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.calculator-sheet .form-section legend { padding: 0 0 18px; }
.calculator-sheet .curtain-item { background: var(--cream); }
.comment-field { gap: 0 !important; }

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--orange);
}

.unknown-question {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: currentColor;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 58px;
  font-weight: 600;
  line-height: 1;
}

.fabric-card__visual i { width: 100%; }

.contact-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  place-items: center;
  border-radius: 50%;
}

.contact-button svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Читаемость и упрощённая двухслойная структура формы */
.calculator-sheet .form-section legend {
  float: left;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 0 18px;
}

.calculator-sheet .form-section > legend + * { clear: both; }

.calculator-sheet .curtain-item {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calculator-sheet .curtain-item + .curtain-item {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.range-field > input { margin-bottom: 0; }
.range-scale { margin-top: -3px; }

.brand-block > span,
.nav,
.button--small,
.eyebrow,
.hero__visual p,
.hero__visual p span,
.marquee-card small,
.pill,
.form-grid label,
.range-field,
.conditional-field,
.field-hint,
.checkbox-row,
.measurement-note,
.curtain-item__head small,
.remove-curtain,
.range-field b,
.type-grid span,
.type-grid label > small,
.add-curtain,
.item-limit,
.upload strong,
.upload small,
.upload-summary span,
.upload-summary small,
.photo-fallback,
.photo-preview figcaption span,
.photo-preview figcaption small,
.consent,
.estimate-note,
footer h3,
footer p,
.footer-note,
.project-card small,
.project-card em,
.project-facts dt,
.project-curtain dt,
.project-facts dd,
.project-curtain dd,
.field-title,
.fabric-card strong,
.fabric-card small,
.unknown-note,
.range-scale small,
.range-result b,
.range-result small,
.range-field > p {
  font-size: 13px;
}

.type-grid .unknown-question { font-size: 40px; }

.contact-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.contact-button--max {
  padding: 4px;
  border-color: #6951d8;
  background: #471aff;
}

.contact-button--max:hover {
  background: #471aff;
  border-color: #471aff;
}

.gallery-page footer { margin-top: 0; }

/* Карточки услуг занимают высоту, которая действительно нужна их содержимому. */
@media (min-width: 901px) {
  .services .service-card {
    height: auto;
    min-height: clamp(270px, 39svh, 305px);
    justify-content: flex-start;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .services .service-card__content {
    flex: 1;
    display: grid;
    grid-template-rows: auto auto 1fr;
  }

  .services .service-card__content .card-link {
    align-self: end;
    margin-top: 18px;
  }

  /* Резерв удерживает верхнюю границу секции на привычном уровне. */
  .services .service-grid {
    margin-bottom: 75px;
  }
}

/* При уменьшении рабочего окна текст получает достаточно ширины для чтения. */
@media (min-width: 901px) and (max-width: 1200px) {
  .services .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services .service-card:last-child {
    grid-column: 1 / -1;
  }
}

/* Финальная раскладка варианта помощи: обычная карточка после японских панелей. */
.type-grid label.type-option--unknown,
.type-grid label.type-option--unknown:last-child {
  grid-column: auto;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  grid-template-rows: none;
  align-items: flex-start;
  column-gap: 0;
  padding: 13px;
}

.type-grid label.type-option--unknown:has(input:checked),
.type-grid label.type-option--unknown:last-child:has(input:checked) {
  padding: 12px;
}

.type-grid label.type-option--unknown .type-icon,
.type-grid label.type-option--unknown:last-child .type-icon {
  grid-row: auto;
  width: 100%;
  height: 66px;
  margin: 0 0 7px;
}

/* У неизвестного материала остаётся только знак вопроса без внутреннего окна. */
.fabric-card--unknown .fabric-card__visual {
  justify-content: flex-start;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.fabric-question {
  display: block;
  color: #87938a;
  font-size: 32px;
  line-height: 1;
}

/* Карточка помощи остаётся последней, но имеет размер обычного вида штор. */
.type-grid label:last-child {
  grid-column: auto;
  min-height: 154px;
  display: flex;
  grid-template-columns: none;
  grid-template-rows: none;
  align-items: flex-start;
  column-gap: 0;
}

.type-grid label:last-child .type-icon {
  grid-row: auto;
  margin: 0 0 7px;
}

.type-grid .type-option--unknown {
  grid-column: auto;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
}

.type-grid .type-option--unknown:has(input:checked) {
  padding: 12px;
}

.type-grid .type-option--unknown .type-icon {
  width: 100%;
  height: 66px;
  margin: 0 0 7px;
}

.fabric-card--unknown .fabric-card__visual {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-contact {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.header-contact a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  .header-contact {
    display: none;
  }

  .header-actions {
    gap: 0;
  }
}

.order-review__content h4,
.success-receipt h4,
.order-review__content dt,
.success-receipt dt,
.order-review__content dd,
.success-receipt dd,
.summary-curtains article > strong,
.success-photo-list figcaption {
  font-size: 13px;
}

.order-review__content h4,
.success-receipt h4,
.order-review__content dt,
.success-receipt dt,
.order-review__content dd,
.success-receipt dd,
.summary-curtains article > strong,
.success-photo-list figcaption {
  font-size: 13px;
}

.footer-contacts p { margin-bottom: 14px; }

@media (max-width: 900px) {
  .calculator-sheet { padding: 10px; }
  .calculator-sheet .form-section { padding: 20px; }
}

@media (max-width: 650px) {
  .site-header { border-radius: 0 0 24px 24px; }
  .calculator-sheet { margin-inline: -10px; }
  .calculator-sheet .form-section { padding: 17px 14px; }
}

/* Обновлённая мягкая дизайн-система и калькулятор */
@font-face {
  font-family: "Roboto Condensed Local";
  src: url("RobotoCondensed-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("PlayfairDisplay-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

html,
body,
button,
input,
textarea,
select {
  font-family: "Roboto Condensed Local", "Arial Narrow", Arial, sans-serif;
}

.form-section legend span {
  font-family: "Roboto Condensed Local", "Arial Narrow", Arial, sans-serif;
}

.button {
  border-radius: 10px;
}

.order .button:hover,
.order .button:focus-visible {
  transform: none;
}

.pill {
  border-radius: 10px;
  padding: 9px 14px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.service-grid {
  gap: 12px;
  border: 0;
}

.service-card,
.service-card:last-child {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.conditional-field input,
.login-card input,
.status {
  border-radius: 8px;
}

.curtain-item {
  padding: 24px;
  border-radius: 14px;
}

.curtain-item__head {
  margin-bottom: 20px;
}

.type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.type-grid label {
  min-height: 154px;
  padding: 13px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.type-grid label::before {
  display: none;
}

.type-grid label:last-child {
  grid-column: auto;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  column-gap: 0;
}

.type-grid label:last-child .type-icon {
  grid-row: auto;
  margin: 0 0 7px;
}

.type-grid label:has(input:checked) {
  border: 2px solid var(--orange);
  padding: 12px;
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.type-grid label:last-child:has(input:checked) {
  padding: 12px;
}

.type-icon {
  display: block;
  width: 100%;
  height: 66px;
  margin-bottom: 7px;
  color: #87938a;
}

.type-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.type-icon__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.type-grid label:has(input:checked) .type-icon {
  color: var(--orange);
}

.type-grid strong {
  font-size: 13px;
  line-height: 1.2;
}

.type-grid label > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.unknown-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--green);
  font-size: 11px;
}

.unknown-note strong {
  white-space: nowrap;
  color: #354137;
}

.unknown-note span {
  color: var(--muted);
}

.fabric-field {
  margin-top: 22px;
}

.field-title {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 800;
}

.fabric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fabric-card {
  position: relative;
  min-height: 118px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  overflow: hidden;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.fabric-card input {
  position: absolute;
  opacity: 0;
}

.fabric-card:has(input:checked) {
  border: 2px solid var(--orange);
  padding: 8px;
  background: var(--orange-soft);
}

.fabric-card__visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 45px;
  margin-bottom: 5px;
}

.fabric-card--unknown .fabric-card__visual {
  justify-content: center;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.fabric-question {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #87938a;
  font-size: 40px;
  line-height: 1;
}

.fabric-card__visual i {
  display: block;
  width: 54%;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(40, 48, 42, .08);
}

.fabric-card__visual svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #617065;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fabric-card strong,
.fabric-card small {
  display: block;
}

.fabric-card strong {
  font-size: 11px;
  line-height: 1.2;
}

.fabric-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.fabric-card--linen i { background: repeating-linear-gradient(80deg, #d8c6aa 0 2px, #eee3d2 2px 5px); }
.fabric-card--cotton i { background: radial-gradient(circle at 30% 30%, #fff 0 16%, #e8e3db 17% 20%, transparent 21%), #f4f0e9; }
.fabric-card--silk i { background: linear-gradient(135deg, #ece5dc, #fff 38%, #d8c8b7 60%, #faf7f1); }
.fabric-card--velvet i { background: linear-gradient(120deg, #6d564d, #a07d6d 45%, #4e3b36); }
.fabric-card--jacquard i { background: repeating-linear-gradient(45deg, #d4baa0 0 6px, #f0dfce 6px 12px); }
.fabric-card--satin i { background: linear-gradient(115deg, #d8d7d2, #fff 45%, #c9c5bb 60%, #f4f2ed); }
.fabric-card--voile i { background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(220,229,220,.35)), repeating-linear-gradient(90deg, #ddd 0 1px, transparent 1px 5px); }
.fabric-card--unknown i { background: var(--green); }

.curtain-item__settings {
  margin-top: 20px;
}

.range-field {
  margin-top: 5px;
  padding: 16px;
  border-radius: 10px;
  background: #faf8f3;
}

.range-field > input {
  margin: 7px 0 0;
}

.range-scale,
.range-result {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

.range-scale small {
  text-align: center;
  color: var(--muted);
}

.range-scale small:first-child { text-align: left; }
.range-scale small:last-child { text-align: right; }

.range-result {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 6px;
}

.range-result b {
  color: var(--orange);
  font-size: 12px;
}

.range-result small {
  color: var(--muted);
  font-weight: 500;
}

.range-field > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  text-align: center;
}

.add-curtain,
.upload,
.estimate-note {
  border-radius: 10px;
}

.order-review {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}

.order-review summary {
  display: flex;
  justify-content: space-between;
  padding: 15px 17px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.order-review summary::-webkit-details-marker { display: none; }
.order-review[open] summary span { transform: rotate(45deg); }

.order-review__content,
.success-receipt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-review__content {
  padding: 0 17px 17px;
}

.order-review__content section,
.success-receipt section {
  padding: 13px;
  border-radius: 9px;
  background: #faf8f3;
  text-align: left;
}

.order-review__content h4,
.success-receipt h4 {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.order-review__content dl,
.success-receipt dl {
  margin: 0;
}

.order-review__content dl > div,
.success-receipt dl > div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.order-review__content dl > div:last-child,
.success-receipt dl > div:last-child {
  border-bottom: 0;
}

.order-review__content dt,
.success-receipt dt {
  color: var(--muted);
  font-size: 9px;
}

.order-review__content dd,
.success-receipt dd {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
}

.summary-curtains,
.summary-comment {
  grid-column: 1 / -1;
}

.summary-curtains article + article {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.summary-curtains article > strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.success-message {
  padding: 42px 30px;
  border-radius: 14px;
}

.success-message > strong {
  font-size: 16px;
}

.success-receipt {
  margin-top: 24px;
}

.success-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.success-photo-section {
  grid-column: 1 / -1;
}

.success-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.success-photo-list figure {
  width: 88px;
  margin: 0;
}

.success-photo-list img,
.success-photo-list .photo-fallback {
  width: 88px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
}

.success-photo-list figcaption {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button--quiet {
  border: 1px solid var(--orange);
  background: transparent;
  color: var(--orange-dark);
}

.button--quiet:hover {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.contact-button {
  padding: 7px 10px;
  border: 1px solid #58635c;
  border-radius: 9px;
  color: #e3e8e4;
  font-size: 10px;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.contact-button--telegram:hover { background: #229ed9; border-color: #229ed9; color: white; }
.contact-button--whatsapp:hover { background: #25d366; border-color: #25d366; color: #102c19; }
.contact-button--max:hover { background: #7b61ff; border-color: #7b61ff; color: white; }
.contact-button--vk:hover { background: #0077ff; border-color: #0077ff; color: white; }
.contact-button--ok:hover { background: #ee8208; border-color: #ee8208; color: white; }

.marquee-card { border-radius: 3px; }
.project-card { border-radius: 6px; }
.project-dialog { border-radius: 14px; }

@media (max-width: 900px) {
  .fabric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { border-bottom: 1px solid var(--line); }
}

@media (max-width: 650px) {
  .type-grid { grid-template-columns: 1fr 1fr; }
  .type-grid label:last-child { grid-column: auto; }
  .order-review__content,
  .success-receipt { grid-template-columns: 1fr; }
  .summary-curtains,
  .summary-comment { grid-column: auto; }
  .unknown-note { flex-direction: column; }
  .success-message { padding: 35px 16px; }
}

/* Галерея и история занимают один шаг экранной прокрутки */
@media (min-width: 901px) {
  .gallery-teaser {
    min-height: calc(100svh - 132px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .gallery-teaser .section-heading {
    margin-bottom: 30px;
  }

  .about {
    min-height: calc(100svh - 132px);
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .gallery-teaser {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .gallery-teaser .section-heading {
    margin-bottom: 22px;
  }

  .gallery-teaser .marquee-card {
    height: clamp(245px, 38vh, 280px);
  }
}

/* Финальные приоритеты для элементов, чьи базовые стили объявлены выше */
.fabric-card__visual i { width: 100%; }

.contact-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  place-items: center;
  border-radius: 50%;
}

.contact-button svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Итоговые правила текущей итерации */
.calculator-sheet .form-section legend {
  float: left;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 0 18px;
}

.calculator-sheet .form-section > legend + * { clear: both; }

.calculator-sheet .curtain-item {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calculator-sheet .curtain-item + .curtain-item {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.range-field > input { margin-bottom: 0; }
.range-scale { margin-top: -3px; }

.brand-block > span,
.nav,
.button--small,
.eyebrow,
.hero__visual p,
.hero__visual p span,
.marquee-card small,
.pill,
.form-grid label,
.range-field,
.conditional-field,
.field-hint,
.checkbox-row,
.measurement-note,
.curtain-item__head small,
.remove-curtain,
.range-field b,
.type-grid span,
.type-grid label > small,
.add-curtain,
.item-limit,
.upload strong,
.upload small,
.upload-summary span,
.upload-summary small,
.photo-fallback,
.photo-preview figcaption span,
.photo-preview figcaption small,
.consent,
.estimate-note,
footer h3,
footer p,
.footer-note,
.project-card small,
.project-card em,
.project-facts dt,
.project-curtain dt,
.project-facts dd,
.project-curtain dd,
.field-title,
.fabric-card strong,
.fabric-card small,
.unknown-note,
.range-scale small,
.range-result b,
.range-result small,
.range-field > p {
  font-size: 13px;
}

.type-grid .unknown-question { font-size: 40px; }

.contact-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.contact-button--max {
  padding: 4px;
  border-color: #6951d8;
  background: #471aff;
}

.contact-button--max:hover {
  background: #471aff;
  border-color: #471aff;
}

.gallery-page footer { margin-top: 0; }
