@import url('https://cdn.jsdelivr.net/npm/galmuri/dist/galmuri.css');
/* =========================================================================
 * styles.css — 랠리랠리 배구단 (카이로소프트 밝은 톤 리디자인)
 * 클래스명·구조는 그대로. 색/테두리/그림자/도트폰트만 교체.
 * ========================================================================= */
:root {
  /* 표면 */
  --bg: #e7ddbf;          /* 앱 배경: 따뜻한 파치먼트 */
  --panel: #fff8e7;       /* 크림/아이보리 */
  --panel2: #f3e7c9;      /* 살짝 진한 크림 */
  --line: #b5824a;        /* 우드 브라운(기본 테두리) */
  --line-strong: #8a5a2b; /* 진한 우드(주요 프레임 2~3px) */
  --line-soft: #e2cfa6;   /* 연한 우드(표 줄/내부 구분선) */
  /* 텍스트 */
  --txt: #4a3526;         /* 짙은 브라운 */
  --muted: #9b8567;       /* 약한 글자 */
  /* 강조 */
  --accent: #5cbf4a;      /* 잎사귀 그린(버튼/활성 바탕) */
  --accent-d: #3f8c30;    /* 진한 그린(버튼 아랫테두리) */
  --accent-ink: #2f6b22;  /* 밝은 바탕 위 그린 글자 */
  --accent2: #f5a623;     /* 골드 오렌지(코인) */
  --accent2-d: #c97f12;   /* 진한 골드 */
  --gold-ink: #9a6a12;    /* 밝은 바탕 위 골드 글자 */
  /* 상태 */
  --win: #3fb56b; --win-ink: #1f7a45;
  --lose: #e8623a; --lose-d: #b3431f;
  --draw: #c9b48a; --draw-ink: #8a734a;
  /* 등급 */
  --normal: #a9763e; --special: #3da6d8; --rare: #a368d8; --sig: #d99e0b;
  /* 토큰 */
  --dot: "Galmuri11", monospace;
  --rad: 11px;
  --sh-panel: 0 3px 0 rgba(138,90,43,.30), 0 7px 16px rgba(74,53,38,.14);
  --sh-btn: 0 4px 0 var(--accent-d);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  background-image: linear-gradient(135deg, #ece3c8 0%, #e2d6b3 100%);
  color: var(--txt);
  font-family: "Galmuri11", "Malgun Gothic", -apple-system, system-ui, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  display: flex; justify-content: center;
}
/* 모든 텍스트에 도트폰트 강제 적용 — 버튼·input·select 등 상속 안 받는 요소까지 커버.
   (코트 캔버스 텍스트는 volley-engine.js에서 별도 지정) */
*, *::before, *::after {
  font-family: "Galmuri11", "Malgun Gothic", -apple-system, system-ui, sans-serif;
}
#app {
  width: 100%; max-width: 460px; height: 100vh; height: 100dvh; overflow: hidden;   /* dvh: 모바일 주소창 높이 변화에도 하단 안 잘림 */
  background: var(--bg);
  background-image: linear-gradient(180deg, #efe7cd 0%, #e7ddbf 100%);
  display: flex; flex-direction: column;
  position: relative; box-shadow: 0 0 40px rgba(74,53,38,.35);
}

/* ---- 헤더 ---- */
.hdr { background: var(--panel); border-bottom: 3px solid var(--line-strong); padding: 6px 12px 9px; box-shadow: 0 2px 0 rgba(138,90,43,.18); }
.hdr-row { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.hdr-brand { width: 112px; height: 64px; display: flex; align-items: center; justify-content: flex-start; flex: none; }
.hdr-logo { display: block; width: 108px; height: 64px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(138,90,43,.2)); }
.hdr-title { font-weight: 800; font-size: 15px; letter-spacing: -.3px; color: var(--txt); text-shadow: 1px 1px 0 #fff; }
.hdr-title .em { color: var(--gold-ink); }
.coins { margin-left: auto; font-family: var(--dot); font-weight: 700; font-size: 13px; color: var(--gold-ink);
  background: #ffe9b0; border: 2px solid var(--accent2); border-radius: 999px; padding: 4px 11px 4px 30px; white-space: nowrap; flex: none; position: relative;
  box-shadow: 0 3px 0 rgba(201,127,18,.35); }
.icon-btn { margin-left: 6px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--panel2);
  border: 2px solid var(--line-strong); border-radius: 50%; cursor: pointer; padding: 5px; box-shadow: 0 3px 0 rgba(138,90,43,.28); }
.icon-btn img { width: 100%; height: 100%; object-fit: contain; }
.icon-btn:hover { filter: brightness(1.15); transform: rotate(20deg); transition: transform .15s; }
.set-sec { margin: 14px 0; }
.set-label { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.coins::before { content: ""; position: absolute; left: 5px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%);
  background: url('../img/ui/icon/coin.png') center/contain no-repeat; }
.hdr-sub { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pill { font-family: var(--dot); font-size: 11px; background: var(--panel2); border: 2px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; color: var(--txt); white-space: nowrap; }
.pill.stage { color: var(--gold-ink); background: #ffe9b0; border-color: var(--accent2); }
.btn-link { background: var(--panel2); border: 2px solid var(--line); color: var(--txt); border-radius: 9px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-weight: 700; box-shadow: 0 2px 0 rgba(138,90,43,.25); }
.btn-link:hover { border-color: var(--accent-d); }
.btn-link.on { color: #1f4d18; background: var(--accent); border-color: var(--accent-d); box-shadow: 0 2px 0 var(--accent-d); font-weight: 800; }
.btn-link.danger { color: var(--lose); border-color: #e3a78f; }
.btn-link.danger:hover { border-color: var(--lose); background: rgba(232,98,58,.10); }
.btn.danger-btn { background: var(--lose); color: #fff; border: 2px solid var(--lose-d); box-shadow: 0 4px 0 var(--lose-d); }

/* ---- 속도 선택 ---- */
.speeds { display: flex; gap: 5px; margin-left: auto; }
.speed { font-family: var(--dot); background: var(--panel); border: 2px solid var(--line); color: var(--muted);
  border-radius: 9px; padding: 4px 9px; cursor: pointer; font-size: 12px; font-weight: 700; box-shadow: 0 2px 0 rgba(138,90,43,.22); }
.speed.active { color: #1f4d18; background: var(--accent); border-color: var(--accent-d); box-shadow: 0 3px 0 var(--accent-d); }
.speed.active:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-d); }
.speed.locked { opacity: .45; cursor: not-allowed; }

/* ---- 본문 ---- */
.body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }

/* ---- 탭 바 ---- */
.tabs { display: flex; align-items: flex-end; gap: 5px; border-top: 3px solid var(--line-strong);
  background: linear-gradient(180deg, #b88450 0%, #8a5a2b 100%); padding: 7px 7px 6px; box-shadow: 0 -2px 0 rgba(138,90,43,.15); }
.tab { flex: 1; text-align: center; padding: 6px 2px 5px; cursor: pointer; color: var(--txt);
  font-size: 11px; font-weight: 800; border: 2px solid var(--line-strong); border-radius: 12px;
  background: var(--panel); box-shadow: 0 3px 0 #5e391d; }
.tab .ic { display: block; margin-bottom: 2px; line-height: 1; height: 28px; }
.tab .nav-ic { width: 28px; height: 28px; object-fit: contain; display: block; margin: 0 auto; transition: transform .12s; }
.tab .ic-img { width: 22px; height: 22px; object-fit: contain; display: block; margin: 0 auto; }
.tab:not(.active) .ic-img { opacity: .72; }
.tab.active { color: #1f4d18; font-weight: 900; background: var(--accent); border-color: var(--accent-d);
  box-shadow: inset 0 2px 0 #7ad96a, 0 4px 0 #2f6b22; transform: translateY(-3px); }
.tab.active .nav-ic { transform: scale(1.08); }

/* ---- 공통 카드/버튼 ---- */
.section-title { font-size: 13px; font-weight: 800; margin: 4px 2px 10px; display: flex; align-items: center; gap: 8px; color: var(--txt); }
.badge-next { font-family: var(--dot); font-size: 11px; color: var(--gold-ink); background: #ffe9b0;
  border: 2px solid var(--accent2); border-radius: 7px; padding: 2px 8px; font-weight: 700; white-space: nowrap; }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.subtab { flex: 1; text-align: center; padding: 9px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); color: var(--muted); font-weight: 700; box-shadow: 0 3px 0 rgba(138,90,43,.22); }
.subtab.active { color: #1f4d18; background: var(--accent); border-color: var(--accent-d); box-shadow: 0 3px 0 var(--accent-d); }
.subtab.active:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-d); }
.btn { background: var(--accent); color: #1f4d18; border: 2px solid var(--accent-d); border-radius: var(--rad);
  padding: 11px 16px; font-weight: 800; cursor: pointer; font-size: 13px; box-shadow: var(--sh-btn); transition: transform .06s, box-shadow .06s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-d); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: 0 4px 0 rgba(138,90,43,.3); }
.btn.ghost { background: var(--panel2); color: var(--txt); border: 2px solid var(--line); box-shadow: 0 4px 0 rgba(138,90,43,.28); }
.btn.ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(138,90,43,.28); }

/* 라인업 / 투수 슬롯 */
.slot-list { display: flex; flex-direction: column; gap: 7px; }
/* 로스터 화면: 하위탭·헤더는 고정, 선수 목록만 내부 스크롤 */
.roster-screen { display: flex; flex-direction: column; height: 100%; }
.roster-screen > .subtabs { flex: none; }
#rosterMain { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#rosterMain > .section-title, #rosterMain > .subtabs, #rosterMain > p { flex: none; }
#rosterMain .enh-list, #rosterMain #rosterBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* 기록 화면: 제목·서브탭·필터는 고정, 표(.tbl-scroll)만 세로 스크롤(헤더 sticky) */
.records-screen { display: flex; flex-direction: column; height: 100%; }
.records-screen > .section-title, .records-screen > .subtabs { flex: none; }
.records-screen > #recBody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#recBody > .rec-filter { flex: none; }
/* .fill(선수 기록 표)만 남는 높이를 채우고 스크롤. 팀 기록 표는 내용(팀 수)만큼만 테두리 */
#recBody > .tbl-scroll.fill { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ---- 라인업 편성: 배구 코트 포메이션 ---- */
.vcourt-edit { position: relative; padding: 10px 10px 14px; border: 3px solid var(--line-strong);
  border-radius: var(--rad); box-shadow: var(--sh-panel);
  background: linear-gradient(180deg, #fdeccb, #f6d9a4); }
.vc-net { height: 13px; border-radius: 5px; margin-bottom: 6px; border: 1px solid rgba(120,80,40,.35);
  background-color: rgba(255,255,255,.42);
  background-image: repeating-linear-gradient(90deg, rgba(120,80,40,.32) 0 1px, transparent 1px 6px),
                    repeating-linear-gradient(0deg, rgba(120,80,40,.32) 0 1px, transparent 1px 6px);
  display: flex; align-items: center; justify-content: center; }
.vc-net span { font-size: 8px; font-weight: 900; letter-spacing: 2px; color: rgba(120,80,40,.6); }
.vc-rowlabel { font-size: 10.5px; font-weight: 800; color: #8a5a2b; text-align: center; margin: 4px 0 6px; }
.vc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vc-attackline { border-top: 2px dashed rgba(120,80,40,.4); margin: 12px 8px 0; }
.vc-libero { margin-top: 12px; }
.vc-libero .ct-tile { max-width: 62%; margin: 0 auto; }
.ct-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 94px;
  padding: 8px 6px; text-align: center; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px;
  box-shadow: 0 2px 0 rgba(120,80,40,.18); }
.ct-tile:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(120,80,40,.18); }
.ct-tile.empty { border-style: dashed; background: rgba(255,255,255,.55); }
.ct-badge { width: 34px; height: 22px; line-height: 22px; border-radius: 7px; color: #fff;
  font-weight: 900; font-size: 13px; }
.ct-role { font-size: 9.5px; font-weight: 700; color: var(--muted); }
.ct-name { font-size: 12px; font-weight: 800; color: var(--txt); max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-name .yr { font-size: 9px; }
.ct-foot { display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: auto; }
.ct-foot .grade { margin-left: 0; }
.ct-ovr { font-weight: 900; font-size: 13px; color: var(--gold-ink); }
.ct-tile.pos-S  .ct-badge { background: #4aa3e0; }
.ct-tile.pos-OH .ct-badge { background: #57b94a; }
.ct-tile.pos-MB .ct-badge { background: #e8843a; }
.ct-tile.pos-OP .ct-badge { background: #b06fd6; }
.ct-tile.pos-L  .ct-badge { background: #d9a72e; }
.slot { display: flex; align-items: center; gap: 8px; background: var(--panel);
  border: 2px solid var(--line-strong); border-radius: var(--rad); padding: 9px 11px; cursor: pointer; box-shadow: var(--sh-panel); }
.slot:hover { border-color: var(--accent-d); transform: translateY(-1px); }
.slot .pos { width: 34px; font-weight: 900; color: var(--gold-ink); font-size: 12px; text-align: center; }
.slot .ord { width: 22px; color: var(--muted); font-size: 12px; text-align: center; }
.slot .who { flex: 1; }
.slot .who .nm { font-weight: 700; color: var(--txt); }
.slot .who .tm { font-size: 11px; color: var(--muted); }
.slot .ovr { font-family: var(--dot); font-weight: 700; font-size: 16px; color: var(--txt); }
.slot .empty { color: var(--lose); }
.grade { font-family: var(--dot); font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 6px; }
.grade.NORMAL, .grade.SEASON { color: var(--normal); border: 1.5px solid var(--normal); background: rgba(169,118,62,.10); }
.grade.SPECIAL, .grade.IMPACT { color: var(--special); border: 1.5px solid var(--special); background: rgba(61,166,216,.12); }
.grade.RARE, .grade.SIGNATURE { color: var(--sig); border: 1.5px solid var(--sig); background: rgba(217,158,11,.14); }
.nm .yr { font-size: 10px; color: var(--muted); font-weight: 600; }
.cand.locked { opacity: .5; cursor: default; }
.cand.locked:hover { border-color: var(--line-strong); transform: none; }
.ord-btns { display: flex; flex-direction: column; gap: 2px; }
.ord-btns button { background: var(--panel2); border: 2px solid var(--line); color: var(--txt);
  border-radius: 6px; width: 22px; height: 16px; line-height: 1; cursor: pointer; font-size: 10px; }

.staff-group { margin-bottom: 14px; }
.staff-group h5 { font-size: 12px; color: var(--muted); margin: 0 2px 6px; font-weight: 700; }

/* ---- 뽑기 ---- */
.gacha-rates { display: flex; gap: 8px; margin: 10px 0; }
.rate { flex: 1; text-align: center; background: var(--panel); border: 2px solid var(--line-strong);
  border-radius: var(--rad); padding: 9px; box-shadow: var(--sh-panel); }
.rate .g { font-family: var(--dot); font-weight: 700; } .rate .p { color: var(--muted); font-size: 12px; }
.gacha-btns { display: flex; gap: 8px; margin: 12px 0; }
.gacha-btns .btn { flex: 1; }
.draw-results { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 12px; }
.draw-card { background: var(--panel); border: 2.5px solid var(--line-strong); border-radius: var(--rad);
  padding: 10px; position: relative; animation: pop .25s ease; box-shadow: var(--sh-panel); }
.draw-card.RARE, .draw-card.SIGNATURE { border-color: var(--sig); box-shadow: 0 0 14px rgba(217,158,11,.45), var(--sh-panel); }
.draw-card.SPECIAL, .draw-card.IMPACT { border-color: var(--special); box-shadow: 0 0 12px rgba(61,166,216,.3), var(--sh-panel); }
.draw-card .nm { font-weight: 800; color: var(--txt); }
.draw-card .meta { font-size: 11px; color: var(--muted); }
.draw-card .new { position: absolute; top: -8px; right: 8px; font-family: var(--dot); font-size: 10px; font-weight: 800;
  color: #fff; background: var(--lose); border: 2px solid var(--lose-d); border-radius: 7px; padding: 1px 7px; box-shadow: 0 2px 0 var(--lose-d); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- 모달 ---- */
.overlay { position: fixed; inset: 0; background: rgba(74,53,38,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 3px solid var(--line-strong); border-radius: 16px;
  width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; padding: 18px;
  box-shadow: 0 6px 0 rgba(138,90,43,.3), 0 16px 36px rgba(74,53,38,.3); }
.modal h3 { font-size: 16px; margin-bottom: 12px; color: var(--txt); text-shadow: 1px 1px 0 #fff; }
.modal .row-btns { display: flex; gap: 8px; margin-top: 14px; }
.modal .row-btns .btn { flex: 1; }

/* 순위표 */
.standings { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.standings th, .standings td { padding: 6px 5px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.standings th { color: var(--muted); font-weight: 700; }
.standings td.tm { text-align: left; font-weight: 700; }
.standings tr:nth-child(even) td { background: rgba(243,231,201,.5); }
.standings tr.me td { color: var(--accent-ink); font-weight: 800; background: rgba(92,191,74,.14); }
.standings tr.cut td { border-bottom: 2px solid var(--accent2); }
.standings tr.relegcut td { border-bottom: 2px solid var(--lose); }
.standings tr.releg td { color: var(--lose); }
.standings tr.releg.me td { color: var(--lose); }

/* 리그 단계 */
.pill.league { cursor: pointer; color: var(--gold-ink); background: #ffe9b0; border-color: var(--accent2); display: inline-flex; align-items: center; gap: 3px; }
.pill-ic { width: 15px; height: 15px; object-fit: contain; }
.pill.league:hover { filter: brightness(1.04); }
.league-cond { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.league-cond .cond { font-size: 12.5px; padding: 9px 12px; border-radius: var(--rad); border: 2px solid var(--line); background: var(--panel); }
.league-cond .cond.up { color: var(--win-ink); background: rgba(63,181,107,.12); border-color: #8fcfa6; }
.league-cond .cond.down { color: var(--lose); background: rgba(232,98,58,.10); border-color: #e3a78f; }
.promo-banner { margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--rad); font-size: 14px;
  font-weight: 800; text-align: center; border: 2px solid var(--line); }
.promo-banner.up { color: var(--win-ink); background: rgba(63,181,107,.14); border-color: #8fcfa6; }
.promo-banner.down { color: var(--lose); background: rgba(232,98,58,.12); border-color: #e3a78f; }
.promo-banner.stay { color: var(--muted); }

/* 순위 · 기록실 */
.rec-filter { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; flex-wrap: wrap; }
.rec-filter label { font-size: 12px; color: var(--muted); font-weight: 700; }
.rec-filter select { background: var(--panel); color: var(--txt); border: 2px solid var(--line);
  border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--line-strong); border-radius: var(--rad);
  scrollbar-width: none; -ms-overflow-style: none; box-shadow: var(--sh-panel); }
.tbl-scroll::-webkit-scrollbar { display: none; height: 0; }   /* 하단 스크롤바 숨김(헤더 드래그로 이동) */
.rec-table thead { cursor: grab; }
.rec-table thead.dragging { cursor: grabbing; }
.rec-table thead.dragging th { color: var(--gold-ink); }
.rec-table { border-collapse: collapse; font-size: 11.5px; white-space: nowrap; min-width: 100%; }
.rec-table th, .rec-table td { padding: 6px 7px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.rec-table th { color: var(--muted); font-weight: 700; background: var(--panel2); position: sticky; top: 0; z-index: 1; }
.rec-table tr:nth-child(even) td { background: rgba(243,231,201,.45); }
.rec-table th.srt { cursor: pointer; user-select: none; }
.rec-table th.srt:hover { color: var(--txt); }
.rec-table th.sorted { color: var(--gold-ink); }
.rec-table td.sorted { color: var(--gold-ink); font-weight: 800; }
.rec-table td.hl { color: var(--accent-ink); font-weight: 800; }
.rec-table .lft { text-align: left; }
.rec-table td.tm, .rec-table td.lft.tm { font-weight: 700; }
.rec-table tr.me td { color: var(--accent-ink); background: rgba(92,191,74,.14); }
.rec-table tr.me td.sorted { color: var(--gold-ink); }
.rec-table tr.cut td { border-bottom: 2px solid var(--accent2); }
.rec-table tr.relegcut td { border-bottom: 2px solid var(--lose); }
.rec-table tr.releg td { color: var(--lose); }
.rec-table .nm-col { min-width: 62px; }
.rec-table .pl-nm { font-weight: 800; color: var(--txt); }
.rec-table tr.me .pl-nm { color: var(--accent-ink); }
.rec-table .pl-tm { font-size: 10px; color: var(--muted); }
.rec-table .form-cell { min-width: 96px; }
.form5 { display: inline-block; width: 16px; height: 16px; line-height: 16px; border-radius: 5px;
  font-size: 9px; font-weight: 800; color: #fff; margin-right: 2px; text-align: center; }
.form5.w { background: var(--win); } .form5.l { background: var(--lose); } .form5.d { background: var(--draw); color: #4a3526; }
.rec-sub-h { font-size: 12.5px; font-weight: 800; color: var(--gold-ink); margin: 0 2px 8px; }
.season-sub { margin-top: 4px; }
.next-tag { font-family: var(--dot); font-size: 10px; font-weight: 700; color: var(--accent-ink); border: 1.5px solid var(--accent);
  border-radius: 6px; padding: 1px 5px; background: rgba(92,191,74,.12); }
.rec-table.sched td { padding: 7px 6px; }

/* 구단 정보 */
.mt16 { margin-top: 16px; }
.club-card { background: var(--panel); border: 2px solid var(--line-strong); border-radius: 13px; padding: 4px 14px; box-shadow: var(--sh-panel); }
.club-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.club-row:last-child { border-bottom: none; }
.club-row .k { color: var(--muted); }
.club-row .v { font-weight: 700; text-align: right; color: var(--txt); }
.club-row .v.hl { color: var(--accent-ink); font-weight: 800; }
.club-row .v.up { color: var(--win-ink); }
.club-row .v.down { color: var(--lose); }
.club-speeds { display: flex; gap: 6px; margin-left: 0; }
.club-speeds .speed { flex: 1; padding: 10px 4px; font-size: 13px; }

/* 보상 팝업 */
.reward-pop { position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  background: var(--panel); border: 3px solid var(--accent2); border-radius: 16px;
  padding: 16px 22px; text-align: center; z-index: 40; animation: pop .3s ease; min-width: 200px;
  box-shadow: 0 6px 0 rgba(201,127,18,.4), 0 14px 30px rgba(74,53,38,.3); }
.reward-pop .res { font-family: var(--dot); font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.reward-pop .res.win { color: var(--win-ink); } .reward-pop .res.lose { color: var(--lose); }
.reward-pop .res.draw { color: var(--draw-ink); }
.reward-pop .coin { font-family: var(--dot); color: var(--gold-ink); font-weight: 700; }
.reward-pop .sl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 토스트 */
.toast { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%);
  background: var(--panel); border: 2px solid var(--line-strong); border-radius: var(--rad);
  padding: 9px 15px; font-size: 12.5px; font-weight: 700; color: var(--txt); z-index: 60; animation: pop .2s ease;
  box-shadow: var(--sh-panel); }

/* 구단 선택 모달 */
.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.team-pick { display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--panel); border: 2px solid var(--line); color: var(--txt);
  border-radius: var(--rad); padding: 9px 2px; font-weight: 700; font-size: 12px; cursor: pointer; box-shadow: 0 3px 0 rgba(138,90,43,.22); }
.team-pick .tlogo.lg { width: 34px; height: 34px; }
.team-pick:hover { border-color: var(--accent-d); transform: translateY(-1px); }
.team-pick.active { background: var(--accent); color: #1f4d18; border-color: var(--accent-d); box-shadow: 0 3px 0 var(--accent-d); }
.team-pick.active .tlogo { filter: drop-shadow(0 0 2px rgba(0,0,0,.25)); }

/* =================== 구단 로고(공통) =================== */
.tlogo { object-fit: contain; vertical-align: middle; flex: none; }
.tlogo.xs { width: 13px; height: 13px; }
.tlogo.sm { width: 17px; height: 17px; }
.tlogo.lg { width: 32px; height: 32px; }
.tlogo.av-logo { width: 22px; height: 22px; }
/* 로고 + 팀명 묶음(표 셀·정보 행 등에서 inline 정렬) */
.tcell { display: inline-flex; align-items: center; gap: 5px; min-width: 0; vertical-align: middle; }
.tcell .tnm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-table .pl-tm .tcell { gap: 4px; }
.name-row { display: flex; align-items: center; gap: 8px; }
.name-row label { font-size: 12px; color: var(--muted); white-space: nowrap; font-weight: 700; }
.name-row input { flex: 1; background: var(--panel); border: 2px solid var(--line); color: var(--txt);
  border-radius: 9px; padding: 9px 11px; font-size: 13px; font-family: inherit; }
.name-row input:focus { outline: none; border-color: var(--accent-d); }

/* =================== 로그인 / 가입 =================== */
.login-modal { max-width: 380px; }
.login-form { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.login-form input { background: var(--panel); border: 2px solid var(--line); color: var(--txt);
  border-radius: 9px; padding: 11px 12px; font-size: 14px; font-family: inherit; }
.login-form input:focus { outline: none; border-color: var(--accent-d); }
.login-err { min-height: 18px; color: var(--lose, #c0392b); font-size: 12px; margin-bottom: 6px; text-align: center; }
.linklike { background: none; border: none; color: var(--muted); font-size: 12.5px; font-family: inherit;
  text-decoration: underline; cursor: pointer; padding: 4px; }
.linklike:hover { color: var(--txt); }

/* =================== 튜토리얼(신규 게임 시작 안내) =================== */
.tut-modal { max-width: 440px; }
.tut-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tut-step { font-family: var(--dot); font-size: 11px; color: var(--muted); font-weight: 700; }
.tut-skip { margin-left: auto; background: none; border: none; color: var(--muted);
  font-size: 11.5px; cursor: pointer; text-decoration: underline; padding: 2px 4px; }
.tut-skip:hover { color: var(--txt); }
.tut-page { min-height: 318px; animation: tutFade .22s ease; }
@keyframes tutFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tut-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tut-emoji { font-size: 30px; line-height: 1; }
.tut-title { font-size: 17px; font-weight: 800; color: var(--txt); text-shadow: 1px 1px 0 #fff; }
.tut-intro { font-size: 13px; line-height: 1.7; color: var(--txt); margin-bottom: 12px; }
.tut-bullets { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 10px 0 0; }
.tut-bullets li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.55; color: var(--txt); }
.tut-bullets li::before { content: '▸'; position: absolute; left: 2px; top: 0; color: var(--gold-ink); font-weight: 800; }
.tut-bullets li b { color: var(--gold-ink); }
.tut-callout { margin-top: 12px; padding: 10px 12px; border-radius: var(--rad); font-size: 12px; line-height: 1.6;
  color: var(--win-ink); background: rgba(63,181,107,.12); border: 2px solid #8fcfa6; }
.tut-callout b { color: var(--win-ink); }

/* 페이지 네비게이션(점 + 이전/다음) */
.tut-nav { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.tut-dots { display: flex; gap: 6px; margin: 0 auto; }
.tut-dots .d { width: 7px; height: 7px; border-radius: 50%; background: var(--line-soft); transition: all .2s; }
.tut-dots .d.on { background: var(--accent2); width: 18px; border-radius: 4px; }
.tut-nav .btn { flex: none; min-width: 88px; }
.tut-nav .btn.ghost.hidden { visibility: hidden; }

/* 위젯: 리그 7단계 표(현재 단계 강조 + 승급/강등 구간 색) */
.tut-leagues { width: 100%; border-collapse: collapse; font-size: 12px; }
.tut-leagues th, .tut-leagues td { padding: 6px 6px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.tut-leagues th { color: var(--muted); font-weight: 700; font-size: 11px; }
.tut-leagues td.lg { text-align: left; font-weight: 800; }
.tut-leagues .tier { display: inline-block; min-width: 16px; color: var(--muted); }
.tut-leagues tr.start td { color: var(--accent-ink); background: rgba(92,191,74,.12); }
.tut-leagues tr.start td.lg::after { content: ' ◀ 시작'; font-size: 10px; color: var(--accent-ink); }
.tut-leagues .pm { font-size: 11px; }
.tut-leagues .pm.post { color: var(--gold-ink); }
.tut-leagues .pm.champ { color: var(--sig); }
.tut-leagues .pm.top { color: var(--win-ink); }

/* 위젯: 보상표 */
.tut-reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 4px 0 10px; }
.tut-rw { background: var(--panel); border: 2px solid var(--line); border-radius: var(--rad); padding: 9px 4px; text-align: center; box-shadow: 0 3px 0 rgba(138,90,43,.2); }
.tut-rw .t { font-size: 11px; color: var(--muted); font-weight: 700; }
.tut-rw .v { font-family: var(--dot); font-size: 17px; font-weight: 800; margin-top: 2px; }
.tut-rw.win .v { color: var(--win-ink); }
.tut-rw.draw .v { color: var(--draw-ink); }
.tut-rw.lose .v { color: var(--lose); }
.tut-stage { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.tut-stage th, .tut-stage td { padding: 5px 4px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.tut-stage th { color: var(--muted); font-weight: 700; }
.tut-stage td.x { color: var(--gold-ink); font-weight: 800; }

/* 위젯: 등급 카드 */
.tut-grades { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.tut-gr { display: flex; align-items: center; gap: 10px; background: var(--panel);
  border: 2px solid var(--line); border-radius: var(--rad); padding: 9px 12px; box-shadow: 0 3px 0 rgba(138,90,43,.2); }
.tut-gr .lead { font-family: var(--dot); font-size: 22px; font-weight: 800; min-width: 56px; text-align: center; }
.tut-gr.NORMAL { border-left: 4px solid var(--normal); } .tut-gr.NORMAL .lead { color: var(--normal); }
.tut-gr.IMPACT { border-left: 4px solid var(--special); } .tut-gr.IMPACT .lead { color: var(--special); }
.tut-gr.SIGNATURE { border-left: 4px solid var(--sig); } .tut-gr.SIGNATURE .lead { color: var(--sig); }
.tut-gr .gx .gname { font-size: 13px; font-weight: 800; color: var(--txt); }
.tut-gr .gx .gdesc { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* 위젯: 로스터 구성도 */
.tut-roster { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.tut-rrow { background: var(--panel); border: 2px solid var(--line); border-radius: var(--rad); padding: 9px 12px; box-shadow: 0 3px 0 rgba(138,90,43,.2); }
.tut-rrow .rh { font-size: 12px; font-weight: 800; color: var(--accent-ink); margin-bottom: 5px; }
.tut-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tut-chips span { font-size: 10.5px; font-weight: 700; color: var(--txt); background: var(--panel2);
  border: 1.5px solid var(--line); border-radius: 7px; padding: 2px 7px; }

/* =================== 선수 카드 상세 / 후보 능력치 비교 =================== */
/* 카드 헤더(로고·이름·등급·포지션 + OVR) */
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pc-id { flex: 1; min-width: 0; }
.pc-nm { font-size: 15px; font-weight: 800; color: var(--txt); }
.pc-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.pc-ovr { text-align: center; background: var(--panel2); border: 2px solid var(--line-strong); border-radius: var(--rad); padding: 4px 12px; }
.pc-ovr .o { font-family: var(--dot); font-size: 22px; font-weight: 900; color: var(--accent-ink); line-height: 1.05; }
.pc-ovr .ol { font-size: 9px; color: var(--muted); font-weight: 700; }

/* 스탯 막대(단일 카드 상세) */
.stat-bars { display: flex; flex-direction: column; gap: 7px; }
.stat-row { display: grid; grid-template-columns: 38px 1fr 26px; align-items: center; gap: 8px; }
.stat-row .sl { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-row .sbar { height: 9px; background: var(--panel2); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.stat-row .sfill { display: block; height: 100%; border-radius: 6px; transition: width .25s; }
.stat-row .sfill.elite { background: var(--sig); }
.stat-row .sfill.good { background: var(--accent); }
.stat-row .sfill.avg { background: var(--win); }
.stat-row .sfill.low { background: var(--muted); }
.stat-row .sv { font-family: var(--dot); font-size: 13px; font-weight: 800; text-align: right; color: var(--txt); }

/* 후보 비교 패널(피커 하단) */
.cmp-panel { margin-top: 10px; }
.cmp-panel:empty { display: none; }
.cmp-table { background: var(--panel2); border: 2px solid var(--line-strong); border-radius: var(--rad); padding: 8px 12px; }
.cmp-head, .cmp-row { display: grid; grid-template-columns: 44px 1fr 50px 1fr; align-items: center; }
.cmp-head { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line-soft); }
.cmp-head .cv { color: var(--muted); font-weight: 700; font-size: 11px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-head .cv.cand { color: var(--accent-ink); }
.cmp-row { padding: 4px 0; font-size: 13px; }
.cmp-row .cl { font-size: 11.5px; color: var(--muted); }
.cmp-row .cv { text-align: center; font-weight: 700; color: var(--txt); }
.cmp-row .cv.cand { color: var(--txt); font-weight: 800; }
.cmp-row .cd { text-align: center; font-size: 11px; font-weight: 800; }
.cmp-row .cd.up { color: var(--win-ink); }
.cmp-row .cd.down { color: var(--lose); }
.cmp-row .cd.same, .cmp-row .cd.na { color: var(--muted); }
.cmp-row.ovr { margin-top: 4px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.cmp-row.ovr .cl { color: var(--txt); font-weight: 800; }
.cmp-row.ovr .cv.cand { color: var(--accent-ink); }

/* 후보 선택 강조 */
.cand.selected { border-color: var(--accent-d); box-shadow: inset 0 0 0 2px var(--accent); }

/* 뽑기 카드: 눌러서 능력치 보기 */
.draw-card[data-card] { cursor: pointer; transition: transform .1s, border-color .15s; }
.draw-card[data-card]:hover { transform: translateY(-1px); }
.draw-card .tap-hint { font-size: 9px; color: var(--accent-ink); font-weight: 700; }

/* =================== 선수 강화 =================== */
/* 강화 단계 배지(카드 모든 위치). 5단계(MAX)는 흐르는 금빛+글로우로 화려하게 */
.enh { display: inline-block; font-family: var(--dot); font-size: 9.5px; font-weight: 800; color: #5a3a00; background: var(--accent2);
  border: 1.5px solid var(--accent2-d); border-radius: 6px; padding: 1px 5px; vertical-align: middle; line-height: 1.45; }
.enh.max { color: #3a2400; background: linear-gradient(90deg, #ffce54, #ff7a3d, #ffce54, #ff7a3d);
  background-size: 300% 100%; animation: enhmax 2.2s linear infinite; box-shadow: 0 0 7px rgba(255,170,60,.7); }
@keyframes enhmax { from { background-position: 0% 0; } to { background-position: 300% 0; } }
/* 강화 화면 목록 + 모달 */
.enh-row { cursor: pointer; }
.enh-meta { display: flex; gap: 8px; margin-top: 12px; }
.enh-meta .em { flex: 1; background: var(--panel2); border: 2px solid var(--line-strong); border-radius: var(--rad); padding: 9px 10px; text-align: center; }
.enh-meta .em .k { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.enh-meta .em .v { font-family: var(--dot); font-size: 17px; font-weight: 800; color: var(--txt); }
.enh-meta .em .v.lack { color: var(--lose); }
.enh-maxed { text-align: center; padding: 20px 10px; font-size: 15px; font-weight: 800; color: var(--sig); }

.empty-note { color: var(--muted); text-align: center; padding: 24px 12px; font-size: 13px; }
/* 후보 리스트는 자체 스크롤을 두지 않는다 → 모달 하나만 스크롤(이중 스크롤 방지) */
.cand-list { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
/* 비교+버튼은 모달 하단에 sticky 고정 → 후보가 길어 모달이 스크롤돼도 항상 보임. 단일 스크롤 유지 */
.picker-modal .pick-foot { position: sticky; bottom: -18px; margin: 8px -18px -18px; padding: 10px 18px 18px;
  background: var(--panel); border-top: 2px solid var(--line-strong); }
.picker-modal .pick-foot .row-btns { margin-top: 10px; }

/* 후보창: 이미 라인업에 편성된 선수 구분 */
.cand.in-use { background: var(--panel2); border-color: var(--line); opacity: .9; }
.cand.in-use .ovr { opacity: .6; }
.cand.is-current { border-color: var(--accent-d); box-shadow: inset 0 0 0 1.5px rgba(92,191,74,.4); }
.badge-used, .badge-cur { font-family: var(--dot); font-size: 10px; font-weight: 800; border-radius: 6px; padding: 1px 6px; margin-left: 6px;
  white-space: nowrap; vertical-align: middle; }
.badge-used { color: var(--gold-ink); border: 1.5px solid var(--accent2); background: rgba(245,166,35,.14); }
.badge-cur { color: var(--accent-ink); border: 1.5px solid var(--accent); background: rgba(92,191,74,.16); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }

/* =================== 배구 라이브 뷰 (ui-live.js 캔버스) =================== */
/* 경기 엔진은 유지하고, 캔버스 바깥에 교체 가능한 스킨 프레임을 씌운다. */
.vlive { display: flex; flex-direction: column; gap: 7px; padding: 2px; min-height: 100%; }
.vscore { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 94px;
  border: 14px solid transparent; border-image: url('../img/ui/common/panel-frame.png') 32 fill / 14px / 0 stretch;
  padding: 0 2px; filter: drop-shadow(0 3px 0 rgba(138,90,43,.2)); }
.vscore .home { color: #2f7fbf; } .vscore .away { color: var(--lose); }
.vs-sets { font-family: var(--dot); font-size: 20px; font-weight: 900; min-width: 30px; height: 48px;
  display: grid; place-items: center; text-align: center; color: #fff; border-radius: 10px; border: 2px solid rgba(74,53,38,.45);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 2px 0 rgba(74,53,38,.25); }
.vs-sets.home { background: linear-gradient(180deg, #4aa3e0, #2f6fa8); }
.vs-sets.away { background: linear-gradient(180deg, #ef7553, #c9472b); }
.vs-team { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; font-size: 10.5px; font-weight: 900; white-space: nowrap; text-align: center; }
.vs-team.home, .vs-team.away { justify-content: center; }
.vs-team.away .vs-logo { order: -1; }
.vs-team span { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vs-logo { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 1px 0 rgba(74,53,38,.18)); }
.vs-pts { font-family: var(--dot); font-size: 29px; font-weight: 900; min-width: 82px; text-align: center;
  letter-spacing: 1px; color: var(--txt); background: #3c2c20; border: 3px solid #6e4729; border-radius: 10px; padding: 5px 3px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.38); }
.vs-pts .home, .vs-pts .away { color: #fff; text-shadow: 0 2px 0 #000; }
.vs-pts .vs-col { color: var(--accent2); margin: 0 3px; }
.vcourt-shell { border: 13px solid transparent; border-image: url('../img/ui/common/panel-frame.png') 32 fill / 13px / 0 stretch;
  filter: drop-shadow(0 3px 0 rgba(138,90,43,.24)); }
.vcourt-wrap { position: relative; display: flex; justify-content: center; overflow: hidden; border-radius: 7px; }
.vcourt { display: block; width: 100%; height: auto; background: #0a0a14; border-radius: 7px; border: 0; image-rendering: auto; }
.vs-sub { align-self: center; min-width: 220px; text-align: center; font-size: 10.5px; font-weight: 800; color: var(--txt);
  letter-spacing: .3px; border: 8px solid transparent; border-image: url('../img/ui/common/pill-frame.png') 22 fill / 8px / 0 stretch;
  padding: 0 9px; margin-top: -11px; position: relative; z-index: 2; filter: drop-shadow(0 2px 0 rgba(138,90,43,.18)); }
.vs-state-label { color: var(--accent-ink); }
.vs-dot { color: var(--accent2); padding: 0 5px; }
.vlog div { color: var(--txt); min-height: 36px; display: grid; grid-template-columns: 30px 1fr; align-items: center;
  gap: 7px; padding: 5px 7px; border-bottom: 1px solid var(--line-soft); }
.vlog div:last-child { border-bottom: 0; }
.vlog div::before { content: ""; width: 28px; height: 28px; background: url('../img/ui/icon/event-ball.png') center/contain no-repeat; }
.vlog .pt { color: var(--gold-ink); font-weight: 800; }
.vlog .pt::before { background-image: url('../img/ui/icon/event-point.png'); }
.vlog .ace { color: var(--lose); font-weight: 800; }
.vlog .ace::before { background-image: url('../img/ui/icon/event-ace.png'); }
.vflash { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) scale(.7);
  font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8);
  opacity: 0; pointer-events: none; transition: none; white-space: nowrap; }
.vflash.show { animation: vflash 0.9s ease-out; }
.vflash.pt { color: #ffe14d; } .vflash.blk { color: #6cf; } .vflash.err { color: #fa8; }
@keyframes vflash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.5); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  80% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1); } }
.vlog { height: 190px; min-height: 190px; max-height: 260px; flex: 1 1 190px; overflow-y: auto; background: transparent; border: 13px solid transparent;
  border-image: url('../img/ui/common/panel-frame.png') 32 fill / 13px / 0 stretch; padding: 0 4px;
  font-size: 11.5px; line-height: 1.45; filter: drop-shadow(0 3px 0 rgba(138,90,43,.2)); }

/* =========================================================================
 * UI SKIN v3 — 경기장 외 화면까지 확장한 전용 게임 UI
 * 구조/게임 로직은 유지하고 로스터·스카우트·기록·정보·팝업의 시각 체계만 교체한다.
 * ========================================================================= */

/* 화면별 상단 간판 */
.screen-heading { position: relative; flex: none; min-height: 58px; display: flex; align-items: center; gap: 9px;
  margin-bottom: 10px; padding: 6px 10px; overflow: hidden; color: #fff8dc;
  border: 3px solid #70451f; border-radius: 14px;
  background: linear-gradient(180deg, #397553 0%, #285b3d 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 4px 0 #b77c3e, 0 7px 15px rgba(74,53,38,.18); }
.screen-heading::after { content: ""; position: absolute; right: -24px; top: -35px; width: 120px; height: 120px;
  border: 18px solid rgba(255,238,187,.08); border-radius: 50%; pointer-events: none; }
.screen-heading-icon { position: relative; z-index: 1; width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border: 2px solid #e7c77d; border-radius: 12px; background: #fff5d8; box-shadow: inset 0 2px 0 #fff, 0 2px 0 #163d2c; }
.screen-heading-icon img { width: 31px; height: 31px; object-fit: contain; }
.screen-heading-copy { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; }
.screen-heading-copy strong { font-size: 14px; line-height: 1.25; color: #fff8dc; text-shadow: 0 2px 0 #173c2b; }
.screen-heading-copy small { margin-top: 2px; font-size: 9.5px; color: #d9eac8; }
.screen-heading-badge { position: relative; z-index: 1; margin-left: auto; padding: 4px 7px; text-align: center;
  font-size: 9px; line-height: 1.45; color: #633b17; white-space: nowrap; background: #ffe6a1;
  border: 2px solid #e4a529; border-radius: 8px; box-shadow: 0 2px 0 #8a571e; }
.roster-screen > .subtabs, .records-screen > .subtabs, .info-screen > .subtabs { padding: 4px; gap: 4px;
  border: 2px solid #a8743e; border-radius: 12px; background: rgba(196,163,105,.34); box-shadow: inset 0 1px 4px rgba(94,57,29,.16); }
.roster-screen > .subtabs .subtab, .records-screen > .subtabs .subtab, .info-screen > .subtabs .subtab {
  padding: 7px 5px; border-width: 1.5px; box-shadow: 0 2px 0 rgba(94,57,29,.25); }
.roster-screen > .screen-heading, .records-screen > .screen-heading { flex: none; }

/* 로스터: 실제 전술 보드처럼 보이는 포메이션 패널 */
.vcourt-edit { isolation: isolate; padding: 12px 10px 15px; border: 8px solid #276250; border-radius: 16px;
  background-color: #d49a5c;
  background-image: repeating-linear-gradient(90deg, rgba(117,69,35,.17) 0 1px, transparent 1px 54px),
                    repeating-linear-gradient(0deg, rgba(255,239,199,.13) 0 1px, transparent 1px 46px),
                    linear-gradient(180deg, #dda66c 0%, #c9894d 100%);
  box-shadow: inset 0 0 0 3px #f6e8bd, inset 0 0 18px rgba(93,52,25,.22), 0 4px 0 #714820, 0 8px 18px rgba(74,53,38,.18); }
.vcourt-edit::before { content: ""; position: absolute; z-index: -1; inset: 7px; pointer-events: none;
  border: 2px solid rgba(255,250,224,.78); border-radius: 5px; }
.vcourt-edit > * { position: relative; z-index: 1; }
.vc-net { height: 16px; margin: 1px 2px 7px; border: 2px solid rgba(86,55,30,.52); background-color: rgba(255,255,255,.72);
  box-shadow: 0 2px 0 rgba(86,55,30,.25); }
.vc-net span { color: #72502f; font-size: 8px; letter-spacing: 3px; }
.vc-rowlabel { color: #fff8df; text-shadow: 0 1px 0 #744621; letter-spacing: .2px; }
.vc-attackline { border-top: 2px dashed rgba(255,250,224,.9); }
.ct-tile { position: relative; min-height: 92px; padding: 7px 5px 6px; overflow: hidden;
  border: 2px solid #815329; border-top-width: 5px; border-radius: 11px; background: linear-gradient(180deg, #fffaf0 0%, #f4e6c7 100%);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(92,55,27,.35), 0 5px 9px rgba(74,53,38,.12); }
.ct-tile::after { content: ""; position: absolute; right: -12px; bottom: -16px; width: 43px; height: 43px;
  border: 8px solid rgba(139,91,42,.06); border-radius: 50%; pointer-events: none; }
.ct-tile.empty { border-style: solid; border-top-style: dashed; opacity: .78; }
.ct-tile.pos-S  { border-top-color: #3288c2; }
.ct-tile.pos-OH { border-top-color: #4b9d40; }
.ct-tile.pos-MB { border-top-color: #d36f2d; }
.ct-tile.pos-OP { border-top-color: #9355b9; }
.ct-tile.pos-L  { border-top-color: #d4a01c; }
.ct-badge { height: 24px; line-height: 24px; border: 2px solid rgba(73,44,22,.35); border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 rgba(73,44,22,.25); }
.ct-role { color: #806c52; }
.ct-name { font-size: 11px; }
.vc-libero { margin-top: 10px; padding: 7px 9px 10px; border: 4px solid #70451f; border-radius: 13px;
  background: linear-gradient(180deg, #397553, #285b3d); box-shadow: 0 4px 0 #b77c3e; }
.vc-libero .vc-rowlabel { margin-top: 0; }
.vc-libero .ct-tile { max-width: 58%; }

/* 선수 강화: 등급색이 보이는 카드형 목록 */
.enh-list { padding: 2px 2px 8px; }
.slot.enh-row { position: relative; overflow: hidden; min-height: 61px; padding: 9px 11px 9px 17px;
  background: linear-gradient(90deg, #fff9e9, #f3e4c2); }
.slot.enh-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: var(--normal); }
.slot.enh-row.IMPACT::before { background: var(--special); }
.slot.enh-row.SIGNATURE::before { background: linear-gradient(180deg, #ffe06b, #d28b00); }
.slot.enh-row.SIGNATURE { border-color: #c78a10; box-shadow: 0 3px 0 rgba(167,101,0,.32), 0 0 11px rgba(217,158,11,.18); }
.slot.enh-row .ovr { min-width: 42px; padding: 4px 5px; color: #fff4cf; border: 2px solid #65401f; border-radius: 8px;
  background: #3e2c1f; text-align: center; box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.enh-meta .em { background: linear-gradient(180deg, #fff8e8, #f0dfba); box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(103,62,29,.24); }
.enh-maxed { border: 3px double #c88b18; border-radius: 12px; background: #fff0b7; box-shadow: 0 4px 0 rgba(164,101,8,.25); }

/* 스카우트: 독립된 카드팩 화면 */
.gacha-screen { min-height: 100%; padding-bottom: 8px; }
.gacha-stage { position: relative; min-height: 118px; display: flex; align-items: center; overflow: hidden; margin-bottom: 10px; padding: 15px 104px 14px 16px;
  border: 4px solid #75481f; border-radius: 15px;
  background: radial-gradient(circle at 79% 46%, rgba(255,238,119,.92) 0 8%, rgba(255,203,56,.35) 9% 25%, transparent 26%),
              linear-gradient(135deg, #326e49 0%, #204f39 62%, #173e2e 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 4px 0 #b77c3e, 0 8px 18px rgba(74,53,38,.2); }
.gacha-stage::before, .gacha-stage::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; border: 12px solid rgba(255,239,166,.08); }
.gacha-stage::before { left: -46px; top: -45px; } .gacha-stage::after { left: 92px; bottom: -66px; }
.gacha-stage-copy { position: relative; z-index: 1; display: flex; flex-direction: column; }
.gacha-stage-copy > span { font-size: 9px; letter-spacing: 1.2px; color: #f8d66c; }
.gacha-stage-copy strong { margin: 3px 0 5px; color: #fff5cc; font-size: 15px; line-height: 1.3; text-shadow: 0 2px 0 #0e2d20; }
.gacha-stage-copy small { color: #cfe3c4; font-size: 9.5px; line-height: 1.5; }
.gacha-pack { position: absolute; z-index: 1; right: 16px; top: 15px; width: 78px; height: 88px; display: grid; place-items: center;
  transform: rotate(5deg); border: 3px solid #e5aa2e; border-radius: 13px;
  background: linear-gradient(145deg, #fff6d2, #ffc64f); box-shadow: inset 0 0 0 3px #fff2b2, 0 5px 0 #7e4b18, 0 9px 14px rgba(0,0,0,.26); }
.gacha-pack img { width: 55px; height: 55px; object-fit: contain; }
.gacha-rates { margin: 11px 0 10px; gap: 6px; }
.rate { position: relative; overflow: hidden; padding: 8px 4px 7px; border-width: 2px; background: linear-gradient(180deg, #fffaf0, #f1e2bf); }
.rate::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--normal); }
.rate.IMPACT::before { background: var(--special); }
.rate.SIGNATURE::before { background: linear-gradient(90deg, #efb21d, #ffe176, #efb21d); }
.rate.SIGNATURE { border-color: #c88a18; }
.rate .p { margin-top: 3px; font-family: var(--dot); font-size: 13px; font-weight: 900; color: var(--txt); }
.gacha-btns { gap: 9px; margin: 12px 0 10px; }
.gacha-btns .btn { min-height: 70px; padding: 9px 7px 8px; color: #fff9d7; border-color: #71461e;
  background: linear-gradient(180deg, #5fc94e 0%, #3c9833 100%); box-shadow: inset 0 2px 0 #86dc77, 0 5px 0 #256623; text-shadow: 0 1px 0 #245822; }
.gacha-btns .btn.multi { background: linear-gradient(180deg, #f3bb38 0%, #d48512 100%); box-shadow: inset 0 2px 0 #ffe077, 0 5px 0 #8f5410; text-shadow: 0 1px 0 #88500f; }
.gacha-btns .btn small { color: #fff9dc; }
.gacha-btns .guarantee { display: inline-block; margin-top: 3px; padding: 2px 7px; font-weight: 800; color: #fff3cf; text-shadow: 0 1px 0 rgba(0,0,0,.4); background: #6e3f16; border: 1px solid #4a2a0d; border-radius: 6px; }
.gacha-wallet { text-align: center; font-size: 10.5px; color: #7f6a4f; padding: 6px 9px; border: 2px solid #d4bb83; border-radius: 9px; background: rgba(255,248,227,.65); }
.gacha-wallet::before { content: ""; display: inline-block; width: 17px; height: 17px; margin-right: 4px; vertical-align: -4px;
  background: url('../img/ui/icon/coin.png') center/contain no-repeat; }
.gacha-wallet b { color: var(--gold-ink); }
.draw-results { gap: 9px; }
.draw-card { min-height: 82px; padding: 12px 9px 9px; border-width: 3px; background: linear-gradient(145deg, #fffaf0, #ead8b4); }
.draw-card.IMPACT { background: linear-gradient(145deg, #f4fbff, #d3effc); }
.draw-card.SIGNATURE { background: radial-gradient(circle at 85% 15%, #fff8a8, transparent 34%), linear-gradient(145deg, #fff7d4, #f2c85e); }
.draw-card .meta { margin-top: 3px; }

/* 기록실: 나무 프레임 안의 전광판형 표 */
.rec-filter { padding: 8px 9px; border: 2px solid #b0834e; border-radius: 10px; background: linear-gradient(180deg, #fff7e4, #ead9b5); }
.rec-filter select { min-height: 32px; border-color: #9f7040; background: #fffaf0; box-shadow: inset 0 1px 2px rgba(80,48,25,.12); }
.tbl-scroll { background: #fff9ea; border: 4px solid #70451f; border-radius: 12px;
  box-shadow: inset 0 0 0 2px #ddb16b, 0 4px 0 #b77c3e, 0 8px 16px rgba(74,53,38,.16); }
.rec-table th { color: #fff4cf; background: linear-gradient(180deg, #397553, #285b3d); border-bottom: 2px solid #173d2b; text-shadow: 0 1px 0 #173d2b; }
.rec-table th.sorted, .rec-table thead.dragging th { color: #ffd454; }
.rec-table td { background: rgba(255,250,237,.96); }
.rec-table tr:nth-child(even) td { background: rgba(239,225,193,.82); }
.rec-table tr.me td { color: var(--accent-ink); background: #dceacb; }
.rec-table tr.me:nth-child(even) td { background: #d2e2c1; }
.form5 { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(74,53,38,.2); }

/* 구단 정보: 엠블럼 카드 + 사무실 서류 보드 */
.info-screen { min-height: 100%; padding-bottom: 8px; }
.club-hero { position: relative; min-height: 96px; display: flex; align-items: center; gap: 13px; margin-bottom: 12px; padding: 11px 15px; overflow: hidden;
  color: #fff5d5; border: 4px solid #754820; border-radius: 15px;
  background: linear-gradient(135deg, #397553 0%, #285b3d 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.16), 0 4px 0 #b77c3e; }
.club-hero::after { content: "V"; position: absolute; right: 10px; bottom: -29px; color: rgba(255,245,213,.07); font-size: 104px; font-weight: 900; line-height: 1; }
.club-crest { position: relative; z-index: 1; width: 70px; height: 70px; flex: none; display: grid; place-items: center;
  border: 3px solid #e7c16c; border-radius: 50%; background: #fff6dc; box-shadow: inset 0 2px 0 #fff, 0 3px 0 #173b2b; }
.tlogo.hero { width: 56px; height: 56px; }
.club-hero-copy { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; }
.club-hero-copy small { color: #f1cc6f; font-size: 8.5px; letter-spacing: .8px; }
.club-hero-copy strong { max-width: 245px; margin: 3px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #fff8dc; font-size: 15px; text-shadow: 0 2px 0 #173b2b; }
.club-hero-copy span { color: #d7e7c9; font-size: 10px; }
.club-card { padding: 5px 13px; border: 4px solid #754820; background: linear-gradient(180deg, #fff9ea, #f0dfba);
  box-shadow: inset 0 0 0 2px #e7c783, 0 4px 0 #b77c3e, 0 8px 14px rgba(74,53,38,.14); }
.club-row { min-height: 39px; }
.club-row .k { padding: 2px 6px; color: #6f593e; border-radius: 5px; background: rgba(190,157,98,.16); }
.info-screen .section-title { margin: 16px 2px 8px; padding-left: 10px; border-left: 6px solid #3a7a50; color: #68451f; }

/* 팝업/선수 카드/초기 구단 선택 */
.overlay { background: rgba(45,31,20,.65); backdrop-filter: blur(1.5px); }
.modal { padding: 10px; border: 14px solid transparent; border-radius: 18px; background: transparent;
  border-image: url('../img/ui/common/panel-frame.png') 32 fill / 14px / 0 stretch;
  box-shadow: 0 8px 0 rgba(91,54,25,.4), 0 18px 44px rgba(32,22,15,.42); }
.modal h3 { margin: 0 0 12px; padding: 8px 10px; color: #fff6d5; border: 2px solid #70451f; border-radius: 9px;
  background: linear-gradient(180deg, #397553, #285b3d); text-shadow: 0 2px 0 #173c2b; box-shadow: 0 3px 0 #b77c3e; }
.pc-head { padding: 10px; border: 3px solid #815329; border-radius: 12px; background: linear-gradient(145deg, #fff9ea, #ebd8b1); box-shadow: 0 3px 0 rgba(105,62,29,.25); }
.pc-modal.grade-IMPACT .pc-head { border-color: #3da6d8; background: linear-gradient(145deg, #f5fcff, #d7eff8); }
.pc-modal.grade-SIGNATURE .pc-head { border-color: #d39a17; background: radial-gradient(circle at 80% 20%, #fff59a, transparent 33%), linear-gradient(145deg, #fff8dc, #edc661); }
.pc-ovr { background: #3e2c1f; border-color: #6d4627; box-shadow: inset 0 2px 6px rgba(0,0,0,.28); }
.pc-ovr .o { color: #fff1b4; }
.pc-ovr .ol { color: #d6c39c; }
.stat-bars { padding: 10px; border: 2px solid #b2824c; border-radius: 10px; background: rgba(255,249,232,.72); }
.stat-row .sbar { height: 11px; border-color: #b89b6f; box-shadow: inset 0 1px 2px rgba(75,44,24,.16); }
.team-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.team-pick { min-height: 76px; padding: 8px 3px; border-color: #9c6b39; background: linear-gradient(180deg, #fffaf0, #ead9b5); }
.team-pick .tlogo.lg { width: 39px; height: 39px; }
.team-select-modal .name-row { padding: 9px; border: 2px solid #b3834c; border-radius: 10px; background: rgba(255,248,229,.72); }
.tut-rrow, .tut-rw, .tut-gr, .cmp-table { box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(103,62,29,.22); }
.reward-pop { border: 14px solid transparent; border-image: url('../img/ui/common/panel-frame.png') 32 fill / 14px / 0 stretch; background: transparent; }
.toast { border-width: 3px; background: #fff4cf; box-shadow: 0 4px 0 #a36b31, 0 8px 16px rgba(74,53,38,.18); }

/* 경기 화면 세로 적응형: 코트가 남은 높이에 맞춰 축소되고, 진행로그는 화면 비율로 정해져
   모니터/스마트폰 어디서든 하단(진행로그·탭)이 잘리지 않는다. */
.screen-main { overflow-y: hidden; }
.screen-main .vlive { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.screen-main .vscore { flex: 0 0 auto; }
/* 코트는 폭에 비례한 높이만 차지(커지지 않음). 남는 세로는 아래 로그가 가져간다. */
.screen-main .vcourt-shell { flex: 0 1 auto; min-height: 0; }
.screen-main .vcourt-wrap { width: 100%; aspect-ratio: 960 / 820; max-height: 100%; }
.screen-main .vcourt { display: block; width: 100%; height: 100%; object-fit: contain; }
.screen-main .vs-sub { flex: 0 0 auto; }
.screen-main .vlog { flex: 1 1 96px; min-height: 96px; max-height: none; }   /* 세로 여유분을 로그가 채움 */

@media (max-width: 390px) {
  .screen-heading-copy small { display: none; }
  .screen-heading { min-height: 52px; }
  .gacha-stage { padding-left: 12px; padding-right: 94px; }
  .gacha-stage-copy strong { font-size: 13px; }
  .gacha-pack { right: 12px; width: 70px; }
  .ct-tile { min-height: 88px; }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
 * UI SKIN v4 — 최초 메인 시안에 맞춘 헤더·전광판·경기 HUD
 * ========================================================================= */

/* 경기 화면 헤더는 다른 화면과 동일하게(공통 renderHeader 스타일) — 별도 오버라이드 없음 */

/* 시안의 어두운 목재 전광판: 흰 팀 카드 + 큰 중앙 점수 + 세트 점등 */
.screen-main { padding: 11px 10px 10px; }
.screen-main .vlive { gap: 9px; padding: 0; }
.screen-main .vscore { position: relative; min-height: 124px; gap: 6px; padding: 9px 8px; overflow: hidden;
  border: 7px solid #70431f; border-radius: 17px; border-image: none;
  background-color: #3b291d;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px),
                    linear-gradient(180deg, #4b3423, #2e2017);
  box-shadow: inset 0 0 0 3px #d7a259, inset 0 0 0 6px #8d572d, 0 5px 0 #b77c3e, 0 10px 20px rgba(74,53,38,.22);
  filter: none; }
.screen-main .vscore::after { content: ""; position: absolute; inset: 4px; pointer-events: none; border: 1px solid rgba(255,225,158,.28); border-radius: 10px; }
.screen-main .vs-team { align-self: stretch; min-width: 0; padding: 7px 4px 5px; gap: 2px; color: var(--txt); font-size: 9.5px;
  border: 2px solid #d4c297; border-radius: 9px; background: linear-gradient(180deg, #fffdf5, #f3e9ce);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(0,0,0,.28); }
.screen-main .vs-team.home { color: #2679b6; }
.screen-main .vs-team.away { color: #df4b2f; }
.screen-main .vs-logo { width: 51px; height: 51px; }
.screen-main .vs-sets { align-self: center; min-width: 37px; width: 37px; height: 78px; font-size: 19px; border-width: 3px; border-radius: 10px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), 0 4px 0 rgba(0,0,0,.34); }
.screen-main .vs-score-center { position: relative; z-index: 1; width: 112px; flex: none; align-self: center; display: flex; flex-direction: column; gap: 5px; }
.screen-main .vs-pts { min-width: 112px; padding: 6px 3px 7px; font-size: 37px; line-height: 1; border: 3px solid #1e150f; border-radius: 9px;
  background: linear-gradient(180deg, #261b14, #17100c); box-shadow: inset 0 3px 8px rgba(0,0,0,.8), 0 3px 0 #6b4629; }
.screen-main .vs-pts .vs-col { margin: 0 4px; color: #f3a523; }
.screen-main .vs-series { height: 18px; display: flex; align-items: center; justify-content: center; gap: 5px; color: #d3b98b;
  border: 1px solid rgba(222,188,126,.22); border-radius: 6px; background: rgba(15,10,7,.48); }
.screen-main .vs-series b { font-size: 7px; font-weight: 700; letter-spacing: .7px; color: #b89c70; }
.screen-main .series-side { display: flex; gap: 3px; }
.screen-main .series-side i { display: block; width: 7px; height: 7px; border: 1px solid #806444; border-radius: 50%; background: #2d2119;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
.screen-main .series-side.home i.on { border-color: #7fc8f0; background: #3d9ed5; box-shadow: 0 0 5px rgba(61,158,213,.8); }
.screen-main .series-side.away i.on { border-color: #ff9a7d; background: #e96142; box-shadow: 0 0 5px rgba(233,97,66,.8); }

/* 코트는 기존 경기 로직을 유지하되 시안의 두꺼운 금빛 목재 케이스에 맞춘다. */
.screen-main .vcourt-shell { padding: 6px; border: 4px solid #70431f; border-radius: 17px; border-image: none;
  background: linear-gradient(145deg, #efc778, #b77736); box-shadow: inset 0 0 0 2px #fff0be, 0 5px 0 #a46730, 0 10px 18px rgba(74,53,38,.18); filter: none; }
.screen-main .vcourt-wrap { border: 2px solid #f9e3ac; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(112,67,31,.4); }
.screen-main .vs-sub { min-width: 218px; margin-top: -12px; font-size: 10px; border-width: 7px; }
.screen-main .vlog { border-width: 11px; padding: 1px 5px; }
.screen-main .vlog div { min-height: 39px; grid-template-columns: 31px 1fr; }
.screen-main .vlog div::before { width: 29px; height: 29px; background-image: url('../img/ui/icon/event-ball.png?v=43'); }
.screen-main .vlog .pt::before { background-image: url('../img/ui/icon/event-point.png?v=43'); }
.screen-main .vlog .ace::before { background-image: url('../img/ui/icon/event-ace.png?v=43'); }

/* 하단 경기 탭의 새 배구공은 작은 크기에서도 색면이 유지되도록 조금 크게 표시 */
#app[data-screen="main"] .tab[data-screen="main"] .nav-ic { width: 31px; height: 31px; margin-top: -1px; }

@media (max-width: 390px) {
  .screen-main .vscore { gap: 3px; padding: 7px 5px; }
  .screen-main .vs-sets { min-width: 29px; width: 29px; height: 70px; }
  .screen-main .vs-team { padding-inline: 2px; font-size: 8.5px; }
  .screen-main .vs-logo { width: 42px; height: 42px; }
  .screen-main .vs-score-center { width: 88px; }
  .screen-main .vs-pts { min-width: 88px; font-size: 31px; }
  .screen-main .vs-series { gap: 3px; }
  .screen-main .series-side { gap: 2px; }
  .screen-main .series-side i { width: 6px; height: 6px; }
}
