/*! 꼬마일레븐 FC v27 — 현대 전술 축구 RPG · 모바일 UI (style.css) */
:root {
  --bg: #08231e;
  --bg2: #0d332c;
  --panel: #0f2f28;
  --panel2: #143a31;
  --card: #fbf9f2;
  --card2: #f1ecdd;
  --card3: #e6e0cd;
  --ink: #14211c;
  --ink2: #5c6b62;
  --ink3: #8b978d;
  --line: #e4ddcb;
  --line2: rgba(255, 255, 255, 0.08);
  --lime: #c8f169;
  --lime2: #a6d84c;
  --lime-d: #2f5410;
  --gold: #f0c15a;
  --coral: #ef6a52;
  --sky: #57a9e0;
  --violet: #9a7be0;
  --green: #2f8f62;
  --red: #d9483a;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  --shadow2: 0 2px 8px rgba(16, 41, 34, 0.10);
  --r: 16px;
  --font: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  overflow: hidden;
  background: #061a16;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none; -webkit-user-select: none;
}
body { display: flex; justify-content: center; }
button, input, select { font-family: inherit; }
img { -webkit-user-drag: none; }

#app {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 430px;
  height: 100vh; height: 100dvh;
  background:
    radial-gradient(90% 40% at 50% 0%, #165043 0%, #0b2b24 55%, #061a16 100%);
  overflow: hidden;
}
#app::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(200, 241, 105, 0.035) 0 1px, transparent 1px 26px);
  opacity: .9;
}

/* ───────── 상단 바 ───────── */
.topbar {
  position: relative; z-index: 5;
  flex: 0 0 auto;
  height: 54px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: rgba(6, 26, 22, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 241, 105, .14);
}
.tb-club { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1 1 auto; }
.tb-emblem {
  width: 30px; height: 34px; flex: 0 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.tb-txt { min-width: 0; }
.tb-name {
  font-size: 12.5px; font-weight: 800; color: #f2f7e8; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 132px;
}
.tb-sub { font-size: 9.5px; color: rgba(232, 246, 220, .58); letter-spacing: .3px; }
.tb-chips { display: flex; gap: 5px; flex: 0 0 auto; }
.tb-chip {
  display: flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 9px; border-radius: 13px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #e9f4dd; font-size: 11px; font-weight: 700;
}
.tb-chip svg { width: 13px; height: 13px; stroke: var(--lime); fill: none; stroke-width: 1.9; }
.tb-chip.gold svg { stroke: var(--gold); }

/* ───────── 본문 ───────── */
main {
  position: relative; z-index: 1;
  flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 10px 11px 16px;
}
.screen { display: none; animation: fadein .22s ease; }
.screen.on { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ───────── 카드 · 공통 ───────── */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--r);
  padding: 12px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card.dark {
  background: linear-gradient(160deg, #143a31, #0d2a24);
  border-color: rgba(200, 241, 105, .16);
  color: #e9f4dd;
}
.card.tight { padding: 9px 10px; }
.card-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
}
.card-head b {
  font-size: 12.5px; font-weight: 800; letter-spacing: -.2px;
}
.card-head .meta {
  margin-left: auto; font-size: 9.5px; color: var(--ink3); font-weight: 600;
  letter-spacing: .2px;
}
.card.dark .card-head .meta { color: rgba(233, 244, 221, .5); }
.card-head .dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--lime2);
  box-shadow: 0 0 0 3px rgba(166, 216, 76, .18);
}
.sec {
  display: flex; align-items: center; gap: 7px;
  margin: 14px 2px 7px;
}
.sec b { font-size: 11px; font-weight: 800; color: rgba(233, 244, 221, .82); letter-spacing: .6px; }
.sec i { flex: 1 1 auto; height: 1px; background: rgba(255,255,255,.10); }
.muted { color: var(--ink2); }
.tiny { font-size: 10px; line-height: 1.5; }
.sm { font-size: 11px; }
.b { font-weight: 700; }
.row { display: flex; align-items: center; gap: 6px; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }

