﻿:root {
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-deep: #0a0f15;
  --accent: #ffd700;
  --text: #e8edf2;
  --text-dim: #8b9bb0;
  --win: #4ade80;
  --neutral: #fbbf24;
  --loss: #f87171;
  --border: #2a3a52;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f72585;
  --gp: #d4a017;  /* v2.10 — GP 자산 컬러 (asset-color-policy) */
  --primary: linear-gradient(135deg, #ff6b35, #f72585);
}
/* v2.10 — GP 표시 클래스 (profile.css 와 동일 표준) */
.color-gp { color: var(--gp) !important; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(247, 37, 133, 0.16), transparent 22rem),
    radial-gradient(circle at 10% 80%, rgba(239, 68, 68, 0.10), transparent 18rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden;
  user-select: none;
  touch-action: manipulation;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 2px 0 4px;
}
.page-title { text-align: center; font-size: 16px; font-weight: 900; }
.nav-btn {
  min-width: 58px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:active { transform: scale(0.97); }

.user-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(56, 189, 248, 0.06)), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
}
.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  display: grid;
  place-items: center;
  font-size: 28px;
  flex: 0 0 auto;
  color: white;
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.18);
}
.user-info { min-width: 0; }
.user-name {
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 950;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.user-uid {
  display: inline-block;
  vertical-align: baseline;
  font-size: 1.36em;
  font-weight: 1000;
  letter-spacing: 0.5px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.user-login-id {
  display: inline-block;
  max-width: min(130px, 44vw);
  margin-left: 6px;
  color: #b7c9ee;
  font-size: 0.62em;
  font-weight: 850;
  vertical-align: baseline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-summary {
  margin-top: 7px;
  font-size: 11px;
  color: #a7c7ff;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-summary .cp-label {
  color: #ff6b35;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.user-summary b {
  color: #ff6b35;
  font-weight: 500;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.user-summary .gold {
  color: var(--accent);
  font-weight: 500;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.user-summary .gold .unit {
  margin-left: 2px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1em;
}
.user-xp-track {
  width: min(220px, 100%);
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(10, 15, 21, 0.72);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(43, 60, 83, 0.8);
}
.user-xp-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a78bfa, #38bdf8);
  transition: width 0.25s ease;
}
.user-lv-pill {
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: var(--accent);
  background: rgba(10, 15, 21, 0.34);
  border-radius: 14px;
  padding: 8px 11px;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
  min-width: 68px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(167, 139, 250, 0.12);
}

.topbar { display: grid; grid-template-columns: minmax(124px, 0.7fr) minmax(0, 1.55fr); gap: 8px; }
.topcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
/* profile .asset-label 톤 일치 */
.topcard-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 800; }
.topcard-value {
  font-size: clamp(22px, 6.6vw, 26px);
  font-weight: 900;
  margin-top: 5px;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
  letter-spacing: 0;
}
/* CP value — 1~5자리(최대 99,999)는 동일 base 크기 유지 (shard 와 정합). 6자리 이상 안전망. */
.topcard-value.power { color: #ff6b35; }
.topcard-value.power[data-digits="6"] { font-size: clamp(18px, 5.4vw, 22px); }
.topcard-value.power[data-digits="7"],
.topcard-value.power[data-digits="8"],
.topcard-value.power[data-digits="9"] { font-size: clamp(14px, 4.2vw, 18px); }
.topcard-value.shard {
  color: #ffd700;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}
.topcard-value.shard .reward-num {
  font-size: clamp(22px, 6.6vw, 26px);
  font-weight: 900;
  line-height: 1;
  color: inherit;
}
.topcard-value.shard .reward-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .topbar { grid-template-columns: minmax(112px, 0.65fr) minmax(0, 1.55fr); gap: 6px; }
  .topcard { padding: 12px 9px; }
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 2px 0;
  margin-top: 4px;
}
.section-title .sub { font-size: 10px; letter-spacing: 0; text-transform: none; opacity: 0.75; font-weight: 700; }

/* ==================== match-card (諛고? phase 癒몄떊) ==================== */
.match-card {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.12), transparent 60%),
    linear-gradient(135deg, rgba(247, 37, 133, 0.18), rgba(255, 107, 53, 0.06)),
    var(--bg-card);
  border: 1px solid rgba(247, 37, 133, 0.4);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 0 24px rgba(247, 37, 133, 0.18);
  overflow: hidden;
}
.match-card.hidden { display: none; }
.match-meta {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.match-title { font-size: 22px; font-weight: 900; line-height: 1; }
.match-sub { font-size: 12px; color: var(--text-dim); }

.match-btn {
  margin-top: 6px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  width: 100%;
  max-width: 260px;
  font-family: "Pretendard Variable", Pretendard, inherit;
}
.match-btn:active { transform: scale(0.98); }
.match-btn.ghost {
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--border);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
}
.action-row.three {
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 6px;
  max-width: 380px;
}
.action-row .match-btn { margin-top: 0; max-width: none; padding: 12px 8px; font-size: 14px; }
.action-row.three .match-btn { padding: 11px 4px; font-size: 13px; }
.action-row.three .match-btn.cancel { font-size: 12px; padding: 11px 0; opacity: 0.85; }

.match-spinner {
  font-size: 56px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* v2.8.3 (2026-05-22) — duel-ui.js 패턴 참조. 라운드별 hit 시 네온 플래시 1회. 기존 shake/hit-* transform 위에 box-shadow stack. */
@keyframes duel-neon-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(247, 37, 133, 0), 0 0 0 0 rgba(255, 107, 53, 0);
    border-color: #2b3c53;
  }
  50% {
    box-shadow: 0 0 28px 6px rgba(247, 37, 133, 0.85), 0 0 56px 14px rgba(255, 107, 53, 0.45), inset 0 0 18px rgba(247, 37, 133, 0.35);
    border-color: #f72585;
  }
}
@keyframes duel-neon-strong {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0), 0 0 0 0 rgba(247, 37, 133, 0);
    border-color: #2b3c53;
  }
  25% {
    box-shadow: 0 0 48px 12px rgba(255, 215, 0, 1), 0 0 96px 24px rgba(247, 37, 133, 0.7), inset 0 0 28px rgba(255, 215, 0, 0.55);
    border-color: #ffd700;
  }
  65% {
    box-shadow: 0 0 32px 8px rgba(247, 37, 133, 0.85), 0 0 64px 16px rgba(255, 107, 53, 0.5), inset 0 0 20px rgba(247, 37, 133, 0.35);
    border-color: #f72585;
  }
}
.match-card.duel-neon-normal { animation: duel-neon-pulse 0.42s ease-out; }
.match-card.duel-neon-strong { animation: duel-neon-strong 0.55s ease-out; }
/* hit + neon 동시 적용 시 comma 결합 — transform/filter 는 hit-* 가, box-shadow/border 는 neon 이 담당 */
.match-card.hit-normal.duel-neon-normal { animation: gwHitNormal 0.18s cubic-bezier(0.36, 0.07, 0.19, 0.97), duel-neon-pulse 0.42s ease-out; }
.match-card.hit-strong.duel-neon-strong { animation: gwHitStrong 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97), duel-neon-strong 0.55s ease-out; }

