:root {
  --bg: #070b09;
  --surface: #0e1512;
  --surface-2: #16201b;
  --line: #233029;
  --line-bright: #35513f;
  --text: #eaf2ec;
  --muted: #8aa094;
  --grass: #19c463;
  --grass-2: #2ee87a;
  --grass-glow: rgba(46, 232, 122, 0.35);
  --lime: #c5fa4a;
  --gold: #ffcf4a;
  --silver: #c6d2cb;
  --bronze: #d98f4e;
  --kr: #ff4d5e;
  --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(120% 60% at 50% -10%, rgba(25, 196, 99, 0.16), transparent 60%),
    radial-gradient(80% 40% at 100% 0%, rgba(197, 250, 74, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
/* 잔디 줄무늬 (희미한 필드 라인) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 78px, rgba(255,255,255,0.012) 78px 156px);
}
/* 그레인 오버레이 */
.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: 40px; line-height: 0.8;
  color: var(--bg); background: linear-gradient(160deg, var(--grass-2), var(--grass));
  padding: 8px 10px 6px; border-radius: 12px; letter-spacing: -2px;
  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); }
.m-min { color: var(--lime); font-weight: 800; }
.bet-live { color: var(--lime); font-weight: 800; }
.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; min-height: 36px; 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 (승부예측) ── */
.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; }
.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; }
.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); } }
.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.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: 4px; right: 5px; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; 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 */
.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; }
.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; }
}
@media (max-width: 430px) {
  .filter-search, .country-select, .nick-input { font-size: 16px; } /* iOS focus 시 자동 줌 방지 (16px 미만이면 줌) */
}
@media (max-width: 380px) {
  .pred-opt { padding: 9px 4px; font-size: 11.5px; }
  .po-name { font-size: 10.5px; }
  .group-card table { table-layout: fixed; width: 100%; }
  .group-card td.team-col, .group-card th.team-col { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ════════ WC 2026 — 셸 재설계 (슬림 탑바 · 하단 탭바 · 설정 시트) ════════
   MSI 모바일 셸 구조 흡수 — 색은 월드컵 jadegreen 톤 유지 */
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(7, 11, 9, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.tb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-mark {
  font-family: var(--disp); font-weight: 900; font-size: 22px; line-height: 0.85; letter-spacing: -1.5px;
  color: var(--bg); background: linear-gradient(160deg, var(--grass-2), var(--grass)); padding: 7px 8px 5px; border-radius: 9px;
  box-shadow: 0 3px 12px var(--grass-glow), inset 0 1px 0 rgba(255,255,255,0.4); flex-shrink: 0;
}
.tb-wm { display: flex; flex-direction: column; line-height: 1; gap: 2px; min-width: 0; }
.tb-yr { font-family: var(--disp); font-weight: 900; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.tb-loc { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-dot-wrap { margin-left: 2px; display: inline-flex; flex-shrink: 0; }
.tb-set {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-bright); flex-shrink: 0;
  background: var(--surface); color: var(--grass-2); font-size: 18px; cursor: pointer; transition: all 0.18s;
}
.tb-set:hover { border-color: var(--grass); }
.tb-set.on { background: rgba(46,232,122,0.12); border-color: var(--grass); 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(--grass); 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(7, 11, 9, 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(--grass-2); background: rgba(46,232,122,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-standings { -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%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cline x1='4' y1='18' x2='20' y2='18'/%3E%3Ccircle cx='4' cy='6' r='0.6' fill='%23000'/%3E%3Ccircle cx='4' cy='12' r='0.6' fill='%23000'/%3E%3Ccircle cx='4' cy='18' r='0.6' fill='%23000'/%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%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cline x1='4' y1='18' x2='20' y2='18'/%3E%3Ccircle cx='4' cy='6' r='0.6' fill='%23000'/%3E%3Ccircle cx='4' cy='12' r='0.6' fill='%23000'/%3E%3Ccircle cx='4' cy='18' r='0.6' fill='%23000'/%3E%3C/svg%3E"); }
.ic-scorers { -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-country { -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='M5 21V4M5 4c3-1.6 6 1.6 9 0v8c-3 1.6-6-1.6-9 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%3Cpath d='M5 21V4M5 4c3-1.6 6 1.6 9 0v8c-3 1.6-6-1.6-9 0'/%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.tab-pin-flag { font-size: 18px; height: 22px; }
.tabbar .tab.tab-pin.active { color: var(--gold); }

/* 슬림 탑바에 맞춰 main/footer 여백 조정 */
main { padding-top: 18px; }
