/* ДУБ БАНЯ — polish pass over all public pages (loaded last) */

/* ---- home & space: tile mosaic was squashed by the program-page .mosaic rules ---- */
.mosaic:has(>.tile){grid-template-columns:repeat(2,1fr);grid-template-rows:none;grid-auto-rows:225px;aspect-ratio:auto;gap:12px}
@media(min-width:900px){.mosaic:has(>.tile){grid-template-columns:repeat(4,1fr);grid-auto-rows:290px;gap:14px}}
@media(max-width:600px){.mosaic:has(>.tile){grid-template-columns:1fr;grid-auto-rows:230px}.mosaic:has(>.tile) .t-wide{grid-column:auto}.mosaic:has(>.tile) .t-tall{grid-row:span 1}}

/* ---- programs ---- */
.facts .fact{padding:14px 8px;min-width:0}
.fact b{overflow-wrap:anywhere;hyphens:auto}
@media(max-width:480px){.fact b{font-size:1rem}.fact span{font-size:.72rem}}
.incl .it>div{flex:1;text-align:left}

/* ---- build ---- */
@media(max-width:600px){.brow{grid-template-columns:1fr auto;row-gap:6px}.brow .nm{grid-column:1/-1}}
.cnt button:disabled,.bstp button:disabled{opacity:.45}

/* ---- home ---- */
@media(max-width:600px){.hero-dots{bottom:auto;top:calc(var(--head,64px) + 16px)}}
@media(max-width:480px){.trust b{font-size:1.35rem;line-height:1.15}.trust div{padding:18px 10px;font-size:.88rem}}

/* ---- book: short conditions list ---- */
.bookaside .li b{flex:0 0 5.6em;white-space:nowrap}
.bookaside .li span{flex:1;min-width:0}

/* ---- buttons: stacked pairs on phones look intentional ---- */
@media(max-width:560px){main .row>.btn{flex:1 1 100%;justify-content:center;text-align:center}}

/* ---- footer ---- */
.legal a{margin-left:0;display:inline-block}
.legal{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 24px}
@media(max-width:899px){
  .foot{grid-template-columns:1fr 1fr;gap:28px 18px}
  .foot>div:first-child,.foot>div:last-child{grid-column:1/-1}
  .foot a{font-size:.94rem}
}
.foot>div:first-child{align-self:start}

/* ---- gift ---- */
.chips-amt{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.chip-a{padding:12px 8px;text-align:center}
@media(max-width:560px){.chips-amt{grid-template-columns:1fr 1fr}}
section.band:has(.steps4)>.wrap{max-width:820px}
@media(max-width:560px){.ct-body p{font-size:max(13px,3cqw)}}

/* ---- masters ---- */
.mcard .mtx{display:flex;flex-direction:column;flex:1}
.mcard .mlink{margin-top:auto;padding-top:14px;align-self:flex-start}
.mcard .mrate:empty{display:none}

/* ---- useful (articles) ---- */
.mcards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.mc{display:flex;flex-direction:column}
.mc .in{flex:1;display:flex;flex-direction:column}
.mc .in>.muted:last-child,.mc .in>p:last-child{margin-top:auto;padding-top:10px}
.mc .ph{background-color:var(--ink-2);background-image:linear-gradient(135deg,rgba(201,162,78,.06),transparent)}
.art-vh .wrap{max-width:720px}
.art-meta{font-size:.95rem;color:#c4b896}

/* ---- gallery: dark mat while photos load ---- */
.pic .mat{background:#2a241a}
.pic .mat img{min-height:120px}

/* ---- contacts ---- */
.cmap{background:var(--ink-2) linear-gradient(135deg,rgba(201,162,78,.08),transparent)}
@media(max-width:600px){.cgrid{grid-template-columns:1fr 1fr;gap:10px}.ccard{padding:16px}.ccard a,.ccard .v{font-size:.96rem;overflow-wrap:anywhere}}

/* ---- faq ---- */
.faq-i summary{font-size:1.24rem}
@media(max-width:600px){.faq-i summary{font-size:1.12rem}}

/* ---- land (SEO) pages ---- */
.land-vh::after{background:linear-gradient(90deg,rgba(11,11,11,.85) 0%,rgba(11,11,11,.6) 45%,rgba(11,11,11,.2) 80%),linear-gradient(180deg,rgba(11,11,11,.3),rgba(11,11,11,.96) 100%)}
@media(max-width:700px){.land-vh::after{background:linear-gradient(180deg,rgba(11,11,11,.55),rgba(11,11,11,.96) 100%)}}
.land-vh .crumbs,.land-vh .lead{text-shadow:0 2px 14px rgba(0,0,0,.85)}
.land-vh h1,.pgh h1,.art-vh h1{text-wrap:balance}
.land-more{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.art-cta a[href^="tel:"]{white-space:nowrap}
section:has(>.wrap>.land-body),section:has(.land-body){padding-bottom:clamp(24px,4vw,48px)}

/* ---- health / terms / 404: grids without orphans ---- */
@media(min-width:900px){
  .icards{display:flex;flex-wrap:wrap;justify-content:center}
  .icards>*{flex:0 1 calc((100% - 32px)/3)}
  .nf{grid-template-columns:repeat(3,1fr)}
}

/* ---- share ---- */
@media(max-width:620px){.sbox{padding:20px 16px}}
.share-stars label,.rvform .stars-l{white-space:nowrap}

/* ---- anketa ---- */
.pgh:has(.row)::after{display:none}
.anketa p,.anketa li{font-size:inherit}
@media(max-width:560px){.an-sign td:last-child{white-space:nowrap;min-width:92px}.pgh.noprint{padding-top:calc(var(--head,64px) + 40px)}}

/* ---- card page ---- */
.split.mid{align-items:center}

/* ---- headings never leave one word alone ---- */
h2,h3{text-wrap:balance}
p.lead{text-wrap:pretty}

/* useful: 4 columns with a wide first article, no holes */
@media(min-width:1100px){
  .mcards.arts-list{grid-template-columns:repeat(4,1fr)}
  .mcards.arts-list>.mc:first-child{grid-column:span 2}
  .mcards.arts-list>.mc:first-child .ph{aspect-ratio:8/5}
}
/* contacts on phones: long values get the full row */
@media(max-width:600px){.cgrid>.ccard:nth-child(2),.cgrid>.ccard:nth-child(4){grid-column:1/-1}.cgrid>.ccard:nth-child(2){order:3}.cgrid>.ccard:nth-child(4){order:4}.cgrid>.ccard:nth-child(5){order:5}.cgrid>.ccard:nth-child(6){order:6}}
