/* V1.3 — melhorias compartilhadas, preservando a identidade ES. */
:root{--es-focus:#ffb17f;--es-muted:#c1c1c1;--es-target:44px}
html{scroll-padding-top:112px}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--es-focus);outline-offset:3px}
.audit-direct{display:block;width:max-content;max-width:100%;font-size:12px;font-weight:600;color:#ffb17f;text-decoration:underline;text-underline-offset:4px;padding:10px 0}
.audit-footer{grid-column:1/-1;flex:1 0 100%;display:flex;gap:10px 22px;flex-wrap:wrap;justify-content:space-between;align-items:center;font:12px/1.6 'DM Sans',Arial,sans-serif;color:#c1c1c1;border-top:1px solid #ffffff26;padding:14px 0}
.audit-footer a,.audit-document-footer a,.audit-form-note a{color:#ffb17f;text-decoration:underline;text-underline-offset:3px}
.audit-form-note{color:#c1c1c1;font-size:12px;line-height:1.6;margin:12px 0}
.brand .es-mark{flex-shrink:0;background:none!important}
:where(.main-nav,.nav-links,.anamnese-nav) a{min-height:36px;display:inline-flex;align-items:center}
:where(.menu-toggle,.menu-button){min-width:44px;min-height:44px}
:where(.button,.open-contact,.details-trigger,.text-button){min-height:44px}
:where(.chapter-copy .chapter-description){color:#d0d0d0}
:where(.viewer-panel .control-label,.viewer-panel .range-top,.viewer-panel-top){color:#c5c5c5}
.viewer-panel .segment-control button{min-height:30px;font-size:10px}
@media(max-width:750px){html{scroll-padding-top:90px}.audit-direct{font-size:11px;padding:8px 0}.audit-footer{font-size:11px}.mobile-nav a,#mobile-menu a{min-height:44px}.anamnese-nav a{flex:1;justify-content:center;padding:8px 5px!important;min-height:44px}.brand .es-type{font-size:clamp(11px,3vw,14px)}.brand .es-mark{width:48px}.viewer-panel .segment-control button{min-height:32px}.viewer-panel .control-label,.viewer-panel .range-top{font-size:8px}}
@media(max-width:390px){.audit-direct{padding:5px 0}.brand .es-type small{font-size:6px}.anamnese-nav a{font-size:10px}.audit-footer{flex-direction:column;align-items:flex-start}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.audit-direct{transition:none}}
@media print{.audit-footer,.audit-direct{display:none!important}}

/* The control tray is collapsible; avoid a sticky scene taller than the actual phone. */
@media(max-width:600px){
  .experience .stage{min-height:0;height:100svh}
  .experience .chapter-copy{bottom:105px;max-width:88%;transform:none}
  .experience .chapter-copy .chapter-description{font-size:12px;line-height:1.55;max-width:310px;margin-top:10px}
  .experience .chapter-copy .button{font-size:11px;min-height:44px;margin-top:12px}
  .experience .chapter-copy .kicker{font-size:8px;margin-bottom:10px}
  .experience .viewer-panel{bottom:12px;max-height:50svh;overflow:auto;overscroll-behavior:contain}
  .viewer-panel-top{font-size:10px}
  #viewer-toggle{width:44px;min-height:34px}
  .viewer-actions button{min-width:32px;min-height:32px}
  .experience .scroll-cue{bottom:80px}
  .experience .scene-meta{font-size:7px;top:96px;max-width:48%;text-align:right}
  .experience .anatomy-poster{height:52%;top:10%}
  .site-header{gap:10px}
  .site-header .header-right{gap:8px}
  .site-header .header-cta{display:none}
}
@media(max-width:600px) and (max-height:690px){
  .experience .chapter-copy{bottom:89px}
  .experience .chapter-copy h1,.experience .chapter-copy h2{font-size:clamp(34px,10vw,47px)}
  .experience .chapter-copy .chapter-description{font-size:11px;margin-top:8px}
  .experience .chapter-copy .button{margin-top:8px}
  .experience .chapter-rail{top:20%;gap:4px}
  .experience .anatomy-tag,.experience .scroll-cue{display:none}
  .experience .viewer-panel{bottom:8px;padding:6px 12px}
  .experience .stage-vignette{background:linear-gradient(0deg,#101010 2%,#101010e0 29%,#10101000 75%)}
}
@media(max-height:520px) and (min-width:601px){
  .experience .stage{min-height:0;height:100svh}
  .experience .chapter-copy{top:26%;width:48%;left:8%}
  .experience .chapter-copy h1,.experience .chapter-copy h2{font-size:clamp(28px,5.7vw,52px)}
  .experience .chapter-copy .kicker{margin-bottom:8px}
  .experience .chapter-copy .chapter-description{margin-top:8px;font-size:11px}
  .experience .chapter-copy .button{margin-top:8px;min-height:40px}
  .experience .viewer-panel{max-height:45svh;overflow:auto;bottom:8px}
  .experience .scene-meta,.experience .experience-label{top:87px}
  .experience .scroll-cue{display:none}
}
/* Refinement: narrow-screen header and footer must never increase viewport width. */
footer.footer{flex-wrap:wrap;gap:12px}
.audit-footer{min-width:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:380px){
  .header{gap:8px}
  .header .header-actions{gap:8px;min-width:0}
  .header .contact-link{font-size:10px;gap:4px;white-space:nowrap}
  .header .menu-toggle{flex-shrink:0}
}
