/* home2.css — CG4: 맨 위 전광판(티커) · 팀 필터 · 모아보기(종목 섹션). home.css 뒤에 로드돼 앞선 규칙을 이 파일이 최종 정리해요 */

/* ===== 팀 필터: MLB 전체를 펼치면 아메리칸리그 · 내셔널리그 소제목 ===== */
.tf-sub{display:none;margin:0;font-size:var(--fs-s);font-weight:var(--w-b);line-height:1.5;color:var(--ink-2);text-align:left}
.tf[data-expanded] .tf-sub{display:block}
@media (min-width:760px){
  .tf-mlb .tf-sub-a{grid-row:1;grid-column:1/6}
  .tf-mlb .tf-sub-n{grid-row:1;grid-column:7/12}
  .tf[data-expanded] .tf-mlb .tf-c{grid-row:calc(var(--r) + 1)}
}
@media (max-width:759px){
  .tf[data-expanded] .tf-sub{grid-column:1/-1}
  .tf[data-expanded] .tf-sub-n{margin-top:var(--s1)}
}
@media (max-width:759px){   /* 5글자 이름(블루제이스·브레이브스)이 말줄임 없이 읽히는 칸 폭 76 */
  .tf-grid{grid-auto-columns:4.75rem}
  .tf[data-expanded] .tf-grid{grid-template-columns:repeat(auto-fill,minmax(4.75rem,1fr))}
}

/* ===== 티커(맨 위 전광판) — 최종 규칙. 항목만 흐르는 잉크 면 한 줄: 뷰포트 전체 폭 · 높이 36(모바일 32) · 14 · 항목 사이 48 · 양 끝 24 mask 페이드 · 하단 경계 없음 =====
   색: 면 #1a1a1a(다크 #0a0a0a — 흰/어두운 헤더와 구분) · 글자 #e9e9e9 · 말머리·시각 #9a9a9a · 오피셜 말머리만 --ok-on-dark(#5fd08a) · ▲ 흰색 */
