/* ── GAME PAGE LAYOUT ────────────────────────────────────────────────────── */

body.game-page {
  overflow: hidden;
  height: 100svh;
}

.game-section {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 20px 80px rgba(0,0,0,0.95);
}
.game-section.slide-up {
  transform: translateY(-100%);
}

/* Gradient fade at the bottom of the game section */
.game-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 130px;
  background: linear-gradient(to bottom, transparent, rgba(8,8,12,0.88));
  pointer-events: none;
  z-index: 35;
}

/* ── GAME HEADER ─────────────────────────────────────────────────────────── */

.game-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  height: var(--nav-h);           /* same as navbar — visually identical height */
  background: rgb(12,12,14);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

.game-header-title {
  font-family: var(--font-hero);
  font-size: clamp(16px, 2.5vw, 26px);
  letter-spacing: 2px;
  color: var(--text);
  white-space: nowrap;
}
.game-header-title .gold { color: var(--gold); }

.game-score-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;    /* pushes scores to the right column edge */
}

.game-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 14px;
  min-width: 60px;
}
.game-score-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.game-score-val {
  font-family: var(--font-hero);
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

/* ── ARENA ───────────────────────────────────────────────────────────────── */

.game-arena {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.game-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: var(--text-muted);
}

/* ── SKIP BUTTON — in header ──────────────────────────────────────────────── */

.game-skip-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.game-skip-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.game-skip-btn:disabled { opacity: 0.3; cursor: default; }

/* ── RANKING SCROLL BUTTON — bottom-center overlay ───────────────────────── */

.game-scroll-btn {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: 33vw;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,215,0,0.75);
  transition: color 0.2s, filter 0.3s, gap 0.3s;
  padding: 0 12px 18px;
  min-height: 80px;
}
.game-scroll-btn:hover {
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
  gap: 8px;
}

.game-scroll-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.game-scroll-btn:hover .game-scroll-label {
  transform: translateY(-3px);
}

.game-scroll-arrow {
  font-size: 18px;
  animation: arrowBounce 1.8s ease-in-out infinite;
  transition: font-size 0.3s cubic-bezier(0.22,1,0.36,1);
}
.game-scroll-btn:hover .game-scroll-arrow {
  font-size: 24px;
  animation: arrowBounceFast 0.7s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0);   opacity: 1; }
  50%       { transform: translateY(5px); opacity: 0.6; }
}
@keyframes arrowBounceFast {
  0%, 100% { transform: translateY(0);   opacity: 1; }
  50%       { transform: translateY(7px); opacity: 0.5; }
}

/* ── VS BADGE ────────────────────────────────────────────────────────────── */

.game-vs-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hero);
  font-size: 18px;
  color: var(--gold);
  box-shadow: 0 0 0 6px rgba(0,0,0,0.6), 0 0 30px rgba(255,215,0,0.25);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.game-vs-badge.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
}

/* ── CARDS ───────────────────────────────────────────────────────────────── */

.game-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(30px);
  opacity: 0;
  z-index: 36;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
.game-card.entering { transform: translateY(0); opacity: 1; }
.game-card.exiting  { transform: translateY(-30px); opacity: 0; transition-duration: 0.22s; }
.game-card--a { border-right: 1px solid var(--border); }

.game-card:not(.card-winner):not(.card-loser):hover .game-card-overlay {
  background: rgba(255,215,0,0.06);
}
.game-card:not(.card-winner):not(.card-loser):hover .game-card-glow { opacity: 1; }
.game-card:not(.card-winner):not(.card-loser):hover .game-vote-btn {
  background: var(--gold); color: #000; transform: scale(1.05);
}
.game-card:not(.card-winner):not(.card-loser):hover .game-card-img { transform: scale(1.03); }

.game-card-img-wrap { position: absolute; inset: 0; overflow: hidden; }
.game-card-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  user-select: none;
  transition: transform 0.4s ease;
  display: block;
}

.game-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.05) 30%,
    rgba(0,0,0,0.65) 70%,
    rgba(0,0,0,0.92) 100%
  );
  transition: background 0.3s;
}

