@import url("https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Black+Han+Sans&family=Do+Hyeon&family=Dongle&family=Gamja+Flower&family=Gowun+Batang&family=Gowun+Dodum&family=Gugi&family=Hi+Melody&family=Jua&family=Nanum+Gothic&family=Nanum+Myeongjo&family=Nanum+Pen+Script&family=Noto+Serif+KR:wght@700&family=Orbitron:wght@700&family=Oswald:wght@500;700&family=Permanent+Marker&family=Poor+Story&family=Press+Start+2P&family=Righteous&family=Roboto:wght@400;700;900&family=Russo+One&family=Song+Myung&family=Squada+One&family=Sunflower&display=swap");

body {
  margin: 0;
  padding: 0;
  background-color: #121212;
}
#rt-app {
  background-color: #121212;
  color: #e0e0e0;
  font-family: "Pretendard", "Arial", sans-serif;
  padding: 15px;
  touch-action: manipulation;
  padding-bottom: 60px;
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
}

#rt-app * {
  box-sizing: border-box;
}

/* --- [헤더] --- */
#rt-app header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}
#rt-app h2 {
  margin: 0;
  font-size: 18px;
  color: #ffcc00;
  display: flex;
  align-items: center;
  gap: 8px;
}
#rt-app #apiStatusDot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}
#rt-app #apiStatusDot.connected {
  background: #00ff00;
  box-shadow: 0 0 6px #00ff00;
}
#rt-app #apiStatusDot.error {
  background: #ff0000;
  box-shadow: 0 0 6px #ff0000;
}

/* --- [미니 스코어보드] --- */
#rt-app .preview-box {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(145deg, #1e1e1e, #000);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}
#rt-app .p-team {
  text-align: center;
  width: 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#rt-app .p-name {
  font-size: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
#rt-app .p-name:hover {
  color: #ffcc00;
}
#rt-app .p-score {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  margin-bottom: 10px;
  display: inline-block;
  cursor: pointer;
}

/* [추가] 팀 로고 및 헤더 레이아웃 */
#rt-app .p-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 5px;
}
#rt-app .p-logo-wrapper {
  margin-right: 20px;
}
#rt-app .p-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s;
}
#rt-app .p-logo:hover {
  border-color: #ffcc00;
}
#rt-app .p-score-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 선수 카드 */
#rt-app .p-player-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px;
  margin-top: 4px;
  text-align: left;
}
#rt-app .p-player-card.active {
  border-color: #ffcc00;
  background: rgba(255, 204, 0, 0.05);
}
#rt-app .p-role-badge {
  font-size: 9px;
  background: #333;
  color: #aaa;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
}
#rt-app .p-card-top {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  font-size: 12px;
}
#rt-app .p-card-name {
  color: #fff;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
#rt-app .p-card-num {
  color: #ffcc00;
  font-weight: bold;
  margin-right: 4px;
}
#rt-app .p-stats {
  font-size: 11px;
  color: #bbb;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
  border-top: 1px solid #333;
  padding-top: 4px;
}
#rt-app .stat-avg {
  color: #4cd137;
  font-weight: bold;
}

#rt-app .p-info {
  text-align: center;
  width: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
#rt-app .p-inning {
  font-size: 20px;
  font-weight: bold;
  color: #ffcc00;
  background: #222;
  padding: 2px 12px;
  border-radius: 15px;
  border: 1px solid #444;
  cursor: pointer;
  margin-top: 10px;
}

/* 다이아몬드 & BSO */
#rt-app .p-diamond-wrapper {
  width: 30px;
  height: 30px;
  position: relative;
  transform: rotate(45deg);
  margin: 10px 0 15px 0;
}
#rt-app .p-base {
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: #333;
  border: 2px solid #c5c5c5;
  cursor: pointer;
}
#rt-app .p-base.b1 {
  right: -30px;
  top: 0;
}
#rt-app .p-base.b2 {
  left: 0;
  top: 0;
}
#rt-app .p-base.b3 {
  left: 0;
  top: 35px;
}
#rt-app .p-base.active {
  background-color: #ffcc00;
  box-shadow: 0 0 8px #ffcc00;
  border-color: #ffcc00;
  z-index: 1;
}
#rt-app .p-bso-row {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  gap: 5px;
}
#rt-app .p-label {
  font-size: 20px;
  width: 12px;
  margin-right: 15px;
  font-weight: 900;
}
#rt-app .p-dot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #2a2a2a;
  margin-right: 10px;
  border: 2px solid #c5c5c5;
  cursor: pointer;
  position: relative; /* [NEW] 아래 ::after 히트박스 확장의 기준점 */
}
/* [NEW] 라이브 중 한손 조작 시 오탭 방지 — 다이아몬드/BSO 점의 회전 좌표·시각 크기(25px)는 그대로
   두고, 실제 탭 가능 영역만 ::after 로 넓힌다. 인접 요소와의 간격이 10px이라 5px 확장까지는
   서로 겹치지 않는다(더 키우면 인접 점과 히트박스가 겹쳐 옆 점이 눌리는 역효과가 난다). */
#rt-app .p-base::after,
#rt-app .p-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
}
#rt-app .p-dot.b.active {
  background: #2ecc71;
  box-shadow: 0 0 5px #2ecc71;
}
#rt-app .p-dot.s.active {
  background: #f1c40f;
  box-shadow: 0 0 5px #f1c40f;
}
#rt-app .p-dot.o.active {
  background: #e74c3c;
  box-shadow: 0 0 5px #e74c3c;
}

/* --- [컨트롤 영역] --- */
#rt-app .control-group {
  background: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid #333;
}
#rt-app .label {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
  display: block;
  font-weight: bold;
  text-transform: uppercase;
}
#rt-app .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
#rt-app input,
#rt-app textarea {
  user-select: text;
  -webkit-user-select: text;
}
#rt-app input[type="text"] {
  background: #2c2c2c;
  border: 1px solid #444;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  width: 100%;
}
#rt-app input[type="password"] {
  background: #2c2c2c;
  border: 1px solid #444;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  width: 100%;
}
#rt-app button {
  background: #3a3a3a;
  color: #fff;
  border: none;
  padding: 12px 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  flex: 1;
  cursor: pointer;
}
#rt-app button:active {
  transform: scale(0.96);
}

#rt-app .btn-plus {
  background: #27ae60;
}
#rt-app .btn-minus {
  background: #c0392b;
}
#rt-app .btn-show {
  /* background: #34495e; */
  background: #3a3a3a !important;
  margin-right: 2px;
}
#rt-app .btn-next-batter {
  /* background: #8e44ad; */
  background: #3a3a3a !important;
  line-height: 1.2;
}

#rt-app .btn-ball {
  background: #27ae60;
  color: #fff;
  border: 2px solid #444;
}
#rt-app .btn-strike {
  background: #f1c40f;
  color: #000;
  border: 2px solid #444;
}
#rt-app .btn-out {
  background: #c0392b;
  color: #fff;
  border: 2px solid #444;
}
#rt-app .btn-reset {
  /* background: #7f8c8d; */
  background: #3a3a3a !important;
  border: 2px solid #444;
}

