.rk-board-slot.rk-board-slot-invalid {
  background: rgba(220, 53, 69, 0.08);
  box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.45);
}

.rk-timer-wrap {
  min-width: 220px;
}

.rk-timer-progress {
  height: 8px;
  background: #e9ecef;
}

.rk-timer-progress .progress-bar {
  transition: width 0.35s linear;
}

@keyframes rkTimerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rk-timer-wrap.rk-timer-urgent #rk-turn-timer,
.rk-timer-wrap.rk-timer-urgent .rk-timer-progress {
  animation: rkTimerBlink 0.9s steps(2, end) infinite;
}

.rk-timer-wrap.rk-timer-urgent #rk-turn-timer {
  color: #dc3545;
}

#rk-hand-title {
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

#rk-hand-title.rk-hand-title-active {
  color: #0d6efd;
  text-shadow: 0 0 10px rgba(13, 110, 253, 0.25);
}

.rk-open-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #adb5bd;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: all 0.2s ease;
}

.rk-open-badge.is-opened {
  border-color: #198754;
  background: #198754;
  color: #fff;
  box-shadow: 0 4px 10px rgba(25, 135, 84, 0.25);
}

@keyframes rkTileIncoming {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rk-tile-incoming {
  animation: rkTileIncoming 0.28s ease-out both;
}
/* 플레이모어 테이블 리그 - 메인 스타일 */

@font-face {
  font-family: 'Jalnan2';
  src: url('/assets/fonts/jalnan/Jalnan2/Jalnan2TTF.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  --pm-primary: #1947e5;
  --pm-accent: #ff6b6b;
  --pm-gold: #ffca3a;
  --pm-light: #fff8fd;
  --pm-mint: #29c7ac;
  --pm-ink: #1e1f2a;
  --font-main: 'Jalnan2', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 107, 107, 0.13) 0 16%, transparent 17%),
    radial-gradient(circle at 88% 10%, rgba(41, 199, 172, 0.14) 0 15%, transparent 16%),
    radial-gradient(circle at 20% 92%, rgba(255, 202, 58, 0.16) 0 14%, transparent 15%),
    linear-gradient(180deg, #fff7fb 0%, #f6fbff 100%);
  color: var(--pm-ink);
}

.pm-navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(25, 71, 229, 0.14);
}

