/* ============================================================================
   CNEsports · 기본 레이아웃 & 공통 컴포넌트
   ----------------------------------------------------------------------------
   Streamlit 시절 CSS와 결정적으로 다른 점: 여기엔 "되돌리는 규칙"이 없다.
   컬럼 기본 패딩을 0으로 밀어내거나, 선택자를 5번 반복해 특이도를 이기거나,
   숨긴 칸까지 세는 nth-child를 보정할 일이 없다. 마크업을 우리가 쓰기 때문.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 🌟 [v2026.5.38.0 이식] 한글 가짜 기울임 차단.
     제목 폰트 Archivo에는 한글이 없어 Pretendard로 폴백되는데 Pretendard엔
     이탤릭 페이스가 없다. 합성을 끄면 한글은 정체, 영문·숫자는 진짜 이탤릭. */
  font-synthesis: weight small-caps;
  font-synthesis-weight: auto;
  font-synthesis-style: none;
}

/* 🚨 [디자인 대조] 배경은 평면색이 아니다. 코너 글로우 2개 + 비네트 + 44px 격자 텍스처가
   깔리고, background-attachment:fixed 라 스크롤해도 글로우가 뷰포트에 붙어 있다.
   이게 빠져 있어서 화면이 '그냥 어두운 회색 판'으로 보였다. */
body {
  display: flex; min-height: 100vh; overscroll-behavior-y: none;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0,0,0,.30)),
    radial-gradient(1100px 420px at 85% -5%, rgba(0,134,241,.10), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(0,134,241,.05), transparent 55%),
    repeating-linear-gradient(0deg, rgba(124,192,245,.022) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(124,192,245,.022) 0 1px, transparent 1px 44px),
    var(--bg-page);
  background-attachment: fixed;
}

a { color: var(--accent-link); text-decoration: none; }
button { font-family: inherit; color: inherit; }

::selection { background: rgba(0,134,241,.75); color: #fff; }

/* ── 입력 요소 ──
   기존 앱은 모든 입력칸 왼쪽에 옅은 파란 선을 세우고, 포커스되면 그 선이 진해지며
   파란 글로우가 퍼진다. 이게 없으면 입력칸이 그냥 어두운 사각형으로만 보인다. */
input, select, textarea, .input {
  border-radius: var(--radius-sharp) !important;
  border-left: 2px solid rgba(0,134,241,.45) !important;
  transition: box-shadow .15s ease, border-color .15s ease;
}
input:focus, select:focus, textarea:focus, .input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(0,134,241,.25);
}
input[type="checkbox"], input[type="radio"] { border-left: none !important; accent-color: var(--accent); }

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232D38; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════════
   사이드바
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-surface); border-right: 1px solid var(--border-line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
/* 로그인 화면에선 사이드바를 아직 그리지 않는다. 빈 채로 자리만 차지하면
   로그인 카드가 화면 중앙이 아니라 오른쪽으로 밀려 보인다. */
.sidebar:empty { display: none; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.sidebar-brand img { width: 30px; height: 30px; object-fit: contain; }
.sidebar-brand .word { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 17px; letter-spacing: -.3px; line-height: 1; }
.sidebar-brand .word b { color: var(--accent-link); font-weight: 900; }
.sidebar-brand .sub { font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 2px; color: var(--text-muted); margin-top: 3px; }

.nav-group-label { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 2px; color: var(--text-muted); padding: 14px 16px 6px; }
.nav-group-label::before { content: '// '; color: var(--accent); }

.nav-item {
  display: flex; align-items: center; gap: 9px; width: calc(100% - 20px);
  margin: 2px 10px; padding: 9px 12px;
  background: transparent; border: none; border-left: 2px solid transparent;
  border-radius: var(--radius-soft);
  font-size: var(--fs-md); color: var(--text-secondary); text-align: left;
  cursor: pointer; transition: background var(--dur-base), color var(--dur-base), border-color var(--dur-base);
}
/* 활성 항목은 왼쪽에서 오른쪽으로 흐려지는 파란 그라데이션 + 3px 액센트 선 + 은은한 글로우.
   단색 배경 칩이 아니라 '띠'로 읽혀야 기존 화면과 같은 인상이 된다. */
.nav-item:hover { background: rgba(0,134,241,.07); color: var(--text-primary);
  border-left-color: rgba(0,134,241,.35); }
.nav-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(0,134,241,.20), rgba(0,134,241,.03) 88%);
  color: var(--text-primary); border-left: 3px solid var(--accent);
  border-radius: 0; font-weight: 700; box-shadow: 0 0 12px rgba(0,134,241,.12);
}
.nav-item .chev { color: var(--text-muted); font-size: var(--fs-sm); }
.nav-item .live { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 1px;
  color: var(--win-light); margin-left: auto; }

.sidebar-session { margin-top: auto; padding: 12px; }
.session-card { border: 1px solid var(--border-line); background: var(--bg-elevated);
  border-top: 2px solid var(--accent); padding: 10px 12px; }
.session-card .lbl { font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 2px; color: var(--text-muted); }
.session-card .who { font-size: var(--fs-base); font-weight: 700; margin-top: 6px;
  display: flex; align-items: center; gap: 7px; min-width: 0; }
.session-card .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-card .role { font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--text-muted); margin-top: 2px; }
.session-actions { display: flex; gap: 6px; margin-top: 9px; }
.icon-btn { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-line); background: var(--bg-input); border-radius: var(--radius-soft);
  cursor: pointer; color: var(--text-secondary); font-size: 13px; }
.icon-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.team-switch { display: flex; gap: 6px; margin-top: 8px; }
.team-switch button { flex: 1; height: 24px; font-family: var(--font-mono); font-size: var(--fs-2xs);
  font-weight: 700; letter-spacing: 1px; border: 1px solid var(--border-line);
  background: var(--bg-input); border-radius: var(--radius-soft); cursor: pointer; color: var(--text-secondary); }
.team-switch button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: #fff; }

.sidebar-footer { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 16px 12px; border-top: 1px solid var(--border-line); margin-top: 4px; }
.sidebar-footer span { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); opacity: .7; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════════════
   본문
   ══════════════════════════════════════════════════════════════════════════ */
.main { flex: 1 1 auto; min-width: 0; padding: 20px 26px 60px; }

/* 상단 브랜드 바 */
.topbar { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.topbar-left { flex: 1; min-width: 0; }
.topbar-brand { display: flex; align-items: center; gap: 11px;
  padding-bottom: 9px; border-bottom: 1px solid var(--border-line); margin-bottom: 5px; }
.topbar-brand img { height: 36px; width: auto; max-width: 56px; object-fit: contain; }
.topbar-brand .word { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 22px; letter-spacing: -.4px; line-height: 1; }
.topbar-brand .word b { color: var(--accent-link); font-weight: 900; }
.topbar-eyebrow { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: 3px; color: var(--text-muted); margin-bottom: 10px; }
.topbar-right { text-align: right; white-space: nowrap; display: flex; align-items: center; gap: 14px; }
.topbar-date { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-secondary); }
.topbar-greet { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 2px; }
.ctrl-capsule { display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border-strong); background: var(--bg-surface);
  border-radius: var(--radius-sharp); padding: 3px 4px; }
.ctrl-capsule .divider { width: 1px; height: 16px; background: var(--border-strong); margin: 0 8px; }
/* 알림 벨 - 좌우 여백 대칭 (Streamlit 팝오버가 몰래 넣던 화살표 래퍼가 없으므로 그냥 맞는다) */
.bell-btn { min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex;
  align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: none; border-radius: var(--radius-sharp);
  cursor: pointer; color: var(--text-primary); font-size: 15px; }
.bell-btn.has-new { background: rgba(0,134,241,.18); box-shadow: 0 0 8px rgba(0,134,241,.3); }
.bell-btn .count { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; }

