/* SEO／GEO 檢測工具：手機版（640px 以下）版面。只調整版面與點擊範圍，不影響檢測內容。 */
.m-toc, .m-toc-fab { display: none; }
@media (max-width: 640px) {
  html { -webkit-tap-highlight-color: transparent; }
  /* 工具上方列：按鈕不擠成兩行，次要標籤收起 */
  header { padding: 10px 12px !important; gap: 8px; }
  header .logo { min-width: 0; white-space: nowrap; overflow: hidden; }
  .badge-wrap { gap: 6px !important; flex-shrink: 0; }
  .badge-wrap .v-badge, .badge-wrap .offline-badge { display: none !important; }
  .hist-toggle { white-space: nowrap; min-height: 40px; padding: 6px 12px !important; }
  /* 開頭介紹精簡，輸入網址的地方更早出現 */
  .hero { padding-top: 18px !important; padding-bottom: 14px !important; }
  .hero h1 { font-size: 26px !important; }
  .hero-features, .hero-badge-row { display: none !important; }
  /* 產業選擇：一行左右滑動 */
  .industry-select { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 8px !important; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .industry-select::-webkit-scrollbar { display: none; }
  .ind-btn { flex-shrink: 0; white-space: nowrap; min-height: 40px; }
  /* 欄位 16px：iPhone 點欄位不會自動放大；按鈕加大 */
  input[type=text], input[type=url], input[type=search], input:not([type]), textarea, select { font-size: 16px !important; }
  .analyze-btn, .btn-run { min-height: 54px; font-size: 16px !important; width: 100%; justify-content: center; }
  .btn-row { flex-wrap: wrap; }
  .tab-btn, .src-btn, .fetch-btn, .btn-sub { min-height: 42px; }
  .rsec-head { padding: 16px 16px !important; min-height: 56px; }
  .rsec, .geo-section { scroll-margin-top: 76px; }
  /* 報告目錄 */
  .m-toc { display: block; margin: 0 0 14px; padding: 14px 14px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid rgba(95, 163, 150, 0.35); scroll-margin-top: 76px; }
  .m-toc-h { font-size: 16px; font-weight: 700; color: var(--text, #DDD8CE); }
  .m-toc-hint { margin: 4px 0 8px; font-size: 12.5px; color: var(--text3); }
  .m-toc-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text, #DDD8CE); background: none; border: 0; border-top: 1px solid var(--border); padding: 12px 2px; min-height: 52px; cursor: pointer; }
  .m-toc-row:active { background: rgba(245, 240, 230, 0.05); }
  .m-toc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .m-toc-t strong { font-size: 15px; font-weight: 600; }
  .m-toc-t small { font-size: 12.5px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-toc-go { font-size: 22px; color: var(--text3); line-height: 1; }
  .m-toc-again { display: block; width: 100%; margin-top: 10px; min-height: 46px; border-radius: 10px; border: 1px solid var(--border2, rgba(245, 240, 230, 0.14)); background: var(--bg3); color: var(--accent2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
  .m-toc-fab { display: none; position: fixed; right: 14px; bottom: 18px; z-index: 150; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(95, 163, 150, 0.5); background: rgba(20, 18, 15, 0.92); color: var(--accent2); font: inherit; font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  html.embedded .m-toc-fab { position: absolute; bottom: auto; }
  .m-toc-fab.show { display: inline-flex; align-items: center; }
}
@media print { .m-toc, .m-toc-fab { display: none !important; } }