.pm-navbar .navbar-brand {
  color: var(--pm-primary);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-navbar .navbar-brand:hover,
.pm-navbar .navbar-brand:focus {
  color: #143bc2;
}

.pm-navbar .nav-link {
  color: #3c3d52;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.pm-navbar .nav-link:hover,
.pm-navbar .nav-link:focus,
.pm-navbar .nav-link.active {
  color: #0f2f9d;
  background: rgba(25, 71, 229, 0.1);
}

.pm-navbar .navbar-toggler {
  border-color: rgba(25, 71, 229, 0.35);
}

.pm-navbar .dropdown-menu {
  border: 2px solid rgba(25, 71, 229, 0.16);
  border-radius: 18px;
  padding: 0.45rem;
  box-shadow: 0 14px 26px rgba(23, 32, 82, 0.14);
}

.pm-navbar .dropdown-item {
  border-radius: 12px;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
}

.pm-navbar .dropdown-item:hover,
.pm-navbar .dropdown-item:focus {
  background: rgba(255, 107, 107, 0.14);
  color: #2d2f40;
}

.btn-pm-outline {
  border: 2px solid rgba(25, 71, 229, 0.4);
  color: var(--pm-primary) !important;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-weight: 800;
}

.btn-pm-outline:hover,
.btn-pm-outline:focus {
  background: var(--pm-primary);
  color: #fff !important;
  border-color: var(--pm-primary);
}

/* 히어로 섹션 */
.hero-section {
  background:
    radial-gradient(circle at 5% 20%, rgba(255, 255, 255, 0.36) 0 14%, transparent 15%),
    radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.38) 0 12%, transparent 13%),
    linear-gradient(130deg, #ffca3a 0%, #ff8fab 45%, #29c7ac 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233,69,96,0.1) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
}

.hero-accent {
  color: #fffde9;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  line-height: 1.7;
}

.hero-ios-install-note {
  max-width: min(92vw, 560px);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #f5f8ff;
  font-size: 0.85rem;
  line-height: 1.45;
}

.hero-section .badge {
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(33, 26, 65, 0.32) !important;
  padding: 0.45rem 0.7rem;
  font-weight: 800;
}

.hero-section .btn {
  border-radius: 16px;
  font-weight: 800;
  border-width: 2px;
  box-shadow: 0 10px 18px rgba(26, 31, 66, 0.16);
}

.hero-section .btn-danger {
  background: linear-gradient(160deg, #ff6767 0%, #ff7f9b 100%);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-section .btn-outline-light,
.hero-section .btn-outline-warning {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-section .btn:hover {
  transform: translateY(-2px);
}

.hero-section .bg-white.bg-opacity-10 {
  background: rgba(255, 255, 255, 0.23) !important;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
}

.game-intro-section {
  border-top: 1px solid rgba(26, 26, 46, 0.06);
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
}

.game-intro-card {
  border: 1px solid rgba(26, 26, 46, 0.08);
}

.game-intro-card .card-body,
.tournament-card .card-body {
  position: relative;
}

.game-intro-card .card-body::after,
.tournament-card .card-body::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(25, 71, 229, 0.08);
  pointer-events: none;
}

.game-intro-rk {
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%);
}

.game-intro-cc {
  background: linear-gradient(160deg, #ffffff 0%, #fff5f5 100%);
}

.game-intro-card .btn {
  font-weight: 600;
  border-radius: 12px;
  border-width: 2px;
}

/* 섹션 공통 */
.section-title {
  font-weight: 800;
  font-size: 1.6rem;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 52px;
  height: 5px;
  background: linear-gradient(90deg, var(--pm-accent), var(--pm-gold));
  border-radius: 2px;
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 카드 스타일 */
.card {
  border: 2px solid rgba(17, 25, 62, 0.08);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  border-radius: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.94);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(0,0,0,0.12);
}

/* 대회 카드 */
.tournament-card .card-header {
  background: linear-gradient(155deg, #c7d1e6 0%, #bcc8df 100%);
  color: #1f2638;
  border-radius: 12px 12px 0 0 !important;
  border: none;
  border-bottom: 2px solid rgba(86, 101, 138, 0.35);
}

.tournament-card .card-header h5 {
  color: #1a2132;
  letter-spacing: 0.005em;
  font-weight: 800;
}

.game-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255,255,255,0.72);
  color: #4b3a59;
  border: 1px solid rgba(120, 93, 140, 0.18);
}

.game-badge-players {
  background: rgba(210, 232, 255, 0.75);
  color: #2d4f80;
  border-color: rgba(88, 135, 194, 0.28);
}

/* 랭킹 테이블 */
.ranking-table th {
  background: linear-gradient(135deg, #2957ef 0%, #2cb8f4 100%);
  color: white;
  font-weight: 600;
  border: none;
}

.ranking-table .rank-1 { background: #fff9e6; font-weight: 700; }
.ranking-table .rank-2 { background: #f5f5f5; }
.ranking-table .rank-3 { background: #fff4f0; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-badge.gold { background: var(--pm-gold); color: white; }
.rank-badge.silver { background: #9e9e9e; color: white; }
.rank-badge.bronze { background: #cd7f32; color: white; }

.pwa-ios-modal-content {
  border: 1px solid rgba(26, 26, 46, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

.pwa-ios-steps {
  margin: 0;
  padding-left: 1.2rem;
}

.pwa-ios-steps li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
}

.pwa-ios-steps li:last-child {
  margin-bottom: 0;
}

/* 선수 카드 */
.player-card {
  text-align: center;
  padding: 20px;
}

.player-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pm-accent);
}

.player-no {
  font-size: 0.75rem;
  color: #888;
  font-family: monospace;
  letter-spacing: 1px;
}

/* 상태 배지 */
.badge { font-weight: 600; letter-spacing: 0.5px; }

/* 버튼 스타일 */
.btn-pm-primary {
  background: var(--pm-primary);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-pm-primary:hover {
  background: #0f3460;
  color: white;
}

.btn-pm-accent {
  background: var(--pm-accent);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-pm-accent:hover {
  background: #c73050;
  color: white;
}

/* 마이페이지 */
.mypage-header {
  background: linear-gradient(135deg, var(--pm-primary), #0f3460);
  color: white;
  padding: 50px 0 40px;
}

.player-no-display {
  font-family: monospace;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: var(--pm-gold);
  font-weight: 700;
}

/* 결제 페이지 */
.payment-summary {
  background: var(--pm-primary);
  color: white;
  border-radius: 12px;
  padding: 25px;
}

/* 공지사항 */
.notice-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  transition: background 0.2s;
}

.notice-item:hover { background: #f8f9fa; }
.notice-item.pinned { background: #fffdf0; }
.notice-item .title-link { color: #222; text-decoration: none; font-weight: 500; }
.notice-item .title-link:hover { color: var(--pm-accent); }

.alert.alert-light {
  border-radius: 18px;
  border: 2px solid rgba(25, 71, 229, 0.16) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

/* 로그인 페이지 */
.login-wrapper {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #fdf0f5 100%);
}

.login-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  border-radius: 20px !important;
  padding: 15px;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.google-login-btn:hover {
  border-color: #4285f4;
  box-shadow: 0 4px 15px rgba(66,133,244,0.2);
  color: #333;
}

/* 폼 스타일 */
.form-label { font-weight: 600; font-size: 0.9rem; }
.form-control, .form-select {
  border-radius: 8px;
  border-color: #dee2e6;
  padding: 10px 14px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--pm-accent);
  box-shadow: 0 0 0 0.2rem rgba(233,69,96,0.15);
}

/* 스텝 인디케이터 */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 200px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: #e9ecef;
  color: #6c757d;
}

.step.active .step-num { background: var(--pm-accent); color: white; }
.step.done .step-num { background: #198754; color: white; }

.step-line {
  flex: 1;
  height: 2px;
  background: #e9ecef;
}

/* 반응형 */
@media (max-width: 768px) {
  .hero-section { padding: 60px 0 50px; }
  .hero-title { font-size: clamp(1.65rem, 8vw, 2.15rem); }
  .hero-subtitle { font-size: 0.98rem; line-height: 1.55; }
  .section-title { font-size: 1.3rem; }
  .card { border-radius: 14px; }
  .tournament-card .card-header { border-radius: 14px 14px 0 0 !important; }
  .game-intro-card .card-body,
  .tournament-card .card-body,
  .card .card-body {
    padding: 1rem;
  }
  .hero-section .btn {
    width: 100%;
    justify-content: center;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
  .hero-section .d-flex.gap-3 {
    gap: 0.55rem !important;
  }
  .step-label { display: none; }
  .game-intro-card .btn {
    width: 100%;
    justify-content: center;
  }
}

/* 로딩 */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

/* 루미큐브 온라인 */
.rk-board,
.rk-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rk-board {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: auto;
  min-width: 100%;
  min-height: 132px;
  padding: 10px;
  background: #fff;
  border: 1px solid #eceff3;
  border-radius: 12px;
}

.rk-hand {
  display: block;
}

.rk-hand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 66px;
}

.rk-hand-row + .rk-hand-row {
  margin-top: 10px;
}

.rk-hand-slot {
  width: 56px;
  height: 82px;
  border: 1px dashed #cfd4da;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rk-hand-slot.drag-over {
  border-color: #212529;
  background: #eef1f4;
}

.rk-set {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.rk-board-slot {
  min-width: 8px;
  min-height: 90px;
  border: 1px dashed transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
  transition: border-color 0.2s;
}

.rk-board-slot:last-child {
  margin-right: 0;
}

.rk-board-slot-empty {
  min-width: 10px;
  background: transparent;
}

.rk-board-slot.drag-over {
  border-color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
}

.rk-set-shell {
  width: auto;
  cursor: default;
  border-radius: 10px;
  padding: 2px 0;
}

.rk-set-shell.rk-set-ready {
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.15);
}

.rk-set.drag-over {
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.rk-tiles {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  min-height: 80px;
}

.rk-tiles .rk-tile + .rk-tile {
  margin-left: -10px;
}

.rk-board-gap {
  width: 10px;
  height: 84px;
  border-radius: 6px;
  border: 1px dashed transparent;
  flex: 0 0 auto;
  transition: width 0.12s ease, background-color 0.12s ease;
}

.rk-board-gap.drag-over {
  width: 30px;
  border-color: #20c997;
  background: rgba(32, 201, 151, 0.12);
}

.rk-tile {
  position: relative;
  border: 1px solid #e4decf;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6efdf 0%, #efe4cf 100%);
  min-width: 52px;
  height: 76px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  cursor: grab;
  box-shadow:
    inset 0 10px 14px rgba(255, 255, 255, 0.7),
    inset 0 -8px 12px rgba(0, 0, 0, 0.08),
    0 2px 5px rgba(0, 0, 0, 0.12);
}

.rk-tile::after {
  content: 'Rummikub';
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(154, 132, 99, 0.45);
  text-transform: none;
  pointer-events: none;
}

.rk-tile span {
  position: relative;
  top: -6px;
}

.rk-tile.selected {
  transform: translateY(-6px);
  box-shadow:
    inset 0 10px 14px rgba(255, 255, 255, 0.72),
    inset 0 -8px 12px rgba(0, 0, 0, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: #b8ab8d;
}

.rk-board-tile.selected {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: 1px;
}

.rk-mobile-mode .rk-tile {
  cursor: pointer;
  touch-action: manipulation;
}

.rk-mobile-mode .rk-hand-slot,
.rk-mobile-mode .rk-board-gap,
.rk-mobile-mode .rk-board-slot {
  touch-action: manipulation;
}

.rk-tile.dragging {
  opacity: 0.6;
}

.rk-set-shell.dragging {
  opacity: 0.7;
}

.rk-tile.drag-over {
  border-style: dashed;
}

.rk-red { color: #d7263d; }
.rk-blue { color: #1263d3; }
.rk-green { color: #1d8f43; }
.rk-orange { color: #d07a00; }
.rk-joker { color: #222; text-shadow: 0 0 1px rgba(240, 165, 0, 0.45); }

.rk-tutorial-step {
  border-left: 4px solid #1a1a2e;
  padding-left: 14px;
}

.rk-player-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid #e9ecef;
}

.rk-player-turn {
  border-color: #f0a500;
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.rk-open-mini {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #adb5bd;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.rk-open-mini.is-opened {
  border-color: #198754;
  background: #198754;
  color: #fff;
}

.rk-chat-list {
  height: 260px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.rk-chat-item {
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 3px 2px;
  border-bottom: 1px dashed #eef1f4;
}

.rk-chat-item.rk-chat-system {
  font-style: italic;
  color: #6c757d;
}

.rk-chat-item.rk-chat-me {
  background: #f3f9ff;
  border-radius: 6px;
}

.rk-chat-name-0 { color: #0d6efd; }
.rk-chat-name-1 { color: #198754; }
.rk-chat-name-2 { color: #dc3545; }
.rk-chat-name-3 { color: #fd7e14; }
.rk-chat-name-4 { color: #6f42c1; }
.rk-chat-name-5 { color: #0f766e; }

.rk-chat-item:last-child {
  border-bottom: 0;
}

.rk-history-item {
  text-align: left;
}

#rk-replay-range {
  margin-bottom: 10px;
}

#rk-pass {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
  animation: rkPassPulse 1.6s ease-in-out infinite;
}

#rk-pass:disabled {
  animation: none;
  box-shadow: none;
}

.anim-pop {
  animation: rkPop 0.35s ease;
}

.anim-shake {
  animation: rkShake 0.35s ease;
}

@keyframes rkPop {
  0% { transform: scale(0.98); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rkShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes rkPassPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* 스크롤바 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }

/* 본문 컨텐츠 */
.content-prose {
  line-height: 1.9;
}

.content-prose h2,
.content-prose h3,
.content-prose h4 {
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.content-prose p,
.content-prose ul,
.content-prose ol {
  margin-bottom: 1rem;
}

/* footer 가독성 개선: 어두운 배경에서 .text-muted 밝게 */
footer.bg-dark .text-muted {
  color: #dee2e6 !important;
}

/* Carcassonne base game */
.carc-game-wrap {
  background: transparent;
}

.cc-board {
  display: grid;
  --cc-board-cell: 48px;
  grid-template-columns: repeat(25, var(--cc-board-cell));
  grid-template-rows: repeat(25, var(--cc-board-cell));
  gap: 0;
  min-width: 100%;
  min-height: 100%;
  justify-content: center;
  width: max-content;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background-image: url('/assets/images/back.jpg');
  background-size: 40% 40%;
  background-position: 0 0;
  background-repeat: repeat;
  transition: filter 0.18s ease;
}

.cc-board-viewport {
  overflow: auto;
  height: min(78vh, 78dvh);
  max-height: min(78vh, 78dvh);
  padding: 6px;
  border-radius: 12px;
  background: #d4b083;
  border: 1px solid #e1d7c7;
  cursor: grab;
  position: relative;
  overscroll-behavior: contain;
}

.cc-board-viewport::before,
.cc-board-viewport::after {
  content: '';
  position: absolute;
  top: -24%;
  left: -34%;
  width: 170%;
  height: 165%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  will-change: transform, opacity;
}

.cc-board-viewport::before {
  background:
    radial-gradient(34% 15% at 18% 32%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 74%),
    radial-gradient(40% 17% at 46% 26%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 78%),
    radial-gradient(36% 18% at 74% 34%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 80%);
  animation: ccCloudDriftA 120s ease-in-out infinite;
}

.cc-board-viewport::after {
  background:
    radial-gradient(31% 13% at 22% 66%, rgba(255, 255, 255, 0.27), rgba(255, 255, 255, 0) 76%),
    radial-gradient(36% 15% at 58% 62%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 80%),
    radial-gradient(29% 12% at 82% 58%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 76%);
  animation: ccCloudDriftB 155s ease-in-out infinite;
}

@keyframes ccCloudDriftA {
  0%, 18% {
    opacity: 0;
    transform: translateX(-30%) translateY(0%);
  }
  28%, 52% {
    opacity: 0.28;
  }
  66% {
    opacity: 0.12;
  }
  80%, 100% {
    opacity: 0;
    transform: translateX(30%) translateY(-1.2%);
  }
}

@keyframes ccCloudDriftB {
  0%, 24% {
    opacity: 0;
    transform: translateX(28%) translateY(1.4%);
  }
  34%, 58% {
    opacity: 0.22;
  }
  72% {
    opacity: 0.1;
  }
  86%, 100% {
    opacity: 0;
    transform: translateX(-28%) translateY(-1.4%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-board-viewport::before,
  .cc-board-viewport::after {
    animation: none;
    opacity: 0;
  }
}

.cc-score-toast-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1080;
}

.cc-score-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 252, 243, 0.96);
  border: 1px solid rgba(156, 120, 48, 0.28);
  box-shadow: 0 14px 36px rgba(63, 42, 7, 0.24);
  animation: ccScoreToastRise 2.2s ease-out forwards;
}

.cc-score-toast-meeples {
  display: inline-flex;
  align-items: center;
}

.cc-score-toast-players {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cc-score-toast-player {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.cc-score-toast-separator {
  color: #8b7a60;
}

.cc-score-toast-meeple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
}

.cc-score-toast-meeple:first-child {
  margin-left: 0;
}

.cc-seat-meeple-toast {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.cc-score-toast-meeple.is-lying .cc-seat-meeple-toast {
  width: 32px;
  height: 32px;
}

.cc-score-toast-points {
  font-size: 1.18rem;
  font-weight: 800;
  color: #704700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@keyframes ccScoreToastRise {
  0% {
    opacity: 0;
    transform: translate(-50%, -32%) scale(0.92);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  78% {
    opacity: 1;
    transform: translate(-50%, -118%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -156%) scale(0.96);
  }
}

.cc-board-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.cc-board-viewport.is-zoom-animating {
  animation: ccZoomPulse 0.24s ease;
}

@keyframes ccZoomPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(208, 122, 0, 0.18);
    filter: saturate(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(208, 122, 0, 0.14);
    filter: saturate(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(208, 122, 0, 0);
    filter: saturate(1);
  }
}

.cc-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 0;
  padding: 0;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.cc-cell.is-meeple-selected,
.cc-cell.is-meeple-hover {
  z-index: 1200;
}

.cc-cell:has(.cc-board-meeple:hover),
.cc-cell:has(.cc-board-meeple.is-selected) {
  z-index: 1200;
}

.cc-area-overlay {
  position: absolute;
  inset: 3px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 1;
  background: color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.2)) 22%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.35)) 85%, white 15%);
  opacity: 0.95;
}

.cc-area-overlay.is-road {
  border: 2px dashed color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.45)) 85%, white 15%);
}

.cc-area-overlay.is-city {
  border: 2px solid color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.45)) 88%, white 12%);
}

.cc-area-overlay.is-field {
  border: 1px solid color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.35)) 75%, white 25%);
}

.cc-area-overlay.is-monastery {
  border: 2px dotted color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.45)) 88%, white 12%);
}

.cc-area-overlay.is-shared {
  --owner-color: var(--owner-color-a);
  animation: ccAreaSharedPulse 2.2s linear infinite;
}

.cc-field-area-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.cc-field-area-overlay polygon {
  fill: color-mix(in srgb, color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.25)) 74%, var(--area-accent, #2f8f43) 26%) 42%, transparent);
  stroke: color-mix(in srgb, color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.45)) 70%, var(--area-accent, #2f8f43) 30%) 94%, white 6%);
  stroke-width: 2.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.18));
}

.cc-field-area-overlay[data-area-variant="1"] polygon {
  fill: color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.25)) 34%, transparent);
  stroke-dasharray: 6 3;
}

.cc-field-area-overlay[data-area-variant="2"] polygon {
  fill: color-mix(in srgb, var(--owner-color, rgba(0,0,0,0.25)) 46%, transparent);
  stroke-dasharray: 2 2;
}

.cc-field-area-overlay.is-shared polygon {
  animation: ccFieldSharedPulse 2.2s linear infinite;
}

@keyframes ccFieldSharedPulse {
  0%, 45% {
    fill: color-mix(in srgb, var(--owner-color-a) 40%, transparent);
    stroke: color-mix(in srgb, var(--owner-color-a) 94%, white 6%);
  }
  50%, 95% {
    fill: color-mix(in srgb, var(--owner-color-b) 40%, transparent);
    stroke: color-mix(in srgb, var(--owner-color-b) 94%, white 6%);
  }
  100% {
    fill: color-mix(in srgb, var(--owner-color-a) 40%, transparent);
    stroke: color-mix(in srgb, var(--owner-color-a) 94%, white 6%);
  }
}

@keyframes ccAreaSharedPulse {
  0%, 45% {
    background: color-mix(in srgb, var(--owner-color-a) 22%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner-color-a) 85%, white 15%);
    border-color: color-mix(in srgb, var(--owner-color-a) 88%, white 12%);
  }
  50%, 95% {
    background: color-mix(in srgb, var(--owner-color-b) 22%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner-color-b) 85%, white 15%);
    border-color: color-mix(in srgb, var(--owner-color-b) 88%, white 12%);
  }
  100% {
    background: color-mix(in srgb, var(--owner-color-a) 22%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner-color-a) 85%, white 15%);
    border-color: color-mix(in srgb, var(--owner-color-a) 88%, white 12%);
  }
}

.cc-cell.is-filled {
  box-shadow: none;
}

.cc-cell.is-current-focus {
  box-shadow: 0 0 0 3px rgba(208, 122, 0, 0.24);
}

.cc-cell.is-meeple-source {
  box-shadow: 0 0 0 4px rgba(220, 149, 33, 0.28);
}

.cc-cell.is-opponent-last {
  box-shadow: inset 0 0 0 2px rgba(31, 111, 178, 0.48), 0 0 0 2px rgba(31, 111, 178, 0.2);
  animation: ccOpponentLastPulse 0.9s ease-in-out infinite;
}

@keyframes ccOpponentLastPulse {
  0%, 100% {
    box-shadow: inset 0 0 0 2px rgba(44, 127, 196, 0.7), 0 0 0 2px rgba(31, 111, 178, 0.22);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(15, 79, 134, 0.82), 0 0 0 6px rgba(31, 111, 178, 0.55);
  }
}

@keyframes ccValidCellPulse {
  0%, 100% {
    background: rgba(72, 171, 99, 0.34);
    box-shadow: inset 0 0 0 3px rgba(34, 120, 61, 0.95), 0 0 0 1px rgba(224, 255, 232, 0.55);
  }
  50% {
    background: rgba(72, 171, 99, 0.4);
    box-shadow: inset 0 0 0 3px rgba(34, 120, 61, 0.98), 0 0 0 3px rgba(88, 189, 112, 0.35);
  }
}

.cc-cell.is-valid {
  cursor: pointer;
  background: rgba(72, 171, 99, 0.34);
  box-shadow: inset 0 0 0 3px rgba(34, 120, 61, 0.95), 0 0 0 1px rgba(224, 255, 232, 0.55);
  animation: ccValidCellPulse 1.5s ease-in-out infinite;
}

.cc-cell.is-valid:hover {
  background: rgba(72, 171, 99, 0.44);
  box-shadow: inset 0 0 0 3px rgba(28, 105, 52, 0.98), 0 0 0 3px rgba(48, 160, 78, 0.42);
  animation: none;
}

.cc-cell.is-invalid-rotation {
  background: rgba(238, 146, 154, 0.15);
  box-shadow: inset 0 0 0 2px rgba(196, 108, 116, 0.82);
}

.cc-board.is-area-overlay-mode .cc-cell.is-valid {
  background: rgba(96, 186, 120, 0.15);
  box-shadow: inset 0 0 0 2px rgba(60, 150, 86, 0.6);
}

.cc-board.is-area-overlay-mode .cc-cell.is-invalid-rotation {
  background: rgba(238, 146, 154, 0.05);
  box-shadow: inset 0 0 0 1px rgba(196, 108, 116, 0.3);
}

.cc-cell.is-unavailable {
  background: rgba(90, 69, 39, 0.08);
  box-shadow: inset 0 0 0 1px rgba(121, 93, 56, 0.18);
}

.cc-cell.is-pending-placement {
  box-shadow: inset 0 0 0 2px rgba(208, 122, 0, 0.92), 0 0 0 3px rgba(208, 122, 0, 0.2);
}

.cc-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border: 1px solid #e3dccf;
  border-radius: 10px;
  background: #f8f3e7;
  height: 170px;
}

.cc-preview-tile {
  width: 132px;
  height: 132px;
  background-size: cover;
  background-position: center;
  border: 1px solid #d3c3ab;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.cc-preview-empty-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: #8a7454;
}

.cc-placement-confirm {
  border: 1px solid #e3d6c1;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fffaf0 0%, #f8f2e7 100%);
}

.cc-meeple-preview-wrap {
  border: 1px solid #e0d5c5;
  border-radius: 12px;
  background: #fbf7ee;
  padding: 12px;
}

.cc-meeple-preview {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid #d3c3ab;
}

.cc-meeple-marker,
.cc-meeple-dot {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--cc-counter-rotation, 0deg));
}