/* 타석 결과 버튼 */
#rt-app .result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}
#rt-app .btn-hit {
  background: #e67e22;
  color: #fff;
  border: 1px solid #d35400;
  font-size: 13px;
}
#rt-app .btn-walk {
  background: #3498db;
  color: #fff;
  border: 1px solid #2980b9;
}
#rt-app .btn-sac {
  background: #16a085;
  color: #fff;
  border: 1px solid #1abc9c;
}
#rt-app .btn-out-res {
  background: #8e44ad;
  color: #fff;
  border: 1px solid #9b59b6;
}
#rt-app .btn-action {
  background: #34495e;
  color: #fff;
  border: 1px solid #2c3e50;
  font-weight: bold;
  text-transform: uppercase;
}

#rt-app .btn-base {
  background: #222;
  color: #666;
  border: 2px solid #444;
}
#rt-app .btn-base.active {
  background: #ffcc00;
  color: #000;
  border-color: #ffcc00;
}

/* --- [모달] --- */
#rt-app .modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}
#rt-app .modal-overlay.open {
  display: flex;
  /* 로그인 오버레이(#loginOverlay, z-index 99999)보다 위에 떠야 로그인 전 모달(회원가입/비밀번호 재설정)이 보인다.
     base 규칙(#rt-app .modal-overlay: z-index 1000)이 .rt-s27(0,1,0)보다 명시도가 높아 눌렀던 문제를 근본 수정한다. */
  z-index: 100001;
}
#rt-app .modal-content {
  background: #1a1a1a;
  width: 95%;
  max-width: 500px;
  height: 90vh;
  border-radius: 12px;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
}
#rt-app .modal-header {
  padding: 15px;
  border-bottom: 1px solid #333;
  font-size: 18px;
  font-weight: bold;
  color: #ffcc00;
  text-align: center;
  background: #252525;
  border-radius: 12px 12px 0 0;
}
#rt-app .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* [UX 개선] 라인업 리스트 스타일 (2단 구조) */
#rt-app .lineup-row {
  display: flex;
  flex-direction: column; /* 세로 배치 */
  margin-bottom: 8px;
  background: #252525;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #333;
}

/* 윗줄: 입력 필드들 */
#rt-app .lineup-top {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

/* 아랫줄: 성적 요약 */
#rt-app .lineup-bot {
  display: flex;
  align-items: center;
  margin-top: 6px;
  padding-left: 5px;
  font-size: 12px;
  color: #aaa;
  border-top: 1px solid #333;
  padding-top: 6px;
}

#rt-app .player-img-wrapper {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  flex-shrink: 0;
  position: relative;
}
#rt-app .player-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  background: #333;
  border: 1px solid #555;
  transition: border-color 0.2s;
}
#rt-app .player-img:hover {
  border-color: #ffcc00;
}
#rt-app .lineup-bot-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#rt-app .inp-pos {
  width: 45px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 8px 0;
  text-align: center;
  border-radius: 4px;
  font-size: 13px;
}
#rt-app .inp-num {
  width: 100px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 8px 0;
  text-align: center;
  border-radius: 4px;
  font-size: 13px;
}
/* 이름 입력창: 남은 공간 모두 차지 */
#rt-app .inp-name {
  flex: 1;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
}

#rt-app .inning-log {
  color: #ffcc00;
  font-family: monospace;
  font-size: 11px;
}
#rt-app .stat-summary {
  color: #4cd137;
  font-weight: bold;
}

#rt-app .modal-footer {
  padding: 15px;
  border-top: 1px solid #333;
  background: #252525;
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 10px;
}
#rt-app .btn-save {
  background: #2ecc71;
}
#rt-app .btn-cancel {
  background: #555;
}
#rt-app .btn-add {
  background: #3498db;
  margin-bottom: 15px;
  font-size: 14px;
  padding: 10px;
}

/* 프리셋 영역 */
#rt-app .preset-wrapper {
  background: #222;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #444;
}
#rt-app .preset-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}
#rt-app .preset-select {
  flex: 1;
  background: #111;
  color: #fff;
  border: 1px solid #555;
  padding: 8px;
  border-radius: 4px;
}

/* 로그인 오버레이 */
#rt-app #loginOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
}
#rt-app .login-card {
  background: #1e1e1e;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 360px;
  max-width: 90%;
}
#rt-app #loginOverlay h2 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #e67e22;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#rt-app #loginOverlay input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}
#rt-app #loginOverlay input:focus {
  border-color: #ffcc00;
  outline: none;
}
#rt-app #loginOverlay button {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: #e67e22;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.3s;
}
#rt-app #loginOverlay button:hover {
  background: #d35400;
}

/* [추가] 기록 수정 모달 스타일 */
#rt-app .stat-add-row {
  display: flex;
  gap: 5px;
  background: #252525;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #555;
  align-items: center;
}
#rt-app .stat-input-inning {
  width: 50px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
}
#rt-app .btn-add-stat {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#rt-app .stat-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #333;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid #444;
}
#rt-app .stat-inning-label {
  font-weight: bold;
  color: #ffcc00;
  width: 50px;
}
#rt-app .stat-select {
  background: #222;
  color: #fff;
  border: 1px solid #555;
  padding: 5px;
  border-radius: 4px;
  font-size: 14px;
  flex: 1;
  margin: 0 10px;
}
#rt-app .btn-del-stat {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* 백업 리스트 스타일 */
#rt-app .backup-list-container {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
#rt-app .backup-list-item {
  padding: 10px 8px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  word-break: break-all;
}
#rt-app .backup-list-item:last-child {
  border-bottom: none;
}
#rt-app .backup-list-item.selected {
  background: #3498db;
  color: #fff;
}
#rt-app .backup-list-empty {
  padding: 15px 8px;
  color: #888;
  text-align: center;
}

/* [추가] 통계 대시보드 스타일 */
#rt-app .stats-controls {
  display: flex;
  gap: 5px;
  background: #222;
  padding: 10px;
  border: 1px solid #444;
  margin-bottom: 15px;
  border-radius: 6px;
  align-items: center;
}
#rt-app .stats-file-select {
  flex: 1;
  background: #111;
  color: #fff;
  border: 1px solid #555;
  padding: 5px;
  border-radius: 4px;
  height: 100px;
  font-size: 14px;
}
#rt-app .stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin-bottom: 20px;
}
#rt-app .stats-table th,
#rt-app .stats-table td {
  padding: 12px 8px;
  text-align: center;
  border-bottom: 1px solid #333;
}
#rt-app .stats-table th {
  background: #333;
  color: #ffcc00;
}
#rt-app .stats-table tr:nth-child(even) {
  background: #1e1e1e;
}
#rt-app .team-divider {
  background: #2c3e50;
  color: #fff;
  padding: 8px;
  font-weight: bold;
  margin-top: 10px;
  border-radius: 4px;
}

