/* PODODO 메인 — style.css의 색·글꼴 토큰을 그대로 씁니다. */
:root { --draw: #a9a59b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --draw: #8d897f; } }
:root[data-theme="dark"] { --draw: #8d897f; }
body.main-page { padding: 0 0 40px; }
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.head-in, .page { max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-block: 12px; }
.head-in .brand { font-size: 19px; } .head-in .brand-logo { height: 28px; }
.sports { display: flex; gap: 4px; flex-wrap: wrap; }
.sports a, .sports .soon { padding: 6px 14px; border-radius: 999px; font-weight: 500; text-decoration: none; color: var(--ink); }
.sports a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 700; }
.sports .soon { color: var(--ink-2); }
.sports small { font-size: 11px; }
.head-tools { flex: 1 1 220px; display: flex; justify-content: flex-end; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; width: 300px; max-width: 100%; color: var(--ink-2); }
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 13px; width: 100%; color: var(--ink); padding: 9px 0; }
.search:focus-within { border-color: var(--ink-2); }

.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 18px; }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.leagues { display: flex; gap: 6px; flex-wrap: wrap; }
.league { padding: 5px 14px; border-radius: 8px; font-size: 13px; text-decoration: none; }
.league.on { border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; }
.league.soon { border: 1px dashed var(--line); color: var(--ink-2); }
.dates { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.dates button { flex: none; border: 1px solid transparent; background: none; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.dates button:hover { border-color: var(--line); }
.dates button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 700; }

.cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: grid; gap: 22px; }
.col-side { flex: 1 1 300px; min-width: 0; display: grid; gap: 18px; }
.col-main h2 .h2-right { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.hint { margin: 0; font-size: 12px; color: var(--ink-2); }

/* 경기 목록 */
.games-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.g-head, .g-row { display: grid; grid-template-columns: 70px minmax(0, 1.3fr) minmax(150px, 1.3fr) minmax(0, 1.3fr) 112px; gap: 12px; align-items: center; padding: 10px 16px; }
.g-head { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--ink-2); padding-block: 8px; }
.g-row { border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.g-row:hover { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.g-time { display: grid; gap: 1px; }
.g-time b { font-family: var(--font-num); font-size: 15px; }
.g-time span { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.g-time span.on { color: var(--good); }
.g-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.g-team.away { justify-content: flex-end; text-align: right; }
.g-team .c { font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.g-team.home .c { color: var(--home); } .g-team.away .c { color: var(--away); }
.g-team .n { display: grid; min-width: 0; line-height: 1.3; }
.g-team .n span:first-child { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-team .n span:last-child { font-size: 12px; color: var(--ink-2); }
.g-odds { display: grid; gap: 4px; }
.g-odds .o { display: flex; justify-content: space-between; font-family: var(--font-num); font-weight: 600; font-size: 14px; }
.g-odds .o span:first-child { color: var(--home); } .g-odds .o span:last-child { color: var(--away); }
.mini-bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; font-family: var(--font-num); font-size: 11px; font-weight: 600; color: var(--on-team); }
.mini-bar div { display: flex; align-items: center; padding-inline: 6px; white-space: nowrap; min-width: 0; }
.mini-bar .h { background: var(--home); } .mini-bar .a { background: var(--away); flex: 1; justify-content: flex-end; }
.mini-bar .d { background: var(--draw); justify-content: center; }
.mini-bar .h { justify-content: flex-start; }
.g-odds .o .od { color: var(--ink-2); }
.form b.d { background: var(--draw); color: var(--on-team); }
.mini-bar .none { flex: 1; background: var(--line); color: var(--ink-2); justify-content: center; }
.g-go { justify-self: end; padding: 7px 12px; border-radius: 8px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; white-space: nowrap; }
.g-empty { padding: 28px 16px; text-align: center; color: var(--ink-2); }
.g-date { padding: 6px 16px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* 최근 5경기 흐름 */
.form { display: inline-flex; gap: 2px; font-style: normal; }
.g-row { padding-block: 7px; }
/* 팀 칸: 윗줄 = 코드 + 이름·전적, 아랫줄 = 최근 5경기 */
.g-team { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "c n" "f f"; column-gap: 10px; row-gap: 3px; align-items: center; }
.g-team.away { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n c" "f f"; }
.g-team .c { grid-area: c; line-height: 1; } .g-team .n { grid-area: n; } .g-team .form { grid-area: f; }
.g-team.away .form { justify-self: end; }
.form b { width: 13px; height: 13px; border-radius: 3px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; line-height: 1; }
.form b.w { background: var(--win); color: var(--on-team); }
.form b.l { background: var(--loss); color: var(--on-team); }
.g-team .n .rec { white-space: nowrap; }

/* 끝난 경기 점수 */
.g-score { display: flex; justify-content: center; align-items: baseline; gap: 6px; font-family: var(--font-num); font-size: 15px; }
.g-score b { font-weight: 600; color: var(--ink-2); }
.g-score b.win { font-weight: 700; } .g-score b.win.h { color: var(--home); } .g-score b.win.a { color: var(--away); }
.g-score em { font-style: normal; font-family: inherit; font-size: 11px; color: var(--ink-2); margin-left: 4px; }

/* 자동 브리핑 */
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.brief-card { word-break: keep-all; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.brief-card h3 { margin: 0 0 6px; font-size: 14px; }
.brief-head { margin: 0; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.brief-lead { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.brief-card ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.brief-card li { font-size: 13.5px; line-height: 1.6; padding: 6px 0; border-top: 1px solid var(--surface-2); }
.brief-card li:first-child { border-top: 0; }
.brief-card li a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.brief-card li.row > a { display: block; text-decoration: none; }
.brief-card li a:hover { color: var(--home); }
.brief-card li > a b, .brief-card li > b { margin-right: 6px; font-size: 12px; color: var(--away); }

/* 기대승률 대비 성적 */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.value-card h3 { margin: 0; font-size: 14px; }
.value-card.up h3 { color: var(--good); } .value-card.down h3 { color: var(--bad); }
.v-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.v-row b { font-size: 16px; font-weight: 900; }
.v-row span { font-size: 12px; color: var(--ink-2); }
.v-row em { font-style: normal; font-family: var(--font-num); font-weight: 600; }
.value-card.up em { color: var(--good); } .value-card.down em { color: var(--bad); }

/* 오른쪽 칸 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-h { margin: 0; padding: 12px 16px; font-size: 15px; border-bottom: 2px solid var(--ink); }
.card-h small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.hot, .moves { list-style: none; margin: 0; padding: 4px 0; }
.hot a { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; min-height: 44px; padding: 4px 16px; color: var(--ink); text-decoration: none; }
.hot a:hover { background: var(--surface-2); }
.hot .r { font-family: var(--font-num); font-weight: 600; color: var(--away); }
.hot .m { display: grid; } .hot .m b { font-size: 13px; } .hot .m span { font-size: 12px; color: var(--ink-2); }
.hot .k { font-size: 12px; color: var(--ink-2); font-family: var(--font-num); }
.side-empty { padding: 16px; font-size: 13px; color: var(--ink-2); }
.moves li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 16px; border-bottom: 1px solid var(--surface-2); color: var(--ink); text-decoration: none; }
.moves li a:hover { background: var(--surface-2); }
.moves b { font-size: 13px; } .moves .mv { font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.moves .w { font-size: 12px; color: var(--ink-2); } .moves .d { font-size: 12px; text-align: right; }
.moves .d.rise { color: var(--rise); } .moves .d.fall { color: var(--fall); }

.site-foot { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.site-foot .warn { color: var(--bad); font-weight: 700; }

/* 휴대폰: 경기 한 줄 → 카드 */
@media (max-width: 760px) {
  .g-head { display: none; }
  /* 한 줄: 홈 팀 | 기대승률(배당·막대·점수) | 원정 팀 */
  .g-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time time go" "home odds away"; gap: 6px 12px; padding: 10px 14px 12px; }
  .g-time { grid-area: time; display: flex; gap: 6px; align-items: baseline; }
  .g-go { grid-area: go; padding: 0; background: none; color: var(--ink-2); font-weight: 400; font-size: 12px; }
  .g-team.home { grid-area: home; } .g-team.away { grid-area: away; }
  .g-team .n span:first-child { display: none; }
  .g-team { display: flex; gap: 0; } .g-team .n { display: block; } .g-team.home .n { order: 2; }
  .g-team.home { flex-direction: column; align-items: flex-start; } .g-team.away { flex-direction: column; align-items: flex-end; }
  .g-team.away .n { order: 2; }
  .g-team .form { order: 3; margin-top: 4px; }
  .g-odds { grid-area: odds; align-self: center; }
  .g-odds .o { justify-content: center; gap: 14px; }
  .mini-bar { height: 16px; font-size: 10px; }
  .g-score { font-size: 14px; }
  .g-score em { display: none; }
    .dates { width: 100%; }
  .search { width: 100%; }
}

/* 축구 색: 홈 = 청록(틸), 원정 = 호박색(앰버). 농구는 그대로 남색 + 모래색 */
.lg-draw { --home: #2f6f73; --home-soft: #e0eeee; --away: #b5822a; --away-soft: #f6ecd9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-draw { --home: #84c3c5; --home-soft: #1d2e2f; --away: #e0b569; --away-soft: #382d1a; } }
:root[data-theme="dark"] .lg-draw { --home: #84c3c5; --home-soft: #1d2e2f; --away: #e0b569; --away-soft: #382d1a; }

/* ---------- 전체(두 종목 종합) 화면 ---------- */
.hub .bar-row, .hub .value-sec { display: none; }
.sp { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 1px 6px; border-radius: 4px; background: var(--home); color: var(--on-team); vertical-align: 1px; margin-right: 4px; }
.brief-card .hb + .hb { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.brief-card .hb .brief-head { display: flex; align-items: center; gap: 2px; }
.tl + .tl { margin-top: 14px; }
.tl { border-top: 3px solid var(--home); }
.tl-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.tl-head b { font-size: 14px; } .tl-head span:not(.sp) { color: var(--ink-2); font-size: 12px; }
.tl-head a { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--home); text-decoration: none; white-space: nowrap; }
.tl-head a:hover { text-decoration: underline; }
.moves li.lg-draw b .sp, .hot li.lg-draw b .sp { margin-right: 2px; }
@media (max-width: 760px) {
  /* 전체 화면 모바일: 브리핑은 종목마다 2줄만 */
  .hub .brief-card .hb li:nth-child(n+3) { display: none; }
}
