/* Global Dugout — homepage (home.js) */
body[data-league=home] .topnav,body[data-league=home] header label.season,body[data-league=home] #railTog{display:none!important}
body[data-league=home] header.top .gdprefs{margin-left:auto;min-height:46px}
#homeView{max-width:1280px;margin:0 auto}
.hm{display:flex;flex-direction:column;gap:34px;padding-block:22px 40px}
.hm h2{margin:0;font-family:var(--f-disp);font-weight:700;font-size:24px;letter-spacing:-.02em}
.hm h3{margin:0;font-family:var(--f-disp);font-weight:650;font-size:17px;letter-spacing:-.01em}
.hmmore{font-size:13.5px;font-weight:600;color:var(--accent);text-decoration:none;white-space:nowrap}
.hmmore:hover{text-decoration:underline}
.hmsh{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:14px}
.hmtag{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.hmp{margin:0;color:var(--muted);font-size:14px;line-height:1.5}
.hmskel{height:140px;border-radius:14px;background:linear-gradient(90deg,var(--soft),var(--panel),var(--soft));background-size:200% 100%;animation:hmsk 1.4s linear infinite}
@keyframes hmsk{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.hmskel{animation:none}}

/* scoreboards */
.hmboards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.hmboard{display:flex;flex-direction:column;gap:12px;background:var(--soft);border:1px solid var(--line);border-radius:18px;padding:16px 16px 14px}
.hmbh{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:0 4px}
.hmbh h2{font-size:22px}
.hmrec{margin-top:4px;font-size:14.5px;font-weight:600;color:var(--ink)}
.hmboard .sccard{box-shadow:0 1px 0 var(--line);flex:1}
.hmboard .sccard .scteams{flex:1;justify-content:center}
.hmboard .sccard .scft{margin-top:0}
.hmnext{font-size:13px;color:var(--muted);padding:0 4px}
.hmnext b{font-weight:600;color:var(--ink);margin-right:4px}
.hmres{display:flex;flex-wrap:wrap;gap:2px 12px}.hmres b{margin-right:0}

/* posting watch */
.hmpwgrid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:14px}
.hmtop{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px 22px;color:var(--ink);text-decoration:none}
.hmtop:hover,.hmpw:hover,.hmtile:hover,.hmx:hover{border-color:var(--ink)}
.hmtop>*:not(.hmbig){position:relative;z-index:1}
.hmtopname b{font-family:var(--f-disp);font-size:30px;font-weight:700;letter-spacing:-.02em}
.hmtopname .muted{font-size:16px;margin-left:4px}
.hmwho{font-size:13.5px}
.hmnote{margin:0;font-size:14.5px;line-height:1.5;max-width:48ch}
.hmtop .line{grid-template-columns:repeat(5,minmax(0,1fr));max-width:520px}
.hmbig{position:absolute;right:24px;top:20px;width:170px;height:170px;object-fit:contain;opacity:.1;pointer-events:none}
.hmpwlist{display:flex;flex-direction:column;gap:10px}
.hmpw{display:flex;flex-direction:column;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:12px 14px;color:var(--ink);text-decoration:none}
.hmpw b{font-weight:650}
.hmpwtop{display:flex;justify-content:space-between;gap:10px}
.hmwar{text-align:right;flex:none}
.hmwar b{display:block;font-family:var(--f-mono);font-size:20px;font-weight:500}
.hmwar span{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.hmpw .hmnote{font-size:13px;color:var(--muted)}
html:not([lang=ja]) .hmja,html[lang=ja] .hmen{display:none}

/* tiles */
.hmtiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.hmtile{position:relative;display:flex;flex-direction:column;gap:6px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px 16px 34px;color:var(--ink);text-decoration:none}
.hmtile p{margin:0;font-size:13.5px;line-height:1.5;color:var(--muted)}
.hmarrow{position:absolute;right:14px;bottom:10px;color:var(--accent);font-weight:700}

/* leaders */
.hmleads{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.hmlead{display:flex;flex-direction:column;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.hmlh{display:flex;flex-direction:column;gap:2px}
.hmlh .muted{font-size:12px}
.hmlead ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.hmlead li{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 0;border-top:1px solid var(--soft)}
.hmlead li:first-child{border-top:0}
.hmrk{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.hmnm{display:flex;flex-direction:column;min-width:0}
.hmnm a{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hmnm small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hmnm small .npdot.nplogo{width:14px;height:14px;margin-right:4px;vertical-align:-3px}
.hmnm small .mlbtl{width:14px;height:14px;margin-right:5px;vertical-align:-3px}
.hmnm small .logo{margin-right:5px;vertical-align:-3px}
.hmlead li b{font-family:var(--f-mono);font-weight:500;font-size:15px}
.hmlead li:first-child b{color:var(--accent)}
.hmlead .hmmore{margin-top:auto}

/* bottom */
.hmbottom{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:12px}
.hmcard{position:relative;display:flex;flex-direction:column;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px 20px;color:var(--ink);text-decoration:none}
.hmart{color:inherit;text-decoration:none}
.hmart:hover h3{text-decoration:underline}
.hmx{background:var(--chip);align-self:start}
.hmsoc{display:flex;flex-direction:column;margin-top:4px}
.hmsoc a{display:grid;grid-template-columns:118px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 0;border-top:1px solid color-mix(in srgb,var(--accent) 22%,transparent);color:var(--ink);text-decoration:none;font-size:14px}
.hmsoc a b{font-weight:650;display:inline-flex;align-items:center;gap:8px}
.gdico{width:16px;height:16px;flex:none;opacity:.88}
footer.site a.soc{display:inline-flex;align-items:center;gap:6px}
footer.site .gdico{width:14px;height:14px}
:root[data-theme="dark"] .gdico{filter:invert(1)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .gdico{filter:invert(1)}}
.hmsoc a span{color:var(--muted)}
.hmsoc a i{font-style:normal;color:var(--accent);font-weight:700}
.hmsoc a:hover b{text-decoration:underline}
.hmah{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.hmart h3{font-size:19px;line-height:1.3}
.hmdate{font-size:12.5px}
.hmalist{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column}
.hmalist li{display:flex;flex-direction:column;gap:2px;padding:9px 0;border-top:1px solid var(--line)}
.hmalist a{color:var(--ink);font-weight:600;font-size:14px;text-decoration:none;line-height:1.35}
.hmalist a:hover{text-decoration:underline}
.hmalist .muted{font-size:12px}

@media (max-width:1060px){.hmtiles,.hmleads{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:860px){.hmboards,.hmpwgrid,.hmbottom{grid-template-columns:minmax(0,1fr)}}
@media (max-width:560px){.hmtiles,.hmleads{grid-template-columns:minmax(0,1fr)}.hm{gap:28px}.hmtopname b{font-size:25px}.hmtop .line{grid-template-columns:repeat(5,minmax(0,1fr))}.hmbig{width:130px;height:130px;right:14px;top:18px;transform:none}}

/* Posting News bar under the tabs on Home */
.hmbar{display:none}
body[data-league=home] .hmbar{display:flex;order:5;flex:1 1 320px;min-width:0;align-items:center;min-height:46px}
body[data-league=home] .hmbar:empty{display:none}
.hmbar a{color:var(--ink);text-decoration:none}
.hbmut{color:var(--muted)}
/* posting news line */
.hbnews{display:flex;align-items:center;gap:12px;min-width:0;font-size:13.5px}
.hbtag{flex:none;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-ink);background:var(--accent);padding:4px 8px;border-radius:6px}
.hbnewsin{display:flex;align-items:center;gap:14px;min-width:0;white-space:nowrap;overflow:hidden}
.hbnewsin>a:first-child{overflow:hidden;text-overflow:ellipsis;min-width:0}
.hbnewsin b{font-weight:650}
.hbnewsin .npdot.nplogo{width:15px;height:15px;margin:0 3px 0 4px;vertical-align:-3px}
.hbnewsin a:hover b{text-decoration:underline}
.hbmore{flex:none;font-weight:600;color:var(--accent)!important}
@media (max-width:700px){body[data-league=home] .hmbar{flex-basis:100%;order:9;padding:6px 0 10px}
  .hbnews{align-items:flex-start}.hbtag{margin-top:1px}
  .hbnewsin{white-space:normal;flex-wrap:wrap;gap:4px 12px;line-height:1.4}
  .hbnewsin>a:first-child{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;flex-basis:100%}}

/* latest social posts */
.socbody{display:flex;flex-direction:column;gap:22px}
.sochd{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:15px}
.sochd b{font-weight:650}
.sochd .hmmore{margin-left:auto}
.socgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.soccard{display:flex;flex-direction:column;gap:9px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:12px;color:var(--ink);text-decoration:none;min-width:0}
.soccard:hover{border-color:var(--ink)}
.socimg{position:relative;display:block;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:var(--soft)}
.socimg.wide{aspect-ratio:16/9}
.socimg img{width:100%;height:100%;object-fit:cover;display:block}
.socig .socimg img[src^="img/"],.socig .socimg img[src$="logo.png"]{object-fit:contain;padding:10%;box-sizing:border-box}
.socplay{position:absolute;right:8px;top:8px;width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-style:normal;font-size:11px;display:grid;place-items:center}
.soctx{font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.socig .soctx{-webkit-line-clamp:3}
.socmeta{margin-top:auto;font-size:12px;color:var(--muted)}
.socwho{display:flex;align-items:center;gap:6px;font-size:13px;min-width:0}
.socwho b{font-weight:650}
.socwho span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:860px){.socgrid{grid-template-columns:repeat(3,minmax(220px,1fr));overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:4px}.soccard{scroll-snap-align:start}}

/* Free Agent Tracker (fa.js) */
.fafil{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:4px 0 14px}
.faq{margin-left:auto;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit;min-width:200px}
.fatbl td.l small{margin-left:4px}
.fatbl tr.fadone td{color:var(--muted)}
.fatbl tr.fadone .plink{color:var(--muted)}
.fast{display:inline-block;font-size:11.5px;font-weight:650;padding:2px 7px;border-radius:5px;margin-right:4px}
.fast.av{background:var(--chip);color:var(--accent)}
.fast.sg{background:var(--ink);color:var(--panel)}
.fast.rt{background:var(--soft);color:var(--muted)}
.fadeal{font-weight:600;color:var(--ink)}
.faqo{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.04em;padding:1px 5px;border-radius:4px;border:1px solid var(--line);color:var(--muted);vertical-align:1px}
.fatbl .mlbtl{margin-right:5px;vertical-align:-3px}
.fahome{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:12px}
.faside{display:flex;flex-direction:column;gap:12px}
.famoves{list-style:none;margin:0;padding:0}
.famoves li{padding:7px 0;border-top:1px solid var(--soft);font-size:13.5px}
.famoves li:first-child{border-top:0}
@media (max-width:860px){.fahome{grid-template-columns:minmax(0,1fr)}.faq{margin-left:0;flex-basis:100%}}

.fahome3{grid-template-columns:repeat(3,minmax(0,1fr))}
.fahome3 .hmnm small .fast{font-size:10.5px;padding:1px 5px}
.faopt{font-family:var(--f-body);font-size:12px;font-weight:600;color:var(--muted)}
@media (max-width:1060px){.fahome3{grid-template-columns:minmax(0,1fr)}}
.fast.pd{background:var(--soft);color:var(--ink)}
.hmlead li b.famvd{font-family:var(--f-body);font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.hbsep{color:var(--muted);margin-left:1px}
/* NPB player photos in the homepage Posting Watch block */
.hmtopid{display:flex;gap:16px;align-items:center;position:relative;z-index:1}
.hmtopph{width:88px;height:88px;border-radius:12px;object-fit:cover;object-position:top;background:#fff;border:1px solid var(--line);flex:none}
.hmpwph{width:44px;height:44px;border-radius:9px;object-fit:cover;object-position:top;background:#fff;border:1px solid var(--line);flex:none}
.hmpwid{flex:1;min-width:0}

/* Leaders switch (Players · Teams · Pitches) */
.hmlsh{align-items:center;flex-wrap:wrap}.hmlsw{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.hmlsw .seg button{padding:5px 12px;font-size:13px}
#hmLeads{transition:opacity .15s}
@media (max-width:560px){.hmlsw{width:100%;justify-content:space-between}}
.hmtn{display:inline-flex;align-items:center;gap:7px;min-width:0}.hmtn img{flex:none;width:18px;height:18px}
/* six tiles; compact on phones */
.hmtiles{grid-template-columns:repeat(6,minmax(0,1fr))}
@media (max-width:1060px){.hmtiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:560px){.hmtiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hmtile{padding:12px 12px 12px;flex-direction:row;align-items:center;justify-content:space-between}.hmtile h3{font-size:15px;margin:0}.hmtile p{display:none}.hmtile .hmarrow{position:static}.hmtile:last-child{grid-column:1/-1}}
/* Posting News: one announcement at a time on a single line */
.hbnewsin > a.hbitem{display:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hbnewsin > a.hbitem.on{display:block;animation:hbin .35s ease}
@keyframes hbin{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (max-width:700px){
  .hbnews{align-items:center}.hbtag{margin-top:0}
  .hbnewsin{white-space:nowrap!important;flex-wrap:nowrap!important;line-height:1.3}
  .hbnewsin>a.hbitem{display:none!important;-webkit-line-clamp:unset}.hbnewsin>a.hbitem.on{display:block!important;flex:1 1 auto}
  .hbnewsin .hbmore,.hbnewsin .hbmut{display:none}
}
/* one-line intro */
.hmintro{margin:0 0 -8px;font-size:14.5px;line-height:1.5;color:var(--muted)}.hmintro b{color:var(--ink);font-weight:650}.hmintro a{color:var(--accent);font-weight:600;text-decoration:none;white-space:nowrap}.hmintro a:hover{text-decoration:underline}

/* Free Agents filters: one "Filters" button on phones, search + CSV on the same row */
.fafbtn{display:none}
.fafx{display:contents}
.fafil .faq{order:5}.fafil .tlcsvh{order:6}
.fassn{font-size:12px;margin-top:2px}
@media (max-width:640px){
  .fafil{gap:8px}
  .fafil .faq{order:0;flex:1 1 0;min-width:0;width:auto;margin-left:0}
  .fafbtn{order:1;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:600 14px var(--f-body,Inter,sans-serif);cursor:pointer;white-space:nowrap}
  .fafbtn b{background:var(--accent);color:#fff;border-radius:999px;font-size:11px;padding:1px 7px}
  .fafbtn i{font-style:normal;font-size:10px;color:var(--muted)}
  .fafil .tlcsvh{order:2;margin-left:0}
  .fafx{order:3;display:none;flex-basis:100%;min-width:0;max-width:100%;flex-wrap:wrap;gap:8px}
  .fafx.open{display:flex}
  .fafx .seg{max-width:100%;min-width:0;overflow-x:auto;scrollbar-width:none}
}

/* five leader boxes (Players / Teams with the KBO) */
.hmleads.n5{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1280px){.hmleads.n5{grid-template-columns:repeat(6,minmax(0,1fr))}.hmleads.n5>*{grid-column:span 2}.hmleads.n5>:nth-child(4){grid-column:2/span 2}}
@media (max-width:1060px){.hmleads.n5{grid-template-columns:repeat(2,minmax(0,1fr))}.hmleads.n5>*,.hmleads.n5>:nth-child(4){grid-column:auto}.hmleads.n5>:last-child{grid-column:1/-1}}
@media (max-width:560px){.hmleads.n5{grid-template-columns:minmax(0,1fr)}}
.kblogo.hmkb{width:16px;height:16px;object-fit:contain;margin-right:6px;vertical-align:-3px}
@media (min-width:1061px) and (max-width:1280px){.hmtiles{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Posting Watch lead (top of the homepage): one wide card plus everyone else being posted */
.gdlead{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:12px}
.gdlc{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px 20px;display:grid;grid-template-columns:120px minmax(0,1fr);gap:18px}
.gdlc .ph{width:120px;height:150px;border-radius:10px;object-fit:cover;object-position:top;background:var(--soft);display:block}
.gdtag{display:inline-block;font-size:12px;font-weight:600;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);padding:3px 9px;border-radius:999px}
.gdlc h3{margin:8px 0 2px;font-size:26px;line-height:1.1}.gdlc h3 a{color:inherit;text-decoration:none}.gdlc h3 a:hover{color:var(--accent)}
.gdlc .who{font-size:14px;color:var(--ink);opacity:.7}.gdlc .who .nplogo,.gdlc .who img{width:16px;height:16px;vertical-align:-3px;margin-right:3px}
.gdlc .two{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin:14px 0 10px}
.gdlc .box{border:1px solid var(--line);border-radius:10px;padding:9px 12px;min-width:0}
.gdlc .box.mlb{border-color:var(--accent)}
.gdlc .box span{display:block;font-size:12px;color:var(--ink);opacity:.68}
.gdlc .box b{display:block;font-size:21px;font-variant-numeric:tabular-nums;margin:1px 0;white-space:nowrap}
.gdlc .box small{font-size:13px;color:var(--ink);opacity:.72}
.gdlc .ar{color:var(--muted);font-size:18px}
.gdlc .rg{font-size:13px;color:var(--ink);opacity:.75}.gdlc .rg b{font-variant-numeric:tabular-nums}
.gdlc .links{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font-size:14px;font-weight:600}.gdlc .links a{color:var(--accent);text-decoration:none}
.gdside{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column}
.gdside h4{margin:0 0 2px;font-size:16px}.gdside .s2{font-size:13px;color:var(--ink);opacity:.68;margin-bottom:6px}
.gdrow{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid var(--soft);color:inherit;text-decoration:none}
.gdside h4+.s2+.gdrow{border-top:0}.gdrow:hover b{color:var(--accent)}
.gdrow img,.gdrow .phx{width:40px;height:40px;border-radius:50%;object-fit:cover;object-position:top;background:var(--soft);display:block}
.gdrow b{display:block;font-size:15px}.gdrow small{display:block;font-size:13px;color:var(--ink);opacity:.66}
.gdrow .v{text-align:right;font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.gdrow .v small{display:inline;font-weight:400}
.gdside .gdmore{margin-top:auto;padding-top:8px;display:flex;gap:16px;flex-wrap:wrap}
@media (max-width:900px){.gdlead{grid-template-columns:1fr}}
@media (max-width:560px){.gdlc{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:14px}.gdlc .ph{width:64px;height:80px}.gdlc h3{margin-top:6px}.gdlc .two{grid-template-columns:1fr}.gdlc .ar{display:none}.gdlc h3{font-size:23px}}
/* readability: bigger, darker small text and bigger numbers in the homepage cards */
.hm .hmlh h3{font-size:16px}
.hm .hmlh .muted{font-size:13px;color:var(--ink);opacity:.68}
.hm .hmnm a{font-size:15px}
.hm .hmnm small{font-size:13px;color:var(--ink);opacity:.66}
.hm .hmrk{font-size:13px}
.hm .hmlead li{padding:9px 0}
.hm .hmlead li b{font-size:17px;font-weight:600}
.hm .hmintro{font-size:15px}
/* signed players: MLB team logo inside the Posting Watch tag and rows */
.gdtag .mlbtl{display:inline-block;width:16px;height:16px;vertical-align:-3px;margin-right:5px}
.gdrow small .mlbtl{display:inline-block;width:13px;height:13px;vertical-align:-2px;margin-right:4px}
