/* ============ RESPONSIVE ============ */
@media (max-width:1180px){
  .room>section.tab-on{height:auto;max-height:calc(100vh - 210px);min-height:400px}
}
@media (max-width:760px){
  .topbar{gap:10px;padding:0 12px}
  .logo small{display:none}
  .steps{margin-left:auto;gap:0}
  .step{padding:7px 9px;font-size:0}
  .step i{font-size:11px;width:20px;height:20px}
  .clock{padding:8px 12px;gap:8px}
  .clock .spacer{display:none}
  .clock .next{width:100%;order:5}
  .clock .pickno{font-size:13px}
  .wrap{padding:20px 14px 96px}
  .setup-head h1{font-size:24px}
  .setup-head p{font-size:14px}
  .sect-h{flex-wrap:wrap;gap:4px}
  .sect-h .hint{margin-left:0;text-align:left;width:100%}
  .sticky-cta{margin:22px -14px 0;padding:12px 14px;flex-wrap:wrap}
  .sticky-cta .btn{width:100%;justify-content:center;order:-1}
  .score-rows{grid-template-columns:1fr}
  .presets,.strats{grid-template-columns:1fr}
  .room{padding:10px;gap:10px}
  .room-tabs{padding:8px 10px 0;overflow-x:auto}
  .bottombar{flex-direction:column;align-items:stretch;gap:8px}
  .bottombar>div:last-child{margin-left:0 !important;justify-content:space-between}
  table.board th,table.board td.rh{font-size:9px}
  .cell{min-width:96px}
}
@media (max-width:420px){
  .logo span:last-child{font-size:0}
  .logo .mark{width:31px;height:26px}
}

/* ============ RECOMMENDATION SHORTLIST ============ */
.rec{padding:11px 13px 13px}
.rec .rl{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.rec .rl .sub{font-size:10px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink-3)}
.cands{display:flex;flex-direction:column;gap:7px;margin-top:9px}
.cand{
  display:grid;grid-template-columns:22px 1fr;gap:9px;align-items:start;width:100%;
  text-align:left;appearance:none;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);padding:9px 10px;cursor:pointer;
  transition:border-color .12s,transform .12s,box-shadow .12s;
}
.cand:hover{transform:translateY(-1px);box-shadow:var(--shadow);border-color:var(--ink-3)}
.cand.top{border-color:color-mix(in srgb,var(--hot) 45%,transparent);background:var(--hot-soft)}
.cand.top:hover{border-color:var(--hot)}
.cand .badge{
  width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  font-size:11px;font-weight:800;background:var(--surface-3);color:var(--ink-2);
  font-variant-numeric:tabular-nums;
}
.cand.top .badge{background:var(--hot);color:var(--hot-ink)}
.cand .nm{font-family:Archivo;font-weight:700;font-size:14px;letter-spacing:-.015em;line-height:1.15}
.cand .meta{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:3px;
  font-size:10.5px;color:var(--ink-3)}
.cand .rsn{font-size:11.5px;color:var(--ink-2);line-height:1.45;margin-top:6px;
  padding-top:6px;border-top:1px solid color-mix(in srgb,var(--ink-3) 22%,transparent)}
.cand .rsn b{color:var(--ink);font-weight:700}
.cand .rsn .warn{color:var(--warn);font-weight:600}
.cand.alt{grid-template-columns:20px 1fr;padding:7px 10px}
.cand.alt .badge{width:20px;height:20px;font-size:10px}
.cand.alt .nm{font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;font-weight:600}
.cand.alt .rsn{margin-top:3px;padding-top:0;border-top:0;font-size:10.5px}
.rec .divider{display:flex;align-items:center;gap:8px;margin:11px 0 2px}
.rec .divider span{font-size:9.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;
  color:var(--ink-3);white-space:nowrap}
.rec .divider i{flex:1;height:1px;background:var(--line)}
.rec .foot{font-size:10.5px;color:var(--ink-3);line-height:1.45;margin-top:10px}
.rec .foot .btn{margin-top:7px;width:100%;justify-content:center}

/* ============ VALUE LEFT ON THE BOARD ============ */
.mv{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);overflow:hidden}
.mvhead,.mvrow{display:grid;grid-template-columns:58px minmax(0,1fr) minmax(0,1.25fr) 74px;
  gap:12px;align-items:center;padding:9px 14px}