.cc-meeple-marker {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #5e3d00;
  background: linear-gradient(180deg, #fff6bf 0%, #ffd86b 100%);
  color: #3d2400;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 0 0 3px rgba(255, 247, 196, 0.75), 0 4px 12px rgba(72, 42, 0, 0.22);
}

.cc-cell > .cc-meeple-marker {
  width: calc(var(--cc-board-cell) * 0.205);
  height: calc(var(--cc-board-cell) * 0.205);
  font-size: calc(var(--cc-board-cell) * 0.09);
  border-width: max(2px, calc(var(--cc-board-cell) * 0.04));
}

.cc-meeple-marker.is-knight {
  background: linear-gradient(180deg, #ffe4c7 0%, #ffb56a 100%);
}

.cc-meeple-marker.is-robber {
  background: linear-gradient(180deg, #d8f0cf 0%, #8bd07f 100%);
}

.cc-meeple-marker.is-farmer {
  background: linear-gradient(180deg, #fff7b8 0%, #e7cf52 100%);
}

.cc-meeple-marker.is-monk {
  background: linear-gradient(180deg, #d5e9ff 0%, #7bb3ec 100%);
}

.cc-meeple-marker.is-city {
  border-color: #8b4f00;
}

.cc-meeple-marker.is-road {
  border-color: #2f6d3a;
}

.cc-meeple-marker.is-field {
  border-color: #947100;
}

.cc-meeple-marker.is-monastery {
  border-color: #275985;
}

.cc-meeple-marker:hover {
  transform: translate(-50%, -50%) rotate(var(--cc-counter-rotation, 0deg)) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cc-meeple-marker.is-available {
  animation: ccMeeplePulse 1.1s ease-in-out infinite;
}

.cc-meeple-marker.is-selected {
  background: linear-gradient(180deg, #1d1d1d 0%, #4f4f4f 100%);
  color: #fff7cf;
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(255, 220, 102, 0.5), 0 6px 14px rgba(0, 0, 0, 0.28);
}

.cc-meeple-marker.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: linear-gradient(180deg, #f0ece4 0%, #ddd6ca 100%);
  border-color: #9f9382;
  box-shadow: 0 0 0 2px rgba(240, 230, 210, 0.8);
}

.cc-meeple-marker.is-disabled::after {
  content: 'x';
  position: absolute;
  right: -6px;
  top: -6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #6b6254;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

@keyframes ccMeeplePulse {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(var(--cc-counter-rotation, 0deg)) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(var(--cc-counter-rotation, 0deg)) scale(1.08);
  }
}

.cc-meeple-actions .btn {
  text-align: left;
}

.cc-seat-meeple {
  display: inline-block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.cc-seat-meeple-sm {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  vertical-align: middle;
}

.cc-seat-meeple-board {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

.cc-meeple-role-badge {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.cc-meeple-role-badge.is-knight {
  background: #ffcf9c;
  color: #6b3300;
}

.cc-meeple-role-badge.is-robber {
  background: #bfe7ba;
  color: #1f5b2c;
}

.cc-meeple-role-badge.is-farmer {
  background: #f6e58c;
  color: #6d5600;
}

.cc-meeple-role-badge.is-monk {
  background: #bfdaff;
  color: #1f4f77;
}

.cc-meeple-action-main {
  display: block;
  font-weight: 700;
}

.cc-meeple-action-sub {
  display: block;
  margin-left: 32px;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.8;
}

.cc-meeple-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.cc-p1 {
  background: #2e7d32;
  color: #fff;
}

.cc-p2 {
  background: #1565c0;
  color: #fff;
}

.cc-score-item {
  border: 1px solid #e2dbcf;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.cc-player-label {
  display: inline-flex;
  align-items: center;
}

#cc-current-player {
  display: inline-flex;
  align-items: center;
}

.cc-board-meeple {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--cc-counter-rotation, 0deg));
  z-index: 1500;
  pointer-events: auto;
  cursor: pointer;
}

.cc-board-meeple.is-standing {
  width: calc(var(--cc-board-cell) * 0.297);
  height: calc(var(--cc-board-cell) * 0.297);
}

.cc-board-meeple.is-lying {
  width: calc(var(--cc-board-cell) * 0.26);
  height: calc(var(--cc-board-cell) * 0.26);
}

.cc-board-meeple:hover {
  filter: drop-shadow(0 0 6px rgba(255, 217, 102, 0.42));
}

.cc-board-meeple.is-selected {
  filter: drop-shadow(0 0 10px rgba(255, 200, 66, 0.65));
}

.cc-board-meeple.is-selected::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(255, 195, 55, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 244, 212, 0.75);
}

.cc-meeple-hover-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px) rotate(var(--cc-hover-unrotate, 0deg));
  transform-origin: 50% 100%;
  min-width: 164px;
  max-width: 210px;
  padding: 9px 10px;
  border: 1px solid rgba(116, 91, 53, 0.18);
  border-radius: 12px;
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 14px 28px rgba(41, 28, 15, 0.16);
  color: #3f3223;
  font-size: 12px;
  line-height: 1.4;
  z-index: 2200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  backdrop-filter: blur(6px);
}

.cc-meeple-hover-card::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255, 250, 242, 0.96);
  border-right: 1px solid rgba(116, 91, 53, 0.18);
  border-bottom: 1px solid rgba(116, 91, 53, 0.18);
  transform: translateX(-50%) rotate(45deg);
}

.cc-board-meeple:hover .cc-meeple-hover-card,
.cc-board-meeple.is-selected .cc-meeple-hover-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(var(--cc-hover-unrotate, 0deg));
}

.cc-meeple-hover-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.cc-meeple-hover-card-body {
  display: grid;
  gap: 2px;
}

.cc-meeple-hover-contest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cc-meeple-hover-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 1px 6px 1px 4px;
  border-radius: 999px;
  background: rgba(74, 56, 31, 0.08);
}