/* [추가] 통계 모달 버튼 스타일 개선 */
#rt-app .modal-close-absolute {
  position: absolute;
  top: 0px;
  right: 15px;
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 28px;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
}
#rt-app .modal-close-absolute:hover {
  color: #fff;
}
#rt-app .btn-calc-stats {
  background: #3498db;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  margin: 0 !important;
  height: 35px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}
#rt-app .btn-calc-stats:hover {
  background: #2980b9;
}

#rt-app #previewImgLarge {
  max-width: 100%;
  max-height: 60vh;
  width: 350px;
  height: 350px;
  object-fit: contain;
  margin: 10px auto 20px auto;
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid #444;
}

@keyframes scoreFlip {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateY(20px);
    opacity: 0;
  }
  51% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* [추가] 스코어 카드 플립 애니메이션 */
#rt-app .flip-animate {
  animation: scoreFlip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
@keyframes scoreFlip {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(20px);
    opacity: 0;
  }
  51% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* [추가] 달력 넘기기 애니메이션 */
#rt-app .calendar-animate {
  animation: scoreCalendar 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center top;
}
@keyframes scoreCalendar {
  0% {
    transform: rotateX(0deg) translateY(0);
    opacity: 1;
  }
  50% {
    transform: rotateX(-90deg) translateY(-10px);
    opacity: 0;
  }
  51% {
    transform: rotateX(90deg) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg) translateY(0);
    opacity: 1;
  }
}

/* [추가] 주사위 롤링 애니메이션 */
#rt-app .dice-animate {
  animation: scoreDice 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1000px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
@keyframes scoreDice {
  0% {
    transform: rotateX(0deg) translateZ(0);
    opacity: 1;
  }
  50% {
    transform: rotateX(-90deg) translateZ(50px);
    opacity: 0;
  }
  51% {
    transform: rotateX(90deg) translateZ(50px);
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg) translateZ(0);
    opacity: 1;
  }
}

/* [추가] 슬롯 머신 롤링 */
#rt-app .slot-animate {
  animation: scoreSlot 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scoreSlot {
  0% {
    transform: translateY(0);
    filter: blur(0);
  }
  50% {
    transform: translateY(40px);
    filter: blur(2px);
    opacity: 0;
  }
  51% {
    transform: translateY(-40px);
    filter: blur(2px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

/* [추가] 플립 클록 (3D) */
#rt-app .flipclock-animate {
  animation: scoreFlipClock 0.6s ease-in-out;
  perspective: 1000px;
}
@keyframes scoreFlipClock {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(-90deg);
    opacity: 0.5;
  }
  51% {
    transform: rotateX(90deg);
    opacity: 0.5;
  }
  100% {
    transform: rotateX(0);
  }
}

/* [추가] 스케일 업 & 바운스 */
#rt-app .bounce-animate {
  animation: scoreBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes scoreBounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

/* [추가] 고스트 페이드 아웃 */
#rt-app .ghost-animate {
  animation: scoreGhost 0.6s ease-out;
}
@keyframes scoreGhost {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-30px);
    opacity: 0;
  }
  51% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* [추가] 가로 슬라이드 셔터 */
#rt-app .shutter-animate {
  animation: scoreShutter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scoreShutter {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(40px);
    opacity: 0;
  }
  51% {
    transform: translateX(-40px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* [추가] 스파크/파티클 효과 (Pulse) */
#rt-app .spark-animate {
  animation: scoreSpark 0.6s ease-out;
}
@keyframes scoreSpark {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.3);
    filter: brightness(2);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* [추가] 네온 깜빡임 */
#rt-app .neon-animate {
  animation: scoreNeon 0.6s linear;
}
@keyframes scoreNeon {
  0%,
  100% {
    text-shadow: none;
    opacity: 1;
  }
  25%,
  75% {
    text-shadow:
      0 0 10px #fff,
      0 0 20px var(--accent-color);
    opacity: 0.7;
  }
  50% {
    text-shadow:
      0 0 20px #fff,
      0 0 40px var(--accent-color);
    opacity: 1;
  }
}

/* [추가] 3D 수직 플립 (Rolling Cube) */
#rt-app .cube-animate {
  animation: scoreCube 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1000px;
  transform-style: preserve-3d;
}
@keyframes scoreCube {
  0% {
    transform: rotateX(0deg) translateZ(0);
    opacity: 1;
  }
  50% {
    transform: rotateX(-90deg) translateZ(20px);
    opacity: 0.5;
  }
  51% {
    transform: rotateX(90deg) translateZ(20px);
    opacity: 0.5;
  }
  100% {
    transform: rotateX(0deg) translateZ(0);
    opacity: 1;
  }
}

/* [추가] 미니멀 및 현대적 효과 (Minimal & Modern) */
#rt-app .minimal-animate {
  animation: scoreMinimal 0.6s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes scoreMinimal {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  50% {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(2px);
  }
  51% {
    opacity: 0;
    transform: scale(1.05);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* [추가] Sci-Fi 3D (하이퍼 점프) */
#rt-app .scifi-animate {
  animation:
    scoreSciFi 0.6s cubic-bezier(0.17, 0.67, 0.38, 1.2) forwards,
    energyGlitch 3s infinite 0.6s;
  font-family: "Orbitron", sans-serif;
  color: #ffd700 !important;
  perspective: 1500px;
  transform-style: preserve-3d;
  text-shadow:
    1px 1px 0px #b39700,
    2px 2px 0px #b39700,
    3px 3px 0px #998100,
    4px 4px 0px #998100,
    5px 5px 0px #806c00,
    6px 6px 0px #806c00,
    7px 7px 0px #665600,
    8px 8px 0px #665600;
}
@keyframes scoreSciFi {
  0% {
    opacity: 1;
    transform: translateZ(0) rotateX(0);
    filter: drop-shadow(0 0 10px cyan);
  }
  50% {
    opacity: 0;
    transform: translateZ(-1000px) rotateX(90deg) scale(0);
    filter: blur(20px);
  }
  51% {
    opacity: 0;
    transform: translateZ(-1000px) rotateX(-90deg) scale(0);
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    transform: translateZ(0) rotateX(0);
    filter: drop-shadow(0 0 20px cyan) drop-shadow(0 0 40px blue);
  }
}
@keyframes energyGlitch {
  0%,
  100% {
    transform: translate3d(0, 0, 0) skew(0deg);
  }
  20% {
    transform: translate3d(-2px, 1px, 0) skew(0.5deg);
  }
  40% {
    transform: translate3d(2px, -1px, 0) skew(-0.5deg);
    filter: drop-shadow(0 0 10px red) drop-shadow(0 0 30px orange);
  }
  60% {
    transform: translate3d(0, 2px, 0) skew(0.2deg);
  }
  80% {
    transform: translate3d(1px, -2px, 0) skew(-0.2deg);
  }
}

/* [추가] Cyber Glitch (RGB 분리) */
#rt-app .cyber-glitch-animate {
  animation: scoreGlitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  text-shadow:
    2px 0 #ff00c1,
    -2px 0 #00fff9;
}
@keyframes scoreGlitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 3px);
    clip-path: inset(10% 0 30% 0);
  }
  40% {
    transform: translate(-3px, -3px);
    clip-path: inset(40% 0 10% 0);
  }
  60% {
    transform: translate(3px, 3px);
    clip-path: inset(20% 0 50% 0);
  }
  80% {
    transform: translate(3px, -3px);
    clip-path: inset(60% 0 5% 0);
  }
  100% {
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
}

