/* ═══════════════════════════════════════════════════════════
   Osan Tennis — League Pages Stylesheet  (league.css)
   리그/대회 관련 모든 사용자 페이지 스타일을 여기서 관리합니다.
   ─────────────────────────────────────────────────────────
   로드 순서: common.css → pages.css → league.css
   ═══════════════════════════════════════════════════════════ */


/* ═══════════════════════════════
   SHARED: 공통 컴포넌트
   ═══════════════════════════════ */

/* It's me 배지 */
.its-me-dot {
    font-size: 0.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.its-me-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 800;
    background: #0f766e;
    color: white;
    padding: 0.1em 0.4em;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* 경기 상태 배지 */
.match-status-badge {
    font-size: 0.65rem;
    padding: 0.15em 0.5em;
    border-radius: 10px;
    font-weight: 600;
}
.status-SCHEDULED       { background: #e3f2fd; color: #1565c0; }
.status-IN_PROGRESS     { background: #fff8e1; color: #f57c00; }
.status-PENDING_CONFIRM { background: #fff3e0; color: #e65100; }
.status-COMPLETED       { background: #e8f5e9; color: #2e7d32; }
.status-BYE             { background: #e8f5e9; color: #2e7d32; }
.status-WAITING         { background: #f5f5f5; color: #888; }

/* 경기 상태 점 */
.status-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.dot-SCHEDULED       { background: #94a3b8; }
.status-dot.dot-WAITING         { background: #cbd5e1; }
.status-dot.dot-IN_PROGRESS     { background: #f59e0b; box-shadow: 0 0 0 2px #fef3c7; }
.status-dot.dot-PENDING_CONFIRM { background: #7c3aed; box-shadow: 0 0 0 2px #ede9fe; }
.status-dot.dot-COMPLETED       { background: #22c55e; }
.status-dot.dot-BYE             { background: #22c55e; }

/* 상태 범례 */
.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    font-size: 0.78rem;
    color: #475569;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 1px dashed #e2e8f0;
}
.status-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-weight: 500;
}
.status-legend.status-legend-inline {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.45rem 0;
    border-bottom: none;
}

/* 경기 상태 범례 + 진행률 wrapper */
.status-progress-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}
.status-progress-row .status-legend {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    border-bottom: none;
    margin-bottom: 0;
}
.status-progress-row .status-legend::after {
    display: none;
}
.progress-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}
.progress-inline .progress-bar-track {
    flex: 1;
    min-width: 40px;
}

/* 진행률 바 (단독 사용 시 - 레거시) */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-bottom: 1.25rem;
}
.progress-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.progress-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.progress-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    transition: width 0.3s;
}
.progress-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

/* 순위 배지 (메달) */
.rank-1-badge { background: #FFD700; color: #333; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }
.rank-2-badge { background: #C0C0C0; color: #333; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }
.rank-3-badge { background: #CD7F32; color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }
.rank-n-badge { background: #e8ecf0; color: #666; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }

/* 진출 배지/칩/점 */
.qualified-badge {
    font-size: 0.62rem;
    background: #16a34a;
    color: white;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-weight: 700;
}
.qualified-chip { background: #e8f5e9; color: #2e7d32; font-size: 0.68rem; font-weight: 700; padding: 0.15em 0.5em; border-radius: 10px; border: 1px solid #a5d6a7; margin-left: 0.3rem; }
.qualified-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4caf50;
    flex-shrink: 0;
    margin-left: auto;
}

/* 섹션 카드/타이틀 */
.section-card {
    background: white;
    margin-top: 8px;
    padding: 1rem;
}
.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* 점수 입력 공통 */
.set-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.set-label { font-size: 0.78rem; font-weight: 700; color: #888; min-width: 36px; }
.set-input-row .team-tag { font-size: 0.78rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-input-row input[type=number] {
    width: 56px; height: 42px;
    text-align: center; font-size: 1.1rem; font-weight: 700;
    border: 1.5px solid #c8d8f8; border-radius: 8px; flex-shrink: 0;
    -moz-appearance: textfield;
}
.set-input-row input[type=number]::-webkit-inner-spin-button,
.set-input-row input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.score-vs { color: #aaa; font-weight: 700; flex-shrink: 0; }

/* 코트 선택 칩 */
.admin-court-chip { display: inline-flex; align-items: center; gap: 5px; padding: 0.3rem 0.75rem; border-radius: 20px; border: 1.5px solid #cbd5e1; background: #f8fafc; cursor: pointer; font-size: 0.82rem; transition: all 0.15s; }
.admin-court-chip:hover:not(.in-use) { border-color: #2563eb; background: #eff6ff; }
.admin-court-chip.assigned { border-color: #0ea5e9; background: #f0f9ff; }
.admin-court-chip.selected { border-color: #2563eb; background: #dbeafe; font-weight: 700; }
.admin-court-chip.in-use { opacity: 0.5; cursor: not-allowed; }
.admin-court-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.admin-court-chip .dot-free { background: #22c55e; }
.admin-court-chip .dot-busy { background: #ef4444; }


/* ═══════════════════════════════
   LIST: 리그 목록 페이지
   ═══════════════════════════════ */

.league-list-wrap {
    width: 100%;
}

/* 필터 바 */
.league-filter-bar {
    display: flex;
    gap: 0.3rem;
    padding: 0.6rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    background: transparent;
    margin-bottom: 1rem;
}
.league-filter-bar::-webkit-scrollbar { display: none; }
.league-filter-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.league-filter-btn:hover { border-color: #2563eb; color: #2563eb; }
.league-filter-btn.active { background: #2563eb; border-color: #2563eb; color: white; }
.league-filter-count {
    display: inline-block;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
    font-size: 0.68rem;
    padding: 0 0.35rem;
    margin-left: 0.2rem;
    min-width: 18px;
    text-align: center;
}
.league-filter-btn.active .league-filter-count { background: rgba(255,255,255,0.3); }

/* 카드 그리드 */
.league-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 540px) {
    .league-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .league-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .league-card-grid { grid-template-columns: repeat(4, 1fr); }
}

.league-card-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.league-card-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.league-card-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.league-list-status-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
}
.league-list-status-badge.status-open     { background: #dcfce7; color: #16a34a; }
.league-list-status-badge.status-upcoming { background: #fef9c3; color: #a16207; }
.league-list-status-badge.status-closed   { background: #f1f5f9; color: #64748b; }
.league-list-status-badge.status-ended    { background: #f1f5f9; color: #94a3b8; }
.league-card-item-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.league-card-item-title.ended { color: #94a3b8; }
.league-card-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    font-size: 0.72rem;
    color: #94a3b8;
}
.league-card-item-meta i { margin-right: 0.2rem; }

/* 부문 칩 */
.league-list-div-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.25rem;
}
.league-div-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #f0f4ff;
    color: #2563eb;
    border: 1px solid #c8d8f8;
    cursor: pointer;
    transition: all 0.15s;
}
.league-div-chip:hover { background: #dbeafe; }
.league-div-chip.my-team { background: #dcfce7; color: #16a34a; border-color: #86efac; }

.league-list-card-arrow {
    color: #cbd5e1;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* 기존 div-chip 하위호환 */
.div-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f0f4ff;
    color: #2563eb;
    border: 1px solid #c8d8f8;
    text-decoration: none;
    min-height: 32px;
}
.div-chip.my-team { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.league-info-list { display: flex; flex-direction: column; gap: .25rem; }
.league-info-list > div { display: grid; grid-template-columns: 1.2rem 4.5rem 1fr; align-items: baseline; gap: .25rem; }
.league-info-icon  { text-align: center; font-size: .8rem; }
.league-info-label { color: #6c757d; font-size: .75rem; white-space: nowrap; }
.league-info-label::after { content: ':'; }
.league-info-value { color: #212529; font-size: .8rem; }


/* ═══════════════════════════════
   DETAIL: 리그 상세 페이지
   ═══════════════════════════════ */

.detail-info-list { display: flex; flex-direction: column; gap: 0; }
.detail-info-row {
    display: flex;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-label {
    min-width: 90px;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.detail-info-value { color: #1e293b; flex: 1; }

.division-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
}
.division-card-body { padding: 1.25rem; }
.division-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 0.5rem;
}
.division-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.division-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.division-actions {
    display: flex;
    gap: 0.5rem;
}
.btn-apply {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    min-height: 44px;
}
.btn-bracket {
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    min-height: 44px;
}
.my-team-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}
.my-team-confirmed { background: #dcfce7; color: #16a34a; border: 1px solid #a5d6a7; }
.my-team-pending   { background: #fef9c3; color: #a16207; border: 1px solid #ffe082; }

.modal-member-row {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}
.modal-member-row .form-control,
.modal-member-row .form-select {
    font-size: 16px;
    min-height: 44px;
}


/* ═══════════════════════════════
   GROUP-DETAIL: 조별 경기 페이지
   ═══════════════════════════════ */

.group-detail-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0.75rem 0 0;
}
.group-section {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.group-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.group-section-title span {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.75rem;
}
.group-section-body {
    padding: 1rem 1.25rem;
}

/* ═══════════════════════════════
   DETAIL: 대회 상세 페이지
   ═══════════════════════════════ */

.detail-hero-container { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.detail-hero-title { font-size: 1.2rem; line-height: 1.3; }
@media (min-width: 768px) {
    .detail-hero-title { font-size: 1.7rem; }
    .detail-hero-container { padding-top: 1.6rem; padding-bottom: 1.6rem; }
}

.detail-page-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 0 1rem; }

.detail-info-card {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.detail-section { padding: 1rem 1rem 0; }
.detail-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

/* 부문 카드 v2 */
.division-card-v2 {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    position: relative;
}
.division-card-v2-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.division-card-v2-grade {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.division-card-v2-type {
    display: inline-block;
    font-size: 0.72rem;
    color: #2563eb;
    font-weight: 600;
    background: #eff6ff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}
.division-card-v2-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.division-action-btn {
    font-size: 0.78rem !important;
    padding: 0.3rem 0.75rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
}
.division-action-badge {
    font-size: 0.72rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    white-space: nowrap;
}
.division-card-v2-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #64748b;
}
.division-card-v2-meta i { margin-right: 0.2rem; }

.division-participants-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.28rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
}
.division-participants-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* ═══════════════════════════════
   BRACKET: 대진표 페이지
   ═══════════════════════════════ */

/* 대진표 페이지 전체 래퍼 (container 대신 full-width) */
.bracket-page-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Hero 컴팩트 */
.bracket-hero-container {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.bracket-hero-title {
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}
@media (min-width: 768px) {
    .bracket-hero-title { font-size: 1.6rem; }
    .bracket-hero-container { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* ── 부문 탭 (경기타입별) ── */
.division-tab-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #cbd5e1;
}
.division-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}
.division-tab:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
    background: #eff6ff;
}
.division-tab.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
    box-shadow: 0 2px 8px rgba(29,78,216,0.25);
}
.division-tab-grade {
    font-weight: 700;
}
.division-tab-type {
    font-size: 0.78rem;
    opacity: 0.75;
}
.division-tab.active .division-tab-grade { color: white; }
.division-tab.active .division-tab-type  { color: rgba(255,255,255,0.85); opacity: 1; }

/* ── 라운드 탭 (예선/N강) ── */
.round-tabs {
    background: #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.3rem;
    display: flex;
    gap: 0.2rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}
.round-tabs::-webkit-scrollbar { display: none; }
.round-tab {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-align: center;
}
.round-tab:hover { color: #1e293b; background: rgba(255,255,255,0.5); }
.round-tab.active { background: white; color: #1e293b; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* 부문탭 없을 때 라운드탭 스타일 */
.round-tabs:first-child { margin-top: 0; }

/* div-tabs 하위 호환 (기존 game-tab 사용하는 다른 페이지용) */
.div-tabs {
    background: white;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    position: sticky;
    top: 56px;
    z-index: 110;
}

/* 탭 콘텐츠 */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 조 카드 그리드 */
.group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (min-width: 600px) {
    .group-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .group-grid { grid-template-columns: repeat(4, 1fr); }
}
.group-grid-single {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin: 0 auto;
}

/* 조 카드 */
.group-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}
.group-card:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.group-card-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.group-card.my-group {
    border: 2px solid #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.1);
}
.group-card.my-group .group-card-header {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}
.my-group-badge {
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 0.15em 0.6em;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.4);
}
.my-team-row {
    font-weight: 700;
    color: #0f766e !important;
    background: #f0fdfa;
    border-radius: 6px;
    margin: 0 -0.4rem;
    padding: 0.15rem 0.4rem;
}
.group-card-body {
    padding: 0.5rem 0.75rem;
}
.group-member-item {
    font-size: 0.78rem;
    padding: 0.2rem 0;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.group-member-item .rank-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rank-1 { background: #FFD700; color: #333; }
.rank-2 { background: #C0C0C0; color: #333; }
.rank-3 { background: #CD7F32; color: white; }
.rank-other { background: #e8ecf0; color: #666; }

/* 토너먼트 트리 / 섹션 구분 */
.tournament-tree-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0.75rem;
}
.section-divider {
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.75rem 0.3rem;
    background: #f7f9fc;
    border-bottom: 1px solid #eee;
}


/* ═══════════════════════════════
   GROUP-DETAIL: 조별 상세 페이지
   ═══════════════════════════════ */

/* 매트릭스 표 */
.matrix-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.matrix-wrap::-webkit-scrollbar { height: 5px; }
.matrix-wrap::-webkit-scrollbar-track { background: #f1f5f9; }
.matrix-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
    table-layout: auto;
    min-width: 100%;
}
.matrix-table th {
    background: #f0f4ff;
    color: #1e3a8a;
    padding: 0.5rem 0.4rem;
    text-align: center;
    font-weight: 700;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.3;
    min-width: 52px;
}
.matrix-table th:first-child {
    text-align: center;
    padding-left: 0.15rem;
    min-width: 60px;
    max-width: 100px;
    white-space: pre-line;
    word-break: keep-all;
    position: sticky;
    left: 0;
    z-index: 3;
    border-left: 1px solid #e2e8f0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}
.matrix-table th:last-child {
    min-width: 64px;
    white-space: nowrap;
    position: sticky;
    right: 0;
    z-index: 3;
    border-right: 1px solid #e2e8f0;
    box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    max-width: 72px;
    padding: 0.2rem 0.3rem !important;
    vertical-align: middle;
    font-size: 0.78rem;
}
.matrix-table thead th:nth-child(1) {
    min-width: 0 !important;
    width: auto;
    text-align: center;
    vertical-align: middle;
    padding: 0.2rem 0.3rem !important;
}
.matrix-table thead th:first-child { z-index: 4; }
.matrix-table thead th:last-child  { z-index: 4; }
.matrix-table td {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    padding: 0;
    vertical-align: middle;
    height: 60px;
    min-width: 52px;
}
.matrix-table td.name-cell {
    text-align: center;
    padding: 0.3rem 0.15rem 0.3rem 0.15rem;
    font-weight: 600;
    color: #1a1a2e;
    background: #f7f9fc;
    white-space: pre-line;
    line-height: 1.3;
    height: auto;
    word-break: keep-all;
    min-width: 60px;
    max-width: 100px;
    position: sticky;
    left: 0;
    z-index: 1;
    border-left: 1px solid #e2e8f0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}
.matrix-table td.self-cell {
    background: #dbeafe;
    color: #1e3a8a;
    font-weight: 800;
    font-size: 0.9rem;
}
.matrix-table td.record-cell {
    background: #f7f9fc;
    font-weight: 700;
    font-size: 0.78rem;
    color: #555;
    padding: 0.4rem 0.5rem;
    height: auto;
    white-space: nowrap;
    position: sticky;
    right: 0;
    z-index: 1;
    border-right: 1px solid #e2e8f0;
    box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}

/* 점수 셀 */
.score-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0.25rem;
    cursor: pointer;
    transition: background 0.1s;
}
.score-cell-inner:active { background: #e3f2fd; }
.score-cell-inner.completed-cell { cursor: default; }
.score-cell-inner.my-match-cell { background: #fffde7; }
.score-set-row {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}
.score-set-row .s-score { min-width: 18px; text-align: center; }
.score-set-row .s-sep { color: #bbb; font-size: 0.7rem; }
.score-set-row .s-result { font-size: 0.65rem; font-weight: 800; }
.score-set-row .s-win  { color: #1d4ed8; }
.score-set-row .s-lose { color: #dc3545; }
.pending-label {
    font-size: 0.7rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 순위표 */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.rank-table thead tr { background: #eff6ff; }
.rank-table th {
    padding: 0.5rem 0.4rem;
    text-align: center;
    font-weight: 700;
    color: #2563eb;
    font-size: 0.78rem;
    border-bottom: 2px solid #bfdbfe;
}
.rank-table th:nth-child(2) { text-align: left; }
.rank-table td {
    padding: 0.6rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}
.rank-table td:nth-child(2) { text-align: left; }

/* 대진 순서 리스트 */
.match-schedule-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #f0f4ff;
    font-size: 0.85rem;
}
.match-schedule-item:last-child { border-bottom: none; }
.match-schedule-item.my-match { background: #fffde7; border-radius: 8px; }
.match-schedule-num {
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ede9fe;
    color: #4338ca;
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.match-schedule-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.match-schedule-teams {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #1a1a2e;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}
.match-schedule-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 38%;
}
.match-schedule-vs {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0 0.3rem;
    flex-shrink: 0;
}
.match-schedule-sub {
    font-size: 0.72rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.match-schedule-court {
    font-size: 0.72rem;
    color: #2563eb;
    font-weight: 600;
}
.match-schedule-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 풀리그 카드형 순위표 */
.fullleague-rank-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    background: white;
}
.rank-card-1 { border-left: 4px solid #FFD700; background: #fffdf0; }
.rank-card-2 { border-left: 4px solid #C0C0C0; background: #f9fafb; }
.rank-card-3 { border-left: 4px solid #CD7F32; background: #fdf8f5; }
.rank-card-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}
.rank-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank-card-stats {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.rank-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
}
.rank-stat-val {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}
.rank-stat-lbl {
    font-size: 0.62rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 1px;
}


/* ═══════════════════════════════
   MATCH-DETAIL: 경기 상세 페이지
   ═══════════════════════════════ */

/* 히어로 */
.match-hero {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
    overflow: hidden;
    color: white;
    padding: 1rem 1rem 0;
}
.match-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

/* 스코어보드 */
.scoreboard {
    background: white;
    padding: 1.25rem;
}
.team-score-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.team-avatar-lg {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.team-avatar-1 { background: #1e3a8a; }
.team-avatar-2 { background: #c62828; }
.team-info { flex: 1; min-width: 0; }
.team-name-lg {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-players-sm {
    font-size: 0.72rem;
    color: #888;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.total-score {
    font-size: 1.7rem;
    font-weight: 900;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}
.score-win  { color: #2563eb; }
.score-lose { color: #ccc; }
.vs-divider {
    text-align: center;
    padding: 0.3rem 0;
    position: relative;
}
.vs-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: #eee;
}
.vs-text {
    position: relative;
    background: white;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: #bbb;
    font-weight: 700;
}
.match-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4em 1em;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.pill-SCHEDULED       { background: #e3f2fd; color: #1565c0; }
.pill-IN_PROGRESS     { background: #fff8e1; color: #f57c00; }
.pill-PENDING_CONFIRM { background: #fff3e0; color: #e65100; }
.pill-COMPLETED       { background: #e8f5e9; color: #2e7d32; }
.pill-BYE             { background: #e8f5e9; color: #2e7d32; }
.pill-WAITING         { background: #f5f5f5; color: #888; }

/* 세트별 점수표 */
.set-table-wrap {
    background: white;
    padding: 1rem;
}
.set-table-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.set-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.set-table thead tr { background: #f0f4ff; }
.set-table th {
    padding: 0.5rem 0.6rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: #2563eb;
    border-bottom: 2px solid #c8d8f8;
}
.set-table th:first-child { text-align: left; }
.set-table td {
    padding: 0.6rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}
.set-table td:first-child { text-align: left; font-size: 0.82rem; color: #444; }
.set-table .score-cell { font-size: 1.05rem; }
.set-table .win-cell { color: #2563eb; font-weight: 800; }
.set-table .lose-cell { color: #ccc; }
.set-table .not-played { color: #ddd; font-size: 0.75rem; }

/* 점수 입력 섹션 */
.score-input-section {
    background: white;
}
.score-input-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.set-input-card {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.6rem;
}
.set-input-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 0.6rem;
}
.set-score-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.set-score-row .team-label {
    font-size: 0.78rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}
.set-score-row input[type=number] {
    width: 64px;
    height: 44px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    border: 1.5px solid #c8d8f8;
    border-radius: 8px;
    flex-shrink: 0;
    -moz-appearance: textfield;
}
.set-score-row input[type=number]::-webkit-inner-spin-button,
.set-score-row input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.colon-sep { font-size: 1.1rem; color: #aaa; font-weight: 700; flex-shrink: 0; }
.btn-submit-score {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    min-height: 52px;
    margin-top: 0.75rem;
}

/* 완료 배너 */
.result-banner {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-top: 8px;
}
.result-banner .winner-label { font-size: 0.8rem; opacity: 0.85; }
.result-banner .winner-name { font-size: 1.3rem; font-weight: 800; margin-top: 0.2rem; }

/* 코트 선택 리스트 */
.court-select-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 0.5rem;
    border: 1.5px solid #e2e8f0; cursor: pointer; transition: all 0.15s;
}
.court-select-item:hover:not(.in-use) { border-color: #2563eb; background: #eff6ff; }
.court-select-item.assigned { border-color: #0ea5e9; background: #f0f9ff; }
.court-select-item.selected { border-color: #2563eb; background: #dbeafe; }
.court-select-item.in-use { opacity: 0.5; cursor: not-allowed; }
.court-select-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.court-select-name { flex: 1; font-size: 0.9rem; font-weight: 600; color: #334155; }
.court-select-badge { font-size: 0.7rem; padding: 0.2em 0.6em; border-radius: 20px; }
.badge-free { background: #dcfce7; color: #16a34a; }
.badge-busy { background: #fee2e2; color: #dc2626; }
.badge-assigned { background: #e0f2fe; color: #0369a1; }


/* ═══════════════════════════════
   BRACKET: 본선 경기 카드 모바일
   ═══════════════════════════════ */
.bracket-match-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 0.65rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.bracket-match-card:active { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.bracket-match-team {
    flex: 1;
    min-width: 0;
    text-align: center;
}
.bracket-match-team-name {
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bracket-match-score-wrap {
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}
.bracket-match-score {
    font-size: 1.15rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}
.bracket-match-score.pending { color: #94a3b8; font-size: 0.85rem; }