.cc-meeple-hover-chip-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cc-seat-meeple-info {
  width: 52px;
  height: 52px;
}

.cc-meeple-info-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-meeple-info-selected {
  padding: 14px;
  border: 1px solid #ebd8a7;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #fff9df 0%, #fff5d1 36%, #fffaf0 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.cc-meeple-info-selected-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #3f3223;
  color: #fff6df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cc-meeple-info-art-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(111, 88, 36, 0.14);
}

.cc-meeple-info-title {
  font-size: 1.05rem;
}

.cc-meeple-info-meta {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #e6ddd0;
  border-radius: 10px;
  background: #fffdf9;
}

.cc-meeple-info-shared-list {
  display: grid;
  gap: 8px;
}

.cc-meeple-info-shared-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e6ddd0;
  border-radius: 10px;
  background: #fffdf9;
}

.cc-meeple-info-shared-item.is-selected {
  border-color: #edc25b;
  background: linear-gradient(135deg, #fff4cf 0%, #fffaf1 100%);
}

.cc-meeple-info-shared-meta {
  flex: 1;
}

.cc-meeple-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #3f3223;
  color: #fff6df;
  font-size: 12px;
  font-weight: 700;
}

.cc-meeple-info-solo {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f4ec;
}

.cc-score-item.is-current {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.cc-help-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3dccf;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8ea 0%, #f6efe0 100%);
}

