:root{--bg:#f8fafc;--card:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--dark:#0f172a;--green:#dcfce7;--green-text:#15803d;--blue:#eff6ff;--blue-text:#1d4ed8;--red:#fee2e2;--red-text:#b91c1c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,'Noto Sans KR',sans-serif}.container{max-width:1180px;margin:0 auto;padding:0 18px}.header{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.94);border-bottom:1px solid var(--border);backdrop-filter:blur(8px)}.header-inner{display:flex;justify-content:space-between;align-items:center;padding:18px 0}.brand h1{margin:0;font-size:22px}.brand p{margin:4px 0 0;color:var(--muted);font-size:14px}.nav{display:flex;gap:18px;align-items:center}.nav a{color:#475569;text-decoration:none;font-weight:600;font-size:14px}.nav a:hover{color:#000}.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:30px;padding:56px 18px}.badge{display:inline-block;background:var(--dark);color:#fff;padding:10px 16px;border-radius:999px;font-weight:700}.hero h2{font-size:54px;line-height:1.04;margin:18px 0}.hero p{font-size:18px;line-height:1.7;color:var(--muted)}.btn{display:inline-block;border:0;background:var(--dark);color:#fff;padding:11px 18px;border-radius:10px;font-weight:700;text-decoration:none;cursor:pointer}.btn.secondary{background:#fff;color:var(--dark);border:1px solid var(--border)}.btn.full{width:100%}.card{background:var(--card);border:1px solid var(--border);border-radius:22px;box-shadow:0 6px 16px rgba(15,23,42,.05);padding:24px;margin-bottom:22px}.grid{display:grid;gap:16px}.grid-2{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-4{grid-template-columns:repeat(4,1fr)}.span-2{grid-column:span 2}.span-4{grid-column:span 4}label{display:block;margin-bottom:8px;font-size:14px;font-weight:700;color:#334155}input,select,textarea{width:100%;border:1px solid var(--border);background:#fff;border-radius:10px;padding:11px 12px;font-size:14px}textarea{min-height:92px}.input-row{margin-bottom:14px}.notice-box{border-radius:16px;padding:16px;background:var(--blue);color:var(--blue-text);font-size:14px}.muted-box{border-radius:16px;padding:16px;background:#f1f5f9;color:#475569;font-size:14px}.schedule-item{display:flex;gap:14px;border:1px solid var(--border);background:#f8fafc;border-radius:16px;padding:16px;margin:12px 0}.dashboard{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.dash-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--border);border-radius:20px;padding:18px}.dash-icon{background:var(--dark);color:#fff;border-radius:14px;padding:12px}.dash-card p{margin:0}.dash-value{font-size:26px;font-weight:800}.section-grid{display:grid;grid-template-columns:2fr 1fr;gap:22px}table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}th,td{padding:12px;border-bottom:1px solid var(--border);text-align:left;font-size:14px}th{background:#f1f5f9;color:#475569}.pill{display:inline-block;border-radius:999px;background:var(--green);color:var(--green-text);font-size:12px;font-weight:800;padding:5px 9px}.alert{margin:18px 0;border-radius:12px;padding:12px 16px;font-weight:700}.alert.success{background:var(--green);color:var(--green-text)}.alert.error{background:var(--red);color:var(--red-text)}.footer{border-top:1px solid var(--border);background:#fff;text-align:center;color:var(--muted);padding:28px}.mobile-menu{display:none}@media(max-width:900px){.hero,.section-grid{grid-template-columns:1fr}.grid-2,.grid-3,.grid-4,.dashboard{grid-template-columns:1fr}.span-2,.span-4{grid-column:auto}.nav{display:none}.mobile-menu{display:block}.hero h2{font-size:38px}.table-wrap{overflow:auto}}
.page-top{padding-top:30px}.narrow-page{max-width:560px;padding-top:52px}.login-card{max-width:520px;margin-left:auto;margin-right:auto}.muted-text{color:var(--muted);line-height:1.6}.btn.small{padding:7px 10px;border-radius:8px;font-size:12px}td select{min-width:105px}

/* Attendance history list - names as separated badges */
.attendance-history-date-group {border:1px solid var(--border);border-radius:16px;background:#fff;padding:16px;margin:12px 0;}
.attendance-history-header {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;color:#0f172a;}
.attendance-history-header strong {font-size:17px;}
.attendance-history-header span {display:inline-block;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:5px 10px;font-size:13px;font-weight:800;}
.attendance-history-names {display:flex;flex-wrap:wrap;gap:8px;}
.attendance-history-name {display:inline-block;padding:7px 10px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;font-size:14px;font-weight:600;color:#0f172a;}

/* Game result player checkbox selector - same style as Attendance Check */
.game-player-tools {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.game-player-grid {display:grid;grid-template-columns:repeat(4, 1fr);gap:8px 10px;max-height:260px;overflow:auto;border:1px solid var(--border);border-radius:14px;padding:12px;background:#fff;}
.game-player-check {display:flex;align-items:center;gap:8px;margin:0;padding:8px 10px;border:1px solid #e5e7eb;border-radius:10px;background:#f8fafc;cursor:pointer;font-size:14px;font-weight:600;color:#0f172a;}
.game-player-check input {width:auto;margin:0;}
.game-player-check span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.game-selected-grid {display:grid;grid-template-columns:repeat(2, 1fr);gap:12px;}
.player-input-wrap {display:flex;align-items:center;gap:6px;}
.player-input-wrap input {flex:1;}
.player-clear-btn {width:38px;min-width:38px;height:38px;border:1px solid #fecaca;background:#fee2e2;color:#b91c1c;border-radius:10px;font-size:22px;font-weight:900;line-height:1;cursor:pointer;}
.player-clear-btn:hover {background:#fecaca;}

/* Active member level list */
.member-level-grid {display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;}
.member-level-badge {display:inline-block;padding:8px 11px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;font-size:14px;font-weight:600;color:#0f172a;}
.member-level-badge strong {color:#1d4ed8;}

@media (max-width:900px){.game-player-grid{grid-template-columns:repeat(2,1fr)}.game-selected-grid{grid-template-columns:1fr}.member-level-badge{width:calc(50% - 4px);text-align:center}.attendance-history-header{align-items:flex-start;flex-direction:column}}
@media (max-width:520px){.game-player-grid{grid-template-columns:1fr;max-height:none}.attendance-history-name{width:100%;border-radius:10px}.member-level-badge{width:100%;}}

/* Mobile menu button restore/fix */
.mobile-menu-btn {
  display: none;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mobile-menu-btn {
    display: inline-block !important;
  }

  #mainNav.nav {
    display: none !important;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
  }

  #mainNav.nav.show {
    display: flex !important;
  }

  #mainNav.nav a {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
  }

  #mainNav.nav a:hover {
    background: #e5e7eb;
  }
}

/* Paid member list - separated badge style */
.paid-member-grid,
.paid-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  line-height: 1.5;
}

.paid-member-name,
.paid-member-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.paid-member-name::before,
.paid-member-badge::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
}

.paid-member-summary-card .dash-value,
.paid-member-count {
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .paid-member-grid,
  .paid-member-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .paid-member-name,
  .paid-member-badge {
    width: 100%;
    border-radius: 12px;
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .paid-member-grid,
  .paid-member-list {
    grid-template-columns: 1fr;
  }
}

/* Attendance Check member list - separated tile style */
.attendance-member-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  margin-top: 10px;
}

.attendance-member-check {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.25;
  min-height: 38px;
}

.attendance-member-check:hover {
  background: #eef2f7 !important;
  border-color: #cbd5e1 !important;
}

.attendance-member-check input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.attendance-member-check span {
  display: block !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* fallback: if member labels were not wrapped with attendance-member-check */
.attendance-member-grid label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  font-weight: 700 !important;
}

.attendance-tools {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .attendance-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .attendance-member-grid {
    grid-template-columns: 1fr !important;
    max-height: none;
  }
}

/* Active member level list - inserted above Finance Dashboard */
.member-level-summary-card {
  margin-top: 0;
}

.member-level-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.member-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 11px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.member-level-badge::before {
  content: "🏓";
  margin-right: 4px;
}

.member-level-badge strong {
  color: #1d4ed8;
  font-weight: 900;
}

@media (max-width: 900px) {
  .member-level-badge {
    width: calc(50% - 4px);
    justify-content: flex-start;
    border-radius: 12px;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .member-level-badge {
    width: 100%;
  }
}

/* AKPC Electronic Scoreboard */
.scoreboard-player-section {
  margin-top: 22px;
}

.scoreboard-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.scoreboard-player-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.scoreboard-player-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.scoreboard-player-check input {
  width: auto;
  margin: 0;
}

.scoreboard-player-check span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scoreboard-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.scoreboard-team-card {
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  background: #fff;
}

.scoreboard-team-card.serving {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px #eff6ff;
}

.scoreboard-team-card h3 {
  margin-top: 0;
}

.scoreboard-selected-player {
  margin-bottom: 12px;
}

.scoreboard-large-score {
  font-size: 92px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  color: #0f172a;
  margin-top: 18px;
}

.scoreboard-display-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: #0f172a;
  color: #fff;
  text-align: center;
}

.scoreboard-call-label {
  font-size: 16px;
  font-weight: 800;
  opacity: .8;
}

.scoreboard-call {
  font-size: 84px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 12px 0;
}

.scoreboard-display-card .muted-text {
  color: #cbd5e1;
}

.scoreboard-status-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.scoreboard-control-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.scoreboard-control-grid .btn {
  font-size: 16px;
  padding: 15px 18px;
}

.scoreboard-settings {
  display: grid;
  grid-template-columns: 160px 130px 130px 130px 120px;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
}

#scoreboardSchedule,
#scoreboardGameDate[readonly],
#scoreboardLocation[readonly] {
  font-weight: 700;
}

#scoreboardGameDate[readonly],
#scoreboardLocation[readonly] {
  background: #f8fafc;
}

@media (max-width: 900px) {
  .scoreboard-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scoreboard-teams-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .scoreboard-settings {
    grid-template-columns: 1fr;
  }

  .scoreboard-call {
    font-size: 60px;
  }

  .scoreboard-large-score {
    font-size: 72px;
  }
}

@media (max-width: 520px) {
  .scoreboard-player-grid,
  .scoreboard-control-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard-call {
    font-size: 48px;
  }
}

/* ===== AKPC SCOREBOARD PLAYER ASSIGN + POSITION FIX ===== */
.scoreboard-display-card.scoreboard-call-panel {
  display: block !important;
  text-align: center !important;
  padding: 32px !important;
  border-radius: 24px !important;
  background: #0f172a !important;
  color: #ffffff !important;
}

.scoreboard-call-panel .scoreboard-current-server-row {
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 820px !important;
  margin: 0 auto 18px auto !important;
  padding: 18px 22px !important;
  border-radius: 18px !important;
  background: #dcfce7 !important;
  color: #0f172a !important;
  text-align: left !important;
}

.scoreboard-call-panel #currentServerNameDisplay {
  display: block !important;
  color: #0f172a !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.scoreboard-call-panel .scoreboard-call-layout {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) 420px !important;
  gap: 18px !important;
  align-items: stretch !important;
  max-width: 980px !important;
  margin: 0 auto !important;
}

.scoreboard-call-panel .scoreboard-call-names {
  display: grid !important;
  grid-template-rows: repeat(3, minmax(82px, 1fr)) !important;
  gap: 12px !important;
}

.scoreboard-call-panel .scoreboard-call-names > div {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 82px !important;
  padding: 14px 20px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #ffffff !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-align: left !important;
}

.scoreboard-call-panel .scoreboard-call-digits {
  display: grid !important;
  grid-template-rows: 160px 120px !important;
  gap: 12px !important;
}

.scoreboard-call-panel .scoreboard-call-score-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

.scoreboard-call-panel #serverTeamScoreDisplay,
.scoreboard-call-panel #receiverTeamScoreDisplay,
.scoreboard-call-panel #serverNumberBigDisplay {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100% !important;
  width: 100% !important;
  padding: 8px !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 108px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -2px !important;
}

.scoreboard-call-panel .scoreboard-server-number-row {
  display: grid !important;
  grid-template-columns: 100px 1fr !important;
  gap: 12px !important;
}

.scoreboard-call-panel .scoreboard-server-number-row small {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #cbd5e1 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

.scoreboard-call-panel #scoreCallDisplay {
  display: block !important;
  max-width: 720px !important;
  margin: 20px auto 0 auto !important;
  padding: 16px 20px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  font-size: 72px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 2px !important;
  text-align: center !important;
}

.scoreboard-start-settings {
  grid-template-columns: 190px minmax(220px, 1fr) 110px 120px 120px !important;
}

@media (max-width: 900px) {
  .scoreboard-call-panel .scoreboard-current-server-row,
  .scoreboard-call-panel .scoreboard-call-layout,
  .scoreboard-call-panel .scoreboard-server-number-row,
  .scoreboard-start-settings {
    grid-template-columns: 1fr !important;
  }

  .scoreboard-call-panel .scoreboard-current-server-row {
    text-align: center !important;
  }

  .scoreboard-call-panel .scoreboard-call-names > div {
    justify-content: center !important;
    min-height: 64px !important;
    font-size: 22px !important;
    text-align: center !important;
  }

  .scoreboard-call-panel #serverTeamScoreDisplay,
  .scoreboard-call-panel #receiverTeamScoreDisplay,
  .scoreboard-call-panel #serverNumberBigDisplay {
    min-height: 120px !important;
    font-size: 82px !important;
  }

  .scoreboard-call-panel #scoreCallDisplay {
    font-size: 54px !important;
  }
}

