.compact-selects,.mobile-menu { display: none; }

@media (max-width: 650px) {
  /* Mobile is a focused calculator screen; the full tables stay on desktop. */
  body { background: #eef5f1; }
  .announce { display: none; }
  .head { height: 55px; min-height: 55px; padding: 0 15px; flex-wrap: nowrap; gap: 10px; position: relative; }
  .head .logo { width: 112px; }
  .head nav,.head-back { display: none; }
  .mobile-menu { display: block; position: relative; margin-left: auto; align-self: center; }
  .mobile-menu summary { list-style: none; cursor: pointer; color: #9bf5da; font-size: 12px; font-weight: 800; border: 1px solid #396164; padding: 8px 12px; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu>div { position: absolute; top: calc(100% + 9px); right: 0; z-index: 210; display: grid; width: min(290px,calc(100vw - 30px)); background: #0d2227; border: 1px solid #3b7069; box-shadow: 0 12px 32px #0006; }
  .mobile-menu>div a { padding: 12px 16px; font-size: 12px; font-weight: 700; border-bottom: 1px solid #254348; }
  .mobile-menu>div a:last-child { border-bottom: 0; }
  .mobile-menu>div a[aria-current] { color: #a8fae4; }
  .intro { display: none; }
  .workbench { min-height: calc(100svh - 55px); padding: 10px 12px 14px; }
  .workbench-head { align-items: center; gap: 6px; }
  .workbench-head .step { display: none; }
  .workbench-head h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
  .workbench-head .text-button { max-width: none; flex: none; font-size: 9px; padding: 3px 0; }
  .shape-grid { display: none; }
  .compact-selects { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; margin: 10px 0 11px; }
  .compact-selects label { display: block; color: #5e8177; font-size: 10px; font-weight: 800; }
  .compact-selects select { margin-top: 3px; }
  .workspace { display: flex; flex-direction: column; border: 0; box-shadow: none; }
  .inputs-col { padding: 0; }
  .field-section { padding: 0; margin: 0 0 9px; border: 0; }
  .field-section:last-child { margin-bottom: 0; }
  .field-section .section-heading,.material-pills,.field-section .hint,.shape-description,.density-label { display: none; }
  .fields-two { grid-template-columns: 1fr; gap: 6px; }
  .fields-two label,.dimensions label { gap: 3px; font-size: 10px; line-height: 1.25; color: #59776d; }
  input,select { min-height: 38px; height: 38px; padding: 6px 8px; font-size: 16px; border-color: #b8d5c9; background: #f8fcf9; }
  .dimensions { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .dimensions label { font-size: 9px; line-height: 1.15; justify-content: end; }
  .dimensions input { margin-top: auto; }
  #shape-warning:empty { display: none; }
  #shape-warning { min-height: 0; font-size: 10px; margin: 5px 0 0; }
  .mode-section { margin-bottom: 9px; }
  .result-col { padding: 12px 16px; min-height: 102px; border: 1px solid #285354; }
  .result-header { font-size: 9px; line-height: 1.2; }
  .diagram,.result-shape,.result-stats,.result-actions,#action-status { display: none; }
  .result-main { padding: 9px 0 0; border: 0; }
  .result-main>span { font-size: 9px; margin-bottom: 2px; }
  .result-main strong { font-size: clamp(34px,10vw,48px); line-height: 1.05; }
  .result-main small { font-size: 15px; }
  .result-note { font-size: 9px; line-height: 1.25; margin-top: 5px; }
  .disclaimer,footer { display: none; }
}

@media (max-width: 650px) and (max-height: 710px) {
  .workbench { padding-top: 7px; }
  .workbench-head h2 { font-size: 17px; }
  .compact-selects { margin: 7px 0 7px; }
  .field-section { margin-bottom: 6px; }
  input,select { min-height: 34px; height: 34px; }
  .result-col { padding: 9px 14px; }
  .result-main strong { font-size: 34px; }
}
