/* Keep desktop composition intact; improve reading and touch controls on phones. */
.demo-scroll-hint { display: none; }
.demo-table-scroll { min-width: 0; }

@media screen and (max-width: 760px) {
  html { scroll-padding-top: 90px; }
  .container { width: calc(100% - 40px); }
  .announcement { min-height: 32px; height: auto; padding: 5px 12px; font-size: 10px; flex-wrap: wrap; }
  .nav-inner { gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-actions .button-small { min-height: 44px; font-size: 11px; padding: 10px 11px; gap: 6px; }
  .menu-toggle { width: 44px; height: 44px; flex-shrink: 0; margin-right: -6px; }
  .main-nav { max-height: calc(100dvh - 80px); overflow-y: auto; }
  .main-nav > a { min-height: 48px; font-size: 15px; }
  .hero h1 { font-size: clamp(34px, 9vw, 59px); letter-spacing: -1.8px; }
  .hero-description { font-size: 15px; line-height: 1.9; }
  .hero-eyebrow { font-size: 11px; flex-wrap: wrap; }
  .hero-actions .button { font-size: 13px; min-height: 48px; gap: 10px; padding-inline: 16px; }
  .hero-reassurance { font-size: 11px; gap: 10px 14px; flex-wrap: wrap; }
  .hero-bottom-note { font-size: 11px; width: 100%; }
  .capability-strip { gap: 20px 10px; }
  .strip-intro { font-size: 10px; }
  .strip-intro strong { font-size: 11px; }
  .capability-strip > span:not(:first-child) { font-size: 11px; gap: 6px; }
  .eyebrow { font-size: 10px; letter-spacing: 1px; }
  .section-heading > p, .section-heading > div + p, .centered > p:last-child { font-size: 14px; }
  .section-heading h2 { font-size: 28px; }
  .feature-card { padding: 24px 22px; min-height: 260px; }
  .feature-card h3 { font-size: 18px; }
  .feature-card > p { font-size: 13px; line-height: 1.9; min-height: 0; }
  .feature-label { font-size: 10px; }
  .feature-number { font-size: 11px; }
  .keyword-demo, .comment-demo, .monitor-demo, .pipeline-demo, .schedule-demo { font-size: 11px; }
  .keyword-demo > span, .comment-demo > span:last-child, .pipeline-demo > span { font-size: 10px; }
  .schedule-demo strong { font-size: 10px; }
  .notification-demo strong { font-size: 12px; }
  .notification-demo > div > span { font-size: 10px; }
  .demo-tab { font-size: 12px; min-height: 46px; padding: 10px 6px; gap: 5px; }
  .app-content { min-width: 0; width: 100%; padding: 22px 16px; }
  .app-chrome { font-size: 8px; gap: 8px; }
  .app-chrome-note { font-size: 8px; }
  .app-page-header { gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  .app-page-header h3 { font-size: 20px; }
  .app-page-header p { font-size: 12px; line-height: 1.8; }
  .app-page-header > .button { min-height: 44px; font-size: 12px; padding: 10px 12px; }
  .app-stat { padding: 13px 9px; }
  .app-stat label { font-size: 11px; }
  .app-stat strong { font-size: 26px; }
  .app-stat small { display: inline-block; font-size: 10px; }
  .app-stat > span { font-size: 10px; line-height: 1.8; }
  .app-stat > .icon { display: none; }
  .app-toolbar { flex-wrap: wrap; gap: 10px; }
  .app-toolbar h4 { width: 100%; font-size: 14px; }
  #lead-count { font-size: 11px !important; }
  .demo-search { flex: 1; min-width: 120px; margin-left: 0; }
  .demo-search input { width: 100%; max-width: none; height: 44px; font-size: 16px; padding-left: 32px; }
  .demo-search > .icon { top: 14px; left: 10px; width: 16px; height: 16px; }
  .filter-button { min-height: 44px; padding: 10px 8px; font-size: 11px; }
  .filter-button > .icon { width: 14px; height: 14px; }
  .demo-table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .demo-scroll-hint { display: block; font-size: 11px; color: #67795b; margin: 10px 0; }
  .data-table { min-width: 600px; }
  .data-table th { font-size: 12px; padding: 12px 10px; }
  .data-table td { font-size: 12px; padding: 14px 10px; }
  .data-table .optional-col { display: table-cell; }
  .data-table .table-person { font-size: 13px; min-width: 105px; white-space: nowrap; }
  .table-person .avatar { display: inline-grid; width: 28px; height: 28px; font-size: 10px; }
  .data-table .table-comment { font-size: 12px; min-width: 170px; max-width: 210px; line-height: 1.8; }
  .data-table .tag { font-size: 11px; padding: 3px 7px; }
  .table-action { min-height: 44px; padding: 10px 4px; font-size: 12px; }
  .app-table-bottom { font-size: 10px; line-height: 1.8; flex-wrap: wrap; }
  .demo-caption { font-size: 10px; text-align: center; }
  .monitor-cards { grid-template-columns: 1fr; }
  .monitor-card { min-height: 100px; padding: 18px 14px; }
  .monitor-card h4 { font-size: 14px; padding-right: 48px; }
  .monitor-card p, .monitor-card > .tag { font-size: 11px; }
  .monitor-bottom { flex-wrap: wrap; }
  .monitor-bottom > div:first-child { width: 100%; }
  .monitor-bottom h4 { font-size: 14px; }
  .monitor-bottom p { font-size: 12px; }
  .monitor-chart { min-width: 180px; }
  .task-reminder { font-size: 12px; align-items: flex-start; line-height: 1.8; }
  .scenario-content .eyebrow { font-size: 9px; }
  .scenario-content h3 { font-size: 18px; }
  .scenario-content p { font-size: 13px; }
  .scenario-tags > span { font-size: 10px; padding: 3px 6px; }
  .section-footnote { font-size: 11px; }
  .workflow-intro > p:not(.eyebrow), .faq-intro > p:not(.eyebrow) { font-size: 14px; }
  .workflow-intro > .text-button, .faq-intro > .text-button { font-size: 14px; min-height: 44px; }
  .step h3 { font-size: 18px; }
  .step p { font-size: 13px; }
  .step-tag { font-size: 10px; }
  .control-grid > div > p:last-child { font-size: 14px; }
  .control-items h3 { font-size: 16px; }
  .control-items p { font-size: 13px; }
  .faq-list summary { font-size: 15px; min-height: 56px; gap: 12px; }
  .faq-list details > p { font-size: 13px; }
  .banner-copy .eyebrow { font-size: 9px; }
  .banner-copy > p:not(.eyebrow) { font-size: 14px; }
  .banner-actions { flex-wrap: wrap; }
  .banner-actions .button { font-size: 12px; min-height: 48px; padding: 12px 14px; }
  .banner-note { font-size: 10px; }
  .footer-top > div:first-child > p { font-size: 12px; }
  .footer-links { gap: 12px; padding-right: 0; }
  .footer-links > div { gap: 0; min-width: 0; }
  .footer-links strong { font-size: 12px; }
  .footer-links a, .footer-links button { font-size: 12px; min-height: 44px; display: flex; align-items: center; }
  .footer-bottom { font-size: 10px; }
  .back-top { width: 44px; height: 44px; }
  .floating-tools { right: max(8px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .floating-tools button, .floating-tools a { width: 44px; min-height: 44px; }
  .floating-tools button span { font-size: 9px; }
  .floating-tools .icon { width: 18px; height: 18px; }
  .site-footer { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
  .site-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 24px 20px; overflow-y: auto; scroll-padding: 16px; }
  .dialog-close { position: sticky; z-index: 2; top: 0; margin: -12px -8px -32px auto; width: 44px; height: 44px; background: #edf2e5; }
  .dialog-close .icon { width: 20px; height: 20px; }
  .site-dialog > .eyebrow { padding-right: 40px; font-size: 9px; }
  .site-dialog h2 { font-size: 23px; padding-right: 26px; }
  .dialog-intro { font-size: 14px; }
  .dialog-brand { justify-content: flex-start; gap: 12px; padding-right: 36px; }
  .dialog-brand .tag { font-size: 9px; letter-spacing: .4px; white-space: normal; }
  .wecom-card { padding: 20px 12px; }
  .wecom-qr-frame { width: 244px; }
  .wecom-promo, .wecom-promo strong { font-size: 14px; }
  .wecom-label { font-size: 11px; }
  .wecom-card-compact .wecom-promo { font-size: 12px; }
  .wecom-card-compact .wecom-qr-frame { width: 190px; }
  .qr-save { min-height: 48px; font-size: 14px; }
  .dialog-footnote { font-size: 12px; }
  .site-dialog form label:not(.checkbox-label) { font-size: 14px; }
  .site-dialog input:not([type=checkbox]), .site-dialog textarea, .site-dialog select { font-size: 16px; min-height: 48px; }
  .checkbox-label { font-size: 12px; gap: 10px; min-height: 44px; align-items: center; }
  .checkbox-label input { width: 20px; height: 20px; flex-shrink: 0; }
  .site-dialog form > .button { min-height: 48px; font-size: 14px; }
  .prose { font-size: 14px; }
  .prose h3 { font-size: 16px; }
  .lead-detail-card p, .lead-detail-list, .lead-detail-note { font-size: 13px; }
  .toast { max-width: calc(100vw - 32px); font-size: 13px; bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media screen and (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { min-height: 0; }
  .feature-top { margin-bottom: 16px; }
  .feature-card > p { max-width: none; font-size: 14px; }
  .feature-icon { width: 40px; height: 40px; }
  .keyword-demo > span:last-child, .pipeline-demo > span:last-child, .pipeline-demo > i:last-of-type { display: inline; }
  .scenario-card { grid-template-columns: 1fr; }
  .scenario-art { min-height: 0; height: 180px; }
  .scenario-art > svg { width: 100%; transform: none; }
  .scenario-content { padding: 24px; }
  .scenario-content h3 { font-size: 20px; }
  .scenario-content p { font-size: 14px; }
  .art-bubble { font-size: 10px; }
  .download-banner { padding-inline: 22px; }
}

@media screen and (max-width: 370px) {
  .container { width: calc(100% - 32px); }
  .brand { gap: 6px; }
  .brand > span { font-size: 18px; }
  .brand > img { width: 30px; height: 30px; }
  .nav-actions { gap: 3px; }
  .nav-actions .button-small { font-size: 10px; padding-inline: 8px; }
  .nav-actions .button-small .icon { display: none; }
  .hero-actions .button { font-size: 12px; padding-inline: 12px; }
  .hero-description { font-size: 14px; }
  .hero-reassurance { font-size: 10px; gap: 10px; }
  .section-heading h2 { font-size: 25px; }
  .demo-tab { font-size: 11px; }
  .app-content { padding-inline: 12px; }
  .app-stat { padding-inline: 7px; }
  .app-stat strong { font-size: 23px; }
  .banner-copy h2 { font-size: 26px; }
  .footer-links a, .footer-links button { font-size: 11px; }
}

@media screen and (max-width: 760px) and (orientation: landscape) and (max-height: 500px) {
  .site-dialog { max-height: calc(100dvh - 16px); }
  .main-nav { max-height: calc(100dvh - 68px); }
}
