:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-top: #ffffff;
  --card: #ffffff;
  --card2: #eef1f6;
  --gold: #e8b52a;
  --gold-text: #1a1403;
  --text: #12151c;
  --muted: #3e4a5c;
  --win: #0b7a3e;
  --lose: #c0152a;
  --value: #0b7a3e;
  --line: #d5dbe6;
  --shadow: 0 4px 14px rgba(16, 24, 40, .08);
  --bar-track: #d9dee8;
  --banner-info-bg: #e8eef9;
  --banner-info-fg: #1e3a6a;
  --banner-warn-bg: #fff3d6;
  --banner-warn-fg: #7a4a00;
  --banner-ok-bg: #e3f7eb;
  --banner-ok-fg: #0c5c32;
  --pill-live-bg: #fde8ea;
  --pill-live-fg: #9f1239;
  --pill-done-bg: #dcfce7;
  --pill-done-fg: #14532d;
  --pill-sale-bg: #e0eaff;
  --pill-sale-fg: #1e3a8a;
  --tag-value-bg: #dcfce7;
  --tag-value-fg: #14532d;
  --tag-close-bg: #fef3c7;
  --tag-close-fg: #92400e;
  --tag-short-bg: #fee2e2;
  --tag-short-fg: #9f1239;
  --cell-pick-bg: #fff6d4;
  --cell-pick-border: #b88600;
  --slip-bg: #f7f8fb;
  --slip-fg: #12151c;
  --tabbar-bg: #fffffff5;
  --tab-on: #8a5a00;
  --toast-bg: #1f2937;
  --toast-fg: #ffffff;
  --odds: #0a2f86;
  --odds-sub: #1e293b;
  --cell-bg: #ffffff;
  --score: #8a5a00;
  --nav-h: calc(60px + env(safe-area-inset-bottom));
  --font: "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-top: #0b1020;
  --card: #151b2e;
  --card2: #1c243c;
  --gold: #f5c542;
  --gold-text: #1a1403;
  --text: #f3f4f8;
  --muted: #c5cddc;
  --win: #3dd68c;
  --lose: #ff7a86;
  --value: #7ee0a8;
  --line: rgba(255,255,255,.14);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --bar-track: #2a3148;
  --banner-info-bg: #1c2a4a;
  --banner-info-fg: #e8eef9;
  --banner-warn-bg: #3a2a12;
  --banner-warn-fg: #ffd789;
  --banner-ok-bg: #143226;
  --banner-ok-fg: #c8f5dc;
  --pill-live-bg: #5a1d28;
  --pill-live-fg: #ffc0c6;
  --pill-done-bg: #1d3a2c;
  --pill-done-fg: #bdebd0;
  --pill-sale-bg: #2a3350;
  --pill-sale-fg: #d4dcff;
  --tag-value-bg: #153527;
  --tag-value-fg: #7ee0a8;
  --tag-close-bg: #3a3418;
  --tag-close-fg: #f0d889;
  --tag-short-bg: #3a1d24;
  --tag-short-fg: #ffb3ba;
  --cell-pick-bg: #4a3d16;
  --cell-pick-border: #f5c542;
  --slip-bg: #0e1424;
  --slip-fg: #e8edf8;
  --tabbar-bg: #10162aee;
  --tab-on: #f5c542;
  --toast-bg: #f3f4f8;
  --toast-fg: #111111;
  --odds: #ffe566;
  --odds-sub: #f3f6ff;
  --cell-bg: #2c3a56;
  --score: #f5c542;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100dvh; padding-bottom: var(--nav-h); }