/* ── 실시간 갱신 토글 ── */
.live-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding-left: 10px; margin-left: 8px; border-left: 1px solid var(--border-strong); }
.live-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.live-toggle .track { width: 30px; height: 16px; border-radius: 9px; background: var(--bg-input);
  border: 1px solid var(--border-strong); position: relative; transition: background .15s, border-color .15s; }
.live-toggle .knob { position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--text-muted); transition: transform .15s, background .15s; }
.live-toggle input:checked + .track { background: rgba(0,134,241,.3); border-color: var(--accent); }
.live-toggle input:checked + .track .knob { transform: translateX(14px); background: var(--accent-link); }
.live-toggle .lbl { font-size: var(--fs-xs); color: var(--text-secondary); white-space: nowrap; }
.live-toggle input:checked ~ .lbl { color: var(--accent-link); }

/* ── 알림 팝오버 ──
   벨 바로 아래 오른쪽 정렬. 목록만 스크롤하고 머리말·아래 접이식은 고정. */
.bell-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 330px;
  background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-top: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  padding: 10px 12px 12px; }
.bell-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bell-title { font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: var(--fs-md); color: var(--text-primary); margin-right: auto; }
.bell-head .btn { height: 24px; padding: 0 10px; font-size: var(--fs-2xs); }
.bell-list { max-height: 340px; overflow-y: auto; }
.bell-empty { color: var(--text-muted); font-size: var(--fs-xs); padding: 10px 2px; }
.bell-row { display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 2px; border-bottom: 1px solid var(--border-line); opacity: .68; }
.bell-row.is-new { opacity: 1; }
.bell-row-main { min-width: 0; flex: 1; }
.bell-row-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.bell-row.is-new .bell-row-title { font-weight: 700; }
.bell-row-title .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-link); margin-right: 6px; vertical-align: 1px; }
.bell-row-body { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 2px; }
.bell-row-meta { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); margin-top: 3px; }
.bell-del { width: 26px; height: 26px; flex-shrink: 0; cursor: pointer; border-radius: 6px;
  border: 1.5px solid var(--border-strong); background: transparent;
  color: var(--text-muted); font-size: var(--fs-sm); }
.bell-del:hover { border-color: rgba(226,75,74,.7); background: rgba(226,75,74,.1); color: var(--loss-light); }
.bell-danger, .bell-meet { margin-top: 10px; border-top: 1px solid var(--border-line); padding-top: 8px; }
.bell-danger summary, .bell-meet summary { cursor: pointer; font-size: var(--fs-xs);
  color: var(--text-secondary); list-style: none; }
.bell-danger summary { color: var(--loss-light); }
.bell-danger-body, .bell-meet-body { display: flex; flex-direction: column; gap: 7px;
  margin-top: 8px; font-size: var(--fs-2xs); color: var(--text-muted); }
.bell-danger-body label { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.bell-meet-when { display: flex; gap: 6px; }
.bell-meet-when .input { flex: 1 1 0; min-width: 0; }

/* ── 테스터 평가 ── */
.tv-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tv-count { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700;
  border: 1px solid; padding: 4px 10px; }
.tv-banner { display: flex; align-items: center; gap: 12px; border: 1px solid;
  border-left-width: 3px; padding: 12px 16px; }
.tv-icon { font-size: var(--fs-xl); line-height: 1; }
.tv-verdict { font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: var(--fs-lg); }
.tv-note { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 2px; }
.tv-hint { font-size: var(--fs-2xs); color: var(--text-muted); margin-bottom: 8px; }
.fb-post.is-mine { border-left: 2px solid var(--accent); padding-left: 10px; }

/* ── 테스트 결과 확인 ── */
.vd-card { position: relative; border: 1px solid; border-top-width: 3px; padding: 40px 24px 32px;
  text-align: center; margin: 8px auto 0; max-width: 620px; }
.vd-ribbon { position: absolute; top: 10px; left: 16px; font-family: var(--font-mono);
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 3px; }
.vd-icon { font-size: 44px; line-height: 1; }
.vd-title { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(18px, 5vw, 26px); margin-top: 12px; }
.vd-note { color: var(--text-secondary); font-size: var(--fs-base); margin-top: 10px;
  line-height: 1.7; }
.vd-who { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--fs-2xs);
  margin-top: 18px; }

/* ── 피드백 / 조합 ── */
.fb-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-post { padding: 11px 0; border-bottom: 1px solid var(--border-line); }
.fb-post:last-of-type { border-bottom: none; }
.fb-text { font-size: var(--fs-base); line-height: 1.7; color: var(--text-secondary);
  white-space: pre-wrap; margin-top: 5px; }
.fb-new { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-line); }
.fb-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.fb-img { margin: 0; position: relative; }
.fb-img img { width: 100%; display: block; border: 1px solid var(--border-line); }
.fb-img .btn { position: absolute; top: 6px; right: 6px; }
.fb-warn { margin-top: 10px; font-size: var(--fs-2xs); color: #F5D97A;
  border: 1px dashed rgba(245,217,122,.45); background: rgba(245,217,122,.06); padding: 7px 10px; }
.fb-add-opp { margin-top: 10px; }
.fb-add-opp summary { cursor: pointer; font-size: var(--fs-xs); color: var(--text-secondary); }
.fb-add-opp-body { margin-top: 8px; }
.fb-suggest { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px;
  font-size: var(--fs-2xs); color: var(--text-muted); }
.fb-record { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border-line);
  font-size: var(--fs-sm); color: var(--text-muted); }
.fb-h2h { font-family: var(--font-mono); font-size: var(--fs-micro); padding: 2px 6px;
  border: 1px solid var(--border-line); }

/* ── 월간 일정 (달력) ──
   FullCalendar 대신 42칸 격자를 직접 그린다. iframe 이 아니라서 나머지 화면과 같은
   토큰·간격을 그대로 쓰고, 스타일을 두 벌로 관리할 일이 없다. */
.cal-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border-line); border: 1px solid var(--border-line); margin-bottom: 16px; }
.cal-kpi > div { background: var(--bg-surface); padding: 10px 12px; text-align: center; min-width: 0; }
.cal-kpi-l { color: var(--text-muted); font-size: var(--fs-2xs); letter-spacing: .6px; text-transform: uppercase; }
.cal-kpi-v { color: var(--text-primary); font-size: var(--fs-md); font-weight: 700;
  font-family: var(--font-mono); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-line); }
.cal-head .btn { height: 28px; padding: 0 10px; }
.cal-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg);
  color: var(--text-primary); min-width: 120px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--border-hairline); border: 1px solid var(--border-hairline); }