@media (max-width: 520px) {
  .scoreboard-call-panel #serverTeamScoreDisplay,
  .scoreboard-call-panel #receiverTeamScoreDisplay,
  .scoreboard-call-panel #serverNumberBigDisplay {
    min-height: 96px !important;
    font-size: 64px !important;
  }

  .scoreboard-call-panel #scoreCallDisplay {
    font-size: 42px !important;
  }
}

/* Scoreboard player assignment visual fix */
.scoreboard-selected-player input[readonly] {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

.scoreboard-player-checkbox:checked + span {
  color: #1d4ed8 !important;
  font-weight: 900 !important;
}

/* ===== AKPC Scoreboard 50% compact mobile Score Call ===== */
@media (max-width: 600px) {
  .scoreboard-display-card.scoreboard-call-panel {
    padding: 6px !important;
    border-radius: 12px !important;
    margin-top: 6px !important;
    transform-origin: top center !important;
  }

  .scoreboard-call-panel .scoreboard-call-label {
    font-size: 10px !important;
    margin-bottom: 3px !important;
    line-height: 1 !important;
  }

  .scoreboard-serving-team-box,
  .scoreboard-receiving-team-box {
    grid-template-columns: minmax(0, 1fr) 42px !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
    border-radius: 8px !important;
    border-width: 1px !important;
  }

  .scoreboard-serving-main {
    padding: 5px 6px !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  .scoreboard-server-dot {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    margin-top: 2px !important;
    border-width: 1px !important;
  }

  .scoreboard-serving-names {
    gap: 1px !important;
    min-width: 0 !important;
  }

  .scoreboard-main-server-name {
    font-size: clamp(12px, 3.8vw, 17px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .scoreboard-main-partner-name {
    font-size: clamp(10px, 3.2vw, 14px) !important;
    line-height: 1.02 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .scoreboard-receiving-names {
    padding: 5px 6px !important;
    gap: 3px !important;
    min-width: 0 !important;
  }

  .scoreboard-receiving-names div {
    font-size: clamp(10px, 3.2vw, 14px) !important;
    line-height: 1.02 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .scoreboard-serving-score span,
  .scoreboard-receiving-score span {
    min-height: 38px !important;
    font-size: clamp(22px, 8vw, 32px) !important;
    border-radius: 7px !important;
    padding: 0 !important;
  }

  .scoreboard-call-footer-wrap {
    grid-template-columns: minmax(0, 1fr) 42px !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }

  .scoreboard-call-panel #scoreCallDisplay {
    min-height: 34px !important;
    font-size: clamp(18px, 7vw, 27px) !important;
    border-radius: 8px !important;
    padding: 3px 5px !important;
    letter-spacing: 0 !important;
  }

  .scoreboard-server-mini-box {
    border-radius: 8px !important;
  }

  .scoreboard-server-mini-box small {
    font-size: 7px !important;
    padding-top: 2px !important;
    line-height: 1 !important;
  }

  .scoreboard-server-mini-box span,
  .scoreboard-call-panel #serverNumberBigDisplay {
    min-height: 25px !important;
    font-size: clamp(18px, 6.5vw, 25px) !important;
    padding-bottom: 2px !important;
  }

  .scoreboard-display-card .muted-text,
  .scoreboard-call-panel .muted-text {
    font-size: 8px !important;
    line-height: 1.15 !important;
    margin: 3px 0 !important;
  }

  .scoreboard-status-row {
    gap: 6px !important;
    margin-top: 3px !important;
    font-size: 8px !important;
  }
}

@media (max-width: 390px) {
  .scoreboard-serving-team-box,
  .scoreboard-receiving-team-box,
  .scoreboard-call-footer-wrap {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    gap: 3px !important;
  }

  .scoreboard-main-server-name {
    font-size: clamp(11px, 3.6vw, 15px) !important;
  }

  .scoreboard-main-partner-name,
  .scoreboard-receiving-names div {
    font-size: clamp(9px, 3vw, 12px) !important;
  }

  .scoreboard-serving-score span,
  .scoreboard-receiving-score span {
    min-height: 34px !important;
    font-size: clamp(20px, 7.5vw, 28px) !important;
  }

  .scoreboard-call-panel #scoreCallDisplay {
    min-height: 30px !important;
    font-size: clamp(17px, 6.5vw, 24px) !important;
  }
}


.gamma-embed-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.gamma-embed-wrap iframe {
  width: 100%;
  min-height: 600px;
}

@media (max-width: 600px) {
  .gamma-embed-wrap iframe {
    min-height: 420px;
  }
}

/* ===== AKPC PC/Mobile collapsible + 5-item scroll final fix ===== */
.akpc-list-collapsed {
  display: none !important;
}

.akpc-five-list-frame {
  max-height: 238px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

/* Active member level list frame */
#akpcMemberLevelListWrap .member-level-grid,
.member-level-grid.akpc-five-list-frame {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Paid member list frame */
#akpcPaidMemberListWrap .paid-member-grid,
#akpcPaidMemberListWrap .paid-member-list,
.paid-member-grid.akpc-five-list-frame,
.paid-member-list.akpc-five-list-frame {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Game Result Entry member list frame */
.game-player-grid.akpc-five-list-frame {
  max-height: 238px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Attendance Check member list frame - PC and mobile */
.attendance-member-grid.akpc-five-list-frame {
  max-height: 238px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Attendance History collapsed/open behavior */
.attendance-history-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
}

.attendance-history-toggle:hover strong {
  color: #1d4ed8;
}

.attendance-history-names.akpc-five-list-frame {
  max-height: 238px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 10px;
}

/* Mobile: keep the frames scrollable, do not expand to unlimited height */
@media (max-width: 900px) {
  .akpc-five-list-frame,
  .attendance-member-grid.akpc-five-list-frame,
  .game-player-grid.akpc-five-list-frame,
  .attendance-history-names.akpc-five-list-frame,
  .member-level-grid.akpc-five-list-frame,
  .paid-member-grid.akpc-five-list-frame,
  .paid-member-list.akpc-five-list-frame {
    max-height: 238px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 520px) {
  .attendance-member-grid.akpc-five-list-frame,
  .game-player-grid.akpc-five-list-frame {
    grid-template-columns: 1fr !important;
    max-height: 238px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .member-level-grid.akpc-five-list-frame,
  .paid-member-grid.akpc-five-list-frame,
  .paid-member-list.akpc-five-list-frame {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap !important;
    max-height: 238px !important;
    overflow-y: auto !important;
  }

  .member-level-grid.akpc-five-list-frame .member-level-badge,
  .paid-member-grid.akpc-five-list-frame .paid-member-name,
  .paid-member-grid.akpc-five-list-frame .paid-member-badge,
  .paid-member-list.akpc-five-list-frame .paid-member-name,
  .paid-member-list.akpc-five-list-frame .paid-member-badge {
    width: 100%;
  }
}

/* Scrollbar */
.akpc-five-list-frame::-webkit-scrollbar {
  width: 8px;
}

.akpc-five-list-frame::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.akpc-five-list-frame::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 999px;
}

/* ===== AKPC Attendance Management Page ===== */
.attendance-manage-filter { margin-top: 18px; }
.attendance-manage-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.attendance-manage-dashboard { margin-bottom:22px; }
.attendance-filter-label { font-size:20px; }
.manage-attendance-hidden { display:none !important; }
.attendance-history-names.manage-attendance-scroll {
  display:flex; flex-wrap:wrap; gap:8px;
  max-height:238px !important; overflow-y:auto !important; overflow-x:hidden !important;
  border-top:1px solid var(--border); padding-top:12px; margin-top:12px;
}
.member-attendance-summary-list {
  display:flex; flex-direction:column; gap:8px;
  max-height:420px; overflow-y:auto; padding-right:4px;
}
.member-attendance-summary-item {
  display:grid; grid-template-columns:1fr auto; gap:4px 10px; align-items:center;
  padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:#f8fafc;
}
.member-attendance-summary-item span { font-weight:800; color:#0f172a; }
.member-attendance-summary-item strong { color:#1d4ed8; font-size:15px; }
.member-attendance-summary-item small { grid-column:1 / -1; color:var(--muted); }
@media (max-width:900px) {
  .attendance-manage-actions .btn { width:100%; text-align:center; }
  .member-attendance-summary-list { max-height:260px; }
}
@media (max-width:520px) {
  .attendance-history-names.manage-attendance-scroll { max-height:238px !important; }
  .attendance-history-name { width:100%; border-radius:10px; }
}

/* ===== AKPC Electronic Scoreboard final mobile one-screen redesign ===== */
.scoreboard-mobile-compact-panel{max-width:980px!important;margin:16px auto!important;padding:18px!important;border-radius:22px!important;background:#0f172a!important;color:#fff!important}
.scoreboard-mobile-compact-panel .scoreboard-call-label{font-size:16px!important;font-weight:900!important;margin-bottom:8px!important;color:#e5e7eb!important}
.scoreboard-compact-call-main{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;max-width:840px;margin:0 auto 12px}
.scoreboard-mobile-compact-panel #scoreCallDisplay{display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;min-height:72px!important;border-radius:16px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;font-size:52px!important;font-weight:900!important;line-height:1!important;letter-spacing:0!important;padding:8px 14px!important}
.scoreboard-compact-status{display:flex;flex-direction:column;gap:6px;min-width:130px;padding:12px;border-radius:16px;background:rgba(255,255,255,.10);color:#e5e7eb;font-size:15px;font-weight:800;text-align:center}
.scoreboard-compact-teams{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:840px;margin:0 auto 12px}
.scoreboard-compact-team{min-width:0;border:1px solid rgba(255,255,255,.16);border-radius:16px;padding:14px;background:rgba(255,255,255,.10)}
.scoreboard-compact-serving.team-a{background:#dcfce7;color:#0f172a;border-color:#86efac}
.scoreboard-compact-serving.team-b{background:#fee2e2;color:#0f172a;border-color:#fca5a5}
.scoreboard-compact-team-title{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:13px;font-weight:900;opacity:.9}
.scoreboard-server-dot{width:18px!important;height:18px!important;min-width:18px!important;border-radius:999px;background:#f0822d;border:1px solid rgba(15,23,42,.25)}
.scoreboard-compact-player-list{display:flex;flex-direction:column;gap:6px;min-width:0}
.scoreboard-compact-player-list div,.scoreboard-mobile-compact-panel #currentServerNameDisplay,.scoreboard-mobile-compact-panel #servingPartnerNameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer1NameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer2NameDisplay{min-width:0!important;color:inherit!important;font-size:24px!important;font-weight:900!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important}
.scoreboard-compact-score-row{display:grid;grid-template-columns:1fr 1fr .75fr;gap:12px;max-width:840px;margin:0 auto}
.scoreboard-compact-score-box{display:grid;grid-template-rows:auto 1fr;gap:4px;min-width:0;border-radius:16px;background:#fff;color:#0f172a;padding:10px;text-align:center}
.scoreboard-compact-score-box small{font-size:12px;font-weight:900;color:#64748b}
.scoreboard-mobile-compact-panel #serverTeamScoreDisplay,.scoreboard-mobile-compact-panel #receiverTeamScoreDisplay,.scoreboard-mobile-compact-panel #serverNumberBigDisplay{display:flex!important;align-items:center!important;justify-content:center!important;min-height:70px!important;width:100%!important;padding:0!important;border-radius:0!important;background:transparent!important;color:#0f172a!important;font-size:58px!important;font-weight:900!important;line-height:1!important;letter-spacing:0!important}
.scoreboard-help-text{margin:10px 0 0!important;font-size:13px!important;line-height:1.3!important;color:#cbd5e1!important;text-align:center}
@media(max-width:600px){
  body{overflow-x:hidden!important}.container{padding-left:6px!important;padding-right:6px!important}.card{padding:10px!important}
  .scoreboard-mobile-compact-panel{padding:6px!important;border-radius:10px!important;margin:6px auto!important}
  .scoreboard-mobile-compact-panel .scoreboard-call-label{font-size:9px!important;margin-bottom:2px!important;line-height:1!important}
  .scoreboard-compact-call-main{grid-template-columns:1fr 58px!important;gap:4px!important;margin-bottom:4px!important;max-width:100%!important}
  .scoreboard-mobile-compact-panel #scoreCallDisplay{min-height:30px!important;font-size:clamp(19px,7vw,28px)!important;border-radius:7px!important;padding:2px 5px!important}
  .scoreboard-compact-status{min-width:58px!important;padding:3px!important;border-radius:7px!important;gap:1px!important;font-size:7px!important;line-height:1!important}
  .scoreboard-compact-teams{grid-template-columns:1fr 1fr!important;gap:4px!important;margin-bottom:4px!important;max-width:100%!important}
  .scoreboard-compact-team{border-radius:7px!important;padding:4px!important;min-height:52px!important}
  .scoreboard-compact-team-title{gap:3px!important;margin-bottom:2px!important;font-size:7px!important;line-height:1!important}
  .scoreboard-server-dot{width:7px!important;height:7px!important;min-width:7px!important}
  .scoreboard-compact-player-list{gap:1px!important}
  .scoreboard-compact-player-list div,.scoreboard-mobile-compact-panel #currentServerNameDisplay,.scoreboard-mobile-compact-panel #servingPartnerNameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer1NameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer2NameDisplay{font-size:clamp(9px,3vw,12px)!important;line-height:1.05!important}
  .scoreboard-compact-score-row{grid-template-columns:1fr 1fr .5fr!important;gap:4px!important;max-width:100%!important}
  .scoreboard-compact-score-box{border-radius:7px!important;padding:3px!important;gap:0!important}
  .scoreboard-compact-score-box small{font-size:6px!important;line-height:1!important}
  .scoreboard-mobile-compact-panel #serverTeamScoreDisplay,.scoreboard-mobile-compact-panel #receiverTeamScoreDisplay,.scoreboard-mobile-compact-panel #serverNumberBigDisplay{min-height:28px!important;font-size:clamp(18px,7vw,28px)!important}
  .scoreboard-help-text,.scoreboard-status-row{display:none!important}
  .scoreboard-control-grid{grid-template-columns:repeat(4,1fr)!important;gap:4px!important;margin-top:5px!important}
  .scoreboard-control-grid .btn{padding:7px 2px!important;font-size:9px!important;border-radius:7px!important;min-height:30px!important}
}
@media(max-width:390px){
  .scoreboard-compact-player-list div,.scoreboard-mobile-compact-panel #currentServerNameDisplay,.scoreboard-mobile-compact-panel #servingPartnerNameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer1NameDisplay,.scoreboard-mobile-compact-panel #receivingPlayer2NameDisplay{font-size:clamp(8px,2.7vw,10px)!important}
  .scoreboard-mobile-compact-panel #serverTeamScoreDisplay,.scoreboard-mobile-compact-panel #receiverTeamScoreDisplay,.scoreboard-mobile-compact-panel #serverNumberBigDisplay{min-height:24px!important;font-size:clamp(16px,6.5vw,24px)!important}
  .scoreboard-control-grid .btn{font-size:8px!important;padding:6px 1px!important}
}

/* ===== AKPC Game Results Analysis Page ===== */
.game-analysis-filter { margin-top: 18px; }
.game-analysis-date-row { margin-top: 16px; }
.game-analysis-dashboard { margin-bottom:22px; }
.game-filter-label { font-size:20px; }
@media (max-width:900px) {
  .game-analysis-date-row .btn { width:100%; text-align:center; }
}
