/* ==========================================================================
   우리파주 배드민턴 클럽 - 파주 12구장 스마트 매칭 시스템 스타일시트
   극강의 가독성, 큼직한 터치 타겟, 태블릿 3x4 전광판 최적화
   ========================================================================== */

:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-surface: #0b1120;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-soft: rgba(16, 185, 129, 0.16);

  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.16);

  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.16);

  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.16);

  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.16);

  --border-color: rgba(148, 163, 184, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* ==========================================
   글로벌 헤더 & 모드 스위처 (iOS / Toss 다크 스포츠 앱 감성)
   ========================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.brand-logo {
  font-size: 1.55rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.1));
  border: 1.5px solid rgba(16, 185, 129, 0.75);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.brand-text h1 {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.28rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.badge-gym {
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.sync-status {
  font-size: 0.73rem;
  color: #34d399;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 우측 상단 퀵 유틸리티 알약 버튼 (큰글씨 / 매뉴얼) */
.header-quick-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.quick-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: all 0.15s ease;
}

.quick-tool-btn .tool-icon {
  font-size: 0.88rem;
}

.font-scale-btn {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.font-scale-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

.manual-link-btn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

/* 3탭 세그먼트 컨트롤 (내 폰 모드 / 코트 전광판 / 기록·관리) */
.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  background: rgba(2, 6, 23, 0.85);
  padding: 4px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-btn .mode-icon {
  font-size: 0.98rem;
}

.mode-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #022c22;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

/* 📱 스마트폰 (아이폰 16 등 768px 이하) 전용 상단 헤더 최적화 */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 10px;
    gap: 8px;
  }

  .header-top-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .brand-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .brand-text {
    flex: 1;
    min-width: 0;
  }

  .brand-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .brand-title-line h1 {
    font-size: 1.12rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-quick-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
  }

  .quick-tool-btn {
    padding: 7px 2px;
    font-size: 0.74rem;
    font-weight: 800;
    justify-content: center;
    gap: 3px;
    border-radius: 9px;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
  }

  .quick-tool-btn .tool-icon {
    font-size: 0.82rem;
  }

  .mode-switcher {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px;
    border-radius: 12px;
  }

  .mode-btn {
    padding: 9px 4px;
    font-size: 0.86rem;
    gap: 4px;
  }

  .view-section {
    padding: 12px;
  }
}

@media (max-width: 360px) {
  .quick-tool-btn {
    font-size: 0.68rem;
    padding: 6px 1px;
    gap: 1px;
  }
  .quick-tool-btn .tool-icon {
    font-size: 0.76rem;
  }
}

/* 🔍 어르신/노안 배려 왕특대형 글씨 모드 (효도 모드) */
body.large-font-mode {
  font-size: 118%;
}
body.large-font-mode .chosung-btn {
  min-width: 52px;
  height: 52px;
  font-size: 1.3rem;
}
body.large-font-mode .member-pick-name {
  font-size: 1.45rem;
}
body.large-font-mode .traffic-text strong {
  font-size: 1.45rem;
}
body.large-font-mode .traffic-text span {
  font-size: 1.02rem;
}
body.large-font-mode .traffic-btn {
  padding: 22px 18px;
}
body.large-font-mode .roster-name-line {
  font-size: 1.2rem;
}
body.large-font-mode .q-status-btn {
  padding: 9px 11px;
  font-size: 0.92rem;
}

.tablet-chosung-bar {
  margin-bottom: 6px;
}
.tablet-chosung-bar .chosung-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  font-size: 0.9rem;
}

/* 원터치 승리 버튼 */
.btn-instant-win-a {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: 2px solid #93c5fd;
  padding: 14px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-instant-win-b {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  border: 2px solid #fdba74;
  padding: 14px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

/* 황금색 왕버튼 (스마트 명찰 입장) */
.btn-king-action {
  width: 100%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  padding: 16px 14px;
  border-radius: 14px;
  font-size: 1.18rem;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.45);
  border: 2px solid #fef08a;
}

/* ==========================================
   실시간 전체 호명 배너
   ========================================== */
.global-call-banner {
  background: linear-gradient(90deg, #059669, #2563eb);
  color: #fff;
  padding: 12px 18px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  animation: bannerPulse 2s infinite alternate;
}

@keyframes bannerPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.15); }
}

.call-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.call-megaphone {
  font-size: 1.6rem;
}

.call-text {
  flex: 1;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 800;
}