/* [추가] Magma Burst (화염 폭발) */
#rt-app .magma-animate {
  animation: scoreMagma 0.6s ease-out forwards;
  color: #ff4500 !important;
  filter: drop-shadow(0 0 15px #ff0000);
}
@keyframes scoreMagma {
  0% {
    transform: scale(1);
    filter: brightness(1) blur(0);
  }
  30% {
    transform: scale(1.8) rotate(5deg);
    filter: brightness(3) blur(2px);
    opacity: 0.7;
  }
  100% {
    transform: scale(1) rotate(0);
    filter: brightness(1) blur(0);
    opacity: 1;
  }
}

/* [추가] Electric Jitter (전기 스파크) */
#rt-app .electric-animate {
  animation: scoreElectric 0.5s linear infinite;
  color: #fff !important;
  text-shadow:
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 20px #0077ff,
    0 0 30px #0077ff;
}
@keyframes scoreElectric {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
  10% {
    transform: translate(-2px, -1px);
    opacity: 0.8;
  }
  20% {
    transform: translate(2px, 1px);
    opacity: 0.9;
  }
  30% {
    transform: translate(-1px, 2px);
    opacity: 0.7;
  }
  40% {
    transform: translate(1px, -2px);
    opacity: 1;
  }
  50% {
    animation-timing-function: steps(1);
    opacity: 0.4;
  }
}

/* [추가] Vortex Spin (소용돌이) */
#rt-app .vortex-animate {
  animation: scoreVortex 0.7s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
  perspective: 1000px;
}
@keyframes scoreVortex {
  0% {
    transform: rotate(0deg) scale(1) translateZ(0);
    opacity: 1;
    filter: blur(0);
  }
  50% {
    transform: rotate(540deg) scale(0) translateZ(-500px);
    opacity: 0;
    filter: blur(10px);
  }
  51% {
    transform: rotate(-540deg) scale(0) translateZ(-500px);
    opacity: 0;
  }
  100% {
    transform: rotate(0deg) scale(1) translateZ(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* [추가] Ghost Echo (잔상 효과) */
#rt-app .ghost-echo-animate {
  animation: scoreGhostEcho 0.6s ease-out forwards;
}
@keyframes scoreGhostEcho {
  0% {
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
  }
  50% {
    text-shadow:
      15px 0 0 rgba(255, 0, 0, 0.5),
      -15px 0 0 rgba(0, 255, 255, 0.5),
      0 15px 0 rgba(0, 255, 0, 0.5);
    transform: scale(1.2);
    opacity: 0.5;
  }
  100% {
    text-shadow:
      0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
    opacity: 1;
  }
}

.control-group .row {
  justify-content: flex-start !important;
  gap: 8px;
}
html,
body,
#rt-app {
  background-color: transparent !important;
}

/* [NEW] 액션 선택 모달 스타일 */
.action-modal-content {
  height: auto !important;
  max-height: 80vh;
  max-width: 400px;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px;
}
.btn-action-item {
  padding: 20px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s;
}
.btn-action-item:active {
  transform: scale(0.95);
}
.btn-action-item.strike {
  background: #f1c40f;
  color: #000;
}
.btn-action-item.homerun {
  background: linear-gradient(135deg, #e67e22, #c0392b);
}
.btn-action-item.walk {
  background: #27ae60;
}
.btn-action-item.out {
  background: #c0392b;
}
.btn-action-item.kkk {
  background: #8e44ad;
}
.btn-action-item.doubleplay {
  background: #d35400;
}
.btn-action-item.foul {
  background: #7f8c8d;
}
.btn-action-item.niceball {
  background: #2c3e50;
  border: 2px solid #8b0000;
}
.btn-action-item.replay {
  background: #2980b9;
}

/* 커스텀 텍스트 섹션 */
.custom-text-section {
  border-top: 1px solid #333;
  margin-top: 10px;
  padding-top: 10px;
}
.custom-text-list {
  max-height: 290px;
  overflow-y: auto;
  padding: 0 20px 0px 20px;
}
.custom-text-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2c2c2c;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  cursor: pointer;
}
.custom-text-item:hover {
  background: #3a3a3a;
}
.custom-text-item .text-content {
  font-size: 14px;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-btns {
  display: flex;
  gap: 8px;
}
.btn-item-edit,
.btn-item-del {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 0 5px;
}
.btn-item-edit:hover {
  color: #ffcc00;
}
.btn-item-del:hover {
  color: #e74c3c;
}

/* 커스텀 텍스트 입력 영역 */
.custom-text-row {
  padding: 0 20px 20px 20px;
  display: flex;
  gap: 8px;
}
.custom-text-row input {
  flex: 1;
  background: #2c2c2c;
  border: 1px solid #444;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}
.btn-send-custom {
  background: #e67e22;
  color: #fff;
  border: none;
  padding: 0 15px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}
.btn-save-custom {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* [NEW] Layout Control Panel */
.layout-control-panel {
  border: 1px solid #444;
}
.layout-header {
  color: #ffcc00;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  font-size: 14px;
}
.layout-select {
  width: 100%;
  padding: 10px;
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 16px;
}
.layout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

/* 드래그 앤 드롭 모바일 최적화 */
#rt-app .drag-handle {
  cursor: grab;
  padding: 5px 5px; /* 터치 영역 확대 */
  margin-left: -5px;
  color: #666;
  font-size: 20px;
  user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#rt-app .lineup-row.dragging {
  opacity: 0.9;
  background: #333;
  border: 1px solid #ffcc00; /* 강조 테두리 */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6); /* 떠오르는 효과 */
  transform: scale(1.02); /* 살짝 커지는 효과 */
  z-index: 1000;
  position: relative;
}

#rt-app .remote-dragging {
  opacity: 0.5;
  background: #333 !important;
  border: 2px dashed #ffcc00 !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.remote-drag-handle {
  touch-action: none;
  user-select: none;
}

/* 버튼 공통 스타일 */
.btn-nav {
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-nav:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* 로그아웃 버튼 전용 */
.btn-logout {
  background: #fdfdfd;
  border: 1px solid #ff4d4f;
  color: #ff4d4f;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.btn-logout:hover {
  background: #fff1f0;
}

/* 새 경기 시작 버튼 전용 */
.btn-newgame {
  background: #e67e22;
  border: none;
  padding: 6px 15px;
  font-size: 13px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn-newgame:hover {
  background: #d35400;
}

.header-btn,
#rt-app .header-btn {
  background: #2c2c2c;
  border: 1px solid #444;
  padding: 5px 8px;
  font-size: 11px;
  margin-left: 2px;
  border-radius: 4px;
  color: #e0e0e0;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  vertical-align: middle;
  flex: none; /* 부모 flex 컨테이너에서 늘어나지 않도록 설정 */
  width: auto; /* 전체 너비를 차지하지 않도록 설정 */
}

/* --- [NEW] 비차단 토스트 알림 (alert() 대체 — showToast()) --- */
#rtToast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(20, 24, 32, 0.95);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000000;
  max-width: 88vw;
  text-align: center;
}
#rtToast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- [공지사항 팝업] --- */
#rt-app .notice-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* 배경 어둡게 하지 않음 */
  z-index: 999999;
  justify-content: center;
  align-items: center;
  pointer-events: none; /* 팝업 외 영역 클릭 허용 */
}
#rt-app .notice-content {
  pointer-events: auto; /* 팝업 내부 클릭은 허용 */
  background: #1e1e1e;
  border: 1px solid #444;
  border-top: 4px solid #ffcc00; /* 상단 포인트 라인 */
  border-radius: 16px;
  width: 85%;
  max-width: 380px;
  padding: 25px;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #fff;
  animation: scoreBounce 0.4s ease-out;
}
#rt-app .notice-header {
  font-size: 18px;
  font-weight: bold;
  color: #ffcc00;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 1px solid #333;
  padding-bottom: 12px;
}
#rt-app .notice-body {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 25px;
  white-space: pre-wrap;
  color: #ddd;
}
#rt-app .notice-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #333;
  padding-top: 15px;
}
#rt-app .btn-notice-hide {
  background: none;
  border: none;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