.cal-wd { background: var(--bg-surface); padding: 8px 0; text-align: center;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: .5px; color: var(--text-muted); }
.cal-wd.sat { color: #5B9BD5; }
.cal-wd.sun { color: #E2555A; }
.cal-cell { background: var(--bg-surface); min-height: 108px; padding: 0 2px 4px;
  transition: background .12s ease; }
.cal-cell:hover { background: var(--bg-elevated); }
.cal-cell.is-other { background: rgba(0,0,0,.25); }
.cal-cell.is-other .cal-num, .cal-cell.is-other .cal-ev { opacity: .38; }
.cal-cell.is-today { background: rgba(0,134,241,.06); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-cell.is-today .cal-num { color: var(--accent-link); font-weight: 700; }
.cal-num { padding: 7px 8px; font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--text-secondary); }
.cal-ev { display: block; width: calc(100% - 6px); margin: 2px 3px; padding: 2px 6px;
  border: none; border-left: 2px solid; border-radius: 0 2px 2px 0; cursor: pointer;
  font-size: var(--fs-2xs); font-weight: 600; color: var(--text-primary); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { filter: brightness(1.25); }

.cal-agenda { max-height: 620px; overflow-y: auto; }
.cal-agenda-head { display: flex; align-items: center; gap: 8px; position: sticky; top: 0;
  background: var(--bg-input); border-bottom: 1px solid var(--border-line); padding: 8px 14px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }
.cal-today-tag { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--accent-link); letter-spacing: 1px; }
.cal-agenda-row { display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
  padding: 9px 14px; border: none; border-bottom: 1px solid var(--border-line);
  background: transparent; color: var(--text-primary); font: inherit;
  font-size: var(--fs-sm); text-align: left; }
.cal-agenda-row:hover { background: rgba(0,134,241,.06); }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── 매치 상세 ── */
.md-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.md-date { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.md-map { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xs);
  color: #fff; background: rgba(0,134,241,.85); padding: 2px 9px;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.md-vs { display: flex; align-items: center; gap: 14px; }
.md-side { flex: 1; min-width: 0; text-align: center; }
.md-team { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(15px, 4vw, 22px); color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-score { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-2xl); margin-top: 2px; }
.md-vs-badge { flex-shrink: 0; min-width: 32px; height: 28px; display: flex; align-items: center;
  justify-content: center; background: rgba(0,134,241,.22); border: 1px solid var(--accent);
  transform: skewX(-8deg); }
.md-vs-badge span { transform: skewX(8deg); font-family: var(--font-display);
  font-weight: 900; font-style: italic; font-size: var(--fs-sm); color: #EAF4FF; }
.md-bar { height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin-top: 14px; }
.md-bar > div { height: 100%; transition: width .3s ease; }
.md-bar-legend { display: flex; justify-content: space-between; margin-top: 4px;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.md-lineup { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-line);
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.md-sub { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 1.2px; color: var(--text-muted); margin-right: 6px; }
.md-vod { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.md-vod-edit summary { cursor: pointer; font-size: var(--fs-xs); color: var(--text-secondary); }

/* ── 공지사항 ── */
.ann-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ann-row { display: flex; width: 100%; text-align: left; gap: 0; cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--border-line); border-radius: 0;
  padding: 0; margin-bottom: 8px; overflow: hidden; color: inherit; font: inherit;
  transition: border-color .12s, transform .12s; }
.ann-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.ann-bar { width: 3px; flex-shrink: 0; }
.ann-main { display: block; padding: 11px 14px; min-width: 0; flex: 1; }
.ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-pin { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--warning);
  border: 1px solid rgba(245,185,77,.4); padding: 1px 6px; }
.ann-title { font-size: var(--fs-md); font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-title-lg { font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: var(--fs-xl); color: var(--text-primary); }
.ann-new { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  color: #fff; background: var(--accent); padding: 1px 5px; }
.ann-row.is-unread .ann-title { color: var(--text-primary); }
.ann-row:not(.is-unread) .ann-main { opacity: .72; }
.ann-preview { display: block; font-size: var(--fs-xs); color: var(--text-secondary);
  margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 6px; }
.ann-read { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.ann-body { margin-top: 12px; font-size: var(--fs-base); line-height: 1.7;
  color: var(--text-secondary); white-space: pre-wrap; }
.ann-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-line); }
.ann-unread summary { cursor: pointer; font-size: var(--fs-xs); color: #F5D97A; }
.ann-unread > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ann-c-head { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; }
.ann-c { padding: 9px 0; border-bottom: 1px solid var(--border-line); }
.ann-c-text { font-size: var(--fs-sm); color: var(--text-secondary);
  white-space: pre-wrap; margin-top: 4px; }
.ann-c-tools { display: flex; gap: 6px; margin-top: 6px; }

/* ── 스탯 표 ── */
.stat-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
.stat-table th { padding: 8px 10px; text-align: left; color: var(--text-muted);
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; }
.stat-table td { padding: 8px 10px; }
.stat-table tbody tr { border-top: 1px solid var(--border-line); }
.stat-table .r { text-align: right; }
.stat-table .mono { font-family: var(--font-mono); }

/* ── 스탯 입력 ── */
.si-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  background: var(--bg-base); border: 1px solid var(--border-line);
  border-left: 2px solid var(--accent); padding: 10px 14px; margin: 10px 0 12px; }
.si-date { color: var(--accent); font-size: var(--fs-xs); font-family: var(--font-mono);
  font-weight: 700; flex-shrink: 0; }
.si-opp { color: var(--text-primary); font-size: var(--fs-md); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-meta { color: var(--text-muted); opacity: .75; font-size: var(--fs-2xs);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-score { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0;
  font-size: var(--fs-2xs); color: var(--text-muted); }
.si-score .input { width: 62px; text-align: center; font-family: var(--font-mono); }
.si-score label { display: inline-flex; align-items: center; gap: 5px; }
.si-status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.si-status-label { color: var(--text-muted); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 1.2px; margin-right: 6px; }
.si-status-n { color: var(--text-muted); opacity: .6; font-size: var(--fs-micro); margin-left: 4px; }
.si-chip { background: var(--bg-input); border: 1px solid var(--border-line);
  color: var(--text-muted); font-size: var(--fs-2xs); padding: 2px 9px; }
.si-chip.is-on { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.35);
  color: var(--win-light); }
.si-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.si-row--nums { border-top: 1px solid var(--border-line); padding-top: 12px; }
.si-field { flex: 1 1 120px; display: block; font-size: var(--fs-2xs); color: var(--text-muted); }
.si-field .input { margin-top: 4px; }
.si-mini { width: 62px; text-align: right; padding: 3px 6px; height: 26px;
  font-family: var(--font-mono); font-size: var(--fs-xs); }
.si-mini-btn { height: 24px; padding: 0 9px; font-size: var(--fs-2xs); }

/* ── 스코어보드 AI 판독 ──
   표에서 눈이 가장 먼저 가야 할 곳은 '매칭 못 한 줄'이다. 그래서 그 줄만 노란 좌측 띠로
   들어올리고, 나머지는 조용히 둔다. */
.sb-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.sb-pick input[type="file"] { flex: 1 1 200px; min-width: 0; font-size: var(--fs-xs);
  color: var(--text-secondary); }
.sb-pick input[type="file"]::file-selector-button { height: 28px; padding: 0 10px; cursor: pointer;
  margin-right: 8px; background: var(--bg-elevated); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 2px; font-size: var(--fs-2xs); }
.sb-wait { padding: 18px 4px; color: var(--text-muted); font-size: var(--fs-sm); }
.sb-sum { margin: 12px 0 6px; font-size: var(--fs-xs); color: var(--text-secondary); }
.sb-warn { color: #F5D97A; }
.sb-table { min-width: 760px; }
.sb-table .sb-read { color: var(--text-secondary); max-width: 140px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sb-table select.si-mini { width: 104px; text-align: left; font-family: var(--font-body); }
.sb-table tr.is-unmatched td:first-child { box-shadow: inset 2px 0 0 #F5D97A; }
.sb-table tr.is-unmatched .sb-read { color: #F5D97A; }
.sb-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── 팀 분석 ──
   막대는 얇게, 격자는 없다. 이 화면에서 색은 승/패 하나만 뜻하고, 그 옆에는 늘 숫자가
   같이 있어서 색을 못 읽어도 표가 읽힌다. */
.ta-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ta-sub { margin-bottom: 6px; }
.stat-table .c { text-align: center; }
.stat-table .sub { display: block; color: var(--text-muted); font-size: var(--fs-micro);
  font-weight: 400; margin-top: 1px; }
.ta-lb { min-width: 620px; }
.ta-lb tr.is-top { background: rgba(0, 134, 241, .05); }
.ta-lb th.is-sort { color: var(--accent); }
.ta-lb td.is-sort { color: var(--accent); font-weight: 700; }
.ta-bar { height: 6px; background: var(--bg-input); overflow: hidden; }
.ta-bar--tall { height: 16px; border-radius: 2px; }
.ta-bar i { display: block; height: 100%; }
.ta-map { margin-bottom: 10px; }
.ta-map:last-child { margin-bottom: 2px; }
.ta-map-head { display: flex; justify-content: space-between; gap: 8px;
  font-size: var(--fs-xs); margin-bottom: 4px; }
.ta-map-head .n { font-weight: 600; }
.ta-map-head .mono { font-family: var(--font-mono); color: var(--text-muted); }
.ta-comps { padding-top: 2px; }
.ta-comp { padding: 9px 0; border-bottom: 1px solid var(--border-line); }
.ta-comp:last-child { border-bottom: none; padding-bottom: 2px; }
.ta-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.ta-chips span { font-size: var(--fs-micro); background: var(--bg-input);
  border: 1px solid var(--border-line); color: var(--text-secondary); padding: 1px 6px;
  white-space: nowrap; }
.ta-comp-meta { display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.ta-agent { display: grid; grid-template-columns: 74px 1fr 92px; align-items: center;
  gap: 10px; margin-bottom: 9px; }
.ta-agent:last-child { margin-bottom: 2px; }
.ta-agent .n { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ta-agent .v { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); text-align: right; }
.ta-form { display: flex; align-items: flex-end; gap: 14px; height: 150px; }
.ta-form-col { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; }
.ta-form-col i { display: block; width: 100%; max-width: 52px; opacity: .85;
  border-radius: 2px 2px 0 0; }
.ta-form-col .pct { font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-secondary); margin-bottom: 4px; }
.ta-form-col .mo { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 5px; }
.ta-form-col .mo.is-now { color: var(--accent-link); }
.ta-form-col .sub { font-size: var(--fs-micro); color: var(--text-muted); opacity: .6; }
.ta-cond, .ta-att { min-width: 380px; }
.ta-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; }

@media (max-width: 860px) {
  .ta-two { grid-template-columns: 1fr; }
  .ta-form { height: 130px; gap: 8px; }
}

/* ── 매치 관리 ── */
.mm-gauge { margin-top: 5px; display: flex; align-items: center; gap: 7px; }
.mm-gauge span { display: inline-block; width: 70px; height: 3px; background: var(--bg-base);
  position: relative; border-radius: 2px; overflow: hidden; }
.mm-gauge i { position: absolute; left: 0; top: 0; height: 3px; }
.mm-gauge em { font-style: normal; font-size: var(--fs-micro); }
.mm-todo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  padding: 8px 12px; border: 1px dashed rgba(245,217,122,.45); background: rgba(245,217,122,.06); }
.mm-todo .tag { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 1.2px; color: #F5D97A; flex-shrink: 0; }
.mm-todo .txt { color: var(--text-secondary); font-size: var(--fs-xs); min-width: 0; }
.mm-todo .btn { margin-left: auto; }
.mm-head { font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: var(--fs-md); }
.mm-sub { color: var(--text-muted); font-size: var(--fs-2xs); margin: 3px 0 14px; }
.mm-two { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.mm-field { margin-bottom: 12px; }
.mm-field > span { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 6px; }
.mm-field > span b { color: var(--accent-link); font-weight: 600; }
.mm-field > span i { opacity: .7; font-style: normal; }
.mm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mm-chip { height: 28px; padding: 0 11px; font-size: var(--fs-2xs); }
.mm-lineup { display: flex; gap: 6px; flex-wrap: wrap; }
.mm-lp { display: flex; align-items: center; gap: 4px; }
.mm-lp .btn { height: 28px; padding: 0 11px; font-size: var(--fs-2xs); }
.mm-lp select.si-mini { width: 84px; text-align: left; font-family: var(--font-body); }
.mm-preview { border: 1px solid var(--border-line); background: var(--bg-base);
  border-left: 3px solid var(--accent); padding: 12px 14px; }
.mm-preview .lbl { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 1.5px;
  color: var(--accent-link); margin-bottom: 8px; }
.mm-preview .vs { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: var(--fs-lg); }
.mm-preview .dt { color: var(--text-secondary); font-size: var(--fs-sm); margin-top: 4px; }
.mm-preview .mp { color: var(--text-muted); font-size: var(--fs-2xs); margin-top: 2px; }
.mm-preview .n { color: var(--accent-link); font-size: var(--fs-2xs); margin-top: 6px; }
.mm-check { border: 1px solid var(--border-line); background: var(--bg-surface);
  padding: 9px 12px; margin: 10px 0 8px; font-size: var(--fs-xs); }
.mm-check .t { font-size: var(--fs-2xs); color: var(--text-muted); margin-bottom: 5px; }
.mm-check div + div { padding-top: 1px; }
.mm-check i { font-style: normal; opacity: .7; }
.mm-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mm-row--edit, .mm-row--danger { margin-bottom: 8px; }
.mm-row--danger { border-left: 3px solid var(--danger); }
.mm-when { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--accent);
  font-weight: 700; flex-shrink: 0; }
.mm-main { flex: 1; min-width: 150px; }
.mm-vs { font-weight: 700; font-size: var(--fs-md); }
.mm-meta { color: var(--text-muted); font-size: var(--fs-2xs); margin-top: 2px; }
.mm-badge { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm);
  border: 1px solid; padding: 2px 8px; flex-shrink: 0; }
.mm-score { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.mm-score .si-mini { width: 56px; }
.mm-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.mm-warn { color: #F5D97A; font-size: var(--fs-sm); margin-bottom: 10px; }
.mm-att { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.mm-att .btn { height: 30px; padding: 0 12px; font-size: var(--fs-xs); }
.mi-store { margin-top: 10px; font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); }
.mi-store.is-warn { color: #F5D97A; }
.mi-prev { margin: 10px 0; }
.mi-prev img { max-width: 440px; width: 100%; border: 1px solid var(--border-line); display: block; }

@media (max-width: 860px) {
  .mm-two { grid-template-columns: 1fr; }
  .mm-todo .btn { margin-left: 0; }
}

/* ── 관리자 설정 ──
   좌측 명단 + 우측 편집의 2단 구조가 세 탭(계정·통합 계정·판정)에서 반복된다.
   같은 구조는 같은 클래스로 — 탭마다 생김새가 달라질 이유가 없다. */
.ad-two { display: grid; grid-template-columns: minmax(220px, 1fr) 2.2fr; gap: 14px;
  align-items: start; }
.ad-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.ad-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.ad-check { min-height: 20px; font-size: var(--fs-2xs); margin: -4px 0 10px; }
.ad-rows { display: flex; flex-direction: column; gap: 3px; max-height: 430px; overflow-y: auto; }
.ad-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 8px 10px; background: none;
  border: 1px solid transparent; color: var(--text-primary); cursor: pointer;
  font-size: var(--fs-sm); }
.ad-row:hover { background: var(--bg-input); }
.ad-row.is-on { background: rgba(0, 134, 241, .10); border-color: rgba(0, 134, 241, .4); }
.ad-row .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-row .r { color: var(--text-muted); font-size: var(--fs-2xs); flex-shrink: 0; }
.ad-target { display: flex; align-items: center; gap: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-line); margin-bottom: 14px; }
.ad-target .t { font-weight: 700; font-size: var(--fs-md); }
.ad-target .s { color: var(--text-muted); font-size: var(--fs-2xs); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-danger { margin-top: 16px; border: 1px dashed rgba(226, 75, 74, .45); padding: 10px 12px; }
.ad-danger summary { cursor: pointer; color: var(--loss-light); font-size: var(--fs-sm);
  font-weight: 600; }
.ad-profile4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 14px; }
.ad-profile4 i { display: block; font-style: normal; font-family: var(--font-mono);
  font-size: var(--fs-micro); color: var(--text-muted); letter-spacing: 1px; }
.ad-profile4 b { display: block; font-size: var(--fs-sm); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 10px; }
.ad-team { border: 1px solid var(--border-line); background: var(--bg-base); padding: 10px 12px; }
.ad-team .t { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: 1px; color: var(--accent-link); margin-bottom: 7px; }
.ad-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ad-inline .input { width: auto; min-width: 170px; flex: 0 1 auto; }
.ad-conflict-banner { border: 1px solid rgba(245, 217, 122, .45);
  background: rgba(245, 217, 122, .07); color: #F5D97A; padding: 7px 11px;
  font-size: var(--fs-xs); font-weight: 600; margin-bottom: 12px; }
.ad-conflict { border-top: 1px solid var(--border-line); padding: 10px 0; }
.ad-conflict .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px; }
.ad-conflict .h b { font-size: var(--fs-sm); }
.ad-conflict .row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
  padding: 2px 0; font-size: var(--fs-2xs); }
.ad-conflict .row i { font-style: normal; color: var(--text-muted); width: 92px; flex-shrink: 0; }
.ad-conflict .chip { background: var(--bg-input); border: 1px solid var(--border-line);
  padding: 1px 7px; color: var(--text-secondary); }
.ad-code { display: flex; align-items: center; gap: 12px; padding: 9px 2px;
  border-top: 1px solid var(--border-line); }
.ad-code:first-child { border-top: none; }
.ad-code .code { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md);
  letter-spacing: 2px; color: var(--accent-link); }
.ad-code .meta { color: var(--text-muted); font-size: var(--fs-2xs); flex: 1; min-width: 0; }
.ad-issued { margin-top: 10px; border: 1px solid rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .07); color: #4ADE80; padding: 8px 12px;
  font-size: var(--fs-sm); }
.ad-issued .mono { font-family: var(--font-mono); letter-spacing: 2px; font-size: var(--fs-md); }
.ad-checkline { display: flex; gap: 7px; align-items: center; font-size: var(--fs-sm);
  color: var(--text-secondary); padding: 4px 0; cursor: pointer; }
.ad-checkrow { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-logs { max-height: 380px; overflow-y: auto; margin-top: 6px; }
.ad-log { display: flex; gap: 10px; align-items: baseline; padding: 6px 2px;
  border-top: 1px solid var(--border-hairline); font-size: var(--fs-xs); flex-wrap: wrap; }
.ad-log:first-child { border-top: none; }
.ad-log .ts { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); flex-shrink: 0; }
.ad-log .act { border: 1px solid; padding: 0 7px; font-size: var(--fs-micro);
  font-weight: 700; flex-shrink: 0; }
.ad-log .who { color: var(--text-secondary); min-width: 0; }
.ad-log .who i { color: var(--text-muted); font-style: normal; }

@media (max-width: 860px) {
  .ad-two { grid-template-columns: 1fr; }
  .ad-rows { max-height: 220px; }
}

/* ── 계정 설정 ── */
.ac-av { border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(0, 134, 241, .4); }
.ac-av--none { display: flex; align-items: center; justify-content: center;
  background: rgba(0, 134, 241, .15); color: var(--accent-link); font-weight: 700; }
.ac-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--bg-surface); border: 1px solid var(--border-line);
  border-top: 2px solid var(--accent); padding: 14px 16px; }
.ac-who { font-size: var(--fs-md); font-weight: 800; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); letter-spacing: 1px; margin-top: 2px; }
.ac-riot { text-align: right; flex-shrink: 0; }
.ac-riot .lbl { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); letter-spacing: 1px; }
.ac-riot .val { font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--text-secondary); margin-top: 2px; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 16px; }
.ac-scope { border: 1px dashed var(--border-strong); background: rgba(0, 134, 241, .05);
  padding: 9px 12px; margin: 4px 0 14px; font-size: var(--fs-2xs); color: var(--text-muted); }