.match-card.shake {
  animation: cardShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-color: var(--loss);
  box-shadow:
    0 0 28px rgba(239, 68, 68, 0.42),
    inset 0 0 32px rgba(239, 68, 68, 0.16);
}
@keyframes cardShake {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-7px, 2px, 0); }
  40%  { transform: translate3d(7px, -2px, 0); }
  60%  { transform: translate3d(-5px, 2px, 0); }
  80%  { transform: translate3d(5px, -2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
/* 매 라운드 임팩트 펄스 */
.match-card.hit-normal { animation: gwHitNormal 0.18s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes gwHitNormal {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  35%  { transform: translate3d(-5px, 1px, 0) scale(0.992); }
  70%  { transform: translate3d(5px, -1px, 0) scale(1.005); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* 30%+ 강타 — brightness flash 포함 */
.match-card.hit-strong { animation: gwHitStrong 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes gwHitStrong {
  0%   { transform: translate3d(0, 0, 0) scale(1); filter: brightness(1); }
  10%  { transform: translate3d(-12px, 3px, 0) scale(0.985); filter: brightness(1.5); }
  25%  { transform: translate3d(12px, -3px, 0) scale(1.018); filter: brightness(1.25); }
  40%  { transform: translate3d(-10px, 2px, 0) scale(1.005); filter: brightness(1.1); }
  55%  { transform: translate3d(10px, -2px, 0); }
  70%  { transform: translate3d(-7px, 2px, 0); }
  85%  { transform: translate3d(7px, -2px, 0); }
  100% { transform: translate3d(0, 0, 0) scale(1); filter: brightness(1); }
}
.match-card.flash { animation: cardFlash 0.6s ease-out; }
@keyframes cardFlash {
  0%   { box-shadow: 0 0 0 transparent; border-color: var(--border); }
  40%  { box-shadow: 0 0 30px rgba(255, 215, 0, 0.65); border-color: var(--accent); }
  100% { box-shadow: 0 0 24px rgba(247, 37, 133, 0.18); border-color: rgba(247, 37, 133, 0.4); }
}

/* 결과 모달 외곽 강조 플래시 — 승리(녹) / 패배(적) / 무승부(회) */
.modal.flash-win  { animation: gwModalFlashWin 1.1s cubic-bezier(0.16, 1, 0.3, 1); border-color: var(--win) !important; }
.modal.flash-loss { animation: gwModalFlashLoss 1.1s cubic-bezier(0.16, 1, 0.3, 1); border-color: var(--loss) !important; }
.modal.flash-tie  { animation: gwModalFlashTie 0.9s cubic-bezier(0.16, 1, 0.3, 1); border-color: #91a3b8 !important; }
@keyframes gwModalFlashWin {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); transform: scale(0.96); }
  25%  { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.55), 0 0 100px 18px rgba(74, 222, 128, 0.7); transform: scale(1.025); }
  60%  { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4), 0 0 60px 8px rgba(74, 222, 128, 0.45); transform: scale(1); }
  100% { box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), 0 0 24px 2px rgba(74, 222, 128, 0.2); transform: scale(1); }
}
@keyframes gwModalFlashLoss {
  0%   { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); transform: scale(0.96); }
  25%  { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.55), 0 0 100px 18px rgba(248, 113, 113, 0.7); transform: scale(0.98); }
  60%  { box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.4), 0 0 60px 8px rgba(248, 113, 113, 0.45); transform: scale(1); }
  100% { box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 0 24px 2px rgba(248, 113, 113, 0.2); transform: scale(1); }
}
@keyframes gwModalFlashTie {
  0%   { box-shadow: 0 0 0 0 rgba(145, 163, 184, 0); }
  35%  { box-shadow: 0 0 0 3px rgba(145, 163, 184, 0.5), 0 0 60px 10px rgba(145, 163, 184, 0.35); }
  100% { box-shadow: 0 0 0 1px rgba(145, 163, 184, 0.3), 0 0 18px 2px rgba(145, 163, 184, 0.18); }
}

