/* Mobile-specific terminal scanner layout.
   Prevents iOS Safari text inflation and keeps all scanner copy inside the viewport. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

@media(max-width:700px){
  .terminal-card{overflow:hidden!important;width:100%!important;max-width:100%!important}
  .terminal-heading{padding:18px 14px 16px!important;gap:10px!important;max-width:100%!important}
  .terminal-heading>div{min-width:0!important;width:100%!important;max-width:100%!important}
  .terminal-heading h3{font-size:20px!important;line-height:1.18!important;letter-spacing:-.015em!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .terminal-heading>div>p:last-child{font-size:12px!important;line-height:1.48!important;max-width:100%!important;overflow-wrap:anywhere!important}
  .terminal-badge{font-size:8px!important;line-height:1.2!important;white-space:normal!important;max-width:130px!important}

  .community-points{grid-template-columns:1fr!important;gap:6px!important;width:100%!important;max-width:100%!important}
  .community-points>span{padding:9px 10px!important;min-width:0!important}
  .community-points b{font-size:9px!important}
  .community-points small{font-size:9px!important}

  .terminal-howto{grid-template-columns:1fr!important;margin:0 12px!important;width:auto!important;max-width:calc(100% - 24px)!important}
  .terminal-howto>div{padding:11px 10px!important;min-width:0!important}
  .terminal-howto>div>b{flex-basis:26px!important;width:26px!important;height:26px!important}
  .terminal-howto>div>span{min-width:0!important}
  .terminal-howto strong{font-size:10px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
  .terminal-howto small{font-size:9px!important;line-height:1.4!important;overflow-wrap:anywhere!important}

  .scanner-note{display:block!important;margin:12px 12px 0!important;padding:11px 12px!important;width:auto!important;max-width:calc(100% - 24px)!important;min-width:0!important;overflow:hidden!important}
  .scanner-note strong{display:block!important;max-width:100%!important;white-space:normal!important;font-size:9px!important;line-height:1.35!important;letter-spacing:.055em!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .scanner-note span{display:block!important;max-width:100%!important;margin-top:7px!important;font-size:11px!important;line-height:1.48!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .scanner-note span b{font-size:inherit!important}

  .tab-rule{grid-template-columns:1fr!important;margin:0 12px 14px!important;padding:10px!important;width:auto!important;max-width:calc(100% - 24px)!important}
  .tab-rule div,.tab-rule span{min-width:0!important}
  .tab-rule strong{font-size:10px!important;overflow-wrap:anywhere!important}
  .tab-rule small{font-size:9px!important;line-height:1.38!important;overflow-wrap:anywhere!important}

  .split-terminal-upload{grid-template-columns:1fr!important;padding:14px 12px 16px!important;gap:14px!important;width:100%!important;max-width:100%!important;min-width:0!important}
  .split-terminal-upload>*{min-width:0!important;max-width:100%!important}
  .field>span,.upload-kind>span{font-size:9px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .field select{font-size:16px!important;max-width:100%!important}
  .upload-kind{width:100%!important;min-width:0!important}
  .upload-drop-v7{width:100%!important;max-width:100%!important;min-width:0!important;min-height:82px!important;padding:10px!important}
  .upload-drop-v7 b{display:block!important;max-width:100%!important;font-size:9px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .upload-drop-v7 em{font-size:8px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .upload-kind small{font-size:9px!important;line-height:1.4!important;overflow-wrap:anywhere!important}
  .split-terminal-action{width:100%!important}
  .split-terminal-action .secondary-action{width:100%!important;min-width:0!important}

  .terminal-message#selectedScreensV7,.ocr-progress{margin-left:12px!important;margin-right:12px!important;padding-left:0!important;padding-right:0!important;max-width:calc(100% - 24px)!important;overflow-wrap:anywhere!important}
  .ocr-review-v7{margin:0 12px!important;max-width:calc(100% - 24px)!important}
  .ocr-review-v7 .review-heading{align-items:flex-start!important;flex-direction:column!important;padding:10px!important}
  .ocr-review-v7 .review-heading>div{min-width:0!important}
  .ocr-review-v7 .review-heading small{font-size:9px!important;line-height:1.4!important;overflow-wrap:anywhere!important}
  .ocr-review-v7 .primary-action{width:100%!important;min-width:0!important}
  .review-table-wrap{-webkit-overflow-scrolling:touch!important;max-width:100%!important}
}

@media(max-width:430px){
  .terminal-heading h3{font-size:18px!important}
  .terminal-heading>div>p:last-child{font-size:11px!important}
  .scanner-note span{font-size:10px!important;line-height:1.45!important}
  .scanner-note strong{font-size:8px!important}
  .terminal-howto{margin-left:10px!important;margin-right:10px!important;max-width:calc(100% - 20px)!important}
  .scanner-note,.tab-rule{margin-left:10px!important;margin-right:10px!important;max-width:calc(100% - 20px)!important}
  .split-terminal-upload{padding-left:10px!important;padding-right:10px!important}
  .ocr-review-v7{margin-left:10px!important;margin-right:10px!important;max-width:calc(100% - 20px)!important}
}