.game-card-glow {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
.game-card-glow--a { background: linear-gradient(to right, rgba(255,215,0,0.12), transparent 60%); }
.game-card-glow--b { background: linear-gradient(to left,  rgba(255,215,0,0.12), transparent 60%); }

.game-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 24px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px;
}
.game-card--a .game-card-info { align-items: flex-start; }
.game-card--b .game-card-info { align-items: flex-end; text-align: right; }

.game-card-factions { display: flex; gap: 6px; flex-wrap: wrap; }
.game-card--b .game-card-factions { justify-content: flex-end; }

.game-card-name {
  font-family: var(--font-hero);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  letter-spacing: 1px;
}

.game-vote-btn {
  margin-top: 6px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 99px;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}
.game-vote-btn:disabled { opacity: 0.4; cursor: default; }

.game-card.card-winner .game-card-overlay {
  background: linear-gradient(to bottom, rgba(0,80,0,0.15), rgba(0,0,0,0.5) 60%, rgba(0,40,0,0.9));
}
.game-card.card-loser .game-card-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.7) 60%, rgba(20,0,0,0.9));
}
.game-card.card-loser .game-card-img { filter: saturate(0.3) brightness(0.6); }

/* ── RESULT OVERLAY ──────────────────────────────────────────────────────── */

.game-result-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease 0.1s;
}
.game-result-overlay.visible { opacity: 1; pointer-events: auto; }