.found-banner {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--neutral);
  text-transform: uppercase;
  animation: bannerFade 0.45s ease;
}
@keyframes bannerFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.found-banner.fight {
  color: var(--loss);
  letter-spacing: 6px;
  font-size: 14px;
  animation: fightPulse 0.42s ease-in-out infinite alternate;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.65);
}
@keyframes fightPulse {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.06); }
}

/* Gold War betting banner weight */
.stake-banner {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.stake-banner b {
  font-size: 16px;
  font-family: ui-monospace, monospace;
  margin: 0 4px;
}
.stake-banner.glow { animation: stakeGlow 0.7s ease-in-out infinite alternate; }
.stake-banner.pulse { animation: stakePulse 0.5s ease-in-out infinite alternate; }
@keyframes stakeGlow {
  from { text-shadow: 0 0 6px rgba(255, 215, 0, 0.4); transform: scale(1); }
  to   { text-shadow: 0 0 18px rgba(255, 215, 0, 0.85); transform: scale(1.04); }
}
@keyframes stakePulse {
  from { opacity: 0.85; }
  to   { opacity: 1; text-shadow: 0 0 14px rgba(255, 215, 0, 0.7); }
}

.bet-preview {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  max-width: 320px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.4px;
}
.bet-preview b { font-family: ui-monospace, monospace; font-size: 14px; font-weight: 900; }
.bet-preview .bet-win b { color: var(--win); }
.bet-preview .bet-loss b { color: var(--loss); }
.bet-preview .bet-divider { color: var(--text-dim); opacity: 0.6; }

.vs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 4px 0;
}
.vs-side {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.vs-pair {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  min-height: 64px;
}
.vs-sword {
  position: absolute;
  bottom: -4px;
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(247, 37, 133, 0.55));
  z-index: 2;
  pointer-events: none;
}
.vs-side.left .vs-sword,
.vs-side:not(.right) .vs-sword {
  right: calc(50% - 64px);
  bottom: 4px;
  transform: scale(-1, -1);
}
.vs-side.right .vs-sword {
  left: calc(50% - 64px);
  bottom: 4px;
  transform: scaleY(-1);
}
.vs-sword.glow { animation: swordGlow 0.5s ease-in-out infinite alternate; }
@keyframes swordGlow {
  from { filter: drop-shadow(0 0 4px rgba(247, 37, 133, 0.35)); }
  to   { filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.85)) brightness(1.15); }
}

