/* =========================
   DUO GAME ZONE — 보드파티 CSS v20260515_3 (시각 폴리시)
   ========================= */

.bp-app { display: flex; flex-direction: column; gap: 14px; }

/* ===== Entry (간단) ===== */
.bp-entry-spike {
  background: #161b29;
  border: 1px solid #2c3445;
  border-radius: 12px;
  padding: 18px;
  margin: 12px 0;
}
.bp-spike-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.bp-spike-sub { font-size: 12px; color: #9aa7bd; margin-bottom: 14px; }
.bp-spike-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bp-spike-btn {
  background: #2c3445; color: #e6ebf5;
  border: 1px solid #3b4356; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; cursor: pointer;
  transition: transform .12s;
}
.bp-spike-btn:hover { transform: translateY(-1px); background: #3b4356; }
.bp-spike-btn.primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); border: none; color: #fff; font-weight: 700; }

/* ===== 보드 래퍼 — 중앙 정렬 + 부드러운 후광 ===== */
.bp-board-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  filter: drop-shadow(0 14px 36px rgba(99, 102, 241, 0.15));
}

/* ===== 보드 본체 ===== */
.bp-board {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0f1c 0%, #0d1422 50%, #0a0f1c 100%);
  padding: 8px;
  border-radius: 16px;
  border: 2px solid #2c3445;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 8px 24px rgba(0,0,0,0.5);
}

/* ===== 칸 (기본) ===== */
.bp-tile {
  background: #1a2030;
  border: 1.5px solid #2c3445;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 9px;
  overflow: visible;
  text-align: center;
  padding: 2px;
  transition: transform .2s, box-shadow .25s, border-color .25s;
  cursor: default;
}
.bp-tile-idx {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}
.bp-tile-emoji {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
  margin-top: 2px;
}
.bp-tile-label {
  font-size: 8px;
  color: #c2c8d4;
  margin-top: 1px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ===== 칸 종류별 색상 (그라데이션 강화) ===== */
.bp-tile.start {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  border-color: #fde68a;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.55), inset 0 0 0 1px rgba(255,255,255,0.2);
  animation: bpStartPulse 2.4s ease-in-out infinite;
}
.bp-tile.start .bp-tile-emoji { font-size: 26px; }
.bp-tile.start .bp-tile-label { color: #1a2030; font-weight: 800; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.bp-tile.start .bp-tile-idx { color: rgba(26,32,48,0.5); }
@keyframes bpStartPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(251,191,36,0.45), inset 0 0 0 1px rgba(255,255,255,0.2); }
  50%      { box-shadow: 0 0 24px rgba(251,191,36,0.75), inset 0 0 0 1px rgba(255,255,255,0.35); }
}

