/* ===== Toast 알림 ===== */
.sq-toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: 100%;
    max-width: 360px;
    padding: 0 16px;
    box-sizing: border-box;
}
.sq-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
}
.sq-toast.sq-toast--show { opacity: 1; transform: translateY(0); }
.sq-toast--success { background: #16A34A; color: #fff; }
.sq-toast--error   { background: #EF4444; color: #fff; }
.sq-toast--info    { background: #3B82F6; color: #fff; }
.sq-toast--warning { background: #F59E0B; color: #fff; }
.sq-toast .sq-toast-icon { font-size: 18px; flex-shrink: 0; }
.sq-toast .sq-toast-msg  { flex: 1; }

.quarter-management{margin: 30px 0 0;}
.quarter-management > .flex{justify-content: space-between; margin-top: 10px;}

.quarter-tabs{display: flex; gap:10px}
.quarter-tabs .quarter-btn{border: 1px solid #E1E1E1; background: #fff; color: #6B7280; display: block; flex:1; height: 50px; border-radius:5px;}
.quarter-tabs .quarter-btn.active{background: #16a34a; color: #fff; border: 0;}

.quarter-header #quarter_count{margin: 0 5px;}

.quarter-header-controls{display: flex; padding: 5px; justify-content: flex-end; gap:5px}
.quarter-header-controls button{background: #fff; border: 1px solid #e1e1e1; line-height: 30px; padding: 0 10px;}
.quarter-controls{display: flex; align-items: center}
.quarter-controls button{font-size: 15px; font-weight: 600;}

.quarter-reset-controls button{font-size: 11px;}

.formation-select label{display: none;}
.formation-select .nice-select{font-size: 12px;}

.player-list-panel{display: none;}
.player-list-panel .player-list{display: grid; grid-template-columns: repeat(4, 1fr); gap: 1vw;}

.player-list-panel .player-list .player-item{border-radius: 5px; padding: 5px;}
.player-list-panel .player-list .player-item .player-number {background: #16a34a;color: #fff;padding: 0px 5px;border-radius: 3px;font-size: 10px;min-width: 22px;display: inline-block;text-align: center;line-height: 18px;}

.player-list-panel .player-list .player-item .player-quarters{display: none; margin-top: 5px; font-size: 10px; color: #777;}
.player-list-panel .player-list .player-item.current{opacity: 0.5;}

.player-list-panel .player-list-panel h3{margin-bottom: 5px;}
.field-panel{margin-top: 10px;}
.soccer-field, .futsal-field {
    background: url('/img/field_full.jpg') no-repeat bottom center / cover;
    padding: 12px 8px;
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 8px;
}

/* position-row: flex 균등 분할 */
.soccer-field .position-row {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    gap: 3px;
    flex: 1;
    min-height: 0;
}

/* 포지션 카드 — 빈 상태 */
.soccer-field .position-row .position {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 42px;
    max-width: 64px;
    flex: 1;
    min-height: 48px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform .1s, background .12s;
    padding: 5px;
    box-sizing: border-box;
    background: rgba(255,255,255,.20);
    border: 1px dashed rgba(255,255,255,.70);
}
.soccer-field .position-row .position:hover {
    background: rgba(255,255,255,.26);
    border-color: rgba(255,255,255,.65);
    transform: scale(1.04);
}
.soccer-field .position-row .position:active { transform: scale(.92); }

/* 포지션 카드 — 배치된 상태 */
.soccer-field .position-row .position.filled {
    background: #fff;
    border: none;
    box-shadow: 0 3px 12px rgba(0,0,0,.28);
}
.soccer-field .position-row .position.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 16px rgba(0,0,0,.34);
}

/* 포지션 라벨 */
.soccer-field .position-row .position .position-label {
    font-size: 8px;
    color: rgba(255,255,255, 1);
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.1;
    flex-shrink: 0;
    text-transform: uppercase;
}
.soccer-field .position-row .position.filled .position-label { color: #9ca3af; }

/* position-player 영역 */
.soccer-field .position-row .position .position-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    gap: 1px;
}

/* 빈 포지션 + 아이콘 */
.soccer-field .position-row .position:not(.filled) .position-player::before {
    content: '+';
    font-size: 15px;
    font-weight: 300;
    color: rgba(255,255,255,.5);
    line-height: 1;
}

/* 등번호 배지 */
.soccer-field .position-row .position .sq-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 5px;
    border-radius: 2px;
    background: #16a34a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

/* 선수 이름 */
.soccer-field .position-row .position .sq-name {
    font-size: 12px;
    color: #111827;
    font-weight: 700;
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* 구버전 .number/.player-number — 혹시 남아있는 곳 대비 */
.soccer-field .position-row .position .number,
.soccer-field .position-row .position .player-number { display: none; }



.quarter-reset-controls{margin-top: 10px; display: flex; gap:10px; justify-content: center}
.quarter-reset-controls button{border: 1px solid #e1e1e1; background: #fff; color: #000; line-height: 40px; padding: 0 10px; border-radius:5px;}



.team-tabs {display: flex; gap:5px; margin: 10px 0 -20px; text-align: center;}
.team-tabs .team-tab{border: 0; background: #fff; color: #555; display: block; flex:1; line-height: 40px; border-radius:5px;}
.team-tabs .team-tab.active{background: #16a34a; color: #fff;}



/* 스쿼드 관리 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
	min-height: 70vh;

	padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.modal-content > .flex{justify-content: space-between; margin-bottom: 5px;}


.modal-header .modal-close {
    position: absolute;
    right: 10px;
    top: -40px;
    background: #fff;
	border: 1px solid #ccc;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #000;
}

.modal-content .modal-footer{display: flex; gap:5px}
.modal-content .modal-footer button{border: 0; background: #000; color: #fff; line-height: 35px; padding: 0 10px; border-radius:5px;}
.modal-content .modal-footer button.btn-clear{background: #00a2ff; color: #fff; border: 0;}


.dosmodal .player-section2{border-top: 1px solid #000; margin-bottom: 20px; padding: 5px;}

.dosmodal .player-list{display: grid; grid-template-columns: repeat(4, 1fr); gap: 2vw; margin: 10px 0;}

.dosmodal .player-list .player-info .player-number{background: #000; color: #fff; padding: 2px 2px; border-radius:3px; font-size: 10px;width: 16px; display: block; margin: 3px auto;}
.dosmodal .player-list  > li{border: 1px solid #e1e1e1; border-radius:5px; padding: 5px;}
.dosmodal .player-list  > li .current-badge{display: block; color: #2196f3;}
.dosmodal .player-list  > li .player-badges{display: block; color: #777; font-size: 11px; }







  label.radio-wrapper-8 {
    display: block;
    cursor: pointer;
  }
  label.radio-wrapper-8 input {
    display: none;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
  }
  label.radio-wrapper-8 input + span {
    line-height: 22px;
    height: 22px;
    padding-left: 22px;
    display: block;
    position: relative;
  }
  label.radio-wrapper-8 input + span:not(:empty) {
    padding-left: 27px;
  }
  label.radio-wrapper-8 input + span:before, label.radio-wrapper-8 input + span:after {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    border-radius: 50%;
    left: 0;
    top: 0;
    position: absolute;
  }
  label.radio-wrapper-8 input + span:before {
    background: #D1D7E3;
    transition: background 0.2s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 2);
  }
  label.radio-wrapper-8 input + span:after {
    background: #fff;
    transform: scale(0.78);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.4);
  }
  label.radio-wrapper-8 input:checked + span:before {
    transform: scale(1.04);
    background: #5D9BFB;
  }
  label.radio-wrapper-8 input:checked + span:after {
    transform: scale(0.4);
    transition: transform 0.3s ease;
  }
  label.radio-wrapper-8:hover input + span:before {
    transform: scale(0.92);
  }
  label.radio-wrapper-8:hover input + span:after {
    transform: scale(0.74);
  }
  label.radio-wrapper-8:hover input:checked + span:after {
    transform: scale(0.4);
  }
/* ── 쿼터/팀 탭 공통 ── */
.quarter-tabs .quarter-btn,
.team-tabs .team-tab {
    font-size: 15px; font-weight: 700;
    border-radius: 10px !important;
    transition: background .15s;
}
.quarter-btn-control {
    width: 25px; height: 25px;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #374151 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ── 필드 번호 배지 (dosmodal 구버전 호환) ── */
.dosmodal .player-list .player-info .player-number {
    background: #16a34a !important;
}

/* ── sq-action-bar ── */
.sq-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0 8px;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
    flex-wrap: nowrap;
}
.sq-action-left  { display: flex; gap: 6px; flex-shrink: 0; }
.sq-action-right { display: flex; gap: 6px; flex-shrink: 0; }

/* 공통 버튼 base */
.sq-btn-auto,
.sq-btn-reset,
.sq-btn-danger,
.sq-btn-start,
.sq-btn-kakao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 42px;
    padding: 0 14px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
}
.sq-btn-auto .material-symbols-outlined,
.sq-btn-reset .material-symbols-outlined,
.sq-btn-danger .material-symbols-outlined,
.sq-btn-start .material-symbols-outlined { font-size: 18px; flex-shrink: 0; }

/* 자동 배치 */
.sq-btn-auto {
    background: #dcfce7; color: #166534;
    border: 1px solid #86efac;
}
.sq-btn-auto:active { opacity: .8; transform: scale(.96); }

/* 쿼터 리셋 */
.sq-btn-reset {
    background: #f1f5f9; color: #374151;
    border: 1px solid #e2e8f0;
}
.sq-btn-reset:active { opacity: .75; transform: scale(.96); }

/* 전체 리셋 */
.sq-btn-danger {
    background: #fff7ed; color: #b45309;
    border: 1px solid #fed7aa;
}
.sq-btn-danger:active { opacity: .75; transform: scale(.96); }

/* 카톡 공유 */
.sq-btn-kakao {
    background: #FEE500; color: #000;
}
.sq-btn-kakao img { width: 18px; height: 18px; flex-shrink: 0; }
.sq-btn-kakao:active { opacity: .85; transform: scale(.96); }

/* 경기 시작 */
.sq-btn-start {
    background: #16a34a; color: #fff;
}
.sq-btn-start:active { opacity: .88; transform: scale(.96); }

/* ─── 모바일: 보조 버튼은 아이콘만, 텍스트 숨김 ─── */
@media (max-width: 540px) {
    .sq-action-bar { gap: 6px; }

    /* 보조 버튼(쿼터/전체 리셋): 아이콘 전용 원형 버튼 */
    .sq-btn-auto,
    .sq-btn-reset,
    .sq-btn-danger {
        width: 42px;
        padding: 0;
        border-radius: 50%;
    }
    .sq-btn-auto .btn-txt,
    .sq-btn-reset .btn-txt,
    .sq-btn-danger .btn-txt { display: none; }

    /* 카카오 공유: 아이콘 전용 */
    .sq-btn-kakao {
        width: 42px;
        padding: 0;
        border-radius: 50%;
    }
    .sq-btn-kakao .btn-txt { display: none; }
    .sq-btn-kakao img { width: 22px; height: 22px; }

    /* 경기 시작: full width CTA는 유지 */
    .sq-btn-start {
        padding: 0 16px;
        font-size: 13px;
    }
}

/* ════ 자체전 양팀 전체 필드 ════ */

/* 래퍼 (field_container가 이 클래스를 가짐) */
.dual-squad-wrapper {
    display: flex;
    flex-direction: column;
}

/* ── 팀 컨트롤 바: 한 줄 고정, 절대 wrap 없음 ── */
.dsc-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;        /* 절대 wrap 금지 */
    padding: 6px 4px;
    gap: 6px;
    min-width: 0;
}
.dsc-team {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-shrink: 1;
}
.dsc-team--b { justify-content: flex-end; }

.dsc-badge {
    font-size: 11px; font-weight: 900;
    padding: 3px 10px; border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.6;
}
.dsc-badge--a { background: #3b82f6; color: #fff; }
.dsc-badge--b { background: #f97316; color: #fff; }

/* native select (nice-select 미로드 시 폴백) */
select.dsc-sel {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E") no-repeat right 7px center;
    border-radius: 7px;
    padding: 4px 22px 4px 8px;
    font-size: 11px; font-weight: 700;
    color: #374151;
    outline: none; cursor: pointer;
    min-width: 72px;
    flex-shrink: 0;
    width: auto;
    line-height: 1.5;
}
/* nice-select가 생성하는 div에 동일 스타일 적용 */
.dsc-team .nice-select.dsc-sel {
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 4px 28px 4px 8px;
    font-size: 11px; font-weight: 700;
    color: #374151;
    min-width: 72px;
    flex-shrink: 0;
    height: auto;
    line-height: 1.6;
    background-color: #fff;
}
.dsc-team--a select.dsc-sel,
.dsc-team--a .nice-select.dsc-sel { border-color: #bfdbfe; }
.dsc-team--b select.dsc-sel,
.dsc-team--b .nice-select.dsc-sel { border-color: #fed7aa; }

/* nice-select 드롭다운 리스트 z-index 확보 */
.dsc-controls .nice-select .list {
    z-index: 999;
    min-width: 120px;
}

/* ── 필드: viewport 기반 높이 — 포메이션/화면 크기 무관하게 일정 ── */
.dual-squad-field {
    display: flex;
    flex-direction: column;
    height: clamp(650px, 65vh, 650px);
    flex-shrink: 0;
    gap: 0;
    min-height: 0;
}

/* ── 일반전/리그전: 단일 필드 (자체전 동일 높이) ── */
.single-sq-wrapper .dual-squad-field {
    height: clamp(450px, 45vh, 450px);
}
.single-sq-wrapper .dual-sq-half {
    flex: 0 0 100%;
	background-position:bottom;
}

.dual-sq-half {
    flex: 0 0 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 8px 6px 4px;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: background .2s;
    border: 0px solid #ffffff;
    border-radius: 10px;
    

}

.dual-sq-half--a{background: url(/img/field_full.jpg) no-repeat center top / cover; margin-bottom: 5px; padding-bottom: 20px;}
.dual-sq-half--b{background: url(/img/field_full.jpg) no-repeat center bottom / cover; margin-top: 5px; padding-bottom: 20px;}


/* position-row: 행 수와 무관하게 flex로 균등 분할 */
.dual-sq-half .position-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 3px;
    flex: 1;          /* 행들이 half 높이를 균등하게 채움 */
    min-height: 0;
}

/* ── position 카드: height 고정값 제거, flex로 채움 ── */
.dual-sq-half .position {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 60px;
	height: 60px;
	max-width:50px;
	max-height:50px;

    flex: 1;
    
    border-radius: 50%;
    cursor: pointer;
    transition: transform .1s, background .12s;
    padding: 5px;
    box-sizing: border-box;
    /* 빈 포지션 */
    background: rgba(255,255,255,.20);
    border: 1px dashed rgba(255,255,255,.70);
}
.dual-sq-half .position:hover {
    background: rgba(255,255,255,.26);
    border-color: rgba(255,255,255,.65);
    transform: scale(1.04);
}
.dual-sq-half .position:active { transform: scale(.92); }

/* ── 배치된 포지션 카드 ── */
.dual-sq-half .position.filled {
    background: #fff;
    border: none;
    box-shadow: 0 3px 12px rgba(0,0,0,.28);
	position: relative;
}
.dual-sq-half .position.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 16px rgba(0,0,0,.34);
}

/* 포지션 라벨 */
.dual-sq-half .position .position-label {
    font-size: 8px;
    color: rgba(255,255,255, 1);
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.1;
    flex-shrink: 0;
    text-transform: uppercase;
}
.dual-sq-half .position.filled .position-label { color: #9ca3af; }

/* position-player 영역 */
.dual-sq-half .position .position-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    gap: 1px;
}

/* 빈 포지션: + 아이콘 */
.dual-sq-half .position:not(.filled) .position-player::before {
    content: '+';
    font-size: 15px;
    font-weight: 300;
    color: rgba(255,255,255,.5);
    line-height: 1;
}

/* ── 배치 선수: 번호 원 + 이름 ── */
.dual-sq-half .position .sq-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
	padding: 2px 5px;
    border-radius: 2px;
    background: #16a34a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}
.dual-sq-half .position .sq-name {
    font-size: 12px;
    color: #111827;
    font-weight: 700;
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* ── 플레이어 리스트 팀 배지 ── */
.quarter-badge.sq-team-a-badge { background: #dbeafe; color: #1d4ed8; font-weight: 800; }
.quarter-badge.sq-team-b-badge { background: #ffedd5; color: #c2410c; font-weight: 800; }
.player-item.sq-team-a .player-number { background: #3b82f6 !important; }
.player-item.sq-team-b .player-number { background: #f97316 !important; }

/* ── 모달: 상대팀 섹션 ── */
.other-team-section .section-header h4 { color: #9ca3af; }
.other-team-title-badge { background: #f3f4f6; color: #6b7280; padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.other-team-item { opacity: .5; cursor: not-allowed !important; }
.other-team-item:hover { background: transparent !important; }
.other-team-badge { background: #fee2e2; color: #dc2626; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; display: inline-block; }

.team-qty{margin: 10px 0;}
.teams-info{display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 10px;}
.add-team-txt ul {display: flex; gap:10px}
.add-team-txt ul li{}
.add-team-txt ul li:first-child span:before{content:''}
.add-team-txt ul li span:before{content:"/"}
.teams-info .add-btn{display: flex; gap:5px}
.teams-info .add-btn a{display: flex; align-items: center; line-height: 25px; padding: 0 10px; background: #333; color: #fff; border-radius:3px; gap:5px}
.teams-info .add-btn a span{font-size: 15px;}

/* ══════════════════════════════════════
   psel-* : 선수 선택 모달 (탭 + 컴팩트 리스트)
   ══════════════════════════════════════ */

/* 모달 오버레이는 기존 .modal-overlay 재사용 */
.psel-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 420px;
    max-height: 82vh;
	min-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
    overflow: hidden;
}

/* 헤더 */
.psel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.psel-pos-label {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    letter-spacing: .5px;
}
.psel-header-btns { display: flex; align-items: center; gap: 8px; }
.psel-btn-clear {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.psel-btn-clear:hover { background: #eff6ff; }
.psel-btn-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.psel-btn-close:hover { background: #f3f4f6; }

/* 탭 바 */
.psel-tabs {
    display: flex;
    padding: 10px 14px 0;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}
.psel-tab {
    flex: 1;
    padding: 7px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.psel-tab:hover { color: #374151; }
.psel-tab.active { color: #16a34a; border-bottom-color: #16a34a; }
.psel-tab--other.active { color: #dc2626; border-bottom-color: #dc2626; }
.psel-tab-cnt {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 10px;
    padding: 0 6px;
    margin-left: 2px;
    min-width: 18px;
    text-align: center;
}
.psel-tab.active .psel-tab-cnt { background: #dcfce7; color: #15803d; }
.psel-tab--other.active .psel-tab-cnt { background: #fee2e2; color: #dc2626; }

/* 탭 패널 */
.psel-body {
    flex: 1;
    overflow: auto;
    position: relative;
}
.psel-pane {
    display: none;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0 16px;
}
.psel-pane.active { display: block; }

/* ===== 출전 통계 ===== */
.sq-stats-wrap {
    margin: 12px 0 0;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 16px 18px 18px;
}
.sq-stats-wrap .sv-section-label { font-size: 14px; font-weight: 700; color: #111827; }
.sq-stats-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 12px; }
.sq-stats-tbl {
    width: 100%;
    min-width: 300px;
    border-collapse: collapse;
    font-size: 13px;
}
.sq-stats-tbl thead th {
    background: #F5F6F8;
    color: #6B7280;
    font-weight: 600;
    font-size: 12px;
    padding: 7px 8px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}
.sq-stats-tbl thead th.sq-stats-player-col { text-align: left; padding-left: 10px; }
.sq-stats-tbl tbody tr { border-bottom: 1px solid #F3F4F6; }
.sq-stats-tbl tbody tr:last-child { border-bottom: none; }
.sq-stats-tbl tbody tr:hover { background: #F9FAFB; }
.sq-stats-name {
    padding: 9px 8px 9px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.sq-stats-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: #E5E7EB;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}
.sq-stats-name-text { color: #111827; font-weight: 500; }
.sq-stats-cell {
    text-align: center;
    padding: 6px 4px;
    vertical-align: middle;
}
.sq-stats-cell--on .material-symbols-outlined {
    font-size: 18px;
    color: #16A34A;
}
.sq-stats-cell--off { color: #D1D5DB; font-size: 14px; }
.sq-stats-cell--self { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sq-stats-team-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.sq-stats-team-badge--A { background: #16A34A; }
.sq-stats-team-badge--B { background: #3B82F6; }
.sq-stats-total {
    text-align: center;
    padding: 6px 10px 6px 4px;
    font-weight: 700;
    font-size: 13px;
    color: #111827;
    white-space: nowrap;
}
.sq-stats-total .sq-stats-denom { color: #9CA3AF; font-weight: 400; font-size: 11px; }
.sq-stats-empty {
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
    padding: 16px 0;
}
.psel-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    padding: 32px 16px;
}

/* 컴팩트 리스트 */
.psel-list {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}
.psel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background .12s;
    border: 1px solid transparent;
}
.psel-item:hover { background: #f0fdf4; border-color: #bbf7d0; }
.psel-item.selected {
    background: #dcfce7;
    border-color: #86efac;
}
.psel-item.disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* 번호 원형 배지 */
.psel-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.psel-item.selected .psel-num { background: #16a34a; }

/* 이름 */
.psel-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 오른쪽 뱃지 영역 */
.psel-badge-wrap { flex-shrink: 0; }
.psel-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.psel-badge--guest  { background: #f3f4f6; color: #6b7280; }
.psel-badge--current{ background: #dcfce7; color: #15803d; }
.psel-badge--pos    { background: #dbeafe; color: #1d4ed8; }
.psel-badge--other  { background: #fee2e2; color: #dc2626; }

.team-add .player{display: flex; background: #fff; margin: 5px 0; justify-content: space-between; padding: 10px; align-items: center}
.team-add .player .form_div ul{display: flex; gap:10px}
.team-add .player .form_div ul li > div{background: #fff; padding: 5px 10px; }
.team-add .player i{display: inline-block; line-height: 20px; padding: 0 5px; background: #000; border-radius:3px; color: #fff; text-align: center; width: 25px;}
#result_area .btn-box{text-align: center; margin-top: 20px;}
#result_area .btn-box button{background: #fff; color: #000; border: 0; line-height: 30px; padding: 0 10px; border-radius:5px;}


.team-box .team{border: 1px solid #e1e1e1; border-radius:15px; padding: 15px; margin: 20px 0; background: #fff;}
.team-box .team  h2{font-size: 17px;}
.team-box .team .player {display: grid;grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));gap: 1vw; 
background: #fff;margin: 5px 0;justify-content: space-between;padding: 10px;align-items: center;}
.team-box .team .player li{border: 1px solid #e1e1e1; border-radius:5px; padding: 10px; }
.team-box .team .player li span{display: block; width: 16px; line-height: 16px; background: #000; color: #fff; text-align: center; border-radius:3px; font-size: 10px;}
.team-box .team .player li p{margin-top: 5px; font-size: 14px;}



/* 경기 요약 */
.result-header-card {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    border-radius: 20px; padding: 24px 20px 20px;
    margin-bottom: 12px; color: #fff;
    box-shadow: 0 6px 20px rgba(22,163,74,0.25);
	margin: 0 16px 30px;
}
.result-header-meta { font-size: 12px; opacity: 0.8; margin-bottom: 6px; }
.result-header-name { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.result-score-main {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    margin-bottom: 8px;
}
.result-score-team { font-size: 13px; opacity: 0.85; }
.result-score-num  { font-size: 44px; font-weight: 900; line-height: 1; }
.result-score-sep  { font-size: 24px; opacity: 0.5; font-weight: 300; }
.result-badge {
    display: inline-block; padding: 4px 16px;
    border-radius: 20px; font-size: 13px; font-weight: 700;
    background: rgba(255,255,255,0.25); margin-bottom: 14px;
}

/* 쿼터 테이블 */
.quarter-table {
    background: rgba(255,255,255,0.15); border-radius: 10px;
    overflow: hidden;
}
.qt-row { display: flex; }
.qt-row + .qt-row { border-top: 1px solid rgba(255,255,255,0.15); }
.qt-head { background: rgba(0,0,0,0.1); }
.qt-cell {
    flex: 1; text-align: center; padding: 7px 4px;
    font-size: 13px; font-weight: 600;
}
.qt-cell:first-child { flex: 0 0 52px; text-align: left; padding-left: 10px; font-size: 12px; opacity: 0.8; }
.qt-cell.hl { font-weight: 800; background: rgba(255,255,255,0.1); }

/* 섹션 카드 */
.result-section {
    background: #fff; padding: 16px;
    
}
.result-section-title {
    font-size: 15px; font-weight: 700; color: #111827;
    margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
	justify-content: space-between;
}

/* 경기 기록 */
.record-list { display: flex; flex-direction: column; gap: 6px; }
.record-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #EEF0F3; }
.record-item:last-child { border-bottom: none; }
.record-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.record-icon.goal   { background: #DCFCE7; }
.record-icon.assist { background: #DBEAFE; }
.record-icon.yellow { background: #FEF3C7; }
.record-icon.red    { background: #FEE2E2; }
.record-name { flex: 1; font-size: 14px; font-weight: 600; color: #111827; }
.record-min  { font-size: 12px; color: #9CA3AF; }

.no-result { padding: 40px 20px; text-align: center; }
.no-result .icon { font-size: 40px; margin-bottom: 12px; }
.no-result p { font-size: 14px; color: #9CA3AF; }

/* 득점 타임라인 */
.goal-timeline {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
}
.goal-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(255,255,255,0.95);
    padding: 2px 0;
}
.goal-ball { font-size: 14px; flex-shrink: 0; }
.goal-ball span{font-size: 16px;}
.goal-name { flex: 1; font-weight: 600; }
.goal-min  { font-size: 12px; opacity: 0.75; white-space: nowrap; }
.goal-team-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}
.goal-team-badge--a {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.goal-team-badge--b {
    background: rgba(239,68,68,0.35);
    color: #fecaca;
}
.sv-past-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
    background: #F3F4F6;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
.sv-past-notice .material-symbols-outlined {
    font-size: 16px;
}
.sv-past-disabled .main_btn,
.sv-past-disabled .sub-btn {
    opacity: 0.38;
    pointer-events: none;
    cursor: not-allowed;
}












/* ═══════════════════════════════════════════
   match_record.php 전용 스타일
   ═══════════════════════════════════════════ */

/* ── 일정 카드 오버라이드 ── */
.mr-schedule-card { margin-bottom: 0; }

/* ── 쿼터 내비게이션 ── */
.quarter-navigation {margin: 20px 0 10px;}

/* ════ 스코어보드 (클린 화이트 카드) ════ */
.mr-scoreboard {
    background: #fff;
    display: flex; flex-direction: column; 
}

/* 팀 행 */
.mr-sb-teams {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
}
.mr-sb-team {
    display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 0;
	flex-direction: column
}
.mr-sb-logo {
    width: 100%;
    max-width: 80px !important; flex-shrink: 0;
    object-fit: cover;
}
.mr-sb-name {
    font-size: 13px; font-weight: 700; color: #374151;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mr-sb-vs {
    font-size: 11px; font-weight: 800; color: #9ca3af;
    flex-shrink: 0;
}

/* 스코어 행 */
.mr-sb-score-row {
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.mr-sb-score-block {
    display: flex; align-items: center; gap: 8px;
}
.mr-sb-score {
    font-size: 52px; font-weight: 900; color: #111827;
    line-height: 1; letter-spacing: -2px;
    min-width: 42px; text-align: center;
}
.mr-sb-sep {
    font-size: 28px; font-weight: 300; color: #d1d5db;
    line-height: 1;
}
.mr-sb-btns {
    display: flex; flex-direction: column; gap: 3px;
}
.mr-sb-btn {
    width: 26px; height: 26px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    border-radius: 7px;
    font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .12s, border-color .12s;
}
.mr-sb-btn--plus:active  { background: #dcfce7; border-color: #86efac; color: #16a34a; }
.mr-sb-btn--minus:active { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.mr-sb-btn.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* 상태/타이머 행 */
.mr-sb-meta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 10px;
}
.mr-sb-quarter {
    font-size: 11px; font-weight: 700; color: #6b7280;
    background: #f3f4f6; border-radius: 6px; padding: 2px 8px;
}
.mr-sb-timer {
    font-size: 15px; font-weight: 800; color: #111827;
    font-variant-numeric: tabular-nums; letter-spacing: 1px;
}
.mr-sb-status {
    font-size: 11px; font-weight: 700;
    padding: 2px 9px; border-radius: 20px;
}
.mr-sb-status--ready    { background: #f3f4f6; color: #6b7280; }
.mr-sb-status--playing  { background: #dcfce7; color: #16a34a; }
.mr-sb-status--finished { background: #fee2e2; color: #dc2626; }

.mr-live-notice {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* 컨트롤 버튼 행 */
.mr-sb-controls {
	display: flex;
	gap:8px;
}
.mr-sb-ctrl {width: 100%;
	border: 1px solid #E1E1E1; background: #fff; 
	font-size: 15px;
	color: #6B7280; display: flex; 
	height: 50px; border-radius:10px;
    align-items: center;
    justify-content: center;
	gap:5px; flex:0.5;
}

#mr_status_btns{flex:1; display: flex; gap:10px}



.mr-sb-ctrl .material-symbols-outlined {font-size: 20px;}
.mr-sb-ctrl--squad  { background: #f3f4f6; color: #374151; border: 1.5px solid #e5e7eb; }
.mr-sb-ctrl--start  { background: #16a34a; color: #fff; border: 0; flex:1;}
.mr-sb-ctrl--end    { background: #ef4444; color: #fff; border: 0; flex:1;}
.mr-sb-ctrl--pause  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.mr-sb-ctrl--resume { background: #16a34a; color: #fff; }
.mr-sb-ctrl--next   { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.mr-sb-ctrl--reset  { }
.mr-sb-ctrl:active  { opacity: .82; }

/* ════ 섹션 공통 ════ */
.mr-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin: 10px 0;
}
.mr-section-hd {
    display: flex; align-items: center; gap: 8px;
    padding: 13px 16px 11px;
    border-bottom: 1px solid #f3f4f6;
}
.mr-section-hd > .material-symbols-outlined {
    font-size: 18px; color: #16a34a;
}
.mr-section-hd > span:nth-child(2) {
    font-size: 14px; font-weight: 800; color: #111827; flex: 1;
}
.mr-section-badge {
    font-size: 11px; font-weight: 700;
    background: #f0fdf4; color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 20px; padding: 2px 9px;
}

/* ── 라인업 필드 ── */
.mr-section .soccer-field,
.mr-section .futsal-field {
    background: url('/img/field.jpg') no-repeat center center / cover;
    padding: 14px 10px;
    border-radius: 0;
    min-height: 360px;
    display: flex; flex-direction: column; justify-content: space-around;
}
.soccer-field .position-row { display: flex; justify-content: space-around; align-items: center; }
.soccer-field .position-row .position {
    text-align: center; background: #fff; padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    min-width: 62px; max-width: min-content;
    cursor: pointer; transition: transform .1s;
}
.soccer-field .position-row .position:active { transform: scale(.95); }
.soccer-field .position-row .position .position-label { font-size: 10px; color: #6b7280; font-weight: 700; }
.soccer-field .position-row .position .number,
.soccer-field .position-row .position .player-number {
    background: #16a34a; color: #fff;
    padding: 1px 3px; border-radius: 4px;
    font-size: 10px; width: 18px; display: block; margin: 2px auto;
    text-align: center;
}
.position.red-card { opacity: .6; outline: 2px solid #ef4444; }
.position.substituted-in { outline: 2px solid #16a34a; }

/* 선수 아이콘 */
.player-icons { 
	text-align: center; margin-top: 2px; display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 1px;
	position: absolute;
    right: auto;
    bottom: -10px;
}
.player-icons .icon { font-size: 11px; margin: 0; line-height: 1; }
.icon-text-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; padding: 1px 3px; font-size: 10px; font-weight: 800; }
.icon-text-badge.icon-assist { background: #3b82f6; color: #fff; }
.icon-swap { font-size: 14px !important; color: #fff; background: #16a34a; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; }
.icon-ball{ font-size: 14px !important; color: #fff; background: #000; padding: 1px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; }
/* 경고 2장 퇴장 구분 */
.position.double-yellow-red { outline: 2px solid #f59e0b; opacity: .65; }
.position.double-yellow-red .icon.auto-red { font-size: 10px; }

/* ── 교체 섹션 ── */
.mr-sub-section { display: block; }
.mr-sub-list {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px;
}
.substituted-player {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 10px; padding: 8px 12px;
    display: flex; flex-direction: column; gap: 4px;
    min-width: 140px; opacity: .85;
}
.substituted-player .player-info {
    display: flex; align-items: center; gap: 6px;
}
.substituted-player .player-number {
    background: #6b7280; color: #fff;
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
}
.substituted-player .player-name { font-size: 13px; font-weight: 700; }
.substituted-player .position-label { font-size: 11px; color: #9ca3af; }
.substituted-player .substitution-info { font-size: 11px; color: #6b7280; line-height: 1.5; }
.substituted-player .substitution-arrow { color: #ef4444; font-weight: 800; }

/* ── 벤치 ── */
.mr-bench-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px;
}
.mr-bench-player {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px;
    background: #f9fafb; border: 1.5px solid #e5e7eb;
    border-radius: 12px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.mr-bench-player:active { background: #f0fdf4; border-color: #86efac; }
.mr-bench-player.is-disabled {
    opacity: .65;
    cursor: default;
}
.mr-bench-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: #16a34a; color: #fff;
    border-radius: 6px; font-size: 11px; font-weight: 800;
    flex-shrink: 0;
}
.mr-bench-name { font-size: 14px; font-weight: 700; color: #111827; }

/* ── 경기 기록 ── */
.record-list { min-height: 40px; }
#record_item_area { }
.record-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    gap: 8px;
}
.record-item:last-child { border-bottom: none; }
.record-content { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 경기 기록 선수 정보: 등번호 + 이름 */
.record-player { display: inline-flex; align-items: center; gap: 5px; }
.record-player-num {
    font-size: 11px; font-weight: 800; color: #fff;
    background: #374151; border-radius: 4px;
    padding: 1px 5px; min-width: 18px; text-align: center;
}
.record-player-name { font-weight: 700; font-size: 13px; color: #111827; }
/* 구버전 호환 */
.player-name { font-weight: 700; font-size: 14px; color: #111827; }
.action-type {
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}
.record-item.goal   .action-type { background: #dcfce7; color: #16a34a; }
.record-item.assist .action-type { background: #dbeafe; color: #2563eb; }
.record-item.yellow .action-type { background: #fef9c3; color: #a16207; }
.record-item.red    .action-type { background: #fee2e2; color: #dc2626; }
.record-item.sub_in .action-type,
.record-item.sub_out .action-type { background: #f3f4f6; color: #6b7280; }
.related-player { font-size: 12px; color: #6b7280; }
.minute { font-size: 12px; color: #9ca3af; }
.record-time { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.record-actions { display: flex; align-items: center; gap: 6px; }
.delete-record-btn {
    width: 22px; height: 22px; border-radius: 50%;
    background: #fee2e2; color: #dc2626;
    border: none; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.delete-record-btn:active { background: #fca5a5; }
.no-records {
    text-align: center; padding: 24px; color: #9ca3af;
    font-size: 14px;
}



/* ════ 모달 (액션 + 교체) ════ */
/* jQuery fadeIn() → display:block 으로 바뀌므로 overlay는 position만 사용 */
.mr-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.55);
    z-index: 3000;
}
.mr-modal-sheet {
    position: fixed; bottom: 60px; left: 0; right: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 16px);
    box-shadow: 0 -8px 40px rgba(15,23,42,.18);
    max-height: 85vh; overflow-y: auto;
}
.mr-modal-handle {
    width: 40px; height: 4px;
    background: #e5e7eb; border-radius: 4px;
    margin: 12px auto 0;
}
.mr-modal-hd {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #f3f4f6;
}
.mr-modal-hd > .material-symbols-outlined { font-size: 20px; color: #16a34a; }
.mr-modal-title { flex: 1; font-size: 16px; font-weight: 800; color: #111827; }
.mr-modal-close {
    width: 32px; height: 32px;
    background: #f3f4f6; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #6b7280;
}
.mr-modal-close .material-symbols-outlined { font-size: 18px; }

/* 액션 버튼 그리드 */
.mr-action-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px; padding: 16px;
}
.mr-action-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 16px 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff; border-radius: 14px;
    font-size: 13px; font-weight: 700; color: #374151;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.mr-action-btn .material-symbols-outlined { font-size: 24px; }
.mr-action-btn:active { background: #f9fafb; }

/* sub 버튼은 2열 span */
.mr-action--sub { grid-column: 1 / -1; flex-direction: row; padding: 13px 16px; }
.mr-action--sub .material-symbols-outlined { font-size: 20px; }

/* 각 버튼 색상 */
.mr-action--goal   { border-color: #bbf7d0; }
.mr-action--goal   .material-symbols-outlined { color: #16a34a; }
.mr-action--goal:active { background: #f0fdf4; }

.mr-action--assist { border-color: #bfdbfe; }
.mr-action--assist .material-symbols-outlined { color: #3b82f6; }
.mr-action--assist:active { background: #eff6ff; }

.mr-action--yellow { border-color: #fde68a; }
.mr-action--yellow .material-symbols-outlined { color: #d97706; }
.mr-action--yellow:active { background: #fffbeb; }

.mr-action--red    { border-color: #fecaca; }
.mr-action--red    .material-symbols-outlined { color: #ef4444; }
.mr-action--red:active { background: #fef2f2; }

.mr-action--sub    { border-color: #e0e7ff; }
.mr-action--sub    .material-symbols-outlined { color: #6366f1; }
.mr-action--sub:active { background: #eef2ff; }

/* 교체 모달 추가 */
.mr-sub-info {
    display: flex; flex-direction: column; gap: 8px;
    margin: 14px 16px;
    background: #f9fafb; border-radius: 12px; padding: 12px 14px;
}
.mr-sub-out-row, .mr-sub-in-row {
    display: flex; align-items: center; gap: 10px;
}
.mr-sub-label {
    font-size: 11px; font-weight: 800;
    padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.mr-sub-label--out { background: #fee2e2; color: #dc2626; }
.mr-sub-label--in  { background: #dcfce7; color: #16a34a; }
.mr-sub-player { font-size: 14px; font-weight: 700; color: #111827; }
.mr-sub-player--hint { font-size: 13px; color: #9ca3af; font-weight: 400; }

.mr-sub-bench-wrap { padding: 0 16px 12px; }
.mr-sub-bench-label { font-size: 12px; font-weight: 700; color: #6b7280; margin-bottom: 8px; }
.mr-sub-bench-list { display: flex; flex-direction: column; gap: 4px; }

/* 교체 선수 아이템 (JS generateSubstitutionBenchList에서 생성) */
.substitution-player-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.substitution-player-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: #f9fafb; border: 1.5px solid #e5e7eb;
    border-radius: 12px; cursor: pointer;
    transition: background .15s;
}
.substitution-player-item:active { background: #f0fdf4; border-color: #86efac; }
.substitution-player-item .player-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: #16a34a; color: #fff;
    border-radius: 6px; font-size: 11px; font-weight: 800;
}
.substitution-player-item .player-name { font-size: 14px; font-weight: 700; color: #111827; }

.mr-modal-footer {
    padding: 8px 16px 16px;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
}
.mr-modal-cancel {
    width: 100%; height: 44px;
    background: #f3f4f6; border: none; border-radius: 12px;
    font-size: 14px; font-weight: 700; color: #6b7280;
    cursor: pointer;
}
.mr-modal-cancel:active { background: #e5e7eb; }

/* ════ 자체전 전체 필드 — squad.php와 동일한 구조 사용 ════
   .dual-squad-wrapper / .dsc-controls / .dual-squad-field / .dual-sq-half
   → style.css(squad)가 이미 로드됨, 여기서는 경기기록 전용 오버라이드만 추가
   ══════════════════════════════════════════════════════════ */

/* 포메이션 라벨 (select 대신 텍스트 표시) */
.dsc-formation-label {
    font-size: 11px; font-weight: 700;
    color: #374151;
    padding: 3px 8px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    line-height: 1.5;
}
.dsc-team--a .dsc-formation-label { border-color: #bfdbfe; }
.dsc-team--b .dsc-formation-label { border-color: #fed7aa; }

/* 경기기록 전용: 포지션 카드 클릭 가능 + 상태 표시 */
.dual-sq-half .position {
    cursor: pointer;
    transition: transform .1s;
}
.dual-sq-half .position:active { transform: scale(.93); }

/* 선수 정보 레이아웃 */
.dual-sq-half .position .position-label {
    font-size: 9px; color: rgba(255,255,255,.7); font-weight: 700;
    line-height: 1.2;
}
.dual-sq-half .position.filled .position-label {
    color: #6b7280;
}
.dual-sq-half .position .position-player {
    display: flex; flex-direction: column; align-items: center;
}
.dual-sq-half .position .number {
    background: #16a34a; color: #fff;
    padding: 1px 3px; border-radius: 4px;
    font-size: 9px; min-width: 16px; display: block;
    margin: 2px auto; text-align: center;
}
.dual-sq-half .position .name {
    font-size: 9px; color: #374151; font-weight: 600;
    max-width: 50px;
    text-overflow: ellipsis; white-space: nowrap;
    text-align: center;
}

/* 경기 상태 오버라이드 */
.dual-sq-half .position.red-card         { opacity: .6; outline: 2px solid #ef4444; }
.dual-sq-half .position.substituted-in   { outline: 2px solid #16a34a; }
.dual-sq-half .position.double-yellow-red { outline: 2px solid #f59e0b; opacity: .65; }

/* ════ 모바일 반응형 ════ */
@media (max-width: 480px) {
    .mr-scoreboard {}
    .mr-score { font-size: 42px; }
    .mr-team-logo { width: 44px; height: 44px; }
    .mr-ctrl-btn { height: 30px; padding: 0 10px; font-size: 12px; }
    .mr-section-hd { padding: 11px 14px 9px; }
    .mr-bench-grid { padding: 10px 12px; }
    .mr-action-btn { padding: 13px 8px; font-size: 12px; }
}






/* 라운드 */
.fres-round-item { border:1px solid #EEF0F3; border-radius:12px; overflow:hidden; margin-bottom:10px; }
.fres-round-item:last-child { margin-bottom:0; }
.fres-round-head { display:flex; align-items:center; background:#F9FAFB; padding:10px 14px; gap:8px; }
.fres-round-num { font-size:12px; font-weight:700; color:#9CA3AF; }
.fres-round-teams { font-size:14px; font-weight:700; color:#111827; flex:1; }
.fres-round-score { font-size:18px; font-weight:800; color:#16A34A; }
.fres-round-status { font-size:11px; font-weight:600; border-radius:8px; padding:2px 8px; background:#F3F4F6; color:#6B7280; }
.fres-round-records { padding:8px 14px; display:flex; flex-direction:column; gap:4px; }
.fres-round-rec { display:flex; align-items:center; gap:6px; font-size:13px; color:#374151; padding:3px 0; }
.fres-round-rec .material-symbols-outlined { font-size:14px; }
.fres-round-rec.goal .material-symbols-outlined { color:#16A34A; }
.fres-round-rec.assist .material-symbols-outlined { color:#3B82F6; }
.fres-round-rec.yellow .material-symbols-outlined { color:#CA8A04; }
.fres-round-rec.red .material-symbols-outlined { color:#EF4444; }
.fres-rec-team { background:#F3F4F6; border-radius:4px; padding:1px 6px; font-size:10px; font-weight:700; }
.fres-rec-min { margin-left:auto; font-size:11px; color:#9CA3AF; }
.fres-round-empty { font-size:12px; color:#9CA3AF; padding:8px 14px; }

/* 선수 기록 테이블 */
.fres-stats-table { width:100%; border-collapse:collapse; }
.fres-stats-table th { padding:8px 6px; font-size:11px; font-weight:700; color:#9CA3AF; text-align:center; border-bottom:2px solid #EEF0F3; background:#F9FAFB; }
.fres-stats-table th:first-child { text-align:left; padding-left:4px; }
.fres-stats-table td { padding:10px 6px; text-align:center; border-bottom:1px solid #EEF0F3; font-size:13px; color:#374151; }
.fres-stats-table td:first-child { text-align:left; padding-left:4px; }
.fres-stats-table tr:last-child td { border-bottom:none; }
.fres-player-name { font-weight:700; color:#111827; font-size:14px; }
.fres-player-team { display:inline-block; width:20px; height:20px; border-radius:50%; font-size:11px; font-weight:800; color:#fff; text-align:center; line-height:20px; margin-right:6px; }
.fres-stat-goal { color:#16A34A; font-weight:800; font-size:15px; }
.fres-stat-assist { color:#3B82F6; font-weight:700; }
.fres-stat-yellow { color:#CA8A04; font-weight:700; }
.fres-stat-red { color:#DC2626; font-weight:700; }
.fres-stat-zero { color:#D1D5DB; }

/* ── 평가 폼 ── */
.fres-eval-deadline {font-size: 13px; font-weight: 400;}
.fres-eval-deadline b {}
.fres-eval-group { margin-bottom:22px; }
.fres-eval-group-title {
    font-size:13px; font-weight:700; color:#374151;
    margin-bottom:10px; display:flex; align-items:center; gap:6px;
}
.fres-badge-req { background:#FEE2E2; color:#DC2626; border-radius:6px; padding:2px 7px; font-size:10px; font-weight:700; }
.fres-badge-opt { background:#F3F4F6; color:#9CA3AF; border-radius:6px; padding:2px 7px; font-size:10px; font-weight:700; }

/* MVP 선택 그리드 */
.fres-mvp-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.fres-mvp-card {
    display:flex; flex-direction:column; align-items:center;
    padding:12px 6px; border-radius:12px; border:2px solid #E5E7EB;
    background:#fff; cursor:pointer; text-align:center; position:relative;
    transition:border-color .15s, background .15s;
}
.fres-mvp-card.is-selected { border-color:#16A34A; background:#F0FDF4; }
.fres-mvp-card.is-selected::after { content:'✓'; position:absolute; top:5px; right:8px; color:#16A34A; font-size:11px; font-weight:800; }
.fres-mvp-avatar { width:42px; height:42px; border-radius:50%; background:#F3F4F6; display:flex; align-items:center; justify-content:center; font-size:18px; color:#9CA3AF; margin-bottom:6px; }
.fres-mvp-nm { font-size:12px; font-weight:700; color:#111827; word-break:break-all; }

/* 선수별 별점 + 태그 */
.fres-player-eval-list { display:flex; flex-direction:column; gap:10px; }
.fres-player-eval-row { background:#F9FAFB; border-radius:12px; padding:12px; }
.fres-player-eval-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.fres-player-eval-name { font-size:14px; font-weight:700; color:#111827; }
.fres-star-input { display:flex; gap:4px; }
.fres-star-btn { font-size:22px; color:#D1D5DB; cursor:pointer; line-height:1; transition:color .1s; }
.fres-star-btn.is-filled { color:#F59E0B; }
.fres-player-eval-row.is-unrated { border:1.5px solid #FCA5A5; background:#FFF5F5; animation:fres-shake .3s ease; }
@keyframes fres-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.fres-tag-list { display:flex; flex-wrap:wrap; gap:6px; }
.fres-tag-chip {
    padding:5px 10px; border-radius:20px; font-size:12px; font-weight:600;
    background:#fff; border:1.5px solid #E5E7EB; color:#374151;
    cursor:pointer; transition:all .15s; user-select:none;
}
.fres-tag-chip.is-selected { background:#DCFCE7; border-color:#86EFAC; color:#15803D; }

/* 제출 버튼 */
.fres-eval-submit {
    width:100%; padding:15px; border-radius:14px; margin-top:6px;
    background:#16A34A; border:none; color:#fff;
    font-size:16px; font-weight:700; cursor:pointer;
}
.fres-eval-submit:disabled { background:#D1D5DB; cursor:not-allowed; }

/* ── 평가 결과 ── */
.fres-eval-done-badge { display:inline-flex; align-items:center; gap:4px; background:#F0FDF4; color:#16A34A; border-radius:8px; padding:6px 12px; font-size:12px; font-weight:600; margin-bottom:14px; }

/* MVP 내 선택 뱃지 */
.fres-my-pick-badge { text-align:center; background:#fff; border:1.5px solid #86EFAC; border-radius:10px; padding:6px 10px; font-size:11px; color:#6B7280; line-height:1.4; flex-shrink:0; }
.fres-my-pick-badge b { display:block; font-size:13px; font-weight:800; color:#15803D; }

/* 인라인 내 평가 */
.fres-my-inline-rating { display:flex; align-items:center; flex-wrap:wrap; gap:5px; padding:5px 0 5px 30px; }
.fres-my-inline-label { font-size:11px; font-weight:700; color:#9CA3AF; background:#F3F4F6; border-radius:6px; padding:2px 7px; flex-shrink:0; }
.fres-my-inline-stars { font-size:14px; display:flex; gap:1px; }
.fres-my-tag { background:#E0F2FE; color:#0369A1; border-radius:20px; padding:2px 9px; font-size:11px; font-weight:600; }

/* MVP 결과 카드 */
.fres-mvp-result-card {
    display:flex; align-items:center; gap:14px;
    background:linear-gradient(135deg,#F0FDF4,#DCFCE7);
    border:2px solid #86EFAC; border-radius:14px;
    padding:16px; margin-bottom:16px;
}
.fres-mvp-crown { font-size:32px; flex-shrink:0; }
.fres-mvp-result-label { font-size:11px; font-weight:700; color:#16A34A; letter-spacing:.5px; }
.fres-mvp-result-name { font-size:20px; font-weight:800; color:#111827; }
.fres-mvp-result-sub { font-size:12px; color:#6B7280; margin-top:2px; }

/* 별점 랭킹 */
.fres-rating-list { display:flex; flex-direction:column; gap:12px; }
.fres-rating-item { display:flex; flex-direction:column; gap:6px; padding-bottom:12px; border-bottom:1px solid #EEF0F3; }
.fres-rating-item:last-child { border-bottom:none; padding-bottom:0; }
.fres-rating-item-head { display:flex; align-items:center; gap:10px; }
.fres-rating-rank { font-size:14px; font-weight:800; color:#9CA3AF; width:20px; flex-shrink:0; }
.fres-rating-rank.gold { color:#F59E0B; }
.fres-rating-rank.silver { color:#9CA3AF; }
.fres-rating-rank.bronze { color:#BC8D38; }
.fres-rating-name { font-size:14px; font-weight:700; color:#111827; flex:1; }
.fres-stars-display { display:flex; align-items:center; gap:2px; }
.fres-star-filled { color:#F59E0B; font-size:16px; }
.fres-star-empty { color:#E5E7EB; font-size:16px; }
.fres-avg-score { font-size:13px; font-weight:800; color:#111827; margin-left:4px; }
.fres-rate-cnt { font-size:11px; color:#9CA3AF; }
.fres-result-tags { display:flex; flex-wrap:wrap; gap:5px; padding-left:30px; }
.fres-result-tag { display:inline-flex; align-items:center; gap:3px; background:#F0FDF4; color:#15803D; border-radius:20px; padding:3px 10px; font-size:11px; font-weight:600; }
.fres-result-tag b { font-weight:800; }

/* 빈 상태 */
.fres-empty { text-align:center; padding:32px 0; color:#9CA3AF; font-size:14px; }
.fres-empty .material-symbols-outlined { font-size:40px; display:block; margin-bottom:8px; }
.fres-no-eval { text-align:center; color:#9CA3AF; font-size:13px; padding:12px 0; }

/* 하단 버튼 */
.fres-btn-wrap { padding:0 16px; margin-top:4px; display:flex; gap:10px; }
.fres-btn-back { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:14px; border-radius:14px; border:1.5px solid #E5E7EB; background:#fff; color:#374151; font-size:15px; font-weight:600; text-decoration:none; }
.fres-btn-manage { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:14px; border-radius:14px; background:#16A34A; border:none; color:#fff; font-size:15px; font-weight:700; text-decoration:none; }

/* 재평가 버튼 */
.fres-reeval-btn { display:inline-flex; align-items:center; gap:4px; padding:5px 12px; border-radius:8px; border:1.5px solid #E5E7EB; background:#fff; color:#6B7280; font-size:12px; font-weight:600; cursor:pointer; }
.fres-reeval-btn:hover { border-color:#16A34A; color:#16A34A; }

/* 토스트 */
.fres-toast { position:fixed; bottom:80px; left:50%; transform:translateX(-50%) translateY(20px); background:#1F2937; color:#fff; border-radius:10px; padding:10px 20px; font-size:13px; font-weight:600; opacity:0; transition:all .25s; z-index:9999; white-space:nowrap; }
.fres-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }


/* ===== 평가 알림 배너 ===== */
.eval-reminder-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #DCFCE7;
    border: 1.5px solid #86EFAC;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0px 16px 30px;
}
.eval-reminder-icon {
    font-size: 24px;
    color: #16A34A;
    flex-shrink: 0;
}
.eval-reminder-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.eval-reminder-title {
    font-size: 14px;
    font-weight: 700;
    color: #15803D;
    line-height: 1.3;
}
.eval-reminder-desc {
    font-size: 12px;
    color: #16A34A;
    line-height: 1.3;
}
.eval-reminder-btn {
    flex-shrink: 0;
    background: #16A34A;
    color: #fff !important;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.eval-reminder-btn:hover { background: #15803D; }


/* ===== 전체 경기 종료 모달 ===== */
.mr-modal-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto !important;
    right: auto;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 340px;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    max-height: 90vh;
}
.mr-aqd-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #DCFCE7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.mr-aqd-icon { font-size: 34px; color: #16A34A; }
.mr-aqd-title { font-size: 20px; font-weight: 800; color: #111827; margin-bottom: 10px; }
.mr-aqd-desc { font-size: 14px; color: #6B7280; line-height: 1.6; margin-bottom: 24px; }
.mr-aqd-actions { display: flex; flex-direction: column; gap: 10px; }
.mr-aqd-btn-eval {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #16A34A;
    color: #fff !important;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.mr-aqd-btn-eval:hover { background: #15803D; color: #fff !important; }
.mr-aqd-btn-close {
    width: 100%;
    background: transparent;
    border: 1.5px solid #E5E7EB;
    color: #6B7280;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mr-aqd-btn-close:hover { border-color: #9CA3AF; color: #374151; }












