/* ======================================================================
   bind on a computer (1024px and up). Phones and tablets keep the app as it is.
   Same palette, type and pieces; the layout is the only thing that changes:
   a sidebar instead of the tab bar, content as wide as it needs (capped at 1120px),
   two columns where a phone would stack, dialogs instead of bottom sheets, and
   tabs that swap in place instead of sliding.
   ====================================================================== */
.side, .desk-only { display: none; }

@media (min-width: 1024px) {
  :root { --side: 248px; --page: 1120px; }

  /* ---------- shell: fill the screen ---------- */
  body.seller { background: var(--bg); }
  .app { max-width: none; margin: 0; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  .screen { left: var(--side); }
  .screen::before { display: none; }
  .tabbar { display: none; }
  .scroll, .has-tabs .scroll {
    padding: 48px max(48px, calc((100% - var(--page)) / 2)) 96px;
  }
  /* the brand lives in the sidebar; only Sell keeps its top bar (for Back) */
  .screen:not(#add) > .top { display: none; }
  #add > .top { left: 0; right: 0; padding: 0 max(48px, calc((100% - var(--page)) / 2)); }
  #add .scroll { padding-top: 72px; }
  .large-title { font-size: 36px; margin-bottom: 24px; }
  .desk-only { display: block; }

  /* ---------- sidebar ---------- */
  .side { position: absolute; z-index: 10; left: 0; top: 0; bottom: 0; width: var(--side); display: flex; flex-direction: column; gap: 16px;
    padding: 24px 16px 16px; border-right: 1px solid var(--line); background: #050505; }
  .side-brand { display: block; padding: 0 8px 8px; }
  .side-brand .logo { height: 22px; width: auto; display: block; }
  .side-sell { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; font-size: 15px; font-weight: 600; }
  .side-sell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .side-sell.on { box-shadow: 0 0 0 2px #050505, 0 0 0 3px rgba(255,255,255,.5); }
  .side-nav { display: grid; gap: 2px; }
  .side-nav button { position: relative; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none;
    color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
  .side-nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .side-nav button:hover { color: var(--text); background: rgba(255,255,255,.04); }
  .side-nav button.on { color: var(--text); background: #161618; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px var(--line); }
  .side-nav em { margin-left: auto; font: 500 12px/20px var(--mono); font-style: normal; color: var(--faint); }
  .side-nav .tab-dot { position: static; margin-left: auto; width: 8px; height: 8px; }
  .side-nav button:focus-visible, .side-sell:focus-visible { outline: 2px solid rgb(var(--glow-soft)); outline-offset: 2px; }
  .side-me { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
  .side-in { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .side-in > div { min-width: 0; display: grid; gap: 2px; }
  .side-in b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-in small { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
  .side-av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #1c1c1f; color: var(--text); font-size: 14px; font-weight: 500; }
  .side-out { display: grid; gap: 4px; }
  .side-out .btn { height: 40px; font-size: 14px; background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
  .side-out .text-link { margin: 0; justify-self: center; font-size: 14px; }

  /* ---------- dialogs instead of bottom sheets ---------- */
  .sheet-bg { align-items: center; background: rgba(0,0,0,.6); }
  .sheet { max-width: 480px; border-radius: 20px; border-bottom: 1px solid var(--line); padding: 8px 24px 24px; }
  .sheet.tall { min-height: 0; max-width: 640px; }
  .grabber { visibility: hidden; height: 0; margin: 0 0 8px; }

  /* ---------- Home, signed out: the pitch as a split ---------- */
  .sell-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "tag stage" "h1 stage" "sub stage" "act stage";
    grid-template-rows: auto auto auto 1fr; column-gap: 48px; padding: 56px 56px 48px; margin: 0 0 48px; border-radius: 24px; }
  .sell-hero .tag-pill { grid-area: tag; justify-self: start; }
  .sell-hero h1 { grid-area: h1; margin-top: 20px; font-size: 52px; line-height: 1.02; }
  .sell-hero .sub { grid-area: sub; font-size: 18px; max-width: 460px; }
  .sh-actions { grid-area: act; align-self: start; margin-top: 32px; max-width: 460px; }
  .sh-stage { grid-area: stage; align-self: center; height: 420px; margin: 0; }
  .sh-fan .fan { top: 72px; width: 172px; border-radius: 8px; }
  .sh-fan .fan.c { top: 40px; width: 204px; }
  .sh-price { right: 8px; bottom: 24px; padding: 12px 16px; min-width: 180px; }
  .sh-price b { font-size: 30px; }
  .sh-actions button { transition: transform .1s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease); }
  .sh-two button:hover { border-color: rgba(255,255,255,.2); }
  .sh-scan:hover { background: #ececec; }

  #home-out { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  #home-out > * { grid-column: 1 / -1; }
  .m-proof { margin-bottom: 48px; }
  .how { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; }
  .how li { flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
  .how li + li::before { display: none; }
  #home-out .stats { margin-bottom: 48px; max-width: 720px; }
  /* the offer to play with sits next to how you get paid */
  #home-out > .section-title:nth-of-type(2), #home-out > .m-lead:nth-of-type(1), #home-out > .m-pick { grid-column: 1 / span 7; }
  #home-out > .section-title:nth-of-type(3), #home-out > .m-lead:nth-of-type(2), #home-out > .m-pay { grid-column: 8 / -1; }
  #home-out > .m-proof { grid-row: 1; }
  #home-out > .section-title:nth-of-type(1) { grid-row: 2; }
  #home-out > .how { grid-row: 3; }
  #home-out > .stats { grid-row: 4; }
  #home-out > .section-title:nth-of-type(2), #home-out > .section-title:nth-of-type(3) { grid-row: 5; }
  #home-out > .m-lead:nth-of-type(1), #home-out > .m-lead:nth-of-type(2) { grid-row: 6; }
  #home-out > .m-pick, #home-out > .m-pay { grid-row: 7; align-self: start; }
  .m-pay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-pk { cursor: pointer; }
  .m-pk:hover { background: rgba(255,255,255,.02); }
  #home-out > .section-title:nth-of-type(4) { margin-top: 48px; }
  .how-cta { max-width: 420px; margin: 48px 0 0; justify-self: start; }
  .get-app { display: none; }
  .welcome { min-height: calc(100dvh - 160px); }
  .welcome .btn { max-width: 360px; }

  /* ---------- Home, signed in: the camera next to what's going on ---------- */
  #home .scroll:has(#home-cam:not(.hidden)) { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); column-gap: 32px; align-content: start; }
  #home .scroll:has(#home-cam:not(.hidden)) > * { grid-column: 2; }
  #home .scroll:has(#home-cam:not(.hidden)) > #home-cam { grid-column: 1; grid-row: 1 / span 6; }
  #home .scroll:has(#home-cam:not(.hidden)) > .hidden { display: none; }
  .vf { height: min(calc(100dvh - 144px), 640px); margin: 0; }
  .home-card { margin: 0 0 12px; transition: border-color .15s var(--ease); }
  .home-card:hover { border-color: rgba(255,255,255,.2); }

  /* ---------- Sell ---------- */
  .ways { grid-template-columns: repeat(3, minmax(0, 220px)); }
  .way { transition: transform .14s var(--ease), background-color .15s var(--ease); }
  .way:hover { background: var(--card-2); }
  #add .sheet-wrap { max-width: var(--page); }
  .xl tr.row { cursor: pointer; }
  .xl tr.row:hover td { background: rgba(255,255,255,.02); }
  #add .notes { max-width: 720px; }
  #add .bar, .has-tabs #add .bar { left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px;
    padding: 16px max(48px, calc((100% - var(--page)) / 2)); border-top: 1px solid var(--line); }
  #add .bar .btn { width: auto; min-width: 280px; }
  #add .bar .err { margin: 0 auto 0 0; }

  /* ---------- Deals ---------- */
  .deal-filter { display: inline-flex; flex-wrap: nowrap; margin-bottom: 8px; }
  .deal-filter button { flex: none; padding: 8px 16px; }
  #deal-list .live { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #deal-list .list { max-width: var(--page); }
  .live-row:hover { border-color: rgba(255,255,255,.2); }

  /* ---------- two columns: Wallet, Refer, Account ---------- */
  #wal-in, #ref-in, #acct-in { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  #wal-in.hidden, #ref-in.hidden, #acct-in.hidden { display: none; }
  .col-a, .col-b { min-width: 0; }
  .col-b > .section-title:first-child, .col-a > .section-title:first-child { margin-top: 0; }
  .col-b { position: sticky; top: 0; }
  .bal-window strong { font-size: 52px; }
  #wal-in .funds { margin-top: 16px; }
  #refer .ref-lead { max-width: 640px; margin: -12px 0 32px; font-size: 16px; }
  #acct-in .col-a > .list, #acct-in .col-b > .list { margin-bottom: 16px; }
  #acct-in .col-b .btn.lg { width: auto; min-width: 200px; }
  .tab-empty { max-width: 420px; }

  /* lists answer the pointer */
  .list .row.link-row, .act-row, .inv-friends li { transition: background-color .15s var(--ease); }
  .list button.row:hover, .list a.row:hover { background: rgba(255,255,255,.03); }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .side-nav button, .home-card, .way { transition: none; }
}

@media (min-width: 1024px) {
  /* Payouts: receipts take the main column; how we pay you and the ledger sit beside them */
  #wal-in.pv { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); column-gap: 48px; max-width: 1040px; }
  .pv-sum { margin-top: -4px; }
}
@media (min-width: 1024px) { #wal-in.pv > .col-b { margin-top: 0; } }