button, a { font-family: inherit; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  background: var(--bg-top);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand img { border-radius: 8px; }
.top h1 { font-size: 16px; margin: 0; letter-spacing: -.02em; color: var(--text); }
.sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ghost, .btn, .tab {
  background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.btn { background: var(--card2); color: var(--text); }
.btn.primary { background: var(--gold); color: var(--gold-text); border-color: transparent; font-weight: 700; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.ghost { border-color: var(--line); color: var(--text); background: var(--card); }
.banner { margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.banner.info { background: var(--banner-info-bg); color: var(--banner-info-fg); }
.banner.warn { background: var(--banner-warn-bg); color: var(--banner-warn-fg); }
.banner.ok { background: var(--banner-ok-bg); color: var(--banner-ok-fg); }
.banner .row { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.banner button { color: inherit; }
.panel { padding: 12px 16px 24px; }
.hidden { display: none !important; }
.lead { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
h2 { font-size: 15px; margin: 18px 0 8px; color: var(--text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters.tight { align-items: center; justify-content: space-between; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer;
}
.chip.on { background: var(--gold); color: var(--gold-text); border-color: transparent; font-weight: 700; }
.chk { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.count { font-size: 12px; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 13px; box-shadow: var(--shadow);
}
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-bottom: 6px; align-items: center; }
.pill { background: var(--card2); color: var(--text); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.pill.live { background: var(--pill-live-bg); color: var(--pill-live-fg); }
.pill.done { background: var(--pill-done-bg); color: var(--pill-done-fg); }
.pill.sale { background: var(--pill-sale-bg); color: var(--pill-sale-fg); }
.teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text); }
.teams .vs { color: var(--muted); font-weight: 600; font-size: 12px; }
.score { font-size: 13px; color: var(--score); margin-top: 4px; font-weight: 700; }
.odds {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px;
}
.odds.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cell {
  -webkit-appearance: none; appearance: none;
  background: var(--cell-bg); border-radius: 12px; padding: 10px 6px; text-align: center;
  border: 2px solid var(--line); color: var(--odds);
  opacity: 1; -webkit-text-fill-color: var(--odds);
}
.cell * { opacity: 1; }
.cell.pick { border-color: var(--cell-pick-border); background: var(--cell-pick-bg); color: var(--odds); -webkit-text-fill-color: var(--odds); }
.cell .lab { font-size: 12px; color: var(--odds-sub); -webkit-text-fill-color: var(--odds-sub); font-weight: 700; }
.cell .od {
  font-size: 24px; font-weight: 900; letter-spacing: -.03em; line-height: 1.15;
  color: var(--odds); -webkit-text-fill-color: var(--odds);
  font-variant-numeric: tabular-nums; opacity: 1;
}
.cell .fair { font-size: 12px; margin-top: 3px; font-weight: 700; color: var(--odds-sub); -webkit-text-fill-color: var(--odds-sub); }
.cell .ev { font-size: 12px; font-weight: 800; color: var(--odds-sub); -webkit-text-fill-color: var(--odds-sub); }
.cell .ev.good { color: var(--win); -webkit-text-fill-color: var(--win); }
.cell .ev.bad { color: var(--lose); -webkit-text-fill-color: var(--lose); }
.bar { height: 3px; background: var(--bar-track); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); }
.row-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; justify-content: space-between; }
.tag { font-size: 11px; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.tag.value { background: var(--tag-value-bg); color: var(--tag-value-fg); }
.tag.close { background: var(--tag-close-bg); color: var(--tag-close-fg); }
.tag.short { background: var(--tag-short-bg); color: var(--tag-short-fg); }
.muted { color: var(--muted); font-size: 12px; }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.slip-text {
  background: var(--slip-bg); border: 1px dashed var(--line); border-radius: 12px;
  padding: 12px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; color: var(--slip-fg);
  min-height: 6em;
}
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 20px; margin-top: 4px; color: var(--text); }
.stat span { font-size: 12px; color: var(--muted); }
.src { background: var(--card); border-radius: 14px; padding: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.src h3 { margin: 0 0 4px; font-size: 14px; color: var(--text); }
.okdot, .baddot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.okdot { background: var(--win); }
.baddot { background: var(--lose); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--tabbar-bg); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  border: 0; background: transparent; color: var(--muted); padding: 8px 4px; font-size: 12px; font-weight: 700;
  position: relative;
}
.tab.on { color: var(--tab-on); }
.badge {
  position: absolute; top: 2px; right: 18%; min-width: 16px; height: 16px; border-radius: 99px;
  background: var(--gold); color: var(--gold-text); font-size: 10px; line-height: 16px; padding: 0 4px;
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 12px); transform: translateX(-50%);
  background: var(--toast-bg); color: var(--toast-fg); padding: 8px 14px; border-radius: 999px; font-size: 13px; z-index: 40;
}

/* ---- 경기 탭: 승부식 목록 스타일 (우리 앱 브랜딩, 공식 로고 사용 안 함) ---- */
:root, [data-theme="light"] {
  --mhead-soccer: #1b8f4a;
  --mhead-basket: #e85d04;
  --mhead-volley: #0e7c86;
  --mhead-base: #c1121f;
  --mhead-hockey: #1d4e89;
  --mhead-etc: #445068;
  --obtn-border: #3d4a5c;
  --obtn-bg: #ffffff;
  --obtn-on-bg: #e8f1ff;
  --obtn-rec-border: #c49200;
  --obtn-value-border: #0b7a3e;
  --dash: #c5cdd6;
  --actionbar-bg: #ffffff;
  --subtab-on: #1a73e8;
  --odd-up: #d61f2c;
  --odd-down: #1a5cff;
}
[data-theme="dark"] {
  --mhead-soccer: #1b8f4a;
  --mhead-basket: #e85d04;
  --mhead-volley: #0e7c86;
  --mhead-base: #c1121f;
  --mhead-hockey: #1d4e89;
  --mhead-etc: #5b6780;
  --obtn-border: #c5cddc;
  --obtn-bg: #1c243c;
  --obtn-on-bg: #2a3a62;
  --obtn-rec-border: #f5c542;
  --obtn-value-border: #3dd68c;
  --dash: #3a445c;
  --actionbar-bg: #10162a;
  --subtab-on: #7eb0ff;
  --odd-up: #ff6b7a;
  --odd-down: #7eb0ff;
}
body.games-on { padding-bottom: calc(var(--nav-h) + 88px); }
#tab-games { padding: 0 0 28px; }
.subtabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg-top); border-bottom: 1px solid var(--line);
}
.subtab {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; padding: 11px 2px; font-size: 13px; font-weight: 800;
  color: var(--muted); cursor: pointer;
}
.subtab.on { color: var(--text); border-bottom-color: var(--subtab-on); }
.round-title { margin: 12px 16px 8px; font-size: 18px; letter-spacing: -.03em; }
.toolbar {
  display: flex; gap: 8px; padding: 0 16px 10px; align-items: center;
}
.toolbar select, .toolbar input[type="search"] {
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; min-width: 0;
}
.toolbar select { flex: 0 0 auto; max-width: 34%; }
.toolbar input[type="search"] { flex: 1 1 auto; }
.icon-btn { min-width: 40px; padding: 8px 10px; font-size: 16px; font-weight: 800; }
.sport-chips { padding: 0 16px 4px; }
.sport-chips .chip { font-weight: 700; }
.line-count { padding: 4px 16px 8px; margin: 0; }
.mlist { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.mcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; box-shadow: none;
}
.mhead {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: #fff; padding: 7px 12px; font-size: 13px; font-weight: 800;
}
.mhead.축구 { background: var(--mhead-soccer); }
.mhead.농구 { background: var(--mhead-basket); }
.mhead.배구 { background: var(--mhead-volley); }
.mhead.야구 { background: var(--mhead-base); }
.mhead.하키 { background: var(--mhead-hockey); }
.mhead.기타 { background: var(--mhead-etc); }
.mhead .deadline { font-weight: 700; font-size: 12px; opacity: 1; }
.mbody { padding: 10px 12px 4px; }
.mteams {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: start;
}
.mteams .side { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.mteams .nm { font-size: 18px; font-weight: 900; line-height: 1.25; color: var(--text); }
.mteams .home { text-align: left; }
.mteams .away { text-align: right; }
.mteams .vs { color: var(--muted); font-weight: 800; font-size: 13px; padding-top: 18px; }
.kick { margin: 8px 0 6px; font-size: 13px; color: var(--text); font-weight: 600; }
.kick .score { color: var(--score); margin-left: 8px; }
.bet-row { padding: 10px 12px 12px; }
.bet-row + .bet-row { border-top: 1px dashed var(--dash); }
.bet-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.game-no { font-weight: 900; font-size: 15px; color: var(--text); min-width: 3em; }
.kind { font-size: 11px; color: var(--muted); font-weight: 700; }
.mbadge {
  font-size: 11px; font-weight: 800; background: var(--card2); color: var(--text);
  padding: 2px 7px; border-radius: 4px;
}
.plus {
  margin-left: auto; width: 30px; height: 30px; border: 1.5px solid var(--obtn-border);
  border-radius: 6px; background: var(--card); color: var(--text);
  font-size: 20px; font-weight: 800; line-height: 1; padding: 0; cursor: pointer;
}
.obtn-row { display: grid; gap: 6px; }
.obtn-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.obtn-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.obtn {
  -webkit-appearance: none; appearance: none; opacity: 1;
  background: var(--obtn-bg); border: 1.5px solid var(--obtn-border);
  border-radius: 6px; padding: 8px 4px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 58px;
}
.obtn .lab-od {
  font-size: 16px; font-weight: 900; color: var(--odds);
  -webkit-text-fill-color: var(--odds); letter-spacing: -.03em; opacity: 1;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.obtn .mini {
  font-size: 10px; font-weight: 700; color: var(--odds-sub);
  -webkit-text-fill-color: var(--odds-sub); opacity: 1; line-height: 1.3;
}
.obtn.on { background: var(--obtn-on-bg); border-width: 2px; }
.obtn.rec { border-color: var(--obtn-rec-border); border-width: 2px; }
.obtn.val { border-color: var(--obtn-value-border); border-width: 2px; }
.odd-up { color: var(--odd-up); font-size: 11px; margin-left: 2px; font-weight: 900; }
.odd-down { color: var(--odd-down); font-size: 11px; margin-left: 2px; font-weight: 900; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: var(--nav-h); z-index: 25;
  display: none; grid-template-columns: 1fr 1fr;
  background: var(--actionbar-bg); border-top: 1px solid var(--line);
  padding: 8px 12px;
}
body.games-on .actionbar { display: grid; }
.actionbar button {
  background: transparent; border: 0; color: var(--text);
  font-size: 14px; font-weight: 800; padding: 8px; cursor: pointer;
}
.actionbar button + button { border-left: 1px solid var(--line); }
.toolbar.flash { outline: 2px solid var(--subtab-on); outline-offset: 2px; border-radius: 10px; }
