/* Phone and tablet layout, loaded after the feature styles. */
img, video, iframe { max-width: 100%; }
.mobile-menu-close { display: none; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
@media (max-width: 800px) {
  .pro-home-main, .pro-home-side, .controls > *, .player-heading > * { min-width: 0; }
  .controls input, .controls select { max-width: 100%; }
  .table-wrap:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 90px; }
  body { -webkit-text-size-adjust: 100%; }
  header {
    min-height: 68px; gap: 8px; padding-block: 8px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .wordmark-brand { min-width: 0; flex: 1; max-width: 190px; }
  .wordmark-logo { width: 100%; height: 44px; object-fit: contain; }
  .header-right { flex: none; gap: 8px; }
  .header-right > span { display: none; }
  .header-right button { min-width: 44px; min-height: 44px; padding: 8px 10px; }
  #refresh { width: 44px; font-size: 0 !important; }
  #refresh:after { content: '↻'; font-size: 22px; }
  main {
    padding: 20px max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .intro { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .intro h1 { font-size: clamp(28px, 8vw, 36px); }
  .sync { text-align: left; max-width: none; font-size: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
  .metrics > div { padding: 10px 12px; min-width: 0; }
  .metrics small { font-size: 11px; letter-spacing: .4px; }
  .metrics strong { font-size: 18px; overflow-wrap: anywhere; }
  nav[aria-label="Coverage"] {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px; padding: 0 0 16px; margin: 0 0 18px;
  }
  nav[aria-label="Coverage"] > button,
  .more-menu > summary {
    width: 100%; max-width: 100%; min-width: 0; min-height: 46px;
    padding: 10px 3px; font-size: 12px; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .more-menu { min-width: 0; width: 100%; margin: 0; }
  nav[aria-label="Coverage"] > button[data-tab="odds"] { font-size: 0; }
  nav[aria-label="Coverage"] > button[data-tab="odds"]::after { content: 'Odds'; font-size: 12px; }
  .more-body {
    position: fixed; inset: auto 12px max(12px, env(safe-area-inset-bottom));
    width: auto; min-width: 0; max-width: none; max-height: 70vh; max-height: 70dvh;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    padding: 12px; border: 1px solid #7a638f; border-radius: 18px;
    box-shadow: 0 0 0 100vmax #0008; z-index: 30;
  }
  .mobile-menu-close {
    display: block; grid-column: 1 / -1; position: sticky; top: -12px;
    text-align: center; min-height: 46px; color: var(--gold);
    background: var(--surface-raised); z-index: 1;
  }
  .more-body .menu-group:last-child { grid-column: auto; display: block; }
  .menu-group button { min-height: 48px; font-size: 13px; line-height: 1.4; }
  .panel { padding: 16px; border-radius: 14px; }
  .lab-home-top { margin-bottom: 18px; }
  .lab-home-top .section-head { gap: 8px; }
  .lab-home-top h2 { font-size: 23px; }
  .lab-home-top .sub { margin-bottom: 0; }
  .pro-home, .pro-home-main, .pro-home-side { gap: 18px; }
  .game-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .game-links button, .game-links .inline-link { justify-content: center; min-height: 46px; font-size: 13px; }
  .player-heading { padding: 14px; gap: 12px; }
  .player-heading img { flex: none; width: 70px; height: 90px; }
  .player-page .player-heading h2 { font-size: 28px; }
  .player-tabs { max-width: 100%; overscroll-behavior-x: contain; }
  .pro-filter { gap: 12px; }
  .pro-filter label, .pro-filter label:last-child { width: 100%; min-width: 0; flex-basis: 100%; }
  input, select, textarea { font-size: 16px; min-width: 0; max-width: 100%; }
  .tw-select-menu { min-width: 0; max-height: 45vh; max-height: 45dvh; }
  .pro-story p, .sub, .notice { line-height: 1.7; }
  .injury-status { white-space: normal; }
  .lab-home-setting label { min-width: 0; flex: 1; }
  .lab-home-setting input { flex: none; }
  .table-wrap { border: 1px solid var(--line); }
  .table-wrap table { min-width: 460px; }
  .table-wrap th:first-child, .table-wrap td:first-child { padding-left: 12px; }
  footer { overflow-wrap: anywhere; gap: 12px; }
}
@media (max-width: 374px) {
  .pro-player-grid { grid-template-columns: 1fr; }
  .pro-player-art { height: 160px; }
  .pro-player-art img { height: 155px; }
  .lab-depth-field { grid-template-columns: 1fr; }
  .player-heading { flex-wrap: wrap; }
}