.bp-tile.coin {
  background: linear-gradient(135deg, #052e16 0%, #14532d 60%, #166534 100%);
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.25), inset 0 0 0 1px rgba(34,197,94,0.18);
}
.bp-tile.coin .bp-tile-label { color: #86efac; }

.bp-tile.minus {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 60%, #991b1b 100%);
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,0.25), inset 0 0 0 1px rgba(239,68,68,0.18);
}
.bp-tile.minus .bp-tile-label { color: #fca5a5; }

.bp-tile.event {
  background: linear-gradient(135deg, #2e1065 0%, #4c1d95 60%, #5b21b6 100%);
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168,85,247,0.3), inset 0 0 0 1px rgba(168,85,247,0.2);
}
.bp-tile.event .bp-tile-label { color: #d8b4fe; }
.bp-tile.event .bp-tile-emoji { animation: bpEventBob 3s ease-in-out infinite; }
@keyframes bpEventBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

.bp-tile.item {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 60%, #0369a1 100%);
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59,130,246,0.3), inset 0 0 0 1px rgba(59,130,246,0.2);
}
.bp-tile.item .bp-tile-label { color: #93c5fd; }

.bp-tile.penalty {
  background: linear-gradient(135deg, #500724 0%, #831843 60%, #9f1239 100%);
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236,72,153,0.35), inset 0 0 0 1px rgba(236,72,153,0.2);
}
.bp-tile.penalty .bp-tile-label { color: #fbcfe8; font-weight: 800; }
.bp-tile.penalty .bp-tile-emoji { animation: bpPenaltyWiggle 2.8s ease-in-out infinite; }
@keyframes bpPenaltyWiggle {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

.bp-tile.safe {
  background: linear-gradient(135deg, #1e293b 0%, #1a2030 100%);
  border-color: #475569;
}
.bp-tile.safe .bp-tile-label { color: #94a3b8; }

.bp-tile.mini {
  background: linear-gradient(135deg, #422006 0%, #713f12 60%, #854d0e 100%);
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250,204,21,0.35), inset 0 0 0 1px rgba(250,204,21,0.18);
}
.bp-tile.mini .bp-tile-label { color: #fde047; }
.bp-tile.mini .bp-tile-emoji { animation: bpMiniSpin 4s linear infinite; }
@keyframes bpMiniSpin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* 현재 턴 플레이어가 있는 칸 highlight */
.bp-tile.has-active {
  box-shadow: 0 0 0 3px #facc15, 0 0 22px rgba(250,204,21,0.55) !important;
  transform: scale(1.08);
  z-index: 4;
}
/* 주사위 굴려서 지나가는 중인 칸 (잔상) */
.bp-tile.path-trace {
  box-shadow: 0 0 0 2px rgba(250,204,21,0.7), 0 0 16px rgba(250,204,21,0.5);
  transform: scale(1.04);
  z-index: 3;
}

/* ===== 중앙 영역 ===== */
.bp-center {
  grid-row: 2 / span 9;
  grid-column: 2 / span 9;
  background:
    radial-gradient(ellipse at center, rgba(99,102,241,0.12) 0%, transparent 70%),
    linear-gradient(180deg, #0a0f1c 0%, #050811 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 16px;
  pointer-events: none;
  border: 1px solid rgba(99,102,241,0.18);
}
.bp-center-round {
  font-size: 11px;
  color: #9aa7bd;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.bp-center-turn {
  font-size: 17px;
  font-weight: 800;
  margin-top: 6px;
  color: #facc15;
  text-shadow: 0 0 12px rgba(250,204,21,0.45);
  text-align: center;
}
.bp-center-dice {
  font-size: 56px;
  margin-top: 14px;
  background: linear-gradient(180deg, #1a2030 0%, #0d1422 100%);
  border: 2px solid #2c3445;
  border-radius: 14px;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.bp-center-dice.rolling {
  animation: bpDiceRoll 0.55s cubic-bezier(0.55, 0.05, 0.4, 1);
}
.bp-center-dice.result {
  animation: bpDicePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 0 3px #facc15,
    0 0 28px rgba(250,204,21,0.6),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
@keyframes bpDiceRoll {
  0%   { transform: rotate(0) scale(1); }
  50%  { transform: rotate(540deg) scale(1.18); }
  100% { transform: rotate(1080deg) scale(1); }
}
@keyframes bpDicePop {
  0%   { transform: scale(0.6); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.bp-center-hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 10px;
  max-width: 230px;
  text-align: center;
  letter-spacing: 0.3px;
}
.bp-auto-hint {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #facc15;
  background: rgba(250,204,21,0.12);
  border: 1px solid rgba(250,204,21,0.35);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.bp-auto-hint.warn {
  color: #fbbf24;
  background: rgba(251,191,36,0.18);
  border-color: rgba(251,191,36,0.55);
}
.bp-auto-hint.critical {
  color: #ef4444;
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.6);
  animation: bpAutoCrit 0.5s ease-in-out infinite;
}
@keyframes bpAutoCrit {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.65; }
}

/* ===== 토큰 (한 칸 내부) ===== */
.bp-tile-tokens {
  position: absolute;
  inset: auto 2px 2px 2px;
  bottom: 2px;
  height: 60%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  pointer-events: none;
}
.bp-token {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--token-color, #6366f1) center/cover;
  border: 2px solid #0d1422;
  outline: 1.5px solid var(--token-color, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  box-shadow: 0 2px 5px rgba(0,0,0,0.6);
}
.bp-token-more {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a2030;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* ===== 현재 턴 큰 토큰 (보드 위 absolute) ===== */
.bp-active-token {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--token-color, #facc15) center/cover;
  border: 3px solid #facc15;
  box-shadow:
    0 0 0 3px rgba(250,204,21,0.55),
    0 0 22px rgba(250,204,21,0.7),
    0 6px 14px rgba(0,0,0,0.5);
  z-index: 20;
  transition:
    top 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    left 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
  animation: bpActivePulse 1.4s ease-in-out infinite;
}
.bp-active-token.hop { animation: bpActiveHop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), bpActivePulse 1.4s ease-in-out infinite; }
@keyframes bpActivePulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(250,204,21,0.55),
      0 0 22px rgba(250,204,21,0.7),
      0 6px 14px rgba(0,0,0,0.5);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(250,204,21,0.85),
      0 0 38px rgba(250,204,21,0.95),
      0 6px 18px rgba(0,0,0,0.55);
  }
}
@keyframes bpActiveHop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-14px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

/* ===== 플레이어 사이드 카드 ===== */
.bp-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.bp-pcard {
  background: linear-gradient(180deg, #1a2030 0%, #15192a 100%);
  border: 2px solid var(--token-color, #2c3445);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  transition: all .2s;
}
.bp-pcard.current {
  box-shadow:
    0 0 0 3px #facc15,
    0 0 18px rgba(250,204,21,0.55);
  transform: translateY(-2px) scale(1.02);
  animation: bpActivePulse 1.4s ease-in-out infinite;
}
.bp-pcard-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--token-color, #6366f1) center/cover;
  border: 2.5px solid var(--token-color, #6366f1);
  outline: 2px solid #0d1422;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.bp-pcard-body { flex: 1; min-width: 0; }
.bp-pcard-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--token-color, #e6ebf5);
}
.bp-pcard-meta {
  font-size: 11px;
  color: #c2c8d4;
  margin-top: 3px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bp-pcard-chip {
  background: #2c3445;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

/* ===== 화면 중앙 큰 배너 ===== */
.bp-banner-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}
.bp-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 36px;
  border-radius: 20px;
  font-weight: 900;
  animation: bpBannerIn 0.36s cubic-bezier(0.18, 1.27, 0.66, 0.99);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.bp-banner.out { animation: bpBannerOut 0.4s ease-in forwards; }
.bp-banner-emoji { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
.bp-banner-label {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-top: 6px;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.bp-banner-sub {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
}

.bp-banner.coin    { background: linear-gradient(135deg, #16a34a, #15803d); }
.bp-banner.minus   { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.bp-banner.event   { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.bp-banner.item    { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bp-banner.penalty { background: linear-gradient(135deg, #ec4899, #be185d); }
.bp-banner.mini    { background: linear-gradient(135deg, #facc15, #d97706); }
.bp-banner.start   { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.bp-banner.safe    { background: linear-gradient(135deg, #475569, #1e293b); }
.bp-banner.dice    { background: linear-gradient(135deg, #6366f1, #4338ca); }

/* Rare 이벤트 — 황금 테두리 + 더 크게 + 회전 후광 */
.bp-banner.rare {
  border: 3px solid #facc15;
  box-shadow:
    0 0 0 5px rgba(250,204,21,0.35),
    0 0 40px rgba(250,204,21,0.55),
    0 12px 40px rgba(0,0,0,0.5);
  animation: bpBannerIn 0.4s cubic-bezier(0.18, 1.27, 0.66, 0.99), bpRareShine 1.5s ease-in-out infinite 0.4s;
}
.bp-banner.rare .bp-banner-emoji { font-size: 72px; }
.bp-banner.rare .bp-banner-label { font-size: 24px; }
.bp-banner.rare::before {
  content: "✨ RARE ✨";
  position: absolute;
  top: -10px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a2030;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 12px;
  border-radius: 999px;
  letter-spacing: 2px;
  box-shadow: 0 2px 8px rgba(250,204,21,0.6);
}
@keyframes bpRareShine {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.15) saturate(1.25); }
}

/* 이벤트 발동 시 보드 진동 */
.bp-board.shake {
  animation: bpBoardShake 0.45s ease-in-out;
}
@keyframes bpBoardShake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-3px, 1px) rotate(-0.5deg); }
  25% { transform: translate(4px, -2px) rotate(0.6deg); }
  40% { transform: translate(-3px, 2px) rotate(-0.4deg); }
  60% { transform: translate(3px, 1px) rotate(0.3deg); }
  80% { transform: translate(-2px, -1px) rotate(-0.2deg); }
}

/* 영향받은 플레이어 카드 펄스 */
.bp-pcard.affected {
  animation: bpAffected 0.7s ease-out;
}
@keyframes bpAffected {
  0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7); }
  50%  { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); transform: scale(1); }
}

/* ===== 손패 (아이템 카드) ===== */
.bp-hand-wrap {
  margin-top: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #161b29 0%, #11151f 100%);
  border-radius: 10px;
  border: 1px solid #2c3445;
}
.bp-hand-label {
  font-size: 12px;
  color: #9aa7bd;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bp-hand-label-hint {
  font-size: 10px;
  color: #facc15;
  background: rgba(250,204,21,0.12);
  padding: 2px 6px;
  border-radius: 6px;
}
.bp-hand {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  min-height: 132px;
}
.bp-hand:empty::after {
  content: "🂠 손패 없음 — 🎴 칸 도착 시 카드 획득";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #475569;
  font-size: 12px;
  font-style: italic;
}
.bp-icard {
  flex: 0 0 auto;
  width: 100px;
  min-height: 124px;
  padding: 8px 6px;
  background: linear-gradient(180deg, #1a2030 0%, #15192a 100%);
  border: 2px solid #2c3445;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform .14s, box-shadow .2s, border-color .2s;
  position: relative;
  user-select: none;
}
.bp-icard:not(.disabled):hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
}
.bp-icard.disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }
.bp-icard.rare {
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250,204,21,0.3);
}
.bp-icard.rare::before {
  content: "✨";
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 11px;
}
.bp-icard-emoji { font-size: 30px; margin-bottom: 4px; line-height: 1; }
.bp-icard-name { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.bp-icard-text { font-size: 9px; color: #c2c8d4; line-height: 1.25; flex: 1; }

/* 타겟 선택 모달 (카드게임 cg-target-overlay 재사용 가능하지만 별도 정의) */
.bp-target-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}
.bp-target-modal {
  background: #1a2030;
  border-radius: 14px;
  padding: 18px;
  max-width: 440px;
  width: 100%;
  border: 1px solid #2c3445;
}
.bp-target-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.bp-target-card-preview {
  background: #161b29;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.bp-target-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.bp-target-btn {
  padding: 10px;
  background: #161b29;
  color: #e6ebf5;
  border: 2px solid #2c3445;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 13px;
}
.bp-target-btn span { font-size: 11px; color: #9aa7bd; }
.bp-target-btn:hover { transform: translateY(-1px); }
.bp-target-cancel {
  width: 100%;
  padding: 10px;
  background: #2c3445;
  color: #e6ebf5;
  border: 1px solid #3b4356;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== 벌칙 카테고리 토글 (로비) ===== */
.bp-penalty-kinds {
  margin: 10px 0;
  padding: 10px;
  background: #161b29;
  border: 1px solid #2c3445;
  border-radius: 10px;
}
.bp-penalty-kinds-label {
  font-size: 11px;
  color: #9aa7bd;
  margin-bottom: 6px;
  font-weight: 700;
}
.bp-penalty-kinds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.bp-penalty-kind-btn {
  background: #1a2030;
  color: #9aa7bd;
  border: 1.5px solid #2c3445;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all .14s;
  font-weight: 600;
  user-select: none;
}
.bp-penalty-kind-btn.on {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: #fff;
  border-color: #f9a8d4;
  box-shadow: 0 2px 8px rgba(236,72,153,0.35);
}
.bp-penalty-kind-btn:not(.disabled):hover { transform: translateY(-1px); }
.bp-penalty-kind-btn.disabled { cursor: not-allowed; opacity: 0.5; }

/* ===== 결과 화면 벌칙 섹션 ===== */
.bp-penalty-section {
  margin: 18px 0;
  padding: 16px;
  background:
    radial-gradient(ellipse at top, rgba(236,72,153,0.18) 0%, transparent 60%),
    #161b29;
  border: 1.5px solid #831843;
  border-radius: 14px;
  text-align: center;
}
.bp-penalty-section-title {
  font-size: 18px;
  font-weight: 900;
  color: #ec4899;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(236,72,153,0.55);
}
.bp-penalty-section-loser {
  font-size: 14px;
  color: #fbcfe8;
  margin-bottom: 14px;
  font-weight: 700;
}
.bp-spin-btn {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform .15s;
  box-shadow: 0 6px 18px rgba(236,72,153,0.45);
}
.bp-spin-btn:hover { transform: translateY(-2px) scale(1.04); }

/* 룰렛 휠 */
.bp-roulette-wheel {
  position: relative;
  margin: 18px auto;
  width: 280px;
  max-width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2030 0%, #0d1422 100%);
  border: 4px solid #facc15;
  box-shadow:
    0 0 0 6px rgba(250,204,21,0.25),
    0 0 36px rgba(250,204,21,0.5),
    inset 0 0 30px rgba(0,0,0,0.5);
}
.bp-roulette-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: transform 3.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bp-roulette-item {
  position: absolute;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 24px;
  color: #facc15;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.bp-roulette-item-label {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.bp-roulette-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  color: #ef4444;
  z-index: 5;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  animation: bpPointerBounce 0.8s ease-in-out infinite;
}
@keyframes bpPointerBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 4px); }
}
.bp-roulette-center {
  position: absolute;
  inset: 30% 30% 30% 30%;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 0 20px rgba(250,204,21,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #1a2030;
}

.bp-penalty-result {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(190,24,93,0.18));
  border: 2px solid #ec4899;
  border-radius: 12px;
  animation: bpPenaltyResultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bpPenaltyResultPop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.bp-penalty-result-emoji { font-size: 56px; line-height: 1; }
.bp-penalty-result-title { font-size: 22px; font-weight: 900; color: #fbcfe8; margin-top: 8px; }
.bp-penalty-result-desc { font-size: 13px; color: #f9a8d4; margin-top: 4px; }
.bp-penalty-result-loser { font-size: 12px; color: #9aa7bd; margin-top: 8px; }

/* ===== 카운트다운 오버레이 ===== */
.bp-countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1700;
  pointer-events: none;
}
.bp-countdown-number {
  font-size: 200px;
  font-weight: 900;
  color: #facc15;
  text-shadow:
    0 0 30px rgba(250,204,21,0.9),
    0 8px 20px rgba(0,0,0,0.6);
  animation: bpCountdownPop 1s ease-in-out;
  letter-spacing: -8px;
}
.bp-countdown-go {
  font-size: 120px;
  font-weight: 900;
  color: #22c55e;
  text-shadow:
    0 0 40px rgba(34,197,94,0.9),
    0 8px 20px rgba(0,0,0,0.6);
  animation: bpCountdownGo 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bpCountdownPop {
  0%   { transform: scale(2.0); opacity: 0; }
  20%  { transform: scale(1.0); opacity: 1; }
  80%  { transform: scale(1.0); opacity: 1; }
  100% { transform: scale(0.4); opacity: 0; }
}
@keyframes bpCountdownGo {
  0%   { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  40%  { transform: scale(1.4) rotate(0); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ===== 턴 인터미션 배너 (작게) ===== */
.bp-turn-intermission {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1480;
  pointer-events: none;
}
.bp-turn-intermission-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(67,56,202,0.95));
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  animation: bpTurnSlide 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bpTurnSlide {
  0%   { transform: translateY(-20px) scale(0.8); opacity: 0; }
  20%  { transform: translateY(0) scale(1.05); opacity: 1; }
  80%  { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-20px) scale(0.9); opacity: 0; }
}

/* ===== 결과 화면 — 어워드 ===== */
.bp-awards {
  margin: 16px 0;
  padding: 14px;
  background:
    radial-gradient(ellipse at top, rgba(250,204,21,0.12) 0%, transparent 60%),
    #161b29;
  border: 1.5px solid #facc15;
  border-radius: 14px;
}
.bp-awards-title {
  font-size: 14px;
  font-weight: 900;
  color: #facc15;
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 1.2px;
  text-shadow: 0 0 10px rgba(250,204,21,0.4);
}
.bp-award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.bp-award {
  background: linear-gradient(180deg, #1a2030 0%, #0d1422 100%);
  border: 1.5px solid #2c3445;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform .14s;
}
.bp-award.mvp {
  border-color: #facc15;
  background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(245,158,11,0.12));
  box-shadow: 0 0 16px rgba(250,204,21,0.35);
}
.bp-award-emoji { font-size: 28px; line-height: 1; flex-shrink: 0; }
.bp-award-body { flex: 1; min-width: 0; }
.bp-award-title {
  font-size: 12px;
  font-weight: 800;
  color: #e6ebf5;
  letter-spacing: 0.5px;
}
.bp-award-recipient {
  font-size: 13px;
  font-weight: 700;
  color: #facc15;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-award-detail {
  font-size: 10px;
  color: #9aa7bd;
  margin-top: 2px;
}

/* ===== 코인 추이 차트 ===== */
.bp-chart-wrap {
  margin: 18px 0;
  padding: 14px;
  background: #161b29;
  border: 1px solid #2c3445;
  border-radius: 12px;
}
.bp-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #c2c8d4;
  margin-bottom: 10px;
}
.bp-chart {
  width: 100%;
  height: 240px;
  background: #0a0f1c;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.bp-chart-svg { width: 100%; height: 100%; display: block; }
.bp-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
}
.bp-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  background: #1a2030;
  border-radius: 999px;
  border: 1px solid #2c3445;
}
.bp-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ===== 통계 표 ===== */
.bp-stats-table {
  margin: 12px 0;
  background: #161b29;
  border: 1px solid #2c3445;
  border-radius: 12px;
  overflow-x: auto;
}
.bp-stats-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bp-stats-table th {
  background: #1a2030;
  color: #9aa7bd;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #2c3445;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.bp-stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e6ebf5;
  white-space: nowrap;
}
.bp-stats-table tr.winner td { background: rgba(250,204,21,0.08); }
.bp-stats-table tr:last-child td { border-bottom: none; }
.bp-stats-pname {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.bp-stats-pname-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@media (max-width: 640px) {
  .bp-chart { height: 180px; }
  .bp-award-grid { grid-template-columns: 1fr; }
  .bp-stats-table table { font-size: 11px; }
  .bp-stats-table th, .bp-stats-table td { padding: 6px 8px; }
}

/* ===== 미니게임 풀스크린 오버레이 ===== */
.bp-mg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(8,11,22,0.96), rgba(15,20,38,0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  flex-direction: column;
  padding: 16px;
}
.bp-mg-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #1a2030, #0d1422);
  border: 2px solid #facc15;
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 0 0 5px rgba(250,204,21,0.18), 0 12px 40px rgba(0,0,0,0.6);
  animation: bpMgIn 0.32s cubic-bezier(0.18, 1.27, 0.66, 0.99);
}
@keyframes bpMgIn {
  0% { transform: scale(0.7) translateY(40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.bp-mg-title {
  font-size: 14px;
  color: #9aa7bd;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.bp-mg-name {
  font-size: 28px;
  font-weight: 900;
  color: #facc15;
  margin: 6px 0 2px;
  text-shadow: 0 0 14px rgba(250,204,21,0.45);
}
.bp-mg-desc {
  font-size: 13px;
  color: #c2c8d4;
  margin-bottom: 18px;
}
.bp-mg-content {
  margin: 14px 0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* 반응속도 */
.bp-mg-reaction-zone {
  width: 240px;
  height: 240px;
  border-radius: 24px;
  background: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background .15s, transform .14s;
  box-shadow: 0 0 36px rgba(239,68,68,0.55);
}
.bp-mg-reaction-zone.go {
  background: #22c55e;
  box-shadow: 0 0 56px rgba(34,197,94,0.85);
  animation: bpMgPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bp-mg-reaction-zone.foul {
  background: #6b7280;
  cursor: not-allowed;
}
@keyframes bpMgPop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* 숫자 맞추기 */
.bp-mg-guess-input {
  background: #161b29;
  border: 2px solid #2c3445;
  color: #facc15;
  font-size: 36px;
  font-weight: 900;
  text-align: center;
  width: 160px;
  padding: 10px;
  border-radius: 12px;
  font-family: monospace;
}
.bp-mg-guess-input:focus {
  outline: none;
  border-color: #facc15;
  box-shadow: 0 0 22px rgba(250,204,21,0.4);
}
.bp-mg-guess-slider {
  width: 100%;
  max-width: 280px;
  margin: 8px 0;
}
.bp-mg-guess-submit {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1a2030;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 1px;
}

/* 빠른 클릭 */
.bp-mg-click-btn {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #facc15, #f59e0b);
  border: 5px solid #fde047;
  color: #1a2030;
  font-size: 40px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s;
  box-shadow: 0 0 36px rgba(250,204,21,0.55);
}
.bp-mg-click-btn:active { transform: scale(0.92); }
.bp-mg-click-count {
  font-size: 64px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 18px rgba(250,204,21,0.5);
  font-family: monospace;
}

/* 눈치게임 */
.bp-mg-nunchi-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.bp-mg-nunchi-current {
  font-size: 64px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 18px rgba(250,204,21,0.5);
  font-family: monospace;
}
.bp-mg-nunchi-target {
  font-size: 13px;
  color: #9aa7bd;
}
.bp-mg-nunchi-btn {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.bp-mg-nunchi-btn:disabled {
  background: #2c3445;
  cursor: not-allowed;
  opacity: 0.5;
}
.bp-mg-nunchi-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.bp-mg-nunchi-chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: #1a2030;
  border: 1px solid #2c3445;
  color: #c2c8d4;
}
.bp-mg-nunchi-chip.eliminated { background: rgba(239,68,68,0.18); color: #fca5a5; }

/* 카운트다운 */
.bp-mg-countdown {
  font-size: 100px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 24px rgba(250,204,21,0.65);
  animation: bpMgCountPulse 0.5s ease-in-out;
}
@keyframes bpMgCountPulse {
  0% { transform: scale(2); opacity: 0; }
  40% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.6); opacity: 0; }
}

/* 결과 */
.bp-mg-result {
  margin-top: 12px;
}
.bp-mg-result-title {
  font-size: 22px;
  font-weight: 900;
  color: #facc15;
  margin-bottom: 8px;
}
.bp-mg-result-secret {
  font-size: 13px;
  color: #9aa7bd;
  margin-bottom: 10px;
}
.bp-mg-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #161b29;
  border: 1px solid #2c3445;
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 13px;
}
.bp-mg-result-row.rank1 {
  background: linear-gradient(135deg, rgba(250,204,21,0.2), rgba(245,158,11,0.12));
  border-color: #facc15;
  font-weight: 700;
}
.bp-mg-result-row.eliminated { opacity: 0.5; }
.bp-mg-result-rank {
  font-weight: 800;
  color: #facc15;
  min-width: 28px;
}
.bp-mg-result-name { flex: 1; text-align: left; padding-left: 10px; }
.bp-mg-result-reward { color: #22c55e; font-weight: 800; }
.bp-mg-result-detail { color: #9aa7bd; font-size: 11px; padding-left: 8px; }

/* 폭탄 칸 표시 */
.bp-tile.has-bomb::after {
  content: "💣";
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 13px;
  animation: bpBombBlink 0.8s ease-in-out infinite;
  z-index: 6;
}
@keyframes bpBombBlink {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

@keyframes bpBannerIn {
  0% { transform: scale(0.4) rotate(-4deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes bpBannerOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3) translateY(-40px); opacity: 0; }
}

/* ===== 큰 주사위 오버레이 (굴림 중) ===== */
.bp-dice-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1490;
}
.bp-dice-big {
  width: 160px;
  height: 160px;
  font-size: 130px;
  background: linear-gradient(180deg, #1a2030 0%, #0d1422 100%);
  border: 4px solid #facc15;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 5px rgba(250,204,21,0.4),
    0 0 56px rgba(250,204,21,0.7),
    0 18px 40px rgba(0,0,0,0.65);
  animation: bpDiceRollBig 0.6s cubic-bezier(0.55, 0.05, 0.4, 1);
}
@keyframes bpDiceRollBig {
  0%   { transform: rotate(0) scale(0.6); opacity: 0.6; }
  50%  { transform: rotate(540deg) scale(1.15); opacity: 1; }
  100% { transform: rotate(1080deg) scale(1); opacity: 1; }
}
.bp-dice-big.result-pop {
  animation: bpDiceResultPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bpDiceResultPop {
  0%   { transform: scale(0.4); }
  60%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .bp-board-wrap { max-width: 100%; }
  .bp-board { padding: 5px; gap: 3px; }
  .bp-tile-emoji { font-size: 17px; }
  .bp-tile.start .bp-tile-emoji { font-size: 19px; }
  .bp-tile-label { display: none; }
  .bp-tile-idx { font-size: 7px; }
  .bp-active-token { width: 26px; height: 26px; font-size: 10px; }
  .bp-token { font-size: 8px; border-width: 1.5px; outline-width: 1px; }
  .bp-center-dice { width: 60px; height: 60px; font-size: 40px; border-radius: 10px; }
  .bp-center-turn { font-size: 14px; }
  .bp-center-hint { font-size: 9px; }
  .bp-roster { grid-template-columns: repeat(2, 1fr); }
  .bp-banner-emoji { font-size: 48px; }
  .bp-banner-label { font-size: 17px; }
  .bp-banner { padding: 16px 26px; }
  .bp-dice-big { width: 120px; height: 120px; font-size: 96px; }
}

/* 결과 행 (보드파티 자체 클래스) */
.bp-result-row {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(20, 24, 36, 0.65);
  border: 1px solid rgba(140, 160, 220, 0.16);
  font-size: 13px;
}
.bp-result-row.winner {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18) 0%, rgba(250, 204, 21, 0.06) 100%);
  border-color: rgba(250, 204, 21, 0.45);
}
.bp-result-row.me {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.22);
}
.bp-result-row.winner.me {
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.32), 0 0 12px rgba(56, 189, 248, 0.2);
}
.bp-result-me-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(56,189,248,0.18);
  border: 1px solid rgba(56,189,248,0.5);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #7dd3fc;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* 짧은 뷰포트 컴팩트 — 보드/배너/HUD 축소 */
@media (max-height: 720px){
  .bp-board{ padding: 6px; gap: 4px; }
  .bp-tile-emoji{ font-size: 18px; }
  .bp-tile-label{ font-size: 9px; }
  .bp-active-token{ width: 28px; height: 28px; font-size: 11px; }
  .bp-center-dice{ width: 68px; height: 68px; font-size: 44px; }
  .bp-banner-emoji{ font-size: 44px; }
  .bp-banner-label{ font-size: 16px; }
  .bp-banner{ padding: 14px 22px; }
  .bp-dice-big{ width: 100px; height: 100px; font-size: 80px; }
}
@media (max-height: 560px){
  .bp-tile-emoji{ font-size: 15px; }
  .bp-tile-label{ display: none; }
  .bp-center-dice{ width: 56px; height: 56px; font-size: 36px; }
  .bp-banner-emoji{ font-size: 36px; }
  .bp-banner-label{ font-size: 14px; }
  .bp-banner{ padding: 10px 16px; }
}