.ticker{--tk-bg:#1a1a1a;position:relative;background:var(--tk-bg);color:#e9e9e9;height:var(--h-tick);border:0;font-size:var(--fs-s);font-weight:var(--w-r);font-variant-numeric:tabular-nums}
html[data-theme="dark"] .ticker{--tk-bg:#0f0f0f;background:#0f0f0f}   /* 어두운 헤더(#1c1c1c)와 구분되는 더 깊은 면 */
.tk-in{position:relative;display:block;width:100%;max-width:none;height:var(--h-tick);margin:0;padding:0}
.tk-view{display:block;width:100%;height:var(--h-tick);min-width:0}
.tk-track{height:var(--h-tick);padding-left:1.5rem;animation-name:tk-flow2}   /* 처음 항목이 페이드 바깥(24)에서 시작 */
@keyframes tk-flow2{from{transform:translateX(0)}to{transform:translateX(calc(-50% + .75rem))}}   /* 루프 이동량 = 한 그룹 폭 = (트랙 폭 - 패딩 24) / 2 */
.tk-g li{height:var(--h-tick);margin-right:var(--s5)}
.tk-g li::after{content:none;margin:0}
.ticker .tk-item{height:var(--h-tick);gap:var(--s1);color:#e9e9e9}
.ticker .tk-k{color:#9a9a9a;font-weight:var(--w-b)}
.ticker .tk-k.k-official{color:var(--ok-on-dark)}
.ticker .tk-w{color:#9a9a9a}
.ticker .tk-mv,.ticker .tk-mv.down{color:#fff;font-weight:var(--w-r)}
.tk-l{display:inline}.tk-s{display:none}   /* 모바일도 같은 문장 */
.ticker:focus-within .tk-track,.tk-view:active .tk-track{animation-play-state:paused}
/* 접근성 대체 목록(최신 5건) — 평소엔 안 보이고, 키보드 포커스가 오면 띠를 덮어 정지된 한 줄로 */
.tk-sr{position:absolute;left:0;top:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden;clip-path:inset(50%);list-style:none;display:flex;align-items:center;gap:var(--s5);white-space:nowrap}
.tk-sr:focus-within{z-index:2;width:100%;height:var(--h-tick);clip-path:none;overflow-x:auto;overflow-y:hidden;padding-left:1.5rem;background:var(--tk-bg);scrollbar-width:none}
.tk-sr::-webkit-scrollbar{display:none}
.tk-sr li{flex:none}
.tk-skip{position:absolute;left:0;top:0;z-index:3;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;color:#fff;background:var(--tk-bg)}
.tk-skip:focus{width:auto;height:var(--h-tick);clip-path:none;display:flex;align-items:center;padding:0 var(--s3);font-weight:var(--w-b);text-decoration:underline;text-underline-offset:3px}
.tk-sr:focus-within~.tk-view{visibility:hidden}
.ticker :focus-visible{outline:2px solid #fff;outline-offset:-2px;border-radius:0}
.tk-item:active{background:none}
@media (prefers-reduced-motion:reduce){   /* 정적 한 줄: 흐르지 않고 가로로 밀어 볼 수 있어요(복제본·마스크 없음) */
  .tk-view{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-mask-image:none;mask-image:none}
  .tk-view::-webkit-scrollbar{display:none}
  .tk-item::after{inset:0}
}

/* ===== 모아보기 종목 섹션(CG4): 데스크톱 가로 3단 / 좁은 컨테이너(< 692 = 열 폭 220 미만) 종목 1개씩 가로 스냅 캐러셀 =====
   열 = 머리 36(종목명 20/700 + `더 보기 ›`) + 대표 1건(고정 높이 102: 로고 쌍 40 · 오른쪽에 오피셜 알약/단계 글자 + 시각 · 이름 16/700 · 한 줄 요약 14) + 최신 3건(행 56 고정, 모자라면 아래 여백) */
.ms{container-type:inline-size;margin:0}
.ms-tabs,.ms-more-t{display:none}
.ms-track{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:var(--s2)}
.ms-sec{position:relative;display:flex;flex-direction:column;min-width:0;padding:var(--s2);background:var(--bg);border-radius:var(--r-card)}
.ms-h{display:flex;align-items:center;justify-content:space-between;height:2.25rem}
.ms-h h2{margin:0;font-size:var(--fs-l);font-weight:var(--w-b);line-height:1.4}
.ms-more{height:2.25rem;margin-right:-.5rem;padding:0 var(--s1);border-radius:var(--ctl-r);font-size:var(--fs-s);font-weight:var(--w-b);color:var(--ink-2);white-space:nowrap}
.ms-more:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.ms-lead{position:relative;height:6.375rem;margin-top:var(--s1)}
.ms-open{position:absolute;inset:-.25rem -.5rem;z-index:1;width:auto;border-radius:var(--ctl-r)}
.ms-open:hover{background:none}
.ms-lead:hover .ms-nm{text-decoration:underline;text-underline-offset:3px}
.ms-l1{display:flex;align-items:center;justify-content:space-between;height:3.0625rem}
.ms-l1-r{display:flex;flex-direction:column;align-items:flex-end;flex:none}
.ms-l1-r small{font-size:var(--fs-s);line-height:1.5;color:var(--ink-2);white-space:nowrap}
.ms-st{display:flex;align-items:center;height:1.75rem;font-size:var(--fs-s);font-weight:var(--w-b);color:var(--ink-2)}
.ms-nm{margin-top:var(--s1);font-size:var(--fs-m);font-weight:var(--w-b);line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-hl{font-size:var(--fs-s);line-height:1.5;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-lead .pair,.ms-r .pair{flex-direction:row}
.ms-lead .pair{gap:var(--s1)}
.ms-lead .pair .logo-mark,.ms-lead .pair .code{width:2.5rem;height:2.5rem}
.ms-lead .pair .pa{font-size:var(--fs-l);transform:scale(1.2)}
.ms-list{min-height:10.5rem;margin:var(--s-12,.75rem) -.5rem 0;padding:0;list-style:none}
.ms-r{position:relative;display:flex;align-items:center;gap:var(--s-12,.75rem);width:100%;height:3.5rem;padding:0 var(--s1);border-radius:var(--ctl-r);text-align:left}
.ms-r:hover{background:var(--fill)}
.ms-r:active{background:var(--fill-2)}
.ms-r .pair{gap:.25rem}
.ms-r .pair .logo-mark,.ms-r .pair .code{width:1.75rem;height:1.75rem}
.ms-r .pair .pa{font-size:var(--fs-s);transform:none}
.ms-r-t{display:flex;flex-direction:column;min-width:0}
.ms-r-t b{font-size:var(--fs-s);line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-r-t small{font-size:var(--fs-s);line-height:1.5;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@container (max-width:691px){
  .ms-tabs{display:flex;align-items:center;gap:var(--s3);height:2.75rem;margin:0 0 var(--s1) -.25rem}
  .ms-more-t{display:inline-block;margin:0 -.5rem 0 auto}
  .ms-tab{position:relative;height:2.75rem;padding:0 .25rem;border-radius:var(--ctl-r);font-size:var(--fs-m);font-weight:var(--w-b);color:var(--ink-2)}
  .ms-tab[aria-current="true"]{color:var(--ink)}
  .ms-tab[aria-current="true"]::after{content:"";position:absolute;left:.25rem;right:.25rem;bottom:.375rem;height:2px;background:var(--ink)}
  .ms-tab:hover{color:var(--ink)}
  .ms-track{display:flex;gap:var(--s1);overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scroll-snap-type:x mandatory;scrollbar-width:none}
  .ms-track::-webkit-scrollbar{display:none}
  .ms-track::after{content:"";flex:0 0 calc(100% - min(100% - var(--s3), 20rem))}   /* 마지막 열도 맨 앞에 설 수 있게(= 컨테이너 - 열 폭) */
  .ms-sec{flex:0 0 min(calc(100% - var(--s3)), 20rem);scroll-snap-align:start}   /* 모바일: 한 열 + 다음 열 peek 16 · 넓은 컨테이너(태블릿 세로 등)는 열 폭 320 상한 */
  .ms-h{display:none}   /* 종목 이름·`더 보기` 는 탭 줄이 맡아요(탭 줄의 `더 보기` 는 현재 열의 종목) */
  .ms-lead{margin-top:0}
}
.hm-pick+.ms{margin-top:var(--s2)}

/* 오너 지시: MLB 전체 격자 가운데 어설픈 공백 제거 — 아메리칸/내셔널 사이 간격 열을 0 으로(다른 리그와 같은 균등 10열) */
@media (min-width:760px){ .tf-mlb{grid-template-columns:repeat(5,minmax(0,1fr)) 0 repeat(5,minmax(0,1fr))} }
