/* Phone-only layout and touch targets. Desktop rules are left to each page. */
@media (max-width: 760px) {
  body .site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px 16px;
    min-height: 0;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  body .site-footer .footer-grid > div { min-width: 0; }
  body .site-footer .footer-brand { grid-column: 1/-1; text-align: center; }
  body .site-footer .footer-brand .site-brand:has(.site-custom-logo) { width: min(190px,100%); margin-inline: auto; }
  body .site-footer .site-custom-logo { width: 100%; max-width: 190px; max-height: 92px; height: auto; }
  body .site-footer .footer-grid h2 { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
  body .site-footer .footer-grid > div > a { display: flex; align-items: center; min-height: 40px; margin: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  body .site-footer .footer-brand .social-links { justify-content: center; margin-top: 8px; }
  body .site-footer .social-links { flex-wrap: wrap; gap: 8px; }
  body .site-footer .social-links a { width: 44px; height: 44px; font-size: 16px; }
  body .site-footer .newsletter { grid-column: 1/-1; }
  body .site-footer .newsletter form { min-height: 46px; }
  body .site-footer .newsletter input { font-size: 16px; }
  body .site-footer .newsletter button { flex: 0 0 48px; }
  body .site-footer .footer-bottom .sv-container { min-height: 0; gap: 8px; padding-block: 14px; font-size: 11px; line-height: 1.6; }
  body .site-footer .footer-bottom span:last-child { flex-wrap: wrap; gap: 6px 16px; }
  body .site-footer .footer-bottom a { display: inline-flex; align-items: center; min-height: 32px; }

  body .community-stats .stats-inner { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; padding-block: 16px; }
  body .community-stats .stats-inner > div { min-width: 0; gap: 8px; }
  body .community-stats .stats-inner > .sv-footer-stat--newest { display: flex; }
  body .community-stats .stats-inner > .sv-footer-stat > span { min-width: 0; font-size: 11px; }
  body .community-stats .stats-inner strong { font-size: 14px; overflow-wrap: anywhere; }
  body .community-stats .stats-inner > .sv-footer-stat > .sv-icon { width: 34px; height: 34px; padding: 7px; }
  body .community-stats .sv-footer-stat--newest small { display: block; font-size: 11px; }

  /* 16px form text avoids iOS focus zoom and keeps input readable. */
  body .site-content :is(input[type='text'],input[type='email'],input[type='password'],input[type='url'],input[type='search'],input[type='tel'],input[type='number'],input[type='time'],select,textarea) { min-width: 0; max-width: 100%; font-size: 16px !important; }
  .sv-add-topic-native#wpforo #wpforo-wrap :is(input[name='thread[title]'],input[name='thread[tags]']) { font-size: 16px !important; }
  body .site-header .header-search input { font-size: 16px; }
  body .sva-settings-fields label { font-size: 13px; line-height: 1.5; }
  body .sva-settings-fields label small { font-size: 11px; line-height: 1.5; }
  body .sva-settings-card > header p { font-size: 11px; line-height: 1.5; }
  body .sva-settings-form button, body .sva-media-card button, body .sva-file-button { min-height: 44px; font-size: 13px; }
  body .sva-account-menu nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  body .sva-account-menu nav { overscroll-behavior-x: contain; }
  body .svauth-form label, body .sva-form label { line-height: 1.5; }

  body .svnp-switch { width: 44px; height: 44px; }
  body .svnp-switch i { top: 10px; bottom: 10px; }
  body .svnp-actions button, body .svnp-test button { min-height: 44px; }
  body .svn-tabs button, body .svn-toolbar button, body .svn-more > button { min-height: 44px; }
  body .svn-more > button { min-width: 44px; }
  body .svn-more > div { top: 48px; }
  body .svn-copy p { font-size: 12px; line-height: 1.5; }
  body .topic-statistics header > div { flex-wrap: wrap; }
  body .topic-statistics header button { min-height: 44px; font-size: 12px; }
  body .post-meta { flex-wrap: wrap; gap: 6px; }
  body .post-meta button { min-width: 40px; min-height: 40px; }
}

@media (max-width: 680px) {
  body :is(.ai-category-hero,.motorcycle-category-hero,.showcase-category-hero,.subforum-hero) { min-height: 0; }
  body :is(.ai-hero-copy,.showcase-hero-copy,.subforum-hero-copy) {
    width: 100%;
    min-height: 0;
    grid-template-columns: 52px minmax(0,1fr);
    grid-template-rows: auto auto auto;
    gap: 16px 12px;
    padding: 18px;
  }
  body :is(.ai-category-icon,.showcase-category-icon,.subforum-category-icon) { width: 50px; height: 50px; }
  body :is(.ai-hero-copy,.showcase-hero-copy,.subforum-hero-copy) h1 { margin-top: 0; font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
  body :is(.ai-hero-copy,.showcase-hero-copy,.subforum-hero-copy) p { font-size: 13px; line-height: 1.6; }
  body :is(.ai-hero-stats,.subforum-hero-stats) { gap: 8px; }
  body :is(.ai-hero-copy > .ai-new-topic,.showcase-hero-copy > .ai-new-topic,.subforum-hero-copy > .subforum-new-topic) {
    position: static;
    grid-column: 1/-1;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
  }
  body :is(.ai-hero-art,.showcase-hero-art,.subforum-hero-art) { display: none; }
  body .showcase-hero-notice { position: static; max-width: none; margin: 0 18px 18px; }
  body .forum-breadcrumb { flex-wrap: wrap; gap: 5px 8px; padding-block: 10px; font-size: 12px; }
  body .forum-breadcrumb > strong { min-width: 0; overflow-wrap: anywhere; }
}