.btn-call-speak {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-call-close {
  font-size: 1.2rem;
  padding: 4px 8px;
  opacity: 0.85;
}

/* ==========================================
   공통 레이아웃 & 카드
   ========================================== */
.app-main {
  flex: 1;
  width: 100%;
}

.view-section {
  display: none;
  padding: 18px;
}

.view-section.active {
  display: block;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

/* 급수 배지 색상 */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}
.grade-A { background: #ef4444; color: #fff; }
.grade-B { background: #f97316; color: #fff; }
.grade-C { background: #3b82f6; color: #fff; }
.grade-D { background: #8b5cf6; color: #fff; }
.grade-E, .grade-초심 { background: #10b981; color: #052e16; }
.grade-unknown { background: #475569; color: #f8fafc; border: 1px dashed #94a3b8; }

.newbie-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

/* ==========================================
   VIEW 1: 📱 내 폰 모드 (극강의 접근성)
   ========================================== */
.mobile-container {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header-large {
  text-align: center;
  margin-bottom: 16px;
}

.step-pill {
  display: inline-block;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.card-header-large h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  font-weight: 900;
  margin-bottom: 4px;
}

.sub-desc {
  color: var(--text-sub);
  font-size: 0.95rem;
}

.chosung-bar {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-bottom: 12px;
}

.chosung-btn {
  min-width: 0;
  height: 38px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-sub);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background 0.12s ease;
}

.chosung-btn:active {
  transform: scale(0.92);
}

.chosung-btn.active {
  background: var(--emerald);
  color: #052e16;
  border-color: var(--emerald);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.chosung-btn.in-sequence {
  border-color: var(--emerald);
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
}

.chosung-back-btn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.search-box-wrap {
  margin-bottom: 14px;
}

.input-large {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.08rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
}

.input-large:focus {
  outline: none;
  border-color: var(--emerald);
}

.member-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 10px;
  max-height: 390px;
  overflow-y: auto;
  padding: 4px 2px;
}

.member-pick-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.12s, border-color 0.12s;
}

.member-pick-btn:hover, .member-pick-btn:active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
}

.member-pick-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.member-pick-meta {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.new-member-cta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.new-member-cta p {
  font-size: 0.92rem;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.btn-outline-large {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 2px dashed var(--emerald);
  color: var(--emerald);
  font-size: 1.05rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.08);
}

/* 내 프로필 상단 바 */
.mobile-status-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.my-profile-bar {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.my-profile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-profile-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.my-profile-info h2 {
  font-size: 1.28rem;
  font-weight: 900;
  white-space: nowrap;
}

.btn-change-user {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.my-profile-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-profile-action {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.75);
}

.btn-profile-action.action-log {
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.btn-profile-action.action-edit {
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

/* 내 매칭 알림 카드 (모바일 최상단 점멸) */
.my-match-alert {
  background: linear-gradient(145deg, #064e3b, #0f172a);
  border: 3px solid #10b981;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.45);
  animation: matchAlertGlow 1.3s infinite alternate;
}

@keyframes matchAlertGlow {
  0% { border-color: #10b981; box-shadow: 0 0 16px rgba(16, 185, 129, 0.35); }
  100% { border-color: #fbbf24; box-shadow: 0 0 32px rgba(251, 191, 36, 0.65); }
}

.match-alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.alert-live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
}

.match-alert-header h3 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fde68a;
}

.match-alert-guide {
  font-size: 1.02rem;
  color: #f8fafc;
  margin-bottom: 10px;
}

.match-court-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
}

.select-card-top-bar.hidden {
  display: none;
}

.switch-guide-text {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fde68a;
}

.btn-cancel-switch {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.waiting-sub-actions-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.btn-swap-grid-item {
  width: 100%;
  font-size: 0.78rem;
  padding: 8px 6px;
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.4);
  white-space: nowrap;
  text-align: center;
}

.btn-pickcourt-grid-item {
  width: 100%;
  font-size: 0.78rem;
  padding: 8px 6px;
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
  white-space: nowrap;
  text-align: center;
}

.versus-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 14px 12px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.vs-team {
  text-align: center;
  min-width: 0;
}

.vs-team-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 6px;
}

.vs-team.team-b .vs-team-label {
  color: #fdba74;
}

.vs-players {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.08rem;
  font-weight: 900;
  word-break: keep-all;
}

.vs-player-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.25;
}

.vs-slot-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.vs-divider {
  font-weight: 900;
  color: #fbbf24;
  font-size: 1rem;
}

.match-alert-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-scoresync-full {
  width: 100%;
  padding: 14px 12px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 900;
  word-break: keep-all;
}

.win-buttons-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.win-buttons-pair button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  word-break: keep-all;
}

.win-btn-title {
  font-size: 1.08rem;
  font-weight: 900;
}

.win-btn-sub {
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0.92;
  white-space: nowrap;
}

.sub-actions-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.sub-actions-pair button {
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

/* 미활동 확인 배너 */
.inactivity-warning {
  background: rgba(245, 158, 11, 0.18);
  border: 2px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.inactivity-warning p {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.inactivity-btns {
  display: flex;
  gap: 10px;
}

.btn-stay {
  flex: 1;
  background: var(--emerald);
  color: #052e16;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
}

.btn-leave-now {
  flex: 1;
  background: var(--rose);
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
}

/* 초대형 신호등 버튼 */
.traffic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.traffic-Title {
  font-size: 1.15rem;
  font-weight: 800;
}

.today-count-pill {
  background: var(--blue-soft);
  color: #60a5fa;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.autopilot-status-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.14));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.autopilot-status-banner strong {
  color: #34d399;
  font-size: 1rem;
}

.autopilot-status-banner span {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.court-overtime-warning {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid #f59e0b;
  color: #fde68a;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  animation: bannerPulse 1.2s infinite alternate;
}

.traffic-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.traffic-btn {
  width: 100%;
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.15s ease;
}

.traffic-icon {
  font-size: 2.1rem;
  flex-shrink: 0;
}

.traffic-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.traffic-text strong {
  font-size: 1.22rem;
  font-weight: 900;
}

.traffic-text span {
  font-size: 0.88rem;
  color: var(--text-sub);
}

.active-check {
  display: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.traffic-btn.active .active-check {
  display: inline-block;
}

.traffic-btn.status-waiting.active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.25);
}
.traffic-btn.status-waiting.active .active-check {
  background: var(--emerald);
  color: #052e16;
}

.traffic-btn.status-personal.active {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.18);
}
.traffic-btn.status-personal.active .active-check {
  background: var(--amber);
  color: #0f172a;
}

.traffic-btn.status-resting.active {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.18);
}
.traffic-btn.status-resting.active .active-check {
  background: var(--blue);
  color: #fff;
}

.traffic-btn.status-offline.active {
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.2);
}
.traffic-btn.status-offline.active .active-check {
  background: #64748b;
  color: #fff;
}

/* 레슨/난타 세부 코트 선택 */
.personal-sub-options {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid var(--amber);
}

.sub-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 10px;
}

.sub-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-opt-btn {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 700;
}

.sub-opt-btn.active {
  background: var(--amber);
  color: #0f172a;
  border-color: var(--amber);
}

.notification-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-toggle-row p {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.btn-toggle-alarm {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 800;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.btn-toggle-alarm.on {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: var(--emerald);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 14px 0;
}

.mini-gym-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.mini-stat-box {
  background: var(--bg-surface);
  padding: 10px;
  border-radius: 10px;
}

.mini-stat-box span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.mini-stat-box strong {
  font-size: 1.15rem;
  color: var(--text-main);
}

/* ==========================================
   VIEW 2: 🖥️ 구장용 태블릿 대시보드 (3x4 코트 & 대기열)
   ========================================== */
.tablet-layout {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 18px;
  align-items: start;
}

@media (max-width: 1120px) {
  .tablet-layout {
    grid-template-columns: 1fr;
  }
}

.tablet-left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gym-top-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.gym-title-group h2 {
  font-size: 1.3rem;
  font-weight: 900;
}

.gym-title-group h2 small {
  font-size: 0.9rem;
  color: var(--text-sub);
  font-weight: 600;
}

.gym-title-group p {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-top: 2px;
}

.gym-quick-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot.green { background: var(--emerald); }
.dot.blue { background: var(--blue); }
.dot.yellow { background: var(--amber); }

/* 명찰 4개 1세트 대기조 카드 */
.nametag-queue-card {
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.nametag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.nametag-header h3 {
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nametag-header p {
  font-size: 0.88rem;
  color: var(--text-sub);
}

.badge-count {
  background: var(--emerald);
  color: #052e16;
  font-size: 0.82rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.nametag-header-actions {
  display: flex;
  gap: 10px;
}

.btn-primary-cta {
  background: var(--emerald);
  color: #052e16;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: transform 0.12s;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
}

.btn-secondary-cta {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 800;
}

.match-rule-bar {
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.match-rule-radios {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rule-label {
  font-weight: 800;
  color: var(--text-sub);
  white-space: nowrap;
}

.rule-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
  color: #e2e8f0;
}

.rule-autopilot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  padding: 5px 12px;
  border-radius: 999px;
  color: #34d399;
  font-weight: 800;
  font-size: 0.82rem;
}

.waiting-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 12px;
}

.nametag-set-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.92));
  border: 2px solid var(--emerald);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nametag-set-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.nametag-order-badge {
  background: #fbbf24;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.nametag-type-tag {
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nametag-teams-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  padding: 8px 10px;
  border-radius: 10px;
}

.nt-team-line {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 8px;
}

.nt-team-tag {
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

.nt-team-tag.tag-a {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

.nt-team-tag.tag-b {
  background: rgba(234, 88, 12, 0.25);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.45);
}

.nt-team-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 0;
}

.nt-player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 5px 7px;
  border-radius: 8px;
  min-width: 0;
}

.nt-player-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.nt-player-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-noshow-swap {
  font-size: 0.7rem;
  color: #fda4af;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 2px 5px;
  border-radius: 5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.nametag-actions {
  display: grid;
  grid-template-columns: 1.7fr 1fr auto;
  gap: 6px;
}

.btn-enter-main-court {
  background: var(--emerald);
  color: #052e16;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.86rem;
  white-space: nowrap;
}

.btn-pick-other-court {
  background: var(--blue);
  color: #fff;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.84rem;
  white-space: nowrap;
}

.btn-cancel-set {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.84rem;
  white-space: nowrap;
}

/* ==========================================
   🏸 파주 12구장 3 x 4 코트 그리드
   (1,2,3 / 4,5,6 / 7,8,9 / 10,11,12)
   ========================================== */
.court-grid-3x4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .court-grid-3x4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .court-grid-3x4 {
    grid-template-columns: 1fr;
  }
}

.court-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 195px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

/* 코트 용도별 테마 */
.court-card.court-main-club {
  border-color: #10b981;
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.18), rgba(30, 41, 59, 0.95));
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.22);
}

.court-card.court-club-shared {
  border-color: #3b82f6;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.14), rgba(30, 41, 59, 0.95));
}

.court-card.court-lesson {
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.1), rgba(30, 41, 59, 0.95));
}

.court-card.court-warmup {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.1), rgba(30, 41, 59, 0.95));
}