.mvhead{background:var(--surface-2);border-bottom:1px solid var(--line);
  font-size:9.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
.mvhead .r{text-align:right}
.mvrow{border-bottom:1px solid var(--line-soft);font-size:12.5px}
.mvrow:last-child{border-bottom:0}
.mvrow .pk{font-size:11px;font-weight:700;color:var(--ink-3);font-variant-numeric:tabular-nums}
.mvrow .who{display:flex;align-items:center;gap:6px;min-width:0}
.mvrow .who .n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.mvrow .sub{font-size:10.5px;color:var(--ink-3);margin-top:2px}
.mvrow .cost{text-align:right;font-variant-numeric:tabular-nums;font-weight:700;font-size:13px}
.mvrow.clean{background:color-mix(in srgb,var(--rb) 6%,transparent)}
.mvrow.clean .cost{color:var(--good)}
.mvrow.mild .cost{color:var(--warn)}
.mvrow.bad{background:color-mix(in srgb,var(--bad) 7%,transparent)}
.mvrow.bad .cost{color:var(--bad)}
.mvfoot{padding:11px 14px;border-top:1px solid var(--line);background:var(--surface-2);
  font-size:11.5px;color:var(--ink-2);line-height:1.5}
.mvfoot b{color:var(--ink)}
@media (max-width:720px){
  .mvhead{display:none}
  .mvrow{grid-template-columns:1fr 68px;gap:6px 10px}
  .mvrow .pk{grid-column:1/-1}
  .mvrow .cost{grid-row:2;grid-column:2}
}

/* ============ TARGETS COLUMN (sits beside the Big Board) ============
   Scoped to the wide layout only — the 1180px rule that collapses the room to a
   single column must still win below that width. */
@media (min-width:1181px){
  .room{
    grid-template-columns:
      minmax(272px,336px)   /* big board  */
      minmax(244px,296px)   /* targets    */
      minmax(0,1fr)         /* draft grid */
      minmax(222px,268px);  /* your team  */
  }
}
@media (min-width:1181px) and (max-width:1340px){
  .room{gap:9px;padding:9px}
  .cell{min-width:100px}
}
#pane-targets .rec{flex:1;min-height:0;overflow-y:auto;padding:11px 12px 14px}
#pane-targets .rec .rl{margin-bottom:2px}
#pane-targets .cand.alt .rsn{display:block}

/* ============ YOUR TEAM MOVES BELOW THE BOARDS ============
   The three working panels keep the full viewport height; the roster strip sits
   underneath, full width, so the draft grid can show many more team columns. */
@media (min-width:1181px){
  .room{
    grid-template-columns:
      minmax(300px,344px)   /* big board */
      minmax(238px,284px)   /* targets   */
      minmax(0,1fr);        /* draft grid — gets everything left over */
    grid-template-rows:minmax(320px,1fr) auto;
    align-items:stretch;
  }
  #pane-rail{grid-column:1 / -1;max-height:252px}
  #pane-rail .rail{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    align-items:start;gap:0;
  }
  #pane-rail .railsec{border-bottom:0;border-right:1px solid var(--line-soft)}
  #pane-rail .railsec:last-child{border-right:0}
  /* the roster list can run two columns when the strip is wide */
  #pane-rail .railsec.lineup .slots{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 16px;
  }
  #pane-rail .feed{max-height:172px;overflow-y:auto}
  #pane-rail .rail>.railsec.alerts{grid-column:1/-1;border-right:0;
    border-bottom:1px solid var(--line-soft)}
}

.cell.now.mine{box-shadow:inset 0 0 0 2px var(--mine)}
.cell.now.mine .cn{color:var(--mine)}
:root[data-theme="dark"] .cell.now.mine .cn{color:var(--mine)}

/* ============ INDEPENDENT SCROLL REGIONS ============
   Every panel in the draft room scrolls on its own. overscroll-behavior stops the
   scroll continuing into the page once a panel reaches its end, which is what made
   the whole screen move when you scrolled to the bottom of the draft board. */
#gridwrap,.plist,.rail,#pane-targets .rec,#pane-board .rec{overscroll-behavior:contain}
/* The sponsor is visible on every screen. In the draft room it becomes a slim strip
   that is part of the layout, so it never causes the page to scroll. */

/* ============ DRAFT ROOM FILLS THE VIEWPORT EXACTLY ============
   Replaces height arithmetic (100vh minus a guessed bar height) with a flex column:
   the clock and the bottom bar take their natural height and the room takes whatever
   is left. Nothing to keep in sync when a bar changes size, and the page itself never
   scrolls — every scroll happens inside a panel. */
@media (min-width:1181px){
  /* The whole page becomes one flex column: header, the draft view taking whatever is
     left, then the sponsor strip. Everything fits the viewport exactly, so the page
     itself never scrolls and every scroll happens inside a panel. */
  body.in-draft{display:flex;flex-direction:column;height:100vh;overflow:hidden}
  body.in-draft .topbar{flex:none}
  body.in-draft #view-draft{flex:1;min-height:0;display:flex;flex-direction:column}
  body.in-draft .clock{position:static;flex:none}
  body.in-draft .room{flex:1;min-height:0;height:auto}
  body.in-draft .bottombar{position:static;flex:none}
  body.in-draft #modalHost,body.in-draft #toastHost{flex:none}

  /* compact sponsor strip: same content, laid out on one line */
  body.in-draft .sponsor{flex:none;padding:0;background:var(--surface);
    border-top:1px solid var(--line)}
  body.in-draft .sponsor-card{
    max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;
    padding:9px 18px;gap:12px;background:transparent;
  }
  body.in-draft .sponsor-card:hover{transform:none;box-shadow:none;background:var(--surface-2)}
  body.in-draft .sponsor-mark{width:28px;height:28px;border-radius:8px}
  body.in-draft .sponsor-mark svg{width:17px;height:17px}
  body.in-draft .sponsor-text{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
  body.in-draft .sponsor-eyebrow{font-size:9px}
  body.in-draft .sponsor-name{font-size:14px;margin:0}
  body.in-draft .sponsor-tag{font-size:11.5px}
  body.in-draft .sponsor-cta{padding:5px 11px;font-size:11.5px}
}