.cc-zoom-controls .btn {
  min-width: 42px;
}

.cc-bg-picker-btn {
  width: 34px;
  height: 34px;
  padding: 3px;
  border-color: #cab8a0;
}

.cc-bg-picker-preview {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid rgba(73, 52, 26, 0.26);
  background-position: center;
  background-repeat: repeat;
}

.cc-bg-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cc-bg-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 8px;
  border: 1px solid #dacdb8;
  border-radius: 10px;
  background: #fffaf2;
  color: #4d3a21;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.cc-bg-option:hover {
  border-color: #b89563;
  background: #fff5e5;
}

.cc-bg-option.is-active {
  border-color: #8d6936;
  box-shadow: 0 0 0 2px rgba(141, 105, 54, 0.22);
  background: #fff1d7;
}

.cc-bg-option-swatch {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid rgba(73, 52, 26, 0.26);
  background-position: center;
  background-repeat: repeat;
}

.cc-bg-option-label {
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .cc-bg-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cc-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cc-time-chip-value {
  font-variant-numeric: tabular-nums;
}

@keyframes ccTimeChipPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.cc-time-chip.is-urgent {
  background: #dc3545 !important;
  border-color: #b02a37 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25), 0 6px 14px rgba(176, 42, 55, 0.32);
  animation: ccTimeChipPulse 0.8s ease-in-out infinite;
}

.cc-time-chip.is-urgent .cc-time-chip-value {
  color: #fff !important;
}

.cc-final-score-summary {
  display: grid;
  gap: 16px;
}

.cc-final-score-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #eadcc8;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7e8 0%, #f6efe2 100%);
}