.game-result-content {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 28px; border-radius: 16px;
  backdrop-filter: blur(12px);
  max-width: 220px; width: 90%;
  animation: resultPop 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.result-win  { background: rgba(0,40,0,0.75);  border: 1px solid rgba(80,220,80,0.35); }
.result-lose { background: rgba(40,0,0,0.75);  border: 1px solid rgba(180,40,40,0.35); }

@keyframes resultPop {
  from { transform: scale(0.75); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.game-result-icon { font-size: 28px; }
.result-win  .game-result-icon { color: #5fda5f; }
.result-lose .game-result-icon { color: var(--red); }

.game-result-pct { font-family: var(--font-hero); font-size: 56px; line-height: 1; color: #fff; }
.game-result-pct span { font-size: 28px; opacity: 0.7; }

.game-result-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.55); }

.game-bar-wrap {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; margin: 4px 0;
}
.game-bar-fill {
  height: 100%; border-radius: 99px;
  width: var(--pct, 0%);
  transition: width 0.9s cubic-bezier(0.22,1,0.36,1) 0.3s;
}
.result-win  .game-bar-fill { background: #5fda5f; }
.result-lose .game-bar-fill { background: var(--red); }

.game-result-votes { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ── NEXT BUTTON ─────────────────────────────────────────────────────────── */

.game-next-btn {
  position: absolute; bottom: 80px; left: 50%;
  transform: translateX(-50%); z-index: 40;
  padding: 13px 32px;
  background: var(--gold); color: #000;
  font-family: var(--font-hero); font-size: 18px; letter-spacing: 1px;
  border: none; border-radius: 99px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 24px rgba(255,215,0,0.35);
  animation: nextBtnIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.5s both;
  transition: background 0.2s, transform 0.15s;
}
.game-next-btn:hover { background: #ffe84d; transform: translateX(-50%) scale(1.04); }
@keyframes nextBtnIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── FACTION BADGES ──────────────────────────────────────────────────────── */

.game-faction {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  border: 1px solid currentColor; opacity: 0.9;
}
.game-faction.f-pirate        { color: #e04040; background: rgba(224,64,64,0.18); }
.game-faction.f-marines       { color: #4090e0; background: rgba(64,144,224,0.18); }
.game-faction.f-world-gov     { color: #a060e0; background: rgba(160,96,224,0.18); }
.game-faction.f-celestial     { color: var(--gold); background: rgba(255,215,0,0.15); }
.game-faction.f-revolutionary { color: #e08030; background: rgba(224,128,48,0.18); }
.game-faction.f-royalty       { color: var(--gold); background: rgba(255,215,0,0.15); }
.game-faction.f-islander      { color: #60c060; background: rgba(96,192,96,0.18); }
.game-faction.f-scientist     { color: #40c0c0; background: rgba(64,192,192,0.18); }
.game-faction.f-fighter       { color: #c06060; background: rgba(192,96,96,0.18); }
.game-faction.f-other         { color: var(--text-muted); background: rgba(136,136,153,0.18); }

.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-pirate        { background: #1a0000; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-marines       { background: #00081a; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-world-gov     { background: #0d0018; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-celestial     { background: #1a1400; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-revolutionary { background: #1a0a00; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-royalty       { background: #1a1400; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-islander      { background: #001a00; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-scientist     { background: #001a1a; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-fighter       { background: #1a0000; }
.game-card:not(.card-winner):not(.card-loser):hover .game-faction.f-other         { background: #111118; }

/* ── RANKING SECTION — fixed slide-up panel ──────────────────────────────── */

.game-ranking-section {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg2);
  overflow-y: auto;
  z-index: 50;
  padding: 0 0 calc(60px + env(safe-area-inset-bottom));
}

.ranking-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ranking-title {
  font-family: var(--font-hero);
  font-size: clamp(28px, 5vw, 48px);
  color: var(--gold);
  letter-spacing: 2px;
  display: flex; align-items: center; gap: 12px;
}

.ranking-sub { color: var(--text-muted); font-size: 14px; }
.ranking-hidden-note {
  font-size: 12px;
  color: var(--gold-dim);
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
.ranking-hidden-note::before {
  content: '\f070';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.ranking-back-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 18px;
  background: var(--bg3); border: 1px solid var(--border-hi);
  border-radius: 99px; color: var(--text-muted); font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-top: 6px;
}
.ranking-back-btn:hover { background: var(--card-hover); color: var(--text); }

.ranking-body { max-width: 800px; margin: 0 auto; padding: 0 16px; }

/* ── RANKING LIST (top 100) ──────────────────────────────────────────────── */

.rank-list { display: flex; flex-direction: column; gap: 8px; }

.rank-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.rank-row:hover { background: var(--card-hover); border-color: var(--border-hi); transform: translateX(3px); }
.rank-row--top  { border-color: var(--gold-dim); background: rgba(255,215,0,0.04); }
.rank-row--top:hover { background: rgba(255,215,0,0.08); border-color: var(--gold); }

.rank-medal { font-size: 26px; min-width: 36px; text-align: center; flex-shrink: 0; }
.rank-num   { font-family: var(--font-hero); font-size: 20px; color: var(--text-muted); }

.rank-thumb-wrap {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: var(--bg3); border: 2px solid var(--border);
  position: relative;
}
.rank-thumb { width: 100%; height: 100%; display: block; }

.rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rank-bar-wrap { height: 5px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.rank-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  border-radius: 99px;
  transition: width 0.9s cubic-bezier(0.22,1,0.36,1) 0.1s;
}

.rank-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.rank-winrate { font-family: var(--font-hero); font-size: 24px; color: var(--gold); line-height: 1; }
.rank-votes   { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── RANKING EXPAND (101+) ───────────────────────────────────────────────── */

.ranking-expand-wrap {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.ranking-expand-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  background: var(--bg3); border: 1px solid var(--border-hi);
  border-radius: 99px; color: var(--text-muted);
  font-size: 14px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-bottom: 0;
}
.ranking-expand-btn:hover {
  background: var(--card-hover); color: var(--text); border-color: var(--gold-dim);
}

.ranking-expand-grid {
  display: none;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 20px 0 0;
}
.ranking-expand-grid.open { display: grid; }

.rank-mini-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 10px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.rank-mini-card:hover {
  background: var(--card-hover); border-color: var(--border-hi);
  transform: translateY(-2px);
}

.rank-mini-img-wrap {
  width: 60px; height: 60px; border-radius: 50%;
  overflow: hidden; background: var(--bg3);
  border: 2px solid var(--border); flex-shrink: 0; position: relative;
}
.rank-mini-img-wrap img { width: 100%; height: 100%; display: block; }

.rank-mini-rank  { font-size: 11px; color: var(--text-muted); }
.rank-mini-name  { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.rank-mini-pct   { font-family: var(--font-hero); font-size: 18px; color: var(--gold); }

.rank-mini-bar-wrap {
  width: 100%; height: 4px; background: var(--bg3); border-radius: 99px; overflow: hidden;
}
.rank-mini-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.22,1,0.36,1);
}

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */

.ranking-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.ranking-empty i { font-size: 42px; opacity: 0.4; }
.ranking-empty a { color: var(--gold); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* ── Stacked card layout ── */
  .game-arena { flex-direction: column; }

  .game-card--a {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  /* Glows: top/bottom instead of left/right */
  .game-card-glow--a { background: linear-gradient(to bottom, rgba(255,215,0,0.12), transparent 60%); }
  .game-card-glow--b { background: linear-gradient(to top,   rgba(255,215,0,0.12), transparent 60%); }

  /* VS badge: offset by half the game-header height so it lands on the card junction */
  .game-vs-badge { top: calc(50% + var(--nav-h) / 2); }

  /* Slide-in from sides on mobile */
  .game-card--a { transform: translateX(-30px); opacity: 0; }
  .game-card--b { transform: translateX( 30px); opacity: 0; }
  .game-card--a.entering { transform: translateX(0); opacity: 1; }
  .game-card--b.entering { transform: translateX(0); opacity: 1; }
  .game-card--a.exiting  { transform: translateX(-30px); opacity: 0; }
  .game-card--b.exiting  { transform: translateX( 30px); opacity: 0; }

  /* ── Card info: grid at BOTTOM, badge+name left, pick button right ── */
  .game-card-info {
    top: auto; bottom: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 14px 14px 18px;
    column-gap: 12px;
    row-gap: 5px;
    background: none;
  }
  .game-card-factions            { grid-column: 1; grid-row: 1; }
  .game-card-name                { grid-column: 1; grid-row: 2; font-size: clamp(17px, 5vw, 24px); padding-left: 4px; max-width: 33vw; }
  .game-vote-btn                 { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  /* Both cards left-aligned */
  .game-card--b .game-card-info      { align-items: start; text-align: left; }
  .game-card--b .game-card-factions  { justify-content: flex-start; }

  /* ── Result overlay: dark backdrop covering card including top info ── */
  .game-result-overlay { background: rgba(0,0,0,0.5); }
  .game-result-content { padding: 12px 20px; gap: 5px; max-width: 180px; width: 80%; }
  .game-result-pct     { font-size: 40px; }
  .game-result-pct span { font-size: 20px; }
  .game-result-icon    { font-size: 20px; }
  .game-result-label   { font-size: 10px; }
  .game-result-votes   { font-size: 10px; }

  /* ── Next button: full-width bar at bottom, covers + blocks ranking button ── */
  .game-next-btn {
    bottom: 0; left: 0; right: 0;
    transform: none;
    border-radius: 0;
    justify-content: center;
    font-size: 16px; padding: 18px;
    width: 100%;
    z-index: 50;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.6);
  }
  .game-next-btn:hover { transform: none; background: #ffe84d; }
  @keyframes nextBtnIn {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Loading ── */
  .game-loading { padding-top: 80px; justify-content: flex-start; }

  /* ── Faction badges ── */
  .game-faction { font-size: 9px; padding: 1px 7px; }

  /* ── Header ── */
  .game-header       { padding: 0 12px; }
  .game-header-title { font-size: 16px; padding-right: 10px; }
  .game-score-box    { padding: 3px 10px; min-width: 48px; }
  .game-score-val    { font-size: 18px; }
  .game-skip-btn     { font-size: 12px; padding: 5px 10px; }

  /* ── Ranking scroll button ── */
  .game-scroll-btn { width: 50vw; }

  /* ── Ranking list ── */
  .rank-row      { padding: 10px 12px; gap: 10px; }
  .rank-name     { font-size: 14px; }
  .rank-winrate  { font-size: 20px; }
  .rank-votes    { font-size: 10px; }
  .rank-thumb-wrap { width: 42px; height: 42px; }
  .rank-medal    { font-size: 20px; min-width: 28px; }

  .ranking-expand-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .rank-mini-img-wrap  { width: 48px; height: 48px; }
  .rank-mini-name      { font-size: 12px; }
}

/* ── Mobile: clear the bottom nav bar ────────────────────────── */
@media (max-width: 768px) {
  .game-section         { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .game-ranking-section { bottom: calc(58px + env(safe-area-inset-bottom)); }
}