.vs-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(247, 37, 133, 0.10)), var(--bg-deep);
  display: grid;
  place-items: center;
  font-size: 36px;
  line-height: 1;
  margin: 0 auto 6px;
  border: 1px solid rgba(255, 107, 53, 0.32);
  box-shadow: 0 0 14px rgba(247, 37, 133, 0.18);
}
.vs-row.vs-reveal .vs-avatar {
  animation: avatarPop 0.4s cubic-bezier(0.5, 1.6, 0.4, 1);
}
@keyframes avatarPop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.vs-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-weight: 800;
}

/* Compact LV and UID line for mobile readability */
.vs-lv-line {
  font-size: 11px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--neutral);
  letter-spacing: 0.5px;
  line-height: 1;
  margin: 0 0 3px;
  opacity: 0.95;
}

/* ?ъ슜???곷? 援щ텇 ??醫뚯륫 me ?쒖븞, ?곗륫 opp ?묓겕 */
.vs-side.left {
  border-color: rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(74, 222, 128, 0.03)), var(--bg-deep);
}
.vs-side.left .vs-avatar {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(74, 222, 128, 0.10)), var(--bg-deep);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}
.vs-side.right {
  border-color: rgba(247, 37, 133, 0.5);
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.10), rgba(248, 113, 133, 0.03)), var(--bg-deep);
}
.vs-side.right .vs-avatar {
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.32), rgba(248, 113, 133, 0.12)), var(--bg-deep);
  border-color: rgba(247, 37, 133, 0.5);
  box-shadow: 0 0 14px rgba(247, 37, 133, 0.25);
}
.vs-label.me { color: var(--cyan); font-weight: 900; }
.vs-label.opp { color: var(--loss); font-weight: 900; }
.vs-stats {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.vs-stats b {
  color: var(--accent);
  font-weight: 900;
  font-size: 16px;
}
.vs-mid {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.vs-mid.spark {
  font-size: 42px;
  animation: sparkSpin 0.6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}
@keyframes sparkSpin {
  0%   { transform: rotate(-20deg) scale(1); }
  50%  { transform: rotate(20deg) scale(1.35); }
  100% { transform: rotate(-20deg) scale(1); }
}
.vs-power {
  font-size: 24px;
  font-weight: 900;
  margin-top: 4px;
  color: var(--accent);
  font-family: ui-monospace, monospace;
}

.battle-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #ef4444, #f72585);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: battleGlow 0.6s ease-in-out;
}
@keyframes battleGlow {
  0%   { transform: scale(0.6); opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  60%  { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.85)); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 8px rgba(247, 37, 133, 0.5)); }
}

