.mobile-table-tools, .mobile-record-more, .mobile-record-detail, .mobile-table-scroll-hint { display: none; }

@media screen and (max-width: 700px), screen and (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mobile-table-tools { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
  .mobile-table-tools label { flex: 1; min-width: 0; display: grid; gap: 5px; }
  .mobile-table-tools button { flex: 0 0 auto; }
  .mobile-table-scroll-hint { display: block; position: sticky; left: 0; width: min(100%, 360px); box-sizing: border-box; padding: 10px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
  #table-wrap:not([data-view="records"]):not([data-view="feedback"]) > table { width: max-content; min-width: 100%; }
  #table-wrap:not([data-view="records"]):not([data-view="feedback"]) > table > :is(thead, tbody) > tr > :is(th, td):first-child { position: sticky; left: 0; z-index: 1; min-width: 112px; max-width: 150px; white-space: normal; background: #f4f6f0; border-right: 1px solid var(--line); box-shadow: 4px 0 7px #253c3410; }
  #table-wrap:not([data-view="records"]):not([data-view="feedback"]) > table th button { min-height: 44px; }
  #table-wrap :is(.model-name, .enemy-name) { max-width: 140px; overflow-wrap: anywhere; }
  #table-wrap[data-view="records"], #table-wrap[data-view="feedback"] { overflow: visible; }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) table { display: block; white-space: normal; }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) .mobile-table-tools + table thead { display: none; }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) tbody { display: grid; gap: 14px; }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--record-background, var(--surface)); }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; line-height: 1.6; }
  #table-wrap:is([data-view="records"], [data-view="feedback"]) td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 650; margin-bottom: 4px; }
  #table-wrap[data-view="records"] td[data-label="受信日時"],
  #table-wrap[data-view="records"] td[data-label="MODバージョン"],
  #table-wrap[data-view="records"] td[data-label="デッキ傾向"],
  #table-wrap[data-view="records"] td[data-label="敗北原因"],
  #table-wrap[data-view="records"] td[data-label="削除"] { grid-column: 1 / -1; }
  #table-wrap[data-view="records"] tr:not(.mobile-record-expanded) td.mobile-record-extra { display: none; }
  #table-wrap[data-view="records"] .record-version, #table-wrap[data-view="records"] .defeat-cause { max-width: none; }
  #table-wrap[data-view="records"] .record-build-version { max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
  #table-wrap[data-view="records"] .record-deck-axes { width: 100%; }
  #table-wrap[data-view="records"] .record-deck-axis-meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #table-wrap[data-view="records"] td[data-label="削除"]::before { display: none; }
  #table-wrap[data-view="records"] .record-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #c5cfc5; padding-top: 10px; }
  .mobile-record-more, .mobile-record-detail { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .mobile-record-detail { background: #fff; border-color: #9bb6a4; }
  .mobile-record-more { flex: 1 1 auto; }
  .record-actions .danger { margin-left: auto; min-height: 44px; padding: 8px 10px; font-size: 12px; }
  button.record-error-badge { min-height: 44px; }
  #table-wrap[data-view="feedback"] td[data-label="受信日時（日本時間）"],
  #table-wrap[data-view="feedback"] td[data-label="本文"],
  #table-wrap[data-view="feedback"] td[data-label="MODバージョン"] { grid-column: 1 / -1; }
  #table-wrap[data-view="feedback"] td[data-label="本文"] { padding-block: 10px; border-block: 1px solid var(--line); }
  #table-wrap[data-view="feedback"] .feedback-message { min-width: 0; max-width: none; font-size: 14px; line-height: 1.85; }
  #table-wrap[data-view="feedback"] .record-version { max-width: none; }
}