.chip {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 8px; border-radius: 10px;
  background: #eee9d9; color: var(--ink2);
  font-size: 9.5px; font-weight: 700; letter-spacing: .2px;
  white-space: nowrap;
}
.chip.lime { background: rgba(200, 241, 105, .35); color: #325a12; }
.chip.dark { background: rgba(255,255,255,.08); color: #dff0cf; }
.chip.gold { background: rgba(240, 193, 90, .3); color: #7a5410; }
.chip.coral { background: rgba(239, 106, 82, .18); color: #a53a26; }
.chip.sky { background: rgba(87, 169, 224, .2); color: #26648f; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 38px; padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #f2eddd; color: var(--ink);
  font-size: 12px; font-weight: 800; letter-spacing: -.2px;
  cursor: pointer;
  transition: transform .08s ease, filter .12s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .42; pointer-events: none; }
.btn.primary {
  background: linear-gradient(180deg, #d6fb8a, #a8da4e);
  border-color: rgba(120, 170, 40, .5); color: #1e3a08;
  box-shadow: 0 4px 12px rgba(168, 218, 78, .35);
}
.btn.dark {
  background: linear-gradient(180deg, #1d4a3d, #123029);
  border-color: rgba(200, 241, 105, .25); color: #e6f7d2;
}
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink2); }
.btn.red { background: linear-gradient(180deg, #f58270, #dd5744); border-color: #c34b3a; color: #fff; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 10.5px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.kpi { background: var(--card2); padding: 8px 6px; text-align: center; }
.kpi b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.kpi span { font-size: 9px; color: var(--ink3); font-weight: 700; letter-spacing: .3px; }
.kpi b.lime { color: #4f7d13; }
.kpi b.coral { color: #b8452f; }
.kpi b.sky { color: #2a6b97; }
.card.dark .kpis { background: rgba(255,255,255,.10); }
.card.dark .kpi { background: rgba(9, 34, 28, .55); }
.card.dark .kpi b { color: #eafbd2; }
.card.dark .kpi b.lime { color: var(--lime); }
.card.dark .kpi span { color: rgba(233, 244, 221, .52); }

.bar { height: 5px; border-radius: 3px; background: rgba(20, 33, 28, .12); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a6d84c, #c8f169); }
.card.dark .bar { background: rgba(255, 255, 255, .12); }

/* ───────── 홈 히어로 ───────── */
.hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(200, 241, 105, .16);
  background: #0b2b24;
}
.hero-img { display: block; width: 100%; height: 166px; object-fit: cover; object-position: 68% 38%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(4, 22, 18, .96) 0%, rgba(4, 22, 18, .86) 38%, rgba(4, 22, 18, .12) 76%, rgba(4, 22, 18, 0) 100%);
}
.hero-in {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px 13px;
}
.hero-kicker {
  font-size: 7.5px; font-weight: 800; letter-spacing: 1.4px; line-height: 1.1;
  color: var(--lime); margin-bottom: 9px; opacity: .95;
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
}
.hero-title {
  margin: 0 0 5px;
  font-size: 19px; font-weight: 900; letter-spacing: -1.2px; line-height: 1.05;
  color: #f4fbe9; text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero-sub { font-size: 9.5px; color: rgba(233, 244, 221, .78); letter-spacing: .1px; }
.hero-in { padding: 12px 13px 14px; }
.hero-badge {
  position: absolute; right: 12px; top: 11px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px 5px 6px; border-radius: 12px;
  background: rgba(5, 24, 20, .72);
  border: 1px solid rgba(200, 241, 105, .22);
  font-size: 10px; font-weight: 800; color: #e9f4dd;
}
.hero-badge svg { width: 13px; height: 13px; stroke: var(--lime); fill: none; stroke-width: 2; }

/* 클럽 카드 */
.club-line { display: flex; align-items: center; gap: 10px; }
.club-emblem { width: 46px; height: 52px; flex: 0 0 auto; }
.club-meta { flex: 1 1 auto; min-width: 0; }
.club-meta .nm { font-size: 14px; font-weight: 900; letter-spacing: -.4px; }
.club-meta .sub { font-size: 9.5px; color: var(--ink3); margin-top: 1px; }
.stars { color: #d9a427; font-size: 10px; letter-spacing: 1px; }
.stars i { font-style: normal; color: #d8d2c0; opacity: .45; }
.rank-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(160deg, #123a31, #0b2a24);
  color: var(--lime); font-weight: 900; font-size: 17px; line-height: 1;
}
.rank-badge span { font-size: 7.5px; color: rgba(233,244,221,.6); margin-top: 2px; letter-spacing: .5px; }

/* 다음 경기 */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 4px 0 8px; }
.vs-team { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.vs-team canvas { width: 38px; height: 44px; }
.vs-team .nm { font-size: 10px; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vs-team .st { font-size: 8.5px; color: var(--ink3); font-weight: 700; }
.vs-mid { text-align: center; padding: 0 4px; }
.vs-mid b { display: block; font-size: 15px; font-weight: 900; color: var(--ink2); letter-spacing: -.5px; }
.vs-mid span { font-size: 8.5px; color: var(--ink3); font-weight: 700; }

/* ───────── 순위표 ───────── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-size: 8.5px; font-weight: 800; color: var(--ink3); letter-spacing: .4px;
  text-align: center; padding: 0 0 4px; border-bottom: 1px solid var(--line);
}
.tbl td { font-size: 10.5px; padding: 5px 0; border-bottom: 1px solid rgba(228, 221, 203, .6); text-align: center; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.tm { text-align: left; font-weight: 700; padding-left: 3px; }
.tbl td.rk { width: 20px; color: var(--ink3); font-weight: 800; }
.tbl td.pts { font-weight: 900; }
.tbl tr.me td { color: #3d6b12; font-weight: 800; }
.tbl tr.me td.rk { color: #4f7d13; }
.tbl tr.me { background: rgba(200, 241, 105, .18); }

/* ───────── 전술 판 ───────── */
.fscroll { display: flex; gap: 6px; overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: none; }
.fscroll::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; min-width: 62px;
  padding: 6px 9px 5px; border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(233, 244, 221, .74);
  text-align: left; cursor: pointer;
}
.fchip b { display: block; font-size: 12px; font-weight: 900; letter-spacing: -.4px; }
.fchip span { display: block; font-size: 7.5px; font-weight: 700; opacity: .7; margin-top: 1px; letter-spacing: .2px; white-space: nowrap; }
.fchip.on {
  background: linear-gradient(160deg, #d6fb8a, #a8da4e);
  border-color: rgba(140, 190, 50, .6); color: #1d3b07;
  box-shadow: 0 4px 14px rgba(166, 216, 76, .28);
}
.fchip.on span { opacity: .78; }
/* v14 — 감독 전용 변칙 포메이션 칩 */
.fchip.anom {
  border-color: rgba(178, 146, 255, .45);
  background: linear-gradient(160deg, rgba(138, 92, 214, .24), rgba(74, 168, 224, .14));
}
.fchip.anom b { color: #dcc9ff; }
.fchip.anom span { color: rgba(220, 201, 255, .8); opacity: .85; }
.fchip.anom.on {
  background: linear-gradient(160deg, #e0ccff, #a88cf5);
  border-color: rgba(138, 92, 214, .72);
  box-shadow: 0 4px 14px rgba(138, 92, 214, .32);
}
.fchip.anom.on b { color: #241436; }
.fchip.anom.on span { color: rgba(36, 20, 54, .8); opacity: .9; }

.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 5.55;
  max-height: 392px;
  border-radius: 14px;
  overflow: hidden;
  background: #0d3b32;
  border: 1px solid rgba(200, 241, 105, .14);
}
.pitch canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pitch-head {
  position: absolute; left: 8px; top: 7px; z-index: 3;
  display: flex; gap: 4px; align-items: center;
  padding: 3px 8px; border-radius: 9px;
  background: rgba(4, 24, 20, .62);
  border: 1px solid rgba(200, 241, 105, .18);
  font-size: 8.5px; font-weight: 800; color: #dff2cb; letter-spacing: .2px;
}
.pitch-head em { font-style: normal; color: var(--lime); }

.tok {
  position: absolute; z-index: 2;
  width: 48px; margin-left: -24px; margin-top: -21px;
  background: none; border: none; padding: 0;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  overflow: visible;
}
.tok .ring {
  width: 37px; height: 37px; border-radius: 50%;
  background: #e8e4d5;
  border: 2px solid #cfc7ae;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .38);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.tok .ring img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; display: block; }
.tok.r-dong .ring { border-color: #b8792f; }
.tok.r-eun .ring { border-color: #8e9aa6; }
.tok.r-geum .ring { border-color: #d9a427; }
.tok.r-legend .ring { border-color: #9a6ce0; box-shadow: 0 0 0 2px rgba(154, 108, 224, .35), 0 3px 10px rgba(0,0,0,.4); }
.tok.sel .ring { outline: 2px solid var(--lime); outline-offset: 1px; }
.tok .nm {
  margin-top: 1px; max-width: 48px;
  padding: 1px 4px; border-radius: 6px;
  background: rgba(4, 24, 20, .78);
  color: #eaffd2; font-size: 7.5px; font-weight: 800; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tok .rl {
  position: absolute; top: -2px; right: 0;
  padding: 0 3px; border-radius: 5px;
  background: var(--lime); color: #1d3b07;
  font-size: 6.5px; font-weight: 900; letter-spacing: .2px;
}
.tok.empty .ring { background: rgba(255,255,255,.10); border-style: dashed; border-color: rgba(200,241,105,.5); }
.tok.empty .ring::after { content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--lime); font-size: 18px; font-weight: 300; }
.tok.empty .nm { color: rgba(233,244,221,.6); }
.tok .key { position: absolute; left: 0; top: -2px; font-size: 7px; color: var(--gold); }

/* 벤치 · 선수 카드 */
.hcards { display: flex; gap: 6px; overflow-x: auto; padding: 1px 0 3px; scrollbar-width: none; }
.hcards::-webkit-scrollbar { display: none; }
.pcard {
  flex: 0 0 auto; width: 78px;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 5px 4px 4px;
  text-align: center; cursor: pointer;
}
.pcard.sel { border-color: var(--lime2); box-shadow: 0 0 0 2px rgba(166,216,76,.35); }
.pcard .ph { display: block; width: 46px; height: 46px; margin: 0 auto 3px; border-radius: 50%; overflow: hidden; background: #e6e1d1; border: 2px solid #d5cfbd; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; }
.pcard .pn { display: block; font-size: 9.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pm { display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 1px; font-size: 8px; color: var(--ink3); font-weight: 700; }
.pcard .ov { font-size: 11px; font-weight: 900; letter-spacing: -.3px; }
.pcard .mini { height: 3px; border-radius: 2px; background: rgba(20,33,28,.12); margin-top: 3px; overflow: hidden; }
.pcard .mini i { display: block; height: 100%; background: var(--lime2); }

.deckgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.deckcard {
  width: auto; height: 68px;
  padding: 6px; border-radius: 11px;
  background: linear-gradient(165deg, #1b463b, #0e2b25);
  border: 1px solid rgba(255, 255, 255, .13);
  color: #e9f4dd; overflow: hidden; position: relative;
}
.deckcard::after { content: ""; position: absolute; right: -20px; top: -20px; width: 44px; height: 44px; border-radius: 50%; background: var(--cc, #c8f169); opacity: .13; }
.deckcard .tg { font-size: 6.5px; font-weight: 900; letter-spacing: .4px; color: var(--cc, var(--lime)); white-space: nowrap; }
.deckcard .nm { display: block; font-size: 8.5px; font-weight: 900; letter-spacing: -.4px; line-height: 1.18; margin-top: 3px; height: 21px; overflow: hidden; color: #eef8e2; }
.deckcard .mt { position: absolute; left: 6px; bottom: 6px; font-size: 7px; font-weight: 800; color: rgba(233,244,221,.5); letter-spacing: .3px; }
.deckcard .mt em { font-style: normal; color: var(--lime); font-size: 8.5px; }

/* 포지션 뱃지 */
.pb {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 15px; padding: 0 4px;
  border-radius: 5px; font-size: 8px; font-weight: 900; letter-spacing: .2px;
  color: #fff;
}
.pb.gk { background: #2f6f9e; }
.pb.df { background: #2f6fbf; }
.pb.mf { background: #2f8f4a; }
.pb.fw { background: #b93c2c; }

/* ───────── 매치 ───────── */
.sb {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 4px;
  padding: 9px 10px;
  border-radius: 14px;
  background: linear-gradient(160deg, #143a31, #0a2620);
  border: 1px solid rgba(200, 241, 105, .16);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.sb-team { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sb-team.away { flex-direction: row-reverse; }
.sb-team canvas { width: 22px; height: 26px; flex: 0 0 auto; }
.sb-name { font-size: 9.5px; font-weight: 800; color: #e6f5d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-score { display: flex; align-items: baseline; gap: 4px; }
.sb-score b { font-size: 24px; font-weight: 900; color: #f4fbe9; letter-spacing: -1.5px; line-height: 1; }
.sb-score i { font-style: normal; color: rgba(233,244,221,.45); font-size: 13px; }
.sb-clock { display: block; text-align: center; font-size: 8.5px; color: var(--lime); font-weight: 800; letter-spacing: .5px; }

.pitch-wrap { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 8px; border: 1px solid rgba(200,241,105,.14); background: #0d3b32; }
#m-pitch { display: block; width: 100%; height: 340px; }
/* 경기 화면: 남는 세로 공간을 피치가 차지한다 (중계석이 잘리지 않도록) */
#screen-match.on { display: flex; flex-direction: column; height: 100%; }
#screen-match.on > .pitch-wrap { flex: 1 1 auto; min-height: 200px; }
#screen-match.on #m-pitch { height: 100%; }
#m-banner { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; pointer-events: none; }
#m-banner.on { display: flex; animation: gb .5s ease; }
@keyframes gb { from { transform: scale(1.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.gb-text {
  font-size: 34px; font-weight: 900; letter-spacing: -2px; color: #fff;
  text-shadow: 0 0 18px rgba(200,241,105,.9), 0 4px 14px rgba(0,0,0,.6);
  font-style: italic;
}
.gb-sub { margin-top: 2px; padding: 3px 10px; border-radius: 10px; background: rgba(6,26,22,.8); color: #eaffd0; font-size: 10px; font-weight: 800; }

/* 경기장 위 전술 상황 바 (선수 머리를 가리지 않도록 피치 밖 상단에 둔다) */
.sit {
  display: flex; align-items: center; gap: 6px;
  min-height: 24px; margin-bottom: 6px;
  padding: 4px 9px; border-radius: 10px;
  background: linear-gradient(160deg, rgba(20, 58, 49, .95), rgba(10, 38, 32, .95));
  border: 1px solid rgba(200, 241, 105, .34);
  color: #eaffd0; pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.sit i {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  background: var(--lime); box-shadow: 0 0 8px var(--lime);
  animation: sitPulse 1.2s ease-in-out infinite;
}
.sit b { font-size: 9px; font-weight: 900; letter-spacing: .2px; white-space: nowrap; }
.sit span {
  font-size: 8px; font-weight: 700; color: rgba(233, 244, 221, .66);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sit.tone-hot { border-color: rgba(255, 217, 138, .72); }
.sit.tone-hot i { background: #ffd98a; box-shadow: 0 0 10px #ffd98a; }
.sit.tone-hot b { color: #ffedb8; }
.sit.tone-danger { border-color: rgba(255, 140, 120, .8); background: rgba(58, 14, 10, .88); }
.sit.tone-danger i { background: #ff8c78; box-shadow: 0 0 10px #ff8c78; }
.sit.tone-danger b { color: #ffc4b4; }
.sit.tone-set { border-color: rgba(195, 166, 255, .7); }
.sit.tone-set i { background: #c3a6ff; box-shadow: 0 0 10px #c3a6ff; }
.sit.tone-set b { color: #e2d2ff; }
.sit.tone-wide { border-color: rgba(159, 216, 255, .7); }
.sit.tone-wide i { background: #9fd8ff; box-shadow: 0 0 10px #9fd8ff; }
.sit.tone-press { border-color: rgba(255, 159, 138, .7); }
.sit.tone-press i { background: #ff9f8a; box-shadow: 0 0 10px #ff9f8a; }
.sit.tone-save i { background: #9fe8ff; box-shadow: 0 0 10px #9fe8ff; }
@keyframes sitPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.75); }
}

.mom {
  background: linear-gradient(160deg, #143a31, #0b2721);
  border: 1px solid rgba(200, 241, 105, .16);
  border-radius: 14px; padding: 7px 9px 8px; margin-bottom: 7px;
  box-shadow: var(--shadow);
}
.mom-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.mom-top b {
  font-size: 9.5px; font-weight: 900; letter-spacing: 1.1px; color: var(--lime);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Helvetica Neue", Arial, sans-serif;
  font-variant-ligatures: none;
}
.mom-top .val { margin-left: auto; font-size: 15px; font-weight: 900; color: #f0f9e2; letter-spacing: -.5px; }
.mom-top .val small { font-size: 8px; color: rgba(233,244,221,.5); font-weight: 700; margin-left: 2px; }
.mom-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.10); overflow: hidden; position: relative; }
.mom-bar > i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #7fc63d, #c8f169 70%, #f6ffd9); box-shadow: 0 0 10px rgba(200,241,105,.55); transition: width .25s linear; }
.mom-buffs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; min-height: 0; }
.mom-buffs:empty { display: none; }
.buffchip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 8px; background: rgba(200,241,105,.16); color: #d8f7a6; font-size: 8px; font-weight: 800; }
.buffchip em { font-style: normal; opacity: .7; }

.hand { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tcard {
  position: relative;
  padding: 7px 7px 16px; border-radius: 12px;
  background: linear-gradient(165deg, #1b463b, #0e2b25);
  border: 1px solid rgba(255,255,255,.12);
  color: #e9f4dd; text-align: left; overflow: hidden; cursor: pointer;
  min-height: 66px;
}
.tcard::before {
  content: ""; position: absolute; right: -18px; top: -18px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cc, #c8f169); opacity: .22;
}
.tcard:disabled, .tcard.locked { opacity: .45; }
.tcard.ready { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(200,241,105,.4), 0 6px 16px rgba(0,0,0,.3); }
.tcard .tag { display: block; font-size: 7px; font-weight: 900; letter-spacing: .6px; color: var(--lime); }
.tcard .nm { display: block; font-size: 10px; font-weight: 900; letter-spacing: -.4px; margin-top: 2px; line-height: 1.2; }
.tcard .cost { position: absolute; right: 6px; bottom: 6px; font-size: 9px; font-weight: 900; color: #f4fbe9; }
.tcard .cost em { font-style: normal; color: var(--lime); }
.tcard .cd { position: absolute; left: 7px; bottom: 6px; font-size: 8px; color: rgba(233,244,221,.55); font-weight: 700; }

.cmt { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 6px 9px; margin-bottom: 6px; }
.cmt-head { display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: rgba(233,244,221,.5); font-weight: 800; letter-spacing: .5px; margin-bottom: 3px; }
.cmt-head b { color: var(--lime); font-size: 9px; }
.cmt-body { max-height: 54px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.cmt-body::-webkit-scrollbar { width: 0; }
.cmt-line { font-size: 10px; color: rgba(236,246,226,.86); line-height: 1.4; }
.cmt-line .cmt-min { display: inline-block; min-width: 22px; color: var(--lime); font-weight: 800; font-size: 8.5px; }
.cmt-line.big { color: #fff; font-weight: 700; }
.cmt-line.goal { color: #ffe98a; font-weight: 700; }
.cmt-line.tactic { color: #b7f08a; }
.cmt-line.tackle { color: #ffc7b3; }

.ctrls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg { display: flex; background: rgba(255,255,255,.07); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button {
  height: 24px; min-width: 30px; padding: 0 8px; border: none; border-radius: 8px;
  background: transparent; color: rgba(233,244,221,.68); font-size: 10px; font-weight: 800;
}
.seg button.on { background: var(--lime); color: #1d3b07; }
.ctrl-lbl { font-size: 8px; font-weight: 800; color: rgba(233,244,221,.45); letter-spacing: .4px; margin-bottom: 2px; display: block; }

/* 컷인 */
#m-cutin {
  position: absolute; inset: 0; z-index: 60;
  display: none; pointer-events: none; overflow: hidden;
}
#m-cutin.on { display: block; }
.cutin {
  position: absolute; inset: 0;
  background:
    radial-gradient(58% 48% at 76% 66%, rgba(255, 255, 255, .10), transparent 66%),
    linear-gradient(100deg, rgba(3, 16, 13, .99) 0%, rgba(4, 18, 15, .965) 52%, rgba(5, 24, 20, .94) 100%);
  display: flex; align-items: center; overflow: hidden;
  animation: cutinIn .34s cubic-bezier(.2, .8, .3, 1);
}
@keyframes cutinIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.cutin-lines {
  position: absolute; inset: -20%;
  background: repeating-conic-gradient(from 0deg at 74% 62%, rgba(255,255,255,.09) 0deg 2deg, transparent 2deg 8deg);
  opacity: .45; animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cutin::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 66%; height: 156px;
  transform: translateY(-52%) skewY(-7deg);
  background: linear-gradient(90deg, var(--cc, #c8f169) 0%, rgba(0, 0, 0, 0) 92%);
  opacity: .32;
}
.cutin-art {
  position: absolute; right: -2px; bottom: 0; width: 268px; height: 268px;
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 2;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .65));
}
.cutin-art img {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain;
  animation: cutPop .5s cubic-bezier(.2,1.45,.4,1);
}
@keyframes cutPop { from { transform: translateX(26px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.cutin-body {
  position: absolute; left: 0; top: 48%; transform: translateY(-50%);
  z-index: 3; padding: 0 0 0 18px; width: 64%;
  color: #f2f8ea;
}
.cutin-tag { font-size: 8px; font-weight: 900; letter-spacing: 1.4px; color: var(--cc, #c8f169); filter: brightness(1.5); }
.cutin-name { font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1.06; margin-top: 3px; color: #ffffff; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.cutin-en { font-size: 9px; font-weight: 900; letter-spacing: 1.4px; color: rgba(255,255,255,.55); margin-top: 2px; }
.cutin-ace {
  margin-top: 7px; font-size: 10.5px; font-weight: 900;
  background: var(--cc, #c8f169); color: #08160f;
  display: inline-block; padding: 3px 8px; border-radius: 7px;
}
.cutin-desc { margin-top: 7px; font-size: 9.5px; font-weight: 600; line-height: 1.5; color: rgba(238,248,228,.8); max-width: 92%; }

/* 교체 패널 */
#m-overlay { position: absolute; inset: 0; z-index: 55; display: none; background: rgba(3, 16, 13, .74); backdrop-filter: blur(3px); }
#m-overlay.on { display: block; }
.sub-panel {
  position: absolute; left: 8px; right: 8px; bottom: calc(78px + var(--safe-b));
  background: var(--card); border-radius: 16px; padding: 12px;
  max-height: 78%; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.sub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.sub-head b { font-size: 13px; font-weight: 900; }
.sub-head span { font-size: 9.5px; color: var(--ink3); font-weight: 700; }
.sub-min { font-size: 9.5px; color: var(--ink2); margin-bottom: 7px; }
.sub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sub-title { font-size: 8.5px; font-weight: 900; letter-spacing: .6px; color: var(--ink3); margin-bottom: 3px; }
.sub-list { display: flex; flex-direction: column; gap: 3px; max-height: 148px; overflow-y: auto; }
.sub-item {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card2); font-size: 9.5px; font-weight: 700; text-align: left;
}
.sub-item.on { border-color: var(--lime2); background: rgba(200,241,105,.25); }
.sub-item.off { opacity: .4; }
.sub-item .sp { font-size: 8px; font-weight: 900; color: var(--ink3); min-width: 22px; }
.sub-item .sn { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-item .sr { font-size: 9px; font-weight: 900; color: #4f7d13; }
.sub-btns { display: flex; gap: 6px; margin-top: 9px; }
.sub-btns .btn { flex: 1 1 0; }

/* ───────── 하단 내비 ───────── */
.tabbar {
  position: relative; z-index: 6;
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 5px 6px calc(5px + var(--safe-b));
  background: rgba(5, 23, 19, .94);
  border-top: 1px solid rgba(200, 241, 105, .14);
  backdrop-filter: blur(14px);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 46px; border: none; border-radius: 12px;
  background: transparent; color: rgba(233, 244, 221, .48);
  font-size: 8.5px; font-weight: 800; letter-spacing: .1px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.tabbar button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar button.on { color: #1d3b07; background: linear-gradient(170deg, #d6fb8a, #a8da4e); box-shadow: 0 4px 12px rgba(166, 216, 76, .25); }

/* ───────── 모달 ───────── */
#modal {
  position: absolute; inset: 0; z-index: 40;
  display: none; align-items: flex-end;
  background: rgba(3, 16, 13, .72);
  backdrop-filter: blur(2px);
}
#modal.on { display: flex; }
.sheet {
  width: 100%; max-height: 90%;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  animation: slideup .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideup { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px 9px;
  border-bottom: 1px solid var(--line);
}
.sheet-head b { font-size: 14px; font-weight: 900; letter-spacing: -.5px; }
.sheet-head .x {
  margin-left: auto; border: none; background: #ece7d7;
  height: 26px; padding: 0 10px; border-radius: 9px;
  font-size: 10px; font-weight: 800; color: var(--ink2);
}
.sheet-body { padding: 12px 14px calc(18px + var(--safe-b)); overflow-y: auto; }

/* 선수 상세 */
.pd-hero {
  position: relative; border-radius: 14px; overflow: hidden;
  background: linear-gradient(150deg, #123a31, #0a2620);
  padding: 10px; display: flex; gap: 10px; align-items: flex-end;
  margin-bottom: 10px;
}
.pd-hero::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,241,105,.28), transparent 70%);
}
.pd-art { position: relative; z-index: 2; width: 108px; height: 122px; flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; }
.pd-art img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.pd-info { position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; color: #eaf6dd; padding-bottom: 2px; }
.pd-name { font-size: 17px; font-weight: 900; letter-spacing: -.8px; line-height: 1.1; }
.pd-name small { font-size: 10px; font-weight: 700; color: rgba(233,244,221,.6); }
.pd-nick { font-size: 9.5px; color: var(--lime); font-weight: 800; margin-bottom: 2px; }
.pd-line { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.pd-ov { font-size: 26px; font-weight: 900; letter-spacing: -1.5px; color: #fff; line-height: 1; }
.pd-ov small { font-size: 8px; font-weight: 800; color: rgba(233,244,221,.5); letter-spacing: .5px; display: block; }
.pd-rows { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 9px; color: rgba(233,244,221,.72); margin-top: 3px; }
.pd-rows span { color: rgba(233,244,221,.45); margin-right: 5px; }

.band { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; font-size: 11px; font-weight: 900; letter-spacing: .2px; color: var(--ink3); }
.band::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.band span { letter-spacing: 0; font-weight: 700; color: var(--ink3); opacity: .8; }

.aptmap { position: relative; height: 250px; border-radius: 12px; background: linear-gradient(180deg, #10473a, #0a2f27); overflow: hidden; margin-bottom: 8px; }
.aptmap::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 3px; }
.aptmap::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 1px; background: rgba(255,255,255,.15); }
.aptcell {
  position: absolute; transform: translate(-50%, -50%);
  width: 38px; text-align: center;
}
.aptcell .v { display: block; width: 27px; height: 27px; margin: 0 auto; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 11px; font-weight: 900; color: #eaf6dd; line-height: 27px; }
.aptcell .c { display: block; font-size: 7px; font-weight: 800; color: rgba(233,244,221,.55); margin-top: 0; line-height: 1.1; letter-spacing: .2px; }
.aptcell.hi .v { background: linear-gradient(160deg, #d6fb8a, #a8da4e); color: #1d3b07; border-color: #a8da4e; }
.aptcell.halfline { transform: translate(-50%, calc(-50% + 4px)); }
.aptcell.mid .v { background: rgba(200,241,105,.22); color: #dcf9a6; }

.st-row { display: grid; grid-template-columns: 52px 1fr 26px; align-items: center; gap: 7px; margin-bottom: 4px; }
.st-row .lb { font-size: 9.5px; font-weight: 800; color: var(--ink2); }
.st-row .num { font-size: 10px; font-weight: 900; text-align: right; }
.st-row .gauge { height: 6px; border-radius: 3px; background: #e7e2d2; overflow: hidden; }
.st-row .gauge i { display: block; height: 100%; border-radius: 3px; }
.gauge.s i { background: linear-gradient(90deg, #4aa8e0, #7fd0f5); }
.gauge.t i { background: linear-gradient(90deg, #9a7be0, #c4aaf5); }
.gauge.p i { background: linear-gradient(90deg, #ef6a52, #ffa285); }
.gauge.lk i { background: linear-gradient(90deg, #2f8f62, #7fd6a5); }

.pd-story { font-size: 10.5px; line-height: 1.7; color: var(--ink2); background: #f3efdf; border-radius: 11px; padding: 9px 10px; }
.pd-story .sk { display: inline-block; padding: 1px 6px; margin: 0 3px 3px 0; border-radius: 7px; background: rgba(200,241,105,.4); color: #3c6414; font-size: 8.5px; font-weight: 800; }
.pd-edit { display: flex; gap: 6px; margin-top: 9px; align-items: flex-end; }
.pd-edit label { flex: 1 1 0; font-size: 8.5px; font-weight: 800; color: var(--ink3); }
.pd-edit input { width: 100%; height: 32px; margin-top: 2px; border-radius: 9px; border: 1px solid var(--line); background: #fff; padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--ink); }

/* 스카우트 카드 */
.scout { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); margin-bottom: 6px; text-align: left; width: 100%; }
.scout .art { width: 64px; height: 74px; flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; border-radius: 10px; background: linear-gradient(160deg, #e9f3d5, #d8e6bd); overflow: hidden; }
.scout .art img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.scout .main { flex: 1 1 auto; min-width: 0; }
.scout .nm { font-size: 12px; font-weight: 900; letter-spacing: -.3px; }
.scout .mt { display: flex; gap: 4px; align-items: center; margin-top: 2px; font-size: 8.5px; color: var(--ink3); font-weight: 700; }
.scout .ov { font-size: 17px; font-weight: 900; letter-spacing: -.8px; color: #3d6b12; }
.scout .ov small { display: block; font-size: 7px; color: var(--ink3); letter-spacing: .4px; text-align: center; }

/* 도감 */
.dexbar { height: 5px; border-radius: 3px; background: #e7e2d2; overflow: hidden; margin: 3px 0 6px; }
.dexbar i { display: block; height: 100%; background: linear-gradient(90deg, #a6d84c, #c8f169); }
.dexgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dexcell { border-radius: 8px; background: #f0ebdb; padding: 4px 2px; text-align: center; font-size: 6.5px; color: var(--ink3); font-weight: 700; }
.dexcell.got { background: rgba(200,241,105,.3); color: #3d6b12; }
.dexcell canvas { width: 20px; height: 23px; }

/* 훈련 · 롤 */
.menu2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.menu2 button { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); text-align: left; }
.menu2 button.on { border-color: var(--lime2); background: rgba(200,241,105,.28); }
.menu2 button span { font-size: 13px; }
.menu2 button b { font-size: 10px; font-weight: 800; }
.menu2 button em { font-style: normal; font-size: 7.5px; color: var(--ink3); display: block; }

.rolechip { display: flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 8px; background: rgba(200,241,105,.3); color: #3d6b12; font-size: 8.5px; font-weight: 900; }
.role-row { display: flex; align-items: center; gap: 7px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.role-row:last-child { border-bottom: none; }
.role-row .nm { font-size: 11px; font-weight: 800; }
.role-row .ds { font-size: 8.5px; color: var(--ink3); line-height: 1.4; }

/* 결과서 */
.rs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 10px; border-radius: 13px; background: linear-gradient(160deg, #143a31, #0a2620); color: #eaf6dd; margin-bottom: 9px; }
.rs-team { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rs-team canvas { width: 30px; height: 34px; }
.rs-team b { font-size: 9.5px; font-weight: 800; text-align: center; }
/* v25b — 결과서 상단 팀 이름·점수도 경기 화면과 같은 파랑/빨강 */
.rs > .rs-team:first-of-type b { color: var(--team-home-ink); }
.rs > .rs-team:last-of-type b { color: var(--team-away-ink); }
.rs > .rs-score b:first-of-type { color: var(--team-home-ink); }
.rs > .rs-score b:last-of-type { color: var(--team-away-ink); }
.rs-team span { font-size: 6.5px; font-weight: 900; color: rgba(233,244,221,.4); letter-spacing: .5px; white-space: nowrap; }
.rs-score b { font-size: 28px; font-weight: 900; letter-spacing: -1.6px; }
.rs-score i { font-style: normal; color: rgba(233,244,221,.4); font-size: 14px; margin: 0 3px; }
.rline { display: flex; align-items: center; gap: 5px; font-size: 10px; padding: 3px 0; border-bottom: 1px solid rgba(228,221,203,.6); }
.rline:last-child { border-bottom: none; }
.rline .min { margin-left: auto; font-size: 8.5px; color: var(--ink3); font-weight: 700; }
.rline.away { color: #a5452f; }
.rline.empty { color: var(--ink3); font-size: 9px; }
.pts-row { display: flex; align-items: center; gap: 5px; font-size: 9.5px; padding: 2px 0; }
.pts-row .pt { width: 20px; font-weight: 900; color: #3d6b12; }
.pts-row.mvp { background: rgba(200,241,105,.28); border-radius: 6px; padding: 2px 3px; }
.pts-row .nm { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pts-row .rl { font-size: 8px; color: var(--ink3); font-weight: 800; }
.stat-line { display: flex; align-items: center; gap: 6px; font-size: 10px; padding: 3px 0; }

.toast {
  position: absolute; left: 50%; bottom: calc(78px + var(--safe-b));
  transform: translate(-50%, 12px);
  max-width: 86%;
  padding: 9px 14px; border-radius: 12px;
  background: rgba(8, 32, 26, .96);
  border: 1px solid rgba(200, 241, 105, .3);
  color: #eaffd0; font-size: 11px; font-weight: 700; text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.empty-note { font-size: 9.5px; color: var(--ink3); background: #f3efdf; border-radius: 9px; padding: 8px; text-align: center; }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 10.5px; }
.kv span { color: var(--ink3); font-weight: 700; }
.kv b { font-weight: 800; }

.swatch { width: 20px; height: 20px; border-radius: 6px; border: 2px solid transparent; }
.swatch.on { border-color: var(--ink); }
.embpick { width: 34px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); }
.embpick.on { border-color: var(--lime2); background: rgba(200,241,105,.25); }
.embpick canvas { width: 26px; height: 30px; }

.fac { background: var(--card2); border: 1px solid var(--line); border-radius: 11px; padding: 8px; color: var(--ink); }
.fac .ico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; background: rgba(47, 143, 98, .14); flex: 0 0 auto; }
.fac-name { font-size: 10px; font-weight: 800; }
.fac-lv { font-size: 8px; color: var(--ink3); font-weight: 700; }
.fac .eff { font-size: 8.5px; color: #4f7d13; font-weight: 800; margin: 2px 0 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 5px; }

.minihead { display: block; border-radius: 50%; overflow: hidden; background: #e6e1d1; flex: 0 0 auto; }
.minihead img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; display: block; }

/* 골 컷인 */
.gcutin::before { background: linear-gradient(90deg, #f6ffd9 0%, var(--cc, #c8f169) 40%, rgba(0,0,0,0) 92%); opacity: .38; }
.gcutin .cutin-body { width: 62%; }
.gword {
  font-size: 40px; font-weight: 900; font-style: italic; letter-spacing: -2px;
  line-height: 1; color: #f6ffd9; margin: 2px 0 5px;
  text-shadow: 0 0 18px rgba(200,241,105,.7), 0 4px 14px rgba(0,0,0,.6);
}
.mom-top b { letter-spacing: .3px; }
.mom-top .val { white-space: nowrap; }

/* 기본 / 마스터 모드 */
.modebar { display: flex; align-items: center; gap: 8px; margin: 0 2px 6px; }
.seg.mode { background: rgba(255,255,255,.07); padding: 2px; }
.seg.mode button { min-width: 46px; height: 28px; font-size: 10px; }
.modehint { font-size: 8.5px; font-weight: 700; color: rgba(233,244,221,.45); letter-spacing: .2px; }
.tok .rl {
  position: absolute; top: -7px; right: -9px;
  z-index: 7;
  min-width: 17px; padding: 1px 4px 1px;
  border-radius: 6px;
  background: rgba(6, 26, 22, .94);
  border: 1px solid rgba(255,255,255,.30);
  color: #eaffd2; font-size: 7px; font-weight: 900; letter-spacing: .1px;
  line-height: 1.15; text-align: center; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.tok .rl.role { background: var(--lime); border-color: var(--lime2); color: #1d3b07; }
.mom-top .uses {
  font-size: 8px; font-weight: 900; letter-spacing: .2px;
  padding: 2px 6px; border-radius: 7px;
  background: rgba(200,241,105,.16); color: #d8f7a6;
}
.mom-top .uses.out { background: rgba(239,106,82,.18); color: #ffb0a0; }

/* 덱 편성 행 */
.deckrow {
  display: grid; grid-template-columns: 34px 1fr 34px; gap: 7px; align-items: center;
  width: 100%; text-align: left; padding: 7px 8px; margin-bottom: 5px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--card2);
}
.deckrow.on { border-color: var(--lime2); background: rgba(200, 241, 105, .20); }
.deckrow .dtag {
  font-size: 8px; font-weight: 900; text-align: center; padding: 4px 0;
  border-radius: 7px; letter-spacing: .2px;
}
.deckrow .dtxt { min-width: 0; }
.deckrow .dtxt b { display: block; font-size: 11px; font-weight: 900; letter-spacing: -.3px; }
.deckrow .dtxt b em { font-style: normal; font-size: 8px; color: #5e7a2a; font-weight: 800; }
.deckrow .dtxt span { display: block; font-size: 8.5px; line-height: 1.4; color: var(--ink3); margin-top: 1px; }
.deckrow .dstate { font-size: 8px; font-weight: 900; text-align: center; padding: 4px 0; border-radius: 7px; background: #e7e2d2; color: var(--ink3); }
.deckrow .dstate.on { background: var(--lime); color: #1d3b07; }

main::-webkit-scrollbar { width: 0; height: 0; }
.seg button { white-space: nowrap; }
.aptmap { height: 250px; }

/* ═════════════════  감독 (MANAGER) — v5 ═════════════════ */
.mgr-wrap {
  display: flex; align-items: center; gap: 6px;
  margin: 7px 0 0; padding: 7px 9px 7px 7px;
  border-radius: 13px;
  background: linear-gradient(135deg, #123e34 0%, #0d2e27 100%);
  border: 1px solid rgba(200, 241, 105, .22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  cursor: pointer;
}
.mgr-wrap .mgr { flex: 1 1 auto; min-width: 0; background: none; border: 0; padding: 0; margin: 0; }
.mgr-go { flex: 0 0 auto; font-size: 9px; font-weight: 900; color: #cfe89f; letter-spacing: .2px; white-space: nowrap; }

.mgr { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mgr-art {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #3c6f5f 0%, #17362e 100%);
  border: 1.5px solid rgba(200, 241, 105, .45);
}
.mgr-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.mgr-main { min-width: 0; display: block; }
.mgr-top { display: flex; align-items: center; gap: 4px; }
.mgr-top b { font-size: 11.5px; font-weight: 900; letter-spacing: -.3px; color: #eaf6dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgr-sub { display: block; font-size: 8.5px; font-weight: 700; color: rgba(233, 244, 221, .62); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgr-sub .sync, .mgr-live em.sync, .mhero-form .sync {
  font-style: normal; font-weight: 900; color: #1d3b07; background: var(--lime);
  padding: 0 4px; border-radius: 5px; font-size: 8px;
}
.mgr-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.mtag {
  font-size: 8px; font-weight: 900; letter-spacing: -.1px;
  padding: 1px 5px; border-radius: 6px; white-space: nowrap;
}

/* 클럽 · 시트 안의 감독 카드 */
.mgr.club { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.mgr.club .mgr-art { width: 52px; height: 52px; }
.mgr.club .mgr-top b { color: var(--ink); font-size: 12.5px; }
.mgr.club .mgr-sub { color: var(--ink2); }

/* 경기 화면 감독 줄 */
.mgr-live {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  margin: 5px 0 0; padding: 3px 8px; border-radius: 9px;
  background: rgba(200, 241, 105, .10);
  border: 1px solid rgba(200, 241, 105, .22);
  font-size: 9px; font-weight: 800; color: #d9f0b4;
  overflow: hidden;
}
.mgr-live b { font-weight: 900; color: #eaffd2; }
.mgr-live span { color: rgba(233, 244, 221, .68); }

/* 감독실 시트 */
.mhero {
  display: flex; gap: 10px; align-items: center;
  padding: 10px; border-radius: 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, #123e34 0%, #0b2b24 100%);
  border: 1px solid rgba(200, 241, 105, .25);
}
.mhero-art {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 13px; object-fit: cover; object-position: 50% 20%;
  background: radial-gradient(circle at 50% 30%, #3c6f5f 0%, #17362e 100%);
  border: 2px solid rgba(200, 241, 105, .5);
}
.mhero-in { min-width: 0; }
.mhero-kicker { font-size: 8.5px; font-weight: 900; letter-spacing: .4px; color: #cfe89f; }
.mhero-name { font-size: 18px; font-weight: 900; letter-spacing: -1px; color: #f2ffe2; line-height: 1.2; }
.mhero-name small { font-size: 9px; font-weight: 800; color: rgba(233, 244, 221, .6); letter-spacing: 0; }
.mhero-style { font-size: 10px; font-weight: 800; color: rgba(233, 244, 221, .8); margin-top: 1px; }
.mhero-tac { font-size: 9px; font-weight: 700; line-height: 1.45; color: rgba(214, 196, 255, .92); margin-top: 3px; }
.mhero-tac b { color: #e2d2ff; font-weight: 900; }
.mhero-form { font-size: 9px; font-weight: 800; color: rgba(233, 244, 221, .62); margin-top: 4px; }
.mhero-form b { color: #eaffd2; }

.mstory {
  font-size: 9.5px; line-height: 1.6; color: var(--ink2);
  padding: 8px 9px; border-radius: 11px; background: var(--card2);
  border: 1px solid var(--line); margin-bottom: 7px;
}
.mfx {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; margin-bottom: 4px; border-radius: 11px;
  background: var(--card2); border: 1px solid var(--line);
}
.mfx-ico {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.mfx-tx { min-width: 0; }
.mfx-tx b { display: block; font-size: 10.5px; font-weight: 900; letter-spacing: -.2px; }
.mfx-tx em { display: block; font-style: normal; font-size: 8.5px; font-weight: 700; color: var(--ink3); margin-top: 1px; }

.mlist { display: flex; flex-direction: column; gap: 5px; }
.mrow {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 6px 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2);
}
.mrow.on { border-color: var(--lime2); background: rgba(200, 241, 105, .18); }
.mrow-art { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; overflow: hidden; background: #17362e; }
.mrow-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.mrow-main { flex: 1 1 auto; min-width: 0; }
.mrow-main b { display: block; font-size: 11px; font-weight: 900; letter-spacing: -.3px; }
.mrow-sub { display: block; font-size: 8.5px; font-weight: 700; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-tr { display: block; font-size: 8.5px; font-weight: 800; color: var(--ink2); margin-top: 1px; }
.mrow-side { flex: 0 0 auto; text-align: right; font-size: 8.5px; font-weight: 900; }
.mrow-side em { display: block; font-style: normal; font-size: 8px; font-weight: 900; color: var(--ink3); margin-top: 2px; }
.mrow-side em.on { color: #3d6b12; }

.mcard {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2);
}
.mcard-art { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 11px; overflow: hidden; background: #17362e; }
.mcard-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.mcard-main { flex: 1 1 auto; min-width: 0; }
.mcard-top { display: flex; align-items: center; gap: 4px; }
.mcard-top b { font-size: 11.5px; font-weight: 900; letter-spacing: -.3px; }
.mcard-sub { display: block; font-size: 8.5px; font-weight: 700; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-tr { display: block; font-size: 8.5px; font-weight: 800; color: var(--ink2); margin-top: 1px; }
.mcard .btn { flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════════
   꼬마일레븐 FC v7 — 가로(16:9) 전면 레이아웃
   · 왼쪽 탭 레일 + 슬림 상단 바 + 다단 본문
   · 경기 화면: 상단 슬림 스코어바 / 좌 피치 72% / 우 전술 사이드바 / 하단 티커
   ═══════════════════════════════════════════════════════════════ */
#app { max-width: 1280px; }

/* ── 상단 바 ── */
.topbar { height: 36px; padding: 0 10px 0 62px; gap: 6px; }
.tb-emblem { width: 20px; height: 23px; }
.tb-name { font-size: 12px; max-width: 190px; }
.tb-sub { font-size: 9px; }
.tb-chip { height: 22px; font-size: 10.5px; padding: 0 8px; border-radius: 11px; }
.tb-chip svg { width: 12px; height: 12px; }

/* ── 왼쪽 탭 레일 ── */
.tabbar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 54px;
  display: flex; flex-direction: column; gap: 3px; grid-template-columns: none;
  padding: 6px 4px; border-top: none; border-right: 1px solid rgba(200, 241, 105, .14);
  background: rgba(5, 23, 19, .97); z-index: 30;
}
.tabbar button { width: 100%; height: 57px; border-radius: 11px; gap: 3px; font-size: 8px; }
.tabbar button svg { width: 20px; height: 20px; }
.tabbar button.on { box-shadow: none; }

/* ── 본문: 다단 대시보드 ── */
main { margin-left: 54px; padding: 7px 8px 8px; }
.screen.on {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 7px; align-content: start; align-items: start;
}
.screen.on > .card, .screen.on > .mgr-wrap, .screen.on > .grid3 { margin: 0; }
.hero { grid-column: 1 / -1; margin: 0; }
.hero-img { height: 70px; }
.hero-title { font-size: 18px; }
.hero-in { padding: 8px 12px 9px; }
.hero-kicker { font-size: 8px; }
.vs { padding: 0 0 4px; }
.vs-team canvas { width: 30px; height: 35px; }
.vs-mid b { font-size: 13px; }
.card .btn.wide { height: 30px; }
.card { padding: 8px 10px; margin-bottom: 6px; border-radius: 13px; }
.card-head { margin-bottom: 5px; }
.kpi { padding: 5px 4px; }
.kpi b { font-size: 14px; }
.tbl td { padding: 2.5px 0; }
.pitch-head { font-size: 8px; }

/* ── 경기 화면 셸 ── */
body.in-match .topbar { display: none; }
body.in-match .tabbar { display: none; }
body.in-match main { margin-left: 0; padding: 0; overflow: hidden; }
#screen-match.on.it, #screen-match.on { display: flex; flex-direction: column; height: 100%; gap: 0; align-items: stretch; }
#screen-match.on > .m-top, #screen-match.on > .m-body, #screen-match.on > .m-ticker { width: 100%; }
#screen-match.on.idle {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 7px; align-content: start; align-items: stretch; height: auto; padding: 7px 8px 8px; overflow-y: auto;
}
#screen-match.on.idle > .card, #screen-match.on.idle > .mgr-wrap { margin: 0; }
/* v9: 클럽 요약 카드가 행 높이를 채워 빈 구멍을 없앤다 */
#screen-match.on.idle > .card.tight { display: flex; flex-direction: column; justify-content: center; }
#screen-match.on.idle > .card.tight .club-line { margin: auto 0; }

/* 상단 슬림 바 */
.m-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 8px;
  background: linear-gradient(180deg, rgba(13, 44, 37, .99), rgba(6, 24, 20, .99));
  border-bottom: 1px solid rgba(200, 241, 105, .16);
}
/* v25b — 팀 색은 언제나 파랑(홈) vs 빨강(원정) — 피치 링·점유율 바·xG맵과 같은 색 */
:root { --team-home: #2f8dff; --team-away: #ff4b4b; --team-home-ink: #9dcaff; --team-away-ink: #ffa6a6; }
.mt-team { display: flex; align-items: center; gap: 5px; min-width: 0; }
.mt-team.away { flex-direction: row-reverse; }
.mt-team canvas { width: 20px; height: 24px; flex: 0 0 auto; }
.mt-name { font-size: 11.5px; font-weight: 800; color: var(--team-home-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.mt-team.away .mt-name { color: var(--team-away-ink); }
.mt-mid { display: flex; align-items: center; gap: 6px; }
.mt-score { display: flex; align-items: baseline; gap: 3px; }
.mt-score b { font-size: 20px; font-weight: 900; color: #f6fdef; letter-spacing: -1px; line-height: 1; }
.mt-score b#m-gf { color: var(--team-home-ink); }
.mt-score b#m-ga { color: var(--team-away-ink); }
.mt-score i { font-style: normal; color: rgba(233, 244, 221, .45); font-size: 12px; }
.mt-clock { font-size: 9.5px; font-weight: 900; color: var(--lime); background: rgba(200, 241, 105, .13); border-radius: 7px; padding: 2px 6px; letter-spacing: .3px; }
.mt-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tbtn {
  height: 30px; padding: 0 9px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06);
  color: #dfeece; font-size: 10px; font-weight: 800; cursor: pointer;
}
.tbtn.ico { width: 34px; padding: 0; }
.tbtn.on { background: var(--lime); color: #1d3b07; border-color: var(--lime); }
.tbtn.danger { color: #ffbdb0; border-color: rgba(255, 120, 100, .38); }
/* v30 — 중계뷰 / 전체뷰 토글 */
.tbtn.view { min-width: 58px; white-space: nowrap; padding: 0 8px; font-size: 10px; }
.tbtn.view.on { background: #9fd8ff; color: #06222e; border-color: #9fd8ff; }
.seg.mini button { height: 28px; min-width: 28px; font-size: 10px; padding: 0 6px; }

/* 피치 + 사이드바 */
.m-body { flex: 1 1 auto; display: flex; min-height: 0; }
.m-pitch-col { flex: 1 1 auto; min-width: 0; position: relative; }
.pitch-wrap { position: absolute; inset: 0; margin: 0; border: none; border-radius: 0; }
#m-pitch { display: block; width: 100%; height: 100%; }
.pitch-wrap .sit { position: absolute; left: 7px; top: 5px; z-index: 5; margin: 0; min-height: 21px; padding: 3px 8px; }

.m-side {
  flex: 0 0 27%; min-width: 198px; max-width: 272px;
  display: flex; flex-direction: column; gap: 5px;
  padding: 5px 6px 6px;
  background: linear-gradient(180deg, rgba(9, 33, 28, .97), rgba(5, 20, 17, .99));
  border-left: 1px solid rgba(200, 241, 105, .15);
}
.m-side .mom { padding: 5px 7px; border-radius: 10px; }
.m-side .mom-top { margin-bottom: 4px; }
.m-side .mom-top b { font-size: 8px; }
.m-side .mom-top .val { font-size: 13px; }
.m-side .mom-top .uses { font-size: 8px; }
.m-side .mom-bar { height: 6px; }
.m-side .mom-buffs { margin-top: 4px; gap: 3px; }
.m-side .buffchip { font-size: 7px; padding: 1px 4px; }

/* 전술 카드 (얼굴 썸네일 + 효과 + 코스트) */
.hand.v7 { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.tcard.v7 {
  display: flex; align-items: center; gap: 5px; flex: 1 1 0; min-height: 0; max-height: 76px;
  padding: 3px 5px; border-radius: 10px; text-align: left;
}
.tcard.v7::before { width: 30px; height: 30px; right: -8px; top: -8px; }
.tc-face {
  flex: 0 0 auto; width: 36px; height: 44px; border-radius: 8px; overflow: hidden;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
.tc-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.tc-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tcard.v7 .tag { font-size: 6.5px; letter-spacing: .4px; }
.tcard.v7 .nm { font-size: 9.5px; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard.v7 .cd { font-size: 7.5px; color: rgba(233, 244, 221, .5); font-weight: 700; white-space: nowrap; overflow: hidden; height: 10px; }
.tcard.v7 .cost { position: static; margin-left: auto; font-size: 8px; }
.tcard.v7 .cost em { font-size: 9.5px; }

.m-tac { flex: 0 0 auto; }
.m-tac .seg { width: 100%; }
.m-tac .seg button { flex: 1 1 0; min-width: 0; font-size: 10px; }
.m-acts { flex: 0 0 auto; }
.m-acts .btn { height: 32px; font-size: 11px; }

/* ── v9 실시간 미니 스탯 (점유율 · 슈팅 · 지친 선수) — 카드와 전술 버튼 사이 ── */
.m-live {
  flex: 0 0 auto; margin-top: auto; display: flex; flex-direction: column; gap: 3px;
  padding: 5px 6px 6px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(200, 241, 105, .16);
}
.m-live .lv-row { display: flex; align-items: center; gap: 5px; height: 13px; }
.m-live .lv-lbl { flex: 0 0 auto; font-size: 7.5px; font-weight: 900; letter-spacing: .3px; color: rgba(233, 244, 221, .55); }
.m-live .lv-bar { flex: 1 1 auto; height: 6px; border-radius: 4px; overflow: hidden; position: relative;
  background: linear-gradient(90deg, rgba(255, 75, 75, .62) 0%, rgba(255, 75, 75, .62) 100%); }
.m-live .lv-bar > i { display: block; height: 100%; width: 50%; border-radius: 4px;
  background: linear-gradient(90deg, #2f8dff, #6cc0ff); transition: width .3s linear; box-shadow: 0 0 6px rgba(47, 141, 255, .55); }
.m-live #m-poss-v { color: var(--team-home-ink); }
.m-live .lv-row b { flex: 0 0 auto; font-size: 9px; font-weight: 900; color: #eaf6dd; }
.m-live .lv-shots { margin-left: auto; letter-spacing: .3px; }
.m-live .lv-shots em { font-style: normal; color: rgba(233, 244, 221, .35); font-size: 8px; margin: 0 1px; }
.m-live .lv-min { flex: 0 0 auto; font-size: 8px; font-weight: 900; color: var(--lime); }
.m-live .lv-tired { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; font-size: 7.5px; font-weight: 800;
  color: rgba(233, 244, 221, .72); min-height: 12px; }
.m-live .lv-tired.none { color: rgba(233, 244, 221, .35); }
.m-live .lv-tired b { font-size: 7.5px; font-weight: 900; color: #ffd23b; }
.m-live .lv-chip { padding: 1px 4px; border-radius: 6px; background: rgba(255, 210, 59, .16);
  border: 1px solid rgba(255, 210, 59, .38); color: #ffe28a; }
.m-live .lv-chip.hot { background: rgba(255, 59, 48, .2); border-color: rgba(255, 90, 78, .55); color: #ffb3ab; }
.m-live .lv-more { color: rgba(233, 244, 221, .5); }

/* 하단 티커 */
.m-ticker {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 8px;
  background: rgba(4, 18, 15, .98); border-top: 1px solid rgba(200, 241, 105, .16);
}
.tk-lbl { flex: 0 0 auto; font-size: 9.5px; font-weight: 900; color: #0d2a24; background: var(--lime); border-radius: 6px; padding: 2px 7px;
  opacity: .42; transition: opacity .15s ease, box-shadow .15s ease; }
.tk-lbl.on { opacity: 1; box-shadow: 0 0 8px rgba(200, 241, 105, .5); }
/* v17 — 2인 중계: 캐스터(라임) · 해설(시안), 지금 말하는 쪽만 밝다 */
.tk-lbl.exp { background: #8fd8ff; color: #06222e; }
.tk-lbl.exp.on { background: #cfeeff; box-shadow: 0 0 8px rgba(143, 216, 255, .6); }
.cmt-who { display: inline-block; margin-right: 4px; font-size: 9px; opacity: .85; }
.cmt-line.exp { color: #d6f0ff; }
.cmt-line.exp .cmt-min { color: #8fd8ff; }

.tbtn.off { color: #ffbdb0; border-color: rgba(255, 120, 100, .4); }
#m-comm-body.cmt-body {
  flex: 1 1 auto; max-height: 22px; height: 22px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0;
}
#m-comm-body .cmt-line { font-size: 11px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#m-comm-body .cmt-line .cmt-min { font-size: 9px; }
#m-comm-body .cmt-line:nth-last-child(n+2) { display: none; }
.tk-mgr { flex: 0 0 auto; max-width: 30%; font-size: 10.5px; line-height: 1.25; color: rgba(233, 244, 221, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-mgr .tk-style { color: #c8f169; font-weight: 900; }

/* ── 마이팀: 가로 전술판 + 감독 카드 2단 ── */
#screen-squad.on { display: block; }
.sq { display: flex; gap: 7px; height: 100%; }
.sq-left { flex: 1 1 60%; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sq-right { flex: 0 0 38%; max-width: 350px; display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.sq-right::-webkit-scrollbar { width: 0; }
.sq-mode { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.sq-mode .modehint { font-size: 9px; color: rgba(233, 244, 221, .55); white-space: nowrap; }
.sq-org { margin-left: auto; font-size: 9.5px; font-weight: 700; color: rgba(233, 244, 221, .72); white-space: nowrap; }
.sq-org em { font-style: normal; color: var(--lime); font-weight: 900; }
.sq-pitch {
  position: relative; flex: 1 1 auto; min-height: 140px; width: 100%;
  aspect-ratio: auto; max-height: none;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(200, 241, 105, .18); background: #0d3b32;
}
.sq-pitch .tok { width: 46px; margin: 0; transform: translate(-50%, -50%); }
.sq-pitch .tok .ring { width: 32px; height: 32px; margin: 0 auto; }
.sq-pitch .tok .nm { font-size: 7.5px; margin-top: -1px; padding: 0 2px; }
.sq-pitch .tok .rl { font-size: 6.5px; height: 12px; padding: 0 3px; top: 20px; }
.sq-bench {
  flex: 0 0 auto; display: flex; align-items: center; gap: 4px;
  background: rgba(9, 34, 28, .72); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px; padding: 3px 5px;
}
.sqb-lbl { flex: 0 0 auto; font-size: 7.5px; font-weight: 900; color: rgba(233, 244, 221, .5); letter-spacing: .4px; }
.sq-bench .pcard {
  flex: 1 1 0; min-width: 0; padding: 2px; border-radius: 8px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
}
.sq-bench .pcard .ph { width: 24px; height: 24px; margin: 0 auto 1px; border-width: 1px; }
.sq-bench .pcard .pn { font-size: 7.5px; color: #e9f4dd; }
.sq-bench .pcard .pm { font-size: 6.5px; gap: 2px; }
.sq-bench .pcard .pb { font-size: 6px; height: 11px; padding: 0 3px; }
.sq-bench .pcard .ov { font-size: 8.5px; color: #eafbd2; }
.sq-card { background: var(--card); border-radius: 12px; padding: 7px 9px; box-shadow: var(--shadow2); }
.sq-card .card-head { margin-bottom: 4px; }
.sq-card .kpis { border-radius: 9px; }
.fwrap { display: flex; flex-wrap: wrap; gap: 4px; }
.fwrap .fchip { flex: 1 1 calc(25% - 4px); min-width: 0; padding: 4px 3px; border-radius: 8px; }
.fwrap .fchip b { font-size: 9.5px; }
.fwrap .fchip span { font-size: 6.5px; overflow: hidden; text-overflow: ellipsis; }
.sq-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sq-syn .row { padding: 1px 0; }
.mgr-wrap { padding: 6px 8px; }

/* ── 모달 · 교체 · 컷인 (가로) ── */
#modal { align-items: center; }
.sheet { max-width: 640px; margin: 0 auto; border-radius: 16px; max-height: 94%; }
.sheet-body { padding: 10px 13px 12px; }
.sub-panel {
  left: 50%; right: auto; transform: translateX(-50%);
  width: min(760px, 96%); bottom: 8px; max-height: 94%; padding: 10px 12px;
}
.sub-list { max-height: 172px; }
.sub-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 5px; }
.sub-item { min-height: 17px; padding: 1px 5px; }
.cutin-art { width: auto; height: 96%; aspect-ratio: 1; right: 3%; }
.cutin-name { font-size: 26px; }
.cutin-body { width: 60%; }
.gcutin .cutin-body { width: 58%; }
#toast { bottom: 44px; }
/* v30 — 경기 중에는 피치 우하단 전술 적중 칩과 겹치지 않게 토스트를 한 단 올린다 */
body.in-match #toast { bottom: 84px; }

/* ── 가로 회전 안내 — v30: 완전 가로 전용 게임 (세로에서는 플레이 불가) ── */
.rotate {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(90deg, rgba(200,241,105,.045) 0 34px, rgba(255,255,255,0) 34px 68px),
    radial-gradient(72% 62% at 50% 38%, #12493d, #051714 74%);
  -webkit-user-select: none; user-select: none; touch-action: none;
}
body.rot .rotate { display: flex; }
/* v30 — 완전 가로 전용: 세로에서는 플레이 화면을 덮고, 회전하면 즉시 걷힌다(탈출 버튼 없음) */
body.rot .rotate { pointer-events: auto; }
body.rot { overflow: hidden; }
.rot-in { text-align: center; padding: 22px 20px; color: #eaf6dd; max-width: 320px; display: flex; flex-direction: column; align-items: center; }
.rot-ico {
  width: 84px; height: 84px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 60% at 40% 30%, rgba(200,241,105,.22), rgba(200,241,105,.05));
  border: 1px solid rgba(200,241,105,.34); box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
.rot-ico svg { width: 48px; height: 48px; stroke: var(--lime); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: rotWob 2.6s ease-in-out infinite; }
.rot-in b { display: block; font-size: 18px; font-weight: 900; margin: 13px 0 7px; letter-spacing: -.5px; color: #f2ffe2; }
.rot-in span { display: block; font-size: 11.5px; line-height: 1.7; color: rgba(233, 244, 221, .72); margin-bottom: 16px; }
.rot-in span em { font-style: normal; color: #c8f169; font-weight: 900; }
.rot-in .btn { display: block; width: 100%; height: 40px; margin-bottom: 10px; }
.rot-foot { display: block; font-style: normal; font-size: 9px; font-weight: 900; letter-spacing: .6px; color: rgba(200,241,105,.42); }
@keyframes rotWob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-90deg); } }

/* 아주 낮은 가로 화면(높이 340 이하) 보정 */
@media (max-height: 360px) {
  .topbar { height: 34px; }
  .m-top { height: 38px; }
  .m-ticker { height: 28px; }
  #m-comm-body.cmt-body { max-height: 20px; height: 20px; }
  #m-comm-body .cmt-line { font-size: 10.5px; }
  .tabbar button { height: 50px; }
}
/* v30 — 낮은 가로(높이 560 이하): 터치라인 지시·선수 교체 버튼을 30px로 올리고,
   모멘텀 안내 한 줄과 카드 간격을 접어 그 높이를 마련한다 (카드는 40px 유지). */
@media (orientation: landscape) and (max-height: 560px) {
  .m-side .mom-hint { display: none; }
  .m-side .hand.v7 { gap: 3px; }
  .m-side .tl-strip { height: 30px; }
  .m-side .m-acts .btn { height: 30px; }
}
/* 더 낮은 가로(높이 380 이하): 평점 칩 줄과 스탯 줄 간격을 접어 버튼 높이를 지킨다 */
@media (orientation: landscape) and (max-height: 380px) {
  .m-side { gap: 2px; }
  .m-side .m-live { gap: 1px; padding: 2px 5px 3px; }
  .m-side .m-live .lv-row { height: 11px; }
  .m-side .m-live .lv-rate { display: none; }
}

/* v7 보정: 밝은 카드 위 포메이션 칩 · 라커룸 시너지 한 줄 */
.sq-card .fchip { background: #f1ecdd; border: 1px solid var(--line); color: var(--ink2); }
.sq-card .fchip.on { background: linear-gradient(170deg, #d6fb8a, #a8da4e); border-color: #a8da4e; color: #1d3b07; box-shadow: 0 2px 6px rgba(120,180,50,.35); }
.sq-card .fchip.on b { color: #1d3b07; }
.sq-card .fchip span { color: var(--ink3); }
.sq-card .fchip.on span { color: #3d6b12; opacity: 1; }
/* v14 — 마이팀 카드(밝은 양피지) 위에서도 변칙 포메이션 칩은 보라색으로 구분 */
.sq-card .fchip.anom { background: #ede3ff; border-color: rgba(138, 92, 214, .45); color: #3a2360; }
.sq-card .fchip.anom b { color: #3a2360; }
.sq-card .fchip.anom span { color: #6b4fa0; }
.sq-card .fchip.anom.on {
  background: linear-gradient(170deg, #e0ccff, #a88cf5);
  border-color: #8a5cd6; color: #241436;
  box-shadow: 0 2px 6px rgba(120, 80, 200, .35);
}
.sq-card .fchip.anom.on b { color: #241436; }
.sq-card .fchip.anom.on span { color: #3a2360; opacity: 1; }
.sq-syn { padding: 5px 9px; }
.sq-syn .card-head { margin-bottom: 2px; }
.sq-syn { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow: hidden; }
.sq-syn .card-head { flex: 0 0 auto; margin: 0; }
.sq-syn .card-head .meta { display: none; }
.sq-syn .row { flex: 0 0 auto; padding: 0 !important; }
.sq-syn .row b { display: none; }
.sq-syn .chip { font-size: 8px; height: 17px; padding: 0 6px; }
.mgr-strip-btn { margin-left: auto; font-size: 9px; font-weight: 800; color: var(--lime); border: 1px solid rgba(200,241,105,.4); border-radius: 7px; padding: 3px 7px; white-space: nowrap; position: relative; }
.mgr-strip-btn::after { content: ""; position: absolute; inset: -5px; }

/* 결과서 · 모달 — 가로에서 2단 흐름 */
#modal[data-report="1"] .sheet { max-width: 780px; }
#modal[data-report="1"] .sheet-body { column-count: 2; column-gap: 12px; }
#modal[data-report="1"] .sheet-body > * { break-inside: avoid; }
.rs-score i { font-style: normal; color: var(--ink3); font-size: 16px; }
.sub-panel .sub-cols { grid-template-columns: 1fr 1fr; }

/* 상점 · 스카우트 후보 2×2 (가로) */
.scout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.scout-grid .scout { margin: 0; padding: 5px 6px; gap: 6px; }
.scout-grid .scout .art { width: 42px; height: 50px; border-radius: 8px; }
.scout-grid .scout .nm { font-size: 11px; }
.scout-grid .scout .mt { font-size: 7.5px; gap: 3px; margin-top: 1px; }
.scout-grid .scout .ov { font-size: 15px; }

/* 상점: 스페셜 스카우트 카드가 2칼럼을 차지해 후보 2×2가 잘리지 않는다 */
#screen-shop > .card.dark { grid-column: span 2; }
@media (max-width: 700px) { #screen-shop > .card.dark { grid-column: auto; } .scout-grid { grid-template-columns: 1fr; } }

/* v15 — 스카우트 확률 · 천장 표기 (구글 플레이 심사 대응) */
.scout-odds { margin-top: 7px; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.10); }
.scout-odds .so-line { display: flex; gap: 6px; align-items: baseline; font-size: 9px; line-height: 1.5; color: rgba(233,244,221,.72); }
.scout-odds .so-line b { flex: 0 0 auto; color: #c8f169; font-size: 9px; font-weight: 900; }
.scout-odds .so-line span { color: rgba(233,244,221,.66); font-weight: 700; }
.scout-odds .so-pity { margin-top: 3px; padding-top: 4px; border-top: 1px dashed rgba(255,255,255,.14); font-size: 9px; font-weight: 700; color: rgba(233,244,221,.72); }
.scout-odds .so-pity b { color: #ffd98a; font-weight: 900; }
.scout-odds .so-pity.full { color: #ffd98a; }
.scout-odds .so-pity.full b { color: #c9a6ff; }

/* ── v19 ④ — 상세 결과서 2D 미니피치 (슈팅 xG맵 · 평균 포지션/패스 연결망) ── */
.rmap { padding: 6px 7px 5px; margin: 0 0 8px; }
.rmap-tabs { display: flex; gap: 4px; margin-bottom: 5px; }
.rmap-tab {
  flex: 1 1 0; min-width: 0; height: 22px; border-radius: 7px;
  border: 1px solid var(--line); background: #f1ecdd; color: var(--ink2);
  font-size: 9px; font-weight: 800; letter-spacing: -.2px;
  font-family: inherit;
}
.rmap-tab.on { background: linear-gradient(170deg, #d6fb8a, #a8da4e); border-color: #a8da4e; color: #1d3b07; }
.rmap-cv { display: block; width: 100%; height: auto; border-radius: 9px; background: #0c3229; }
.rmap-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-height: 17px; }
.rmap-sides { display: flex; gap: 3px; }
.rmap-side {
  height: 17px; padding: 0 7px; border-radius: 6px;
  border: 1px solid var(--line); background: #f1ecdd; color: var(--ink3);
  font-size: 8px; font-weight: 900; letter-spacing: .4px;
  font-family: inherit;
}
.rmap-side.on { background: #143a31; color: #d6fb8a; border-color: #143a31; }
.rmap-note { margin-left: auto; font-size: 8px; font-weight: 700; color: var(--ink3); text-align: right; }
.rmap[data-mapmode="xg"] .rmap-sides { display: none; }

/* ═══════════════════════════════════════════════════════════════
   v20 — SD 아트와 같은 결의 '전술판' 톤
   · 예전 도트 시설 아이콘을 고해상도 SD 일러스트 캔버스로 교체
   · 프리매치/라커룸/선수 카드/전술판 프레임을 얇은 그리드 + 코너 틱으로 통일
   ═══════════════════════════════════════════════════════════════ */
:root {
  --board-line: rgba(200, 241, 105, .22);
  --board-line-soft: rgba(255, 255, 255, .10);
}

/* ── 시설 SD 일러스트 (클럽 하우스) ── */
.fac { position: relative; overflow: hidden; }
.fac::after {
  content: ""; position: absolute; right: 6px; top: 5px; width: 9px; height: 9px;
  border-right: 1px solid var(--line); border-top: 1px solid var(--line); opacity: .8; pointer-events: none;
}
.fac-art {
  width: 62px; height: 50px; flex: 0 0 auto; display: block;
  border-radius: 9px; background: linear-gradient(160deg, #eef6dd, #dbe8c8);
  box-shadow: inset 0 0 0 1px rgba(20, 33, 28, .07), 0 2px 5px rgba(20, 45, 30, .10);
}

/* ── 스카우터 안내원 (상점) ── */
.scout-desk {
  display: flex; align-items: center; gap: 9px; margin: 0 0 7px;
  padding: 6px 8px; border-radius: 12px;
  background: linear-gradient(120deg, rgba(200, 241, 105, .10), rgba(255, 255, 255, .03));
  border: 1px solid rgba(200, 241, 105, .20);
}
.staff-art { width: 48px; height: 56px; flex: 0 0 auto; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.sd-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sd-copy b { font-size: 11.5px; font-weight: 900; color: #eaf6dd; letter-spacing: -.2px; }
.sd-copy span { font-size: 8.5px; font-weight: 700; color: rgba(233, 244, 221, .70); }
.sd-copy em { font-style: normal; font-size: 8px; font-weight: 700; color: rgba(200, 241, 105, .78); }

/* ── v20 ① 라이브 터치라인 지시 ── */
.m-side { position: relative; }
.m-tac { flex: 0 0 auto; }
.tl-strip {
  display: flex; align-items: center; gap: 5px; width: 100%; height: 32px;
  padding: 0 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(200, 241, 105, .30);
  background: linear-gradient(180deg, rgba(200, 241, 105, .12), rgba(200, 241, 105, .05));
  color: #eaf6dd; font-family: inherit; text-align: left;
}
.tl-strip.on { border-color: var(--lime); background: linear-gradient(180deg, rgba(200, 241, 105, .25), rgba(200, 241, 105, .10)); }
.tl-lbl {
  flex: 0 0 auto; font-size: 8.5px; font-weight: 900; letter-spacing: .4px;
  color: #0d2a24; background: var(--lime); border-radius: 5px; padding: 1px 5px;
}
.tl-chips {
  flex: 1 1 auto; min-width: 0; font-size: 10px; font-weight: 800; color: rgba(233, 244, 221, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-go { flex: 0 0 auto; font-size: 9.5px; font-weight: 900; color: var(--lime); }

.m-touch {
  position: absolute; inset: 0; z-index: 12;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px 7px 7px; border-radius: 0;
  background: linear-gradient(180deg, rgba(8, 30, 24, .985), rgba(5, 20, 17, .99));
  border-left: 1px solid rgba(200, 241, 105, .28);
  box-shadow: -8px 0 20px rgba(0, 0, 0, .45);
  transform: translateX(103%); opacity: 0; pointer-events: none;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), opacity .16s linear;
}
.m-touch.on { transform: none; opacity: 1; pointer-events: auto; }
.mt-head { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mt-head b { font-size: 10.5px; font-weight: 900; letter-spacing: -.2px; color: #eaf6dd; }
.mt-x {
  margin-left: auto; width: 30px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07);
  color: #dfeece; font-size: 12px; font-weight: 900; font-family: inherit;
}
.mt-groups { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; }
.mt-g { display: flex; flex-direction: column; gap: 2px; }
.mt-lbl { font-size: 8px; font-weight: 900; letter-spacing: .3px; color: rgba(233, 244, 221, .58); }
.mt-opts { display: flex; gap: 3px; }
.mt-opts button {
  flex: 1 1 0; min-width: 0; height: 32px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .05);
  color: rgba(233, 244, 221, .82); font-size: 9.5px; font-weight: 800; font-family: inherit;
  padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mt-opts button.on {
  border-color: var(--lime); color: #12290a;
  background: linear-gradient(180deg, #dcff8f, #b4e154);
  box-shadow: 0 0 8px rgba(200, 241, 105, .35);
}
.mt-opts button:active { transform: translateY(1px); }
.mt-foot { flex: 0 0 auto; font-size: 7.5px; font-weight: 700; color: rgba(233, 244, 221, .45); }

/* ── v20 ③ 상대 스카우팅 리포트 ── */
.scout-card {
  background: linear-gradient(165deg, #ffffff, #f4f1e6);
  border: 1px solid var(--line); border-radius: 13px;
  padding: 8px 10px 9px; position: relative; overflow: hidden;
}
.scout-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--lime2), rgba(200, 241, 105, .15));
}
.sc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.sc-emblem { width: 24px; height: 28px; flex: 0 0 auto; }
.sc-id { flex: 1 1 auto; min-width: 0; }
.sc-id b { display: block; font-size: 11px; font-weight: 900; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-id span { display: block; font-size: 8px; font-weight: 700; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-tag { flex: 0 0 auto; text-align: center; padding: 0 5px; border-left: 1px solid var(--line); }
.sc-tag b { display: block; font-size: 12px; font-weight: 900; color: #3d6b12; line-height: 1.05; }
.sc-tag span { display: block; font-size: 7px; font-weight: 800; color: var(--ink3); letter-spacing: .3px; }
.sc-lanes { display: flex; gap: 4px; margin-bottom: 5px; }
.sc-lane {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 3px;
  font-size: 7.5px; font-weight: 900; color: var(--ink3);
}
.sc-lane span { flex: 0 0 auto; }
.sc-lane i {
  flex: 1 1 auto; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, #9fce55, #d6f58c);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 60, .18);
}
.sc-lane b { flex: 0 0 auto; font-size: 8px; color: var(--ink2); }
.sc-danger { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.sc-danger-row {
  display: flex; align-items: center; gap: 4px; font-size: 8.5px; font-weight: 800; color: var(--ink);
  background: rgba(239, 106, 82, .09); border: 1px solid rgba(239, 106, 82, .22);
  border-radius: 7px; padding: 2px 5px;
}
.sc-rank {
  flex: 0 0 auto; width: 13px; height: 13px; border-radius: 4px; background: var(--coral); color: #fff;
  font-size: 8px; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.sc-danger-row b { font-size: 9.5px; font-weight: 900; letter-spacing: -.2px; }
.sc-pos { color: var(--ink2); font-size: 8px; font-weight: 800; }
.sc-foot { color: var(--ink3); font-size: 7.5px; font-weight: 800; }
.sc-danger-row em { margin-left: auto; font-style: normal; font-size: 9.5px; font-weight: 900; color: #b8492f; }
.sc-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sc-tips li {
  position: relative; padding-left: 9px; font-size: 8.5px; font-weight: 700; color: var(--ink2); line-height: 1.45;
}
.sc-tips li::before {
  content: ""; position: absolute; left: 1px; top: 5px; width: 4px; height: 4px; border-radius: 1px;
  background: var(--lime2); transform: rotate(45deg);
}
.sc-note { margin-top: 4px; padding-top: 3px; border-top: 1px dashed var(--line); font-size: 7.5px; font-weight: 700; color: var(--ink3); }

/* ── 전술판 프레임 통일: 피치판·선수 카드·라커룸 카드에 같은 헤어라인 ── */
.sq-pitch, .pitch-wrap { position: relative; }
.sq-pitch::before, .pitch-wrap::before {
  content: ""; position: absolute; left: 4px; top: 4px; width: 11px; height: 11px; pointer-events: none; z-index: 4;
  border-left: 1px solid var(--board-line); border-top: 1px solid var(--board-line);
}
.sq-pitch::after, .pitch-wrap::after {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 11px; height: 11px; pointer-events: none; z-index: 4;
  border-right: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line);
}
.sq-card, .pcard, .pd-art, .sq-syn {
  border-radius: 12px;
}
.sq-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), var(--shadow2); }
.sq-pitch { box-shadow: inset 0 0 0 1px rgba(200, 241, 105, .10), 0 8px 18px rgba(0, 0, 0, .28); }
.mgr-wrap { border-radius: 13px; }

/* v20 보정 — 시설 카드 헤더: 일러스트 + 이름/레벨을 한 줄에 (이름 세로 줄바꿈 방지) */
.fac-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.fac-art { width: 44px; height: 36px; border-radius: 8px; }
.fac-tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fac-name { font-size: 10px; font-weight: 900; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-lv { font-size: 8px; font-weight: 800; color: var(--ink3); white-space: nowrap; }
.fac-art { width: 40px; height: 33px; }
.fac-name { font-size: 9.5px; letter-spacing: -.5px; }

/* ═════════════ v21 ═════════════
   ① 초상화 류(감독·선수·유소년)은 어느 프레임에서도 잘리지 않는다.
      - 둥근 head 크롭: contain + 아래 정렬 → 밑단이 잘리지 않음
      - 전신/반신 초상: contain + 하단 정렬 */
.mgr-art, .mgr-art img { overflow: hidden; }
.mgr-art img, .pcard .ph img, .minihead img, .sl-row .ph img, .yth .ph img {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 26%;
}
.scout .art img, .mkt .art img, .pd-art img { object-fit: contain; object-position: 50% 100%; }
.mgr-art img { object-position: 50% 30%; }

/* ② 리그 존 색 (UCL·UEL·강등) */
.tbl tr.z-ucl td.rk { color: #2f6fbf; }
.tbl tr.z-uel td.rk { color: #2f8f62; }
.tbl tr.z-rel td.rk { color: #c8432f; }
.tbl td.rk { position: relative; }
.tbl td.rk .zbar { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 3px; height: 13px; border-radius: 2px; background: currentColor; opacity: .85; }
.tbl tr.z-ucl .zbar { background: #2f6fbf; }
.tbl tr.z-uel .zbar { background: #2f8f62; }
.tbl tr.z-rel .zbar { background: #c8432f; }
.zlegend { display: flex; gap: 8px; margin-top: 4px; font-size: 7.5px; font-weight: 800; color: var(--ink3); }
.zlegend span { display: inline-flex; align-items: center; gap: 3px; }
.zlegend i { width: 3px; height: 9px; border-radius: 2px; display: inline-block; }
.zlegend .z-ucl i { background: #2f6fbf; }
.zlegend .z-uel i { background: #2f8f62; }
.zlegend .z-rel i { background: #c8432f; }

/* ③ 이적시장 */
/* v27 — 매물 갱신 주기 안내 (라운드 종료 시 자동 갱신) */
.mkt-timer {
  display: flex; align-items: center; gap: 5px; margin: 0 0 5px; padding: 4px 7px;
  border-radius: 8px; background: rgba(200, 241, 105, .10); border: 1px solid rgba(200, 241, 105, .28);
  white-space: nowrap; overflow: hidden;
}
.mkt-timer .mt-l { font-size: 8px; font-weight: 900; color: #c8f169; letter-spacing: -.2px; }
.mkt-timer b { font-size: 9.5px; font-weight: 900; color: #f2fbff; }
.mkt-timer em { margin-left: auto; font-style: normal; font-size: 7.5px; font-weight: 800; color: rgba(233, 244, 221, .62); }
@media (max-width: 430px) {
  .mkt-timer { gap: 4px; padding: 3px 6px; }
  .mkt-timer b { font-size: 9px; }
  .mkt-timer em { font-size: 7px; }
}
.mkt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-items: start; }
.mkt {
  display: flex; gap: 5px; padding: 4px 5px; border-radius: 10px; align-items: flex-start;
  background: var(--card2); border: 1px solid var(--line); min-width: 0;
}
.mkt .art { width: 34px; height: 42px; flex: 0 0 auto; border-radius: 7px; overflow: hidden; background: linear-gradient(160deg, #e9f3d5, #d8e6bd); }
.mkt .art img { width: 100%; height: 100%; }
.mkt .mm { min-width: 0; flex: 1 1 auto; }
.mkt .nm { display: flex; align-items: baseline; gap: 3px; font-size: 9.5px; font-weight: 900; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt .nm .pv { margin-left: auto; font-size: 11px; font-weight: 900; color: var(--ink); }
.mkt .mt { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; margin-top: 1px; font-size: 7px; line-height: 1.25; }
.mkt .from { color: var(--ink3); font-size: 7px; font-weight: 800; }
.mkt .fee { display: flex; align-items: baseline; gap: 3px; margin-top: 1px; white-space: nowrap; }
.mkt .fee b { font-size: 10.5px; font-weight: 900; color: #b8492f; }
.mkt .fee span { font-size: 6.5px; font-weight: 700; color: var(--ink3); }
.mkt-btns { gap: 3px; margin-top: 2px; flex-wrap: nowrap; }
.mkt-btns .btn { flex: 1 1 0; min-width: 0; padding: 2px 3px; font-size: 8px; white-space: nowrap; line-height: 1.2; }
.mkt-empty { grid-column: span 2; padding: 10px; text-align: center; font-size: 9px; font-weight: 700; color: var(--ink3); }
.ml-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.ml-row b { font-size: 9.5px; font-weight: 900; }
.ml-row .btn { margin-left: auto; }
.sl-list { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow-y: auto; }
.sl-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; border-bottom: 1px dashed var(--line); }
.sl-row.listed { opacity: .6; }
.sl-row .ph { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #e8e4d5; }
.sl-row .nm { min-width: 0; font-size: 9px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-row .nm em { display: block; font-style: normal; font-size: 7px; font-weight: 800; color: var(--ink3); }
.sl-row .val { margin-left: auto; font-size: 8.5px; font-weight: 900; color: #b8492f; }
.sl-row .tag { font-size: 7px; font-weight: 900; color: var(--ink3); padding: 1px 4px; border-radius: 5px; background: rgba(20,33,28,.08); }

/* ④ 유소년 아카데미 */
.youth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.yth {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 4px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--card2); cursor: pointer;
}
.yth.on { border-color: var(--lime2); box-shadow: 0 0 0 1px var(--lime2) inset; }
.yth .ph { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #e8e4d5; }
.yth .nm { font-size: 9px; font-weight: 900; }
.yth .mt { display: flex; align-items: center; gap: 2px; font-size: 7px; flex-wrap: nowrap; }
.yth .mt .ov { margin-left: auto; padding-right: 1px; }
.yth .ov { font-size: 10px; font-weight: 900; color: var(--ink); }
.yth .pot { font-size: 7px; display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.1; }
.yth .pot .stars { font-size: 8px; letter-spacing: .5px; }
.youth-coach { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.pcwrap { display: flex; gap: 3px; flex-wrap: wrap; }
.pc { font-size: 8.5px; font-weight: 900; padding: 4px 7px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; position: relative; }
.pc::after { content: ""; position: absolute; inset: -4px; }   /* v30 — 터치 영역 확장(레이아웃 불변) */
.pc.on { background: var(--lime); color: #1d3b07; border-color: var(--lime2); }

/* ⑤ 결과서 EXP */
.ex-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; border-bottom: 1px dashed var(--line); }
.ex-row.up { background: linear-gradient(90deg, rgba(200,241,105,.22), rgba(200,241,105,0)); }
.ex-nm { min-width: 0; flex: 0 0 40%; font-size: 9px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-nm em { font-style: normal; font-size: 7px; font-weight: 800; color: var(--ink3); margin-left: 3px; }
.ex-nm .ex-tag { display: inline-block; margin-left: 3px; font-size: 6.5px; font-weight: 900; padding: 0 3px; border-radius: 4px; vertical-align: 1px; }
.ex-tag.yth { background: rgba(200,241,105,.42); color: #2f5a10; }
.ex-tag.bloom { background: rgba(47,143,98,.18); color: #22684a; }
.ex-tag.plateau { background: rgba(176,125,31,.18); color: #7d5a12; }
.ex-tag.decline { background: rgba(192,67,47,.16); color: #a53a26; }
.ex-bar { flex: 1 1 auto; height: 5px; border-radius: 3px; background: rgba(20,33,28,.12); overflow: hidden; }
.ex-bar i { display: block; height: 100%; background: var(--lime2); }
.ex-v { font-size: 8px; font-weight: 900; color: #3d6b12; min-width: 26px; text-align: right; }
.ex-lv { font-size: 7.5px; font-weight: 800; color: var(--ink3); min-width: 26px; text-align: right; }
.ex-up { font-size: 8px; font-weight: 900; color: #1d6b2f; min-width: 44px; text-align: right; }

/* ⑥ 경기 라이브 HUD — xG·유효슈팅·평점 한 줄 */
.lv-xg { display: flex; gap: 6px; align-items: center; font-size: 8px; font-weight: 800; color: rgba(233,244,221,.62); }
.lv-xg b { color: #eaffd2; font-size: 9px; }
.lv-rate { display: flex; gap: 4px; align-items: center; font-size: 7.5px; font-weight: 800; color: rgba(233,244,221,.55); flex-wrap: wrap; }
.lv-rate .rt { padding: 1px 4px; border-radius: 5px; background: rgba(255,255,255,.10); color: #eaffd2; }
.lv-rate .rt.low { background: rgba(226,85,63,.22); color: #ffd9cf; }
.lv-rate .rt.high { background: rgba(200,241,105,.20); color: #e9ffbf; }

/* ═══════════════════════════════════════════════════════════════
   v21b — UI/UX 6종 개선
   ② 롤 진화 잠금 · ③ 경기 화면 밀도 · ⑤ 모멘텀 눈금 · ⑥ 초보자 가이드
   ═══════════════════════════════════════════════════════════════ */

/* ② 조건 미달 진화 버튼은 눌리지 않는 '잠금' 상태로 보인다 */
.btn.locked, .btn[disabled].locked {
  background: #e9e4d4; border: 1px dashed #cfc7b2; color: #9a9384;
  opacity: 1; box-shadow: none; letter-spacing: -.2px;
}

/* ③ 경기 화면 — 피치를 16:9로 유지하고 남는 세로 공간은 선발 바가 채운다 */
.m-pitch-col { display: flex; flex-direction: column; min-height: 0; }
.m-pitch-col > .pitch-wrap { position: relative; flex: 0 0 auto; min-height: 0; }
.m-pitch-col > .pitch-wrap > #m-pitch { width: 100%; height: 100%; }

.m-squad {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px 8px 7px;
  background: linear-gradient(180deg, rgba(7, 27, 23, .97), rgba(5, 20, 17, .99));
  border-top: 1px solid rgba(200, 241, 105, .16);
}
.m-squad.off { display: none; }
.ms-head { flex: 0 0 auto; display: flex; align-items: baseline; gap: 6px; }
.ms-head b { font-size: 9px; font-weight: 900; letter-spacing: .8px; color: var(--lime); }
.ms-head span { font-size: 8px; font-weight: 800; color: rgba(233, 244, 221, .5); letter-spacing: .3px; }
.ms-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr); gap: 5px;
}
.ms-card {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto auto; align-content: center; align-items: center;
  column-gap: 8px; row-gap: 6px; padding: 8px 10px; min-height: 0; overflow: hidden;
  border-radius: 9px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
}
.ms-face { grid-column: 1; grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #17362e; }
.ms-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.ms-tx { grid-column: 2; grid-row: 1; min-width: 0; }
.ms-tx b { display: block; font-size: 10px; font-weight: 900; color: #eaf6dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-tx em { display: block; font-style: normal; font-size: 8px; font-weight: 800; color: rgba(233, 244, 221, .55); letter-spacing: .2px; }
.ms-bar { grid-column: 2; grid-row: 2; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.ms-bar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7fc63d, #c8f169); }
.ms-rt { grid-column: 3; grid-row: 1 / span 2; font-size: 15px; font-weight: 900; color: #f0f9e2; letter-spacing: -.5px; }
.ms-card.warn .ms-rt { color: #ffd98a; }
.ms-card.hot .ms-rt { color: #ff9f8a; }
.ms-card.hot .ms-bar > i { background: linear-gradient(90deg, #d9483a, #ff8c78); }

/* ③ 우측 패널 — 카드가 남는 높이를 나눠 갖고, 스탯 박스는 컴팩트하게 붙는다 */
.m-side { justify-content: flex-start; }
.m-live { margin-top: 0; }
@media (min-height: 700px) and (orientation: landscape) {
  .m-side { gap: 7px; padding: 7px 7px 8px; }
  .m-side .mom { padding: 8px 9px 9px; border-radius: 12px; }
  .m-side .mom-top b { font-size: 9px; }
  .m-side .mom-top .val { font-size: 15px; }
  .m-side .mom-bar { height: 8px; }
  .hand.v7 { flex: 1 1 auto; gap: 6px; }
  .tcard.v7 { flex: 1 1 0; min-height: 0; max-height: none; padding: 10px 11px; align-items: center; gap: 10px; }
  .tcard.v7 .tc-face { width: 66px; height: 82px; border-radius: 10px; }
  .tcard.v7 .tc-main { flex: 1 1 auto; }
  .tcard.v7 .tag { font-size: 8px; }
  .tcard.v7 .nm { font-size: 13px; margin-top: 3px; }
  .tcard.v7 .cd { font-size: 8.5px; margin-top: 2px; }
  .tcard.v7 .cost { font-size: 9.5px; }
  .tcard.v7 .cost em { font-size: 12px; }
  .tc-desc { display: block; font-size: 10.5px; line-height: 1.45; margin-top: 4px; }
}
.tc-desc {
  display: none; font-size: 8px; font-weight: 700; line-height: 1.35;
  color: rgba(233, 244, 221, .55); margin-top: 2px;
  white-space: normal; overflow: hidden;
}

/* ⑤ 모멘텀 — 손패 카드 코스트 눈금 + 다음 카드까지 안내 */
.mom-scale { position: relative; height: 15px; margin: -1px 0 1px; }
.mom-scale b {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 7px; font-weight: 900; color: rgba(233, 244, 221, .62);
  letter-spacing: -.2px; white-space: nowrap;
}
.mom-scale b.r1 { top: 8px; }
.mom-scale b i { font-style: normal; font-size: 6px; opacity: .66; margin-left: 1px; }
.mom-ticks { position: absolute; inset: 0; pointer-events: none; }
.mom-ticks b {
  position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px;
  border-radius: 2px; background: rgba(233, 244, 221, .45);
}
.mom-ticks b.next { background: #ffd23b; box-shadow: 0 0 6px rgba(255, 210, 59, .9); }
.mom-ticks b.on { background: #f6ffd9; box-shadow: 0 0 6px rgba(246, 255, 217, .8); }
.mom-hint {
  margin-top: 3px; font-size: 7.5px; font-weight: 800; letter-spacing: -.1px;
  color: rgba(233, 244, 221, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mom-hint.next { color: #ffd98a; }
.mom-hint.ready { color: var(--lime); }
.mom-hint.done { color: rgba(233, 244, 221, .35); }
@media (max-height: 560px) {
  .mom-scale { display: none; }
  .mom-hint { font-size: 7px; margin-top: 2px; }
}

/* ⑥ 홈 초보자 3단계 가이드 */
.gd-card { padding: 9px 10px 8px; background: linear-gradient(165deg, #ffffff, #f3f6e6); }
.gd-card .card-head { margin-bottom: 5px; }
.gd-card .gd-x { margin-left: 6px; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink3); font-size: 11px; font-weight: 900; line-height: 1; }
.gd-step { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px dashed var(--line); }
.gd-step:first-of-type { border-top: none; }
.gd-no {
  flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, #d6fb8a, #a8da4e); color: #1d3b07;
  font-size: 10px; font-weight: 900;
}
.gd-step.done .gd-no { background: #dfe9cf; color: #4f7d13; }
.gd-tx { flex: 1 1 auto; min-width: 0; }
.gd-tx b { display: block; font-size: 10.5px; font-weight: 900; color: var(--ink); letter-spacing: -.3px; }
.gd-tx em { display: block; font-style: normal; font-size: 8px; font-weight: 700; color: var(--ink3); }
.gd-step.done .gd-tx b { color: var(--ink2); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(92, 107, 98, .45); }
.gd-ok { flex: 0 0 auto; font-size: 8px; font-weight: 900; color: #4f7d13; background: rgba(166, 216, 76, .22); border-radius: 6px; padding: 3px 6px; }
.gd-step .btn { flex: 0 0 auto; height: 26px; padding: 0 9px; font-size: 10px; }
.gd-foot { display: flex; align-items: center; gap: 6px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
.gd-foot span { flex: 1 1 auto; font-size: 8px; font-weight: 700; color: var(--ink3); }
.gd-hide { flex: 0 0 auto; font-size: 9px; font-weight: 800; color: var(--ink3); background: none; border: none; text-decoration: underline; padding: 3px; position: relative; }
.gd-hide::after { content: ""; position: absolute; inset: -6px -2px; }
.gd-card.all { background: linear-gradient(165deg, #f4ffe0, #e6f5c6); }
.gd-bar {
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px; padding: 5px 9px;
  border-radius: 11px; background: rgba(200, 241, 105, .12); border: 1px solid rgba(200, 241, 105, .34);
  grid-column: 1 / -1;
}
.gd-bar b { font-size: 9.5px; font-weight: 900; color: var(--lime); letter-spacing: .2px; }
.gd-bar span { font-size: 8.5px; font-weight: 800; color: rgba(233, 244, 221, .62); }
.gd-bar button { margin-left: auto; background: none; border: none; color: #eaf6dd; font-size: 9px; font-weight: 900; }
.gd-bar .gd-x { margin-left: 4px; color: rgba(233, 244, 221, .6); font-size: 10px; }
.gd-card { grid-column: 1 / -1; }

/* ③ 세로 화면(390×844) — 피치 위 / 사이드 아래로 쌓아 겹침을 없앤다 */
@media (orientation: portrait) and (max-width: 700px) {
  .m-body { flex-direction: column; }
  .m-pitch-col { flex: 0 0 auto; width: 100%; }
  .m-side {
    flex: 1 1 auto; min-width: 0; max-width: none; width: 100%;
    border-left: none; border-top: 1px solid rgba(200, 241, 105, .16);
    overflow-y: auto;
  }
  .m-side .hand.v7 { flex: 0 0 auto; }
  .m-side .tcard.v7 { flex: 0 0 auto; max-height: 76px; align-items: center; gap: 5px; }
  .m-side .tcard.v7 .tc-face { width: 36px; height: 44px; border-radius: 8px; }
  .tc-desc { display: none; }
  .m-top { gap: 5px; padding: 0 6px; }
  .mt-name { max-width: 78px; font-size: 10.5px; }
  .m-top #m-speeds button { min-width: 22px; padding: 0 4px; }
  .m-top .tbtn { padding: 0 6px; }
}

@media (orientation: portrait) and (max-width: 700px) {
  .m-top { flex-wrap: wrap; height: auto; min-height: 36px; padding: 4px 6px; row-gap: 3px; }
  .m-top .mt-team { flex: 1 1 0; min-width: 0; }
  .mt-team.away { justify-content: flex-end; }
  .mt-name { max-width: 96px; }
  .mt-tools { flex: 1 1 100%; margin-left: 0; justify-content: flex-end; }
}

/* 낮은 가로 화면: 초보자 가이드는 한 줄 더 조밀하게 (위 기본 규칙보다 뒤에 와야 이긴다) */
@media (max-height: 560px) {
  .gd-card { padding: 7px 9px 6px; }
  .gd-step { padding: 2px 0; }
  .gd-tx b { font-size: 10px; }
  .gd-tx em { font-size: 7.5px; }
  .gd-foot { margin-top: 3px; padding-top: 3px; }
  .gd-step .btn { height: 26px; }
  .gd-no { width: 17px; height: 17px; font-size: 9px; }
  .gd-card .card-head { margin-bottom: 3px; }
}

/* .tc-desc 기본값(display:none)보다 뒤에서 높은 화면용 설명줄을 다시 켠다 */
@media (min-height: 700px) and (orientation: landscape) {
  .tc-desc { display: block; }
}

/* ═════════════════  v22 — 1·2부 리그 · 전술 카드 일러스트 · 눈금 라벨  ═════════════════ */

/* ① 순위표 1부/2부 탭 · 승격/PO 라인 */
.card-head .seg.divs { margin-left: auto; }
.seg.divs button { min-width: 44px; height: 24px; font-size: 9px; padding: 0 6px; }
.tbl tr.z-pro td.rk { color: #2f8f62; }
.tbl tr.z-po td.rk { color: #2f6fbf; }
.tbl tr.z-pro .zbar { background: #2f8f62; }
.tbl tr.z-po .zbar { background: #2f6fbf; }
.zlegend .z-pro i { background: #2f8f62; }
.zlegend .z-po i { background: #2f6fbf; }

/* ④ 전술 카드 고유 전략 일러스트 */
.tac-art { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; background: #0b241e; }
.tcard.v7 .tc-face .tac-art { box-shadow: inset 0 0 0 1px rgba(200, 241, 105, .18); }
.tac-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tcard.v7 .tc-face .tac-art img { object-fit: contain; }
.deckcard .dc-art { position: absolute; inset: 0; border-radius: 0; }
.deckcard .dc-art img { object-fit: contain; opacity: .92; }
.deckcard > .tg, .deckcard > .nm, .deckcard > .mt { position: relative; z-index: 2; }
.deckcard::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 32, 26, .04) 0%, rgba(9, 32, 26, .52) 42%, rgba(9, 32, 26, .93) 100%);
}
.deckrow { grid-template-columns: 54px 1fr 34px; }
.deckrow .dr-art {
  position: relative; display: block; width: 54px; height: 34px;
  border-radius: 8px; overflow: hidden; background: #0b241e;
  border: 1px solid rgba(20, 40, 32, .18);
}
.deckrow .dr-art em {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  font-style: normal; font-size: 7px; font-weight: 900; text-align: center;
  letter-spacing: .2px; background: rgba(9, 30, 25, .78); padding: 1px 0;
}

/* ⑤ 모멘텀 눈금 라벨 세 줄 — 줄 간격은 글자 높이(9.4px)보다 크게 잡아 세로로도 겹치지 않게 */
.mom-scale { height: 11px; }
.mom-scale b.r1 { top: 10px; }
.mom-scale b.r2 { top: 20px; }

/* 시즌 결산 모달 */
.rv-hero { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 12px; background: linear-gradient(160deg, #1b463b, #0e2b25); color: #eaf6dd; }
.rv-hero b { display: block; font-size: 12px; font-weight: 900; letter-spacing: -.3px; }
.rv-hero em { display: block; font-style: normal; font-size: 9px; color: rgba(233, 244, 221, .62); margin-top: 2px; }
.rv-out { flex: 0 0 auto; font-size: 12px; font-weight: 900; padding: 5px 9px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: #eaf6dd; }
.rv-out.lime { background: var(--lime); color: #1d3b07; }
.rv-out.coral { background: #e2553f; color: #fff5f1; }
.rv-sec { margin-top: 7px; padding: 7px 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2); }
.rv-h { font-size: 9px; font-weight: 900; letter-spacing: -.2px; margin-bottom: 4px; }
.rv-h span { font-size: 7.5px; font-weight: 800; color: var(--ink3); margin-left: 4px; }
.rv-po { display: grid; grid-template-columns: 44px 1fr auto 1fr auto; align-items: center; gap: 3px; font-size: 9px; padding: 2px 0; border-top: 1px dashed var(--line); }
.rv-po:first-of-type { border-top: none; }
.rv-po .st { font-size: 7.5px; font-weight: 900; color: var(--ink3); }
.rv-po .tm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-po .tm.away { text-align: right; }
.rv-po .sc { font-size: 10px; font-weight: 900; letter-spacing: -.3px; }
.rv-po em { font-style: normal; font-size: 7px; font-weight: 900; color: #c8432f; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rv-rows { display: flex; flex-direction: column; gap: 2px; }
.rv-row { display: flex; align-items: center; gap: 6px; font-size: 9.5px; padding: 1px 0; }
.rv-row span { flex: 0 0 62px; color: var(--ink3); font-weight: 800; font-size: 8.5px; }
.rv-row b { font-weight: 900; }
.rv-row em { font-style: normal; font-size: 7.5px; color: var(--ink3); margin-left: auto; }

/* v22 — 손패 카드 일러스트는 3:2 전술보드 비율로 보여준다 */
.tcard.v7 .tc-face { width: 46px; height: 31px; border-radius: 7px; }
@media (min-height: 700px) and (orientation: landscape) {
  .tcard.v7 .tc-face { width: 92px; height: 62px; border-radius: 10px; }
}

/* 시즌 결산 — 낮은 가로 화면에서는 두 단으로 접어 한 화면에 담는다 */
@media (max-height: 560px) {
  .sheet.rv-sheet .sheet-body { column-count: 2; column-gap: 10px; }
  .sheet.rv-sheet .sheet-body > * { break-inside: avoid; }
  .sheet.rv-sheet .rv-sec { margin-top: 5px; padding: 5px 7px; }
  .sheet.rv-sheet .rv-hero { padding: 6px 8px; }
  .sheet.rv-sheet .sheet-body > .btn { margin-top: 5px !important; }
}

/* 세로 화면 손패도 3:2 전술보드 비율 유지 */
@media (orientation: portrait) and (max-width: 700px) {
  .m-side .tcard.v7 .tc-face { width: 66px; height: 44px; border-radius: 8px; }
}

/* ═════════════════ v23 — 나이 곡선 · 2군 리그 · 유소년/감독 육성 표기 ═════════════════ */
.age-badge {
  display: inline-flex; align-items: center; gap: 2px; font-size: 7.5px; font-weight: 900;
  padding: 1px 5px; border-radius: 6px; border: 1px solid var(--line); background: rgba(20,33,28,.05); color: var(--ink2);
}
.age-badge.youth { background: rgba(200,241,105,.4); color: #2f5a10; border-color: rgba(166,216,76,.6); }
.mgr-grow { display: block; font-size: 8px; font-weight: 800; color: #3d6b12; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-gr, .mcard-gr { display: block; font-size: 7.5px; font-weight: 800; color: #3d6b12; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard { position: relative; }
.pcard .pc-yt { position: absolute; top: 2px; right: 2px; font-style: normal; font-size: 6px; font-weight: 900; color: #2f5a10; background: rgba(200,241,105,.85); border-radius: 4px; padding: 0 3px; }
.yth .yth-rv { font-style: normal; font-size: 6.5px; font-weight: 900; color: #fff; background: #3f7fb8; border-radius: 4px; padding: 0 3px; margin-left: 3px; }
.rvp-wrap { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 5px; }
.rvp {
  display: flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-size: 8.5px; font-weight: 900; color: var(--ink2);
}
.rvp.on { background: rgba(200,241,105,.45); border-color: var(--lime2); color: #2f5a10; }
.rvp .rvp-o { font-size: 9.5px; font-weight: 900; color: var(--ink); }
.rl-head { display: flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 900; color: var(--ink2); padding: 3px 0; border-top: 1px solid var(--line); }
.rl-head b { color: var(--ink); }
.rl-head .rl-sc { margin-left: auto; font-size: 10px; font-weight: 900; color: #b8492f; }
.rl-head em { font-style: normal; font-size: 7px; font-weight: 800; color: var(--ink3); }
.rl-rows { display: flex; flex-direction: column; }
.rl-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; border-bottom: 1px dashed var(--line); font-size: 8px; font-weight: 800; color: var(--ink2); }
.rl-row.up { background: linear-gradient(90deg, rgba(200,241,105,.20), rgba(200,241,105,0)); }
.rl-nm { min-width: 0; flex: 0 0 32%; font-weight: 900; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-nm em { font-style: normal; font-size: 6.5px; font-weight: 800; color: var(--ink3); margin-left: 3px; }
.rl-rt { font-size: 8px; font-weight: 900; color: #26648f; min-width: 22px; }
.rl-g { min-width: 42px; color: var(--ink3); }
.rl-ex { font-size: 8px; font-weight: 900; color: #3d6b12; min-width: 30px; text-align: right; }
.rl-ov { font-size: 7.5px; font-weight: 900; color: var(--ink); min-width: 42px; text-align: right; }
.rl-up { font-size: 7.5px; font-weight: 900; color: #1d6b2f; min-width: 44px; text-align: right; }
.rl-lv { font-size: 7px; font-weight: 800; color: var(--ink3); min-width: 30px; text-align: right; }
.rl-log { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.rl-log .rlg { font-size: 7px; font-weight: 800; color: var(--ink3); background: rgba(20,33,28,.06); border-radius: 5px; padding: 1px 4px; }
.rl-log .rlg b { color: var(--ink); }

/* ═════════════════ v23 — 금·은·동·전설 원형 등급 배지 ═════════════════ */
.tier {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  font-size: 7.5px; font-weight: 900; line-height: 1; color: #fff;
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.22), 0 0 0 1px rgba(255,255,255,.45);
  vertical-align: 1px;
}
.tier.t-dong  { background: radial-gradient(circle at 34% 28%, #e8c39a 0%, #b07a34 55%, #7d4f16 100%); }
.tier.t-eun   { background: radial-gradient(circle at 34% 28%, #ffffff 0%, #c3ccd4 55%, #83909a 100%); color: #2b3238; }
.tier.t-geum  { background: radial-gradient(circle at 34% 28%, #fff4c4 0%, #e8bf49 55%, #a67c11 100%); color: #4a3505; }
.tier.t-legend{ background: radial-gradient(circle at 34% 28%, #efe2ff 0%, #b692f2 45%, #6a35c8 100%); color: #2b0f5c; }
.nm .tier, .rl-nm .tier { margin-right: 2px; }
.pd-name .tier { width: 18px; height: 18px; font-size: 9px; margin-right: 3px; }
.mkt .nm .tier { margin-right: 3px; }

/* v23 — 이적시장 카드 밀도 (롤·나이·주발이 한 줄에 들어가게) */
.mkt .mt { gap: 2px; }
.mkt .mt .chip { font-size: 6.5px; padding: 0 4px; height: 14px; line-height: 14px; border-radius: 5px; }
.mkt .mt .pb { font-size: 7px; padding: 0 4px; height: 14px; line-height: 14px; border-radius: 5px; }

/* ═════════════════ v24 — 유저 대전(비동기 PvP) ═════════════════ */
.pvp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 7px; }
.pvp-btns .btn { width: 100%; height: 34px; font-size: 11px; }
.pvp-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.pvp-row canvas { flex: 0 0 auto; }
.pvp-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pvp-id b { font-size: 11px; letter-spacing: -.2px; }
.pvp-id span { font-size: 9.5px; color: var(--ink2); }
.pvp-rival .tiny.muted { line-height: 1.45; }
.pvp-rec { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pvp-rec:last-child { border-bottom: 0; }
.pvp-rec span { width: 17px; height: 17px; border-radius: 6px; flex: 0 0 auto; font-size: 9px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.pvp-rec span.t-w { background: #e4f6c8; color: #3f6b12; }
.pvp-rec span.t-d { background: #ece9dd; color: #6b6b5c; }
.pvp-rec span.t-l { background: #f7ddd6; color: #a3392a; }
.pvp-rec b { font-size: 10.5px; font-weight: 800; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-rec em { font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: -.3px; }
.pvp-vs { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pvp-vs-team { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1 1 0; min-width: 0; }
.pvp-vs-team .nm { font-size: 10.5px; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pvp-vs-team .st { font-size: 9px; color: var(--ink2); }
.pvp-top { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-bottom: 6px; }
.pvp-pl { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.pvp-pl b { font-weight: 700; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-ovr { font-weight: 900; font-size: 10.5px; color: var(--ink2); }
.pvp-share { margin-bottom: 6px; }
.pvp-share b { display: block; font-size: 9.5px; color: var(--ink2); margin-bottom: 2px; }
.pvp-input {
  width: 100%; box-sizing: border-box; resize: none;
  border: 1px solid var(--line); border-radius: 9px; background: #fffdf7;
  padding: 6px 7px; font: 600 9.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink); word-break: break-all; overflow-x: hidden;
}
.pvp-input:focus { outline: none; border-color: #a8da4e; }
.pot-tag {
  display: inline-block; margin-left: 3px; padding: 0 4px;
  border: 1px solid currentColor; border-radius: 5px;
  font-size: 7.5px; font-weight: 900; letter-spacing: -.1px; vertical-align: 1px;
}

/* ═════════════ v25 — 실시간 전술카드 HUD · 컷인 · 킥오프 배너 ═════════════ */

/* 모멘텀 영역의 활성 카드 칩 — 카드 고유 색 + 남은 시간 게이지 */
.buffchip.v25 {
  position: relative; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px 4px; border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--bc, #c8f169);
  color: #f2fbe4; font-size: 8px; font-weight: 800;
  overflow: hidden; max-width: 100%;
}
.buffchip.v25 b { font-weight: 900; color: var(--bc, #c8f169); letter-spacing: -.1px; }
.buffchip.v25 em { font-style: normal; opacity: .82; font-size: 7px; }
.buffchip.v25 .bc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .13); }
.buffchip.v25 .bc-bar > i { display: block; height: 100%; width: 0; background: var(--bc, #c8f169); box-shadow: 0 0 6px var(--bc, #c8f169); transition: width .25s linear; }

/* 피치 위 활성 전술 스트립 — 카드가 살아 있는 동안 경기장 위에서 계속 보인다 */
.tac-strip {
  position: absolute; right: 6px; top: 6px; z-index: 6;
  display: none; flex-direction: column; align-items: flex-end; gap: 3px;
  pointer-events: none; max-width: 52%;
}
.tac-strip.on { display: flex; }
.tac-pill {
  position: relative; display: flex; align-items: center; gap: 4px;
  padding: 2px 7px 4px; border-radius: 8px;
  background: rgba(4, 18, 14, .84);
  border: 1px solid var(--pc, #c8f169);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .38);
  overflow: hidden;
}
.tac-pill b { font-size: 8px; font-weight: 900; color: #f4ffdd; letter-spacing: -.1px; white-space: nowrap; }
.tac-pill i.d { width: 5px; height: 5px; border-radius: 50%; background: var(--pc, #c8f169); box-shadow: 0 0 7px var(--pc, #c8f169); flex: 0 0 auto; animation: sitPulse 1.2s ease-in-out infinite; }
.tac-pill u { text-decoration: none; font-size: 7px; font-weight: 900; color: var(--pc, #c8f169); }
.tac-pill .ace { font-size: 6.5px; font-weight: 800; color: rgba(240, 251, 226, .62); max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tac-pill .pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .12); }
.tac-pill .pbar > i { display: block; height: 100%; width: 0; background: var(--pc, #c8f169); box-shadow: 0 0 6px var(--pc, #c8f169); }

/* 컷인 — 전술 일러스트 + 에이스 초상화 */
.cutin-art .tac-art.cutac { width: 100%; height: 100%; background: transparent; }
.cutin-art .tac-art.cutac img { object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .55)); }
.cutin-face {
  position: absolute; left: 4%; bottom: 5%; width: 34%; max-width: 104px; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; background: #0b241e;
  border: 2px solid rgba(255, 232, 150, .95);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6), 0 0 0 3px rgba(8, 22, 15, .5);
  animation: cutPop .55s cubic-bezier(.2, 1.45, .4, 1) .05s both;
}
.cutin-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cutin-face b {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0 2px;
  font-size: 7.5px; font-weight: 900; text-align: center;
  background: rgba(4, 16, 12, .84); color: #ffe98a;
}
.cutin-live {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 7px;
  padding: 2px 7px; border-radius: 7px;
  background: rgba(200, 241, 105, .12); border: 1px solid rgba(200, 241, 105, .38);
  font-size: 8.5px; font-weight: 800; color: #d9f7a6;
}
.cutin-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--cc, #c8f169); box-shadow: 0 0 8px var(--cc, #c8f169); animation: sitPulse 1.1s ease-in-out infinite; }

/* 킥오프 배너 — 경기 시작을 확실히 알린다 */
#m-banner.kick { background: radial-gradient(58% 58% at 50% 50%, rgba(6, 30, 24, .72), rgba(4, 16, 13, 0) 72%); }
#m-banner.kick .gb-text {
  font-style: normal; font-size: 27px; letter-spacing: .5px; color: #f7ffe6;
  text-shadow: 0 0 22px rgba(200, 241, 105, .95), 0 4px 16px rgba(0, 0, 0, .72);
  animation: kickPop .5s cubic-bezier(.2, 1.4, .4, 1);
}
#m-banner.kick .gb-sub { background: rgba(6, 26, 22, .9); border: 1px solid rgba(200, 241, 105, .45); color: #eaffd0; }
#m-banner.kick::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 120px; height: 44px;
  margin: -22px 0 0 -60px; border-radius: 50%;
  border: 1px solid rgba(200, 241, 105, .55);
  animation: kickRing 1.1s ease-out infinite;
  pointer-events: none;
}
@keyframes kickPop { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kickRing { from { transform: scale(.7); opacity: .85; } to { transform: scale(2.1); opacity: 0; } }

/* v25 — 골 배너는 위로 올려 세리머니(색종이·환호)를 가리지 않는다 */
#m-banner.goalnote { align-items: center; justify-content: flex-start; padding-top: 7%; }
#m-banner.goalnote .gb-text { font-size: 30px; }

/* ═════════════ v25 — 컨디션 회복 UI ═════════════ */
.condbox { display: block; }
.cond-row { display: flex; align-items: baseline; justify-content: space-between; }
.cond-row span { font-size: 10px; font-weight: 800; color: var(--ink2); }
.cond-row b { font-size: 20px; font-weight: 900; letter-spacing: -.8px; }
.cond-row b.coral { color: #c8432f; }
.cond-row b.lime { color: #4f8a15; }
.cond-bar { height: 8px; border-radius: 5px; background: rgba(0, 0, 0, .10); overflow: hidden; margin-top: 3px; }
.cond-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #7fc63d, #c8f169); border-radius: 5px; transition: width .25s; }
.cond-bar > i.low { background: linear-gradient(90deg, #d1482f, #f0a24a); }
.cond-warn {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 7px; padding: 5px 8px; border-radius: 9px;
  background: rgba(209, 72, 47, .09); border: 1px solid rgba(209, 72, 47, .35);
  font-size: 9px; font-weight: 700; color: #a3392a;
}
.cond-warn .btn { padding: 0 8px; height: 20px; font-size: 8.5px; }
.sheet.narrow { max-width: 420px; }

/* v25 — 상황 바(.sit) 자동 닫힘 · 롤 진화 접기 · 컨디션 칩 · 교체 적성 */
.sit.off { display: none; }
.role-wait { margin-top: 5px; }
.rw-wrap { margin-top: 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; }
.rw-row { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 7px; background: rgba(11, 36, 30, .05); }
.rw-row .rw-n { font-size: 9px; font-weight: 800; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-row .rw-p { font-size: 7.5px; font-weight: 700; color: var(--ink2); }
.rw-row .rw-l { font-size: 7.5px; font-weight: 900; color: #a8873a; }
.tb-chip em { font-style: normal; font-size: 7.5px; font-weight: 800; opacity: .6; margin-right: 2px; letter-spacing: .2px; }
.sub-item .sf { font-size: 7px; font-weight: 900; padding: 0 3px; border-radius: 4px; margin-left: 2px; }
.sub-item .sf.f1 { background: #dff3c0; color: #3f6b12; }
.sub-item .sf.f2 { background: #eaf3d2; color: #48631f; }
.sub-item .sf.f3 { background: #f6ecc9; color: #7a5a10; }
.sub-item .sf.f4 { background: #f6dcd5; color: #96341f; }
.ms-rt { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.ms-rt em { font-style: normal; font-size: 5.5px; font-weight: 700; opacity: .55; margin-top: 1px; }

/* ═════════════ v25c — 세로 마이팀(M1) · 상단 바(M2) · 큰 화면 손패(L1) ═════════════ */

/* M2 — 부제는 한 줄 고정: 두 줄로 감기면 상단 바 높이를 넘어 구단명 위가 잘렸다 */
.tb-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-txt { min-width: 0; flex: 0 1 auto; overflow: hidden; }

/* M1 — 390×844 세로: 전술판 위 / 카드 아래로 쌓아 폭 부족으로 인한 잘림을 없앤다 */
@media (orientation: portrait) and (max-width: 700px) {
  .topbar { height: 40px; padding: 0 8px 0 58px; gap: 5px; }
  .tb-name { font-size: 11.5px; max-width: 118px; }
  .tb-sub { font-size: 8.5px; }
  .tb-chip { height: 20px; font-size: 9.5px; padding: 0 6px; gap: 3px; }
  .tb-chip em { display: none; }
  .tb-chip svg { width: 11px; height: 11px; }

  #screen-squad.on { display: block; }
  .sq { flex-direction: column; height: auto; gap: 6px; }
  .sq-left, .sq-right { flex: 0 0 auto; width: 100%; max-width: none; min-height: 0; overflow: visible; }
  .sq-pitch { flex: 0 0 auto; min-height: 0; height: 300px; }
  .sq-pitch .tok { width: 52px; }
  .fwrap { gap: 4px; }
  .fwrap .fchip { flex: 1 1 calc(33% - 4px); min-width: 0; }
  .fwrap .fchip b { font-size: 10px; white-space: nowrap; }
  .fwrap .fchip span { font-size: 7px; }
  .sq-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sq-actions .btn { min-width: 0; font-size: 10px; padding: 0 4px; }
  .sq-bench { flex-wrap: wrap; row-gap: 4px; }
  .sq-bench .pcard { flex: 0 0 auto; min-width: 34px; max-width: 52px; }
  .sq-bench .pcard .pn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 8px; }
  .sq-syn { flex-wrap: wrap; }
  .sq-card .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sq-card .card-head .meta { display: none; }
  .mgr-wrap .mcard, .mcard { min-width: 0; }
}

/* L1 — 1920×1080처럼 세로가 큰 가로 화면: 손패 카드가 240px씩 늘어나지 않게 높이를 잡아 준다 */
@media (min-height: 700px) and (orientation: landscape) {
  .hand.v7 { flex: 0 0 auto; justify-content: flex-start; }
  .tcard.v7 { flex: 0 0 auto; max-height: 118px; }
}

/* ═════════════ v26 — 로비 사운드(BGM) 토글 ═════════════
   상단 바 금화·팬 칩 옆에 같은 높이의 작은 버튼 하나. 390×844 세로에서도 넘치지 않게
   가로 24px·세로는 칩 높이를 그대로 쓴다. */
.tb-chip.tb-snd {
  width: 26px; padding: 0; justify-content: center;
  cursor: pointer; font-size: 12px; line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.tb-chip.tb-snd.off { color: #ffbdb0; background: rgba(255, 90, 80, .14); border-color: rgba(255, 120, 100, .42); }
.tb-chip.tb-snd:active { transform: scale(.93); }
@media (max-height: 460px) { .tb-chip.tb-snd { width: 24px; font-size: 11px; } }
@media (orientation: portrait) and (max-width: 700px) { .tb-chip.tb-snd { width: 22px; font-size: 10.5px; } }

/* ═════════════════ v27b — 낮은 가로 화면(844×390 등): 우측 전술 카드가 찌그러지거나
   아래 스탯 박스에 가려 잘리던 문제 수정 ═════════════════ */
/* ① 카드 영역은 절대 찌그러지지 않는다. 높이가 모자라면 사이드바 전체가 스크롤되고,
      카드는 언제나 온전한 크기(min-height)를 지킨다. */
.m-side { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.m-side > .hand.v7 { flex: 1 1 auto; min-height: -webkit-min-content; min-height: min-content; overflow: visible; }
.m-side .tcard.v7 { flex: 1 1 auto; min-height: 40px; }
/* 높은 가로 화면(높이 700+)은 지금처럼 카드가 자기 크기(최대 118px)를 지킨다 */
@media (min-height: 700px) and (orientation: landscape) {
  .m-side .tcard.v7 { flex: 0 0 auto; max-height: 118px; }
}
/* ② 390 안팎 낮은 가로 화면 — 여백을 조여 전술 카드 3장 + 스탯 박스가
      스크롤 없이 한 화면에 들어오게 한다. */
@media (orientation: landscape) and (max-height: 560px) {
  .m-side { gap: 3px; padding: 4px 5px 4px; }
  .m-side .mom { padding: 4px 6px 4px; margin-bottom: 0; }
  .m-side .mom-buffs { margin-top: 3px; }
  .m-side .mom-top { margin-bottom: 3px; }
  .m-side .mom-top .val { font-size: 12px; }
  .m-side .mom-bar { height: 5px; }
  .m-side .mom-hint { margin-top: 2px; font-size: 7px; line-height: 1.2; }
  .m-side .m-live { gap: 2px; padding: 3px 5px 4px; }
  .m-side .m-live .lv-row { height: 12px; }
  /* 지친 선수가 없을 때의 안내 줄은 자리만 차지한다 — 낮은 화면에서는 접는다 */
  .m-side .m-live .lv-tired.none { display: none; }
  .m-side .tcard.v7 { min-height: 40px; max-height: 54px; padding: 2px 5px; gap: 5px; }
  .m-side .tcard.v7 .tc-face { width: 48px; height: 32px; }
  .m-side .tcard.v7 .nm { font-size: 10px; }
  .m-side .tcard.v7 .cd { height: 9px; }
  .m-side .tl-strip { height: 30px; }
  .m-side .m-acts .btn { height: 30px; }
}

/* ═════════════════ v28 — 수석코치 하프타임 교체 추천서 ═════════════════
   하프타임(45')에 전반 평점·체력·경고를 근거로 [선발 → 벤치 후보]를 1:1로 붙여 보여주고,
   [원클릭 교체]로 DS.Match.substitute()를 바로 태워 후반 라인업에 반영하는 패널.
   가로(844×390)·세로(390×844) 모두 한 화면 안에 들어오도록 행을 grid로 접는다. */
.adv-panel {
  position: absolute; left: 50%; right: auto; bottom: 8px; transform: translateX(-50%);
  width: min(760px, 96%); max-height: 94%;
  padding: 8px 11px 9px; border-radius: 16px;
  background: var(--card); border: 1px solid rgba(200, 241, 105, .28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  overflow-y: auto; overscroll-behavior: contain;
}
.adv-head { display: flex; align-items: center; gap: 6px; }
.adv-head b { font-size: 12.5px; font-weight: 900; letter-spacing: -.3px; }
.adv-meta { margin-left: auto; font-size: 9px; font-weight: 800; color: var(--ink3); white-space: nowrap; }
.adv-sub { font-size: 8.5px; font-weight: 700; color: var(--ink3); margin: 2px 0 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-rows { display: flex; flex-direction: column; gap: 4px; }
.adv-row {
  display: grid; grid-template-columns: 1.15fr 12px 1fr 98px;
  grid-template-areas: "out ar in go";
  align-items: center; gap: 6px;
  min-height: 40px; padding: 4px 7px; border-radius: 10px;
  background: var(--card2); border: 1px solid var(--line);
}
.adv-row.done { background: rgba(200, 241, 105, .1); border-color: rgba(140, 190, 60, .45); }
.adv-out { grid-area: out; }
.adv-in { grid-area: in; }
.adv-ar { grid-area: ar; font-size: 10px; font-weight: 900; color: var(--ink3); text-align: center; }
.adv-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adv-l1 { display: flex; align-items: center; gap: 4px; min-width: 0; }
.adv-l1 .pb { flex: 0 0 auto; font-size: 7px; height: 13px; line-height: 13px; padding: 0 4px; border-radius: 4px; }
.adv-name { font-size: 11px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-lmeta { margin-left: 6px; display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.adv-lmeta span { font-size: 8px; font-weight: 900; color: var(--ink2); white-space: nowrap; }
.adv-st.hot { color: #c0392b; }
.adv-l2 { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-width: 0; }
.adv-tag {
  font-size: 7.5px; font-weight: 900; padding: 1px 5px; border-radius: 5px;
  background: rgba(193, 145, 27, .13); color: #8a6410; border: 1px solid rgba(193, 145, 27, .3);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.adv-tag.t1 { background: rgba(47, 111, 158, .12); color: #24587a; border-color: rgba(47, 111, 158, .3); }
.adv-tag.t2 { background: rgba(192, 57, 43, .1); color: #98341f; border-color: rgba(192, 57, 43, .28); }
.adv-tag.t9 { background: rgba(120, 130, 120, .12); color: var(--ink2); border-color: rgba(120, 130, 120, .25); }
.adv-fit { font-size: 9px; font-weight: 900; padding: 0 4px; border-radius: 4px; }
.adv-fit.f1 { background: #dff3c0; color: #3f6b12; }
.adv-fit.f2 { background: #eaf3d2; color: #48631f; }
.adv-fit.f3 { background: #f6ecc9; color: #7a5a10; }
.adv-fit.f4 { background: #f6dcd5; color: #96341f; }
.adv-l2 .adv-ovr { font-size: 8.5px; font-weight: 900; color: #4f7d13; }
.adv-diff { font-size: 8px; font-weight: 900; }
.adv-diff.up { color: #2f8f4a; }
.adv-diff.down { color: #c0392b; }
.adv-bench { font-size: 7.5px; font-weight: 800; color: var(--ink3); }
.adv-go {
  grid-area: go; height: 30px; border-radius: 9px; border: 0;
  background: linear-gradient(180deg, #d8f57f, #b6e04f); color: #14260c;
  font-size: 9.5px; font-weight: 900; letter-spacing: -.2px;
  box-shadow: 0 2px 0 rgba(90, 130, 20, .5);
}
.adv-go:active { transform: translateY(1px); }
.adv-go[disabled] { background: #d9d3c2; color: #8a8474; box-shadow: none; }
.adv-ok { grid-area: go; text-align: center; font-size: 9px; font-weight: 900; color: #3f6b12; }
.adv-none {
  display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center;
  padding: 10px 8px; border-radius: 10px; text-align: center;
  background: rgba(200, 241, 105, .1); border: 1px dashed rgba(140, 190, 60, .5);
}
.adv-none b { font-size: 10.5px; font-weight: 900; }
.adv-none span { font-size: 8.5px; font-weight: 700; color: var(--ink2); }
.adv-warn { margin-top: 4px; font-size: 8.5px; font-weight: 800; color: #98341f; text-align: center; }
.adv-foot { display: flex; gap: 6px; margin-top: 7px; }
.adv-foot .btn { flex: 1 1 0; height: 30px; }

/* 세로(390×844): 한 행을 두 줄로 접고 [원클릭 교체]를 오른쪽에 세로로 세운다 */
@media (orientation: portrait) and (max-width: 700px) {
  .adv-panel {
    left: 8px; right: 8px; transform: none; width: auto;
    bottom: calc(72px + var(--safe-b)); max-height: 84%; padding: 9px 10px 10px;
  }
  .adv-head b { font-size: 12px; }
  .adv-sub { white-space: normal; line-height: 1.35; }
  .adv-row {
    grid-template-columns: 1fr 86px;
    grid-template-areas: "out go" "in go";
    row-gap: 3px; padding: 6px 7px;
  }
  .adv-ar { display: none; }
  .adv-in .adv-l1::before { content: '→'; font-size: 9px; font-weight: 900; color: var(--ink3); margin-right: 1px; }
  .adv-go { height: 36px; align-self: center; }
  .adv-foot { flex-direction: column; }
  .adv-foot .btn { height: 34px; }
}

/* ═════════ v29 — 전술 상성 피드백 칩 · 감독 줄 실시간 · 수석코치 총평 ═════════ */
/* v29 ③ — 전술 상성 적중 피드백 칩. v30 — 피치 상단을 가리지 않게 좌상단 상황 칩·우상단 전술 스트립과
   겹치지 않는 우하단으로 옮기고 한 줄 콤팩트 칩으로 줄였다 (터치라인 콜아웃은 좌하단). */
.m-matchup {
  position: absolute; right: 7px; bottom: 6px; left: auto; top: auto; z-index: 6; display: none;
  max-width: min(60%, 300px); padding: 3px 8px; border-radius: 9px;
  background: rgba(4, 18, 14, .90); border: 1px solid rgba(200, 241, 105, .78);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .42);
  pointer-events: none; overflow: hidden;
}
.m-matchup.on { display: flex; flex-direction: row; align-items: center; gap: 5px; width: max-content; max-width: min(66%, 340px); animation: muIn .3s ease-out; }
.m-matchup b { flex: 0 0 auto; font-size: 9.5px; font-weight: 900; color: #c8f169; letter-spacing: -.2px; white-space: nowrap; }
.m-matchup span {
  flex: 1 1 auto; min-width: 0; font-size: 9px; font-weight: 700; color: rgba(233, 244, 221, .88); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes muIn { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
.tk-mgr .tk-style { transition: color .2s; }
.tk-mgr .tk-style.flash { animation: tkFlash .6s ease-out; font-size: 10px; }
.tk-mgr .tk-style.tone-defensive { color: #9fd8ff; }
.tk-mgr .tk-style.tone-attacking { color: #ffd98a; }
.tk-mgr .tk-style.tone-allout { color: #ff9a6b; }
@keyframes tkFlash {
  0% { transform: scale(1); text-shadow: 0 0 0 rgba(200, 241, 105, 0); }
  40% { transform: scale(1.22); text-shadow: 0 0 8px rgba(200, 241, 105, .85); }
  100% { transform: scale(1); text-shadow: 0 0 0 rgba(200, 241, 105, 0); }
}

/* ── 수석코치 경기 총평 카드 (RESULTS 모달 안) ── */
.coach-rev { display: flex; flex-direction: column; gap: 4px; }
.cr-head {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 11px; font-weight: 900; line-height: 1.35;
}
.cr-head em {
  font-style: normal; font-size: 8.5px; font-weight: 800; color: #6b4a12;
  background: rgba(200, 241, 105, .42); border: 1px solid rgba(140, 190, 60, .55);
  border-radius: 6px; padding: 1px 5px;
}
.cr-row { display: flex; gap: 5px; font-size: 10px; line-height: 1.42; align-items: flex-start; }
.cr-k {
  flex: 0 0 auto; min-width: 32px; font-size: 9px; font-weight: 900; color: #3d5a2e;
  background: rgba(140, 190, 60, .16); border-radius: 5px; padding: 1px 5px; margin-top: 1px;
}
.cr-v { flex: 1 1 0; min-width: 0; font-weight: 700; color: #2b3a1f; word-break: keep-all; overflow-wrap: anywhere; }
.cr-v b { font-weight: 900; }
.cr-fix { margin: 2px 0 0; padding: 0 0 0 12px; display: flex; flex-direction: column; gap: 2px; }
.cr-fix li { font-size: 10px; font-weight: 700; line-height: 1.4; color: #2b3a1f; word-break: keep-all; }
.cr-fix li::marker { color: #6f9c1f; font-weight: 900; }
.cr-good { color: #1f5d2a; }
.cr-bad { color: #98341f; }
.cr-note { font-size: 9px; font-weight: 700; color: #6b6a5a; }

/* v29 — 모바일 세로(≤560px): 결과서 2단 흐름을 1단으로 접어 수석코치 총평이 잘리지 않게 */
@media (max-width: 560px) {
  #modal[data-report="1"] .sheet { max-width: 100%; }
  #modal[data-report="1"] .sheet-body { column-count: 1; column-gap: 0; }
  .cr-head { font-size: 11.5px; }
  .cr-row { font-size: 10.5px; }
  .cr-fix li { font-size: 10.5px; }
  .cr-note { font-size: 9.5px; }
}