/* Battling phase HP round countdown */
.vs-side.hp-side { position: relative; overflow: visible; }
.vs-row.vs-battle .vs-side {
  background: var(--bg-deep);
  border-color: rgba(239, 68, 68, 0.32);
}
.vs-row.vs-battle .vs-power {
  font-size: 22px;
  color: var(--text);
}
.hp-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hp-bar-fill {
  height: 100%;
  transition: width 0.16s linear;
  background: linear-gradient(90deg, #ff6b35, #f72585);
  border-radius: inherit;
}
.hp-bar-fill.you { background: linear-gradient(90deg, var(--accent), #ff6b35); }
.hp-bar-fill.bot { background: linear-gradient(90deg, var(--loss), #7f1d1d); }

/* ?쇳?湲곕뒗 ?곕?吏 ????怨⑤뱶 ?먯떎 = ??*/
.damage-pop {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: 900;
  pointer-events: none;
  animation: damageRise 0.72s ease-out forwards;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  z-index: 3;
  white-space: nowrap;
  max-width: 100%;
  letter-spacing: -0.5px;
}
.damage-pop.blood {
  color: #fecaca;
  text-shadow:
    0 0 14px rgba(239, 68, 68, 0.95),
    0 0 6px rgba(127, 29, 29, 0.9),
    1px 1px 0 #7f1d1d,
    -1px -1px 0 #450a0a;
}
@keyframes damageRise {
  0%   { opacity: 0; transform: translate(-50%, 6px) scale(0.7) rotate(-3deg); }
  18%  { opacity: 1; transform: translate(-50%, -10px) scale(1.35) rotate(2deg); }
  60%  { opacity: 1; transform: translate(-50%, -34px) scale(1) rotate(-1deg); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(0.92); }
}

/* ==================== stake 카드 그리드 ==================== */
.stake-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stake-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.stake-card:active { transform: scale(0.99); }
.stake-card.cant { opacity: 0.42; cursor: not-allowed; }

.stake-card .stake-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.stake-card .stake-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.stake-card .stake-amount-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.stake-card .stake-amount {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stake-card .stake-unit {
  font-size: 1em;
  color: #ffd700;
  font-weight: 500;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.stake-card .stake-reward {
  flex: 0 0 auto;
  align-self: center;
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.26);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  color: var(--win);
  font-weight: 700;
  text-align: right;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 공정성 보정 안내 카드 */
.gw-fairness-card {
  background: linear-gradient(135deg, rgba(56,189,248,0.05), rgba(167,139,250,0.04)), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gw-fairness-head {
  font-size: 18px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 0.3px;
}
.gw-fairness-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  font-weight: 500;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.gw-fairness-line b { color: var(--accent); font-weight: 900; }
.gw-fairness-formula {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.55;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: rgba(0,0,0,0.18);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 2px solid var(--accent);
}
.gw-fairness-formula b { color: var(--accent); font-weight: 900; }
.gw-fairness-grid {
  display: grid;
  /* Iron → Champion 점진 width — 1.0 / 1.1 / 1.25 / 1.45 / 1.7 (스케일감 강조) */
  grid-template-columns: 1fr 1.1fr 1.25fr 1.45fr 1.7fr;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
}
.gw-fairness-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px;
  background: rgba(0,0,0,0.22);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.gw-fairness-grid .g-tier {
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  display: block;
}
.gw-fairness-grid .g-mult {
  font-size: 17px;
  color: var(--text);
  font-weight: 900;
  font-family: ui-monospace, monospace;
  line-height: 1;
  margin-top: 2px;
}
/* tier 별 컬러 — 게이밍 표준 등급 색 */
.gw-fairness-grid li:nth-child(1) .g-tier { color: #94a3b8; }
.gw-fairness-grid li:nth-child(2) .g-tier { color: #fb923c; }
.gw-fairness-grid li:nth-child(3) .g-tier { color: #67e8f9; }
.gw-fairness-grid li:nth-child(4) .g-tier { color: #c084fc; }
.gw-fairness-grid li:nth-child(5) .g-tier { color: #fbbf24; }
.gw-fairness-grid li:nth-child(1) { border-color: rgba(148,163,184,0.32); }
.gw-fairness-grid li:nth-child(2) { border-color: rgba(251,146,60,0.32); }
.gw-fairness-grid li:nth-child(3) { border-color: rgba(103,232,249,0.32); }
.gw-fairness-grid li:nth-child(4) { border-color: rgba(192,132,252,0.32); }
.gw-fairness-grid li:nth-child(5) { border-color: rgba(251,191,36,0.36); }
@media (max-width: 380px) {
  .gw-fairness-grid { gap: 4px; }
  .gw-fairness-grid li { padding: 7px 3px; }
  .gw-fairness-grid .g-tier { font-size: 10px; }
  .gw-fairness-grid .g-mult { font-size: 13px; }
}

/* stake 가용성 인디케이터 — 베팅 금액 옆 inline */
.stake-avail-slot { display: inline-flex; align-items: baseline; margin-left: 2px; }
.stake-avail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}
.stake-avail .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.stake-avail-green { color: var(--win); }
.stake-avail-green .dot { background: var(--win); box-shadow: 0 0 6px rgba(74,222,128,0.55); }
.stake-avail-yellow { color: #fbbf24; }
.stake-avail-yellow .dot { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.45); }
.stake-avail-red { color: var(--loss); }
.stake-avail-red .dot { background: var(--loss); box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.stake-avail-loading { color: var(--text-dim); }
.stake-avail-loading .dot { background: var(--border); }

.stake-card.green   { border-color: rgba(74, 222, 128, 0.22);  border-left-color: var(--win); }
.stake-card.cyan    { border-color: rgba(56, 189, 248, 0.22);  border-left-color: var(--cyan); }
.stake-card.violet  { border-color: rgba(167, 139, 250, 0.26); border-left-color: var(--violet); }
.stake-card.fire {
  border-color: rgba(255, 107, 53, 0.32);
  border-left-color: #ff6b35;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(247, 37, 133, 0.03)), var(--bg-card);
}
.stake-card.pink {
  border-color: rgba(247, 37, 133, 0.40);
  border-left-color: var(--pink);
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.12), rgba(255, 107, 53, 0.04)), var(--bg-card);
  box-shadow: 0 0 14px rgba(247, 37, 133, 0.14);
}

/* Tier accent — fairness-card 와 동일한 컬러 매핑 (Iron/Bronze/Diamond/Challenger/Champion) */
.stake-grid .stake-card:nth-child(1) { border-color: rgba(148,163,184,0.32); border-left-color: #94a3b8; }
.stake-grid .stake-card:nth-child(1) .stake-tag { color: #94a3b8; }
.stake-grid .stake-card:nth-child(2) { border-color: rgba(251,146,60,0.32); border-left-color: #fb923c; }
.stake-grid .stake-card:nth-child(2) .stake-tag { color: #fb923c; }
.stake-grid .stake-card:nth-child(3) { border-color: rgba(103,232,249,0.32); border-left-color: #67e8f9; }
.stake-grid .stake-card:nth-child(3) .stake-tag { color: #67e8f9; }
.stake-grid .stake-card:nth-child(4) { border-color: rgba(192,132,252,0.32); border-left-color: #c084fc; }
.stake-grid .stake-card:nth-child(4) .stake-tag { color: #c084fc; }
.stake-grid .stake-card:nth-child(5) { border-color: rgba(251,191,36,0.36); border-left-color: #fbbf24; }
.stake-grid .stake-card:nth-child(5) .stake-tag { color: #fbbf24; }

#stake-section {
  display: grid;
  gap: 8px;
}
#stake-section.hidden { display: none; }

.goldwar-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 10px;
  opacity: 0.65;
  margin-top: 8px;
  line-height: 1.6;
}
.goldwar-foot b { color: var(--accent); }

.goldwar-history-section {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}
/* 골드워 매치 히스토리 — 배틀 .log 와 동일 톤 (Pretendard / 12px / 단일 카드 + divider) */
.goldwar-log {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 4px 0;
  max-height: 320px;
  overflow-y: auto;
  font-size: 12px;
  border: 1px solid var(--border);
}
.gw-log-entry {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  font-weight: 700;
}
.gw-log-entry:last-child { border-bottom: none; }
.gw-log-entry.win  { color: var(--win); }
.gw-log-entry.loss { color: var(--loss); }
.gw-log-entry.tie  { color: var(--text-dim); }
.gw-log-entry.placeholder {
  color: var(--text-dim);
  justify-content: center;
  padding: 18px;
  font-weight: 500;
}
.gw-log-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-log-delta {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.75;
}

/* ==================== Modal ==================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  animation: fadeIn 0.18s ease;
}
.overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  border: 1px solid var(--border);
}
.confirm-icon { font-size: 48px; }
.confirm-icon.waiting-pulse { animation: waitingPulse 0.95s ease-in-out infinite alternate; }
@keyframes waitingPulse {
  from { transform: scale(0.96); opacity: 0.62; }
  to   { transform: scale(1.05); opacity: 1; }
}
.waiting-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.12), rgba(56, 189, 248, 0.04) 58%, transparent 60%);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.12);
}
.waiting-orbit::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-top-color: rgba(56, 189, 248, 0.86);
  border-right-color: rgba(247, 37, 133, 0.72);
  animation: waitSpin 1.35s linear infinite;
}
.waiting-core {
  position: relative;
  z-index: 1;
  font-size: 34px;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.28));
  animation: waitBob 1.05s ease-in-out infinite alternate;
}
.waiting-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
  animation: waitDot 1.2s ease-in-out infinite;
}
.waiting-dot.d1 { left: 10px; top: 17px; animation-delay: 0s; }
.waiting-dot.d2 { right: 7px; top: 33px; background: var(--cyan); animation-delay: 0.16s; }
.waiting-dot.d3 { left: 30px; bottom: 6px; background: var(--pink); animation-delay: 0.32s; }
@keyframes waitSpin { to { transform: rotate(360deg); } }
@keyframes waitBob {
  from { transform: translateY(2px) scale(0.96); opacity: 0.72; }
  to { transform: translateY(-2px) scale(1.05); opacity: 1; }
}
@keyframes waitDot {
  0%, 100% { transform: scale(0.65); opacity: 0.38; }
  50% { transform: scale(1.08); opacity: 1; }
}
.waiting-progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 15, 21, 0.78);
  border: 1px solid rgba(43, 60, 83, 0.75);
  margin: 0 0 8px;
}
.waiting-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan), var(--accent), var(--pink));
  animation: waitProgress var(--wait-ms, 3000ms) linear forwards;
}
@keyframes waitProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.waiting-meta {
  color: var(--text-dim);
  font-size: 10px;
  margin-bottom: 14px;
}
.confirm-actions.waiting-actions { margin-top: 2px; }
.confirm-title { font-size: 22px; font-weight: 900; margin: 12px 0 10px; }
.confirm-title.countdown-title { font-size: 16px; margin: 14px 0 4px; color: var(--text); }
.confirm-sub {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.confirm-sub b { color: var(--text); font-weight: 800; }
.confirm-sub b.gold { color: var(--accent); }
.confirm-sub b.loss { color: var(--loss); }
.confirm-sub b.uid { color: var(--cyan); font-family: ui-monospace, monospace; }
.confirm-sub .muted { color: var(--text-dim); opacity: 0.75; font-size: 11px; }
.confirm-sub.countdown-sub { margin-bottom: 10px; }

/* Five-second countdown ring */
.countdown-ring {
  width: 76px;
  height: 76px;
  margin: 6px auto 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 215, 0, 0.42);
  background: rgba(10, 15, 21, 0.55);
  color: var(--accent);
  font-family: ui-monospace, monospace;
  box-shadow: 0 0 24px rgba(247, 37, 133, 0.18);
  animation: countdownPulse 1s ease-in-out infinite alternate;
}
.countdown-ring span { font-size: 34px; font-weight: 950; line-height: 1; }
@keyframes countdownPulse {
  from { box-shadow: 0 0 12px rgba(255, 215, 0, 0.28); }
  to   { box-shadow: 0 0 28px rgba(255, 215, 0, 0.5); }
}

/* Compact modal VS cards */
.modal .vs-row { margin: 4px 0; gap: 8px; }
.modal .vs-side { padding: 10px 6px; }
.modal .vs-pair { min-height: 56px; margin-bottom: 4px; }
.modal .vs-avatar { width: 52px; height: 52px; font-size: 26px; margin: 0 auto 4px; }
.modal .vs-sword { font-size: 26px; }
.modal .vs-side.left .vs-sword,
.modal .vs-side:not(.right) .vs-sword { right: calc(50% - 52px); }
.modal .vs-side.right .vs-sword { left: calc(50% - 52px); }
.modal .vs-stats { font-size: 11px; margin-top: 4px; }
.modal .vs-stats b { font-size: 14px; }
.modal .vs-mid { font-size: 14px; }
.modal .bet-preview { font-size: 10px; margin: 6px auto 4px; max-width: 280px; }
.modal .bet-preview b { font-size: 13px; }
.modal .found-banner { margin-bottom: 4px; }

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.confirm-actions.single { /* Single button layout */ }

/* Boost option inside the betting confirm modal */
.boost-item {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-family: "Pretendard Variable", Pretendard, inherit;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.boost-item:active { transform: scale(0.99); }
.boost-item.active {
  border-color: rgba(255, 215, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.10), rgba(255, 107, 53, 0.04)), var(--bg-deep);
}
.boost-check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  position: relative;
  background: rgba(10, 15, 21, 0.5);
}
.boost-item.active .boost-check {
  border-color: var(--accent);
  background: var(--accent);
}
.boost-item.active .boost-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--bg);
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}
.boost-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.boost-name {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}
.boost-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}
.boost-cost {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent);
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}
.boost-warning {
  font-size: 11px;
  color: var(--loss);
  margin: -8px 0 12px;
  font-weight: 800;
  text-align: center;
}

/* 諛고? ?붾㈃ ?묒륫 遺?ㅽ듃 ?ъ슜 ?щ? 移???而댄뙥??*/
.boost-badge {
  display: inline-block;
  margin: 5px 0 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.2;
  white-space: nowrap;
}
.boost-badge.active {
  background: rgba(255, 215, 0, 0.16);
  border: 1px solid rgba(255, 215, 0, 0.62);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.55);
  animation: boostBadgePulse 1.1s ease-in-out infinite alternate;
}
.boost-badge.off {
  background: rgba(20, 28, 40, 0.45);
  border: 1px solid var(--border);
  color: var(--text-dim);
  opacity: 0.55;
}
@keyframes boostBadgePulse {
  from { box-shadow: 0 0 6px rgba(255, 215, 0, 0.28); transform: scale(1); }
  to   { box-shadow: 0 0 16px rgba(255, 215, 0, 0.62); transform: scale(1.05); }
}

/* Gold War battle score: baseScore = stake, score = stake + power */
.win-rate-hint {
  margin: 10px 0 6px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(10, 15, 21, 0.42);
}
.win-rate-hint .hp-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}
.win-rate-hint .hp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
/* v2.6 (2026-05-18) — my-only variant: 중앙 정렬 + 파이프 구분자 + YOUR STATS 라벨로 소속 명확.
   옛: 중앙 strip (HP/Boost/DMG) 이 VS 비교판처럼 보여 DMG 를 상대 HP 로 오인 (사용자 피드백).
   파이프 (`HP | Boost | DMG`) 는 중립 구분자 — 잘못된 인과 관계 안 주장 + boost 비활성 시도 자연스러움. */
.win-rate-hint.my-only .my-stats-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(43, 60, 83, 0.6);
}
.win-rate-hint.my-only .hp-stats {
  justify-content: center;
  gap: 0;
}
.win-rate-hint.my-only .hp-stat {
  align-items: center;
  padding: 2px 18px;
}
.win-rate-hint.my-only .hp-stat + .hp-stat {
  border-left: 1px solid rgba(43, 60, 83, 0.7);
}
.win-rate-hint.my-only .hp-formula {
  text-align: center;
}
.win-rate-hint .hp-stat-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.win-rate-hint .hp-stat-value {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}
.win-rate-hint .hp-stat-value.dmg {
  color: #ff6b35;
}
.win-rate-hint .hp-stat-value.chip {
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.42);
  color: var(--win);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.1;
}
.win-rate-hint .hp-formula {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(43, 60, 83, 0.6);
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.result-headline {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 10px;
}
.result-headline.win { color: var(--win); }
.result-headline.loss { color: var(--loss); }
.result-headline.tie { color: var(--neutral); }
.reward-row.tie b.down { color: var(--neutral); }
.reward-row.tie .cap { color: var(--text-dim); }

.score-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin: 12px 0;
}
.score-cell {
  background: var(--bg-deep);
  border-radius: 10px;
  padding: 10px 8px;
  border: 1px solid var(--border);
}
.score-cell.win { border-color: var(--win); background: rgba(74, 222, 128, 0.08); }
.score-cell.loss { border-color: var(--loss); background: rgba(248, 113, 113, 0.08); }
.score-label { font-size: 10px; color: var(--text-dim); letter-spacing: 0.8px; }
.score-value { font-size: 20px; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.score-sub { font-size: 10px; color: var(--text-dim); margin-top: 2px; font-variant-numeric: tabular-nums; }
.score-vs { align-self: center; font-size: 12px; color: var(--text-dim); font-weight: 900; }

.reward-row {
  background: var(--bg-deep);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  margin: 6px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reward-row b { color: var(--win); font-weight: 900; font-variant-numeric: tabular-nums; }
.reward-row b.down { color: var(--loss); }
.reward-row b.balance-gold { color: var(--accent); }
.reward-row.loss b { color: var(--loss); }
.reward-row .cap { color: var(--neutral); font-size: 10px; margin-left: 6px; }
.reward-row .label-gold { color: #ffd700; font-weight: 800; }

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.close-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: "Pretendard Variable", Pretendard, inherit;
}
.close-btn:active { transform: scale(0.98); }
.close-btn:disabled,
.close-btn.is-ready {
  opacity: 0.7;
  cursor: not-allowed;
  filter: saturate(0.85);
}
.close-btn.ghost {
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--border);
}
