/* Shared finishing rules. Existing page compositions and editorial treatments stay intact. */
:root{--paper:#f8f6f1;--ink:#262626;--gold:#b99f6c;--muted:#626555;--line:#deded5;--action-gold:#78613f;--focus-gold:#8c713e}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable}
html:has(dialog[open]){overflow:hidden}
button,input,select,textarea{font-family:inherit}
textarea{resize:vertical}
input,select,textarea{min-width:0;max-width:100%}
button[hidden],select[hidden],.application-review[hidden],.empty[hidden]{display:none!important}
.project-grid>*,.contact>*,.application-fields>*,.contact-modal-fields>*,.footer-top>*,.belief-pair>*{min-width:0}
.application-review dd,.contact-modal-result,.article-body a,footer a[href^="mailto:"]{overflow-wrap:anywhere}
main section[id],main article[id]{scroll-margin-top:calc(var(--header-stack,104px) + 24px)}
.cover-header .menu{color:inherit!important}
.cover-header .tool{flex-shrink:0}
.application-form>.button,.application-review>.button,#contact-glass-dialog .contact-glass-submit{background:var(--action-gold)!important;color:#fff!important;border-color:var(--action-gold)!important}
.application-fields small,.application-help{color:#6b705f}
#contact-glass-dialog .contact-modal-fields ::placeholder,.application-fields ::placeholder{color:#6d7462!important;opacity:1}
#contact-glass-dialog .contact-modal-fields textarea{font-family:inherit}
.button,.contact-glass-submit{min-height:46px;line-height:1.5}
.contact-invitation-card .phone{font-family:Arial,sans-serif;font-size:clamp(24px,3vw,38px);white-space:nowrap;line-height:1.4}
.footer-top{grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr)) minmax(0,1.3fr)}
.footer-social a{flex:0 0 auto}
/* Medium screens use the existing compact-menu treatment instead of cramped 10px navigation. */
@media(max-width:1024px){
.cover-header,.cover-header:not(.scrolled){gap:12px!important;padding-inline:20px!important}
.cover-header .brand img{width:120px!important}
.cover-header .header-tools{margin-inline-start:auto;gap:5px}
.cover-header .menu{display:flex!important;align-items:center;justify-content:center;flex:0 0 42px;width:42px;min-width:42px;height:42px;padding:7px}
.cover-header nav#nav{display:none!important;position:absolute!important;inset:auto 12px auto!important;top:calc(100% + 8px)!important;width:calc(100% - 24px);max-width:none;max-height:calc(100svh - var(--header-row,104px) - 30px);padding:12px!important;margin:0;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:0!important;overflow-x:hidden!important;overflow-y:auto!important;background:#faf8f0f2!important;color:#3d4537;border:1px solid #fff9;border-radius:20px;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 16px 40px #2932221a;z-index:120}
.cover-header nav#nav.open{display:flex!important}
.cover-header nav#nav a{display:flex!important;align-items:center;justify-content:flex-start;min-height:46px;padding:11px 16px!important;font-size:14px!important;line-height:1.7;white-space:normal!important}
.cover-header nav#nav .nav-contact{margin-top:7px;background:#e9e2d2a8!important;border-radius:14px}
.cover-header nav#nav a[aria-current=page]{color:#6e5733;background:#eae3d380;border-radius:12px}
}
@media(max-width:760px){
input:not([type=checkbox]):not([type=radio]),select,textarea,#contact-glass-dialog .contact-modal-fields input,#contact-glass-dialog .contact-modal-fields select,#contact-glass-dialog .contact-modal-fields textarea{font-size:16px!important}
.footer-top{grid-template-columns:repeat(2,minmax(0,1fr))}
.footer-brand{grid-column:1/-1}
.footer-top>div:last-child{grid-column:auto}
.footer-bottom{align-items:flex-start;line-height:1.9}
.contact-invitation-card .phone{font-size:30px}
.application-review dl{min-width:0}
}
@media(max-width:380px){
.cover-header,.cover-header:not(.scrolled){padding-inline:12px!important;gap:8px!important}
.cover-header .brand img{width:88px!important}
.cover-header .header-tools{gap:4px}
.cover-header .tool,.cover-header.scrolled .tool{width:35px!important;height:35px!important;min-width:35px!important;min-height:35px!important;flex-basis:35px}
.cover-header .menu{width:36px;min-width:36px;flex-basis:36px;height:40px}
.wrap{width:calc(100% - 32px)}
.footer-top{gap:28px 16px}
.contact-invitation-card .phone{font-size:27px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Chapter navigation follows the cover, then docks like the map toolbar. */
body.has-chapter-nav{--header-stack:192px}
body.has-chapter-nav.is-scrolled{--header-stack:170px}
body.has-chapter-nav .cover-header.scrolled{top:10px!important;left:12px!important;right:12px!important;width:calc(100% - 24px)!important;border-radius:44px!important}
body.has-chapter-nav .chapter-nav{position:sticky!important;top:calc(var(--header-row,104px) + 18px)!important;left:auto!important;right:auto!important;width:calc(100% - 60px)!important;max-width:1500px!important;min-height:70px!important;box-sizing:border-box;margin:0 auto!important;padding:12px 20px!important;display:flex!important;align-items:center;justify-content:center!important;gap:clamp(12px,2.3vw,36px)!important;flex-wrap:nowrap!important;border-radius:36px!important;background:#f5f1e5b8!important;color:#545b4c!important;border:1px solid #ffffff75!important;backdrop-filter:blur(14px) saturate(1.2)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important;box-shadow:0 8px 30px #393a2814!important;z-index:90;overflow-x:auto;transition:top .65s var(--product-ease)}
body.has-chapter-nav .chapter-nav a{color:#626555!important;opacity:1!important;padding:10px 16px!important;border-radius:24px!important;font-size:12px;flex:0 0 auto;transition:background .3s,color .3s}
body.has-chapter-nav .chapter-nav a:hover,body.has-chapter-nav .chapter-nav a[aria-current=true]{background:#e7dcc3b3!important;color:#685838!important}
.eastern-life-page{--life-offset:calc(var(--header-row,104px) + 106px)}
@media(max-width:760px){
body.has-chapter-nav .chapter-nav{width:calc(100% - 24px)!important;min-height:58px!important;padding:8px 12px!important;border-radius:24px!important;gap:6px!important;justify-content:flex-start!important}
body.has-chapter-nav .chapter-nav a{font-size:11px;padding:9px 13px!important}
body.has-chapter-nav{--header-stack:174px}body.has-chapter-nav.is-scrolled{--header-stack:158px}
.eastern-life-page{--life-offset:calc(var(--header-row,94px) + 94px)}
}
@media(prefers-reduced-motion:reduce){body.has-chapter-nav .chapter-nav{transition:none!important}}

/* Inset floating toolbars, with breathing room above and beside the scene. */
body.has-chapter-nav .chapter-nav{width:calc(100% - 112px)!important;max-width:1120px!important;top:calc(var(--header-row,104px) + 30px)!important;margin:24px auto 16px!important}
body.has-chapter-nav{--header-stack:204px}body.has-chapter-nav.is-scrolled{--header-stack:182px}
body .map-cinema-frame>.atlas-explorer-top{width:calc(100% - 112px)!important;max-width:1240px!important;box-sizing:border-box;top:calc(var(--header-row,104px) + 30px)!important;margin:calc(var(--header-row,104px) + 30px) auto 0!important}
body.eastern-life-page{--life-offset:calc(var(--header-row,104px) + 130px)}




@media(max-width:900px){body .map-cinema-frame>.atlas-explorer-top{width:calc(100% - 56px)!important;margin:24px auto 16px!important}}
@media(max-width:760px){body.has-chapter-nav .chapter-nav{width:calc(100% - 48px)!important;margin:24px auto 16px!important}body.has-chapter-nav{--header-stack:186px}body.has-chapter-nav.is-scrolled{--header-stack:170px}body.eastern-life-page{--life-offset:calc(var(--header-row,94px) + 118px)}}
