:root {
  /* MSI 2026 — LoL Esports / Hextech 정체성: 골드 주색 + 딥 헥스테크 블루 + 라이엇 마젠타 에너지.
     var 이름(--grass 등)은 유지해 전 컴포넌트 일괄 리컬러. */
  --bg: #060d1a;          /* hextech deep navy-black */
  --surface: #0e1b30;     /* 블루틴트 패널 */
  --surface-2: #14253c;
  --line: #1f3a55;        /* 블루 스틸 */
  --line-bright: #2f5377;
  --text: #f0e6d2;        /* LoL 파치먼트 골드화이트 */
  --muted: #8595ad;       /* 블루그레이 */
  --grass: #c8aa6e;       /* primary accent — LoL 시그니처 골드 */
  --grass-2: #f0d58c;     /* 브라이트 골드 */
  --grass-glow: rgba(200, 170, 110, 0.30);
  --lime: #f0d58c;
  --gold: #c8aa6e;
  --teal: #0ac8b9;        /* 헥스테크 틸 (소형 액센트) */
  --silver: #cdd7e2;
  --bronze: #cd8b3f;
  --kr: #ff4655;          /* 라이엇 마젠타-레드 (한국팀 + 라이브 에너지) */
  --disp: "Archivo", "Pretendard", system-ui, sans-serif;
  --body: "Pretendard", "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--body);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(130% 70% at 50% -12%, rgba(200, 170, 110, 0.13), transparent 58%),
    radial-gradient(90% 50% at 100% 0%, rgba(10, 200, 185, 0.07), transparent 55%),
    radial-gradient(70% 40% at 0% 100%, rgba(255, 70, 85, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* 헥스테크 대각 회로 라인 (희미) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(45deg, transparent 0 92px, rgba(200,170,110,0.020) 92px 93px),
    repeating-linear-gradient(-45deg, transparent 0 92px, rgba(120,160,210,0.014) 92px 93px);
}
/* 그레인 오버레이 */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
body > * { position: relative; z-index: 2; }

/* ── Header ── */
header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px clamp(16px, 4vw, 44px) 18px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-family: var(--disp); font-weight: 900; font-size: 22px; line-height: 1; letter-spacing: 0.5px;
  color: var(--bg); background: linear-gradient(160deg, var(--grass-2), var(--grass));
  padding: 11px 12px; border-radius: 12px;
  box-shadow: 0 6px 24px var(--grass-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.brand-text h1 {
  font-family: var(--disp); font-weight: 900; font-size: clamp(20px, 3.6vw, 28px);
  letter-spacing: 2px; line-height: 1; text-transform: uppercase;
}
.brand-text .host { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.3px; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 1.4s infinite; }
.dot.err { background: var(--kr); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }
.tz-badge { background: var(--surface-2); border: 1px solid var(--line-bright); border-radius: 20px; padding: 5px 11px; font-weight: 800; color: var(--lime); font-family: var(--disp); letter-spacing: 0.5px; cursor: pointer; outline: none; -webkit-appearance: none; appearance: none; max-width: 150px; }
.tz-badge:hover { border-color: var(--grass); }
.tz-badge option { background: var(--surface); color: var(--text); font-weight: 600; }
.lang-toggle {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 20px; padding: 5px 13px; font-weight: 800; font-size: 12px; cursor: pointer;
  font-family: var(--disp); transition: all 0.15s; min-width: 40px;
}
.lang-toggle:hover { border-color: var(--grass); color: var(--grass-2); transform: translateY(-1px); }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 6px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
  background: rgba(7, 11, 9, 0.88); backdrop-filter: blur(14px);
}
.tab {
  flex-shrink: 0; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font-family: var(--disp); font-size: 15px; font-weight: 700;
  letter-spacing: 0.3px; padding: 12px 16px; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--grass-2); border-bottom-color: var(--grass-2); }

main { padding: 22px clamp(16px, 4vw, 44px) 64px; max-width: 1120px; margin: 0 auto; animation: fadeUp 0.4s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading { text-align: center; padding: 64px; color: var(--muted); font-size: 16px; }
.error-box { text-align: center; padding: 44px; color: var(--kr); }

/* ── Day heading ── */
.day-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--disp); font-size: 14px; font-weight: 800; color: var(--lime);
  text-transform: uppercase; letter-spacing: 0.6px; margin: 26px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.day-head:first-child { margin-top: 0; }
.day-count { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; margin-left: auto; }

/* ── Date strip ── */
.date-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin-bottom: 4px;
  scrollbar-width: thin; scrollbar-color: var(--line-bright) transparent;
}
.date-strip::-webkit-scrollbar { height: 5px; }
.date-strip::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 3px; }
.date-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 60px; padding: 11px 10px 9px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; transition: all 0.16s; position: relative; font-family: var(--disp);
}
.date-chip:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.date-chip.today:not(.active) { border-color: var(--gold); }
.date-chip.active {
  background: linear-gradient(165deg, var(--grass-2), var(--grass));
  border-color: var(--grass-2); box-shadow: 0 8px 24px var(--grass-glow);
}
.dc-dow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.dc-day { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.05; font-variant-numeric: tabular-nums; }
.dc-mon { font-size: 9.5px; font-weight: 600; color: var(--muted); }
.dc-cnt {
  margin-top: 4px; font-size: 10px; font-weight: 800; color: var(--muted);
  background: var(--surface-2); border-radius: 8px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.date-chip.active .dc-dow, .date-chip.active .dc-day, .date-chip.active .dc-mon { color: var(--bg); }
.date-chip.active .dc-cnt { background: rgba(0,0,0,0.22); color: var(--bg); }
.date-chip.has-live::after {
  content: ""; position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: pulse 1.4s infinite;
}

/* ── Match card ── */
.match {
  display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 16px; margin-bottom: 8px; transition: all 0.15s;
}
.match:hover { border-color: var(--line-bright); transform: translateX(2px); }
.match.kr { border-left: 3px solid var(--kr); }
.match.live-now { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 8px 30px rgba(197,250,74,0.12); }
.m-time { font-family: var(--disp); font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.25; font-variant-numeric: tabular-nums; }
.m-time .grp { display: block; font-size: 10px; color: var(--grass-2); font-weight: 700; margin-top: 3px; letter-spacing: 0.3px; }
.m-teams { display: flex; flex-direction: column; gap: 5px; }
.m-row { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; }
.m-row .fl { font-size: 19px; line-height: 1; }
.m-row .nm { flex: 1; }
.m-row .sc { font-family: var(--disp); font-size: 18px; font-weight: 900; min-width: 22px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.m-row.win .nm { color: #fff; font-weight: 700; }
.m-row.win .sc { color: var(--grass-2); }
.m-status { font-family: var(--disp); font-size: 11px; font-weight: 800; text-transform: uppercase; text-align: right; letter-spacing: 0.5px; }
.m-status.ft { color: var(--muted); }
.m-status.live { color: var(--lime); }
.m-status.live::before { content: "● "; }
.m-status.upcoming { color: var(--grass); }
.next-badge { display: inline-block; background: var(--kr); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; margin-top: 5px; letter-spacing: 0.3px; }

/* ── Standings ── */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.group-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.group-card.kr-group { border-color: var(--kr); box-shadow: 0 0 0 1px rgba(255,77,94,0.2); }
.group-title { font-family: var(--disp); font-size: 14px; font-weight: 800; letter-spacing: 0.5px; padding: 13px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); text-transform: uppercase; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { font-family: var(--disp); font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 9px 6px; text-align: center; letter-spacing: 0.3px; }
th.team-col { text-align: left; padding-left: 16px; }
td { padding: 10px 6px; text-align: center; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
td.team-col { text-align: left; padding-left: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
td.pts { font-family: var(--disp); font-weight: 900; color: var(--grass-2); }
td.pos { color: var(--muted); font-weight: 800; font-family: var(--disp); }
tr.qualify td { background: rgba(46,232,122,0.05); }
tr.qualify td.pos { color: var(--grass-2); }
tr.kr-row td { background: rgba(255,77,94,0.10); }
tr.kr-row td.team-col { color: #fff; }
.fl { font-size: 17px; }

/* ── Scorers ── */
.scorer-list { display: flex; flex-direction: column; gap: 7px; }
.scorer-row {
  display: grid; grid-template-columns: 38px 28px 1fr auto; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; transition: all 0.15s;
}
.scorer-row:hover { border-color: var(--line-bright); transform: translateX(2px); }
.scorer-row.kr { border-left: 3px solid var(--kr); }
.sr-rank { font-family: var(--disp); font-size: 18px; font-weight: 900; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.scorer-row.podium.r1 .sr-rank { color: var(--gold); }
.scorer-row.podium.r2 .sr-rank { color: var(--silver); }
.scorer-row.podium.r3 .sr-rank { color: var(--bronze); }
.scorer-row.podium.r1 { border-color: rgba(255,207,74,0.4); box-shadow: 0 0 24px rgba(255,207,74,0.08); }
.sr-flag { font-size: 20px; text-align: center; }
.sr-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sr-name { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sr-team { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat-chip { display: inline-flex; align-items: center; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.stat-val { font-family: var(--disp); font-size: 11px; font-weight: 800; color: var(--grass-2); }
.stat-label { font-size: 9.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2px; }
/* 나라 필터 (접이식 + 검색) */
.filter-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; cursor: pointer; font-family: var(--body); color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 14px; transition: all 0.14s; }
.filter-head:hover { border-color: var(--line-bright); }
.filter-head.open { border-color: var(--grass); border-radius: 12px 12px 0 0; margin-bottom: 0; }
.fh-label { display: flex; align-items: center; gap: 8px; }
.fh-icon { font-size: 16px; }
.fh-caret { color: var(--muted); font-size: 11px; }
.filter-panel { background: var(--surface); border: 1px solid var(--grass); border-top: none; border-radius: 0 0 12px 12px; padding: 14px 16px; margin-bottom: 16px; }
.filter-search { width: 100%; background: var(--bg); border: 1px solid var(--line-bright); color: var(--text); font-family: var(--body); font-size: 14px; padding: 10px 13px; border-radius: 10px; outline: none; margin-bottom: 12px; }
.filter-search:focus { border-color: var(--grass); }
.filter-search::placeholder { color: var(--muted); }
/* 나라 칩 멀티 필터 */
.chip-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.filter-panel .chip-filter { margin-bottom: 0; max-height: 244px; overflow-y: auto; scrollbar-width: thin; }
.fchip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.14s; }
.fchip:hover { border-color: var(--line-bright); color: var(--text); transform: translateY(-1px); }
.fchip.active { background: rgba(46,232,122,0.13); border-color: var(--grass); color: var(--grass-2); }
.fchip-flag { font-size: 15px; }
.fchip-all { font-family: var(--disp); font-weight: 800; letter-spacing: 0.3px; }
.fchip-all.active { background: var(--grass); border-color: var(--grass); color: var(--bg); }
.filter-sum { font-size: 12px; color: var(--muted); font-weight: 700; font-family: var(--disp); margin-bottom: 14px; display: block; }
/* 나라 탭 컨트롤 */
.country-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.country-select { background: var(--surface); border: 1px solid var(--line-bright); color: var(--text); font-family: var(--body); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 12px; cursor: pointer; min-width: 190px; outline: none; }
.country-select:hover { border-color: var(--grass); }
.pin-btn { background: var(--surface); border: 1px solid var(--line-bright); color: var(--text); font-family: var(--disp); font-weight: 700; font-size: 13px; padding: 10px 16px; border-radius: 12px; cursor: pointer; transition: all 0.14s; }
.pin-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.pin-btn.on { background: rgba(255,207,74,0.14); border-color: var(--gold); color: var(--gold); }
/* 핀 탭 */
.tab-pin { display: inline-flex; align-items: center; gap: 6px; }
.tab-pin-flag { font-size: 15px; }
.tab.tab-pin.active { color: var(--gold); border-bottom-color: var(--gold); }
/* 매치 우측 (상태 + 유튜브) */
.m-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.m-links { display: flex; gap: 5px; }
.yt-link { display: inline-flex; align-items: center; gap: 2px; background: rgba(255,40,40,0.12); border: 1px solid rgba(255,70,70,0.42); color: #ff6b6b; font-family: var(--disp); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 7px; text-decoration: none; letter-spacing: 0.3px; transition: all 0.14s; }
.yt-link:hover { background: rgba(255,40,40,0.24); color: #ff9a9a; border-color: rgba(255,90,90,0.7); }
.cz-link { display: inline-flex; align-items: center; background: rgba(0,230,150,0.10); border: 1px solid rgba(0,220,140,0.42); color: #16e6a0; font-family: var(--disp); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 7px; text-decoration: none; letter-spacing: 0.3px; transition: all 0.14s; }
.cz-link:hover { background: rgba(0,230,150,0.22); color: #5bffc8; border-color: rgba(0,240,160,0.7); }
/* 일반 나라 hero (한국 외) */
.kr-hero.gen { background: linear-gradient(135deg, rgba(46,232,122,0.14), var(--surface) 70%); border-color: var(--grass); }
.sr-goals { display: flex; align-items: baseline; gap: 3px; }
.sr-num { font-family: var(--disp); font-size: 24px; font-weight: 900; color: var(--grass-2); font-variant-numeric: tabular-nums; }
.sr-unit { font-size: 11px; color: var(--muted); font-weight: 700; }

/* ── Korea hero ── */
.kr-hero { background: linear-gradient(135deg, rgba(255,77,94,0.16), var(--surface) 70%); border: 1px solid var(--kr); border-radius: 18px; padding: 22px; margin-bottom: 22px; }
.kr-hero h2 { font-family: var(--disp); font-size: 24px; font-weight: 900; margin-bottom: 5px; }
.kr-hero .sub { color: var(--muted); font-size: 13px; font-weight: 500; }

/* ── Predict (승부예측) ── */
.wip-full { text-align: center; padding: 70px 24px; }
.wip-icon { font-size: 52px; margin-bottom: 18px; }
.wip-title { font-family: var(--disp); font-size: 23px; font-weight: 900; color: var(--lime); margin-bottom: 12px; letter-spacing: 0.3px; }
.wip-desc { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 340px; margin: 0 auto; }
.pred-subtab { display: flex; gap: 6px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.psub { flex: 1; background: none; border: none; color: var(--muted); font-family: var(--disp); font-size: 14px; font-weight: 700; padding: 10px; border-radius: 9px; cursor: pointer; transition: all 0.14s; }
.psub:hover { color: var(--text); }
.psub.active { background: var(--grass); color: var(--bg); }
.bet-hint { background: rgba(46,232,122,0.08); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.tri-icon { width: 16px; height: 16px; vertical-align: middle; }
.tri-sm { width: 15px; height: 15px; vertical-align: -2px; }
.tri-mid { width: 21px; height: 21px; vertical-align: -4px; margin-right: 3px; }
.pred-until { font-size: 11px; color: var(--gold); font-weight: 700; margin-left: auto; }
.po-amt { font-size: 11px; font-weight: 800; color: var(--gold); margin-top: 2px; }
.bet-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.bet-step { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--grass-2); border-radius: 11px; font-size: 24px; font-weight: 800; line-height: 1; cursor: pointer; transition: all 0.14s; -webkit-tap-highlight-color: transparent; user-select: none; touch-action: none; }
.bet-step:hover { border-color: var(--grass); background: rgba(46,232,122,0.12); }
.bet-step:active { transform: scale(0.9); }
.bet-amt { display: inline-flex; align-items: center; gap: 4px; font-family: var(--disp); font-size: 20px; font-weight: 900; color: var(--gold); min-width: 58px; justify-content: center; font-variant-numeric: tabular-nums; }
.bet-unit { display: inline-flex; align-items: center; gap: 2px; font-family: var(--disp); font-size: 12px; font-weight: 800; color: var(--gold); margin-left: 8px; }
.bet-info { margin-top: 9px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--grass-2); }
.bet-lock { color: var(--gold); font-weight: 800; }
.net-pos { display: inline-flex; align-items: center; gap: 2px; color: var(--grass-2); font-weight: 900; }
.net-neg { display: inline-flex; align-items: center; gap: 2px; color: #ff8a96; font-weight: 900; }
.shake { animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.beta-banner { background: rgba(255,207,74,0.1); border: 1px solid rgba(255,207,74,0.35); border-radius: 10px; padding: 9px 13px; font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 12px; text-align: center; }
.avail-bar { display: flex; align-items: center; gap: 3px; font-family: var(--disp); font-size: 13px; font-weight: 700; color: var(--grass-2); margin-bottom: 14px; }
.tri-panel { background: linear-gradient(135deg, rgba(46,232,122,0.12), rgba(255,207,74,0.06)); border: 1px solid var(--grass); border-radius: 16px; padding: 15px 18px; margin-bottom: 11px; }
.tp-head { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--grass-2); text-transform: uppercase; letter-spacing: 0.5px; }
.tp-title { font-family: var(--disp); }
.tp-big { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 13px; }
.tp-num { font-family: var(--disp); font-size: 42px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.tp-unit { font-size: 13px; font-weight: 700; color: var(--muted); }
.tp-split { display: flex; gap: 10px; }
.tp-cell { flex: 1; background: rgba(0,0,0,0.22); border-radius: 11px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.tp-cv { font-family: var(--disp); font-size: 22px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tp-cv.av { color: var(--grass-2); }
.tp-cv.be { color: var(--gold); }
.tp-cl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.pred-stat { display: flex; gap: 10px; margin-bottom: 20px; }
.pstat-box { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; }
.pstat-val { display: block; font-family: var(--disp); font-size: 26px; font-weight: 900; color: var(--grass-2); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pstat-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.pred-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-bottom: 9px; }
.pred-card.next-up { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 4px 16px rgba(255,207,74,0.15); }
.pred-card.has-bet { border-color: var(--grass); background: linear-gradient(var(--surface), rgba(46,232,122,0.07)); }
.pred-card.pinned-match { border-color: var(--kr); box-shadow: 0 0 0 1px rgba(255,77,94,0.5); background: linear-gradient(var(--surface), rgba(255,77,94,0.06)); }
.match.pinned { border-color: var(--kr); box-shadow: 0 0 0 1px rgba(255,77,94,0.4); }
.pinned-row td { background: rgba(255,77,94,0.1); }
.pred-banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(46,232,122,0.15), rgba(255,207,74,0.1)); border: 1px solid var(--grass); border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; cursor: pointer; position: relative; transition: all 0.15s; }
.pred-banner:hover { border-color: var(--grass-2); transform: translateY(-1px); }
.pb-icon { font-size: 26px; }
.pb-txt { flex: 1; min-width: 0; }
.pb-title { font-family: var(--disp); font-size: 14px; font-weight: 900; color: var(--grass-2); }
.pb-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.pb-go { font-family: var(--disp); font-size: 12px; font-weight: 800; color: #0c1810; background: var(--grass-2); border-radius: 8px; padding: 7px 12px; white-space: nowrap; }
.pb-x { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 2px; line-height: 1; }
.pb-x:hover { color: var(--text); }
.squad-box { margin-bottom: 16px; }
.squad-pos { font-family: var(--disp); font-size: 11px; font-weight: 800; color: var(--grass-2); text-transform: uppercase; letter-spacing: 0.5px; margin: 14px 0 7px; }
.squad-list { display: flex; flex-direction: column; gap: 4px; }
.squad-player { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sp-num { font-family: var(--disp); font-size: 14px; font-weight: 900; color: var(--muted); min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.sp-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sp-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sp-club { font-size: 11px; color: var(--muted); }
.tab.tab-game { position: relative; }
.tab.tab-game:not(.active) { color: var(--gold); }
.tab.tab-game::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--grass-2); box-shadow: 0 0 6px var(--grass); animation: pulse-dot 1.4s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.bet-next { display: inline-flex; align-items: center; font-family: var(--disp); font-size: 10.5px; font-weight: 800; color: #0c1810; background: var(--gold); border-radius: 6px; padding: 2px 7px; margin-right: 6px; letter-spacing: 0.3px; }
.pred-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pred-time { font-family: var(--disp); font-size: 13px; font-weight: 700; color: var(--muted); }
.pred-grp { font-size: 10px; color: var(--grass-2); font-weight: 700; }
.pred-opts { display: grid; grid-template-columns: 1fr 0.66fr 1fr; gap: 7px; }
.pred-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.14s; min-width: 0; }
.po-odds { font-family: var(--disp); font-size: 11px; font-weight: 800; color: var(--gold); }
.pred-opt.picked .po-odds { color: var(--grass-2); }
.pred-opt.locked .po-odds { color: var(--muted); }
.nick-form { text-align: center; padding: 50px 24px; max-width: 420px; margin: 0 auto; }
.nick-emoji { font-size: 52px; margin-bottom: 16px; }
.nick-title { font-family: var(--disp); font-size: 24px; font-weight: 900; color: var(--lime); margin-bottom: 12px; }
.nick-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.nick-input { width: 100%; background: var(--surface); border: 1px solid var(--line-bright); color: var(--text); font-size: 16px; padding: 13px 16px; border-radius: 12px; outline: none; text-align: center; margin-bottom: 12px; }
.nick-input:focus { border-color: var(--grass); }
.nick-btn { width: 100%; background: linear-gradient(135deg, var(--grass-2), var(--grass)); color: var(--bg); font-family: var(--disp); font-size: 17px; font-weight: 900; padding: 14px; border: none; border-radius: 12px; cursor: pointer; transition: all 0.14s; }
.nick-btn:hover { box-shadow: 0 6px 20px var(--grass-glow); }
.lb-list { display: flex; flex-direction: column; gap: 5px; }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.lb-row.me { border-color: var(--grass); background: rgba(46,232,122,0.07); }
.lb-rank { font-family: var(--disp); font-size: 16px; font-weight: 900; color: var(--muted); text-align: center; }
.lb-row:first-child .lb-rank { color: var(--gold); }
.lb-nick { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-coins { font-family: var(--disp); font-weight: 800; color: var(--gold); }
.pred-opt:hover:not(.locked) { border-color: var(--grass); transform: translateY(-1px); }
.pred-opt.picked { background: rgba(46,232,122,0.16); border-color: var(--grass); color: var(--grass-2); font-weight: 700; }
.pred-opt.locked { cursor: default; }
.pred-opt.correct { background: rgba(46,232,122,0.18); border-color: var(--grass); color: var(--grass-2); }
.pred-opt.wrong { background: rgba(255,77,94,0.14); border-color: var(--kr); color: #ff8a96; }
.po-flag { font-size: 16px; }
.po-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-result { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--disp); font-size: 14px; font-weight: 700; text-align: center; }
/* BMC */
.support-btns { display: inline-flex; align-items: center; gap: 8px; }
.bmc-btn { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #ffdd00, #ffb700); color: #14110b; font-weight: 800; font-size: 12px; padding: 7px 14px; border-radius: 10px; text-decoration: none; transition: all 0.14s; }
.kofi-btn { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #ff7b78, #ff5e5b); color: #fff; font-weight: 800; font-size: 12px; padding: 7px 14px; border-radius: 10px; text-decoration: none; transition: all 0.14s; }
.kofi-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,94,91,0.35); }
.bmc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,200,0,0.32); }
/* ── Footer ── */
footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 22px clamp(16px, 4vw, 44px); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.footer-by { font-family: var(--disp); font-weight: 700; }

@media (max-width: 480px) {
  .match { grid-template-columns: 54px 1fr; }
  .m-right { grid-column: 2; flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
}

/* ── MSI: team badges (지역색 코드) ── */
.tbadge {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 11px; letter-spacing: 0.3px;
  color: #fff; background: var(--tc, var(--muted)); border-radius: 6px;
  padding: 3px 7px; min-width: 34px; line-height: 1.1; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.tbadge.kr-badge { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 0 1px var(--kr); }
.tbadge.tbd { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tbd-nm { color: var(--muted); font-style: italic; font-weight: 500; }
.m-badge { font-size: 11px; min-width: 38px; }
.coin-icon { width: 16px; height: 16px; vertical-align: middle; }

/* match row 강조 */
.m-row.kr .nm { color: #fff; }
.m-row.win .nm { color: #fff; font-weight: 700; }
.m-row.win .sc { color: var(--grass-2); }

/* ── MSI: bracket tree (가로 스크롤 컬럼) ── */
.bracket-scroll {
  overflow-x: auto; padding: 4px 2px 16px; margin-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: var(--line-bright) transparent;
}
.bracket-scroll::-webkit-scrollbar { height: 6px; }
.bracket-scroll::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 3px; }
.bracket-tree { display: flex; gap: 14px; align-items: flex-start; min-width: min-content; }
.bracket-col { display: flex; flex-direction: column; gap: 12px; min-width: 200px; }
.bcol-head {
  font-family: var(--disp); font-size: 10.5px; font-weight: 800; color: var(--grass-2);
  text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.bm {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 11px; transition: all 0.14s;
}
.bm.live { border-color: var(--grass-2); box-shadow: 0 0 0 1px var(--grass-2), 0 6px 20px var(--grass-glow); }
.bm.done { border-color: var(--line-bright); }
.bm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.bm-bo { font-family: var(--disp); font-size: 9.5px; font-weight: 800; color: var(--gold); letter-spacing: 0.4px; }
.bm-time { font-family: var(--disp); font-size: 10px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.bm-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-nm { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-sc { font-family: var(--disp); font-size: 16px; font-weight: 900; color: var(--muted); min-width: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.bm-row.win .bm-nm { color: #fff; font-weight: 800; }
.bm-row.win .bm-sc { color: var(--grass-2); }
.bm-row.lose .bm-nm, .bm-row.lose .bm-sc { color: var(--muted); opacity: 0.7; }
.bm-row.kr .bm-nm { text-shadow: 0 0 1px rgba(255,77,106,0.4); }
.bm-badge { font-size: 10px; min-width: 36px; }
.bm-note { margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--gold); font-weight: 600; text-align: center; }

/* ── MSI: 2-up pick grid (무승부 없음) ── */
.pred-opts.two { grid-template-columns: 1fr 1fr; }
.po-badge { font-size: 11px; min-width: 40px; margin-bottom: 2px; }

/* ── MSI: team hero / tab badges ── */
.hero-badge { font-size: 14px; min-width: 48px; padding: 5px 10px; vertical-align: middle; }
.kr-hero.gen { background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 22%, transparent), var(--surface) 70%); border-color: var(--tc); }
.tab-pin-badge { font-size: 10px; min-width: 32px; margin-right: 5px; }
.tab.tab-pin.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ════════ MSI 2026 — LoL Esports 각진 골드 프레임 폴리시 ════════
   헥스테크 골드 + 각진 컷코너 + 마젠타 라이브 에너지로 월드컵 레이아웃과 시각 분리 */

/* 브랜드 마크 — 각진 골드 인장 */
.brand-mark {
  background: linear-gradient(150deg, #f0d58c, #c8aa6e 58%, #a8843e);
  color: #1a1206; letter-spacing: 1px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  box-shadow: 0 6px 22px rgba(200,170,110,0.32), inset 0 1px 0 rgba(255,255,255,0.5);
}
.brand-text h1 { color: var(--text); text-shadow: 0 0 18px rgba(200,170,110,0.22); }

/* 탭 active = 골드, 굵은 밑줄 */
.tab.active { color: var(--grass-2); border-bottom-width: 3px; border-bottom-color: var(--gold); }
.tab.tab-game:not(.active) { color: var(--gold); }

/* 헤딩/상태 골드, 라이브는 마젠타 */
.tz-badge { color: var(--gold); }
.dot.live { background: var(--kr); box-shadow: 0 0 10px var(--kr); }
.m-status.live, .m-status.live::before { color: var(--kr); }
.date-chip.has-live::after { background: var(--kr); box-shadow: 0 0 8px var(--kr); }

/* 카드 골드 상단 헤어라인 */
.match, .pred-card, .bm, .group-card, .scorer-row, .lb-row { border-top: 1px solid rgba(200,170,110,0.20); }

/* 매치 카드 — 각진 컷코너(우상단/좌하단) + 마젠타 라이브(inset 글로우, clip 호환) */
.match { clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)); }
.match.kr { border-left: 3px solid var(--kr); }
.match.live-now { border-color: var(--kr); box-shadow: inset 0 0 0 1px var(--kr), inset 0 0 26px rgba(255,70,85,0.14); }
.m-row.win .sc { color: var(--grass-2); }

/* hero — 각진 골드 프레임 */
.kr-hero {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(200,170,110,0.15), var(--surface) 72%);
}
.kr-hero.gen { border-color: var(--gold); }
.kr-hero h2 { color: var(--text); }

/* 날짜 칩 active — 골드 그라데이션 */
.date-chip.active { background: linear-gradient(160deg, #f0d58c, #c8aa6e); border-color: #f0d58c; box-shadow: 0 8px 22px var(--grass-glow); }
.date-chip.active .dc-dow, .date-chip.active .dc-day, .date-chip.active .dc-mon { color: #1a1206; }
.date-chip.active .dc-cnt { background: rgba(0,0,0,0.22); color: #1a1206; }
.date-chip.today:not(.active) { border-color: var(--gold); }

/* 브래킷 — 골드 헤더, 마젠타 라이브, 골드 승자 */
.bcol-head { color: var(--gold); }
.bm.live { border-color: var(--kr); box-shadow: inset 0 0 0 1px var(--kr), 0 4px 16px rgba(255,70,85,0.18); }
.bm.done { border-color: var(--line-bright); }
.bm-row.win .bm-nm, .bm-row.win .bm-sc { color: var(--grass-2); }
.bm-bo { color: var(--gold); }

/* 예측/베팅 — 골드 시스템 */
.pred-opt.picked { background: rgba(200,170,110,0.16); border-color: var(--gold); color: var(--grass-2); }
.pred-opt.correct { background: rgba(200,170,110,0.18); border-color: var(--gold); color: var(--grass-2); }
.pred-card.next-up { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 4px 16px rgba(200,170,110,0.18); }
.psub.active { background: linear-gradient(150deg, #f0d58c, #c8aa6e); color: #1a1206; }
.nick-btn { background: linear-gradient(135deg, #f0d58c, #c8aa6e); color: #1a1206; }
.nick-btn:hover { box-shadow: 0 6px 20px var(--grass-glow); }
.tri-panel { background: linear-gradient(135deg, rgba(200,170,110,0.14), rgba(10,200,185,0.05)); border-color: var(--gold); }
.bet-next { background: var(--gold); color: #1a1206; }
.pb-go { background: var(--grass-2); color: #1a1206; }
.lb-row:first-child .lb-rank { color: var(--gold); }

/* ════════ MSI v2 — 히어로 / e스포츠 매치업 / 선수 / 로고 ════════ */

/* 팀 로고 슬롯 (img) — 없으면 .tbadge 폴백 */
/* ════════ MSI v3 — 셸 재설계 (슬림 탑바 · 하단 탭바 · 설정 시트) ════════ */
body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

/* 슬림 탑바 */
header.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap;
  padding: 9px clamp(14px, 4vw, 32px); position: sticky; top: 0; z-index: 30;
  background: rgba(8, 11, 18, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.tb-brand { display: flex; align-items: center; gap: 10px; }
.tb-mark {
  font-family: var(--disp); font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: -0.5px;
  color: #1a1206; background: linear-gradient(150deg, #f0d58c, #c8aa6e 60%, #a8843e); padding: 5px 9px; border-radius: 8px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  box-shadow: 0 3px 12px var(--grass-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.tb-mark-img { width: 34px; height: 34px; object-fit: contain; display: block; }
.tb-wm { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.tb-yr { font-family: var(--disp); font-weight: 800; font-size: 15px; color: var(--text); }
.tb-loc { font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: 0.7px; }
.tb-dot-wrap { margin-left: 2px; display: inline-flex; }
.tb-set {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-bright); flex-shrink: 0;
  background: var(--surface); color: var(--gold); font-size: 18px; cursor: pointer; transition: all 0.18s;
}
.tb-set:hover { border-color: var(--gold); }
.tb-set.on { background: rgba(200,170,110,0.14); border-color: var(--gold); transform: rotate(60deg); }

/* 설정 시트 */
.settings-sheet {
  position: sticky; top: 56px; z-index: 29; margin: 8px clamp(14px, 4vw, 32px) 0;
  background: var(--surface); border: 1px solid var(--gold); border-radius: 14px; padding: 4px 15px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45); animation: fadeUp 0.18s ease-out;
}
.ss-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; }
.ss-row + .ss-row { border-top: 1px solid var(--line); }
.ss-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ss-val { font-size: 12.5px; color: var(--text); font-weight: 600; }

/* 하단 고정 탭바 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 2px;
  padding: 6px clamp(8px, 3vw, 20px) calc(6px + env(safe-area-inset-bottom));
  background: rgba(8, 11, 18, 0.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .tab {
  flex: 1 1 0; min-width: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative; background: none; border: none; padding: 7px 4px; cursor: pointer;
  color: var(--muted); transition: all 0.14s; border-radius: 11px; white-space: nowrap;
}
.tabbar .tab:hover { color: var(--text); }
.tabbar .tab.active { color: var(--gold); background: rgba(200,170,110,0.11); border-bottom: none; }
.tabbar .tab.tab-game:not(.active) { color: var(--gold); }
.tabbar .tab.tab-game::after {
  content: ""; position: absolute; top: 5px; right: calc(50% - 16px); width: 6px; height: 6px;
  border-radius: 50%; background: var(--kr); box-shadow: 0 0 6px var(--kr); animation: pulse-dot 1.4s infinite;
}
.tab-ic { font-size: 19px; line-height: 1; display: flex; align-items: center; justify-content: center; height: 22px; }
/* 프로 SVG 아이콘 (마스크 → currentColor로 컬러링) */
.tab-svg { width: 23px; height: 23px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.ic-schedule { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E"); }
.ic-bracket { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='13' y='4' width='8' height='6' rx='1'/%3E%3Crect x='13' y='14' width='8' height='6' rx='1'/%3E%3Cpath d='M13 7H8v10h5M8 12H3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='13' y='4' width='8' height='6' rx='1'/%3E%3Crect x='13' y='14' width='8' height='6' rx='1'/%3E%3Cpath d='M13 7H8v10h5M8 12H3'/%3E%3C/svg%3E"); }
.ic-players { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20.5a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20.5a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.ic-predict { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.ic-teams { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 2.5v5.5c0 4.5-3 7.6-7 9-4-1.4-7-4.5-7-9V5.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 2.5v5.5c0 4.5-3 7.6-7 9-4-1.4-7-4.5-7-9V5.5z'/%3E%3C/svg%3E"); }
.tab-lb { font-family: var(--disp); font-size: 10.5px; font-weight: 700; letter-spacing: 0.2px; }
.tabbar .tab.active .tab-lb { font-weight: 800; }
.tabbar .tab.tab-pin .tab-ic .tlogo.tab-pin-badge, .tabbar .tab.tab-pin .tab-ic .tbadge.tab-pin-badge { width: 22px; height: 22px; min-width: 22px; padding: 1px; font-size: 8px; }
.tabbar .tab.tab-pin.active { color: var(--gold); }

/* 슬림 탑바에 맞춰 main/footer 여백 조정 */
main { padding-top: 18px; }
footer { margin-bottom: 6px; border-top: 1px solid var(--line); }

/* 팀 로고 슬롯 (img) — 없으면 .tbadge 폴백 */
.tlogo { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; overflow: hidden; padding: 3px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.tlogo.kr-badge { box-shadow: inset 0 0 0 1px var(--kr); }
.tlogo-img { width: 100%; height: 100%; object-fit: contain; }
.tlogo.em-logo { width: 46px; height: 46px; }
.tlogo.mq-badge { width: 58px; height: 58px; }
.tlogo.bm-badge { width: 30px; height: 30px; }
.tlogo.hero-badge { width: 52px; height: 52px; }
.tlogo.rc-badge { width: 30px; height: 30px; }
.tlogo.po-badge { width: 30px; height: 30px; margin-bottom: 3px; }

/* ── 히어로 마퀴 ── */
.marquee {
  background: linear-gradient(135deg, rgba(200,170,110,0.13), rgba(10,200,185,0.04) 55%, var(--surface) 100%);
  border: 1px solid var(--line-bright); border-top: 2px solid var(--gold);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; position: relative; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.mq-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mq-title { display: flex; align-items: baseline; gap: 7px; }
.mq-logo { font-family: var(--disp); font-weight: 900; font-size: 26px; font-style: italic; letter-spacing: -0.5px; color: var(--gold); text-shadow: 0 0 18px var(--grass-glow); }
.mq-year { font-family: var(--disp); font-weight: 800; font-size: 18px; color: var(--text); }
.mq-stage { font-family: var(--disp); font-size: 11.5px; font-weight: 800; color: var(--grass-2); text-transform: uppercase; letter-spacing: 0.5px; background: rgba(200,170,110,0.12); border: 1px solid rgba(200,170,110,0.3); border-radius: 20px; padding: 5px 12px; }
.mq-label { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.mq-tag { font-family: var(--disp); font-size: 11px; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase; background: var(--gold); color: #1a1206; border-radius: 7px; padding: 3px 9px; }
.mq-tag.live { background: var(--kr); color: #fff; animation: pulse 1.4s infinite; }
.mq-when { font-size: 12px; color: var(--muted); font-weight: 600; }
.mq-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.mq-team { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; min-width: 0; }
.mq-tn { font-family: var(--disp); font-size: 17px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mq-team.kr .mq-tn { color: #fff; }
.mq-reg { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.mq-center { display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.mq-vs { font-family: var(--disp); font-size: 18px; font-weight: 900; color: var(--muted); letter-spacing: 1px; }
.mq-score { font-family: var(--disp); font-size: 26px; font-weight: 900; color: var(--grass-2); font-variant-numeric: tabular-nums; }
.mq-countdown { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.mq-cd-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.mq-cd-val { font-family: var(--disp); font-size: 22px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.mq-done { text-align: center; font-family: var(--disp); font-size: 18px; font-weight: 800; color: var(--gold); padding: 16px; }
.mq-badge.tbd, .em-logo.tbd, .bm-badge.tbd { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; }
.mq-badge.tbd { width: 58px; height: 58px; font-size: 22px; }

/* ── e스포츠 매치업 카드 (.match 오버라이드) ── */
.match {
  display: flex; flex-direction: column; gap: 11px; grid-template-columns: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 16px; margin-bottom: 9px; transition: all 0.15s;
}
.match:hover { border-color: var(--line-bright); transform: none; }
.match.done { opacity: 0.96; }
.em-head { display: flex; align-items: center; gap: 9px; }
.em-round { font-family: var(--disp); font-size: 11px; font-weight: 800; color: var(--grass-2); text-transform: uppercase; letter-spacing: 0.3px; }
.em-bo { font-family: var(--disp); font-size: 10px; font-weight: 800; color: var(--gold); background: rgba(200,170,110,0.12); border-radius: 5px; padding: 1px 6px; }
.em-time { font-family: var(--disp); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.em-status { margin-left: auto; font-family: var(--disp); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; }
.em-status.ft { color: var(--muted); }
.em-status.live { color: var(--kr); }
.em-status.live::before { content: "● "; }
.em-status.upcoming { color: var(--gold); }
.em-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.em-side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.em-nm { font-family: var(--disp); font-size: 14px; font-weight: 700; color: var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.em-side.win .em-nm { color: var(--grass-2); font-weight: 900; }
.em-side.kr .em-nm { color: #fff; }
.em-side.win.kr .em-nm { color: var(--grass-2); }
.em-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 4px; }
.em-score { font-family: var(--disp); font-size: 24px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.em-vs { font-family: var(--disp); font-size: 15px; font-weight: 900; color: var(--muted); letter-spacing: 1px; }
.em-logo.tbd { width: 46px; height: 46px; font-size: 20px; }
/* 게임 핍 (BO 시리즈 승수) */
.pips { display: inline-flex; gap: 4px; }
.pip { width: 7px; height: 7px; border-radius: 50%; background: var(--line-bright); }
.pip.on { background: var(--muted); }
.pip.on.win { background: var(--grass-2); box-shadow: 0 0 6px var(--grass-glow); }
.em-foot { display: flex; gap: 7px; justify-content: center; padding-top: 4px; }
.em-foot .yt-link, .em-foot .cz-link { padding: 4px 10px; font-size: 11px; }

/* next 배지 (팀 페이지) */
.em-head .next-badge { margin-left: 6px; }

/* ── 선수 탭 / 로스터 ── */
.roster-note { font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.pos-filter { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.posf { font-family: var(--disp); font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; cursor: pointer; transition: all 0.14s; }
.posf:hover { border-color: var(--line-bright); color: var(--text); }
.posf.active { background: color-mix(in srgb, var(--pc, var(--gold)) 18%, transparent); border-color: var(--pc, var(--gold)); color: var(--text); }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.roster-card { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--tc, var(--line-bright)); border-radius: 14px; overflow: hidden; }
.roster-card.kr { box-shadow: inset 0 0 0 1px rgba(255,70,85,0.18); }
.rc-head { display: flex; align-items: center; gap: 9px; padding: 12px 15px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rc-name { font-family: var(--disp); font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.rc-reg { font-size: 11px; color: var(--muted); font-weight: 600; }
.rc-empty { padding: 18px; text-align: center; color: var(--muted); }
.player-row { display: flex; align-items: center; gap: 11px; padding: 9px 15px; }
.player-row + .player-row { border-top: 1px solid var(--line); }
.pl-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.pl-avatar.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--pc, var(--surface-2)); color: #fff; font-family: var(--disp); font-weight: 900; font-size: 14px; }
.pl-avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.pl-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pl-ign { font-family: var(--disp); font-size: 14px; font-weight: 700; color: var(--text); }
.pl-team { font-size: 11px; color: var(--muted); }
.pl-pos { font-family: var(--disp); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: #fff; background: var(--pc, var(--muted)); border-radius: 6px; padding: 3px 8px; }

/* 팀 페이지 로스터 라인 (5칸) */
.team-roster { margin-bottom: 8px; }
.roster-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rl-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 6px; }
.rl-pos { font-family: var(--disp); font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: #fff; background: var(--pc, var(--muted)); border-radius: 5px; padding: 2px 7px; }
.rl-ign { font-family: var(--disp); font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 560px) {
  .roster-line { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .rl-cell { padding: 10px 2px; }
  .rl-ign { font-size: 10.5px; }
  .pl-avatar.lg { width: 36px; height: 36px; font-size: 15px; }
}

/* ════════ a11y + 폴리시 (리뷰 라운드 1) ════════ */
/* 키보드 포커스 링 — 전 인터랙티브 요소 (이전엔 outline:none만 있고 focus 표시 0) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.tz-badge:focus-visible, .country-select:focus-visible, .filter-search:focus-visible, .nick-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
/* 44px 터치 타깃 (모바일) */
.tabbar .tab { min-height: 50px; padding: 8px 4px; }
.tb-set { width: 44px; height: 44px; }
.pb-x { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.bet-step { width: 46px; height: 46px; }
/* 잔여 그린 액센트 → 골드 (accent discipline: 골드=상태, 마젠타=라이브, 그린=이득만) */
.bet-hint { background: rgba(200,170,110,0.07); border-color: rgba(200,170,110,0.22); }
.avail-bar { color: var(--gold); }
.fchip.active { background: rgba(200,170,110,0.13); border-color: var(--gold); color: var(--grass-2); }
/* twemoji 국기 — 이모지 폰트 없는 PC서 SVG로 렌더 */
img.emoji { height: 1em; width: 1em; vertical-align: -0.125em; margin: 0 0.05em; display: inline-block; }

/* ════════ 폴리시 라운드 (시각/모바일 비평 반영) ════════ */
/* 스켈레톤 로딩 — 빈 "Loading…" 텍스트 대신 카드형 + shimmer */
.skel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden; margin-bottom: 9px; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(240,213,140,0.07) 50%, transparent 80%); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-mq { height: 152px; border-top: 2px solid var(--line-bright); margin-bottom: 16px; }
.skel-match { height: 86px; }

/* 리더보드 긴 스크롤 — 인원수 / 내 행 구분 / 더 보기 */
.lb-count { font-family: var(--disp); font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.lb-sep { text-align: center; color: var(--muted); font-size: 14px; letter-spacing: 3px; padding: 3px 0; }
.lb-more { display: block; width: 100%; margin-top: 10px; background: var(--surface); border: 1px solid var(--line-bright); color: var(--gold); font-family: var(--disp); font-weight: 700; font-size: 13px; padding: 12px; border-radius: 12px; cursor: pointer; transition: all 0.14s; }
.lb-more:hover { border-color: var(--gold); background: rgba(200,170,110,0.08); }

/* 매치 카드 — 터치/hover 반응 (이전엔 transform:none으로 무반응) */
.match:hover { border-color: var(--line-bright); box-shadow: 0 4px 16px rgba(0,0,0,0.3); transform: translateY(-1px); }

/* VS — 회색(disabled처럼 보임) → 골드 에너지 */
.mq-vs, .em-vs { color: var(--gold); opacity: 0.85; }

/* 팀 hero 타이틀 — 본문과 같은 흰색이라 위계 약함 → 글로우 복원 */
.kr-hero h2 { text-shadow: 0 0 18px var(--grass-glow); }

/* 브래킷 가로스크롤 — 더 있다는 affordance(우측 페이드) */
.bracket-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }

/* 마퀴 — 모바일서 above-the-fold 공간 절약 */
@media (max-width: 480px) {
  .marquee { padding: 14px 16px; margin-bottom: 14px; }
  .mq-top { margin-bottom: 10px; }
  .mq-label { margin-bottom: 10px; }
  .mq-countdown { margin-top: 11px; padding-top: 10px; }
  .mq-logo { font-size: 23px; }
  .mq-cd-val { font-size: 20px; }
}
/* 에러 retry 버튼 */
.retry-btn { margin-top: 14px; background: linear-gradient(135deg, #f0d58c, #c8aa6e); color: #1a1206; font-family: var(--disp); font-weight: 800; font-size: 14px; padding: 10px 24px; border: none; border-radius: 10px; cursor: pointer; transition: box-shadow 0.12s; }
.retry-btn:hover { box-shadow: 0 4px 14px var(--grass-glow); }
/* 모션 민감 사용자 — 무한 애니메이션 정지 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ════ 공유 버튼 + 토스트 ════ */
.tb-actions { display: inline-flex; align-items: center; gap: 8px; }
.tb-share { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-bright); background: var(--surface); color: var(--gold); cursor: pointer; transition: all 0.18s; display: inline-flex; align-items: center; justify-content: center; }
.tb-share:hover { border-color: var(--gold); }
.tb-share .tab-svg { width: 19px; height: 19px; }
.ic-share { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.5 1.5'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.5-1.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.5 1.5'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.5-1.5'/%3E%3C/svg%3E"); }
.toast { position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); z-index: 50; background: linear-gradient(135deg, #f0d58c, #c8aa6e); color: #1a1206; font-family: var(--disp); font-weight: 800; font-size: 13px; padding: 10px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