.cc-final-score-banner strong {
  color: #4f3613;
}

.cc-final-score-table-wrap {
  overflow-x: auto;
  border: 1px solid #eadfce;
  border-radius: 14px;
  background: #fffdf8;
}

.cc-final-score-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.cc-final-score-table th,
.cc-final-score-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #efe5d7;
  border-right: 1px solid #f3eadf;
  vertical-align: top;
}

.cc-final-score-table th:last-child,
.cc-final-score-table td:last-child {
  border-right: 0;
}

.cc-final-score-table tr:last-child td {
  border-bottom: 0;
}

.cc-final-score-table thead th {
  position: sticky;
  top: 0;
  background: #f9f2e7;
  z-index: 1;
}

.cc-final-score-rowhead {
  min-width: 124px;
  font-weight: 800;
  color: #5a3d13;
  background: #fcf7f0;
}

.cc-final-score-player-head {
  min-width: 148px;
  text-align: center;
}

.cc-final-score-player-name {
  font-weight: 800;
}

.cc-final-score-player-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #8a7557;
}

.cc-final-score-cell {
  display: grid;
  gap: 6px;
}

.cc-final-score-points {
  font-size: 18px;
  font-weight: 800;
  color: #2e2214;
}

.cc-final-score-points.is-zero {
  color: #a18e77;
}