.court-card.court-external-playing {
  border-color: #f59e0b;
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.15), rgba(30, 41, 59, 0.95));
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.2);
}

.court-public-rule-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
}

.court-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.court-number-title {
  font-size: 1.02rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.court-role-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

.role-main { background: #10b981; color: #052e16; }
.role-shared { background: var(--blue-soft); color: #60a5fa; border: 1px solid #3b82f6; }
.role-lesson { background: var(--purple-soft); color: #d8b4fe; }
.role-warmup { background: var(--amber-soft); color: #fde68a; }
.role-other { background: rgba(148, 163, 184, 0.15); color: var(--text-sub); }

/* 코트 내부 배드민턴 네트 시각화 영역 */
.court-field {
  background: rgba(11, 17, 32, 0.72);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.court-empty-state {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.88rem;
  padding: 12px 4px;
}

.court-playing-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.court-team-box {
  background: rgba(30, 41, 59, 0.9);
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.court-player-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.court-vs-badge {
  font-size: 0.75rem;
  font-weight: 900;
  color: #fbbf24;
}

/* 코트 옆 명찰 예약 줄 표시 */
.court-reserved-nametag {
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.court-reserved-nametag strong {
  color: #fde68a;
}

.court-bottom-actions {
  display: flex;
  gap: 6px;
}

.court-bottom-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.btn-finish-match {
  background: var(--emerald);
  color: #052e16;
}

.btn-toggle-our-court {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

/* ==========================================
   우측: 출석 회원 대기열 패널
   ========================================== */
.roster-panel-card {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100dvh - 96px);
}

.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.roster-header h3 {
  font-size: 1.15rem;
  font-weight: 900;
}

.roster-header p {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.btn-small-add {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.roster-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 10px;
}

.roster-tab {
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-sub);
}

.roster-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.roster-search-row {
  display: flex;
  gap: 6px;
}

.roster-search-row input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.btn-cleanup-ghosts {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tablet-roster-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.roster-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-item.is-waiting {
  border-left: 4px solid var(--emerald);
}

.roster-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.roster-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.94rem;
  min-width: 0;
}

.roster-member-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
}

.wait-rank-num {
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 0.73rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

.roster-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.roster-meta-line {
  font-size: 0.76rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.roster-note-text {
  color: #fde68a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-quick-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.q-status-btn {
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
}

.q-status-btn.btn-log-chip {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.55);
}

.q-status-btn.active-waiting {
  background: var(--emerald);
  color: #052e16;
  border-color: var(--emerald);
}
.q-status-btn.active-personal {
  background: var(--amber);
  color: #0f172a;
  border-color: var(--amber);
}
.q-status-btn.active-resting {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.q-status-btn.active-offline {
  background: #475569;
  color: #fff;
}

/* ==========================================
   VIEW 3: 🏆 기록실 · 명예의 전당 · 설정
   ========================================== */
.stats-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hall-of-fame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.hof-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hof-card.hof-mentor {
  border-color: var(--emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), #0f172a);
}

.hof-trophy {
  font-size: 2.5rem;
}

.hof-info span {
  font-size: 0.82rem;
  color: var(--text-sub);
  font-weight: 700;
}

.hof-info h4 {
  font-size: 1.3rem;
  font-weight: 900;
  margin: 2px 0;
}

.hof-info p {
  font-size: 0.85rem;
  color: var(--emerald);
  font-weight: 700;
}

.stats-two-col {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 18px;
}

@media (max-width: 960px) {
  .stats-two-col {
    grid-template-columns: 1fr;
  }
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.match-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.history-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.history-score-pill {
  background: var(--emerald-soft);
  color: var(--emerald);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.table-responsive {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}

.member-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.member-stats-table th,
.member-stats-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.member-stats-table th {
  color: var(--text-sub);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: var(--bg-card);
}

.qr-display-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  background: var(--bg-surface);
  padding: 16px;
  border-radius: 14px;
  flex-wrap: wrap;
}

#clubQrImage {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.qr-url-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-copy-url, .btn-primary-sm, .btn-outline-sm {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 800;
}

.btn-copy-url, .btn-primary-sm {
  background: var(--emerald);
  color: #052e16;
  align-self: flex-start;
}

.btn-outline-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

.firebase-config-details {
  margin-top: 12px;
}

.firebase-config-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 8px;
}

.firebase-config-details textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.firebase-btn-row {
  display: flex;
  gap: 8px;
}

/* ==========================================
   MODALS (<dialog>)
   ========================================== */
.app-dialog {
  margin: auto;
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 0;
  width: min(92vw, 500px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.app-dialog.dialog-wide {
  width: min(94vw, 680px);
}

.app-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h3 {
  font-size: 1.25rem;
  font-weight: 900;
}

.dialog-close-btn {
  font-size: 1.3rem;
  color: var(--text-sub);
  padding: 4px 8px;
}

.dialog-sub {
  font-size: 0.92rem;
  color: var(--text-sub);
}

.score-teams-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.score-team-card {
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.score-team-card.winner {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.18);
}

.score-team-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-sub);
}

.score-team-names {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 6px 0;
}

.score-number-display {
  font-size: 2rem;
  font-weight: 900;
  color: #fbbf24;
}

.score-quick-presets {
  background: var(--bg-surface);
  padding: 12px;
  border-radius: 12px;
}

.score-quick-presets span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  flex: 1;
  min-width: 72px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
}

.chip-btn.active {
  background: var(--emerald);
  color: #052e16;
  border-color: var(--emerald);
}

.dialog-footer {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-cancel {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-weight: 800;
}

.btn-confirm-win {
  flex: 1.6;
  padding: 13px;
  border-radius: 12px;
  background: var(--emerald);
  color: #052e16;
  font-weight: 900;
  font-size: 1.02rem;
}

.btn-confirm-win:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 수동 매칭 슬롯 */
.manual-selected-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  padding: 12px;
  border-radius: 12px;
}

.manual-slot {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.manual-slot.filled {
  border-style: solid;
  border-color: var(--emerald);
}

.manual-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.92rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-btn-group {
  display: flex;
  gap: 8px;
}

.radio-card {
  flex: 1;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 800;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
}

.assign-court-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.assign-court-btn {
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  font-weight: 800;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assign-court-btn.main-court {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
}

/* ==========================================
   ScoreSync 스타일 실시간 미니 점수전광판 & 관전/심판 카운팅
   ========================================== */
.mobile-live-courts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-court-watch-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-court-watch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.live-court-badge {
  background: #0284c7;
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 999px;
}

.live-court-scorer-tag {
  font-size: 0.78rem;
  color: #fde68a;
  font-weight: 700;
}

.live-court-scoreboard-mini {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
}

.lcm-team {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.3;
}

.lcm-team.team-a { color: #93c5fd; text-align: left; }
.lcm-team.team-b { color: #fdba74; text-align: right; }

.lcm-score-center {
  background: #0f172a;
  border: 2px solid #38bdf8;
  border-radius: 10px;
  padding: 4px 12px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.btn-open-scoresync {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: 1px solid #7dd3fc;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* 3x4 코트 카드 내 실시간 스코어 배지 */
.court-live-score-pill {
  background: #020617;
  border: 1.5px solid #38bdf8;
  color: #fde68a;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.03em;
}

/* ScoreSync 모달 다이얼로그 */
.dialog-scoreboard {
  width: min(96vw, 780px);
  max-width: 780px;
  background: #020617;
  border: 2px solid #38bdf8;
}

.dialog-scoreboard.scoreboard-fullscreen {
  width: 99vw;
  max-width: 99vw;
  height: 96vh;
  max-height: 96vh;
}

.scoreboard-modal-content {
  padding: 16px;
  gap: 12px;
  height: 100%;
}

.scoreboard-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sb-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sb-live-dot {
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  animation: pulseLive 1.4s infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.sb-type-pill {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.sb-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-sb-tool {
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.btn-sb-tool.active {
  background: #fde68a;
  color: #0f172a;
  border-color: #f59e0b;
}

.sb-status-strip {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scoresync-board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 270px;
}

.dialog-scoreboard.scoreboard-fullscreen .scoresync-board-grid {
  min-height: 56vh;
}

.sb-team-panel {
  border-radius: 18px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  user-select: none;
  transition: transform 0.08s;
}

.sb-team-panel.panel-team-a {
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.45), rgba(15, 23, 42, 0.95));
  border: 3px solid #3b82f6;
}

.sb-team-panel.panel-team-b {
  background: linear-gradient(180deg, rgba(194, 65, 12, 0.45), rgba(15, 23, 42, 0.95));
  border: 3px solid #f97316;
}

.sb-team-panel.has-serve {
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.35);
}

.sb-team-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.sb-team-badge {
  font-size: 0.92rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
}

.panel-team-a .sb-team-badge { background: #2563eb; color: #fff; }
.panel-team-b .sb-team-badge { background: #ea580c; color: #fff; }

.sb-serve-pill {
  background: #fde047;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}

.sb-players-names {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 900;
  color: #ffffff;
  margin-top: 6px;
  line-height: 1.25;
}

.sb-giant-score-btn {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(2, 6, 23, 0.55);
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  margin: 10px 0;
  padding: 10px 6px;
  cursor: pointer;
}

.sb-giant-score-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.12);
}

.sb-giant-number {
  font-size: clamp(4.2rem, 13vw, 7.6rem);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.dialog-scoreboard.scoreboard-fullscreen .sb-giant-number {
  font-size: clamp(6rem, 18vw, 11rem);
}

.sb-tap-hint {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fde68a;
  margin-top: 6px;
}

.sb-minus-btn {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  padding: 7px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.sb-point-stream {
  background: #0f172a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scoreboard-bottom-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sb-bottom {
  flex: 1;
  min-width: 110px;
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
}

.btn-sb-finish {
  flex: 2;
  min-width: 180px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #052e16;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.98rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* ==========================================
   MODAL 8: 🔄 13점 인터벌 코트 체인지 대형 팝업
   ========================================== */
.dialog-court-change {
  width: min(92vw, 440px);
  background: linear-gradient(155deg, #0f172a, #1e293b);
  border: 3px solid #fbbf24;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 36px rgba(251, 191, 36, 0.45);
}

.dialog-court-change::backdrop {
  background-color: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
}

.court-change-modal-content {
  padding: 26px 22px;
  text-align: center;
  align-items: center;
  gap: 14px;
}

.cc13-badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.2);
  border: 1.5px solid #fbbf24;
  color: #fde68a;
  font-size: 0.92rem;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 999px;
}

.cc13-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  word-break: keep-all;
  line-height: 1.3;
}

.cc13-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  word-break: keep-all;
  line-height: 1.45;
}

.cc13-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.btn-cc13-swap {
  width: 100%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border: 2px solid #fef08a;
  padding: 20px 16px;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
  word-break: keep-all;
  transition: transform 0.1s ease;
}

.btn-cc13-swap:active {
  transform: scale(0.96);
}

.btn-cc13-close {
  width: 100%;
  background: #0f172a;
  border: 1.5px solid #475569;
  color: #cbd5e1;
  padding: 15px 16px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  word-break: keep-all;
}

/* ==========================================
   🏆 기록·관리 화면 정렬 정리 (v18)
   ========================================== */
.member-table-card .table-responsive {
  max-height: 480px;
}

.member-stats-table {
  table-layout: auto;
}

.member-stats-table th {
  white-space: nowrap;
  z-index: 1;
}

.member-stats-table td {
  vertical-align: middle;
}

.member-stats-table .td-nowrap {
  white-space: nowrap;
}

.member-stats-table .td-nowrap small {
  color: var(--text-sub);
}

.member-stats-table .td-care {
  color: #34d399;
  font-weight: 800;
}

.member-stats-table .td-name {
  white-space: nowrap;
}

.member-stats-table .td-name .newbie-pill,
.member-stats-table .td-name .check-flag {
  margin-left: 6px;
  vertical-align: middle;
}

.member-name-link {
  color: #f8fafc;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check-flag {
  color: #fbbf24;
  font-size: 0.75rem;
  white-space: nowrap;
}

.member-stats-table .td-actions {
  white-space: nowrap;
  text-align: right;
}

.row-action-group {
  display: inline-flex;
  gap: 5px;
  flex-wrap: nowrap;
}

.row-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 800;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  white-space: nowrap;
}

.row-btn-log {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.55);
}

.row-btn-edit {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.5);
}

.admin-action-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-action-btns .btn-outline-sm {
  white-space: nowrap;
}

.stats-bottom-row {
  grid-template-columns: 1.3fr 1fr;
  align-items: start;
}

@media (max-width: 960px) {
  .stats-bottom-row {
    grid-template-columns: 1fr;
  }
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.history-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-head strong {
  font-size: 0.86rem;
  color: #93c5fd;
  white-space: nowrap;
}

.history-time {
  color: #94a3b8;
  font-size: 0.76rem;
  white-space: nowrap;
}

.history-teams {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
}

.history-teams em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 900;
  margin: 0 4px;
}

.history-score-pill {
  white-space: nowrap;
  flex-shrink: 0;
}

.qr-card .qr-desc {
  font-size: 0.86rem;
  color: var(--text-sub);
}

.qr-card .firebase-status-box {
  margin-top: 12px;
}

@media (max-width: 520px) {
  .qr-display-box {
    justify-content: center;
    text-align: center;
  }
  .qr-url-info {
    align-items: center;
    min-width: 100%;
  }
  .btn-copy-url {
    align-self: center;
  }
  .qr-url-info strong {
    word-break: break-all;
  }
}

/* 기간별 CSV 내보내기 다이얼로그 */
.export-period-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.export-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.export-custom-range.hidden {
  display: none;
}

.export-custom-range input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

.export-range-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 12px;
}

.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.export-actions .export-btn {
  width: 100%;
  padding: 12px 8px;
  font-size: 0.92rem;
  white-space: nowrap;
  align-self: stretch;
  text-align: center;
}

.export-status {
  margin-top: 10px;
  font-size: 0.84rem;
  color: #34d399;
  font-weight: 700;
  min-height: 1.2em;
}

/* ==========================================
   🏢 클럽 관리 & 새 클럽 3분 개설 다이얼로그
   ========================================== */
.club-mgr-dialog {
  max-width: 560px;
  width: 95vw;
}

.club-mgr-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 16px;
}

.club-mgr-tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.club-mgr-tab-btn.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.club-tab-pane {
  display: none;
}

.club-tab-pane.active {
  display: block;
}

.club-info-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.club-info-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.club-info-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 14px 0;
}

.club-info-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.15);
}

.info-label {
  color: #94a3b8;
  font-weight: 600;
}

.info-val {
  color: #e2e8f0;
  font-weight: 800;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-share-link {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-share-link:hover {
  background: #1d4ed8;
}

.btn-open-poster-action {
  background: #059669;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-open-poster-action:hover {
  background: #047857;
}

.club-url-toast {
  margin-top: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #a7f3d0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.create-guide-text {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 14px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-input-wrap {
  display: flex;
  gap: 8px;
}

.btn-switch-go {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn-switch-go:hover {
  background: #2563eb;
}

.recent-clubs-section {
  margin-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 14px;
}

.recent-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
}

.recent-clubs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-club-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.recent-club-item:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.recent-club-name {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.9rem;
}

.recent-club-id {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: monospace;
}

/* ==========================================
   🖨️ 체육관 벽면 부착용 A4 포스터
   ========================================== */
.poster-dialog {
  max-width: 640px;
  width: 95vw;
}

.print-poster-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-family: 'Pretendard', sans-serif;
}

.poster-badge-top {
  display: inline-block;
  background: #1e293b;
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.poster-club-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.poster-court-subtitle {
  font-size: 0.96rem;
  color: #475569;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.poster-qr-wrapper {
  background: #f8fafc;
  border: 3px solid #0f172a;
  border-radius: 18px;
  padding: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.poster-qr-img {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 8px;
}

.poster-qr-scan-guide {
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.35;
}

.camera-icon {
  margin-right: 4px;
}

.poster-app-no-need {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.poster-steps-card {
  background: #f1f5f9;
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 18px;
}

.poster-steps-title {
  font-size: 1.02rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.poster-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  width: 28px;
  height: 28px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.step-text p {
  font-size: 0.84rem;
  color: #475569;
  margin: 0;
  line-height: 1.35;
}

.poster-footer-banner {
  border-top: 2px dashed #cbd5e1;
  padding-top: 14px;
  text-align: center;
}

.poster-url-line {
  font-size: 0.88rem;
  color: #475569;
  margin-bottom: 6px;
}

.poster-slogan {
  font-size: 0.86rem;
  font-weight: 800;
  color: #2563eb;
}

/* ==========================================
   🌐 콕매치 (KokMatch) 중앙 관리 포털 허브
   ========================================== */
.hub-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 4px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hub-hero-card {
  background: linear-gradient(150deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  border-radius: 22px;
  padding: 34px 22px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.hub-hero-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.4px;
}

.hub-hero-title {
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.text-gradient-kok {
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero-desc {
  font-size: 0.94rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 20px;
}

.hub-recent-banner {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  padding: 12px 18px;
  max-width: 580px;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.recent-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.recent-banner-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}

.recent-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.recent-banner-info strong {
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 900;
}

.btn-recent-jump {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s;
}

.btn-recent-jump:hover {
  transform: translateY(-2px);
}

.hub-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hub-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-hub-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-hub-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-hub-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: #94a3b8;
}

.hub-clubs-section {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 24px 20px;
}

.hub-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.hub-section-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0;
}

.hub-section-sub {
  font-size: 0.86rem;
  color: #94a3b8;
  margin: 4px 0 0 0;
}

.hub-search-wrap {
  width: 100%;
  max-width: 320px;
}

.input-hub-search {
  width: 100%;
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.input-hub-search:focus {
  border-color: #3b82f6;
  outline: none;
}

.hub-clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.hub-club-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.hub-club-card:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.hub-club-card.flagship {
  border-color: #10b981;
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.12), rgba(30, 41, 59, 0.95));
}

.hub-club-card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-club-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-badge-flagship {
  font-size: 0.72rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
}

.hub-badge-courts {
  font-size: 0.72rem;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
}

.hub-club-card-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 4px 0 2px 0;
}

.hub-club-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.hub-club-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 10px;
  font-size: 0.8rem;
  color: #64748b;
}

.hub-club-card-footer .btn-card-enter {
  color: #38bdf8;
  font-weight: 800;
}

.hub-add-card {
  border: 2px dashed rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.4);
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 150px;
}

.hub-add-card:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.hub-add-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.hub-add-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
}

.hub-add-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.hub-features-section {
  padding: 10px 0;
}

.hub-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.hub-feature-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
}

.hub-feature-card .feature-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.hub-feature-card h4 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.hub-feature-card p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.hub-pricing-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(16, 185, 129, 0.15));
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.pricing-banner-text h4 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.pricing-banner-text p {
  font-size: 0.86rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.btn-hub-contact {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-hub-contact:hover {
  background: #2563eb;
}

.hub-home-btn {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* @media print: A4 인쇄 최적화 */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body * {
    visibility: hidden !important;
  }

  .print-poster-sheet,
  .print-poster-sheet * {
    visibility: visible !important;
  }

  .print-poster-sheet {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 25mm 20mm !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}