#rt-app .btn-notice-close {
  background: #ffcc00;
  color: #000;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
}
#rt-app .btn-notice-close:active {
  transform: scale(0.95);
}
#rt-app .header-btn:hover {
  background: #3d3d3d;
  border-color: #666;
}
#rt-app .header-btn.primary {
  background: #e67e22;
  border-color: #d35400;
  color: white;
}
#rt-app .header-btn.primary:hover {
  background: #d35400;
}
#rt-app .header-btn.danger {
  background: #c0392b;
  border-color: #a93226;
  color: white;
}
#rt-app .header-btn.danger:hover {
  background: #a93226;
}
header h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  line-height: 1.4;
}

/* [NEW] 헤더 버튼 정리 — 자주 안 쓰는 admin 전용 도구를 접이식 메뉴로 묶고,
   계정 액션(암호변경/로그아웃/탈퇴)은 구분선으로 분리한다. */
.header-menu {
  position: relative;
  margin-left: 2px;
  vertical-align: middle;
}
.header-menu > summary {
  list-style: none;
}
.header-menu > summary::-webkit-details-marker {
  display: none;
}
.header-menu-body {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px;
  z-index: 20000;
  min-width: 150px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.header-menu-body .header-btn {
  margin-left: 0;
  width: 100%;
}
#rt-app .header-sep {
  width: 1px;
  align-self: stretch;
  background: #444;
  margin: 0 6px;
}