.cc-final-score-detail-list {
  display: grid;
  gap: 4px;
}

.cc-final-score-detail {
  font-size: 12px;
  line-height: 1.35;
  color: #7b6647;
}

.cc-final-score-total-row td,
.cc-final-score-total-row .cc-final-score-rowhead {
  background: #f7efe1;
}

.cc-final-score-subtotal-row td,
.cc-final-score-subtotal-row .cc-final-score-rowhead {
  background: #faf5ed;
}

.cc-final-score-subtotal-row.is-final td,
.cc-final-score-subtotal-row.is-final .cc-final-score-rowhead {
  background: #f5efe6;
}

.cc-final-score-subtotal .cc-final-score-points {
  color: #7a531f;
}

.cc-final-score-total .cc-final-score-points {
  color: #146c2e;
}

.cc-final-score-total.is-winner {
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(24, 128, 52, 0.12), rgba(255, 244, 214, 0.86));
  box-shadow: inset 0 0 0 1px rgba(24, 128, 52, 0.18);
}

.cc-final-score-winner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1d7c3a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 767.98px) {
  .cc-final-score-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

#cc-area-toggle.is-active {
  background: #a66500;
  border-color: #a66500;
  color: #fff;
}

.cc-inline-guide {
  background: linear-gradient(135deg, #fff8e9 0%, #f6f0e5 100%);
  border: 1px solid #e4d8bf;
}

.cc-inline-guide-steps {
  display: grid;
  gap: 8px;
}

.cc-inline-step {
  border-radius: 10px;
  border: 1px solid #dfd4bf;
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 10px;
  font-size: 0.84rem;
  color: #5d584f;
}

.cc-inline-step.is-active {
  border-color: #d07a00;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(208, 122, 0, 0.12);
  color: #2f2b24;
  font-weight: 700;
}

.cc-log {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-log-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.86rem;
  color: #3d3d3d;
  border-bottom: 1px dashed #e5ded1;
  padding-bottom: 4px;
}

.cc-log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  flex: 0 0 auto;
}

.cc-log-badge.is-score {
  background: #ffe7b8;
  color: #8a5200;
}

.cc-log-badge.is-action {
  background: #dfeaff;
  color: #184f9c;
}

.cc-log-badge.is-chat {
  background: #dff7eb;
  color: #15603f;
}

.cc-log-badge.is-status {
  background: #f0e5ff;
  color: #6740a5;
}

.cc-log-badge.is-misc {
  background: #ece8df;
  color: #685a45;
}

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

.cc-log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-log-filters .btn {
  border-color: #d3c3ab;
  color: #5a4630;
  background: #fffaf2;
}

.cc-log-filters .btn.is-active,
.cc-log-filters .btn[aria-pressed="true"] {
  border-color: #8f6840;
  background: #f0dfc4;
  color: #4a331b;
  box-shadow: 0 0 0 2px rgba(143, 104, 64, 0.12);
}

.cc-log-filters .btn[data-log-filter="all"].is-active {
  background: #3f3223;
  border-color: #3f3223;
  color: #fff7ea;
}

.cc-chat-list {
  max-height: 340px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.cc-chat-item {
  border: 1px solid #e6ddd0;
  border-radius: 10px;
  background: #fffdf9;
  padding: 8px 10px;
}

.cc-chat-item.is-me {
  border-color: #b7d3ff;
  background: #f4f8ff;
}

.cc-chat-item.is-system {
  border-color: #ffd08b;
  background: #fff8e8;
  box-shadow: inset 0 0 0 1px rgba(219, 131, 0, 0.14);
}

.cc-chat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  color: #6f6a60;
  margin-bottom: 4px;
}

.cc-chat-author {
  display: inline-flex;
  align-items: center;
}

.cc-chat-text {
  font-size: 0.9rem;
  color: #2d2c2a;
  white-space: pre-wrap;
  word-break: break-word;
}

#cc-chat-input {
  resize: vertical;
}

.cc-tutorial-shot {
  border: 1px solid #ddd2bf;
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(49, 39, 23, 0.08);
}

.cc-tutorial-shot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f3ebdc;
  border-bottom: 1px solid #e2d7c3;
  font-size: 0.92rem;
}