.ac-photo { display: flex; align-items: center; gap: 14px; }
.ac-photo-side { flex: 1 1 220px; min-width: 0; }
.ac-photo-side input[type="file"] { width: 100%; font-size: var(--fs-xs);
  color: var(--text-secondary); }
.ac-photo-side input[type="file"]::file-selector-button { height: 28px; padding: 0 10px;
  cursor: pointer; margin-right: 8px; background: var(--bg-elevated);
  color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: 2px;
  font-size: var(--fs-2xs); }
.ac-id-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ac-id-row .input { flex: 1 1 auto; min-width: 0; }
.ac-id-locked { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-id-locked .mono { font-family: var(--font-mono); font-size: var(--fs-base);
  color: var(--text-secondary); background: var(--bg-input);
  border: 1px solid var(--border-line); padding: 5px 10px; }
.ac-sess { display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 2px; border-top: 1px solid var(--border-line); }
.ac-sess:first-child { border-top: none; }
.ac-sess.is-current { box-shadow: inset 2px 0 0 var(--win-light); padding-left: 10px; }
.ac-sess .who { font-size: var(--fs-sm); color: var(--text-secondary); }
.ac-sess .when { font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); margin-top: 2px; }
.ac-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.ac-kpis b { display: block; font-family: var(--font-mono); font-size: 24px; font-weight: 800; }
.ac-kpis span { display: block; color: var(--text-muted); font-size: var(--fs-2xs);
  margin-top: 3px; }