/* Guide Tour Styles */
.guide-overlay-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 9998;
  display: none;
}
.guide-highlight {
  position: relative;
  z-index: 9999 !important;
  box-shadow:
    0 0 0 4px #e67e22,
    0 0 0 9999px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  pointer-events: none; /* 가이드 중에는 클릭 방지 (필요시 auto로 변경) */
}
.guide-tooltip {
  position: absolute;
  z-index: 10000;
  background: #fff;
  color: #333;
  padding: 15px;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  line-height: 1.5;
  display: none;
}
.guide-tooltip h4 {
  margin: 0 0 8px 0;
  color: #e67e22;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}
.guide-tooltip .guide-content {
  margin-bottom: 15px;
  color: #555;
}
.guide-tooltip .guide-nav {
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.guide-tooltip button {
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  pointer-events: auto;
}
.guide-tooltip button:hover {
  background: #2980b9;
}
.guide-tooltip button.close {
  background: #95a5a6;
}
.guide-tooltip button.close:hover {
  background: #7f8c8d;
}

/* [REFACTOR] Classes generated from inline style="" attributes in scoreboard-rt-tp1.html (display kept inline). */
.rt-s1 {
  font-size: 13px;
  color: #aaa;
}
.rt-s2 {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 5px;
}
.rt-s3 {
  background: #333;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #444;
}
.rt-s4 {
  background: #9b59b6;
}
.rt-s5 {
  background: #3498db;
}
.rt-s6 {
  background: #2c3e50;
}
.rt-s7 {
  height: auto;
  max-width: 400px;
}
.rt-s8 {
  z-index: 2200;
}
.rt-s9 {
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}
.rt-s10 {
  height: auto;
  max-height: 80vh;
  max-width: 320px;
}
.rt-s11 {
  z-index: 2600;
}
.rt-s12 {
  flex: 1;
  overflow-y: auto;
}
.rt-s13 {
  flex-direction: column;
  padding: 15px;
}
.rt-s14 {
  background: #2c3e50;
  text-align: center;
}
.rt-s15 {
  height: 90vh;
  max-width: 800px;
  position: relative;
}
.rt-s16 {
  z-index: 1400;
}
.rt-s17 {
  background: #c0392b;
}
.rt-s18 {
  width: 100%;
  height: 60px;
  padding: 10px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 4px;
  resize: none;
}
.rt-s19 {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 4px;
}
.rt-s20 {
  font-size: 12px;
  color: #ff4d4d;
  margin-bottom: 10px;
  line-height: 1.4;
}
.rt-s21 {
  height: auto;
  max-width: 320px;
}
.rt-s22 {
  height: auto;
  max-width: 300px;
}
.rt-s23 {
  z-index: 2100;
}
.rt-s24 {
  font-size: 12px;
  margin-bottom: 10px;
}
.rt-s25 {
  width: 100%;
  margin-bottom: 5px;
  padding: 10px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 4px;
}
.rt-s26 {
  height: auto;
  max-width: 360px;
}
.rt-s27 {
  z-index: 100000;
}
.rt-s28 {
  width: 100%;
  text-align: left;
}
.rt-s29 {
  z-index: 2500;
}
.rt-s30 {
  background: #e67e22;
}
.rt-s31 {
  flex-direction: column;
  gap: 10px;
}
.rt-s32 {
  flex: 0 0 60px;
  background: #555;
  padding: 5px;
  font-size: 12px;
}
.rt-s33 {
  width: 40px;
  text-align: center;
  font-weight: bold;
  color: #ffcc00;
}
.rt-s34 {
  flex: 1;
  background: #444;
}
.rt-s35 {
  align-items: center;
  gap: 10px;
}
.rt-s36 {
  background: #222;
  margin-bottom: 15px;
}
.rt-s37 {
  font-size: 11px;
  color: #aaa;
  margin-top: 5px;
  text-align: center;
}
.rt-s38 {
  background: #2ecc71;
  flex: 0 0 60px;
}
.rt-s39 {
  background: #34495e;
}
.rt-s40 {
  flex: 1;
  text-align: left;
}
.rt-s41 {
  margin-bottom: 5px;
}
.rt-s42 {
  height: auto;
  max-height: 90vh;
  max-width: 400px;
}
.rt-s43 {
  z-index: 2400;
}
.rt-s44 {
  background: #7f8c8d;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.rt-s45 {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  min-height: 32px;
  align-items: center;
}
.rt-s46 {
  font-family: &quot;
  squada one&quo: Squada One&quot;
  , cursiv: , cursive;
}
.rt-s47 {
  font-family: &quot;
  russo one&quo: Russo One&quot;
  , sans-seri: , sans-serif;
}
.rt-s48 {
  font-family: &quot;
  press start 2p&quo: Press Start 2P&quot;
  , cursiv: , cursive;
}
.rt-s49 {
  font-family: &quot;
  permanent marker&quo: Permanent Marker&quot;
  , cursiv: , cursive;
}
.rt-s50 {
  font-family: &quot;
  righteous&quo: Righteous&quot;
  , cursiv: , cursive;
}
.rt-s51 {
  font-family: &quot;
  anton&quo: Anton&quot;
  , sans-seri: , sans-serif;
}
.rt-s52 {
  font-family: &quot;
  bebas neue&quo: Bebas Neue&quot;
  , sans-seri: , sans-serif;
}
.rt-s53 {
  font-family: &quot;
  song myung&quo: Song Myung&quot;
  , seri: , serif;
}
.rt-s54 {
  font-family: &quot;
  gugi&quo: Gugi&quot;
  , cursiv: , cursive;
}
.rt-s55 {
  font-family: &quot;
  sunflower&quo: Sunflower&quot;
  , sans-seri: , sans-serif;
}
.rt-s56 {
  font-family: &quot;
  hi melody&quo: Hi Melody&quot;
  , cursiv: , cursive;
}
.rt-s57 {
  font-family: &quot;
  poor story&quo: Poor Story&quot;
  , cursiv: , cursive;
}
.rt-s58 {
  font-family: &quot;
  gamja flower&quo: Gamja Flower&quot;
  , cursiv: , cursive;
}
.rt-s59 {
  font-family: &quot;
  dongle&quo: Dongle&quot;
  , sans-seri: , sans-serif;
}
.rt-s60 {
  font-family: &quot;
  gowun batang&quo: Gowun Batang&quot;
  , seri: , serif;
}
.rt-s61 {
  font-family: &quot;
  gowun dodum&quo: Gowun Dodum&quot;
  , sans-seri: , sans-serif;
}
.rt-s62 {
  font-family: &quot;
  nanum pen script&quo: Nanum Pen Script&quot;
  , cursiv: , cursive;
}
.rt-s63 {
  font-family: &quot;
  nanum myeongjo&quo: Nanum Myeongjo&quot;
  , seri: , serif;
}
.rt-s64 {
  font-family: &quot;
  nanum gothic&quo: Nanum Gothic&quot;
  , sans-seri: , sans-serif;
}
.rt-s65 {
  font-family: &quot;
  jua&quo: Jua&quot;
  , sans-seri: , sans-serif;
}
.rt-s66 {
  font-family: &quot;
  do hyeon&quo: Do Hyeon&quot;
  , sans-seri: , sans-serif;
}
.rt-s67 {
  font-family: &quot;
  black han sans&quo: Black Han Sans&quot;
  , sans-seri: , sans-serif;
}
.rt-s68 {
  font-family: Impact;
}
.rt-s69 {
  font-family: &quot;
  noto serif kr&quo: Noto Serif KR&quot;
  , seri: , serif;
}
.rt-s70 {
  font-family: &quot;
  orbitron&quo: Orbitron&quot;
  , sans-seri: , sans-serif;
}
.rt-s71 {
  font-family: &quot;
  roboto&quo: Roboto&quot;
  , sans-seri: , sans-serif;
}
.rt-s72 {
  font-family: &quot;
  oswald&quo: Oswald&quot;
  , sans-seri: , sans-serif;
}
.rt-s73 {
  font-family: Arial;
}
.rt-s74 {
  width: 100%;
}
.rt-s75 {
  width: 100%;
  padding: 2px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 3px;
}
.rt-s76 {
  flex: 1;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  font-size: 10px;
  text-align: center;
  color: #ccc;
}
.rt-s77 {
  width: 60px;
  height: 40px;
  border: none;
  background: none;
}
.rt-s78 {
  font-size: 11px;
  color: #888;
  margin-top: 5px;
}
.rt-s79 {
  font-weight: normal;
  font-size: 0.9em;
}
.rt-s80 {
  z-index: 2300;
}
.rt-s81 {
  background: #555;
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.rt-s82 {
  background: #c0392b;
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.rt-s83 {
  background: #3498db;
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.rt-s84 {
  gap: 10px;
}
.rt-s85 {
  padding: 8px 15px;
  background: #444;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
  cursor: pointer;
}
.rt-s86 {
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.rt-s87 {
  margin-bottom: 10px;
}
.rt-s88 {
  z-index: 2000;
}
.rt-s89 {
  width: 100%;
  height: 100%;
  background: #111;
  color: #0f0;
  border: none;
  padding: 10px;
  font-family: monospace;
  resize: none;
}
.rt-s90 {
  background: #111;
  padding: 0;
}
.rt-s91 {
  height: 80vh;
}
.rt-s92 {
  z-index: 1300;
}
.rt-s93 {
  background: #e67e22;
  margin-right: 5px;
}
.rt-s94 {
  background: #3498db;
  margin-right: 5px;
}
.rt-s95 {
  width: 100%;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  padding: 5px;
  margin-bottom: 10px;
}
.rt-s96 {
  flex: 0 0 60px;
  background: #2ecc71;
  margin-left: 5px;
}
.rt-s97 {
  height: auto;
  max-height: 90vh;
}
.rt-s98 {
  z-index: 1200;
}
.rt-s99 {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}
.rt-s100 {
  justify-content: space-between;
}
.rt-s101 {
  height: auto;
  max-height: 80vh;
}
.rt-s102 {
  z-index: 1100;
}
.rt-s103 {
  flex: 1;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}
.rt-s104 {
  flex: 1;
  margin-bottom: 0;
}
.rt-s105 {
  gap: 10px;
  margin-bottom: 15px;
}
.rt-s106 {
  flex: 0 0 50px;
  background: #2ecc71;
  padding: 0;
}
.rt-s107 {
  text-align: left;
}
.rt-s108 {
  flex: 0 0 30px;
  background: #c0392b;
  padding: 0;
}
.rt-s109 {
  flex: 0 0 50px;
  background: #3498db;
  padding: 0;
}
.rt-s110 {
  font-size: 12px;
  color: #ffcc00;
  margin-left: auto;
  font-weight: bold;
}
.rt-s111 {
  flex: 0 0 35px;
  padding: 5px;
  font-size: 14px;
  background: #27ae60;
}
.rt-s112 {
  width: 40px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
}
.rt-s113 {
  flex: 0 0 35px;
  padding: 5px;
  font-size: 14px;
  background: #c0392b;
}
.rt-s114 {
  font-size: 12px;
  color: #aaa;
  width: 60px;
}
.rt-s115 {
  margin-bottom: 5px;
  background: #252525;
  padding: 5px;
  border-radius: 4px;
}
.rt-s116 {
  margin-top: 10px;
}
.rt-s117 {
  font-size: 12px;
  background: #444;
  padding: 2px 8px;
  border-radius: 4px;
}
.rt-s118 {
  flex: 1;
  cursor: pointer;
}
.rt-s119 {
  justify-content: space-between;
  align-items: center;
  text-align: left;
}
.rt-s120 {
  flex: 1;
}
.rt-s121 {
  font-size: 11px;
  color: #888;
  width: 60px;
  font-weight: bold;
  align-items: center;
  margin-left: 10px;
}
.rt-s122 {
  cursor: pointer;
}
.rt-s123 {
  color: #ffcc00;
}
.rt-s124 {
  font-size: 12px;
  color: #666;
}
.rt-s125 {
  background: #3498db;
  margin-top: 10px;
}

/* [NEW] 팀 로고 라이브러리 */
.logo-preview-actions {
  flex-wrap: wrap;
  justify-content: center;
}
.btn-logo-lib {
  background: #16a085;
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
.logo-lib-overlay {
  z-index: 2100;
}
.logo-lib-content {
  height: auto;
  max-height: 85vh;
  max-width: 480px;
  display: flex;
  flex-direction: column;
}
.logo-lib-header {
  background: #16a085;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-lib-count {
  font-size: 13px;
  font-weight: normal;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 10px;
  border-radius: 10px;
}
.logo-lib-body {
  overflow-y: auto;
  flex: 1;
}
.logo-lib-info {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
}
.logo-lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.logo-lib-footer {
  display: flex;
  gap: 10px;
}
.logo-lib-add-btn {
  flex: 1;
  background: #3498db;
  padding: 10px;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  cursor: pointer;
}
.logo-lib-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: #aaa;
  padding: 20px;
}
.logo-lib-msg.error {
  color: #e74c3c;
}
.logo-lib-item {
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px;
  background: #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logo-lib-thumb {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
}
.logo-lib-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-lib-name {
  font-size: 11px;
  color: #ccc;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-lib-item-actions {
  display: flex;
  gap: 4px;
}
.logo-lib-select {
  flex: 1;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 0;
  font-size: 12px;
  cursor: pointer;
}
.logo-lib-del {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ============================================================
   [PAYMENT] 이용권/결제 UI (배너·모달 3탭·구매 목록·결제내역)
   ============================================================ */
.pay-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 10px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.pay-banner span { flex: 1; word-break: keep-all; }
.pay-banner button {
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-size: 13px;
}
.pay-banner-lock { background: #7a2f2f; border: 1px solid #a94444; }
.pay-banner-warn { background: #7a5b1f; border: 1px solid #b08a35; }
.pay-banner-close { background: transparent !important; color: #fff !important; padding: 4px 8px !important; }

.pay-modal { max-width: 520px; width: 92%; }
.pay-tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.pay-tab {
  flex: 1;
  padding: 9px 4px;
  border: 1px solid #3a4759;
  border-radius: 8px 8px 0 0;
  background: #14171e;
  color: #8ea0b5;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pay-tab.active { background: #1c2029; color: #fff; border-bottom-color: #1c2029; }
.pay-body { max-height: 60vh; overflow-y: auto; }
.pay-empty { color: #8ea0b5; text-align: center; padding: 24px 0; line-height: 1.6; }
.pay-note { color: #8ea0b5; font-size: 12.5px; margin: 10px 2px 0; line-height: 1.5; }

/* 내 이용권 카드 */
.pay-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #3a4759;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #1c2029;
}
.pay-card-warn { border-color: #b08a35; }
.pay-card-off { opacity: 0.75; }
.pay-card-name { font-weight: 800; font-size: 15px; min-width: 92px; }
.pay-card-state { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-until { color: #8ea0b5; font-size: 12.5px; }
.pay-badge { font-size: 12px; font-weight: 800; border-radius: 6px; padding: 3px 8px; }
.pay-badge-free { background: #1f6f43; color: #d9f7e5; }
.pay-badge-on { background: #245a8d; color: #d8ecff; }
.pay-badge-trial { background: #6d4ba0; color: #ece0ff; }
.pay-badge-off { background: #5a2b2b; color: #ffd9d9; }
.pay-badge-none { background: #3a4149; color: #b9c4cf; }
.pay-mini-btn {
  border: 1px solid #3a4759;
  background: #242a35;
  color: #cfe0f2;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* 구매 탭 */
.pay-buy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #3a4759;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #1c2029;
  cursor: pointer;
}
.pay-buy-check { width: 18px; height: 18px; accent-color: #e67e22; }
.pay-buy-name { flex: 1; font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; gap: 2px; }
.pay-buy-hint { color: #8ea0b5; font-size: 11.5px; font-weight: 500; }
.pay-buy-price { color: #cfe0f2; font-size: 13px; white-space: nowrap; }
.pay-buy-months {
  background: #14171e;
  color: #fff;
  border: 1px solid #3a4759;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 13.5px;
}
.pay-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6px 2px;
  font-size: 15px;
  color: #cfe0f2;
}
.pay-total-row strong { font-size: 19px; color: #ffb46b; }
.pay-checkout-btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #e67e22;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.pay-checkout-btn:disabled { opacity: 0.6; cursor: default; }

/* 결제내역 탭 */
.pay-order {
  border: 1px solid #3a4759;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  background: #1c2029;
}
.pay-order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pay-order-date { color: #8ea0b5; font-size: 12px; }
.pay-order-items { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pay-order-amount { color: #ffb46b; font-weight: 800; font-size: 14.5px; }
.pay-order-amount a { color: #7fb6ff; font-size: 12.5px; margin-left: 8px; }
.pay-order-fail { color: #ff9a9a; font-size: 12px; margin-top: 4px; }
.pay-status { font-size: 12px; font-weight: 800; border-radius: 6px; padding: 3px 8px; }
.pay-status-paid { background: #1f6f43; color: #d9f7e5; }
.pay-status-created { background: #245a8d; color: #d8ecff; }
.pay-status-failed, .pay-status-canceled { background: #5a2b2b; color: #ffd9d9; }
.pay-status-refunded { background: #3a4149; color: #b9c4cf; }

/* --- [테마 썸네일 그리드] 테마 및 효과 설정 패널의 테마 선택 UI --- */
.theme-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 2px; /* 스크롤바와 카드 간격 */
}
.theme-thumb-card {
  position: relative; /* 선택 체크 배지 기준점 */
  background: #1e1e1e;
  border: 2px solid #333;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-thumb-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #14181d; /* 썸네일 여백색과 동일 */
}
.theme-thumb-label {
  padding: 4px 5px;
  font-size: 10px;
  color: #ccc;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-thumb-card.selected {
  border-color: #ff9f43;
  box-shadow: 0 0 0 1px #ff9f43, 0 0 10px rgba(255, 159, 67, 0.55);
}
.theme-thumb-card.selected .theme-thumb-label {
  color: #111;
  background: #ff9f43;
  font-weight: 700;
}
/* 선택 체크 배지 (썸네일 우상단) */
.theme-thumb-card.selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff9f43;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
/* 썸네일 이미지가 없는 테마(캡처 전) — 라벨만 크게 보여주는 플레이스홀더 */
.theme-thumb-card.no-thumb img {
  display: none;
}
.theme-thumb-card.no-thumb .theme-thumb-label {
  aspect-ratio: 16 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  font-size: 12px;
}

/* ==========================================================================
   [CONSENT] 약관·개인정보 동의 UI (회원가입 모달 · 로그인 후 동의 게이트 공용)
   ========================================================================== */
.cs-box {
  margin-top: 12px;
  border: 1px solid #3a4759;
  border-radius: 8px;
  background: #14171e;
  overflow: hidden;
}
.cs-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #1c2029;
  border-bottom: 1px solid #3a4759;
  color: #ecf0f1;
  font-size: 15px;
  cursor: pointer;
}
.cs-all input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #ffcc00;
  flex-shrink: 0;
}
.cs-list {
  padding: 4px 0;
}
.cs-item {
  border-bottom: 1px solid #262d38;
}
.cs-item:last-child {
  border-bottom: none;
}
.cs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
}
.cs-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  color: #cfd8e3;
  font-size: 14px;
  cursor: pointer;
  min-width: 0;
}
.cs-chk input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ffcc00;
  flex-shrink: 0;
}
.cs-title {
  word-break: keep-all;
}
.cs-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: #2c3542;
  color: #8ea0b5;
}
.cs-tag-req {
  background: #7a2f2f;
  color: #ffd7d7;
}
/* base 규칙 #rt-app button { flex: 1 } 이 버튼을 늘려버리므로 같은 스코프로 눌러준다 */
#rt-app .cs-view {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid #3a4759;
  color: #8ea0b5;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 62px;
}
.cs-body {
  margin: 0 12px 12px;
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
  background: #0e1116;
  border: 1px solid #262d38;
  border-radius: 6px;
  color: #9fb0c3;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.cs-error {
  color: #e74c3c;
  font-size: 13px;
  padding: 12px;
  margin: 0;
}
/* 동의 게이트 모달 — 필수 동의 전에는 오버레이 클릭으로 닫히지 않는다(닫기 버튼 없음).
   base 규칙(#rt-app .modal-content { height: 90vh })을 눌러 내용 높이에 맞춘다. */
#rt-app .cs-modal {
  max-width: 520px;
  width: 92%;
  height: auto;
  max-height: 90vh;
}
.cs-intro {
  color: #cfd8e3;
  font-size: 14px;
  line-height: 1.6;
  margin: 4px 2px 0;
}

/* [FEATURES] 회원탈퇴 모달의 파기 안내 (개인정보 처리방침 4항과 동일 내용) */
#rt-app .wd-notice {
  font-size: 12px;
  color: #9fb0c3;
  line-height: 1.65;
  background: #14171e;
  border: 1px solid #3a4759;
  border-radius: 6px;
  padding: 10px;
  margin: 0 0 12px;
}
#rt-app .wd-notice strong {
  color: #cfd8e3;
}

/* [FIX] 탈퇴 모달이 내용 높이에 맞지 않고 빈 공간이 크게 남던 문제.
   `.rt-s21`(height:auto; max-width:320px)이 base 규칙 `#rt-app .modal-content`(height:90vh; max-width:500px)에
   명시도로 눌려 무효였다. 같은 클래스를 쓰는 다른 모달에 영향을 주지 않도록 id로 스코프해 해결한다. */
#rt-app #withdrawModal .modal-content {
  height: auto;
  max-width: 380px;
}
/* 되돌릴 수 없는 동작이므로 확인 버튼을 경고색으로 (`.btn-save.rt-s17` 동일 명시도 충돌도 함께 정리) */
#rt-app #withdrawModal .btn-save {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* [SPORTSEL] 종목별 서비스 선택 오버레이 (로그인 직후 / 헤더 🔀 종목변경)
 * 예전에는 종목 버튼 3개만 세로로 늘어놨고, 야구의 기록지·선수정보는 이 화면에 없어서
 * 리모컨에 들어간 뒤 헤더 버튼을 찾아야만 알 수 있었다.
 * → **종목을 묶음(그룹)으로 두고 그 안에 서비스 타일**을 놓는다. */
.sp-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.sp-group {
  border: 1px solid #2b3442;
  border-radius: 14px;
  background: #171b23;
  padding: 14px 14px 16px;
}
.sp-group.locked { border-style: dashed; background: #14171e; }
.sp-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 800;
  color: #ecf0f1;
}
.sp-group-head .sp-lock { font-size: 12px; font-weight: 700; color: #8ea0b5; }
/* 서비스가 1개(축구·농구)면 한 칸을 꽉 채우고, 3개(야구)면 자동으로 나뉜다. */
.sp-svcs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.sp-svc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border-radius: 12px;
  border: 2px solid #3a4759;
  background: #1c2029;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  min-height: 92px;
}
.sp-svc:hover { border-color: #5b6c85; background: #222732; }
.sp-svc .sp-ico { font-size: 26px; line-height: 1; }
.sp-svc .sp-name { font-size: 16px; font-weight: 800; }
.sp-svc .sp-desc { font-size: 11px; color: #8ea0b5; font-weight: 600; }
/* ⚠️ 잠긴 타일에 `disabled` 를 쓰지 말 것 — click 이 안 나서 구매 안내로 보낼 수 없고,
 * 터치 기기에서는 title 도 안 보여 "눌러도 아무 일 없는 회색 버튼"이 된다. */
.sp-svc.locked {
  border-style: dashed;
  background: #14171e;
  color: #5d6b7e;
}
.sp-svc.locked .sp-desc { color: #6b7a8d; }
.sp-svc .sp-dday {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #e74c3c;
  border-radius: 8px;
  padding: 1px 7px;
}