.cc-shot-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.cc-shot-dot.is-red { background: #d9534f; }
.cc-shot-dot.is-yellow { background: #f0ad4e; }
.cc-shot-dot.is-green { background: #5cb85c; }

.cc-tutorial-shot-body {
  padding: 16px;
}

.cc-shot-board {
  position: relative;
  min-height: 280px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(112, 176, 82, 0.22), transparent 30%),
    linear-gradient(180deg, #f8f1df 0%, #efe3cb 100%);
  border: 1px solid #e1d4bf;
  overflow: hidden;
}

.cc-shot-board.is-grid {
  background:
    linear-gradient(180deg, #f8f1df 0%, #efe3cb 100%),
    repeating-linear-gradient(0deg, rgba(151, 117, 66, 0.06) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(151, 117, 66, 0.06) 0 1px, transparent 1px 44px);
}

.cc-shot-tile {
  position: absolute;
  width: 88px;
  height: 88px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(88, 67, 39, 0.2);
}

.cc-shot-tile.is-center { left: 28%; top: 36%; }
.cc-shot-tile.is-top { left: 28%; top: 6%; }
.cc-shot-tile.is-right { left: 49%; top: 36%; }
.cc-shot-tile.is-bottom { left: 28%; top: 66%; }
.cc-shot-tile.is-road-a { left: 28%; top: 36%; }
.cc-shot-tile.is-road-b { left: 38%; top: 36%; }
.cc-shot-tile.is-road-c { left: 48%; top: 36%; }
.cc-shot-tile.is-preview {
  right: 8%;
  top: 18%;
  transform: rotate(90deg);
  box-shadow: 0 0 0 3px rgba(208, 122, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.15);
}

.cc-shot-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.cc-shot-label.is-board { left: 7%; top: 14%; }
.cc-shot-label.is-preview { right: 8%; top: 6%; }
.cc-shot-label.is-score { right: 9%; bottom: 21%; }

.cc-shot-score {
  position: absolute;
  right: 8%;
  bottom: 7%;
  width: 132px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dfd2bb;
  font-size: 0.82rem;
  line-height: 1.7;
}

.cc-shot-caption {
  margin-top: 12px;
}

.cc-shot-note {
  height: 100%;
  border: 1px solid #e1d7c8;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}

.cc-shot-cell {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  border: 2px dashed rgba(29, 78, 216, 0.55);
  transform: translate(-50%, -50%);
}

.cc-shot-cell.is-valid {
  background: rgba(37, 99, 235, 0.08);
}

.cc-shot-cell.is-chosen {
  border-style: solid;
  border-color: rgba(22, 163, 74, 0.85);
  background: rgba(22, 163, 74, 0.16);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.cc-shot-arrow {
  position: absolute;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.cc-shot-meeple {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.cc-shot-meeple.is-option {
  background: #475569;
}

.cc-shot-meeple.is-selected {
  background: #15803d;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22), 0 4px 10px rgba(0, 0, 0, 0.25);
}

.cc-shot-toast {
  position: absolute;
  right: 8%;
  top: 14%;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.14);
  border: 1px solid rgba(22, 163, 74, 0.42);
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .cc-time-chip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 58px;
    line-height: 1.05;
  }

  .cc-time-chip-label {
    font-size: 0.66rem;
    opacity: 0.85;
  }

  .cc-time-chip-value {
    margin-left: 0 !important;
    font-size: 0.78rem;
  }

  .cc-help-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .cc-board {
    --cc-board-cell: 30px;
    gap: 2px;
  }

  .cc-meeple-preview {
    width: 170px;
    height: 170px;
  }

  .cc-shot-board {
    min-height: 350px;
  }

  .cc-shot-tile.is-center { left: 20%; top: 38%; }
  .cc-shot-tile.is-top { left: 20%; top: 10%; }
  .cc-shot-tile.is-right { left: 47%; top: 38%; }
  .cc-shot-tile.is-preview { right: 8%; top: 8%; }
}

  .cc-mini-board {
    min-height: 260px;
    height: min(78vh, 78dvh);
    max-height: min(78vh, 78dvh);
    padding: 6px;
    border: 1px solid #e1d7c7;
    border-radius: 12px;
    background: #d4b083;
    overflow: auto;
    cursor: grab;
    overscroll-behavior: contain;
  }

  .cc-mini-board.is-dragging {
    cursor: grabbing;
  }

  .cc-mini-board-canvas {
    position: relative;
  }

  .ccs-grid-board {
    display: grid;
    grid-template-columns: repeat(25, var(--cc-board-cell));
    grid-template-rows: repeat(25, var(--cc-board-cell));
    gap: 0;
    background-repeat: repeat;
    background-position: 0 0;
  }

  .ccs-grid-cell {
    width: var(--cc-board-cell);
    height: var(--cc-board-cell);
    position: relative;
  }

  .ccs-grid-cell.is-empty {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }

  .ccs-grid-tile {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(17, 24, 39, 0.25);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
    transform-origin: center;
  }

  .ccs-grid-meeples {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
  }

  .ccs-board-meeple {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: var(--cc-meeple-color, #111827);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  }

  .cc-mini-tile {
    position: absolute;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(17, 24, 39, 0.25);
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.15);
    transform-origin: center;
  }

  .ccs-board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cc-spectator-chat-list {
    height: 320px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
  }

  .cc-spectator-chat-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    font-size: 0.9rem;
  }

  .ccs-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }

  .ccs-summary-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .ccs-summary-item span {
    font-size: 0.74rem;
    color: #6b7280;
  }

  .ccs-summary-item strong {
    font-size: 0.95rem;
  }

  .ccs-player-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ccs-player-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 12px;
  }

  .ccs-player-card.is-current {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.2);
  }

  .ccs-live-meta {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
  }

  .ccs-next-tile-wrap,
  .ccs-live-info-list {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
  }

  .ccs-next-tile-preview {
    width: 86px;
    height: 86px;
    border-radius: 8px;
    border: 1px solid rgba(17, 24, 39, 0.22);
    background: #f8fafc;
    background-size: cover;
    background-position: center;
  }

  .ccs-live-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ccs-live-info-item {
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .ccs-live-info-item span {
    font-size: 0.73rem;
    color: #6b7280;
  }

  .ccs-live-info-item strong {
    font-size: 0.93rem;
    font-weight: 700;
  }

  @media (max-width: 768px) {
    .ccs-live-meta {
      grid-template-columns: 1fr;
    }

    .ccs-live-info-list {
      grid-template-columns: 1fr;
    }
  }

  .ccr-events {
    max-height: 280px;
    overflow-y: auto;
  }

  .ccr-event-line {
    padding: 6px 0;
    border-bottom: 1px dashed #d1d5db;
  }
