/* Wide screens (laptops, Macs): the app is no longer a phone-shaped column. The menu moves to the top, the match
   list becomes a grid, and the match screen splits in two: the match on the left (score, stats, timeline), your
   picks and the cards on the right. Phones are unchanged. */
@media (min-width: 1000px) {
  :root { --desk-w: 1180px; }
  .app { max-width: var(--desk-w); padding-left: 32px; padding-right: 32px; }
  body.has-tabs .app { padding-top: calc(var(--tab-h) + 24px); padding-bottom: 32px; }

  /* Menu on top */
  .tabbar { top: 0; bottom: auto; max-width: var(--desk-w); margin: 0 auto; padding: 0 32px; border: 0; border-bottom: 1px solid var(--border);
    justify-content: flex-end; gap: 8px; background: rgba(14, 14, 16, 0.92); backdrop-filter: blur(8px); }
  .tabbar::before { content: "MWT Picks"; margin-right: auto; align-self: center; font-weight: 800; letter-spacing: 0.01em; }
  .tabbar button { flex: none; padding: 0 18px; border-radius: 10px; }
  .tabbar button[aria-current="page"] { background: var(--surface-2); }
  .tabbar .tab-badge { position: static; transform: none; margin-left: 6px; }
  .toast { top: calc(var(--tab-h) + 12px); }

  /* Match list: two wide columns of rows, teams on the left and the time or live score on the right */
  #fixtures, #fixtures-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  #fixtures .fixture, #fixtures-demo .fixture { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 20px; }
  #fixtures > li:only-child, #fixtures-demo > li:only-child { grid-column: 1 / -1; }   /* one match: a full row, not half a page */
  .fixture-teams { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fixture-when { flex: none; text-align: right; }
  .fixture:hover { background: var(--surface-2); }
  #s-matches .banner, #s-matches .search, #s-matches .none-live { max-width: none; }

  /* Narrow reading screens stay readable, centred */
  #s-top, #s-history, #s-settings, #s-w6 { max-width: 760px; margin: 0 auto; }

  /* Match screen: two columns (js/match-view.js moves the pieces into .live-main and .live-side at this width).
     Left: score, stats, timeline. Right, staying in view while you scroll: the cards and your picks. */
  .screen-live.is-wide:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px; align-items: start; }
  .screen-live.is-wide > .match-head { grid-column: 1 / -1; }
  .live-main { grid-column: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
  .live-side { grid-column: 2; position: sticky; top: calc(var(--tab-h) + 16px); display: flex; flex-direction: column; gap: 10px;
    max-height: calc(100vh - var(--tab-h) - 40px); overflow-y: auto; padding-bottom: 8px; }
  .live-side::before { content: "Cards slide in here at the big moments. Tap your call, then watch the match.";
    padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); font-size: 14px; }
  body.card-open .live-side::before { display: none; }
  .live-side > .focus-bar { padding: 0; }
  .live-side > .focus-form { margin: 0; }
  .live-side > .sheet { position: static; left: auto; right: auto; bottom: auto; width: auto; max-width: none; margin: 0; padding: 0; z-index: auto; }
  .live-side .sheet .lc-card { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32); max-height: none; overflow: visible; }
  .live-side > .my-picks { margin-top: 4px; }
  .live-pitch { max-width: 420px; }
  .scoreboard { padding: 28px 24px; }
  .sb-num { font-size: 56px; }
  /* The "Watching. A card slides up here" line points at the right column, which already says it. */
  .screen-live.is-wide .live-state.is-watching { display: none; }
  /* Top menu: the current tab is a pill centred in the bar, not a block stuck to the top of the window. */
  .tabbar { height: var(--tab-h); align-items: center; }
  .tabbar button { height: 44px; }

  .win-banner { left: auto; right: max(32px, calc((100vw - var(--desk-w)) / 2 + 32px)); width: 400px; margin: 0; top: calc(var(--tab-h) + 12px); }
  .tour-box { max-width: 460px; }
  .tour.lit .tour-box { max-width: 460px; }
}

/* Tablets: a little wider than a phone, still one column. */
@media (min-width: 700px) and (max-width: 999px) {
  .app { max-width: 640px; }
  /* Tab bar runs edge to edge like a phone's (no floating box with side borders); its tabs line up with the column. */
  .tabbar { max-width: none; border-left: 0; border-right: 0;
    padding-left: max(var(--safe-l), calc(50% - 320px)); padding-right: max(var(--safe-r), calc(50% - 320px)); }
  .sheet { max-width: 640px; }
}

/* Tablets and wider: welcome, register and sign in keep a form-sized column instead of 640-760 px wide buttons. */
@media (min-width: 700px) {
  #s-register, #s-signin { max-width: 440px; margin: 0 auto; }
  #s-welcome { max-width: 760px; margin: 0 auto; }
  #welcome-buttons, #age-gate { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
}