.ac-breakdown { margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-line); color: var(--text-muted);
  font-size: var(--fs-xs); text-align: center; }

/* ── 상단 안내 띠 (ANNOUNCE / MEETING / MY NEXT) ──
   방송 자막(lower third) 처럼 좌측에 각진 라벨, 가운데 본문, 우측에 상태 한 마디. */
.strip { display: flex; align-items: stretch; overflow: hidden; margin-bottom: 12px;
  border: 1px solid var(--border-strong); text-decoration: none; }
.strip-tag { display: flex; align-items: center; padding: 0 12px; flex-shrink: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: var(--fs-2xs); letter-spacing: 1.5px; }
.strip-body { padding: 8px 14px; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.strip-title { font-size: var(--fs-sm); color: var(--text-primary); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-sub { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-tail { display: flex; align-items: center; gap: 5px; padding: 0 14px; flex-shrink: 0;
  font-family: var(--font-mono); font-size: var(--fs-micro); }
.strip-dday { display: flex; align-items: center; padding: 0 13px; flex-shrink: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--fs-md); }
.strip-div { width: 1px; margin: 8px 0; background: var(--border-strong); flex-shrink: 0; }
.strip-pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: cne-live-dot 1.6s ease-in-out infinite; }

.strip--ann { border-color: rgba(0,134,241,.4);
  background: linear-gradient(90deg, rgba(0,134,241,.12), rgba(0,134,241,.02)); cursor: pointer; }
.strip--ann:hover { border-color: var(--accent); }
.strip--ann .strip-tag { background: var(--accent); color: #fff; }
.strip--ann .strip-tail { color: var(--accent-link); }

.strip--meet { border-color: rgba(245,185,77,.4);
  background: linear-gradient(90deg, rgba(245,185,77,.08), transparent 70%); }
.strip--meet.is-today { border-color: rgba(245,185,77,.5);
  background: linear-gradient(90deg, rgba(245,185,77,.12), transparent 70%); }
.strip--meet .strip-tag { background: #F5B94D; color: #1A1206; }
.strip--meet .strip-dday { color: var(--text-primary); }
.strip--meet.is-today .strip-dday { color: #F5B94D; }
.strip--meet .strip-tail { color: #F5D08A; border-left: 1px solid rgba(245,185,77,.4); }

.strip--next.is-warn { border-color: rgba(234,179,8,.45);
  background: linear-gradient(90deg, rgba(234,179,8,.10), transparent 70%); }
.strip--next.is-warn .strip-tag { background: #eab308; color: #1A1206; }
.strip--next.is-warn .strip-tail { color: #F5D97A; border-left: 1px solid rgba(234,179,8,.45); }
.strip--next.is-ok { border-color: rgba(34,197,94,.4);
  background: linear-gradient(90deg, rgba(34,197,94,.08), transparent 70%); }
.strip--next.is-ok .strip-tag { background: #22c55e; color: #06180D; }
.strip--next.is-ok .strip-tail { color: var(--win-light); border-left: 1px solid rgba(34,197,94,.4); }
.strip .s-ok { color: var(--win-light); }
.strip .s-warn { color: #F5D97A; }

/* ── 내 최근 폼 ── */
.myform { position: relative; display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap;
  background: var(--bg-surface); border: 1px solid var(--border-line);
  border-left: 2px solid var(--accent); padding: 15px 16px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.myform-stats { display: flex; gap: 22px; padding-right: 16px; border-right: 1px solid var(--border-line); }
.myform-label { color: var(--text-muted); font-size: var(--fs-2xs); letter-spacing: .6px;
  text-transform: uppercase; font-family: var(--font-mono); }
.myform-big { font-family: var(--font-display); font-style: italic; font-size: var(--fs-2xl);
  font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.myform-sub { color: var(--text-muted); opacity: .6; font-size: var(--fs-2xs); }
.myform-rank { padding-left: 16px; border-left: 1px solid var(--border-line);
  text-align: center; display: flex; flex-direction: column; justify-content: center; }
/* 스파크라인은 폭이 좁아지면 가로로 눌린다 (preserveAspectRatio="none").
   고정 width 속성을 그대로 두면 좁은 화면에서 카드를 뚫고 나가 가로 스크롤이 생긴다. */
.spark { max-width: 100%; }

/* ── 당일 매치 카드 ──
   헤더(맵 배경) → 매치업 → 출석 핍 → 라인업 행 → 인텔 → 내 출석/컨디션 → 관리자 패널.
   좌측 선 색이 상태를 말한다: 예정=파랑 · LIVE=초록 · 승=초록 · 패=빨강. */
.match-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border-line);
  border-left: 3px solid var(--accent); margin-bottom: 12px; overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.match-card:hover { transform: translateY(-3px); border-color: rgba(0,134,241,.55);
  box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 20px rgba(0,134,241,.10); }
.mc-head { position: relative; min-height: 96px; background: var(--bg-elevated); }
.mc-head-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block; }
.mc-head-scrim { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(11,17,22,.66), rgba(11,17,22,.84)); }
.mc-head-body { position: relative; padding: 12px 16px 14px; }
.mc-head-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-time { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: var(--fs-lg); color: var(--text-primary); text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.mc-next { position: relative; overflow: hidden; font-family: var(--font-mono);
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 1px; color: #7CC0F5;
  border: 1px solid rgba(0,134,241,.45); background: rgba(0,134,241,.16); padding: 2px 6px; flex-shrink: 0; }
.mc-next .cne-shine-el { position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(235,243,250,.35), transparent);
  font-style: normal; pointer-events: none; }
.mc-map { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xs);
  text-transform: uppercase; color: #fff; background: rgba(0,134,241,.85); padding: 2px 9px;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); white-space: nowrap; }
.mc-status { margin-left: auto; display: inline-flex; align-items: center; }
.mc-vs { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.mc-side { flex: 1; min-width: 0; text-align: center; }
.mc-team { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(15px, 4vw, 22px); letter-spacing: -.5px; color: var(--text-primary);
  text-shadow: 0 1px 3px rgba(0,0,0,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sub { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 2px;
  color: var(--text-muted); margin-top: 2px; }
.mc-vs-badge { flex-shrink: 0; min-width: 32px; height: 28px; display: flex; align-items: center;
  justify-content: center; background: rgba(0,134,241,.22); border: 1px solid var(--accent);
  transform: skewX(-8deg); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.mc-vs-badge span { transform: skewX(8deg); font-family: var(--font-display);
  font-weight: 900; font-style: italic; font-size: var(--fs-sm); color: #EAF4FF; }

.mc-body { padding: 12px 16px 14px; }
.mc-pips { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.mc-pips-label { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 1px; color: var(--text-muted); text-transform: uppercase;
  margin-right: 6px; flex-shrink: 0; }
.mc-pip { flex: 1; max-width: 34px; height: 4px; border-radius: 2px; background: #26323F;
  position: relative; overflow: hidden; }
.mc-pip .cne-fill { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--accent); box-shadow: 0 0 6px rgba(0,134,241,.5); }
.mc-row { display: flex; align-items: center; gap: 8px; padding: 6px 9px; margin-bottom: 5px;
  border: 1px solid var(--border-line); background: rgba(12,17,21,.4); opacity: .58; }
.mc-row.is-on { border-color: rgba(0,134,241,.42); background: rgba(0,134,241,.16); opacity: 1; }
.mc-pos { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600;
  color: var(--text-muted); width: 44px; flex-shrink: 0; }
.mc-name { font-weight: 700; font-size: var(--fs-sm); color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-row.is-on .mc-name { color: var(--text-primary); }
.mc-att { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-micro);
  font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.mc-row.is-on .mc-att { color: #7CC0F5; }
.mc-intel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 9px -16px 0; padding: 8px 16px; border-top: 1px solid var(--border-line);
  background: rgba(12,17,21,.5); font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--text-muted); }
.mc-me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mc-cond-label { font-size: var(--fs-micro); font-weight: 700; letter-spacing: 1px; color: var(--text-muted); }
.mc-cond .seg-btn { height: 26px; padding: 0 12px; }
.mc-att-note { font-size: var(--fs-micro); color: var(--text-muted); margin-left: auto; }
/* 카드 안 관리 버튼은 기존 앱의 .mcbtn 톤 — 작고 파란 아웃라인 */
.mc-admin { margin-top: 12px; }
.mc-admin .seg-btn { flex: 1; height: auto; padding: 5px 8px;
  border: 1px solid rgba(0,134,241,.55); background: rgba(0,134,241,.12);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; color: #7CC0F5; }
.mc-admin .seg-btn:hover { border-color: var(--accent); background: rgba(0,134,241,.20); color: #EAF4FF; }
.mc-admin .seg-btn.is-on { background: var(--accent); border-color: var(--accent); color: #06121C; }
.mc-panel-box { border: 1px solid var(--border-line); background: var(--bg-base);
  padding: 12px; margin-top: 8px; }
.mc-panel-title { font-size: var(--fs-xs); color: var(--text-secondary); margin-bottom: 8px; }
.mc-panel-note { font-size: var(--fs-micro); color: var(--text-muted); margin: 8px 0; }
.mc-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-pick-item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1px solid var(--border-line); padding: 4px 9px; font-size: var(--fs-xs);
  color: var(--text-secondary); }
.mc-pick-item:has(input:checked) { border-color: var(--accent); background: rgba(0,134,241,.14);
  color: var(--text-primary); }
.mc-pick-item:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.mc-pick-role { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted); }
.mc-pos-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mc-pos-field { flex: 1 1 120px; }
.mc-field { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 10px; }
.mc-field .input { margin-top: 4px; }

/* ── 다음 매치 프리뷰 (오늘 매치가 없을 때) ── */
.next-preview { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px;
  background: linear-gradient(120deg, var(--bg-elevated), #0F1D28);
  border: 1px solid var(--border-line); border-left: 3px solid var(--accent); padding: 20px 22px; }
.np-radar { position: relative; width: 74px; height: 74px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid rgba(0,134,241,.3); overflow: hidden; }
.np-radar::after { content: ''; position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(0,134,241,.35), transparent 75deg);
  animation: cne-radar-sweep 5s linear infinite; }
.np-eyebrow { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 3px;
  color: var(--accent-link); }
.np-dday { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: var(--fs-xl); color: var(--text-primary); line-height: 1.1; margin-top: 4px; }
.np-opp { font-size: var(--fs-md); font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.np-meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }
.np-badges { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.np-badge { font-family: var(--font-mono); font-size: var(--fs-micro); padding: 2px 8px;
  border: 1px solid var(--border-strong); color: var(--text-muted); }
.np-badge.on { border-color: rgba(34,197,94,.45); color: var(--win-light); background: rgba(34,197,94,.08); }
.np-badge.warn { border-color: rgba(245,217,122,.45); color: #F5D97A; background: rgba(245,217,122,.08); }

/* ── 최근 매치 결과 ── */
.streak-badge { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 1px;
  border: 1px solid; padding: 2px 8px; margin-left: 8px; }
.recent-banner { display: flex; align-items: center; gap: 10px; background: var(--bg-surface);
  border: 1px solid var(--border-line); border-left: 2px solid var(--border-strong);
  padding: 10px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.result-grid { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 12px; row-gap: 16px; }
.result-card { position: relative; overflow: hidden; background: var(--bg-surface);
  border: 1px solid var(--border-line); border-left: 2px solid; border-top: 2px solid;
  border-radius: 2px; padding: 12px 13px 13px; box-sizing: border-box;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); transition: transform .12s ease; }
.result-card { transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.result-card:hover { transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,.5), 0 0 18px rgba(0,134,241,.12); }
.result-map { position: absolute; inset: 0; background-size: cover;
  background-position: center right; opacity: .5; z-index: 0; }
.result-scrim { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, var(--bg-surface) 32%, rgba(23,30,39,.5) 68%, rgba(23,30,39,.2) 100%); }
.result-ghost { position: absolute; right: 2px; bottom: -14px; font-family: var(--font-display);
  font-weight: 900; font-style: italic; font-size: 64px; line-height: 1; pointer-events: none; }

/* ── 섹션 헤더 (주요 / 참고 두 단계) ── */
.sec-head { position: relative; display: flex; align-items: center; gap: 8px;
  min-height: 33px; padding-top: 8px; margin-bottom: 10px; box-sizing: border-box; }
.sec-head .dia { width: 6px; height: 6px; background: var(--accent); flex-shrink: 0; transform: rotate(45deg); }
.sec-head .title { font-family: var(--font-display); font-size: 15px; font-weight: 800;
  font-style: italic; color: var(--text-primary); }
.sec-head .no { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-2xs);
  letter-spacing: 1.5px; color: var(--text-muted); opacity: .55; }
.sec-head .ghost { position: absolute; right: 0; top: -6px; font-family: var(--font-display);
  font-weight: 900; font-style: italic; font-size: 44px; line-height: 1;
  color: var(--accent); opacity: .10; pointer-events: none; }
.sec-head--main { border-top: 2px solid var(--accent); }
.sec-head--sub { border-top: 1px solid var(--border-line); }
.sec-head--sub .dia { width: 5px; height: 5px; background: var(--border-strong); }
.sec-head--sub .title { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.sec-head--sub .ghost { display: none; }

.tag-live { display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 1px;
  color: var(--win-light); border: 1px solid rgba(74,222,128,.4);
  background: rgba(74,222,128,.08); padding: 2px 8px; }
.tag-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--win-light);
  display: inline-block; animation: cne-breathe 1.8s ease-in-out infinite; }

/* ── KPI 스트립 ──
   🌟 [v2026.5.37.0 이식] 열 수는 실제 칸 수에 맞춰 인라인으로 지정한다.
   Streamlit 시절 repeat(5,1fr) 고정 탓에 칸을 접으면 오른쪽 737px이 죽었던 문제. */
.kpi-strip { display: grid; background: var(--bg-surface);
  border: 1px solid var(--border-line); border-top: 2px solid var(--accent); }
.kpi-cell { position: relative; padding: 12px 14px; border-left: 1px solid var(--border-line);
  min-width: 0; transition: background var(--dur-base), box-shadow var(--dur-base); }
.kpi-cell:first-child { border-left: none; }
.kpi-cell::before { content: ''; position: absolute; top: 0; left: 0;
  border-top: 9px solid var(--kpi-accent, var(--accent)); border-right: 9px solid transparent; opacity: .85; }
.kpi-cell:hover { background: rgba(0,134,241,.06); box-shadow: inset 0 -2px 0 var(--kpi-accent, var(--accent)); }
.kpi-cell .l { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.kpi-cell .l i { display: inline-block; width: 5px; height: 5px; transform: rotate(45deg);
  background: var(--kpi-accent, var(--accent)); margin-right: 6px; vertical-align: 1px; }
.kpi-cell .v { font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(17px, 4.8vw, 24px); font-variant-numeric: tabular-nums;
  margin-top: 5px; line-height: 1; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-cell .v small { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 400; font-style: normal; }
.kpi-cell .s { color: var(--text-muted); font-size: var(--fs-2xs); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-cell--empty { border: 1px dashed var(--border-strong); background: transparent; opacity: .62; }
.kpi-cell--empty::before { border-top-color: var(--border-strong); }

/* ── 지금 할 일 배너 ── */
.todo-banner { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-bottom: 10px;
  border: 1px solid rgba(0,134,241,.45); border-left: 3px solid var(--accent);
  background: linear-gradient(100deg, rgba(0,134,241,.13), var(--bg-surface) 70%); }
.todo-banner .lbl { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 2px;
  color: var(--accent-link); flex-shrink: 0; }
.todo-banner .t { font-size: var(--fs-base); font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-banner .n { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-banner .cta { margin-left: auto; flex-shrink: 0; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--radius-soft);
  border: 1px solid var(--border-strong); background: var(--bg-input);
  color: var(--text-secondary); font-size: var(--fs-base); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base); }
.btn:hover { background: var(--surface-2); border-color: var(--accent); color: var(--text-primary); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn--danger { border-color: rgba(248,113,113,.45); color: var(--loss-light); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--lg { height: 40px; font-size: var(--fs-md); }
.btn--block { width: 100%; }

/* ── 세그먼트 토글 (내 일정 / 전체 보기) ──
   버튼 두 개를 하나의 스위치처럼 붙여 둔다. 지금 어느 쪽인지가 색으로 바로 보이는 게
   중요해서, 켜진 쪽만 채우고 꺼진 쪽은 테두리만 남긴다. */
.seg { display: inline-flex; }
.seg-btn {
  height: 28px; padding: 0 14px; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  font-family: inherit; font-size: var(--fs-xs); font-weight: 500;
  transition: background .12s, color .12s, border-color .12s;
}
.seg-btn:first-child { border-radius: 6px 0 0 6px; border-right-width: 0; }
.seg-btn:last-child { border-radius: 0 6px 6px 0; }
.seg-btn:hover { border-color: rgba(0,134,241,.6); }
.seg-btn.is-on {
  background: rgba(0,134,241,.85); border-color: var(--accent);
  color: #fff; font-weight: 700;
}
.seg-btn.is-on + .seg-btn { border-left-color: var(--accent); }

/* ── 카드 / 패널 ── */
.card { background: var(--bg-surface); border: 1px solid var(--border-line); padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.28); }
/* 큰 패널(일정표·랭크)은 hover 때 테두리가 파랗게 서고 글로우가 붙는다 */
.rank-panel, .card--panel { transition: border-color .15s ease, box-shadow .15s ease; }
.rank-panel:hover, .card--panel:hover {
  border-color: rgba(0,134,241,.45);
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 18px rgba(0,134,241,.08);
}
.rank-row { transition: background-color .12s ease; }
.rank-row:hover { background: rgba(0,134,241,.05); }
.panel-row { display: flex; gap: 14px; align-items: stretch; }
.panel-row > .col { min-width: 0; display: flex; flex-direction: column; }

/* ── 빈 상태 ── */
.empty { position: relative; overflow: hidden; text-align: center; padding: 34px 20px;
  border: 1px solid var(--border-line);
  background:
    repeating-linear-gradient(0deg, rgba(124,192,245,.02) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(124,192,245,.02) 0 1px, transparent 1px 26px),
    var(--bg-surface); }
.empty .radar { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
  border: 1px solid rgba(0,134,241,.4); position: relative;
  background: radial-gradient(circle, rgba(0,134,241,.10), transparent 70%); }
.empty .radar::after { content: ''; position: absolute; left: 50%; top: 50%; width: 50%; height: 2px;
  transform-origin: left center; background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 10px rgba(0,134,241,.5); animation: cne-radar 4s linear infinite; }
.empty .t { color: var(--text-secondary); font-size: var(--fs-base); font-weight: 700; }
.empty .s { color: var(--text-muted); font-size: var(--fs-xs); margin-top: 6px; line-height: 1.5; }

/* ── 애니메이션 ── */
@keyframes cne-radar { to { transform: rotate(360deg); } }
@keyframes cne-breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
@keyframes cne-spin { to { transform: rotate(360deg); } }
@keyframes cne-grow { from { transform: scaleX(0); opacity: .35; } to { transform: scaleX(1); opacity: 1; } }
@keyframes cne-rowin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cne-shim { to { background-position: 200% 0; } }
@keyframes cne-radar-sweep { to { transform: rotate(360deg); } }
/* NEXT 배지 위를 3초마다 한 번 지나가는 빛 */
@keyframes cne-shine { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(320%); } }
/* 시작 15분 미만 — 붉게 숨쉬듯 */
@keyframes cne-urgent-pulse { 0%, 100% { color: #F87171; opacity: 1; } 50% { color: #e24b4a; opacity: .6; } }
/* LIVE 점 */
@keyframes cne-live-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
/* 출석 핍이 왼쪽부터 차오른다 */
@keyframes cne-fill-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.cne-shine-el { animation: cne-shine 3s ease-in-out infinite; }
.cne-urgent { animation: cne-urgent-pulse 1.4s ease-in-out infinite; }
.cne-pulse { animation: cne-live-dot 1.2s ease-in-out infinite; }
.cne-fill { transform-origin: left center; animation: cne-fill-in .45s cubic-bezier(.2,.8,.2,1) both; }

.cne-bar { transform-origin: left center; animation: cne-grow .5s cubic-bezier(.2,.8,.2,1) both; }
.rank-row { animation: cne-rowin .4s cubic-bezier(.2,.8,.2,1) both; }
.rank-row:nth-child(1){animation-delay:.02s} .rank-row:nth-child(2){animation-delay:.06s}
.rank-row:nth-child(3){animation-delay:.10s} .rank-row:nth-child(4){animation-delay:.14s}
.rank-row:nth-child(5){animation-delay:.18s} .rank-row:nth-child(6){animation-delay:.22s}
.skel { display: block; height: 12px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-input) 0%, var(--surface-2) 50%, var(--bg-input) 100%);
  background-size: 200% 100%; animation: cne-shim 1.25s linear infinite; }

/* 탑랭크 후광 - 티어 밝은톤 (인라인 --halo-a/b 로 색 주입, 없으면 파랑) */
.halo { position: relative; }
.halo::before { content: ''; position: absolute; inset: -12px; border-radius: 50%;
  z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg,
    var(--halo-a, rgba(0,134,241,.95)) 50deg, var(--halo-b, rgba(0,134,241,0)) 125deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: cne-spin 3.2s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .cne-bar, .rank-row, .skel, .halo::before, .empty .radar::after, .tag-live i,
  .cne-shine-el, .cne-urgent, .cne-pulse, .cne-fill, .np-radar::after {
    animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   좁은 화면 (휴대폰)
   ══════════════════════════════════════════════════════════════════════════ */
.mobile-only { display: none; }
.mobile-bar { display: none; }

@media (max-width: 860px) {
  body { display: block; }
  /* 결과 카드 5열은 폰에서 글자가 뭉개진다 — 2열로 내린다 */
  .result-grid { grid-template-columns: repeat(2, 1fr); column-gap: 8px; row-gap: 10px; }
  .result-ghost { font-size: 46px; }
  /* 팝오버가 화면 밖으로 나가지 않게 */
  .bell-pop { position: fixed; top: 56px; right: 8px; left: 8px; width: auto; }
  /* 관리자 버튼 3개가 '매치 정보 수정'에서 줄바꿈돼 행이 두 배로 높아졌다 */
  .mc-admin .seg-btn { padding: 0 6px; font-size: var(--fs-2xs); white-space: nowrap; }
  .mc-head-body, .mc-body { padding-left: 12px; padding-right: 12px; }
  .mc-intel { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .mc-att-note { margin-left: 0; flex-basis: 100%; }
  /* 띠의 우측 상태 한 마디는 폰에서 자리를 못 낸다 — 본문만 남긴다 */
  .strip-tail, .strip-div { display: none; }
  .strip-tag { padding: 0 9px; font-size: var(--fs-micro); }
  .myform-stats { padding-right: 0; border-right: none; gap: 18px; }
  .myform-rank { padding-left: 0; border-left: none; border-top: 1px solid var(--border-line);
    padding-top: 10px; width: 100%; }
  /* 달력은 폰에서 칸이 너무 좁다 — KPI 2열, 셀 높이를 줄이고 이벤트는 점으로 */
  .cal-kpi { grid-template-columns: repeat(2, 1fr); }
  .cal-cell { min-height: 62px; }
  .cal-num { padding: 4px 5px; }
  .cal-ev { font-size: 0; padding: 0; height: 5px; margin: 2px 3px; border-left-width: 3px; }
  .cal-title { min-width: 96px; font-size: var(--fs-md); }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
  .main { padding: 8px 12px 80px; }
  .mobile-bar { display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 40; background: var(--bg-base);
    padding: 8px 2px; border-bottom: 1px solid var(--border-line); margin-bottom: 10px; }
  .mobile-bar .burger { width: 34px; height: 34px; display: inline-flex; align-items: center;
    justify-content: center; border: 1px solid var(--border-line); background: var(--bg-surface);
    border-radius: var(--radius-soft); cursor: pointer; font-size: 17px; }
  .mobile-bar .title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  .topbar { flex-direction: column; }
  .topbar-right { align-self: flex-start; }
  /* KPI는 지금 행동에 쓰이는 칸만 남긴다 */
  .kpi-strip { display: flex !important; flex-wrap: nowrap; }
  .kpi-cell { flex: 1 1 0; border-left: none; }
  .kpi-cell.kpi-drop { display: none !important; }
  .kpi-cell:not(.kpi-drop) ~ .kpi-cell:not(.kpi-drop) { border-left: 1px solid var(--border-line); }
  .panel-row { flex-direction: column; }
  .todo-banner { flex-wrap: wrap; }
  .todo-banner .cta { margin-left: 0; width: 100%; margin-top: 8px; }
  .todo-banner .cta .btn { width: 100%; height: 46px; font-size: var(--fs-md); }
}

/* ── 토스트 ── */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 240px; max-width: 380px; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  background: var(--bg-elevated); font-size: var(--fs-sm); color: var(--text-secondary);
  animation: cne-rowin .2s ease-out both; }
.toast--ok { border-left-color: var(--success); }
.toast--err { border-left-color: var(--danger); }

/* ── 로딩 오버레이 ── */
.route-loading { padding: 40px 0; }
.route-loading .skel { height: 16px; margin-bottom: 10px; }
.route-loading .skel:nth-child(2) { width: 70%; }
.route-loading .skel:nth-child(3) { width: 45%; }
