/* ============================================================
   css/lobby.css - 허브 공용 UI(.hub-) + 로비/전투 탭(.lb-)
   허브 화면 공통 구조:
     [상단 바 .hub-top] + [본문 .hub-body] + [하단 탭 바 .hub-tabs]
   상/하단 바 높이는 CSS 변수로 정의하고 세로 모드에서 키운다.
   ============================================================ */

:root {
  --hub-top-h: 72px;
  --hub-tab-h: 104px;
}
body.mw-portrait {
  --hub-top-h: 96px;
  --hub-tab-h: 150px;
}

/* ===== 상단 상태 바 (레벨·이름·코인) ===== */
.hub-top {
  position: absolute; left: 0; top: 0; right: 0;
  height: var(--hub-top-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  background: linear-gradient(180deg, #3a3450, #2c2740);
  box-shadow: 0 4px 12px rgba(30, 25, 55, 0.35);
  z-index: 40;
}
.hub-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: #221e33;
  border: 2px solid #4a4364;
  border-radius: 14px;
  padding: 7px 16px;
  color: #fff;
  min-width: 0;
}
.hub-chip-me .hub-lv { flex: none; font-size: 17px; color: #ffd76a; }
.hub-chip-me .hub-name {
  font-size: 21px; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-chip-coin { font-size: 22px; }
.hub-chip-coin b { font-size: 23px; color: #ffe9a8; letter-spacing: 1px; }
.hub-spacer { flex: 1 1 0; min-width: 0; }
.hub-mini {
  flex: none;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: background 0.12s;
}
.hub-mini:hover { background: rgba(255, 255, 255, 0.18); }

/* ===== 하단 탭 바 (상점/캐릭터/전투/분석/퀘스트) ===== */
.hub-tabs {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--hub-tab-h);
  display: flex; align-items: stretch; gap: 10px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(58, 52, 80, 0.94), rgba(40, 35, 60, 0.97));
  box-shadow: 0 -4px 14px rgba(30, 25, 55, 0.3);
  z-index: 40;
}
.hub-tab {
  flex: 1 1 0; min-width: 0;
  font-family: var(--font);
  font-size: 22px;
  color: #6b3c00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, #ffe08a 0%, #ffc24d 45%, #f0a125 100%);
  border: 3px solid #b97c1e;
  border-radius: 14px;
  box-shadow: 0 4px 0 #8a5a12, inset 0 2px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.12s;
}
.hub-tab:hover { filter: brightness(1.07); }
.hub-tab:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a5a12; }
.hub-tab-on, .hub-tab-on:hover {
  background: linear-gradient(180deg, #fff3b8 0%, #ffd75e 50%, #f7b32b 100%);
  border-color: #fff2b0;
  box-shadow: 0 4px 0 #8a5a12, 0 0 16px rgba(255, 220, 110, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-5px);
  filter: none;
}

/* ===== 본문 영역 (상단 바와 탭 바 사이) ===== */
.hub-body {
  position: absolute; left: 0; right: 0;
  top: var(--hub-top-h); bottom: var(--hub-tab-h);
}

/* ============================================================
   로비 (전투 탭) — 스테이지 캐러셀
   ============================================================ */

/* 밝은 하늘 + 잔디 배경 */
#screen-lobby {
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 244, 170, 0.8) 0 44px, rgba(255, 244, 170, 0) 105px),
    radial-gradient(120% 55% at 18% 106%, #86d474 0 55%, rgba(134, 212, 116, 0) 56%),
    radial-gradient(130% 50% at 82% 108%, #97dd86 0 52%, rgba(151, 221, 134, 0) 53%),
    linear-gradient(180deg, #7ec8f5 0%, #bfe8ff 46%, #e2f6d2 68%, #a9e293 100%);
}

.lb-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lb-deco { position: absolute; line-height: 1; opacity: 0.9; animation: mw-bob 4s ease-in-out infinite; }

.lb-main {
  position: absolute; left: 0; right: 0;
  top: var(--hub-top-h); bottom: var(--hub-tab-h);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  z-index: 1;
}

/* ----- 캐러셀 (크기는 JS가 방향별로 지정) ----- */
.lb-carousel {
  position: relative;
  overflow: hidden;
  touch-action: none; /* 세로 스와이프를 브라우저 스크롤에 뺏기지 않기 */
}
.lb-track {
  position: absolute; left: 0; right: 0; top: 0;
  will-change: transform;
}

/* ----- 스테이지 카드 ----- */
.lb-card {
  background: #fff;
  border: 4px solid #efe6cd;
  border-radius: 26px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 13px;
  padding: 20px 30px;
  text-align: center;
  opacity: 0.45;
  transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.lb-card.lb-on { opacity: 1; transform: scale(1); }
.lb-card-kicker {
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 999px;
  padding: 4px 22px;
}
.lb-card-name { font-size: 40px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lb-card-stars { font-size: 20px; letter-spacing: 4px; color: #f7b32b; }
.lb-card-mons { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; max-width: 100%; }
.lb-mon {
  background: #f2f8ff; border: 2px solid #d9ecff; border-radius: 999px;
  padding: 3px 12px; font-size: 19px;
}
.lb-mon b { font-size: 14px; color: var(--c-text-soft); margin-left: 2px; }
.lb-card-reward { font-size: 19px; color: var(--c-text-soft); }

/* 가운데 스테이지 그림 영역 (그림이 없으면 몬스터들로 채움) */
.lb-card-img {
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  border: 3px solid #f0e8d2;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lb-card-img-ph {
  background: linear-gradient(180deg, #eaf6ff 0%, #f2fbe8 60%, #e2f4d9 100%);
}
.lb-card-img-mons {
  display: flex; align-items: center; gap: 20px;
  font-size: 66px;
  line-height: 1.2;
  filter: drop-shadow(0 8px 14px rgba(60, 90, 60, 0.25));
  animation: mw-bob 3s ease-in-out infinite;
}
.lb-card-meta { display: flex; align-items: center; gap: 18px; }
.lb-card-state { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.lb-card-state .badge { font-size: 16px; padding: 6px 16px; }
.lb-card-again { font-size: 15px; color: var(--c-text-soft); }

/* 잠긴 스테이지 */
.lb-card.lb-locked { background: #f3f1ea; border-color: #ded9cc; filter: grayscale(0.85); }
.lb-card-lock {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 17px; color: var(--c-text-soft);
}
.lb-card-lock-emoji { font-size: 50px; line-height: 1.1; }

/* ----- 위/아래 화살표 ----- */
.lb-arrow {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 78px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-size: 19px;
  color: var(--c-accent);
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #efe6cd;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.2s, background 0.12s;
}
.lb-arrow:hover { background: #fff; }
.lb-arrow:active { transform: translateX(-50%) scale(0.94); }
.lb-arrow-up { top: 10px; }
.lb-arrow-down { bottom: 10px; }
.lb-arrow-off { opacity: 0; pointer-events: none; }

/* ----- 스테이지 위치 점 표시 ----- */
.lb-dots {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 9px;
  z-index: 5;
  pointer-events: none;
}
.lb-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(58, 52, 80, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.75);
  transition: background 0.2s, transform 0.2s;
}
.lb-dot-on { background: var(--c-primary); transform: scale(1.3); }
.lb-dots-text {
  font-size: 16px; color: var(--c-text-soft);
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid #efe6cd;
  border-radius: 999px;
  padding: 6px 10px;
}

/* ----- 시작 버튼 ----- */
.lb-start {
  font-size: 34px;
  letter-spacing: 8px;
  text-indent: 8px; /* letter-spacing 이 마지막 글자 뒤에도 붙어 중심이 틀어지는 것 보정 */
  border-radius: 18px;
  flex: none;
}

.lb-empty-panel {
  padding: 44px 54px;
  text-align: center;
  font-size: 20px;
  line-height: 1.7;
  color: var(--c-text-soft);
}

/* ============================================================
   분석 탭 (.an-)
   ============================================================ */
#screen-analysis {
  background: linear-gradient(180deg, #e8f6ff 0%, #f2f0ff 55%, #ffeff5 100%);
}
.an-root {
  overflow-y: auto;
  padding: 18px 40px 24px;
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.an-root::-webkit-scrollbar { width: 9px; }
.an-root::-webkit-scrollbar-thumb { background: #d3c9e8; border-radius: 5px; }
.an-title { font-size: 30px; color: var(--c-text); }
.an-sums {
  width: 100%; max-width: 900px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.an-sum {
  background: #fff;
  border: 3px solid #e6dff2;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 14px 8px 12px;
  text-align: center;
}
.an-sum-emoji { font-size: 30px; line-height: 1.2; }
.an-sum-value { font-size: 26px; color: var(--c-accent); margin-top: 2px; }
.an-sum-label { font-size: 14px; color: var(--c-text-soft); margin-top: 2px; }
.an-panel { width: 100%; max-width: 900px; padding-bottom: 12px; }
.an-stage-row { display: flex; align-items: center; gap: 14px; padding: 4px 16px 6px; }
.an-stage-row .meter { flex: 1; height: 22px; border-radius: 11px; }
.an-stage-num { font-size: 17px; color: var(--c-text-soft); flex: none; }
.an-types { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 8px; }
.an-group { display: flex; flex-direction: column; gap: 10px; }
.an-group + .an-group { margin-top: 6px; }
.an-group-title {
  font-size: 15px;
  color: #5a4d91;
  background: var(--c-accent-soft);
  border-radius: 8px;
  padding: 4px 12px;
}
.an-type-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.an-type-name { font-size: 19px; }
.an-type-nums { font-size: 15px; color: var(--c-text-soft); flex: none; }
.an-meter { height: 20px; border-radius: 10px; }
.an-meter.an-good > .meter-fill { background: linear-gradient(180deg, #54dd85, var(--c-good)); }
.an-meter.an-mid  > .meter-fill { background: linear-gradient(180deg, #ffd76a, var(--c-coin)); }
.an-meter.an-low  > .meter-fill { background: linear-gradient(180deg, #ff9d9d, var(--c-bad)); }
.an-empty { text-align: center; color: var(--c-text-soft); font-size: 17px; line-height: 1.7; padding: 22px 0; }
.an-cheer {
  width: 100%; max-width: 900px;
  background: var(--c-accent-soft);
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 18px;
  color: #5a4d91;
  text-align: center;
  line-height: 1.55;
}

.an-export { display: flex; align-items: center; gap: 10px; }
.an-export-hint { font-size: 13px; color: var(--c-text-soft); }

/* ============================================================
   오답노트 (.wn-) — 분석 탭 목록 + 다시 풀기 모달
   ============================================================ */
.wn-count { font-size: 15px; color: var(--c-accent); font-weight: 400; margin-left: 8px; }
.wn-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.wn-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 2px solid #eee4cf;
  border-radius: 12px;
  padding: 8px 14px;
}
.wn-row-done { opacity: 0.65; }
.wn-row-main { flex: 1; min-width: 0; }
.wn-row-text { font-size: 18px; line-height: 1.35; word-break: keep-all; }
.wn-row-meta { font-size: 13px; color: var(--c-text-soft); margin-top: 2px; }
.wn-row-badge { font-size: 15px; color: var(--c-good-dark); font-weight: 700; white-space: nowrap; }

/* 다시 풀기 모달 */
#wn-root .wn-back {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(47, 42, 68, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
#wn-root .wn-modal {
  background: var(--c-bg, #fffaf0);
  border-radius: 20px;
  border: 3px solid var(--c-panel-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  width: 100%; max-width: 560px;
  max-height: 90%;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
  text-align: center;
}
.wn-title { font-size: 21px; }
.wn-problem { font-size: 30px; line-height: 1.3; word-break: keep-all; }
.wn-answer {
  min-width: 170px; min-height: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff;
  border: 3px solid #e3d9c2;
  border-radius: 14px;
  font-size: 30px;
  padding: 4px 16px;
}
.wn-ph { opacity: 0.3; }
.wn-cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; min-height: 40px;
  border: 2px dashed #cfc4a6;
  border-radius: 10px;
  padding: 0 8px;
  font-size: 24px;
  cursor: pointer;
}
.wn-cell-on { border-style: solid; border-color: var(--c-accent); background: var(--c-accent-soft); }
.wn-cell-ph { font-size: 13px; opacity: 0.5; }
.wn-frac .wn-cell { margin: 2px; }
.wn-qr-label { font-size: 16px; color: var(--c-text-soft); margin: 0 4px; }
.wn-feedback { min-height: 24px; font-size: 16px; }
.wn-fb-good { color: var(--c-good-dark); font-weight: 700; }
.wn-fb-warm { color: #e07d00; }
.wn-fb-hint { color: #7a5b00; background: #fff8e0; border-radius: 10px; padding: 4px 12px; }
.wn-fb-reveal { color: #17547a; background: #e8f6ff; border-radius: 10px; padding: 4px 12px; font-weight: 700; }
.wn-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  width: 100%; max-width: 420px;
}
.wn-key { min-height: 52px; font-size: 22px; padding: 0; }
.wn-key-del { background: #ffe3e0; }
.wn-key-go { grid-column: span 2; }
.wn-choices { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.wn-choice { min-height: 52px; font-size: 20px; }
.wn-choice-no { opacity: 0.45; }
.wn-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   퀘스트 탭 (.qs-)
   ============================================================ */
#screen-quest {
  background: linear-gradient(180deg, #fff6e0 0%, #ffeccc 55%, #ffe1c2 100%);
}
.qs-daily-head {
  width: 100%; max-width: 900px;
  display: flex; align-items: baseline; gap: 12px;
  margin-top: 4px;
}
.qs-daily-title { font-size: 20px; }
.qs-daily-note { font-size: 14px; color: var(--c-text-soft); }
.qs-list-daily .qs-row { border-color: #ffd98a; background: #fffdf4; }

.qs-root {
  overflow-y: auto;
  padding: 18px 40px 24px;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.qs-root::-webkit-scrollbar { width: 9px; }
.qs-root::-webkit-scrollbar-thumb { background: #e8d3ae; border-radius: 5px; }
.qs-head {
  width: 100%; max-width: 860px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.qs-head-title { font-size: 30px; }
.qs-head-count { font-size: 17px; color: var(--c-text-soft); }
.qs-hint {
  width: 100%; max-width: 860px;
  background: #fff3f6;
  border: 2px solid #ffd3e0;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 17px;
  color: #c94f76;
  text-align: center;
}
.qs-list { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 10px; }
.qs-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 3px solid #f0e4c8;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 12px 18px;
}
.qs-row.qs-ready { border-color: var(--c-primary); box-shadow: 0 0 12px rgba(255, 159, 28, 0.35); }
.qs-row.qs-claimed { opacity: 0.62; background: #faf7ef; }
.qs-emoji { font-size: 36px; flex: none; line-height: 1.1; }
.qs-info { flex: 1 1 auto; min-width: 0; }
.qs-title { font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.qs-reward { font-size: 14px; color: #8a6100; background: #fff6dd; border: 1px solid #f2d98c; border-radius: 999px; padding: 1px 10px; flex: none; }
.qs-desc { font-size: 14px; color: var(--c-text-soft); margin: 2px 0 6px; }
.qs-meter { height: 12px; border-radius: 6px; }
.qs-meter > .meter-fill { background: linear-gradient(180deg, #8edcff, var(--c-exp)); }
.qs-right { flex: none; display: flex; align-items: center; }
.qs-progress-num { font-size: 17px; color: var(--c-text-soft); }
.qs-done-badge { font-size: 16px; color: var(--c-good-dark); }
.qs-claim { font-size: 17px; padding: 8px 16px; }

/* ============================================================
   세로 모드 (720x1280) — body.mw-portrait
   ============================================================ */
body.mw-portrait .hub-top { padding: 0 16px; }
body.mw-portrait .hub-chip-me .hub-name { font-size: 24px; max-width: 240px; }
body.mw-portrait .hub-chip-me .hub-lv { font-size: 19px; }
body.mw-portrait .hub-chip-coin { font-size: 25px; }
body.mw-portrait .hub-chip-coin b { font-size: 27px; }
body.mw-portrait .hub-mini { width: 48px; height: 48px; font-size: 23px; }
body.mw-portrait .hub-tabs { gap: 8px; padding: 14px 12px 16px; }
body.mw-portrait .hub-tab { font-size: 27px; border-radius: 16px; }

body.mw-portrait .lb-card-kicker { font-size: 34px; }
body.mw-portrait .lb-card-name { font-size: 48px; }
body.mw-portrait .lb-card-stars { font-size: 24px; }
body.mw-portrait .lb-card-reward { font-size: 22px; }
body.mw-portrait .lb-card-img-mons { font-size: 84px; }
body.mw-portrait .lb-mon { font-size: 22px; }
body.mw-portrait .lb-card-lock { font-size: 20px; }
body.mw-portrait .lb-card-lock-emoji { font-size: 62px; }
body.mw-portrait .lb-start { font-size: 42px; }
body.mw-portrait .lb-arrow { width: 90px; height: 50px; font-size: 21px; }

body.mw-portrait .an-root { padding: 16px 22px 24px; }
body.mw-portrait .an-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.mw-portrait .an-sum-value { font-size: 28px; }

body.mw-portrait .qs-root { padding: 16px 20px 24px; }
body.mw-portrait .qs-row { padding: 12px 14px; gap: 10px; }
body.mw-portrait .qs-title { font-size: 21px; flex-wrap: wrap; gap: 6px; }
body.mw-portrait .qs-claim { font-size: 18px; }

/* ============================================================
   🏆 순위 탭 (.rk-) — 온라인 모드 전용
   ============================================================ */
#screen-rank {
  background: linear-gradient(180deg, #fff3d6 0%, #ffe7bd 55%, #ffdba8 100%);
}
.rk-root {
  overflow-y: auto;
  padding: 16px 40px 24px;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.rk-title { font-size: 26px; }
.rk-sub { font-size: 14px; color: var(--c-text-soft); font-weight: 400; margin-left: 8px; }
.rk-panel { width: 100%; max-width: 900px; }
.rk-empty { text-align: center; color: var(--c-text-soft); font-size: 16px; line-height: 1.7; padding: 18px 0; }
.rk-loading { padding: 60px 0; }

/* 기간 토글 */
.rk-toggle { display: flex; gap: 8px; }
.rk-tg {
  font-family: var(--font);
  font-size: 17px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 3px solid #e3d2ab;
  background: #fffdf6;
  color: var(--c-text-soft);
  cursor: pointer;
}
.rk-tg-on { background: #7b5cd6; border-color: #5a41b0; color: #fff; }

/* 내 순위 카드 */
.rk-me {
  width: 100%; max-width: 900px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px;
}
.rk-me-title { font-size: 17px; color: var(--c-text-soft); }
.rk-me-rank b { font-size: 38px; color: #7b5cd6; }
.rk-me-of { font-size: 17px; color: var(--c-text-soft); }
.rk-me-value { font-size: 20px; }
.rk-me-msg { flex-basis: 100%; font-size: 16px; color: #8a6d00; }

/* TOP 3 시상대 */
.rk-podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 14px;
  padding: 8px 0 2px;
}
.rk-pod { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 150px; }
.rk-pod-empty { width: 150px; }
.rk-pod-medal { font-size: 40px; line-height: 1.1; }
.rk-pod-name { font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod-value { font-size: 14px; color: var(--c-text-soft); }
.rk-pod-base { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #ffd76a, #f0a125); }
.rk-pod-1 .rk-pod-base { height: 64px; }
.rk-pod-2 .rk-pod-base { height: 42px; background: linear-gradient(180deg, #dfe3ea, #b9c0cc); }
.rk-pod-3 .rk-pod-base { height: 30px; background: linear-gradient(180deg, #ecc8a8, #cf9a68); }

/* 부문별 왕 */
.rk-kings { display: flex; gap: 10px; }
.rk-king {
  flex: 1; min-width: 0;
  background: #fffdf6;
  border: 2px solid #eee0bd;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: center;
}
.rk-king-me { border-color: #7b5cd6; box-shadow: 0 0 10px rgba(123, 92, 214, 0.35); }
.rk-king-title { font-size: 16px; }
.rk-king-name { font-size: 17px; font-weight: 700; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-king-value { font-size: 13px; color: var(--c-text-soft); }
.rk-king-none { font-size: 14px; color: var(--c-text-soft); line-height: 1.4; }
.rk-king-none span { font-size: 12px; }

/* 학급 대항 */
.rk-battle-me { font-size: 17px; margin-bottom: 8px; }
.rk-battle-me b { color: #7b5cd6; font-size: 20px; }
.rk-battle-row {
  display: flex; align-items: center; gap: 12px;
  background: #fffdf6;
  border: 2px solid #eee0bd;
  border-radius: 10px;
  padding: 7px 14px;
  margin-bottom: 6px;
  font-size: 16px;
}
.rk-battle-my { border-color: #7b5cd6; background: #f4efff; }
.rk-battle-rank { font-weight: 700; color: #b07800; }
.rk-battle-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-battle-val { color: var(--c-text-soft); font-size: 14px; }
.rk-pct {
  margin-top: 8px;
  background: var(--c-accent-soft);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 16px;
  text-align: center;
}
.rk-pct b { color: #5a41b0; }

/* 세로 모드 */
body.mw-portrait .rk-root { padding: 14px 18px 20px; }
body.mw-portrait .rk-kings { flex-wrap: wrap; }
body.mw-portrait .rk-king { flex: 1 1 40%; }
body.mw-portrait .rk-pod { width: 30%; }
body.mw-portrait .rk-me-rank b { font-size: 32px; }
