/* NOVA ESTRUTURA V10.1 — revisão de legibilidade e responsividade.
   APENAS CSS: não alterar o 3D, cálculos, dados ou exportadores. */
:root { text-size-adjust:100%; -webkit-text-size-adjust:100%; }
html, body { max-width:100%; }
/* Títulos: evitar colisões entre linhas, especialmente nas letras acentuadas. */
h1, h2, h3, h4,
.sim-side h3, .n7-titleline h1, .n7-panehead h2,
.n3d-hero h1, .n3d-top strong {
  line-height:1.2;
  overflow-wrap:break-word;
}
h1, h2 { letter-spacing:-.02em; }
/* Blocos e campos fluidos, incluindo os acrescentados na V9/V10. */
.n7-layout, .n7-preview, .n7-settings, .n7-group,
.n7-pair, .n9-grid, .n10-pair, .n10-grid4,
.sim-layout, .sim-grid, .sim-form, .sim-side {
  min-width:0;
}
.n7-pair, .n10-pair, .n10-grid4, .sim-grid.two {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.n7-settings label, .n7-settings summary, .sim-form label,
.n7-settings .n7-tip, .n7-settings .n7-warning,
.n7-live, .n7-info, .n10-note, .n10-export-status,
.sim-results, .sim-side li, .n7-price {
  overflow-wrap:break-word;
  word-break:normal;
  line-height:1.5;
}
.n7-settings label, .n7-settings label > *,
.n7-detailsbody, .n7-detailsbody > *,
.n7-pair > *, .n10-pair > *, .n10-grid4 > *,
.sim-grid > *, .sim-layout > * {
  min-width:0;
}
.n7-settings form input:not([type=checkbox]),
.n7-settings form select,
.n7-settings form textarea,
.sim-form input:not([type=checkbox]), .sim-form select, .sim-form textarea {
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  line-height:1.4;
  min-height:44px;
}
.n7-settings form textarea, .sim-form textarea {line-height:1.6;}
.n7-details summary {
  flex-wrap:wrap;
  align-items:baseline;
  min-height:34px;
  line-height:1.5;
  white-space:normal;
}
.n7-details summary small {
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.45;
}
.n7-details summary::before { flex-shrink:0; }
.n7-panehead, .n7-titleline, .n7-live,
.n3d-controls, .sim-step-label { min-width:0; }
.n7-panehead > div, .n7-titleline > div,
.n7-live #novaOrcamentoResumo {min-width:0;}
.n7-panehead h2 {line-height:1.23;}
.n7-counter, .n7-status, .n7-price strong,
.n7-barinner b, .n7-barinner small {line-height:1.35;}
.n7-warning, .n7-info, .n9-caution, .n10-export-status {line-height:1.6;}
.n7-actions .n7-btn, .n7-subactions button,
.n3d button, .sim-actions button, .sim-choice {
  white-space:normal;
  text-align:center;
  line-height:1.35;
  min-width:0;
  overflow-wrap:break-word;
}
.n8-export-menu {max-width:min(90vw,370px);}
.n8-export-menu button {white-space:normal;line-height:1.5;}
.n8-export-menu small {line-height:1.5;overflow-wrap:break-word;}
/* Em larguras pequenas, não comprimir texto nem invadir o botão fixo. */
@media (max-width:900px) {
  .n7-header { gap:10px; }
  .n7-header nav { gap:12px; flex-wrap:wrap; }
  .n7-header nav a { line-height:1.35; }
  .n7-live {gap:12px;}
}
@media (max-width:640px) {
  .n7-titleline {align-items:flex-start;flex-wrap:wrap;gap:12px;}
  .n7-panehead {gap:10px;}
  .n7-counter {white-space:normal;text-align:right;}
  .n7-pair, .n10-pair, .n10-grid4,
  .sim-grid.two, .sim-grid.three {grid-template-columns:minmax(0,1fr);}
  .n7-settings form label, .n3d-side label {font-size:12px;line-height:1.5;}
  .n7-settings form select, .n7-settings form input:not([type=checkbox]) {font-size:13px;}
  .n7-price {white-space:normal;flex-wrap:wrap;}
  .n7-barinner {align-items:stretch;}
  .n7-actions {min-width:0;}
  .n7-actions .n7-btn {min-height:44px;}
  .n8-export-menu {max-width:calc(100vw - 22px);}
  .n3d-controls .n3d-btns {max-width:100%;}
}
@media (max-width:360px) {
  .n7-header {padding:0 10px;}
  .n7-header #n7HeaderRequest {font-size:10px; padding:9px 7px;}
  .n7-barinner {padding:9px 8px;}
  .n7-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
  .n8-export-wrap {min-width:0;}
  .n7-actions #n7Request {grid-column:1/-1;}
  .n7-app {padding-bottom:160px;}
  .n8-export-menu {min-width:0; width:min(88vw,320px);}
  .n10-export-status {bottom:145px;}
}
/* Ajustes finos detetados no teste a 320–390 px: cabeçalhos. */
@media (max-width:650px) {
  .header .nav-wrap {gap:9px;min-width:0;}
  .header .nav-wrap > .brand {min-width:0;flex:0 1 auto;gap:7px;}
  .header .nav-wrap > .brand > span {min-width:0;}
  .header .nav-wrap > .brand strong {font-size:clamp(14px,4vw,18px);line-height:1.18;white-space:nowrap;}
  .header .nav-wrap > .brand small {display:none;}
  .header .nav-wrap > .btn-mini {font-size:10px;padding:9px 8px;min-height:40px;line-height:1.25;white-space:normal;text-align:center;flex-shrink:1;}
  .nav-wrap .nav-side {margin-left:auto;flex-shrink:0;gap:6px;}
}
@media (max-width:360px) {
  .header .brand img {width:34px;height:34px;}
  .header .brand strong {font-size:14px;}
  .header .nav-wrap {gap:7px;}
  .header .nav-side .language select {font-size:10px;padding:6px 2px;}
  .header .menu-toggle {width:29px;min-width:29px;}
  .n7-brand small {display:none;}
}
