/* 강호일대기 — 한지 & 먹색 현대 무협 세로형 UI */
:root {
  --bg: #f5f1e8;
  --bg-card: #ffffff;
  --bg-ink: #181d22;
  --bg-ink-2: #232a31;
  --text: #1c1f24;
  --text-sub: #6c6a63;
  --text-inv: #f6f4ee;
  --gold: #e4a626;
  --gold-dark: #b97f12;
  --seal: #b83227;
  --jade: #2c6e58;
  --border: #e5dfd2;
  --shadow: 0 6px 20px rgba(24, 29, 34, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #e9e3d5;
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

#app {
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  background-image:
    radial-gradient(rgba(160, 145, 118, 0.12) 1px, transparent 0),
    radial-gradient(rgba(160, 145, 118, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 36px rgba(0,0,0,0.12);
}

/* 상단 헤더 */
.topbar {
  padding: 16px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.seal {
  width: 26px; height: 34px;
  background: var(--seal);
  color: #fff;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35);
}
.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 16px;
}
.badge-dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--seal); color: #fff;
  font-size: 10px; font-weight: 800;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

/* 메인 뷰 */
main#view {
  flex: 1;
  padding: 6px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 먹색 히어로 카드 */
.hero-card {
  background: linear-gradient(155deg, #1b2127 0%, #14181c 100%);
  color: var(--text-inv);
  border-radius: 22px;
  padding: 20px 18px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 24, 28, 0.22);
}
.hero-bg-art {
  position: absolute;
  right: -10px; bottom: 52px;
  width: 240px; height: 150px;
  opacity: 0.28;
  pointer-events: none;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.6px;
  color: #9ba5ae;
  margin-bottom: 8px;
}
.realm-pill {
  display: inline-block;
  background: linear-gradient(90deg, #e7b035, #c98916);
  color: #181d22;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  box-shadow: 0 0 14px rgba(228, 166, 38, 0.35);
}
.hero-name {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin: 0 0 6px;
}
.hero-meta {
  font-size: 13px;
  color: #cbd2d9;
  margin-bottom: 12px;
}
.hero-char {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.sect-tag {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(228, 166, 38, 0.6);
  background: rgba(24, 29, 34, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
  transform: rotate(-3deg);
}
.progress-wrap {
  margin: 4px 0 16px;
  position: relative; z-index: 2;
}
.progress-track {
  height: 7px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d8941c, #f5c852);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-label {
  font-size: 12px;
  color: #e4a626;
  margin-top: 6px;
  font-weight: 600;
}

/* 버튼 */
.btn {
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: transform 0.08s ease, opacity 0.15s;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(180deg, #ecb134, #dc9819);
  color: #181d22;
  box-shadow: 0 4px 12px rgba(228, 166, 38, 0.3);
}
.btn-ink {
  background: var(--bg-ink);
  color: #fff;
}
.btn-jade {
  background: var(--jade);
  color: #fff;
}
.btn-seal {
  background: var(--seal);
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost-inv {
  background: transparent;
  color: #aeb7c0;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0 2px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
  width: auto;
}

/* 카드 & 그리드 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.quick-card:active { transform: scale(0.98); }
.quick-card:hover { border-color: var(--gold); }
.quick-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #f8f4ea;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.quick-title { font-size: 15px; font-weight: 800; }
.quick-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.card-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-item {
  padding: 11px 0;
  border-top: 1px solid #f0ebe0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.news-item:first-of-type { border-top: none; padding-top: 2px; }
.news-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f3ede0;
  color: #7c6230;
  flex-shrink: 0;
}

/* 스탯 바 */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.stat-row { display: flex; flex-direction: column; gap: 4px; }
.stat-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.stat-bar { height: 7px; background: #eee8db; border-radius: 999px; overflow: hidden; }
.stat-fill { height: 100%; background: var(--bg-ink); border-radius: 999px; }
.stat-fill.main { background: var(--gold); }

/* 칩 & 배지 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3eee2;
  color: var(--text);
  border: 1px solid var(--border);
}
.chip.active {
  background: var(--bg-ink);
  color: #fff;
  border-color: var(--bg-ink);
}
.chip.gold { background: #fdf3d7; color: #8c5c00; border-color: #eed080; }
.chip.seal { background: #fbe9e7; color: var(--seal); border-color: #f0beb8; }

/* 선택 옵션 버튼 */
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-btn {
  text-align: left;
  background: #faf7f0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.opt-btn:hover, .opt-btn.selected {
  border-color: var(--bg-ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.opt-btn.selected {
  border-color: var(--gold-dark);
  background: #fffbf0;
}
.opt-title { font-size: 14px; font-weight: 800; color: var(--text); display: flex; justify-content: space-between; }
.opt-desc { font-size: 12px; color: var(--text-sub); margin-top: 4px; line-height: 1.4; }

/* 전서구(메신저 이벤트) */
.letter-box {
  background: #fffcf5;
  border: 1.5px solid #dfd4bc;
  border-radius: 16px;
  padding: 16px;
}
.letter-from {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--seal);
  margin-bottom: 8px;
}
.letter-body {
  font-size: 14px; line-height: 1.55; margin-bottom: 14px;
}

/* 미니게임 (초식 합 맞추기) */
.mg-arena {
  background: linear-gradient(180deg, #1b2228 0%, #12161a 100%);
  color: #fff;
  border-radius: 20px;
  padding: 18px;
}
.hp-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hp-box { flex: 1; }
.hp-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; display: flex; justify-content: space-between; }
.hp-track { height: 10px; background: rgba(255,255,255,0.15); border-radius: 999px; overflow: hidden; }
.hp-fill { height: 100%; border-radius: 999px; transition: width 0.2s; }
.hp-fill.me { background: #38b889; }
.hp-fill.foe { background: #e05246; }
.mg-stage-visual {
  display: flex; justify-content: space-around; align-items: center;
  padding: 12px 0;
  min-height: 112px;
  position: relative;
}
.mg-feedback {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  font-size: 15px; font-weight: 900; color: var(--gold);
  white-space: nowrap;
}
.timing-track {
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  margin: 12px 0;
}
.timing-zone {
  position: absolute; top: 0; bottom: 0;
  background: rgba(228, 166, 38, 0.35);
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}
.timing-perfect {
  position: absolute; top: 0; bottom: 0;
  background: rgba(255, 224, 115, 0.7);
}
.timing-cursor {
  position: absolute; top: 2px; bottom: 2px; width: 6px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 10px #fff;
  transform: translateX(-50%);
}
.ki-track { height: 8px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.ki-fill { height: 100%; background: linear-gradient(90deg, #4aa8ff, #f2c94c); transition: width 0.2s; }

/* 하단 내비게이션 */
.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tab-btn {
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; color: #7b7972;
  font-family: inherit;
  padding: 2px 0;
}
.tab-icon {
  width: 34px; height: 34px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tab-btn.active { color: var(--text); font-weight: 800; }
.tab-btn.active .tab-icon {
  background: var(--gold);
  color: #181d22;
  box-shadow: 0 3px 10px rgba(228, 166, 38, 0.35);
}
.tab-label { font-size: 11px; }

/* 모달 */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(16, 20, 24, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
}
.modal-sheet {
  width: 100%; max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px 28px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
}
.log-box {
  background: #181d22;
  color: #e4e9ee;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
}
.log-line { margin-bottom: 6px; }
.log-line.hi { color: var(--gold); font-weight: 700; }
.muted { color: var(--text-sub); font-size: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8 { margin-bottom: 8px; }


/* === v3 업그레이드: 산수화 배경, 진행도 노브, 외형 커스터마이징 === */
.hero-bg-art {
  position: absolute;
  right: 0;
  bottom: 44px;
  width: 100%;
  height: 180px;
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}
.progress-track {
  position: relative;
  overflow: visible;
  height: 8px;
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}
.progress-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #c98615, #f4c142);
  border-radius: 999px;
}
.progress-knob {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f5c84c;
  border: 2.5px solid #181d22;
  box-shadow: 0 0 8px rgba(245, 200, 76, 0.7);
}
.preview-box {
  background: linear-gradient(155deg, #1b2127 0%, #14181c 100%);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.swatch-group {
  margin-bottom: 10px;
}
.swatch-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.1s;
}
.swatch.active {
  border: 2.5px solid var(--gold-dark);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold);
  transform: scale(1.08);
}
.name-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.name-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}


/* === v4 업그레이드: 쉬운 설명 박스, 수련 선택 확정 바, 이벤트 결과 카드 === */
.help-box {
  background: #faf6ec;
  border: 1px dashed #d6cab2;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #5b564c;
  line-height: 1.5;
}
.help-box b { color: var(--text); }
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #f4d37a;
}
.action-preview {
  margin-top: 12px;
  background: #1c2228;
  color: #f3efe6;
  border-radius: 14px;
  padding: 13px 14px;
}
.action-preview-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
}
.action-preview-desc {
  font-size: 12.5px;
  color: #d2d8de;
  line-height: 1.5;
  margin-bottom: 10px;
}
.event-result-card {
  background: #fffdf8;
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 16px;
}
.event-result-choice {
  font-size: 12px;
  color: var(--text-sub);
  background: #f5efe1;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.event-result-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 14px;
  white-space: pre-line;
}
.stat-sub {
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 500;
}


/* === v5 업그레이드: 후보 잠재력 감정 UI & 코인 아이콘 보정 === */
.coin-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6cc55, #c98615);
  color: #3a2500;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid #a86c08;
  flex-shrink: 0;
}
.pot-box {
  background: #faf6ec;
  border: 1.5px solid #dfd3ba;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.pot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f5f0e3;
  font-size: 12px;
}
.pot-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
}
.pot-unknown {
  background: #8c887f;
  color: #fff;
}
.pot-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 6px;
  font-size: 11.5px;
}
.pot-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.7);
}


/* === v6 업그레이드: 문파 입문 제의(오퍼), 판정 중 게이지, 성공/실패 결과 시트, 결정적 찬스 === */
.offer-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.14s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.offer-card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 6px 18px rgba(24, 29, 34, 0.08);
  transform: translateY(-1px);
}
.offer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.offer-pay {
  text-align: right;
  flex-shrink: 0;
}
.offer-pay-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.offer-pay-sub {
  font-size: 11px;
  color: var(--text-sub);
}

/* 판정 중 게이지 (초록 성공 vs 빨강 실패) */
.judge-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}
.judge-bar {
  height: 18px;
  border-radius: 999px;
  display: flex;
  overflow: visible;
  position: relative;
  margin: 18px 0 10px;
}
.judge-green {
  background: #7bb89a;
  height: 100%;
  border-radius: 999px 0 0 999px;
}
.judge-red {
  background: #e39a95;
  height: 100%;
  border-radius: 0 999px 999px 0;
}
.judge-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 24px;
  background: #181d22;
  border: 2.5px solid #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: left 0.06s linear;
}
.judge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

/* 성공 / 실패 결과 시트 */
.res-sheet {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
}
.res-big {
  font-size: 32px;
  font-weight: 900;
  margin: 6px 0 10px;
  letter-spacing: -0.5px;
}
.res-big.ok { color: #247851; }
.res-big.fail { color: #c0392b; }
.res-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.res-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #f5f1e8;
  color: var(--text);
}
.res-pill.good { background: #e8f5ee; color: #1e6b47; }
.res-pill.bad { background: #fdecea; color: #b83227; }

/* 결정적 찬스 카드 */
.chance-card {
  background: #fff;
  border: 2px solid #2c6e58;
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.chance-opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #faf8f2;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.12s;
}
.chance-opt:hover { border-color: #2c6e58; background: #fff; }
.chance-pct {
  font-size: 16px;
  font-weight: 900;
  color: #1c1f24;
  flex-shrink: 0;
}

/* 원터치 타이밍 찬스 */
.onetouch-box {
  background: #1a2d24;
  color: #fff;
  border-radius: 18px;
  padding: 18px 16px;
}
.ot-bar {
  height: 24px;
  background: #783328;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  margin: 16px 0;
  border: 2px solid rgba(255,255,255,0.2);
}
.ot-green {
  position: absolute;
  top: 0; bottom: 0;
  background: #3aa76d;
  border-left: 2px solid #9df2c4;
  border-right: 2px solid #9df2c4;
}
.ot-cursor {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 8px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 10px #fff;
  transform: translateX(-50%);
}
.origin-banner {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 4px;
}


/* === v7 업그레이드: 내상 게이지, 육각형 차트, 추천 스탯 배지, 업적/은퇴 종합점수 === */
.inj-meter {
  background: #faf5f3;
  border: 1px solid #ead5d2;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.inj-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 6px;
}
.inj-track {
  height: 10px;
  background: #ece6de;
  border-radius: 999px;
  overflow: hidden;
}
.inj-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.inj-fill.low { background: #38b889; }
.inj-fill.mid { background: #e4a626; }
.inj-fill.high { background: #c0392b; }

.view-toggle {
  display: inline-flex;
  background: #efeae0;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.view-toggle button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-sub);
  font-family: inherit;
}
.view-toggle button.active {
  background: var(--bg-ink);
  color: #fff;
}
.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
}
.chip.rec {
  background: #e6f4ee;
  color: #1c6b48;
  border-color: #b4decb;
}
.chip.warn {
  background: #fdecea;
  color: #b83227;
  border-color: #f3c1bc;
}
.score-box {
  background: linear-gradient(155deg, #1b2127 0%, #14181c 100%);
  color: #f6f4ee;
  border-radius: 18px;
  padding: 18px 16px;
  margin: 12px 0;
  text-align: left;
}
.score-total {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  margin: 4px 0 12px;
}
.score-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-top: 1px solid rgba(255,255,255,0.09);
  color: #d0d6dc;
}
.score-row:first-of-type { border-top: none; }
.mission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #faf6ec;
  border: 1px solid #e7decb;
  font-size: 12px;
}
.mission-item.done {
  background: #eef7f2;
  border-color: #b8dfca;
}


/* === v8 업그레이드: 바텀 시트 이벤트 새 창(모달) & 히어로 문파 표시 === */
@keyframes sheetUp {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.event-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 22, 0.62);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}
.event-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 26px 26px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.28);
  animation: sheetUp 0.2s ease-out;
}
.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #d8d5ce;
  margin: 0 auto 14px;
}
.sheet-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.sheet-kicker.train { background: #fdf3d7; color: #8c5c00; }
.sheet-kicker.event { background: #eef3fb; color: #26548a; }
.sheet-kicker.chance { background: #e8f5ee; color: #1e6b47; }
.sheet-kicker.danger { background: #fdecea; color: #b83227; }
.sheet-kicker.offer { background: #f4eefb; color: #61359c; }
.sheet-kicker.summary { background: #f1efe9; color: #3a3832; }
.sheet-title {
  font-size: 21px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}
.sheet-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: #3d3f44;
  margin: 0 0 16px;
  white-space: pre-line;
}
.hero-sect-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f3d27a;
  background: rgba(228, 166, 38, 0.14);
  border: 1px solid rgba(228, 166, 38, 0.35);
  padding: 4px 10px;
  border-radius: 8px;
  margin: 2px 0 8px;
}


/* === v9 업그레이드: 바텀 시트 디자인을 메인 UI(한지 + 먹색 + 황금)와 통일 === */
.event-sheet, .modal-sheet {
  background: var(--bg);
  background-image:
    radial-gradient(rgba(160, 145, 118, 0.12) 1px, transparent 0),
    radial-gradient(rgba(160, 145, 118, 0.08) 1px, transparent 0);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  border-top: 3px solid var(--gold);
  box-shadow: 0 -14px 40px rgba(20, 24, 28, 0.35);
}
.sheet-handle {
  background: #c8bfa9;
}
.event-sheet .btn-outline, .modal-sheet .btn-outline {
  background: rgba(255, 255, 255, 0.85);
  border-color: #d9d0be;
}


/* === v10 업그레이드: 유파별 주력 추천, 3단계 성장률(+20/+10/-10%), 무인 유형 도감 === */
.style-banner {
  background: linear-gradient(155deg, #1b2127 0%, #232b33 100%);
  color: #f6f4ee;
  border-radius: 14px;
  padding: 13px 14px;
  margin-top: 10px;
}
.style-banner-title {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.style-banner-desc {
  font-size: 12px;
  color: #d2d8de;
  line-height: 1.5;
}
.tier-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}
.tier-tag.t20 { background: #fdf3d7; color: #8c5c00; }
.tier-tag.t10 { background: #e6f4ee; color: #1c6b48; }
.tier-tag.tm10 { background: #fdecea; color: #b83227; }

.codex-box {
  margin-top: 12px;
  background: #faf6ec;
  border: 1px solid #e2d8c3;
  border-radius: 14px;
  padding: 12px;
}
.codex-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.codex-item:hover { border-color: var(--gold-dark); }
.codex-item.active { border-color: var(--gold-dark); background: #fffbf0; }


/* === v11 업그레이드: 무협 세계관 업적 도감, 단전/경공 상태 줄 === */
.lore-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.lore-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f4efe3;
  border: 1px solid #dfd5c0;
  color: #4f4634;
}
.lore-pill b { color: var(--text); }
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.cat-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
}
.cat-tab.active {
  background: var(--bg-ink);
  color: #fff;
  border-color: var(--bg-ink);
}
.mission-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mission-cat-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #efeae0;
  color: #6b5e46;
  margin-right: 4px;
}
.mission-item.done .mission-cat-tag {
  background: #d5eee2;
  color: #1c6b48;
}


/* === v12 업그레이드: 1-1~6-5 횡스크롤 4인 파티 스테이지 & 문파별 스킬 HUD === */
.party-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.party-slot {
  background: #faf6ec;
  border: 1.5px dashed #d5cab3;
  border-radius: 14px;
  padding: 8px 4px;
  text-align: center;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.party-slot.filled {
  background: linear-gradient(160deg, #1d2329, #14181c);
  border: 1.5px solid var(--gold);
  color: #fff;
}
.party-slot-pos {
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 9px;
  font-weight: 800;
  color: var(--gold);
  background: rgba(0,0,0,0.45);
  padding: 1px 5px;
  border-radius: 4px;
}
.party-slot-name {
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.party-slot-sub {
  font-size: 9.5px;
  color: #cbd2d9;
}

.chapter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.chapter-tab {
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-sub);
  font-family: inherit;
}
.chapter-tab.active {
  background: var(--bg-ink);
  color: var(--gold);
  border-color: var(--bg-ink);
}
.stage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}
.stage-node {
  border: 1.5px solid var(--border);
  background: #faf7f0;
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.stage-node.selected {
  border-color: var(--gold-dark);
  background: #fff8e2;
  box-shadow: 0 3px 10px rgba(228, 166, 38, 0.25);
}
.stage-node.cleared {
  background: #eaf6f0;
  border-color: #93cfa8;
}
.stage-node.boss {
  background: #23191b;
  color: #ffd6d6;
  border-color: #9e312b;
}
.stage-node.boss.selected {
  box-shadow: 0 0 0 2px var(--gold);
}
.stage-node.locked {
  opacity: 0.42;
  cursor: not-allowed;
}

/* 횡스크롤 전투 HUD (참고 스크린샷 스타일 + 한지/먹색/금빛 테두리) */
.battle-frame {
  background: #14171c;
  border: 2.5px solid #4c3f28;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.battle-hud-top {
  background: linear-gradient(180deg, #241e18, #191512);
  padding: 10px 12px 8px;
  border-bottom: 2px solid #5c4b2e;
  color: #f6ead4;
}
.stage-seg-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.stage-seg {
  height: 10px;
  border-radius: 3px;
  background: #362f26;
  border: 1px solid #594a33;
}
.stage-seg.done { background: #e8b339; }
.stage-seg.cur { background: #ffda6b; box-shadow: 0 0 8px rgba(255, 218, 107, 0.7); }
.stage-seg.boss { background: #6b2520; border-color: #b83227; }
.stage-seg.boss.cur { background: #e0463a; }

.boss-bar-wrap {
  background: #181414;
  padding: 8px 12px;
  border-bottom: 1px solid #352b25;
}
.boss-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 900;
  color: #ffb8a8;
  margin-bottom: 4px;
}
.boss-hp-track {
  height: 12px;
  background: #321b1b;
  border: 1px solid #6e2d2d;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #b82525, #e64c3c);
  transition: width 0.1s linear;
}
.boss-timer-track {
  height: 8px;
  background: #2c2618;
  border: 1px solid #6b582e;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
  position: relative;
}
.boss-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #d99b1e, #f7d154);
  transition: width 0.1s linear;
}
.boss-timer-txt {
  position: absolute;
  inset: 0;
  font-size: 8.5px;
  line-height: 8px;
  text-align: center;
  font-weight: 900;
  color: #181410;
}

.battle-canvas-wrap {
  position: relative;
  width: 100%;
  background: #121519;
  line-height: 0;
}
#battleCanvas {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}
.battle-banner-msg {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 22, 26, 0.84);
  border: 1px solid rgba(228, 166, 38, 0.6);
  color: #ffde7a;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* 하단 문파별 스킬 슬롯 바 */
.skill-bar {
  background: linear-gradient(180deg, #211c17, #161310);
  border-top: 2px solid #5c4b2e;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.skill-btn {
  position: relative;
  background: #2b241d;
  border: 2px solid #6b5735;
  border-radius: 12px;
  padding: 6px 4px 5px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  transition: transform 0.08s;
}
.skill-btn:active { transform: scale(0.95); }
.skill-btn.ready {
  border-color: #f5c84c;
  box-shadow: 0 0 12px rgba(245, 200, 76, 0.55);
  background: #362a18;
}
.skill-btn.dead {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}
.skill-btn.empty {
  opacity: 0.28;
  border-style: dashed;
  cursor: default;
}
.skill-cd-mask {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(10, 12, 16, 0.65);
  pointer-events: none;
}
.skill-ico { font-size: 20px; position: relative; z-index: 2; }
.skill-nm {
  font-size: 10px; font-weight: 800; color: #ffebb0;
  position: relative; z-index: 2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.skill-owner {
  font-size: 9px; color: #c4bba8;
  position: relative; z-index: 2;
}
.skill-ki-bar {
  width: 90%; height: 4px; background: rgba(255,255,255,0.15);
  border-radius: 999px; overflow: hidden; position: relative; z-index: 2; margin-top: 2px;
}
.skill-ki-fill { height: 100%; background: #f5c84c; }

.battle-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #14120f;
  border-top: 1px solid #30281f;
}
.ctrl-pill {
  border: 1px solid #5c4d35;
  background: #241f19;
  color: #e6dac4;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.ctrl-pill.on {
  background: #e4a626;
  color: #181410;
  border-color: #f5cc5b;
}


/* === v18 업그레이드: 육성 전용 하단 5탭(수련/무인/홈/일대기/업적) & 무인 상세 페이지 === */
.tabs.career-mode {
  border-top: 2px solid var(--gold);
  background: rgba(252, 249, 242, 0.98);
}
.sec-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #8c8475;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.attr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.attr-ovr-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f5efe1;
  border: 1px solid #dfd3ba;
  color: #5a4a2c;
}
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-sub);
  margin: 4px 0 12px;
}
.legend-line {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 5px;
}
.weapon-ovr-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #efe9dc;
  border-bottom: 1px solid #efe9dc;
  margin-bottom: 12px;
  font-size: 12.5px;
}
.w-ovr-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-sub);
  font-weight: 700;
}
.w-ovr-item b { color: var(--text); font-size: 13.5px; }
.w-ovr-item.cur b { color: var(--gold-dark); }

.detail-attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.attr-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 5px;
  border-bottom: 1.5px solid #ede6d6;
  margin-bottom: 6px;
}
.attr-group-name {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--text);
}
.attr-group-wt {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  margin-left: 3px;
}
.attr-val { font-weight: 900; font-size: 14px; }
.attr-val.hi { color: #b97f12; }
.attr-val.mid { color: #1c1f24; }
.attr-val.lo { color: #b83227; }

.sub-attr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
}
.sub-attr-name { color: #4d4a44; }
.sub-attr-name.core { font-weight: 800; color: var(--text); }
.sub-attr-right { display: flex; align-items: center; gap: 6px; }
.sub-attr-pct { font-size: 10px; color: #9a9385; font-weight: 600; }

/* 무인 정보 키-밸류 테이블 */
.profile-table {
  display: flex;
  flex-direction: column;
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f2ede2;
  font-size: 13.5px;
}
.profile-row:last-child { border-bottom: none; }
.profile-k { color: var(--text-sub); font-weight: 600; }
.profile-v { color: var(--text); font-weight: 800; text-align: right; }

/* 잠재력 강화 도트 & 로그 */
.pot-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pot-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #cfc6b4;
  background: transparent;
}
.pot-dot.on {
  border-color: var(--gold-dark);
  background: var(--gold);
  box-shadow: 0 0 6px rgba(228, 166, 38, 0.55);
}
.enh-log {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #efe9dc;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-sub);
}
.enh-log-ok { color: #1e6b47; font-weight: 700; }
.enh-log-fail { color: #b83227; }

/* 비보 경매장 3칸 카드 + 진열장 4등급 네모 */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}
.auction-slot {
  background: #faf7f0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 6px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.auction-slot.bought { opacity: 0.55; background: #f2eee6; }
.auction-ico { font-size: 24px; }
.auction-nm { font-size: 11.5px; font-weight: 800; color: var(--text); }
.auction-btn {
  border: none;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  background: var(--bg-ink);
  color: #fff;
  font-family: inherit;
}
.auction-btn:disabled { background: #dfd9cc; color: #8c867a; cursor: not-allowed; }

.showcase-box {
  background: #faf6ec;
  border: 1px solid #e6decb;
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}
.showcase-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #efe9dc;
  font-size: 12.5px;
  font-weight: 700;
}
.showcase-row:last-child { border-bottom: none; }
.grade-squares {
  display: inline-flex;
  gap: 5px;
}
.g-sq {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.8px solid #ccc4b4;
  background: #fff;
}
.g-sq.g0 { border-color: #8d99ae; }
.g-sq.g1 { border-color: #4ea8de; }
.g-sq.g2 { border-color: #9b5de5; }
.g-sq.g3 { border-color: #e4a626; }
.g-sq.owned.g0 { background: #8d99ae; }
.g-sq.owned.g1 { background: #4ea8de; }
.g-sq.owned.g2 { background: #9b5de5; }
.g-sq.owned.g3 { background: #e4a626; box-shadow: 0 0 6px rgba(228, 166, 38, 0.5); }

.title-chip {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #faf7f0;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.title-chip.active {
  background: #fdf3d7;
  border-color: var(--gold-dark);
  color: #6b4600;
}
.timeline-item {
  position: relative;
  padding: 8px 0 8px 18px;
  border-left: 2px solid #dfd5c0;
  font-size: 13px;
  line-height: 1.5;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
}


/* === v19 업그레이드: 금원보(BM), 보상형 광고 모달, 장기 육성 시설, 출석·일일임무 === */
.yuanbao-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #272017, #1b1712);
  color: #ffd866;
  border: 1.5px solid #c98f1e;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.yb-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffe27a, #d48e12);
  color: #2b1800;
  font-size: 10px;
  font-weight: 900;
}
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(90deg, #e7b035, #c98916);
  color: #181410;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
}
.btn-ad {
  background: linear-gradient(180deg, #2b6b54, #1f5240);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ad-tag {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.btn-yb {
  background: linear-gradient(180deg, #2c241b, #1a1510);
  color: #ffd866;
  border: 1.5px solid #c98f1e;
}
.pity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.pity-box {
  background: #faf6ec;
  border: 1px solid #e0d6c2;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
}
.pity-bar {
  height: 6px;
  background: #e6decb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}
.pity-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}
.pity-fill.myth {
  background: linear-gradient(90deg, #d62828, #f7b731);
}
.sub-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #ece6d9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.sub-tab {
  border: none;
  background: transparent;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
}
.sub-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.attend-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 8px 0 10px;
}
.attend-cell {
  background: #faf6ec;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 6px 2px;
  text-align: center;
  font-size: 10px;
}
.attend-cell.done {
  background: #eaf6f0;
  border-color: #8cc9a2;
  color: #1f6b47;
}
.attend-cell.today {
  background: #fff8e2;
  border-color: var(--gold-dark);
  box-shadow: 0 0 8px rgba(228, 166, 38, 0.35);
}
.iap-card {
  background: linear-gradient(155deg, #211c16, #15120f);
  color: #f6eedc;
  border: 1.5px solid #c98f1e;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 10px;
}
.iap-price-pill {
  background: var(--gold);
  color: #1a140b;
  font-size: 13px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 10px;
}
.ad-progress-track {
  height: 10px;
  background: #2b3138;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 8px;
}
.ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38b889, #f5c84c);
  width: 0%;
  transition: width 0.1s linear;
}
.pot-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.pot-num-badge.god {
  background: linear-gradient(90deg, #b81d24, #e4a626);
  color: #fff;
  box-shadow: 0 0 10px rgba(228, 166, 38, 0.5);
}


/* === v20 업그레이드: 명예의 전당 일대기 상세 페이지 & 멋있는 캐릭터 꾸미기 === */
.hall-card {
  width: 100%;
  text-align: left;
  background: #faf7f0;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.14s;
}
.hall-card:hover {
  border-color: var(--gold-dark);
  background: #fffdf7;
  box-shadow: 0 5px 16px rgba(24, 29, 34, 0.08);
  transform: translateY(-1px);
}
.bio-hero {
  background: linear-gradient(160deg, #161b20 0%, #0f1317 100%);
  color: #f6f4ee;
  border-radius: 22px;
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(14, 18, 22, 0.32);
}
.bio-score-num {
  font-size: 46px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.02;
  letter-spacing: -1.5px;
  margin: 4px 0 2px;
}
.bio-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  font-size: 12px;
  font-weight: 700;
  color: #e6dfd1;
}
.bio-chain-sep { color: var(--gold); opacity: 0.75; }
.bio-stat-grid6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.bio-stat-tile {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}
.bio-stat-tile-val {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}
.bio-stat-tile-lbl {
  font-size: 10.5px;
  color: #a8b0b8;
  margin-top: 2px;
}
.peak-6-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.peak-6-k { font-size: 10px; color: #9ea7b0; font-weight: 700; }
.peak-6-v { font-size: 16px; font-weight: 900; color: #f4d37a; margin-top: 2px; }

.journey-era {
  position: relative;
  padding: 0 0 16px 18px;
  border-left: 2px solid #dfd5c0;
}
.journey-era:last-child { padding-bottom: 0; border-left-color: transparent; }
.journey-era::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #dfd5c0;
}
.journey-years { font-size: 11.5px; font-weight: 800; color: var(--gold-dark); }
.journey-sect { font-size: 16px; font-weight: 900; color: var(--text); margin: 2px 0; }
.journey-sub { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.journey-hl {
  font-size: 12.5px;
  color: #3d3f44;
  padding: 3px 0;
  line-height: 1.45;
}
.journey-hl::before { content: '◆ '; color: var(--gold-dark); font-size: 10px; }

.ovr-chart-card {
  background: #14191e;
  color: #f4f1e8;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.ovr-callout {
  display: inline-block;
  background: var(--gold);
  color: #181410;
  font-size: 12.5px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 6px 0 8px;
}
.ovr-dot { cursor: pointer; transition: r 0.12s; }

.playstyle-box {
  background: #faf6ec;
  border: 1.5px solid #e2d7be;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.playstyle-title { font-size: 17px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.playstyle-quote { font-size: 12.5px; color: var(--text-sub); font-style: italic; }

.final-tribute {
  background: linear-gradient(160deg, #1b2127, #12161a);
  color: #f6f4ee;
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
}

/* 멋있는 캐릭터 꾸미기 아이템 그리드 */
.cos-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #ece6d9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.cos-tab {
  border: none;
  background: transparent;
  padding: 7px 4px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
}
.cos-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.cos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cos-item {
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cos-item:hover { border-color: var(--gold-dark); }
.cos-item.active {
  border-color: var(--gold-dark);
  background: #fffaf0;
  box-shadow: 0 0 0 2px rgba(228, 166, 38, 0.25);
}
.cos-item.locked { background: #f8f5ee; }
.cos-name { font-size: 12.5px; font-weight: 800; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.cos-desc { font-size: 10.5px; color: var(--text-sub); line-height: 1.35; }
.cos-price { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #221c15; color: #ffd866; flex-shrink: 0; }
.cos-price.silver { background: #efe9dc; color: #5c4c2a; }
.cos-price.owned { background: #e6f4ee; color: #1c6b48; }


/* === v22 업그레이드: 32-bit 전설 의상 6종 썸네일 카드 === */
.costume-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.costume-card {
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 8px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.14s;
}
.costume-card:hover { border-color: var(--gold-dark); transform: translateY(-1px); }
.costume-card.active {
  border-color: var(--gold-dark);
  background: #fffaf0;
  box-shadow: 0 0 0 2px rgba(228, 166, 38, 0.3);
}
.costume-thumb {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 60%, #2b343e 0%, #14181d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(228,166,38,0.28);
}
.costume-thumb img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  image-rendering: pixelated;
}


/* === v23 업그레이드: 4탭 꾸미기(코스튬/무기외형/안광/전용오라) & 전용 색상 팔레트 === */
.cos-tabs-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: #ece6d9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.cos-tabs-4 .cos-tab {
  font-size: 11.5px;
  padding: 7px 2px;
}
.color-palette-bar {
  background: #faf6ec;
  border: 1.5px solid #e4dbc7;
  border-radius: 12px;
  padding: 9px 11px;
  margin-bottom: 10px;
}
.palette-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 7px;
}
.palette-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pal-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid rgba(20, 22, 28, 0.25);
  cursor: pointer;
  position: relative;
  transition: transform 0.1s;
}
.pal-dot:hover { transform: scale(1.08); }
.pal-dot.active {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--gold-dark);
}
.pal-dot.orig {
  background: conic-gradient(#e63946, #f4a261, #2a9d8f, #457b9d, #9b5de5, #e63946);
}
.fixed-wep-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b2127;
  color: #ffd866;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}


/* === v24 업그레이드: 5탭 꾸미기(투구·관 추가), 내상 경고, 99 극의 배지 === */
.cos-tabs-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: #ece6d9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.cos-tabs-5 .cos-tab {
  font-size: 10.5px;
  padding: 7px 1px;
}
.inj-debuff-line {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 8px;
}
.inj-debuff-line.warn { background: #fff3d6; color: #8c5a00; }
.inj-debuff-line.crit { background: #fde6e4; color: #b8251e; }
.max99-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg, #b81d24, #e4a626);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
}


/* === v30 업그레이드: 6탭 꾸미기(얼굴 추가), 선택지 잠시 닫기(보류), 업적 잠금 배지 === */
.cos-tabs-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  background: #ece6d9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.cos-tabs-6 .cos-tab {
  font-size: 10px;
  padding: 6px 1px;
  white-space: nowrap;
}
.sheet-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.defer-btn {
  border: 1px solid #d5ccb9;
  background: #f7f3e8;
  color: #555046;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.defer-btn:hover { background: #ede6d5; color: #1c1f24; }
.resume-banner {
  background: linear-gradient(135deg, #272017, #1a1510);
  color: #ffd866;
  border: 1.5px solid #c98f1e;
  border-radius: 16px;
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.req-miss-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fdecea;
  color: #b8251e;
  margin-top: 2px;
}
.req-miss-tag.ok {
  background: #e6f4ee;
  color: #1c6b48;
}


/* === v32 업그레이드: 업적 토스트, 비무대회 래더, 연맹 배너, 100스테이지 그리드 === */
#toast-root {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(92vw, 410px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  background: linear-gradient(135deg, #211c14, #14171c);
  color: #fff6dc;
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.34);
  animation: toastIn 0.25s ease-out;
}
.toast-title { font-size: 13px; font-weight: 900; color: #ffd866; }
.toast-sub { font-size: 11.5px; color: #dce2e8; margin-top: 2px; line-height: 1.4; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ladder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 13px;
  background: #faf7f0;
  border: 1.5px solid var(--border);
}
.ladder-row.me {
  background: linear-gradient(135deg, #fff9e6, #f8efd2);
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 2px rgba(228,166,38,0.22);
}
.ladder-rank {
  width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--text-sub);
  flex-shrink: 0;
}
.ladder-rank.top3 { color: #b86e00; font-size: 15px; }
.ladder-info { flex: 1; min-width: 0; }
.ladder-name { font-size: 13px; font-weight: 900; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder-sub  { font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.ladder-rp   { font-size: 13px; font-weight: 900; color: #a86c08; text-align: right; flex-shrink: 0; }
.alliance-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(228,166,38,0.18);
  border: 1px solid rgba(228,166,38,0.45);
  color: #ffd866;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.stage-grid-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 10px 0 12px;
}
.code-area {
  width: 100%;
  min-height: 76px;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-family: monospace;
  font-size: 11px;
  resize: vertical;
  background: #faf7f0;
  color: var(--text);
}


/* === v33 수정: .chip.seal 세로 깨짐 완벽 수정 & 명예의 전당 1·2·3 시상대 UI === */
.chip.seal {
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center;
  writing-mode: horizontal-tb !important;
  letter-spacing: 0 !important;
  border-radius: 999px !important;
  padding: 5px 10px;
  background: #fbe9e7;
  color: var(--seal);
  border: 1px solid #f0beb8;
  font-size: 12px;
  font-weight: 800;
}
.podium-stage {
  background: linear-gradient(165deg, #1b2229 0%, #11161b 100%);
  border-radius: 20px;
  padding: 18px 12px 0;
  color: #f6f4ee;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.28);
  margin-bottom: 12px;
}
.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 8px;
  position: relative;
  z-index: 2;
  margin-top: 10px;
}
.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  padding: 0;
}
.podium-col:hover .podium-av { transform: translateY(-3px); }
.podium-av { transition: transform 0.14s; }
.podium-crown { font-size: 20px; margin-bottom: -4px; }
.podium-nm {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-sub {
  font-size: 10px;
  color: #c2cbd4;
  margin-bottom: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-stand {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-bottom: none;
}
.podium-stand.r1 {
  height: 82px;
  background: linear-gradient(180deg, rgba(242,193,78,0.45), rgba(186,128,18,0.28));
  border-color: rgba(242,193,78,0.65);
}
.podium-stand.r2 {
  height: 62px;
  background: linear-gradient(180deg, rgba(196,208,220,0.34), rgba(120,134,148,0.22));
  border-color: rgba(200,214,228,0.48);
}
.podium-stand.r3 {
  height: 50px;
  background: linear-gradient(180deg, rgba(205,138,88,0.34), rgba(140,86,46,0.22));
  border-color: rgba(205,138,88,0.48);
}
.podium-rank-num { font-size: 18px; font-weight: 900; color: #fff; line-height: 1; }
.podium-score { font-size: 11px; font-weight: 800; color: #ffd866; margin-top: 3px; }


/* === v34 업그레이드: 모션 줄이기 접근성 & 설정 슬라이더 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0eadc;
  font-size: 13px;
  font-weight: 700;
}
.setting-row:last-child { border-bottom: none; }
.vol-range {
  width: 120px;
  accent-color: var(--gold-dark);
}


/* === v35 업그레이드: 고퀄 수묵 산수화 히어로 배경, 금원보 SVG, 4탭 상점, 강호 암시장, 시즌 패스 === */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.96;
}
.yb-svg {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
}
.bm-card {
  background: linear-gradient(155deg, #1f1b24, #141219);
  color: #f3ede0;
  border: 1.5px solid #48385a;
  border-radius: 16px;
  padding: 13px;
}
.bm-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(228,166,38,0.28);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bm-item.bought { opacity: 0.52; }
.patch-card {
  background: #faf7f0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 13px;
  margin-bottom: 10px;
}
.patch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.patch-list {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: #3a3f46;
}
.patch-list li { margin-bottom: 3px; }
.sp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #faf7f0;
  border: 1.5px solid var(--border);
}
.sp-row.ready {
  background: #fff9e6;
  border-color: var(--gold-dark);
}
.sp-row.done { opacity: 0.58; }


/* === v36 업그레이드: 메인 UI 캐릭터 크기 확대 & 중앙 정밀 배치 + 문파 명패 한 줄 정리 === */
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.hero-char {
  width: 138px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: -4px;
}
.hero-char .char-av {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}
.sect-tag {
  margin-top: -4px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(228, 166, 38, 0.65);
  background: rgba(20, 25, 30, 0.90);
  padding: 3px 9px;
  border-radius: 7px;
  transform: rotate(-2deg);
  white-space: nowrap;
  max-width: 152px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.25;
}


/* === 베타 테스트 UI 스타일 === */
.beta-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b83227, #d97706);
  color: #fff;
  vertical-align: 2px;
  margin-left: 4px;
}
.beta-banner {
  background: linear-gradient(135deg, #252b33, #171c22);
  color: #f6f1e4;
  border: 1.5px solid rgba(228, 166, 38, 0.48);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.beta-stars {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}
.beta-star {
  background: #ece6d9;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  font-size: 15px;
  color: #b7afa0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.beta-star.on {
  background: #fff4cc;
  border-color: var(--gold-dark);
  color: #d98a00;
}


/* === v37 업그레이드: 생사결 · 영면 추모 결산 · 화광철소 제련 · 강호 객잔 베팅 === */
.death-sheet-box {
  background: linear-gradient(160deg, #1b1114 0%, #0f0d11 100%);
  color: #f4ebe8;
  border: 1.5px solid #8a2323;
  border-radius: 16px;
  padding: 15px 14px;
  margin-bottom: 12px;
  text-align: center;
}
.death-epitaph {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border-left: 3px solid #c94040;
  font-size: 12px;
  font-style: italic;
  color: #e6d5d1;
  line-height: 1.5;
  text-align: left;
}
.dt-danger-box {
  background: #fdf0ee;
  border: 1.5px solid #e29b92;
  border-radius: 13px;
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5b1814;
  margin-bottom: 10px;
}
.forge-card {
  background: linear-gradient(155deg, #271a12, #161312);
  color: #f8eee0;
  border: 1.5px solid #96521f;
  border-radius: 16px;
  padding: 13px;
}
.forge-bar {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin: 8px 0 10px;
}
.forge-seg {
  height: 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
}
.forge-seg.on {
  background: linear-gradient(90deg, #ff7b29, #ffd166);
  box-shadow: 0 0 6px rgba(255, 160, 48, 0.55);
}
.clinic-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.clinic-btn {
  background: #f5fbf7;
  border: 1.5px solid #b9dfc6;
  border-radius: 11px;
  padding: 7px 5px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  color: #164f34;
}
.clinic-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tavern-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: #faf6ec;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 9px;
}
.dead-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #302226;
  color: #f3c4c0;
  border: 1px solid #7c383e;
}


/* === v38 업그레이드: 병기 고유 패시브 박스 · 문파 궁합 시너지 · 무림 도감 === */
.wep-spec-card {
  background: linear-gradient(155deg, #1d232a, #14181e);
  color: #f4efe3;
  border: 1.5px solid rgba(228,166,38,0.45);
  border-radius: 14px;
  padding: 12px 13px;
  margin-bottom: 10px;
}
.wep-spec-row {
  font-size: 11.5px;
  line-height: 1.5;
  color: #d8dee6;
  margin-top: 4px;
}
.syn-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}
.syn-badge.perfect {
  background: linear-gradient(90deg, #d97706, #b83227);
  color: #fff;
}
.syn-badge.flex {
  background: #1f6f50;
  color: #fff;
}
.syn-badge.normal {
  background: #e9e3d5;
  color: #5c574d;
}
.codex-card {
  background: #faf7f0;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  padding: 10px 11px;
  margin-bottom: 7px;
}


/* === v38.3: 상단 초슬림 동기화/업데이트 다시시작 미니바 + 맹 이름 배지 === */
.alliance-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f5ebd1;
  color: #7c5106;
  border: 1px solid #e2c57e;
  white-space: nowrap;
}
.alliance-tag.none {
  background: #f0eee8;
  color: #8a857b;
  border-color: #dcd7cc;
  font-weight: 700;
}
#update-banner-root {
  position: fixed;
  left: 50%;
  top: calc(60px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  width: min(92vw, 390px);
  z-index: 960;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.update-bar {
  pointer-events: auto;
  background: rgba(24, 29, 36, 0.94);
  color: #f9f4e8;
  border: 1px solid rgba(228, 166, 38, 0.85);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  animation: toastIn 0.2s ease-out;
}
.update-bar-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-bar-title {
  font-size: 11px;
  font-weight: 800;
  color: #ffd866;
  line-height: 1.2;
}
.update-bar-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.update-restart-btn {
  border: none;
  background: linear-gradient(180deg, #f3c146, #d99318);
  color: #1c1508;
  font-size: 10.5px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.update-later-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: #dce2e8;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.update-dot-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #fff;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.75);
}


/* === v39: 주간 강호 이벤트 배너 · 문파 직위 계보 카드 & 모달 === */
.weekly-banner {
  background: linear-gradient(135deg, #271b30 0%, #19222d 100%);
  color: #f9f3e6;
  border: 1.5px solid rgba(232, 179, 57, 0.65);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(24, 18, 34, 0.16);
}
.rank-ladder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #faf7f0;
  margin-bottom: 6px;
}
.rank-ladder-row.cur {
  border-color: #d89a1c;
  background: #fff9e6;
  box-shadow: 0 3px 10px rgba(216, 154, 28, 0.16);
}
.rank-ladder-row.done {
  background: #f2f8f4;
  border-color: #c2dfc9;
}
.rank-ladder-row.locked {
  opacity: 0.72;
}
.hero-sect-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 216, 102, 0.42);
  color: #ffe294;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 6px;
}


/* === v39.1: 명예전당 시작~은퇴 연대기 타임라인 & 일대기 하단 비무 섹션 === */
.chronicle-list {
  position: relative;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chronicle-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, #e4a626, #c9b996 75%, #8f352e);
  border-radius: 2px;
}
.chronicle-item {
  position: relative;
  background: #faf7f0;
  border: 1px solid #e6decd;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.48;
  color: var(--text);
}
.chronicle-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d99b1e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #d99b1e;
}
.chronicle-item.start {
  background: #f3faf6;
  border-color: #bfe0cb;
}
.chronicle-item.start::before {
  background: #1f7a53;
  box-shadow: 0 0 0 1.5px #1f7a53;
}
.chronicle-item.end {
  background: #fff9e8;
  border-color: #e4c16a;
  font-weight: 800;
}
.chronicle-item.end::before {
  background: #b83227;
  box-shadow: 0 0 0 1.5px #b83227;
}
.legend-pvp-divider {
  margin: 14px 0 6px;
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, #1b222a, #282018);
  color: #ffd866;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 900;
}


/* === v39.2: 주간 강호 진영 대항전 UI === */
.war-hero-box {
  background: linear-gradient(155deg, #1b222c, #241920);
  color: #f8f2e6;
  border: 1.5px solid rgba(228, 166, 38, 0.55);
  border-radius: 15px;
  padding: 12px 13px;
  margin-bottom: 10px;
}
.war-tug-bar {
  height: 12px;
  border-radius: 999px;
  background: #2f3540;
  overflow: hidden;
  display: flex;
  margin: 7px 0 5px;
  border: 1px solid rgba(255,255,255,0.14);
}
.war-tug-a {
  height: 100%;
  transition: width 0.35s ease;
}
.war-tug-b {
  height: 100%;
  transition: width 0.35s ease;
}
.war-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.war-side-btn {
  text-align: left;
  padding: 10px;
  border-radius: 13px;
  border: 2px solid var(--border);
  background: #faf7f0;
  cursor: pointer;
  font-family: inherit;
}
.war-side-btn.selected {
  border-color: #d99318;
  background: #fff9e6;
  box-shadow: 0 3px 10px rgba(217, 147, 24, 0.22);
}
.war-day-card {
  background: #faf7f0;
  border: 1px solid #e6decd;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.war-match-line {
  font-size: 11.5px;
  line-height: 1.45;
  padding: 3px 0;
  border-top: 1px dashed #e6decd;
}
.war-match-line.mine {
  background: #fff8df;
  border-radius: 6px;
  padding: 4px 6px;
  margin-top: 3px;
  font-weight: 800;
}


/* === v39.3: 생사결 생존 미니게임 (성공=생존, 실패=사망 · 확률 기반 5단계 난이도) === */
.dtm-box {
  background: linear-gradient(155deg, #1a151c, #24191e);
  color: #f8f2e8;
  border: 1.5px solid rgba(228, 166, 38, 0.55);
  border-radius: 15px;
  padding: 13px;
  margin-bottom: 10px;
}
.dtm-meter-track {
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-top: 5px;
}
.dtm-meter-fill {
  height: 100%;
  transition: width 0.12s ease;
  background: linear-gradient(90deg, #34d399, #fbbf24);
}
.dtm-meter-fill.danger {
  background: linear-gradient(90deg, #f97316, #ef4444);
}
.dtm-strike-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  color: #1c1406;
  background: linear-gradient(180deg, #ffd15c, #e09614);
  box-shadow: 0 5px 0 #9c6205, 0 10px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  active: transform: translateY(3px);
}
.dtm-strike-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #9c6205;
}
.dtm-dodge-btn {
  width: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
  margin-top: 8px;
}


/* ============================================================================
 * 🎨 v4.0 UI/UX 전면 재개편 — 고대비 현대 무협 디자인 시스템
 *  - 노이즈 제거 & 고대비 타이포그래피(Pretendard Variable · keep-all)
 *  - 히어로/시상대 산수화 배경 그라데이션 스크림(글자 시인성 극대화)
 *  - 한 줄 깔끔한 상단 헤더 · 현대적 글래스 하단 내비게이션
 *  - 야간 다크 모드(body.theme-dark) & 큰 글씨 모드(body.font-large) 완벽 지원
 * ============================================================================ */
:root {
  --bg: #f6f5f1;
  --bg-outer: #eaedf1;
  --bg-card: #ffffff;
  --bg-subtle: #f8f9fa;
  --bg-ink: #131820;
  --bg-ink-2: #1c2430;
  --text: #111827;
  --text-sub: #4b5563;
  --text-muted: #6b7280;
  --text-inv: #f9fafb;
  --gold: #d97706;
  --gold-bright: #f59e0b;
  --gold-dark: #9a5b00;
  --seal: #dc2626;
  --jade: #0f766e;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.055);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

html, body {
  background: var(--bg-outer);
  color: var(--text);
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.018em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  max-width: 440px;
  background: var(--bg);
  background-image: none !important;
  box-shadow: 0 0 32px rgba(15, 23, 42, 0.09);
}

/* 1. 상단 헤더: 모바일 360px에서도 절대 줄바꿈되지 않는 깔끔한 한 줄 헤더 */
.topbar {
  padding: 12px 14px;
  background: rgba(246, 245, 241, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.brand {
  gap: 7px;
  min-width: 0;
  flex-shrink: 0;
}
.seal {
  width: 22px;
  height: 28px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  background: linear-gradient(160deg, #dc2626, #991b1b);
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.28);
  flex-shrink: 0;
}
.brand-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}
.beta-pill {
  font-size: 10px !important;
  font-weight: 800;
  padding: 2px 6px !important;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  vertical-align: middle;
  margin-left: 0 !important;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
}
.yuanbao-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
  flex-shrink: 0;
}

/* 2. 메인 뷰 간격 & 카드 디자인 */
main#view {
  padding: 14px 14px 104px;
  gap: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.35;
}
.sec-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
  margin-bottom: 3px;
}
.swatch-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin: 12px 0 7px;
}
.muted {
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.5;
}

/* 3. 히어로 카드 · 시상대 · 일대기 헤더: 산수화 배경 위 다크 스크림으로 글자 시인성 100% 확보 */
.hero-card,
.bio-hero,
.podium-stage,
.preview-box {
  background: linear-gradient(155deg, #131922 0%, #1a222d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}
.hero-card {
  padding: 20px 18px 18px !important;
  border-radius: 22px;
}
.hero-card .hero-bg-img,
.bio-hero .hero-bg-img,
.podium-stage .hero-bg-img,
.preview-box .hero-bg-img {
  opacity: 0.48 !important;
  filter: saturate(0.88) contrast(1.04);
}
.hero-card::after,
.bio-hero::after,
.preview-box::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(13, 18, 25, 0.92) 0%, rgba(13, 18, 25, 0.76) 55%, rgba(13, 18, 25, 0.28) 100%);
}
.podium-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 18, 25, 0.78) 0%, rgba(13, 18, 25, 0.38) 46%, rgba(13, 18, 25, 0.88) 100%);
}
.hero-top,
.progress-wrap,
.hero-card > .btn,
.hero-card > div,
.podium-stage > div,
.bio-hero > div {
  position: relative;
  z-index: 2;
}
.hero-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.hero-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  line-height: 1.2;
}
.hero-meta {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.realm-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}
.hero-sect-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
  font-size: 12.5px;
  padding: 5px 11px;
}
.progress-label {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 700;
  margin-top: 7px;
}
.podium-nm {
  font-size: 14px !important;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.podium-sub {
  font-size: 11.5px !important;
  color: #e2e8f0 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.92);
}

/* 4. 안내 박스 · 옵션 버튼 · 칩 · 버튼 위계 */
.help-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid var(--gold);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}
.opt-list {
  gap: 9px;
}
.opt-btn {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.opt-btn:hover {
  border-color: #cbd5e1;
  background: #fafafa;
}
.opt-btn.selected {
  border-color: var(--gold);
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.14);
}
.opt-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.38;
  align-items: center;
  gap: 6px;
}
.opt-desc {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 5px;
  line-height: 1.52;
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: #374151;
  line-height: 1.25;
}
.chip.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}
.chip.gold {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
  font-weight: 800;
}
.chip.rec {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
  font-weight: 800;
}
.chip.seal {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  font-weight: 800;
}

.btn {
  min-height: 46px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.btn:active {
  transform: scale(0.985);
}
.btn-sm {
  min-height: 36px;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 11px;
}
.btn-gold {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #1c1304;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.26);
}
.btn-ink {
  background: #111827;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}
.btn-outline {
  background: #ffffff;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}

/* 5. 홈 퀵 카드 · 주간 배너 · 스탯 바 · 명예전당/랭킹 행 */
.quick-card {
  padding: 15px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}
.quick-title {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text);
}
.quick-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}
.weekly-banner {
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e1b2e 0%, #162230 100%);
}

.stat-row {
  padding: 6px 0;
}
.stat-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.stat-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}
.stat-bar {
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
}

.hall-card,
.ladder-row,
.codex-card,
.offer-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 12px 13px;
}
.ladder-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.ladder-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.wep-spec-card,
.war-hero-box,
.dtm-box {
  background: linear-gradient(155deg, #161d27 0%, #1f2734 100%);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 16px;
  padding: 14px 15px;
}
.wep-spec-row {
  font-size: 12.5px;
  line-height: 1.58;
  color: #e5e7eb;
  margin-top: 5px;
}

/* 6. 서브 탭 & 커스텀 탭바 */
.sub-tabs,
.cos-tabs,
.cos-tabs-6 {
  background: #eceef2;
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
}
.sub-tab,
.cos-tab {
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: 10px;
  color: #4b5563;
  background: transparent;
  border: none;
}
.sub-tab.active,
.cos-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* 7. 하단 고정 내비게이션: 선명한 활성 알약 표시 + 높은 가독성 */
.tabs {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
}
.tab-btn {
  color: #6b7280;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 12px;
  transition: background 0.12s, color 0.12s;
}
.tab-btn.active {
  color: #111827;
  background: #fef3c7;
}
.tab-btn.active .tab-icon {
  background: transparent;
  transform: scale(1.06);
}
.tab-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 8. 바텀 시트 & 모달 가독성 강화 */
.modal-sheet,
.event-sheet {
  background: var(--bg-card);
  color: var(--text);
  border-radius: 24px 24px 0 0;
  padding: 16px 18px calc(28px + env(safe-area-inset-bottom));
}
.sheet-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.35;
  color: var(--text);
}
.sheet-body {
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
}
.setting-row {
  padding: 11px 0;
  font-size: 13.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.name-input {
  font-size: 14.5px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
}

/* 9. 큰 글씨 모드 (body.font-large) — 가독성 112% 확대 */
body.font-large {
  font-size: 15.5px;
}
body.font-large .card-title { font-size: 17.5px; }
body.font-large .opt-title { font-size: 16px; }
body.font-large .opt-desc,
body.font-large .muted,
body.font-large .help-box,
body.font-large .wep-spec-row,
body.font-large .chronicle-item {
  font-size: 14px !important;
  line-height: 1.62;
}
body.font-large .btn { font-size: 15.5px; min-height: 50px; }
body.font-large .chip { font-size: 13px; padding: 6px 11px; }
body.font-large .sheet-body { font-size: 15.5px; }
body.font-large .tab-label { font-size: 12.5px; }

/* 10. 야간 다크 모드 (body.theme-dark) — 눈이 편안한 고대비 먹색 UI */
body.theme-dark {
  --bg: #10151c;
  --bg-outer: #090d12;
  --bg-card: #171f2a;
  --bg-subtle: #1e2836;
  --text: #f3f4f6;
  --text-sub: #a3b1c2;
  --text-muted: #8b99ab;
  --gold: #f59e0b;
  --gold-dark: #fbbf24;
  --border: #273242;
  --border-strong: #374558;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
body.theme-dark,
body.theme-dark html {
  background: var(--bg-outer);
  color: var(--text);
}
body.theme-dark .topbar {
  background: rgba(16, 21, 28, 0.94);
  border-bottom-color: var(--border);
}
body.theme-dark .beta-pill {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}
body.theme-dark .coin-pill,
body.theme-dark .icon-btn,
body.theme-dark .btn-outline,
body.theme-dark .chip,
body.theme-dark .opt-btn,
body.theme-dark .hall-card,
body.theme-dark .ladder-row,
body.theme-dark .codex-card,
body.theme-dark .offer-card,
body.theme-dark .rank-ladder-row,
body.theme-dark .chronicle-item,
body.theme-dark .war-day-card,
body.theme-dark .war-side-btn,
body.theme-dark .name-input,
body.theme-dark select {
  background: #1d2633 !important;
  color: #f3f4f6 !important;
  border-color: #2f3d50 !important;
}
body.theme-dark .opt-btn.selected,
body.theme-dark .rank-ladder-row.cur,
body.theme-dark .war-side-btn.selected {
  background: #2c2617 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .help-box {
  background: #1b2431 !important;
  border-color: #2c394b !important;
  border-left-color: #f59e0b !important;
  color: #dbe4ef !important;
}
body.theme-dark .sheet-body {
  color: #d1d9e4;
}
body.theme-dark .sub-tabs,
body.theme-dark .cos-tabs,
body.theme-dark .cos-tabs-6 {
  background: #121821;
}
body.theme-dark .sub-tab,
body.theme-dark .cos-tab {
  color: #94a3b8;
}
body.theme-dark .sub-tab.active,
body.theme-dark .cos-tab.active {
  background: #243040;
  color: #ffffff;
}
body.theme-dark .tabs {
  background: rgba(16, 21, 28, 0.96);
  border-top-color: var(--border);
}
body.theme-dark .tab-btn {
  color: #8b99ab;
}
body.theme-dark .tab-btn.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}
body.theme-dark .chip.active {
  background: #f59e0b !important;
  color: #111827 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .chip.gold {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fde68a !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}
body.theme-dark .chip.rec {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #86efac !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}
body.theme-dark .chip.seal {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}
body.theme-dark .alliance-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.4);
}
body.theme-dark .alliance-tag.none {
  background: #242f3e;
  color: #94a3b8;
  border-color: #344256;
}
body.theme-dark .stat-bar {
  background: #283445;
}
body.theme-dark .btn-ink {
  background: #2a374a;
  color: #ffffff;
  border: 1px solid #3c4d64;
}
body.theme-dark .war-match-line.mine {
  background: rgba(245, 158, 11, 0.16);
}
body.theme-dark .inj-meter,
body.theme-dark .clinic-btn,
body.theme-dark .mission-item,
body.theme-dark .playstyle-box,
body.theme-dark .score-box,
body.theme-dark .profile-table {
  background: #1b2431 !important;
  border-color: #2b384a !important;
  color: #e5e7eb !important;
}


/* ============================================================================
 * ✨ v4.2 미니멀·클린 레이아웃 컴포넌트 (수련 2열 타일 · 히어로 KPI · 퀵 바)
 * ============================================================================ */
.hero-kpi-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-kpi {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 7px 8px;
  text-align: center;
}
.hero-kpi span {
  display: block;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 700;
}
.hero-kpi b {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
}

.stat-train-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-tile {
  text-align: left;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 10px 9px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.stat-tile:active { transform: scale(0.98); }
.stat-tile.selected {
  border-color: var(--gold);
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
}
.stat-tile-nm {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.stat-tile-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.act-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.act-tile {
  text-align: left;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.act-tile.selected {
  border-color: var(--gold);
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
}
.act-tile-title {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text);
}
.act-tile-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 3px;
  font-weight: 600;
}

.confirm-box-clean {
  margin-top: 12px;
  background: #141a24;
  border-radius: 15px;
  padding: 12px 13px;
  color: #f3f4f6;
}

.quick-strip-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.quick-strip-bar .btn-sm {
  padding: 8px 6px;
  font-size: 12px;
  white-space: nowrap;
}

.trait-compact-row {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.45;
}

/* 다크 모드 v4.2 신규 컴포넌트 완벽 호환 */
body.theme-dark .stat-tile,
body.theme-dark .act-tile,
body.theme-dark .trait-compact-row {
  background: #1d2633 !important;
  border-color: #2f3d50 !important;
  color: #f3f4f6 !important;
}
body.theme-dark .stat-tile.selected,
body.theme-dark .act-tile.selected {
  background: #2c2617 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .stat-tile-nm,
body.theme-dark .stat-tile-val,
body.theme-dark .act-tile-title {
  color: #f9fafb !important;
}
body.theme-dark .confirm-box-clean {
  background: #0d1219;
  border: 1px solid #2b384a;
}


/* ============================================================================
 * ✨ v4.3 UI 정밀 개선 (캐릭터 미리보기 가시성 · 육각형 수련 · 연말결산 · 상점 중분류 · 듀얼 패스)
 * ============================================================================ */

/* 1. 첫 번째 사진 수정: .preview-box에서 어두운 오버레이 제거 & 캐릭터 100% 선명하게! */
.preview-box::after {
  display: none !important;
}
.preview-box {
  position: relative;
  overflow: hidden;
}
.preview-box .hero-bg-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 0 !important;
  opacity: 0.34 !important;
  pointer-events: none !important;
}
.preview-box > :not(.hero-bg-img) {
  position: relative;
  z-index: 2;
}
.create-preview-clean {
  background: linear-gradient(145deg, #222c3a 0%, #171f2a 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  padding: 14px 16px !important;
  gap: 14px !important;
  align-items: center !important;
}
.preview-av-frame {
  width: 108px;
  height: 108px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 55%, rgba(255, 245, 220, 0.22), rgba(15, 23, 42, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 2. 2·3번째 사진: 후보 카드 능력치 요약 줄 */
.cand-stat-line {
  font-size: 12.5px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  margin-top: 6px;
  line-height: 1.5;
}

/* 3. 4번째 사진: 수련 무기/문파 비중 바 + 육각형 모드 + 잠재력 제한 경고 */
.train-meta-bar {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--gold);
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
}
.train-hex-wrap {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 6px 8px;
}
.pot-limit-notice {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 9px;
}

/* 4. 5번째 사진: 연말 결산 깔끔한 KPI + 화이트 타임라인 카드 */
.sum-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.sum-kpi {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 8px;
  text-align: center;
}
.sum-kpi span {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 700;
}
.sum-kpi b {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-top: 2px;
}
.sum-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 36vh;
  overflow-y: auto;
  padding-right: 2px;
}
.sum-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 11px;
}
.sum-log-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.sum-log-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
}
.sum-log-body {
  font-size: 12.5px;
  color: var(--text-sub);
  margin-top: 2px;
  line-height: 1.48;
}
.sum-quote-box {
  margin-top: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 3.5px solid #d97706;
  border-radius: 12px;
  padding: 10px 12px;
  color: #451a03;
}

/* 5. 6~8번째 사진: 상점 중분류(종류별 묶음) 필 바 & 메인 홈 패스 배너 & 유료/무료 듀얼 패스 */
.shop-subcat-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-subcat-bar::-webkit-scrollbar { display: none; }
.shop-subcat-pill {
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.shop-subcat-pill.active {
  background: #111827;
  color: #fde68a;
  border-color: #111827;
}

.pass-home-banner {
  background: linear-gradient(135deg, #271f13 0%, #18202c 100%);
  color: #f8fafc;
  border: 1.5px solid rgba(251, 191, 36, 0.62);
  border-radius: 18px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}
.pass-prem-cta {
  background: linear-gradient(135deg, #2b2112, #1b2230);
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pass-track-head {
  display: grid;
  grid-template-columns: 50px 1fr 1fr;
  gap: 6px;
  padding: 4px 2px 6px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-sub);
  text-align: center;
}
.pass-track-head span:first-child { grid-column: 2; }
.pass-dual-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr;
  gap: 6px;
  align-items: stretch;
}
.pass-lv-badge {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-sub);
  padding: 4px 2px;
}
.pass-lv-badge.on {
  background: #111827;
  color: #fde68a;
  border-color: #111827;
}
.pass-lv-badge span {
  font-size: 10px;
  opacity: 0.78;
}
.pass-cell {
  text-align: left;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 8px 9px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.pass-cell.prem {
  background: #fffdf5;
  border-color: #f3d58d;
}
.pass-cell.ready {
  border-color: #d97706;
  background: #fef3c7;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.22);
}
.pass-cell.done {
  background: #f0fdf4;
  border-color: #86efac;
  opacity: 0.85;
}
.pass-cell-lbl {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.pass-cell-st {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-sub);
}
.pass-cell.ready .pass-cell-st {
  color: #92400e;
}

/* 다크 모드 v4.3 컴포넌트 완벽 호환 */
body.theme-dark {
  --hex-bg: #121821;
}
body.theme-dark .cand-stat-line,
body.theme-dark .train-meta-bar,
body.theme-dark .train-hex-wrap,
body.theme-dark .sum-kpi,
body.theme-dark .sum-log-item,
body.theme-dark .pass-lv-badge,
body.theme-dark .pass-cell,
body.theme-dark .shop-subcat-pill {
  background: #1d2633 !important;
  border-color: #2f3d50 !important;
  color: #f3f4f6 !important;
}
body.theme-dark .sum-log-ic {
  background: #273242;
}
body.theme-dark .sum-quote-box {
  background: #2c2414 !important;
  border-color: #a16207 !important;
  color: #fef3c7 !important;
}
body.theme-dark .shop-subcat-pill.active,
body.theme-dark .pass-lv-badge.on {
  background: #f59e0b !important;
  color: #111827 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .pass-cell.ready {
  background: #2f2612 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .pass-cell.done {
  background: #13281d !important;
  border-color: #22c55e !important;
}


/* ============================================================================
 * 🏮 v4.4 일대기 비급 두루마리 · 잠재등급 진화 로드맵 · 전설 공유 카드 · 개명권 UI
 * ============================================================================ */

/* 1. 고급 무협 일대기 헤더 (금박 이중 테두리 + 붉은 전각 낙인 도장) */
.bio-scroll-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px 18px 18px;
  background: linear-gradient(155deg, #121720 0%, #1d1921 55%, #11161e 100%);
  border: 2px solid rgba(234, 179, 8, 0.55);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.32), inset 0 0 0 4px rgba(251, 191, 36, 0.08);
  color: #f8fafc;
}
.bio-scroll-hero::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 15px;
  pointer-events: none;
  z-index: 2;
}
.bio-scroll-hero .hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36 !important;
  z-index: 0;
  pointer-events: none;
}
.bio-scroll-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(15, 19, 28, 0.92) 0%, rgba(20, 17, 25, 0.72) 55%, rgba(15, 19, 28, 0.42) 100%);
}
.bio-scroll-hero > :not(.hero-bg-img) {
  position: relative;
  z-index: 3;
}
.bio-seal-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 34px;
  min-height: 48px;
  padding: 5px 3px;
  background: linear-gradient(160deg, #b91c1c, #7f1d1d);
  color: #fef2f2;
  border: 1.5px solid rgba(254, 202, 202, 0.65);
  border-radius: 6px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.45);
  transform: rotate(3deg);
}
.bio-gold-score {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 65%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.3));
}
.bio-av-halo {
  width: 116px;
  height: 116px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 52%, rgba(251, 191, 36, 0.28), rgba(15, 23, 42, 0.55) 72%);
  border: 1.5px solid rgba(251, 191, 36, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.bio-title-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(180, 83, 9, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.52);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
}

/* 2. 초기 잠재등급 -> 변화 과정 -> 최종 잠재등급 진화 카드 */
.pot-evo-card {
  background: linear-gradient(160deg, #fffdf7 0%, #faf6ec 100%);
  border: 1.5px solid #e6d6b0;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.pot-evo-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}
.pot-evo-stage {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 11px 10px;
  text-align: center;
}
.pot-evo-stage.final {
  border-color: #d97706;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.14);
}
.pot-evo-k {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-sub);
  margin-bottom: 5px;
}
.pot-evo-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
  margin-bottom: 5px;
}
.pot-evo-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}
.pot-evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gold-dark);
  font-weight: 900;
}
.pot-step-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed #dfd4b8;
}
.pot-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
}
.pot-step-row.promoted {
  border-color: #f59e0b;
  background: #fffbeb;
}

/* 3. 서사시 일대기 연대기 컬러 포인트 */
.chronicle-item.milestone {
  background: #fffbeb;
  border-color: #fcd34d;
  font-weight: 800;
}
.chronicle-item.milestone::before {
  background: #d97706;
  box-shadow: 0 0 0 1.5px #d97706;
}
.chronicle-item.danger {
  background: #fef2f2;
  border-color: #fca5a5;
}
.chronicle-item.danger::before {
  background: #dc2626;
  box-shadow: 0 0 0 1.5px #dc2626;
}

/* 4. 전설 일대기 공유 포스터 카드 모달 */
.share-card-wrap {
  background: #0f141c;
  border-radius: 16px;
  padding: 10px;
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  margin-bottom: 10px;
  text-align: center;
}
.share-card-canvas {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.share-text-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
  color: var(--text);
  margin-bottom: 10px;
}

/* 다크 모드 v4.4 호환 */
body.theme-dark .pot-evo-card {
  background: linear-gradient(160deg, #171f2a 0%, #1d2431 100%) !important;
  border-color: #364152 !important;
}
body.theme-dark .pot-evo-stage,
body.theme-dark .pot-step-row,
body.theme-dark .share-text-box {
  background: #1d2633 !important;
  border-color: #2f3d50 !important;
  color: #f3f4f6 !important;
}
body.theme-dark .pot-evo-stage.final,
body.theme-dark .pot-step-row.promoted {
  background: #2b2415 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .chronicle-item.milestone {
  background: #2c2515 !important;
  border-color: #b45309 !important;
}
body.theme-dark .chronicle-item.danger {
  background: #2c1719 !important;
  border-color: #b91c1c !important;
}


/* === v4.6: 100스테이지 30종 적 프리뷰 · 중간보스(5번) 노드 구분 === */
.stage-node.midboss {
  border-color: #d97706 !important;
  background: #fffbeb !important;
}
body.theme-dark .stage-node.midboss {
  background: #2b2314 !important;
  border-color: #f59e0b !important;
}
.stage-foe-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.stage-foe-thumb {
  width: 68px;
  height: 68px;
  border-radius: 13px;
  background: radial-gradient(circle at 50% 58%, rgba(255,255,255,0.14), rgba(10,14,20,0.72));
  border: 1.5px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}
.stage-foe-thumb.mid {
  border-color: rgba(251, 191, 36, 0.72);
  background: radial-gradient(circle at 50% 58%, rgba(251, 191, 36, 0.25), rgba(18,14,10,0.78));
}
.stage-foe-thumb.final {
  border-color: rgba(248, 113, 113, 0.78);
  background: radial-gradient(circle at 50% 58%, rgba(239, 68, 68, 0.28), rgba(22,10,14,0.82));
}
.stage-foe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}


/* === v4.9: 하단 잘림 해결 · 치료 효과 안내 · 잠시 닫기 미니 능력치 패널 === */
main#view {
  padding-bottom: calc(144px + env(safe-area-inset-bottom)) !important;
}
.clinic-btn-sub {
  font-size: 10.5px;
  color: #3d6b52;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.25;
}
.clinic-effect-note {
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
  text-align: center;
}
.defer-mini-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.defer-mini-cell {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 3px;
  text-align: center;
}
.defer-mini-cell span {
  display: block;
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 700;
}
.defer-mini-cell b {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-top: 2px;
}
body.theme-dark .defer-mini-cell {
  background: #1d2633 !important;
  border-color: #2f3d50 !important;
}
body.theme-dark .clinic-btn-sub {
  color: #86efac;
}


/* ============================================================================
 * 📜 v5.0 강호일대기 전통 오침 선장본 [자창무공 비급서] UI 스타일
 *  - 한지 질감 + 좌측 오침 바느질 제본 + 수묵 병기 문양 + 우측 세로 제첨 + 붓글씨 + 붉은 낙인 도장
 * ============================================================================ */
.manual-desk-stage {
  background:
    repeating-linear-gradient(90deg, rgba(255,220,175,0.03) 0px, rgba(255,220,175,0.03) 2px, transparent 2px, transparent 14px),
    radial-gradient(circle at 50% 45%, #462b1a 0%, #24140b 100%);
  border: 1.5px solid rgba(217, 159, 64, 0.35);
  border-radius: 18px;
  padding: 18px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 6px 24px rgba(0, 0, 0, 0.45);
}
.manual-desk-stage.large {
  padding: 22px 16px;
}

.manual-book {
  position: relative;
  border-radius: 4px 12px 12px 4px;
  background:
    radial-gradient(rgba(80, 58, 25, 0.08) 1px, transparent 0),
    linear-gradient(145deg, var(--m-bg1, #dfd0a5) 0%, var(--m-bg2, #c5b07b) 100%);
  background-size: 16px 16px, 100% 100%;
  box-shadow:
    4px 4px 0 #ebe3cc,
    6px 6px 0 #b3a482,
    0 14px 28px rgba(0, 0, 0, 0.52),
    inset 0 0 24px rgba(45, 30, 10, 0.16);
  overflow: hidden;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.manual-sz-lg { width: 204px; height: 282px; }
.manual-sz-md { width: 172px; height: 238px; }
.manual-sz-sm {
  width: 62px;
  height: 86px;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 2px 2px 0 #ebe3cc, 3px 3px 0 #b3a482, 0 4px 10px rgba(0, 0, 0, 0.28);
}

/* 좌측 선장본 오침 제본선 & 가로 실밥 4곳 */
.manual-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 17%;
  border-right: 1.5px solid rgba(25, 18, 8, 0.32);
  background: linear-gradient(90deg, rgba(0,0,0,0.16), rgba(0,0,0,0.03));
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 12% 0;
  z-index: 3;
}
.manual-stitch {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--m-thread, #6e5630);
  box-shadow: 0 1px 1px rgba(0,0,0,0.3);
  position: relative;
}
.manual-stitch::after {
  content: '';
  position: absolute;
  right: -2.5px;
  top: -1.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(25, 18, 8, 0.45);
}
.manual-sz-sm .manual-stitch { height: 1.5px; }
.manual-sz-sm .manual-stitch::after { width: 2.5px; height: 2.5px; right: -1.2px; top: -0.5px; }

/* 표지 수묵 산수·병기 문양 */
.manual-wm-svg {
  position: absolute;
  left: 16%;
  bottom: 6%;
  width: 74%;
  height: 74%;
  opacity: 0.24;
  pointer-events: none;
  z-index: 1;
}

/* 우측 세로 흰 한지 제첨(제목 띠) */
.manual-slip {
  position: absolute;
  top: 7%;
  right: 8%;
  width: 28%;
  height: 72%;
  background: #faf7ef;
  border: 1.5px solid #9e9480;
  border-radius: 2px;
  padding: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
  z-index: 4;
}
.manual-sz-sm .manual-slip {
  padding: 1.5px;
  border-width: 1px;
}
.manual-slip-inner {
  width: 100%;
  height: 100%;
  border: 1px solid #c9c0ab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7px 2px 6px;
}
.manual-sz-sm .manual-slip-inner {
  padding: 3px 1px 2px;
  border-width: 0.5px;
}

/* 세로 붓글씨 무공명 */
.manual-title-v {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: 'East Sea Dokdo', 'Gowun Batang', 'Batang', serif;
  font-weight: 700;
  color: #161310;
  line-height: 1.05;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* 붉은 전각 낙인 도장 (제첨 하단) */
.manual-seal-sq {
  width: 24px;
  height: 24px;
  background: linear-gradient(145deg, #c81e1e, #991b1b);
  color: #fef2f2;
  border: 1px solid rgba(254, 226, 226, 0.72);
  border-radius: 2px;
  font-family: 'Gowun Batang', serif;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: upright;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.manual-sz-md .manual-seal-sq { width: 20px; height: 20px; font-size: 8px; }
.manual-sz-sm .manual-seal-sq { width: 9px; height: 9px; font-size: 4.5px; border-width: 0.5px; }

/* 좌측 하단 창안자 낙관 줄 */
.manual-colophon {
  position: absolute;
  left: 22%;
  bottom: 5.5%;
  font-family: 'Gowun Batang', serif;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--m-ink, #4d3b1e);
  opacity: 0.78;
  z-index: 3;
  max-width: 68%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 무인/일대기/명예전당 진열 카드 & 히어로 배지 */
.manual-shelf-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(145deg, #fffdf7 0%, #f8f2e0 100%);
  border: 1.5px solid #e2c986;
  border-radius: 18px;
  padding: 13px 15px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.1s ease;
}
.manual-shelf-card:active { transform: scale(0.985); }

.manual-hero-pill {
  margin-top: 9px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #fde68a;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: 11px;
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
}

body.theme-dark .manual-shelf-card {
  background: linear-gradient(145deg, #1d2430 0%, #241e18 100%) !important;
  border-color: #9a6b24 !important;
}

/* === v5.0.2: 입문 후보 육각형 비교 뷰 === */
.cand-hex-wrap {
  margin-top: 6px;
  padding: 6px 4px 2px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 12px;
}
body.theme-dark .cand-hex-wrap {
  background: #141c26 !important;
  border-color: #2f3d50 !important;
}


/* ============================================================================
 * 🏯 v5.1 수묵 산수화 세로 타이틀·로딩 화면 & 최초 창맹(맹·맹주) 필수 설정 UI
 * ============================================================================ */
.title-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: #14110c;
  display: flex;
  justify-content: center;
  align-items: stretch;
  opacity: 1;
  transition: opacity 0.36s ease;
}
.title-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.title-overlay.hidden {
  display: none !important;
}

.title-screen {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  min-height: 100dvh;
  background-color: #dfd2b5;
  background-image: url('../assets/title_bg.jpg?v=1.3.13');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.55);
}
.title-screen.setup-mode::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 10, 0.08) 0%, rgba(20, 16, 10, 0.38) 45%, rgba(20, 16, 10, 0.62) 100%);
  pointer-events: none;
  z-index: 1;
}

/* 은은하게 피어오르는 황금 불씨 파티클 */
.title-embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.title-embers span {
  position: absolute;
  bottom: 20%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8d6 0%, #f5b935 65%, transparent 100%);
  opacity: 0;
  animation: titleEmberFloat 4.6s ease-in infinite;
}
.title-embers span:nth-child(1) { left: 16%; animation-delay: 0s; }
.title-embers span:nth-child(2) { left: 32%; animation-delay: 1.1s; width: 4px; height: 4px; }
.title-embers span:nth-child(3) { left: 52%; animation-delay: 2.2s; }
.title-embers span:nth-child(4) { left: 68%; animation-delay: 0.6s; width: 6px; height: 6px; }
.title-embers span:nth-child(5) { left: 82%; animation-delay: 1.8s; width: 4px; height: 4px; }
.title-embers span:nth-child(6) { left: 42%; animation-delay: 3.1s; }
@keyframes titleEmberFloat {
  0%   { transform: translateY(0) scale(0.7); opacity: 0; }
  25%  { opacity: 0.85; }
  80%  { opacity: 0.55; }
  100% { transform: translateY(-210px) translateX(18px) scale(1.1); opacity: 0; }
}

.title-bottom-area {
  position: relative;
  z-index: 3;
  padding: 14px 24px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.title-tagline {
  font-size: 14.5px;
  font-weight: 800;
  color: #241c13;
  text-align: center;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 6px rgba(246, 238, 218, 0.95);
}

/* 전통 목판 + 금박 테두리 [⚔️ 강호 입장하기] 버튼 */
.title-enter-btn {
  width: 100%;
  max-width: 310px;
  padding: 4px;
  border-radius: 16px;
  border: 2px solid #8c6a32;
  background: linear-gradient(180deg, #4b3821 0%, #261a0e 52%, #191008 100%);
  box-shadow: 0 8px 22px rgba(22, 14, 6, 0.45), inset 0 1px 0 rgba(255, 226, 150, 0.35);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}
.title-enter-btn:disabled {
  opacity: 0.52;
  cursor: wait;
}
.title-enter-btn.ready {
  opacity: 1;
  animation: titleBtnPulse 2.2s ease-in-out infinite;
}
.title-enter-btn:active:not(:disabled) {
  transform: scale(0.975);
}
.title-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 11px;
  border: 1px solid rgba(235, 192, 102, 0.55);
  color: #f6d57c;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}
@keyframes titleBtnPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(22, 14, 6, 0.45), 0 0 0 0 rgba(235, 185, 72, 0.4); }
  50%      { box-shadow: 0 10px 26px rgba(22, 14, 6, 0.55), 0 0 18px 2px rgba(235, 185, 72, 0.42); }
}

/* 전통 먹색·금박 로딩 게이지 */
.title-load-wrap {
  width: 100%;
  max-width: 310px;
  transition: opacity 0.25s ease;
}
.title-load-wrap.done .title-load-txt {
  color: #5c4523;
  font-weight: 800;
}
.title-load-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(58, 43, 24, 0.24);
  border: 1.5px solid rgba(92, 68, 36, 0.6);
  overflow: hidden;
  padding: 1px;
}
.title-load-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5e21 0%, #d99726 60%, #fde073 100%);
  transition: width 0.24s ease-out;
}
.title-load-txt {
  font-size: 12px;
  font-weight: 700;
  color: #3d3121;
  text-align: center;
  margin-top: 5px;
  text-shadow: 0 1px 4px rgba(246, 238, 218, 0.9);
}
.title-ver-foot {
  font-size: 11px;
  font-weight: 700;
  color: rgba(56, 44, 28, 0.68);
  margin-top: 2px;
}

/* 최초 창맹(맹·맹주 이름 필수 입력) 카드 */
.title-setup-card {
  width: 100%;
  background: rgba(252, 248, 238, 0.97);
  color: #1c1915;
  border: 2px solid #b98d42;
  border-radius: 20px;
  padding: 16px 16px 14px;
  box-shadow: 0 14px 36px rgba(18, 12, 6, 0.45);
  animation: sheetUp 0.24s ease-out;
}
.title-setup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.title-setup-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 900;
  color: #1a1510;
  letter-spacing: -0.025em;
}
.title-setup-preview {
  background: #1b2028;
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.title-setup-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #3f3425;
  margin-bottom: 5px;
}
.title-setup-card .name-input {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #cfc3a8 !important;
}
.title-setup-card .btn-outline {
  background: #ffffff !important;
  color: #2c2418 !important;
  border-color: #cfc3a8 !important;
}
.title-restore-link {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 7px;
  border: none;
  background: transparent;
  color: #6b532b;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}


/* === v5.3: 주간 진영전 실시간 32-bit 전장 캔버스 & 5단계 누적 전공 보상 === */
.war-arena-frame {
  background: #141922;
  border: 2px solid rgba(228, 166, 38, 0.55);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.war-arena-frame canvas {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}
.war-ms-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.war-ms-cell {
  border: 1.5px solid var(--border);
  background: #f8f5ec;
  border-radius: 11px;
  padding: 6px 3px;
  text-align: center;
  font-family: inherit;
  cursor: default;
  transition: transform 0.1s ease;
}
.war-ms-cell.ready {
  border-color: #d97706;
  background: linear-gradient(180deg, #fffbeb, #fde68a);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.28);
}
.war-ms-cell.ready:active { transform: scale(0.96); }
.war-ms-cell.done {
  border-color: #86efac;
  background: #ecfdf5;
  opacity: 0.78;
}
.war-ms-pts {
  font-size: 11.5px;
  font-weight: 900;
  color: #92400e;
}
.war-ms-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
  margin-top: 2px;
  line-height: 1.25;
  word-break: keep-all;
}
.war-ms-cta {
  margin-top: 3px;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #d97706;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
}
body.theme-dark .war-ms-cell {
  background: #1b2430 !important;
  border-color: #2f3d50 !important;
}
body.theme-dark .war-ms-cell.ready {
  background: #3a2b10 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .war-ms-pts { color: #fde68a; }
body.theme-dark .war-ms-lbl { color: #cbd5e1; }


/* === v5.4: 연맹 총단(본산 마당) 실시간 아지트 · 선배 사사 · 파견 게시판 === */
.hq-home-banner {
  background: linear-gradient(135deg, #1b2a24 0%, #241c14 100%);
  color: #fef3c7;
  border: 1.5px solid rgba(217, 155, 38, 0.62);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(18, 28, 22, 0.16);
}
.hq-stage-card {
  background: #141922;
  border: 2px solid rgba(217, 155, 38, 0.55);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hq-canvas-wrap {
  position: relative;
  width: 100%;
  background: #10161d;
}
.hq-canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  image-rendering: pixelated;
}
.hq-tap-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(10, 14, 20, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: #cbd5e1;
}
.hq-mentor-box {
  padding: 11px 12px;
  background: linear-gradient(145deg, #1e2532, #231d15);
  border-top: 1px solid rgba(251, 191, 36, 0.28);
}
.hq-dispatch-card {
  background: #fbf8f1;
  border: 1.5px solid #e4d9c0;
  border-radius: 14px;
  padding: 11px 12px;
}
.hq-dispatch-card.done {
  background: #fffbeb;
  border-color: #d97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.16);
}
.hq-mission-btn {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.hq-mission-btn.selected {
  border-color: #d97706;
  background: #fffdf4;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.18);
}
body.theme-dark .hq-dispatch-card {
  background: #1a222e !important;
  border-color: #2f3d50 !important;
}
body.theme-dark .hq-dispatch-card.done {
  background: #2b2210 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .hq-mission-btn.selected {
  background: #272013 !important;
  border-color: #f59e0b !important;
}


/* === v5.5: 연맹 총단 마당 꾸미기 상점 & 위치 이동 배너 === */
.hq-move-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #92400e, #b45309);
  color: #fffbeb;
  font-size: 12px;
  font-weight: 800;
}
.hq-decor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
}
.hq-decor-row.active {
  border-color: #d97706;
  background: #fffdf4;
}
body.theme-dark .hq-decor-row.active {
  background: #272013 !important;
  border-color: #f59e0b !important;
}


/* === v5.6: 2.5D 총단 꾸미기 32-bit 실물 썸네일 === */
.hq-bg-thumb {
  width: 68px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid rgba(217, 155, 38, 0.55);
  flex-shrink: 0;
  image-rendering: pixelated;
}
.hq-item-thumb-box {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 60%, #2a3444, #161c26);
  border: 1.5px solid rgba(217, 155, 38, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.hq-item-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}


.clinic-btn.clinic-tonic {
  background: #fdf8eb;
  border-color: #e5ca84;
  color: #6c4700;
}

/* === v5.8: 다크모드(body.theme-dark) 가독성 전면 보완 (40+ 누락 클래스 & 인라인 밝은 박스 일괄 수정) === */
body.theme-dark .codex-box,
body.theme-dark .pot-box,
body.theme-dark .event-result-card,
body.theme-dark .event-sheet,
body.theme-dark .modal-sheet,
body.theme-dark .patch-card {
  background: #171f2a !important;
  color: #f3f4f6 !important;
  border-color: #2d3b4e !important;
}
body.theme-dark .codex-item,
body.theme-dark .pot-row,
body.theme-dark .event-result-choice,
body.theme-dark .chance-opt,
body.theme-dark .cat-tab,
body.theme-dark .party-slot,
body.theme-dark .quick-icon,
body.theme-dark .news-tag,
body.theme-dark .lore-pill,
body.theme-dark .view-toggle,
body.theme-dark .res-pill,
body.theme-dark .clinic-btn,
body.theme-dark .defer-mini-cell,
body.theme-dark .mission-cat-tag,
body.theme-dark .stat-tile,
body.theme-dark .act-tile {
  background: #1d2735 !important;
  color: #f3f4f6 !important;
  border-color: #304056 !important;
}
body.theme-dark .codex-item.active,
body.theme-dark .clinic-btn.clinic-tonic,
body.theme-dark .stat-tile.selected,
body.theme-dark .act-tile.selected,
body.theme-dark .cat-tab.active,
body.theme-dark .party-slot.filled {
  background: #2b2415 !important;
  color: #fef3c7 !important;
  border-color: #f59e0b !important;
}
body.theme-dark .codex-item .opt-title,
body.theme-dark .opt-btn .opt-title,
body.theme-dark .event-sheet h3,
body.theme-dark .event-sheet .sheet-title,
body.theme-dark .patch-card,
body.theme-dark .codex-card {
  color: #f1f5f9 !important;
}
body.theme-dark .codex-item .opt-desc,
body.theme-dark .opt-btn .opt-desc,
body.theme-dark .clinic-btn-sub,
body.theme-dark .codex-card .muted {
  color: #cbd5e1 !important;
}
body.theme-dark .mission-item.done,
body.theme-dark .res-pill.good,
body.theme-dark .sheet-kicker.chance,
body.theme-dark .tier-tag.t10 {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
  border-color: rgba(34, 197, 94, 0.38) !important;
}
body.theme-dark .res-pill.bad,
body.theme-dark .chip.warn,
body.theme-dark .sheet-kicker.danger,
body.theme-dark .tier-tag.tm10 {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}
body.theme-dark .sheet-kicker.train,
body.theme-dark .tier-tag.t20 {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fde68a !important;
}
body.theme-dark .sheet-kicker.event,
body.theme-dark .sheet-kicker.offer,
body.theme-dark .sheet-kicker.summary {
  background: rgba(148, 163, 184, 0.18) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .inj-track {
  background: #273242 !important;
}
body.theme-dark .sheet-handle {
  background: #475569 !important;
}
body.theme-dark [style*="background:#fff"],
body.theme-dark [style*="background:#faf"],
body.theme-dark [style*="background:#fdf"],
body.theme-dark [style*="background:#fef"],
body.theme-dark [style*="background:linear-gradient(145deg,#fff"] {
  background: #1d2633 !important;
  color: #f3f4f6 !important;
  border-color: #36455a !important;
}


/* === v6.0.2: 자유 전체 색상 선택기(컬러 휠/스펙트럼) + 스포이드 버튼 === */
.color-picker-pill,
.eyedropper-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  background: var(--bg-card, #ffffff);
  color: var(--text, #111827);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  overflow: hidden;
  user-select: none;
}
.color-picker-swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.color-picker-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
body.theme-dark .color-picker-pill,
body.theme-dark .eyedropper-pill {
  background: #243040 !important;
  color: #f8fafc !important;
  border-color: #3c4d63 !important;
}


/* === v6.1: 남·여 10종(총 20종) 32-bit 헤어스타일 5x2 선택 그리드 === */
.hair-grid-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.hair-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 3px 5px;
  border-radius: 12px;
  border: 1.5px solid var(--border, #e5e7eb);
  background: var(--bg-card, #ffffff);
  color: var(--text, #111827);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}
.hair-card:active {
  transform: scale(0.96);
}
.hair-card.active {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.22);
}
.hair-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #2b3544, #171e29);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hair-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.hair-name {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.03em;
  word-break: keep-all;
}
body.theme-dark .hair-card {
  background: #1d2735 !important;
  color: #f3f4f6 !important;
  border-color: #304056 !important;
}
body.theme-dark .hair-card.active {
  background: #2c2313 !important;
  color: #fde68a !important;
  border-color: #f59e0b !important;
}


/* === v6.8: 고퀄리티 비단 능화지 선장본 비급서 리마스터 === */
.manual-desk-stage {
  border-radius: 16px;
  background-color: #26160c;
  box-shadow: inset 0 6px 26px rgba(0, 0, 0, 0.58), 0 4px 14px rgba(0, 0, 0, 0.2);
}
.manual-book {
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    3px 3px 0 #efe5cb,
    5px 5px 0 #cabca0,
    7px 7px 0 #8d7f63,
    0 16px 32px rgba(0, 0, 0, 0.62),
    inset 0 0 22px rgba(25, 16, 6, 0.24);
}
.manual-sz-sm {
  box-shadow: 2px 2px 0 #efe5cb, 3.5px 3.5px 0 #9f9072, 0 5px 12px rgba(0, 0, 0, 0.35);
}
.manual-corner {
  position: absolute;
  left: 0;
  width: 24px;
  height: 24px;
  background: var(--m-ink, #ecc054);
  opacity: 0.82;
  z-index: 4;
  pointer-events: none;
}
.manual-corner-tl {
  top: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.manual-corner-bl {
  bottom: 0;
  clip-path: polygon(0 100%, 100% 100%, 0 0);
}
.manual-sz-sm .manual-corner {
  width: 9px;
  height: 9px;
}
.manual-spine {
  padding: 9% 0;
}
.manual-spine-vline {
  position: absolute;
  top: 11%;
  bottom: 11%;
  right: 0;
  width: 2px;
  background: var(--m-thread, #ecc054);
  opacity: 0.85;
}
.manual-sz-sm .manual-spine-vline {
  width: 1px;
}
.manual-inner-frame {
  position: absolute;
  top: 4%;
  bottom: 4%;
  left: 20%;
  right: 4.5%;
  border: 1.5px solid var(--m-ink, #ecc054);
  border-radius: 2px 7px 7px 2px;
  opacity: 0.56;
  pointer-events: none;
  z-index: 2;
}
.manual-inner-frame::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid var(--m-ink, #ecc054);
  border-radius: 1px 5px 5px 1px;
  opacity: 0.62;
}
.manual-sz-sm .manual-inner-frame {
  border-width: 1px;
}
.manual-sz-sm .manual-inner-frame::after {
  display: none;
}
.manual-wm-svg {
  opacity: 0.34;
}
.manual-slip {
  background:
    radial-gradient(rgba(214, 174, 72, 0.42) 1px, transparent 0),
    linear-gradient(160deg, #fcf8ee 0%, #f1e6cc 100%);
  background-size: 18px 22px, 100% 100%;
  border: 1.5px solid #96876b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
}
.manual-colophon {
  color: var(--m-ink, #ecc054);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.manual-cust-box {
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
body.theme-dark .manual-cust-box {
  background: #1a2330 !important;
  border-color: #2e3d52 !important;
}


/* === v6.9: 하단 4탭(메인) / 5탭(육성) + 상단 상점 버튼 + 내 문파 명단 + 가지형 경지/업적 트리 + 미니 비급서 보정 === */
.tabs.career-mode {
  grid-template-columns: repeat(5, 1fr) !important;
}
.shop-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1.5px solid #d99b1e;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #7c4a03;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.shop-top-btn.active {
  background: linear-gradient(135deg, #e4a626, #b45309);
  color: #ffffff;
  border-color: #b45309;
}
body.theme-dark .shop-top-btn {
  background: linear-gradient(135deg, #332612, #261b0b) !important;
  color: #fde68a !important;
  border-color: #d97706 !important;
}
body.theme-dark .shop-top-btn.active {
  background: linear-gradient(135deg, #d97706, #92400e) !important;
  color: #ffffff !important;
}
.realm-pill-btn {
  border: 1px solid rgba(251, 191, 36, 0.45);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease;
}
.realm-pill-btn:active {
  transform: scale(0.96);
}

/* 내 문파 보유 무인 명단 카드 */
.roster-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1.5px solid var(--border, #e5e7eb);
  background: var(--bg-card, #ffffff);
}
.roster-row-card.is-active-run {
  border-color: #d99b1e;
  background: linear-gradient(145deg, #fffdf5, #fef9e7);
}
body.theme-dark .roster-row-card {
  background: #1a2330 !important;
  border-color: #2e3d52 !important;
}
body.theme-dark .roster-row-card.is-active-run {
  background: #282112 !important;
  border-color: #f59e0b !important;
}

/* 강호일대기 결 (한지·금박·주홍) 가지형 경지·업적 트리 */
.gh-tree-canvas {
  position: relative;
  background: radial-gradient(circle at 50% 0%, #fffdf8 0%, #f4ede0 100%);
  border: 1.5px solid #decfa8;
  border-radius: 16px;
  padding: 12px 8px 14px;
  overflow-x: hidden;
}
.gh-tree-stage {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.gh-tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.gh-tree-edge {
  fill: none;
  stroke: #cfc3ab;
  stroke-width: 2.4;
  stroke-dasharray: 4 3;
}
.gh-tree-edge.active {
  stroke: #d49b2a;
  stroke-width: 3.2;
  stroke-dasharray: none;
}
.gh-tree-nodes {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.gh-tree-node {
  position: absolute;
  transform: translateX(-50%);
  width: 84px;
  min-height: 54px;
  padding: 5px 4px 4px;
  border-radius: 13px;
  border: 2px solid #d5cab4;
  background: #faf6ec;
  color: #6f6758;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.gh-tree-node:active {
  transform: translateX(-50%) scale(0.95);
}
.gh-tree-node.locked {
  opacity: 0.68;
}
.gh-tree-node.avail {
  border-color: #c7a04a;
  background: #fffdf6;
  color: #3a3122;
}
.gh-tree-node.unlocked {
  background: linear-gradient(180deg, #fff9e8 0%, #f7e7bc 100%);
  border-color: #d49b2a;
  color: #161920;
  box-shadow: 0 3px 10px rgba(212, 155, 42, 0.28);
}
.gh-tree-node.current {
  border-color: #c83e37;
  box-shadow: 0 0 0 3px rgba(200, 62, 55, 0.22), 0 4px 12px rgba(200, 62, 55, 0.24);
}
.gh-tree-node.keystone {
  border-width: 2.5px;
  border-radius: 16px;
}
.gh-tree-node.selected {
  outline: 2.5px solid #2563eb;
  outline-offset: 2px;
}
.gh-node-seal {
  position: absolute;
  top: -7px;
  right: -5px;
  background: #b45309;
  color: #fffdf8;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.25;
}
.gh-node-seal.cur {
  background: #c83e37;
}
.gh-node-ico {
  font-size: 16px;
  line-height: 1.1;
}
.gh-node-lbl {
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-node-sub {
  font-size: 9.5px;
  font-weight: 800;
  opacity: 0.78;
  margin-top: 1px;
}
.gh-tree-detail {
  padding: 11px 13px;
  border-radius: 13px;
  border: 1.5px solid #e2cfa2;
  background: #fffcf3;
}
body.theme-dark .gh-tree-canvas {
  background: radial-gradient(circle at 50% 0%, #1e2736 0%, #131923 100%) !important;
  border-color: #3d3320 !important;
}
body.theme-dark .gh-tree-edge {
  stroke: #3c485c;
}
body.theme-dark .gh-tree-edge.active {
  stroke: #f59e0b;
}
body.theme-dark .gh-tree-node {
  background: #1b2432 !important;
  border-color: #344359 !important;
  color: #94a3b8 !important;
}
body.theme-dark .gh-tree-node.avail {
  border-color: #926d27 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .gh-tree-node.unlocked {
  background: linear-gradient(180deg, #342914 0%, #241b0c 100%) !important;
  border-color: #f59e0b !important;
  color: #fef3c7 !important;
}
body.theme-dark .gh-tree-node.current {
  border-color: #ef4444 !important;
}
body.theme-dark .gh-tree-detail {
  background: #1a2330 !important;
  border-color: #463a22 !important;
  color: #f3f4f6 !important;
}

/* 미니 비급서 표지 제첨 첫 글자 위 잘림 방지 보정 */
.manual-sz-sm .manual-slip {
  top: 6%;
  height: 76%;
}
.manual-sz-sm .manual-slip-inner {
  padding: 5px 1px 3px !important;
  gap: 2px;
}
.manual-sz-sm .manual-title-v {
  justify-content: flex-start !important;
  padding-top: 2px;
  line-height: 1.08 !important;
  overflow: visible !important;
}
.manual-sz-sm .manual-seal-sq {
  width: 12px;
  height: 12px;
  font-size: 5.5px;
  flex-shrink: 0;
}


/* === v7.0: 내 문파 본산마당 퀵버튼 + 무인 명단 쾌적 여백 + 절지 비경 5단계 확률표 === */
.hq-quick-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 10px 8px;
  background: rgba(15, 20, 28, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hq-qbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease;
}
.hq-qbtn:active {
  transform: scale(0.95);
}
.hq-qbtn.glow {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}
.hq-qico {
  font-size: 16px;
  line-height: 1;
}

/* 내 문파 무인 명단: 필터 칩과 캐릭터 카드 경계선 사이 넉넉한 여백 & 깔끔한 구분선 */
.mysect-roster-card {
  padding: 16px 15px 18px;
}
.mysect-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.roster-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0 14px;
  margin-bottom: 14px;
  border-bottom: 1.5px dashed var(--border-strong, #d8cfc0);
}
.roster-divider {
  height: 1px;
  border-bottom: 1px dashed var(--border, #e2e8f0);
  margin: 0 0 14px;
}
.roster-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.roster-row-card {
  padding: 12px 13px;
}

/* 절지 비경 5단계 확률 분포 박스 */
.exp-odds-box {
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}
.exp-odds-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.exp-odd-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 2px;
  border-radius: 9px;
  font-size: 10.5px;
  border: 1px solid transparent;
}
.exp-odd-pill b {
  font-size: 12px;
  font-weight: 900;
  margin-top: 1px;
}
.exp-odd-pill.mythic  { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.exp-odd-pill.jackpot { background: #e0f2fe; border-color: #38bdf8; color: #075985; }
.exp-odd-pill.normal  { background: #dcfce7; border-color: #4ade80; color: #166534; }
.exp-odd-pill.danger  { background: #ffedd5; border-color: #fb923c; color: #9a3412; }
.exp-odd-pill.fatal   { background: #fee2e2; border-color: #f87171; color: #991b1b; }

body.theme-dark .exp-odds-box {
  background: #1a2330 !important;
  border-color: #2e3d52 !important;
}
body.theme-dark .exp-odd-pill.mythic  { background: rgba(245,158,11,0.2); color: #fde68a; }
body.theme-dark .exp-odd-pill.jackpot { background: rgba(56,189,248,0.2); color: #7dd3fc; }
body.theme-dark .exp-odd-pill.normal  { background: rgba(34,197,94,0.2); color: #86efac; }
body.theme-dark .exp-odd-pill.danger  { background: rgba(251,146,60,0.2); color: #fdba74; }
body.theme-dark .exp-odd-pill.fatal   { background: rgba(239,68,68,0.2); color: #fca5a5; }


/* === v7.1: 『등선도』 · 『강호위업록』 · 『강호만물록』 전용 아트 & 1/3/10 할인 번들 & 명예전당 검색 === */
.gh-ascension-art {
  border: 2px solid #d49b2a !important;
  box-shadow: inset 0 0 28px rgba(10, 18, 22, 0.55), 0 6px 18px rgba(0, 0, 0, 0.25);
}
.gh-ascension-art .gh-tree-edge {
  stroke: rgba(255, 245, 215, 0.58);
}
.gh-ascension-art .gh-tree-edge.active {
  stroke: #fde047;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.85));
}
.gh-ascension-art .gh-tree-node {
  background: rgba(20, 27, 36, 0.88) !important;
  border-color: rgba(217, 178, 92, 0.58) !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(3px);
}
.gh-ascension-art .gh-tree-node.unlocked {
  background: linear-gradient(180deg, rgba(255, 249, 226, 0.96) 0%, rgba(247, 225, 165, 0.95) 100%) !important;
  border-color: #f59e0b !important;
  color: #161920 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
}
.gh-ascension-art .gh-tree-node.current {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 4px 16px rgba(245, 158, 11, 0.5);
}

.gh-achieve-art {
  border: 2px solid #c99b44 !important;
  box-shadow: inset 0 0 22px rgba(92, 58, 14, 0.16);
}
.gh-scroll-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.84);
  border: 1px solid rgba(196, 150, 62, 0.45);
}

.codex-gilded-banner {
  position: relative;
  border-radius: 14px;
  padding: 16px 14px;
  margin-bottom: 10px;
  text-align: center;
  background-color: #1b120c;
  background-size: cover;
  background-position: center;
  border: 1.5px solid #d49b2a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 0 18px rgba(212, 155, 42, 0.18);
}
.codex-banner-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #f6d584;
  opacity: 0.9;
}
.codex-banner-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff9e6;
  margin-top: 3px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}
.codex-banner-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #e9d5a8;
  margin-top: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* 명예전당 검색창 */
.hall-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 10px;
}

/* 금원보 1 / 3 / 10 다량 할인 번들 버튼 */
.bundle-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.bundle-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 7px;
  border-radius: 11px;
  border: 1.5px solid #d99b1e;
  background: linear-gradient(180deg, #fffdf6 0%, #fef3c7 100%);
  color: #78350f;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.bundle-btn:active {
  transform: scale(0.95);
}
.bundle-btn b {
  font-size: 12.5px;
  font-weight: 900;
}
.bundle-btn span {
  font-size: 11px;
  font-weight: 800;
}
.bundle-btn.best {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  color: #ffffff;
  border-color: #92400e;
}
.bundle-btn.short {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}
.bundle-tag {
  position: absolute;
  top: -7px;
  right: 4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 9px !important;
  font-weight: 900 !important;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.25;
}
body.theme-dark .bundle-btn {
  background: linear-gradient(180deg, #2d2310 0%, #1f1709 100%) !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}
body.theme-dark .bundle-btn.best {
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%) !important;
  color: #ffffff !important;
}
body.theme-dark .bundle-btn.short {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}


/* === v7.2: 누락 여백 유틸리티 (모달 글씨 겹침 0%) + 48종 전용 아이콘 + 홈 콤팩트 + 2.5D 비무장 + 4종 캔버스 미니게임 === */
.mb-4  { margin-bottom: 4px; }
.mb-6  { margin-bottom: 6px; }
.mb-10 { margin-bottom: 10px; }
.mt-4  { margin-top: 4px; }
.mt-6  { margin-top: 6px; }
.mt-10 { margin-top: 10px; }

.gh-ico {
  display: inline-block;
  vertical-align: -3px;
  object-fit: contain;
  flex-shrink: 0;
}
.tab-icon .gh-ico { vertical-align: middle; }
.gh-node-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.home-quick-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.home-qtile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 11px 6px 10px;
  margin: 0;
  cursor: pointer;
  border: 1.5px solid var(--border, #e5e0d4);
  font-family: inherit;
  text-align: center;
}
.home-qtile:active { transform: scale(0.96); }
.hq-t-title { font-size: 13px; font-weight: 900; color: var(--text); line-height: 1.15; }
.hq-t-sub { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.qtile-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 900; line-height: 18px;
}

.home-stat-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.home-stat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px;
  border-radius: 13px;
  border: 1.5px solid var(--border, #e5e0d4);
  background: var(--bg-card, #ffffff);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.home-stat-btn:active { transform: scale(0.96); }
.home-stat-btn b { font-size: 11.5px; font-weight: 900; line-height: 1.1; }
.home-stat-btn span { font-size: 10px; font-weight: 800; color: var(--gold-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.theme-dark .home-stat-btn { background: #1a2330 !important; border-color: #2e3d52 !important; }

.duel-arena-shell {
  border-radius: 14px;
  overflow: hidden;
  background: #0f141d;
  border: 1.5px solid #d49b2a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
}
.duel-arena-shell canvas { width: 100%; height: auto; display: block; }
.duel-arena-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(15, 20, 29, 0.96);
}
.duel-arena-controls .btn { min-height: 30px; padding: 4px 6px; font-size: 11.5px; }
.duel-summary-box {
  margin-top: 8px; padding: 11px 12px; border-radius: 13px;
  border: 1.5px solid #d49b2a; background: #fffdf6;
}
.duel-summary-box.lose { border-color: #f87171; background: #fff7f7; }
.duel-out-badge { font-size: 14px; font-weight: 900; padding: 3px 10px; border-radius: 999px; }
.duel-out-badge.win  { background: #fef3c7; color: #92400e; }
.duel-out-badge.lose { background: #fee2e2; color: #991b1b; }
.duel-out-badge.draw { background: #e2e8f0; color: #334155; }
.duel-vs-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.duel-vs-mid { font-size: 13px; font-weight: 900; color: #d97706; padding: 3px 7px; border-radius: 8px; background: rgba(217,119,6,0.12); }
.duel-hp-mini { width: 100%; height: 6px; border-radius: 99px; background: rgba(0,0,0,0.12); overflow: hidden; margin: 4px 0 2px; }
.duel-hp-mini > div { height: 100%; border-radius: 99px; }
.duel-timeline {
  margin-top: 8px; display: flex; flex-direction: column; gap: 5px;
  max-height: 210px; overflow-y: auto; padding: 8px; border-radius: 12px;
  background: var(--bg-soft, #f8fafc); border: 1px solid var(--border, #e2e8f0);
}
.dt-row {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px;
  border-radius: 9px; font-size: 12px; background: var(--bg-card, #ffffff);
  border-left: 3px solid #cbd5e1;
}
.dt-row.side-a { border-left-color: #2563eb; }
.dt-row.side-b { border-left-color: #dc2626; }
.dt-turn { font-size: 10.5px; font-weight: 900; color: var(--muted); min-width: 26px; flex-shrink: 0; }
.dt-txt { flex: 1; min-width: 0; line-height: 1.3; }
.dt-pill { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 7px; flex-shrink: 0; }
.dt-pill.atk    { background: #dbeafe; color: #1d4ed8; }
.dt-pill.def    { background: #fee2e2; color: #b91c1c; }
.dt-pill.crit   { background: #fef3c7; color: #b45309; }
.dt-pill.evade  { background: #e0f2fe; color: #0369a1; }
.dt-pill.poison { background: #f3e8ff; color: #7e22ce; }
body.theme-dark .duel-summary-box { background: #1e2633 !important; border-color: #b45309 !important; }
body.theme-dark .duel-timeline    { background: #151c27 !important; border-color: #2b384c !important; }
body.theme-dark .dt-row           { background: #1d2636 !important; color: #f1f5f9 !important; }

.story-game-shell {
  padding: 8px; border-radius: 14px; background: #0f141d; border: 1.5px solid #d49b2a;
}
.parry-btn-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }


/* === v7.3: 다크모드 전 화면 고대비 가독성 완벽 보강 + 일대기 최종 경지 버튼 + 공용 하이라이트 클래스 === */
.hero-kpi-btn {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.14);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease;
}
.hero-kpi-btn:active { transform: scale(0.96); }

/* Light mode semantic highlight classes */
.is-highlight-card {
  background: linear-gradient(145deg, #fffdf5, #faf3dc);
  border: 1.5px solid #e4c373;
}
.is-gold-opt {
  border-color: #d99b1e;
  background: linear-gradient(145deg, #fffdf4, #fef6dc);
}
.is-danger-opt {
  border-color: #d8857d;
  background: #fff8f7;
}
.is-gold-note {
  background: #fdf7e3;
  border-color: #e8cf88;
  border-left-color: #d97706;
  color: #3d3012;
}
.is-soft-card {
  background: #faf6ec;
  border: 1px solid #e6decb;
}
.is-mine-hall {
  border-color: #d8b35a;
  background: #fffdf4;
}
.hl-title-gold { color: #78350f; }
.txt-accent-green { color: #1e5c42; }
.txt-body-sub { color: #2c323a; }
.radar-val { fill: #1c1f24; }
.radar-lbl { fill: #6c6a63; }
.radar-lbl.is-main { fill: #b83227; }

/* Dark mode COMPLETE contrast overhaul (ZERO unreadable dark-on-dark or blinding white-on-white!) */
body.theme-dark {
  --text: #f3f6fb !important;
  --text-sub: #cbd5e1 !important;
  --muted: #9aa7b8 !important;
  --gold-dark: #fbbf24 !important;
  --bg-soft: #1a2330 !important;
  --hex-bg: #16202e !important;
}
body.theme-dark .card,
body.theme-dark .event-sheet,
body.theme-dark .modal-sheet {
  background: #171f2a !important;
  color: #f3f6fb !important;
  border-color: #2b384b !important;
}
body.theme-dark .card-title,
body.theme-dark .sheet-title,
body.theme-dark .opt-title,
body.theme-dark .hq-t-title,
body.theme-dark .quick-title,
body.theme-dark .stat-tile-nm,
body.theme-dark .stat-tile-val,
body.theme-dark .podium-nm,
body.theme-dark .swatch-label,
body.theme-dark b,
body.theme-dark strong {
  color: #f8fafc;
}
body.theme-dark .muted,
body.theme-dark .opt-desc,
body.theme-dark .hq-t-sub,
body.theme-dark .quick-sub,
body.theme-dark .clinic-btn-sub {
  color: #a5b4c7 !important;
}
body.theme-dark .opt-btn,
body.theme-dark .offer-card,
body.theme-dark .hall-card,
body.theme-dark .codex-card,
body.theme-dark .patch-card,
body.theme-dark .home-qtile,
body.theme-dark .hq-decor-row,
body.theme-dark .hq-dispatch-card,
body.theme-dark .stat-tile,
body.theme-dark .chance-opt,
body.theme-dark .attend-cell,
body.theme-dark .setting-row,
body.theme-dark .bio-kpi {
  background: #1c2635 !important;
  color: #f1f5f9 !important;
  border-color: #2f3e54 !important;
}
body.theme-dark .is-highlight-card,
body.theme-dark .is-gold-opt,
body.theme-dark .is-mine-hall,
body.theme-dark .hall-card[data-ismine="1"],
body.theme-dark .ladder-row[data-isfocus="1"],
body.theme-dark .hq-decor-row[data-ismoving="1"] {
  background: linear-gradient(145deg, #2b2313, #201a0d) !important;
  border-color: #d97706 !important;
  color: #fef3c7 !important;
}
body.theme-dark .is-danger-opt {
  background: #2b181b !important;
  border-color: #dc2626 !important;
  color: #fee2e2 !important;
}
body.theme-dark .is-gold-note {
  background: #292110 !important;
  border-color: #b45309 !important;
  border-left-color: #f59e0b !important;
  color: #fde68a !important;
}
body.theme-dark .is-soft-card {
  background: #1a2331 !important;
  border-color: #2f3e54 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .hl-title-gold { color: #fde68a !important; }
body.theme-dark .txt-accent-green { color: #86efac !important; }
body.theme-dark .txt-body-sub { color: #d8e1ec !important; }
body.theme-dark .radar-val { fill: #f8fafc !important; }
body.theme-dark .radar-lbl { fill: #cbd5e1 !important; }
body.theme-dark .radar-lbl.is-main { fill: #fca5a5 !important; }

body.theme-dark select,
body.theme-dark input[type="text"],
body.theme-dark .name-input {
  background: #121822 !important;
  color: #f8fafc !important;
  border-color: #36475f !important;
}
body.theme-dark input::placeholder {
  color: #7c8da4 !important;
}
body.theme-dark .gh-scroll-ribbon {
  background: rgba(20, 26, 36, 0.88) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #fde68a !important;
}
body.theme-dark .gh-scroll-ribbon span {
  color: #fde68a !important;
}
body.theme-dark .gh-achieve-art {
  color: #f8fafc !important;
}
body.theme-dark .gh-achieve-art > div:not(.gh-scroll-ribbon):not(.pity-bar):not(.gh-tree-stage) {
  color: #1e1810 !important;
  background: rgba(255, 250, 238, 0.86);
  border-radius: 8px;
  padding: 4px 8px !important;
}
body.theme-dark .duel-summary-box,
body.theme-dark .duel-summary-box b {
  color: #f8fafc !important;
}
body.theme-dark .duel-summary-box.lose {
  background: #29181b !important;
  border-color: #ef4444 !important;
}
body.theme-dark .duel-out-badge.win  { background: rgba(245,158,11,0.28); color: #fde68a; }
body.theme-dark .duel-out-badge.lose { background: rgba(239,68,68,0.28); color: #fecaca; }
body.theme-dark .duel-out-badge.draw { background: #334155; color: #e2e8f0; }
body.theme-dark .attend-cell.today { background: #2d2310 !important; border-color: #f59e0b !important; color: #fde68a !important; }
body.theme-dark .attend-cell.done  { background: #142a22 !important; border-color: #22c55e !important; color: #86efac !important; }
body.theme-dark .sheet-kicker.train  { background: rgba(245,158,11,0.22); color: #fde68a; }
body.theme-dark .sheet-kicker.chance { background: rgba(34,197,94,0.22); color: #86efac; }
body.theme-dark .sheet-kicker.danger,
body.theme-dark .sheet-kicker.seal   { background: rgba(239,68,68,0.24); color: #fca5a5; }
body.theme-dark .sheet-kicker.offer,
body.theme-dark .sheet-kicker.summary{ background: rgba(56,189,248,0.22); color: #7dd3fc; }


/* === v7.4: 겨울 베타 시즌 타이틀 눈발 · 베타 시즌 배지 · 로고 그리드 대도감 === */
.title-screen.winter-season {
  background-color: #162231;
}
.title-top-season {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) 14px 0;
  margin-bottom: auto;
}
.title-season-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 29, 48, 0.82), rgba(30, 58, 92, 0.78));
  border: 1.5px solid rgba(186, 230, 253, 0.7);
  color: #f0f9ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}
.title-snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.title-snow span {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(224, 242, 254, 0.8) 65%, transparent 100%);
  opacity: 0;
  animation: titleSnowFall 6.2s linear infinite;
}
.title-snow span:nth-child(1)  { left: 6%;  width: 5px; height: 5px; animation-duration: 5.8s; animation-delay: 0s; }
.title-snow span:nth-child(2)  { left: 14%; width: 7px; height: 7px; animation-duration: 7.4s; animation-delay: 1.2s; }
.title-snow span:nth-child(3)  { left: 22%; width: 4px; height: 4px; animation-duration: 5.1s; animation-delay: 2.5s; }
.title-snow span:nth-child(4)  { left: 31%; width: 6px; height: 6px; animation-duration: 6.8s; animation-delay: 0.7s; }
.title-snow span:nth-child(5)  { left: 40%; width: 8px; height: 8px; animation-duration: 7.9s; animation-delay: 3.1s; }
.title-snow span:nth-child(6)  { left: 48%; width: 5px; height: 5px; animation-duration: 5.5s; animation-delay: 1.8s; }
.title-snow span:nth-child(7)  { left: 56%; width: 7px; height: 7px; animation-duration: 6.4s; animation-delay: 4.0s; }
.title-snow span:nth-child(8)  { left: 64%; width: 4px; height: 4px; animation-duration: 5.2s; animation-delay: 0.4s; }
.title-snow span:nth-child(9)  { left: 72%; width: 6px; height: 6px; animation-duration: 7.1s; animation-delay: 2.1s; }
.title-snow span:nth-child(10) { left: 80%; width: 8px; height: 8px; animation-duration: 8.2s; animation-delay: 3.6s; }
.title-snow span:nth-child(11) { left: 88%; width: 5px; height: 5px; animation-duration: 5.9s; animation-delay: 1.4s; }
.title-snow span:nth-child(12) { left: 94%; width: 6px; height: 6px; animation-duration: 6.7s; animation-delay: 2.9s; }
.title-snow span:nth-child(13) { left: 27%; width: 5px; height: 5px; animation-duration: 6.0s; animation-delay: 4.5s; }
.title-snow span:nth-child(14) { left: 68%; width: 5px; height: 5px; animation-duration: 5.6s; animation-delay: 5.0s; }
@keyframes titleSnowFall {
  0%   { transform: translate3d(0, -10px, 0); opacity: 0; }
  12%  { opacity: 0.92; }
  85%  { opacity: 0.78; }
  100% { transform: translate3d(26px, 102vh, 0); opacity: 0; }
}

.codex-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.codex-logo-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 4px 8px;
  border-radius: 13px;
  border: 1.5px solid var(--border, #e2d9c5);
  background: var(--bg-card, #ffffff);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.codex-logo-tile:active { transform: scale(0.95); }
.codex-logo-tile.is-mine {
  border-color: #d99b1e;
  background: linear-gradient(180deg, #fffdf5, #fef4d6);
}
.codex-mine-tag {
  position: absolute;
  top: -6px;
  right: 4px;
  background: #d97706;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
}
.codex-tile-nm {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.codex-detail-box { padding: 2px 0 4px; }
.codex-cos-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.codex-cos-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 7px 4px;
  border-radius: 11px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}
.codex-cos-chip img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #141923;
  padding: 2px;
}
body.theme-dark .codex-logo-tile {
  background: #1c2635 !important;
  border-color: #2f3e54 !important;
  color: #f1f5f9 !important;
}
body.theme-dark .codex-logo-tile.is-mine {
  background: linear-gradient(180deg, #2d2312, #20190c) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
}
body.theme-dark .codex-cos-chip {
  background: #151e2b !important;
  border-color: #2d3d54 !important;
}


/* === v7.5: 업데이트 바 확대(토스트 크기) + 수묵/진영전/패스 고퀄 배경 + 오라 프리뷰 + 시상대 무잘림 + 등선도 범례 === */
#update-banner-root {
  width: min(92vw, 410px) !important;
  top: calc(64px + env(safe-area-inset-top, 0px)) !important;
}
.update-bar {
  width: 100% !important;
  background: linear-gradient(135deg, #211c14, #14171c) !important;
  border: 1.5px solid var(--gold, #e4a626) !important;
  border-radius: 14px !important;
  padding: 11px 14px !important;
  gap: 10px !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36) !important;
}
.update-bar-title {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #ffd866 !important;
  line-height: 1.35 !important;
}
.update-restart-btn {
  font-size: 12.5px !important;
  font-weight: 900 !important;
  padding: 7px 14px !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 10px rgba(243, 193, 70, 0.35);
}

.hero-card-sumie {
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(232, 186, 84, 0.45);
}
.banner-art-bg {
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 8px 20px rgba(15, 20, 30, 0.28) !important;
}

.pass-gilded-header {
  border-radius: 15px;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  background-color: #1c130b;
  background-size: cover;
  background-position: center;
  border: 1.5px solid #d49b2a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 0 16px rgba(212, 155, 42, 0.22);
}
.pass-hdr-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff8e1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}
.pass-hdr-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #e9d5a8;
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* 명예전당 시상대 & 아바타 컨테이너 overflow:visible (무기·투구·오라 0px 잘림!) */
.podium-col,
.podium-av,
.hero-char,
.bio-av-halo {
  overflow: visible !important;
}
.podium-av {
  margin-top: -6px;
  margin-bottom: -4px;
}
.podium-crown {
  position: relative;
  z-index: 3;
  margin-bottom: 0;
}

.aura-preview-frame {
  overflow: visible !important;
  background: radial-gradient(circle at 50% 52%, rgba(251, 191, 36, 0.14) 0%, rgba(10, 14, 22, 0.72) 72%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.42) !important;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.realm-legend-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.realm-legend-bar span { display: inline-flex; align-items: center; gap: 4px; }
.rl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.rl-dot.done { background: #f59e0b; box-shadow: 0 0 5px #f59e0b; }
.rl-dot.next { background: #1e293b; border: 1.5px solid #d49b2a; }
.rl-dot.lock { background: #64748b; opacity: 0.48; }

.gh-ascension-art .gh-tree-node.locked {
  opacity: 0.56 !important;
  background: rgba(16, 22, 32, 0.72) !important;
}
.gh-ascension-art .gh-tree-node.avail {
  opacity: 1 !important;
  background: rgba(20, 29, 44, 0.92) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.34);
}


/* === v7.6: 명예전당 전용 동양화 배경 · 1/2/3위 왕관 훈장 · 금/은/동 조각 석재 시상대 발판 === */
.podium-art-stage {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(232, 186, 84, 0.62);
  padding: 16px 10px 8px !important;
  box-shadow: 0 12px 30px rgba(10, 14, 22, 0.38), inset 0 0 24px rgba(0, 0, 0, 0.35);
}
.podium-crown {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 40px;
  margin-bottom: -6px;
}
.podium-crown-img {
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65));
}
.podium-crown-img.r1 {
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.72)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}
.podium-nm {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
}
.podium-sub {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
  margin-bottom: 4px !important;
}
.podium-pedestal-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.podium-pedestal-wrap.r1 { height: 104px; }
.podium-pedestal-wrap.r2 { height: 86px; }
.podium-pedestal-wrap.r3 { height: 74px; }

.podium-pedestal-img {
  width: 100%;
  max-width: 112px;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.65));
}
.podium-plaque {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 84%;
  max-width: 96px;
  padding: 4px 5px;
  border-radius: 9px;
  text-align: center;
  background: rgba(12, 16, 24, 0.84);
  border: 1px solid rgba(251, 191, 36, 0.62);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.podium-plaque.r1 {
  bottom: 14px;
  border-color: #fbbf24;
  background: linear-gradient(180deg, rgba(46, 32, 10, 0.90), rgba(16, 12, 8, 0.92));
}
.podium-plaque.r2 {
  bottom: 11px;
  border-color: #cbd5e1;
}
.podium-plaque.r3 {
  bottom: 8px;
  border-color: #d97706;
}
.podium-plaque .podium-rank-num {
  font-size: 13px;
  font-weight: 900;
  color: #fde68a;
  line-height: 1.15;
}
.podium-plaque.r2 .podium-rank-num { color: #f1f5f9; }
.podium-plaque.r3 .podium-rank-num { color: #fdba74; }
.podium-plaque .podium-score {
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 1px;
}


/* === v7.7: 도감·시즌패스 전체 화면 배경 감싸기 + 캐릭터 정중앙 정렬 === */
.full-art-sheet {
  background-color: #130e09 !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  color: #f8f2e4 !important;
  border-top: 2px solid #d49b2a !important;
  box-shadow: 0 -14px 38px rgba(0, 0, 0, 0.55), inset 0 0 28px rgba(212, 155, 42, 0.14) !important;
}
.full-art-sheet .sheet-handle {
  background: rgba(251, 191, 36, 0.65) !important;
}
.full-art-sheet .muted {
  color: #d6cbb5 !important;
}
.full-art-sheet .cos-tabs {
  background: rgba(14, 10, 7, 0.72) !important;
  border: 1px solid rgba(212, 155, 42, 0.42);
}
.full-art-sheet .cos-tab {
  color: #d8ccb4 !important;
}
.full-art-sheet .cos-tab.active {
  background: linear-gradient(135deg, #d99b1e, #9a6008) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(217, 155, 30, 0.35);
}

/* 『강호만물록』 전체 배경 위 로고 타일 & 상세 카드 */
.codex-hero-head {
  text-align: center;
  padding: 6px 8px 12px;
  margin-bottom: 6px;
}
.codex-full-sheet .codex-logo-tile {
  background: rgba(18, 14, 10, 0.74) !important;
  border: 1.5px solid rgba(212, 155, 42, 0.48) !important;
  color: #fff8e6 !important;
  backdrop-filter: blur(4px);
}
.codex-full-sheet .codex-logo-tile.is-mine {
  background: linear-gradient(180deg, rgba(84, 56, 12, 0.86), rgba(36, 24, 8, 0.90)) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}
.codex-full-sheet .codex-card {
  background: rgba(16, 12, 9, 0.82) !important;
  border: 1.5px solid rgba(212, 155, 42, 0.46) !important;
  color: #f8f2e4 !important;
  backdrop-filter: blur(4px);
}
.codex-full-sheet .codex-detail-box > div,
.codex-full-sheet .txt-body-sub,
.codex-full-sheet b {
  color: #fff6dc;
}
.codex-full-sheet .codex-card [style*="background:var(--bg-soft)"] {
  background: rgba(34, 26, 18, 0.78) !important;
  border: 1px solid rgba(212, 155, 42, 0.25);
}
.codex-full-sheet .codex-cos-chip {
  background: rgba(24, 18, 13, 0.85) !important;
  border-color: rgba(212, 155, 42, 0.42) !important;
  color: #fef3c7 !important;
}
.codex-full-sheet .btn-outline {
  background: rgba(18, 14, 10, 0.76) !important;
  color: #fde68a !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
}
.codex-full-sheet .help-box {
  background: rgba(20, 15, 10, 0.78) !important;
  border-color: rgba(212, 155, 42, 0.48) !important;
  color: #f3ead6 !important;
}

/* 시즌 패스 전체 배경 위 Lv.1~Lv.10 유리·금박 행 */
.pass-hero-head {
  padding: 6px 4px 12px;
  margin-bottom: 8px;
}
.pass-full-sheet .pass-track-head {
  background: rgba(14, 10, 7, 0.74);
  border: 1px solid rgba(212, 155, 42, 0.42);
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 8px;
  color: #f8f2e4 !important;
}
.pass-full-sheet .pass-lv-badge {
  background: rgba(18, 13, 9, 0.86) !important;
  border: 1.5px solid rgba(212, 155, 42, 0.52) !important;
  color: #e2d5bc !important;
}
.pass-full-sheet .pass-lv-badge.on {
  background: linear-gradient(180deg, #b45309, #78350f) !important;
  border-color: #fde047 !important;
  color: #ffffff !important;
}
.pass-full-sheet .pass-cell {
  background: rgba(20, 15, 11, 0.82) !important;
  border: 1.5px solid rgba(212, 155, 42, 0.40) !important;
  color: #f8f2e4 !important;
  backdrop-filter: blur(4px);
}
.pass-full-sheet .pass-cell.ready {
  background: linear-gradient(145deg, rgba(96, 66, 16, 0.90), rgba(44, 28, 8, 0.92)) !important;
  border-color: #fbbf24 !important;
  color: #fffbeb !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}
.pass-full-sheet .pass-cell.done {
  background: rgba(18, 44, 30, 0.76) !important;
  border-color: rgba(74, 222, 128, 0.55) !important;
  color: #dcfce7 !important;
}
.pass-full-sheet .pass-cell-lbl { color: #fff8e6 !important; }
.pass-full-sheet .pass-cell-st  { color: #fde68a !important; }
.pass-full-sheet .pass-cell.done .pass-cell-st { color: #86efac !important; }
.pass-full-sheet .btn-ink {
  background: rgba(24, 18, 12, 0.88) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.65) !important;
  color: #fde68a !important;
}

/* 캐릭터 중앙 정밀 정렬 보장 */
.hero-char,
.bio-av-halo,
.preview-av-frame,
#customizePreviewFrame {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hero-char img,
.bio-av-halo img,
.preview-av-frame img {
  margin: 0 auto;
}


/* === v7.8: 전 화면 단색 카드/패널/배너 완전 제거 (전용 동양화 배경 5종 + 수묵/전장/패스 일괄 매핑) + 정면 대칭 시상대 === */

/* 1. 모든 캐릭터 헤더 카드 (.hero-card, .preview-box, .create-preview-clean) -> 월광 수묵 산수화 */
.hero-card,
.preview-box,
.create-preview-clean {
  background-color: #141922 !important;
  background-image: linear-gradient(90deg, rgba(13, 18, 26, 0.88) 0%, rgba(13, 18, 26, 0.56) 48%, rgba(13, 18, 26, 0.14) 100%), url('../assets/bg_hero_sumie.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(232, 186, 84, 0.45);
}
.preview-box.create-preview-clean {
  background-image: linear-gradient(90deg, rgba(13, 18, 26, 0.42) 0%, rgba(13, 18, 26, 0.84) 100%), url('../assets/bg_hero_sumie.jpg?v=1.3.13') !important;
}

/* 2. 일대기 & 명예전당 전설 상세 헤더 (.bio-scroll-hero, .bio-hero) -> 금빛 운룡 두루마리 배경 */
.bio-scroll-hero,
.bio-hero {
  background-color: #14161e !important;
  background-image: linear-gradient(180deg, rgba(12, 14, 22, 0.46) 0%, rgba(12, 14, 22, 0.62) 65%, rgba(10, 12, 18, 0.78) 100%), url('../assets/bg_bio_scroll.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* 3. 화광철소 병기 제련 (.forge-card) -> 용광로 대장간 배경 */
.forge-card {
  background-color: #1c120d !important;
  background-image: linear-gradient(90deg, rgba(22, 13, 9, 0.78) 0%, rgba(22, 13, 9, 0.56) 55%, rgba(22, 13, 9, 0.42) 100%), url('../assets/bg_forge.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(249, 115, 22, 0.55) !important;
}

/* 4. 강호 암시장 (.bm-card) -> 야간 홍등 암시장 골목 배경 */
.bm-card {
  background-color: #12141e !important;
  background-image: linear-gradient(180deg, rgba(11, 14, 22, 0.62) 0%, rgba(11, 14, 22, 0.76) 55%, rgba(10, 12, 20, 0.86) 100%), url('../assets/bg_blackmarket.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(212, 155, 42, 0.48) !important;
}
.bm-card .bm-item {
  background: rgba(14, 18, 28, 0.72) !important;
  border: 1px solid rgba(251, 191, 36, 0.22);
  backdrop-filter: blur(3px);
}

/* 5. 집중 수련 · 문파 시너지 · 본산 파견 · 직위 · 병기 스펙 · OVR 차트 등 다크 카드 -> 야간 대나무 수련장 배경 */
.confirm-box-clean,
.action-preview,
.style-banner,
.wep-spec-card,
.hq-home-banner,
.hq-mentor-box,
.ovr-chart-card,
.resume-banner,
.beta-banner,
.art-dark-dojo {
  background-color: #121a20 !important;
  background-image: linear-gradient(90deg, rgba(12, 18, 24, 0.84) 0%, rgba(12, 18, 24, 0.66) 58%, rgba(12, 18, 24, 0.34) 100%), url('../assets/bg_training_scroll.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  border: 1px solid rgba(232, 186, 84, 0.42);
}

/* 6. 주간 진영전 헤더 · 생사결 · 전장 로그 다크 카드 -> 협곡 군기 전장 배경 */
.war-hero-box,
.death-sheet-box,
.dtm-box,
.log-box {
  background-color: #141722 !important;
  background-image: linear-gradient(180deg, rgba(14, 16, 26, 0.72) 0%, rgba(14, 16, 26, 0.84) 100%), url('../assets/bg_banner_war.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* 7. 패키지 · 황금 패스 CTA · 점수 카드 -> 황금 전각 패스 배경 */
.iap-card,
.pass-prem-cta,
.score-box,
.art-dark-pass {
  background-color: #1a130c !important;
  background-image: linear-gradient(90deg, rgba(20, 14, 9, 0.84) 0%, rgba(20, 14, 9, 0.62) 60%, rgba(20, 14, 9, 0.34) 100%), url('../assets/bg_banner_pass.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
}

/* 8. 모든 일반 밝은 카드 & 모달 시트 (라이트 모드) -> 은은한 한지 수묵 대나무 텍스처 (단색 0% + 가독성 100%) */
.card:not(.hero-card):not(.art-dark-dojo):not(.art-dark-pass):not(.forge-card):not(.bm-card):not(.home-qtile),
.event-sheet:not(.full-art-sheet),
.modal-sheet:not(.full-art-sheet),
.pot-evo-card,
.manual-shelf-card {
  background-color: #fcf9f0;
  background-image: linear-gradient(180deg, rgba(255, 253, 247, 0.72) 0%, rgba(252, 248, 237, 0.66) 100%), url('../assets/bg_hanji_card.jpg?v=1.3.13');
  background-size: cover;
  background-position: bottom right;
  background-repeat: no-repeat;
}
.home-qtile,
.home-stat-btn {
  background-color: #fdfbf4;
  background-image: linear-gradient(180deg, rgba(255, 254, 250, 0.80) 0%, rgba(249, 243, 228, 0.78) 100%), url('../assets/bg_hanji_card.jpg?v=1.3.13');
  background-size: cover;
  background-position: center;
}
body:not(.theme-dark) {
  background: radial-gradient(circle at 50% 0%, #f7f2e6 0%, #ebe3d0 100%);
}
body.theme-dark .card:not(.hero-card):not(.art-dark-dojo):not(.art-dark-pass):not(.forge-card):not(.bm-card):not(.home-qtile),
body.theme-dark .event-sheet:not(.full-art-sheet),
body.theme-dark .modal-sheet:not(.full-art-sheet),
body.theme-dark .home-qtile,
body.theme-dark .home-stat-btn {
  background-color: #171f2a !important;
  background-image: linear-gradient(155deg, rgba(25, 34, 48, 0.96) 0%, rgba(16, 22, 32, 0.98) 100%), url('../assets/bg_bio_scroll.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-blend-mode: overlay;
}

/* 9. 명예의 전당 정면 대칭형 석재 시상대 (수평 윗면 + 반듯한 3단 높이 위계!) */
.podium-grid {
  gap: 6px !important;
  align-items: end !important;
}
.podium-pedestal-wrap {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 2px;
}
.podium-pedestal-wrap.r1 { height: 112px !important; }
.podium-pedestal-wrap.r2 { height: 90px !important; }
.podium-pedestal-wrap.r3 { height: 74px !important; }
.podium-pedestal-img {
  width: 96% !important;
  max-width: 116px !important;
  height: 100% !important;
  object-fit: fill !important;
  border-radius: 4px 4px 2px 2px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.68));
}
.podium-plaque {
  bottom: 12px !important;
  width: 82% !important;
  max-width: 96px !important;
  background: rgba(10, 14, 22, 0.86) !important;
}
.podium-plaque.r1 { bottom: 18px !important; }
.podium-plaque.r2 { bottom: 13px !important; }
.podium-plaque.r3 { bottom: 9px !important; }


/* === v7.8.1: 갤럭시·와이드 안드로이드 비율 깨짐 & 타이틀 좌우 잘림 완벽 방어 === */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 세로 모바일 터치 기기(갤럭시 울트라·폴드·고DPI 안드로이드)에서 양옆 검은 여백 없이 가로 꽉 채움 */
@media (orientation: portrait) and (pointer: coarse) and (max-width: 720px) {
  #app,
  .tabs,
  .modal-sheet,
  .event-sheet,
  .title-screen {
    max-width: 100% !important;
    width: 100% !important;
  }
  #toast-root,
  #update-banner-root {
    width: min(94vw, 640px) !important;
  }
}

/* 타이틀 화면 비율 보호: 세로로 긴 20:9 갤럭시·좁은 뷰포트에서도 [강호일대기] 로고 좌우 잘림 0%! */
.title-screen,
.title-screen.winter-season {
  background-color: #d5dcec !important;
  background-image: url('../assets/title_bg.jpg?v=1.3.13') !important;
  background-size: 100% auto !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}
@media (min-aspect-ratio: 9/16) {
  .title-screen,
  .title-screen.winter-season {
    background-size: cover !important;
    background-position: center 18% !important;
  }
}


/* === v7.9: 타이틀 언어 선택 바 · 최초 실행 4개국어 선택 팝업 · 설정 언어 그리드 === */
.title-top-season {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.title-lang-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px;
  border-radius: 999px;
  background: rgba(15, 22, 34, 0.78);
  border: 1.2px solid rgba(232, 186, 84, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}
.title-lang-btn {
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.title-lang-btn.active {
  background: linear-gradient(135deg, #f3c146, #d48c14);
  color: #161108;
  font-weight: 900;
}

/* 최초 실행 4개국어 선택 오버레이 */
.lang-first-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lang-first-backdrop.hidden {
  display: none !important;
}
.lang-first-card {
  width: 100%;
  max-width: 344px;
  border-radius: 20px;
  padding: 20px 16px 16px;
  background: linear-gradient(160deg, #1b1713 0%, #12151d 100%);
  border: 1.8px solid #d9a032;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58), inset 0 0 22px rgba(217, 160, 50, 0.14);
  text-align: center;
  color: #f8f2e4;
}
.lang-first-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #f6d584;
}
.lang-first-title {
  margin: 6px 0 3px;
  font-size: 18px;
  font-weight: 900;
  color: #fff9e6;
}
.lang-first-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 14px;
}
.lang-first-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lang-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 13px 8px;
  border-radius: 14px;
  border: 1.5px solid rgba(217, 160, 50, 0.45);
  background: rgba(255, 250, 236, 0.07);
  color: #fff8e6;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}
.lang-pick-btn:active { transform: scale(0.96); }
.lang-pick-btn.active,
.lang-pick-btn:hover {
  border-color: #fbbf24;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.28), rgba(180, 83, 9, 0.22));
}
.lp-flag { font-size: 22px; line-height: 1; }
.lang-pick-btn b { font-size: 14px; font-weight: 900; }
.lang-pick-btn span:last-child { font-size: 11px; color: #e2d5bc; font-weight: 700; }
.lang-first-note {
  margin-top: 12px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.4;
}

/* 설정 모달 4개국어 선택 버튼 그리드 */
.setting-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.setting-lang-grid .chip {
  justify-content: center;
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 800;
}
body[data-lang="zh"] {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
body[data-lang="ja"] {
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', sans-serif;
}
body[data-lang="en"] {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* v7.9.1 영문/중문/일문 상단 브랜드 폭 최적화 */
body[data-lang="en"] .brand-name {
  font-size: 15.5px;
  letter-spacing: -0.03em;
}


/* === v7.9.2: 가볍고 세련된 비취 옥패 브랜드 마크 (빨간 네모 낙인 완전 대체!) === */
.jade-pendant-mark {
  position: relative;
  width: 34px;
  height: 44px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: -5px -2px -5px -2px;
  filter: drop-shadow(0 2px 4px rgba(14, 72, 52, 0.28));
}
.jade-mark-txt {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  color: #fff8db;
  letter-spacing: -0.05em;
  text-shadow: 0 1px 2px rgba(8, 52, 38, 0.92), 0 0 4px rgba(8, 52, 38, 0.65);
  transform: translateY(1px);
  user-select: none;
}
body[data-lang="en"] .jade-mark-txt {
  font-size: 9px;
  letter-spacing: 0.02em;
}


/* === v8.0: 4개국어 타이틀 배경 실시간 전환 + 고퀄 무림 옥패 + 천명 소환(가챠) 세로 UI === */
body[data-lang="zh"] .title-screen,
body[data-lang="zh"] .title-screen.winter-season {
  background-image: url('../assets/title_bg_zh.jpg?v=1.3.13') !important;
}
body[data-lang="ja"] .title-screen,
body[data-lang="ja"] .title-screen.winter-season {
  background-image: url('../assets/title_bg_ja.jpg?v=1.3.13') !important;
}
body[data-lang="en"] .title-screen,
body[data-lang="en"] .title-screen.winter-season {
  background-image: url('../assets/title_bg_en.jpg?v=1.3.13') !important;
}

.jade-pendant-mark {
  width: 24px !important;
  height: 46px !important;
  margin: -6px 0 -6px -2px !important;
  filter: drop-shadow(0 2px 5px rgba(10, 58, 56, 0.36)) !important;
}

/* 풀스크린 60fps 천명 소환 액션 씬 */
.gacha-anim-stage {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - 118px);
  background: #070b14;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
#gachaAnimCanvas {
  width: 100%;
  height: auto;
  display: block;
}
.gacha-skip-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.65);
  background: rgba(10, 14, 24, 0.78);
  color: #fef08a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* 천명 소환 메인 세로 쉘 */
.gacha-shell {
  border-radius: 18px;
  padding: 10px 10px 14px;
  background-color: #0b1120;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(218, 165, 52, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  color: #f8fafc;
}
.gacha-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 155, 42, 0.35);
  margin-bottom: 8px;
}
.gacha-back-btn {
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid rgba(212, 155, 42, 0.55);
  background: rgba(15, 23, 42, 0.85);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.gacha-res-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.g-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.g-pill.cyan { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.45); }
.g-pill.gold { color: #fde68a; border-color: rgba(251, 191, 36, 0.5); }
.g-pill.amber { color: #fef08a; border-color: rgba(245, 158, 11, 0.55); }

.gacha-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.gacha-head-title {
  font-size: 16px;
  font-weight: 900;
  color: #fef3c7;
}
.gacha-head-sub {
  font-size: 11px;
  color: #94a3b8;
}
.gacha-pity-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(120, 53, 15, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fef08a;
  flex-shrink: 0;
}
.gacha-pity-pill.ready {
  background: linear-gradient(135deg, #9333ea, #db2777);
  border-color: #fde047;
  color: #fff;
  animation: titleBtnPulse 1.6s ease-in-out infinite;
}

/* 좌측 배너 + 우측 5개 세로 풀 탭 */
.gacha-main-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 7px;
  margin-bottom: 9px;
}
.gacha-banner-card {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 20, 32, 0.92);
  border: 1.5px solid rgba(218, 165, 52, 0.65);
  display: flex;
  flex-direction: column;
}
.gacha-banner-art {
  min-height: 186px;
  padding: 9px;
  background-size: cover;
  background-position: center top;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.g-tag-hot {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(185, 28, 28, 0.9);
  border: 1px solid rgba(253, 224, 71, 0.65);
  color: #fef9c3;
}
.g-tag-odds {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e2e8f0;
  cursor: pointer;
  font-family: inherit;
}
.gb-title {
  font-family: 'Gowun Batang', serif;
  font-size: 18px;
  font-weight: 900;
  color: #fef3c7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.gb-sub {
  font-size: 11px;
  color: #e2e8f0;
  margin-top: 2px;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.gacha-wep-picker {
  padding: 8px;
  border-top: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(10, 15, 26, 0.78);
}
.gacha-wep-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.g-wep-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.72);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.g-wep-chip.active {
  border-color: #fbbf24;
  background: rgba(180, 83, 9, 0.55);
  color: #fef08a;
}
.gacha-info-box {
  padding: 7px 9px;
  font-size: 10.5px;
  line-height: 1.5;
  color: #cbd5e1;
  background: rgba(10, 15, 26, 0.72);
  border-top: 1px solid rgba(212, 155, 42, 0.22);
}
.gacha-info-box b { color: #fde68a; }

.gacha-reroll-shop {
  padding: 8px 9px;
  background: rgba(24, 18, 12, 0.88);
  border-top: 1px solid rgba(212, 155, 42, 0.3);
}
.g-rr-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.g-rr-step {
  text-align: center;
  padding: 3px 2px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.72);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
}
.g-rr-step.next {
  background: rgba(180, 83, 9, 0.65);
  color: #fef08a;
  border-color: #fbbf24;
}
.g-rr-step.done {
  text-decoration: line-through;
  opacity: 0.45;
}

/* 우측 5개 세로 탭 */
.gacha-pool-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gacha-pool-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  border: 1px solid rgba(100, 116, 139, 0.5);
  background: rgba(15, 23, 42, 0.84);
  color: #e2e8f0;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
}
.gacha-pool-tab.active {
  border: 1.5px solid #fbbf24;
  background: linear-gradient(155deg, rgba(120, 53, 15, 0.9), rgba(66, 32, 6, 0.92));
  color: #fef08a;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.28);
}
.gacha-pool-tab b { font-size: 11px; font-weight: 900; line-height: 1.15; }
.gacha-pool-tab span { font-size: 9px; color: #94a3b8; line-height: 1.1; }
.gacha-pool-tab.active span { color: #fde68a; }

/* 천장 30/30 자동 출현 확정 소환 배너 */
.gacha-pity-auto-btn {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, #7e22ce 0%, #be185d 55%, #b45309 100%);
  color: #fffbeb;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(190, 24, 93, 0.45);
}

/* 하단 소환 버튼 */
.gacha-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 7px;
}
.g-sum-btn {
  width: 100%;
  padding: 10px 8px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
}
.g-sum-btn.normal {
  background: linear-gradient(155deg, #1d4ed8, #1e3a8a);
  border: 1.5px solid #7dd3fc;
}
.g-sum-btn.premium {
  background: linear-gradient(155deg, #b45309, #78350f);
  border: 1.5px solid #fde047;
}
.g-sum-btn.ad-wide {
  background: linear-gradient(155deg, #047857, #064e3b);
  border: 1.5px solid #6ee7b7;
  margin-bottom: 9px;
  padding: 9px 10px;
}
.g-sum-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gs-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 900;
}
.gs-sub {
  font-size: 10.5px;
  color: #e2e8f0;
  margin-top: 3px;
}
.gs-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 10px;
  color: #a7f3d0;
}

.gacha-foot-row {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 7px;
}
.gacha-codex-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(212, 155, 42, 0.65);
  background: rgba(15, 23, 42, 0.9);
  color: #fef08a;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.gacha-codex-btn b { display: block; font-size: 12px; font-weight: 900; }
.gacha-codex-btn span { display: block; font-size: 10px; color: #cbd5e1; }
.gacha-rule-note {
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(71, 85, 105, 0.55);
  font-size: 10px;
  line-height: 1.45;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 결과 카드 & 히든 금룡 프레임 & 킵 비교 */
.gacha-keep-compare {
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.45);
  margin-bottom: 8px;
}
.gacha-keep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.gacha-keep-slot {
  padding: 7px;
  border-radius: 10px;
  border: 1.5px solid rgba(100, 116, 139, 0.5);
  background: rgba(30, 41, 59, 0.68);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.gacha-keep-slot.active {
  border-color: #fde047;
  background: rgba(120, 53, 15, 0.55);
}
.gacha-res-card {
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(18, 25, 40, 0.95), rgba(11, 15, 26, 0.96));
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  margin-bottom: 10px;
}
.gacha-res-card.gold-b { border-color: #fbbf24; box-shadow: 0 0 20px rgba(251, 191, 36, 0.25); }
.gacha-res-card.hidden-b { border-color: #f43f5e; box-shadow: 0 0 24px rgba(244, 63, 94, 0.35); }
.gacha-res-card.mythic {
  border: 2px solid #fde047;
  background: linear-gradient(155deg, rgba(66, 16, 36, 0.95), rgba(24, 16, 10, 0.96));
  box-shadow: 0 0 28px rgba(253, 224, 71, 0.45);
}
.gacha-new-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.gacha-quote-bar {
  text-align: center;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef08a;
  font-family: 'Gowun Batang', serif;
  font-size: 13px;
  font-weight: 800;
}
.gacha-hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px 10px;
}
.gacha-hero-halo {
  position: absolute;
  top: 0;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  pointer-events: none;
}
.gacha-hero-title {
  font-family: 'Gowun Batang', serif;
  font-size: 19px;
  font-weight: 900;
  color: #fffbeb;
  margin-top: 6px;
}
.gacha-hero-sub {
  font-size: 12px;
  color: #fde68a;
  font-weight: 700;
  margin-top: 2px;
}
.gacha-hero-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-top: 6px;
  line-height: 1.45;
}
.gacha-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.g-kpi {
  text-align: center;
  padding: 6px 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.g-kpi span { display: block; font-size: 10px; color: #94a3b8; }
.g-kpi b { font-size: 12.5px; color: #fff; font-weight: 900; }
.gacha-mini-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.gms-cell {
  text-align: center;
  padding: 5px 2px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(100, 116, 139, 0.35);
}
.gms-cell.main { border-color: #fbbf24; background: rgba(180, 83, 9, 0.35); }
.gms-cell span { display: block; font-size: 9.5px; color: #cbd5e1; }
.gms-cell b { font-size: 12px; color: #fff; }

.gacha-res-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.g-act-main {
  width: 100%;
  padding: 13px 12px;
  font-size: 14.5px;
  font-weight: 900;
}
.gacha-reroll-box {
  padding: 9px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(212, 155, 42, 0.42);
}
.gacha-reroll-btns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 5px;
}
.g-rr-btn {
  padding: 7px 4px !important;
  font-size: 11px !important;
  color: #fff !important;
}
.gacha-reroll-done {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  font-size: 11px;
  color: #cbd5e1;
  text-align: center;
}
.gacha-cont-row {
  display: flex;
  gap: 6px;
}
.g-cont-btn {
  flex: 1;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  background: rgba(15, 23, 42, 0.75) !important;
  font-size: 12px !important;
}
.gacha-basic-box {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.gb-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  margin: 7px 0 4px;
}
.gb-swatches {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.gb-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.gb-dot.active {
  border-color: #fde047;
  transform: scale(1.16);
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.8);
}
.gcodex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.gcodex-card {
  padding: 9px;
  border-radius: 12px;
  background: rgba(15, 20, 32, 0.85);
  border: 1.5px solid rgba(100, 116, 139, 0.45);
}
.gcodex-card.locked { opacity: 0.65; }


/* === v9.0: 천명 소환 고도화 · 고서/수묵 한자 낙인 카드 · 문파 전략 허브 · 주간 무림 지도 레이드 === */
.gacha-skip-btn {
  padding: 7px 14px !important;
  font-size: 13px !important;
  z-index: 12 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.gacha-skip-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.72);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.gacha-skip-toggle {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.gacha-skip-toggle.on {
  border-color: #fbbf24;
  background: rgba(180, 83, 9, 0.7);
  color: #fef08a;
}
.gacha-kept-banner {
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.85), rgba(30, 41, 59, 0.92));
  border: 1.5px solid #fde047;
}
.gacha-banner-pity-hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 8px 0 6px;
}
.gbp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(8, 12, 22, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.42);
  font-size: 10.5px;
  color: #e2e8f0;
  backdrop-filter: blur(4px);
}
.gbp-item b { color: #fde047; font-weight: 900; }
.gbp-item.ready {
  background: rgba(180, 83, 9, 0.88);
  border-color: #fef08a;
  color: #fff;
}
.gacha-pity-auto-btn.s-tier {
  background: linear-gradient(135deg, #b45309 0%, #d97706 60%, #92400e 100%);
  box-shadow: 0 5px 18px rgba(217, 119, 6, 0.45);
}
.g-sum-btn.reroll-pull {
  background: linear-gradient(155deg, #4f46e5, #312e81);
  border: 1.5px solid #a5b4fc;
}

/* 깔끔한 단일 [이 무인 킵하고 소환하러 가기 (1회 한정)] 버튼 — 화이트/다크 모드 모두 선명! */
.g-keep-go-btn {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid #7dd3fc;
  background: linear-gradient(155deg, #1e3a5f 0%, #0f172a 100%);
  color: #f0f9ff !important;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(14, 116, 144, 0.32);
}
.gkg-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.55);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 800;
}
.gacha-disabled-btn {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(100, 116, 139, 0.45) !important;
}
.gacha-dark-input {
  background: rgba(15, 23, 42, 0.9) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
}
.g-mini-chip {
  padding: 4px 9px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0 !important;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.g-mini-chip.active {
  border-color: #fde047;
  background: linear-gradient(135deg, #b45309, #92400e);
  color: #fffbeb !important;
}

/* 고서/수묵 카드 & 한자 낙인 포인트 (B) */
.gacha-res-card.scroll-ink {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  box-shadow: inset 0 0 28px rgba(218, 165, 52, 0.14), 0 10px 28px rgba(0, 0, 0, 0.48);
}
.gacha-hanja-stamp {
  position: absolute;
  top: 42px;
  right: 12px;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 2px solid rgba(220, 38, 38, 0.62);
  background: rgba(153, 27, 27, 0.18);
  color: rgba(254, 202, 202, 0.78);
  font-family: 'Gowun Batang', serif;
  font-size: 30px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 1;
}
.gacha-trait-banner {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(251, 191, 36, 0.38);
  margin-bottom: 9px;
}
.gtb-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.gtb-seal {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid #ef4444;
  background: rgba(185, 28, 28, 0.32);
  color: #fecaca;
  font-family: 'Gowun Batang', serif;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gtb-wep {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 10.5px;
  color: #bae6fd;
  line-height: 1.4;
}
.hanja-seal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(185, 28, 28, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
  font-size: 10px;
  font-weight: 800;
}
.hanja-seal-chip b {
  font-family: 'Gowun Batang', serif;
  color: #fde047;
  font-size: 11px;
}

/* 내 문파 v9.0 전략 · 리그 · 상성표 · 무림 레이드 · 용병시장 · 영당 허브 */
.v9-sect-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 10px 10px;
  background: rgba(10, 14, 22, 0.92);
  border-top: 1px solid rgba(212, 155, 42, 0.32);
}
.v9-hub-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 11px;
  border: 1px solid rgba(212, 155, 42, 0.42);
  background: linear-gradient(155deg, rgba(28, 36, 52, 0.92), rgba(15, 20, 32, 0.95));
  color: #fef3c7;
  cursor: pointer;
  font-family: inherit;
}
.v9-hub-btn b { font-size: 11.5px; font-weight: 900; }
.v9-hub-btn span { font-size: 9.5px; color: #cbd5e1; }
.v9-hub-btn.alert {
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.42);
}
.v9-hub-btn.raid {
  border-color: rgba(244, 63, 94, 0.65);
  background: linear-gradient(155deg, rgba(88, 20, 36, 0.9), rgba(24, 15, 26, 0.95));
}
.v9-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.42);
}
.v9-member-row.selected {
  border-color: #fbbf24;
  background: rgba(120, 53, 15, 0.45);
}
.v9-match-row {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* 주간 무림 지도 인터랙티브 레이드 핀 (E) */
.murim-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background-color: #2c2418;
  background-size: cover;
  background-position: center;
  border: 2px solid #d49b2a;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.murim-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(253, 224, 71, 0.78);
  background: rgba(15, 23, 42, 0.88);
  color: #fef3c7;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}
.murim-map-pin.active {
  background: linear-gradient(135deg, #dc2626, #b45309);
  border-color: #ffffff;
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.14);
  z-index: 4;
}


/* === v9.1: 풀와이드 다중 소환(3/5/10연) · 카드 뒤집기 · 32종 영웅 도감 · 경맥도 · 두루마리 · 하단바 · 다크모드 전수 보정 === */
.hanja-kicker {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif !important;
  letter-spacing: 0.08em !important;
  font-weight: 900 !important;
}

/* 하단바 중앙 [비무장] 강조 */
.tabs .tab-btn.tab-center .tab-icon {
  background: radial-gradient(circle, rgba(218, 165, 52, 0.24) 0%, transparent 72%);
  border-radius: 50%;
  padding: 2px;
}
.tabs .tab-btn.tab-center.active .tab-label {
  color: var(--gold-dark);
  font-weight: 900;
}

/* ⬆️ 배너 위 통합 천장 헤더 바 (일러스트 얼굴 가림 0%!) */
.gacha-pity-top-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.gpt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.48);
  font-size: 11px;
  color: #e2e8f0;
}
.gpt-item b { color: #fde047; font-weight: 900; }
.gpt-item.ready {
  background: linear-gradient(135deg, #b45309, #92400e);
  border-color: #fef08a;
  color: #fff;
}

/* 🖼️ 가로 100% 풀와이드 메인 배너 */
.gacha-banner-card.full-wide {
  width: 100%;
  margin-bottom: 8px;
}
.gacha-banner-art.full-wide {
  min-height: 204px;
  padding: 10px 12px;
  background-size: cover;
  background-position: center 22%;
}

/* 🏯 소환 버튼 바로 위 6대 풀 3×2 풀와이드 그리드 */
.gacha-pool-grid-h {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.gacha-pool-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 11px;
  border: 1px solid rgba(100, 116, 139, 0.55);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.gacha-pool-pill.active {
  border: 1.5px solid #fbbf24;
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.92), rgba(66, 32, 6, 0.94));
  color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.28);
}
.gpp-txt { min-width: 0; flex: 1; }
.gpp-txt b { display: block; font-size: 11px; font-weight: 900; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gpp-txt span { display: block; font-size: 9.5px; color: #94a3b8; margin-top: 1px; }
.gacha-pool-pill.active .gpp-txt span { color: #fde68a; }

/* ⚔️ 풀와이드 병기 특화 8병기 선택 바 */
.gacha-wep-picker-wide {
  padding: 8px 9px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.45);
}
.gacha-wep-picker-wide .g-wep-chip b { font-size: 10.5px; color: #fff; }
.gacha-wep-picker-wide .g-wep-chip span { font-size: 9px; color: #94a3b8; }
.gacha-wep-picker-wide .g-wep-chip.active span { color: #fde047; }

/* 천명 특급 10회 버튼 + 리롤권 소환(+소형 구매) 콤보 */
.g-sum-btn.premium10 {
  background: linear-gradient(155deg, #9333ea 0%, #be185d 60%, #92400e 100%);
  border: 1.5px solid #fde047;
}
.g-reroll-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 6px;
  margin-bottom: 8px;
}
.g-rc-main { padding: 8px 10px !important; }
.g-rc-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 12px;
  border: 1.5px solid #fbbf24;
  background: linear-gradient(155deg, #d97706, #92400e);
  color: #fffbeb;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.g-rc-buy b { font-size: 11.5px; font-weight: 900; }
.g-rc-buy span { font-size: 10px; font-weight: 800; color: #fef08a; }
.g-rc-buy small { font-size: 9px; color: #fde68a; opacity: 0.85; }
.g-rc-buy.soldout {
  opacity: 0.5;
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
  cursor: not-allowed;
}

/* ✨ 다중 소환(3/5/10연) 카드 뒤집기 오픈 그리드 */
.gacha-multi-box {
  padding: 9px;
  border-radius: 14px;
  background: rgba(12, 18, 30, 0.92);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  margin-bottom: 9px;
}
.gacha-multi-grid {
  display: grid;
  gap: 5px;
}
.gacha-multi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gacha-multi-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

@keyframes cardRevealPop {
  0%   { transform: scale(0.75) rotateY(70deg); opacity: 0.35; }
  65%  { transform: scale(1.06) rotateY(-6deg); opacity: 1; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}
.g-flip-card {
  position: relative;
  border-radius: 10px;
  padding: 6px 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  min-height: 92px;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  background: rgba(20, 27, 42, 0.92);
  color: #fff;
  overflow: hidden;
}
.g-flip-card.sealed {
  background: linear-gradient(160deg, #1b2436 0%, #111827 100%);
}
.g-flip-card.sealed.tier-s,
.g-flip-card.sealed.tier-ss,
.g-flip-card.sealed.tier-hidden,
.g-flip-card.sealed.tier-mythic {
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.55);
}
.g-flip-card.sealed.tier-hidden,
.g-flip-card.sealed.tier-mythic {
  border-color: #f43f5e;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.72);
}
.gfc-seal-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 224, 71, 0.65);
  background: rgba(251, 191, 36, 0.14);
  color: #fef08a;
  font-family: 'Gowun Batang', serif;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gfc-tap { font-size: 10px; font-weight: 800; color: #fde68a; margin-top: 4px; }
.g-flip-card.opened { animation: cardRevealPop 0.34s ease-out; }
.g-flip-card.opened.tier-s { border-color: #fbbf24; background: linear-gradient(160deg, rgba(120, 53, 15, 0.55), rgba(15, 23, 42, 0.95)); }
.g-flip-card.opened.tier-ss { border-color: #f87171; background: linear-gradient(160deg, rgba(127, 29, 29, 0.58), rgba(15, 23, 42, 0.95)); }
.g-flip-card.opened.tier-hidden,
.g-flip-card.opened.tier-mythic { border-color: #fde047; background: linear-gradient(160deg, rgba(136, 19, 55, 0.72), rgba(28, 18, 10, 0.96)); box-shadow: 0 0 12px rgba(253, 224, 71, 0.45); }
.g-flip-card.opened.selected {
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 2px #fbbf24, 0 4px 14px rgba(251, 191, 36, 0.55) !important;
}
.gfc-grade {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 4px;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 900;
  color: #fff;
}
.gfc-new {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  font-size: 8.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gfc-av { margin-top: 10px; }
.gfc-nm { font-size: 9.5px; font-weight: 900; color: #fff; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.gfc-sub { font-size: 8.5px; color: #fde68a; }

/* 📖 32종 영웅 도감 초상화 & 필터 탭 */
.gcodex-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.gcodex-av-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 2px;
}
.gcodex-av-wrap.silhouette img {
  filter: brightness(0.08) contrast(1.4) drop-shadow(0 0 4px rgba(148, 163, 184, 0.35)) !important;
  opacity: 0.72;
}
.gcodex-card.is-hidden.unlocked {
  background: linear-gradient(155deg, rgba(66, 16, 36, 0.85), rgba(15, 20, 32, 0.92));
}

/* 3_1. 내공 심법 '운기조식(運氣調息) · 경맥 개통도' */
.meridian-card {
  position: relative;
  border-radius: 18px;
  padding: 16px 14px 14px;
  margin-bottom: 12px;
  background-color: #0d131e;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(232, 186, 84, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  color: #f8fafc;
}
.meridian-speech {
  margin: 10px 0 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.2px solid rgba(251, 191, 36, 0.65);
  color: #fffbeb;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ms-age {
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.meridian-stage {
  position: relative;
  height: 376px;
  margin-top: 8px;
}
.meridian-spine {
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.meridian-spine-fill {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(0deg, #f59e0b 0%, #fbbf24 35%, #f97316 65%, #ef4444 85%, #fef08a 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.85);
}
.meridian-gate {
  position: absolute;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.meridian-gate span {
  margin-top: -9px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.78);
  color: #64748b;
  font-size: 9.5px;
  font-weight: 800;
}
.meridian-gate.open { border-top-color: rgba(251, 191, 36, 0.36); }
.meridian-gate.open span { color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.4); }
.meridian-node {
  position: absolute;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  font-family: inherit;
  z-index: 3;
}
.meridian-node.left  { right: calc(50% - 7px); flex-direction: row-reverse; }
.meridian-node.right { left: calc(50% - 7px);  flex-direction: row; }
.mn-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: #fde047; border: 2px solid #0f172a;
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.85);
  flex-shrink: 0;
}
.meridian-node.crimson .mn-dot { background: #f43f5e; box-shadow: 0 0 10px rgba(244, 63, 94, 0.9); }
.meridian-node.active .mn-dot { transform: scale(1.32); background: #ffffff; border-color: #f59e0b; }
.mn-lbl {
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(10, 15, 26, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 152px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meridian-node.active .mn-lbl { background: rgba(146, 64, 14, 0.94); border-color: #fde047; color: #fffbeb; }

/* 3_2. 가로 펼침 고서 한지 '경지 돌파 두루마리' */
.scroll-ink-legend {
  display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px;
  font-size: 10.5px; font-weight: 800;
}
.sil-dot { padding: 2px 8px; border-radius: 999px; }
.sil-dot.light { background: #ebe5d6; color: #6b6154; border: 1px solid #d1c6b0; }
.sil-dot.deep  { background: #e2d8c2; color: #1c1915; border: 1px solid #8a7b62; }
.sil-dot.gold  { background: #261d12; color: #fde047; border: 1px solid #d99b26; }

.hanji-scroll-wrap {
  display: flex; align-items: stretch; border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 1.5px solid #a87b32;
}
.scroll-roller {
  width: 12px; flex-shrink: 0;
  background: linear-gradient(90deg, #3c2210 0%, #7a4b25 48%, #2a160a 100%);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}
.hanji-scroll-track {
  flex: 1; display: flex; gap: 10px; overflow-x: auto;
  padding: 20px 12px;
  background-color: #f6efe0;
  background-size: auto 100%;
  background-repeat: repeat-x;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.scroll-step-card {
  position: relative; flex: 0 0 156px; scroll-snap-align: start;
  border-radius: 10px; padding: 10px 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  box-shadow: 0 3px 10px rgba(48, 34, 16, 0.14);
}
.scroll-step-card.ink-light { background: rgba(255, 252, 245, 0.88); border: 1px solid rgba(154, 138, 112, 0.45); color: #5c5347 !important; }
.scroll-step-card.ink-deep  { background: rgba(252, 246, 232, 0.94); border: 1.5px solid rgba(64, 50, 34, 0.65); color: #161310 !important; font-weight: 800; }
.scroll-step-card.ink-gold  { background: linear-gradient(160deg, #211910 0%, #14100b 100%); border: 1.5px solid #e6ad34; color: #fef08a !important; font-weight: 900; box-shadow: 0 4px 14px rgba(180, 118, 18, 0.35); }
.scroll-age-pill {
  display: inline-block; align-self: flex-start; padding: 1px 8px; border-radius: 999px;
  font-family: 'Pretendard', sans-serif; font-size: 10.5px; font-weight: 900;
  background: rgba(120, 82, 32, 0.16); color: inherit;
}
.scroll-step-card.ink-gold .scroll-age-pill { background: rgba(251, 191, 36, 0.24); color: #fde047; }
.scroll-step-body { font-size: 12px; line-height: 1.48; word-break: keep-all; }
.scroll-red-seal {
  position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 4px;
  border: 1.8px solid #b91c1c; background: rgba(185, 28, 28, 0.12); color: #b91c1c;
  font-family: 'Gowun Batang', serif; font-size: 10px; font-weight: 900; line-height: 1.05;
  display: flex; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-7deg); box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.35);
}
.scroll-step-card.ink-gold .scroll-red-seal { border-color: #f87171; background: rgba(220, 38, 38, 0.28); color: #fecaca; }

/* 🌙 v9.1 다크모드 전수 호환성 보정 */
body.theme-dark { --text: #f1f5f9; --text-sub: #cbd5e1; --border: rgba(148, 163, 184, 0.28); }
body.theme-dark .muted { color: #cbd5e1 !important; }
body.theme-dark .card-title, body.theme-dark .sheet-title, body.theme-dark .profile-row,
body.theme-dark .journey-sect, body.theme-dark .playstyle-title { color: #f8fafc !important; }
body.theme-dark .help-box, body.theme-dark .playstyle-box, body.theme-dark .journey-era,
body.theme-dark .mission-item, body.theme-dark .hall-card, body.theme-dark .codex-card,
body.theme-dark .stage-node, body.theme-dark .offer-card, body.theme-dark .judge-card,
body.theme-dark .chance-card, body.theme-dark .costume-card, body.theme-dark .tavern-vs,
body.theme-dark .war-side-btn, body.theme-dark .war-day-card, body.theme-dark .train-meta-bar,
body.theme-dark .pity-box, body.theme-dark .showcase-box, body.theme-dark .pot-box,
body.theme-dark .color-palette-bar {
  background: rgba(24, 34, 49, 0.92) !important;
  color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
}
body.theme-dark .help-box[style*="background:#fdf7e3"],
body.theme-dark .help-box[style*="background: #fdf7e3"] {
  background: rgba(66, 46, 16, 0.85) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fef3c7 !important;
}
body.theme-dark .btn-outline, body.theme-dark .chip:not(.gold):not(.active):not(.rec),
body.theme-dark .title-chip:not(.active), body.theme-dark .cos-tab:not(.active),
body.theme-dark .sub-tab:not(.active) {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.42) !important;
}
body.theme-dark .name-input, body.theme-dark select, body.theme-dark textarea,
body.theme-dark input[type="text"] {
  background: #111827 !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}
body.theme-dark table th, body.theme-dark table td { color: #f1f5f9 !important; border-color: rgba(148, 163, 184, 0.25) !important; }
body.theme-dark .tabs { background: rgba(15, 21, 31, 0.96) !important; border-top-color: rgba(212, 155, 42, 0.32) !important; }
body.theme-dark .tabs .tab-label { color: #cbd5e1 !important; }
body.theme-dark .tabs .tab-btn.active .tab-label { color: #fde047 !important; }
body.theme-dark .opt-title, body.theme-dark .opt-desc, body.theme-dark .act-tile-title, body.theme-dark .act-tile-sub { color: #f1f5f9 !important; }
body.theme-dark .act-tile, body.theme-dark .stat-tile { background: rgba(24, 34, 49, 0.92) !important; color: #f8fafc !important; border-color: rgba(148, 163, 184, 0.35) !important; }
body.theme-dark .act-tile.selected, body.theme-dark .stat-tile.selected { background: rgba(120, 53, 15, 0.48) !important; border-color: #fbbf24 !important; }


/* === v9.2: 명예의 전당 시즌 2 베타 / 시즌 1 베타 아카이브 스위처 === */
.hall-season-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 8px;
}
.hall-season-btn {
  padding: 9px 10px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-card, #ffffff);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.hall-season-btn:active { transform: scale(0.98); }
.hall-season-btn.s2.active {
  background: linear-gradient(145deg, #271d10 0%, #161b26 100%);
  border-color: #f59e0b;
  color: #fef3c7;
  box-shadow: 0 5px 16px rgba(217, 119, 6, 0.28);
}
.hall-season-btn.s1.active {
  background: linear-gradient(145deg, #1f2430 0%, #141720 100%);
  border-color: #94a3b8;
  color: #f1f5f9;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.28);
}
.hsb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 13px;
  font-weight: 900;
}
.hsb-live {
  padding: 1px 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
}
.hsb-arch {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.35);
  color: inherit;
  font-size: 9.5px;
  font-weight: 800;
}
.hsb-sub {
  font-size: 11px;
  opacity: 0.82;
  margin-top: 3px;
  font-weight: 700;
}
.hall-season-notice {
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.45;
  margin-bottom: 10px;
  font-weight: 700;
}
.hall-season-notice.s2 {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(217, 119, 6, 0.45);
  color: #78350f;
}
.hall-season-notice.s1 {
  background: rgba(100, 116, 139, 0.14);
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #334155;
}
body.theme-dark .hall-season-btn:not(.active) {
  background: rgba(24, 34, 49, 0.92) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
}
body.theme-dark .hall-season-notice.s2 {
  background: rgba(120, 53, 15, 0.42);
  color: #fef3c7;
}
body.theme-dark .hall-season-notice.s1 {
  background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0;
}

/* v9.2.1 상세 확률표 행 스타일 (라이트/다크 완벽 호환) */
.odds-origin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
}
body.theme-dark .odds-origin-row {
  background: rgba(24, 34, 49, 0.9);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.28);
}

/* === v9.3: 무협 독자 체질 15종 · 뽑기 내공 확인 · 다크 육각형 레이더 차트 === */
.gtb-con-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
}
.g-warn-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.65);
  color: #fecaca;
  font-size: 9.5px;
  font-weight: 900;
}
.con-seal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 800;
}
.con-seal-chip b {
  font-family: 'Gowun Batang', serif;
  color: #fde047;
  font-size: 11px;
}
.gacha-qi-check-box {
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.42), rgba(15, 23, 42, 0.92));
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  margin-bottom: 9px;
}
.gacha-qi-check-btns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 5px;
}
.gacha-hex-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 2px;
  border-radius: 12px;
  background: rgba(10, 15, 26, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.25);
}


/* ==========================================================================
 * 🖌️ v9.4 한국풍 진수묵(眞水墨) 뽑기 UI 리마스터 & 먹선 미니멀 SVG 아이콘(.k-ico)
 *    (번쩍이는 중국풍 네온·보라·형광 주황 제거 -> 진먹 · 고한지 · 청자 · 단청연지 · 고금박!)
 * ========================================================================== */
.k-ico-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.15em;
  margin-right: 0.14em;
  line-height: 1;
}
.k-ico {
  width: 1.08em;
  height: 1.08em;
  flex-shrink: 0;
  display: inline-block;
}
/* 버튼·어두운 배경 위에서도 먹선 아이콘 선명도 유지 */
.btn-gold .k-ico,
.btn-ink .k-ico,
.btn-ad .k-ico,
.g-sum-btn .k-ico,
.g-keep-go-btn .k-ico,
.gacha-pity-auto-btn .k-ico {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

/* 1) 진수묵 소환장 전체 쉘 (달빛 수묵 산수화 + 차분한 먹·고금박 프레임) */
.gacha-shell {
  background-color: #15181d !important;
  border: 1.5px solid rgba(196, 152, 72, 0.52) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
  color: #f3ede0 !important;
}
.gacha-topbar {
  border-bottom: 1px solid rgba(196, 152, 72, 0.28) !important;
}
.gacha-back-btn {
  background: rgba(24, 28, 34, 0.88) !important;
  border: 1px solid rgba(196, 152, 72, 0.48) !important;
  color: #efe2c0 !important;
}
.g-pill {
  background: rgba(22, 26, 32, 0.9) !important;
  border-color: rgba(168, 152, 122, 0.38) !important;
}
.g-pill.cyan { color: #9ad1c4 !important; border-color: rgba(88, 158, 144, 0.45) !important; }
.g-pill.gold { color: #ebd29b !important; border-color: rgba(196, 152, 72, 0.48) !important; }
.g-pill.amber { color: #f2dc9b !important; border-color: rgba(206, 162, 74, 0.52) !important; }

/* 2) 상단 통합 천장 바 (고한지·먹빛 절제 톤) */
.gpt-item {
  background: rgba(22, 26, 32, 0.92) !important;
  border: 1px solid rgba(196, 152, 72, 0.44) !important;
  color: #e6dfd1 !important;
}
.gpt-item b { color: #e8c472 !important; }
.gpt-item.ready {
  background: linear-gradient(145deg, #6e2427, #3d1819) !important;
  border-color: #e2b857 !important;
  color: #faf3e3 !important;
}
.gacha-skip-toggle {
  background: rgba(24, 28, 34, 0.9) !important;
  border-color: rgba(168, 152, 122, 0.45) !important;
  color: #e6dfd1 !important;
}
.gacha-skip-toggle.on {
  background: rgba(40, 94, 84, 0.88) !important;
  border-color: #88bfb1 !important;
  color: #f3f9f7 !important;
}

/* 3) 풀와이드 진수묵 메인 배너 카드 */
.gacha-banner-card.full-wide {
  border: 1.5px solid rgba(196, 152, 72, 0.62) !important;
  background: #171a20 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
}
.gacha-banner-art.full-wide {
  min-height: 210px !important;
}
.g-tag-hot {
  background: rgba(142, 38, 38, 0.92) !important;
  border: 1px solid rgba(232, 196, 114, 0.65) !important;
  color: #faf3e3 !important;
}
.g-tag-odds {
  background: rgba(20, 24, 30, 0.86) !important;
  border: 1px solid rgba(214, 198, 168, 0.48) !important;
  color: #f3ede0 !important;
}
.gb-title {
  color: #faf3e3 !important;
  letter-spacing: -0.02em;
}
.gb-sub {
  color: #e4ddd0 !important;
}

/* 4) 6대 소환 풀 가로 3×2 탭 (먹색 + 청자/고금박 포인트) */
.gacha-pool-pill {
  background: rgba(22, 26, 32, 0.92) !important;
  border: 1px solid rgba(148, 140, 126, 0.42) !important;
  color: #e6dfd1 !important;
}
.gacha-pool-pill.active {
  background: linear-gradient(145deg, #2d261b 0%, #1b1915 100%) !important;
  border: 1.5px solid #d4a64a !important;
  color: #f7e6bd !important;
  box-shadow: inset 0 0 0 1px rgba(212, 166, 74, 0.25), 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}
.gacha-pool-pill.active .gpp-txt span { color: #d8be84 !important; }

.gacha-wep-picker-wide {
  background: rgba(20, 24, 30, 0.92) !important;
  border-color: rgba(196, 152, 72, 0.45) !important;
}
.g-wep-chip {
  background: rgba(28, 32, 39, 0.88) !important;
  border-color: rgba(148, 140, 126, 0.35) !important;
}
.g-wep-chip.active {
  background: rgba(40, 94, 84, 0.55) !important;
  border-color: #d4a64a !important;
}

/* 5) 천장 자동 확정 배너 & 하단 소환 버튼 5종 — 한국 전통 오방색 절제 팔레트! */
.gacha-pity-auto-btn {
  background: linear-gradient(135deg, #742226 0%, #4e1c1e 60%, #3a2614 100%) !important;
  border: 1.5px solid #e2b857 !important;
  color: #faf3e3 !important;
  box-shadow: 0 5px 16px rgba(116, 34, 38, 0.45) !important;
}
.gacha-pity-auto-btn.s-tier {
  background: linear-gradient(135deg, #6e4e1c 0%, #443114 100%) !important;
  border-color: #e2b857 !important;
  box-shadow: 0 5px 16px rgba(110, 78, 28, 0.42) !important;
}
/* 일반 입문 3회: 고려청자 비색 수묵 */
.g-sum-btn.normal {
  background: linear-gradient(155deg, #215149 0%, #15332f 100%) !important;
  border: 1.5px solid #72b0a2 !important;
  color: #f3f9f7 !important;
}
/* 일일 광고 3회: 송림 청묵 */
.g-sum-btn.ad-wide {
  background: linear-gradient(155deg, #2d4c3b 0%, #1b3025 100%) !important;
  border: 1.5px solid #82b596 !important;
  color: #f2f8f4 !important;
}
/* 천명 특급 5회: 고금박 먹색 */
.g-sum-btn.premium {
  background: linear-gradient(155deg, #5c421a 0%, #312310 100%) !important;
  border: 1.5px solid #d6a94c !important;
  color: #faf3e3 !important;
}
/* 천명 특급 10회: 단청 연지 + 고금박 (중국풍 보라/핫핑크 완전 제거!) */
.g-sum-btn.premium10 {
  background: linear-gradient(155deg, #762529 0%, #3f1618 100%) !important;
  border: 1.5px solid #dfb456 !important;
  color: #faf3e3 !important;
}
/* 리롤권 3회: 쪽빛 먹색 */
.g-sum-btn.reroll-pull {
  background: linear-gradient(155deg, #27374d 0%, #172130 100%) !important;
  border: 1.5px solid #8ca4c4 !important;
  color: #eef3f9 !important;
}
.g-rc-buy {
  background: linear-gradient(155deg, #6e4e1c, #3d2c11) !important;
  border: 1.5px solid #d6a94c !important;
  color: #faf3e3 !important;
}
.g-rc-buy span { color: #f2d896 !important; }

/* 6) 결과 화면 & 다중 봉인 카드 (한지·먹빛·붉은 전각 낙관!) */
.gacha-multi-box {
  background: rgba(18, 21, 27, 0.94) !important;
  border: 1.5px solid rgba(196, 152, 72, 0.45) !important;
}
.g-flip-card.sealed {
  background: linear-gradient(160deg, #25221d 0%, #161513 100%) !important;
  border: 1.5px solid rgba(196, 152, 72, 0.48) !important;
}
.g-flip-card.sealed.tier-hidden,
.g-flip-card.sealed.tier-mythic {
  border-color: #c84b44 !important;
  box-shadow: 0 0 12px rgba(200, 75, 68, 0.55) !important;
}
.g-flip-card.opened.tier-hidden,
.g-flip-card.opened.tier-mythic {
  border-color: #dfb456 !important;
  background: linear-gradient(160deg, rgba(102, 28, 30, 0.85), rgba(24, 19, 14, 0.96)) !important;
  box-shadow: 0 0 12px rgba(223, 180, 86, 0.38) !important;
}
.gacha-res-card.scroll-ink {
  background: linear-gradient(160deg, rgba(24, 26, 31, 0.96), rgba(16, 18, 22, 0.98)) !important;
  border-color: rgba(196, 152, 72, 0.52) !important;
}
.gacha-res-card.scroll-ink.mythic {
  background: linear-gradient(160deg, rgba(58, 22, 22, 0.96), rgba(22, 18, 14, 0.98)) !important;
  border-color: #dfb456 !important;
  box-shadow: 0 0 22px rgba(214, 169, 76, 0.34) !important;
}
.g-keep-go-btn {
  background: linear-gradient(155deg, #1f4742 0%, #132927 100%) !important;
  border: 1.5px solid #7ab5a7 !important;
  color: #f2f9f7 !important;
  box-shadow: 0 5px 14px rgba(18, 52, 48, 0.35) !important;
}
.gkg-tag {
  background: rgba(122, 181, 167, 0.22) !important;
  border-color: rgba(122, 181, 167, 0.55) !important;
  color: #d1ede6 !important;
}
.gacha-kept-banner {
  background: linear-gradient(135deg, rgba(64, 46, 22, 0.9), rgba(22, 26, 32, 0.95)) !important;
  border: 1.5px solid #d4a64a !important;
}
.gacha-qi-check-box {
  background: linear-gradient(145deg, rgba(54, 42, 22, 0.72), rgba(20, 24, 30, 0.94)) !important;
  border: 1.5px solid rgba(212, 166, 74, 0.58) !important;
}
.gacha-codex-btn {
  background: rgba(22, 26, 32, 0.92) !important;
  border-color: rgba(196, 152, 72, 0.55) !important;
  color: #f3e0b2 !important;
}
.gacha-rule-note {
  background: rgba(20, 24, 30, 0.85) !important;
  border-color: rgba(148, 140, 126, 0.35) !important;
  color: #d6d0c4 !important;
}


/* === v9.4.1: 등급별 컬러 소환 카드(한자 제거) & 클릭형 병기 상성표 배지 === */

/* 1) 등급별 색깔이 한눈에 구분되는 봉인/오픈 소환 카드 (C:담먹 / B:청자 / A:쪽빛 / S:고금박 / SS:단청홍금 / 히든:일월적금) */
.g-flip-card {
  min-height: 98px !important;
  padding: 6px 3px 6px !important;
  transition: transform 0.12s ease, box-shadow 0.16s ease;
}
.g-flip-card:active { transform: scale(0.96); }

/* 봉인(뒷면) 카드 — 등급별 고유 색깔 & 깔끔한 한글 등급 태그 (한자 玉 완전 제거!) */
.g-flip-card.sealed.tier-c {
  background: linear-gradient(160deg, #2d323b 0%, #1c2026 100%) !important;
  border: 1.5px solid #6b7280 !important;
}
.g-flip-card.sealed.tier-b {
  background: linear-gradient(160deg, #1d4b43 0%, #122c28 100%) !important;
  border: 1.5px solid #4ca696 !important;
}
.g-flip-card.sealed.tier-a {
  background: linear-gradient(160deg, #263a66 0%, #16213b 100%) !important;
  border: 1.5px solid #6d92dc !important;
}
.g-flip-card.sealed.tier-s {
  background: linear-gradient(160deg, #664a1a 0%, #33240d 100%) !important;
  border: 1.5px solid #e2b857 !important;
  box-shadow: 0 0 11px rgba(226, 184, 87, 0.45) !important;
}
.g-flip-card.sealed.tier-ss {
  background: linear-gradient(160deg, #742228 0%, #3b1316 100%) !important;
  border: 1.5px solid #ef7067 !important;
  box-shadow: 0 0 12px rgba(220, 68, 60, 0.5) !important;
}
.g-flip-card.sealed.tier-hidden,
.g-flip-card.sealed.tier-mythic {
  background: linear-gradient(155deg, #7c1c28 0%, #4d2f12 58%, #21160d 100%) !important;
  border: 2px solid #f2c85b !important;
  box-shadow: 0 0 15px rgba(242, 200, 91, 0.62) !important;
}

.gfc-card-tier {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #f3ede0;
  margin-bottom: 4px;
}
.g-flip-card.sealed.tier-b .gfc-card-tier { color: #a7e4d8; }
.g-flip-card.sealed.tier-a .gfc-card-tier { color: #c3d8ff; }
.g-flip-card.sealed.tier-s .gfc-card-tier { color: #fde68a; }
.g-flip-card.sealed.tier-ss .gfc-card-tier { color: #fecaca; }
.g-flip-card.sealed.tier-hidden .gfc-card-tier,
.g-flip-card.sealed.tier-mythic .gfc-card-tier { background: rgba(185, 28, 28, 0.65); color: #fef08a; }

.gfc-card-emblem {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 오픈(앞면) 카드 — C/B/A/S/SS/히든 등급별 뚜렷한 색깔 배경 & 상단 배지! */
.g-flip-card.opened.tier-c {
  background: linear-gradient(165deg, #272c34 0%, #181c22 100%) !important;
  border-color: #6b7280 !important;
}
.g-flip-card.opened.tier-b {
  background: linear-gradient(165deg, #1a403a 0%, #122422 100%) !important;
  border-color: #4aa392 !important;
}
.g-flip-card.opened.tier-a {
  background: linear-gradient(165deg, #22355c 0%, #141e33 100%) !important;
  border-color: #698fd9 !important;
}
.g-flip-card.opened.tier-s {
  background: linear-gradient(165deg, #5c4319 0%, #261c0e 100%) !important;
  border-color: #e0b352 !important;
}
.g-flip-card.opened.tier-ss {
  background: linear-gradient(165deg, #692126 0%, #2a1215 100%) !important;
  border-color: #ea6c63 !important;
}
.g-flip-card.opened.tier-hidden,
.g-flip-card.opened.tier-mythic {
  background: linear-gradient(155deg, #741c27 0%, #422911 58%, #1e160d 100%) !important;
  border-color: #f2c85b !important;
  box-shadow: 0 0 13px rgba(242, 200, 91, 0.45) !important;
}
.gfc-grade.tier-c { background: #525b68; }
.gfc-grade.tier-b { background: #267a6b; }
.gfc-grade.tier-a { background: #3b63b8; }
.gfc-grade.tier-s { background: #b8821c; }
.gfc-grade.tier-ss { background: #b92b27; }
.gfc-grade.tier-hidden,
.gfc-grade.tier-mythic { background: linear-gradient(135deg, #be123c, #b45309); }

/* 2) 상세 카드 우측 상단 클릭형 병기 상성표 배지 (기존 애매한 한자 도장 대체!) */
.gacha-wep-matchup-btn {
  position: absolute;
  top: 42px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 6px;
  border-radius: 12px;
  border: 1.5px solid rgba(214, 169, 76, 0.72);
  background: linear-gradient(145deg, rgba(28, 34, 44, 0.94), rgba(16, 20, 26, 0.96));
  color: #faf3e3;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.gacha-wep-matchup-btn:active { transform: scale(0.96); }
.gwm-txt { text-align: left; line-height: 1.15; }
.gwm-txt b { display: block; font-size: 11.5px; font-weight: 900; color: #fef08a; }
.gwm-txt span { display: block; font-size: 9.5px; font-weight: 800; color: #86efac; margin-top: 1px; }

/* 한글 태그 배지 (출신 / 체질) & 클릭형 병기 상성 박스 */
.gtb-tag-badge {
  min-width: 34px;
  padding: 4px 5px;
  border-radius: 8px;
  border: 1.2px solid rgba(214, 169, 76, 0.65);
  background: rgba(120, 82, 24, 0.35);
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 900;
  text-align: center;
  flex-shrink: 0;
}
.gtb-wep-btn {
  width: 100%;
  text-align: left;
  margin-top: 7px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(114, 176, 162, 0.42);
  background: rgba(21, 51, 47, 0.55);
  color: #e6f4f1;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.gtb-wep-btn:active { transform: scale(0.99); }
.gtb-wep-link {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(214, 169, 76, 0.25);
  border: 1px solid rgba(214, 169, 76, 0.55);
  color: #fef08a;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

/* 상성표 모달 최상단 '현재 무인 병기 우세/열세 요약 박스' */
.v9-match-focus-box {
  padding: 11px 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(42, 34, 20, 0.92), rgba(18, 22, 28, 0.96));
  border: 1.8px solid #e2b857;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
}
.vmf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.vmf-card {
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(12, 16, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.vmf-card.strong { border-color: rgba(74, 222, 128, 0.48); }
.vmf-card.weak { border-color: rgba(248, 113, 113, 0.48); }
.vmf-lbl { font-size: 10.5px; font-weight: 900; margin-bottom: 5px; }
.vmf-card.strong .vmf-lbl { color: #86efac; }
.vmf-card.weak .vmf-lbl { color: #fca5a5; }
.vmf-vals { display: flex; gap: 4px; flex-wrap: wrap; }
.vmf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.vmf-pill.strong { background: rgba(22, 101, 52, 0.55); color: #dcfce7; border: 1px solid rgba(74, 222, 128, 0.45); }
.vmf-pill.weak { background: rgba(127, 29, 29, 0.55); color: #fee2e2; border: 1px solid rgba(248, 113, 113, 0.45); }
.v9-match-row.focused {
  border: 1.8px solid #fde047 !important;
  background: rgba(92, 66, 24, 0.42) !important;
}


/* ==========================================================================
 * 🖌️ v9.4.2 금색 수묵화 화이트/다크 전체 배경 + 시인성 전수 수정 + 인터랙티브 상성도
 * ========================================================================== */

/* 1) 화이트 모드 — 따뜻한 한지 · 금박 수묵 산수 전체 배경 */
body {
  background-color: #e9e1cf;
  background-image: url('../assets/bg_app_light_goldsumie.jpg?v=1.3.13');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}
#app {
  background-color: rgba(248, 243, 232, 0.72) !important;
  background-image: url('../assets/bg_app_light_goldsumie.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
}
.topbar {
  background: rgba(248, 242, 228, 0.88) !important;
  border-bottom: 1px solid rgba(186, 142, 54, 0.32) !important;
}
.tabs {
  background: rgba(250, 245, 234, 0.92) !important;
  border-top: 1px solid rgba(186, 142, 54, 0.32) !important;
}
.card {
  background: rgba(255, 252, 245, 0.90) !important;
  border: 1px solid rgba(186, 146, 72, 0.34) !important;
  backdrop-filter: blur(5px);
}

/* 2) 다크 모드 — 짙은 먹빛 · 금박 수묵 산수 전체 배경 & 텍스트 시인성 100% 보정! */
body.theme-dark,
body.theme-dark html {
  background-color: #0c1016 !important;
  background-image: url('../assets/bg_app_dark_goldsumie.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
  color: #f4efe4 !important;
}
body.theme-dark #app {
  background-color: rgba(13, 17, 23, 0.78) !important;
  background-image: url('../assets/bg_app_dark_goldsumie.jpg?v=1.3.13') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
}
body.theme-dark .topbar {
  background: rgba(16, 20, 27, 0.90) !important;
  border-bottom: 1px solid rgba(206, 162, 74, 0.32) !important;
}
body.theme-dark .brand-title,
body.theme-dark .coin-pill,
body.theme-dark .yuanbao-pill,
body.theme-dark .hero-name {
  color: #faf3e3 !important;
}
body.theme-dark .card,
body.theme-dark .event-sheet:not(.full-art-sheet) {
  background: rgba(20, 25, 34, 0.92) !important;
  border: 1px solid rgba(206, 162, 74, 0.30) !important;
  color: #f4efe4 !important;
}
body.theme-dark .event-sheet .sheet-body,
body.theme-dark .event-sheet p,
body.theme-dark .event-sheet div,
body.theme-dark .card div,
body.theme-dark .card span,
body.theme-dark .card b {
  color: inherit;
}
body.theme-dark .profile-row .muted,
body.theme-dark .sheet-body,
body.theme-dark .score-row,
body.theme-dark .odds-origin-row,
body.theme-dark .odds-origin-row b {
  color: #e8e2d5 !important;
}
body.theme-dark .btn-ink {
  background: linear-gradient(145deg, #2d3544, #1b212c) !important;
  color: #faf3e3 !important;
  border: 1px solid rgba(206, 162, 74, 0.45) !important;
}
body.theme-dark .btn-gold {
  color: #1c1408 !important;
}

/* 3) 어두운 컨테이너(.gacha-shell / .full-art-sheet) 안의 버튼·텍스트 — 화이트/다크 모드 불문 100% 선명! */
.gacha-shell .btn-outline,
.full-art-sheet .btn-outline,
.g-qi-silver-btn {
  background: rgba(24, 29, 38, 0.94) !important;
  color: #f6e7c1 !important;
  border: 1.5px solid rgba(212, 166, 74, 0.62) !important;
  font-weight: 800 !important;
}
.g-qi-silver-btn {
  padding: 6px 4px !important;
  font-size: 11px !important;
}
.gacha-shell .btn-outline:disabled,
.full-art-sheet .btn-outline:disabled {
  opacity: 0.48 !important;
  color: #9ca3af !important;
}
.gacha-shell .btn-gold,
.full-art-sheet .btn-gold {
  color: #1b1306 !important;
}
.gacha-shell .btn-ad,
.full-art-sheet .btn-ad {
  color: #f2f9f5 !important;
}

/* 4) 강호일대기 인터랙티브 화살표 상성도 (.mc-*) */
.mc-board-wrap {
  border-radius: 14px;
  padding: 10px 8px 10px;
  background: linear-gradient(165deg, #101922 0%, #0b1118 100%);
  border: 1.5px solid rgba(206, 162, 74, 0.52);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.55);
  margin-bottom: 10px;
}
.mc-legend-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 800;
}
.mcl-item.gold  { color: #f2d07a; }
.mcl-item.green { color: #4ade80; }
.mcl-item.red   { color: #f87171; }

.mc-diagram-canvas {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 360 / 336;
  margin: 0 auto;
  background-image: radial-gradient(rgba(214, 169, 76, 0.14) 1px, transparent 0);
  background-size: 18px 18px;
  border-radius: 10px;
}
.mc-diagram-canvas.short {
  aspect-ratio: 360 / 212;
}
.mc-svg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mc-arrow {
  fill: none;
  stroke-linecap: round;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}
.mc-arrow.arr-base {
  stroke: rgba(200, 154, 66, 0.34);
  stroke-width: 2;
}
.mc-arrow.arr-strong {
  stroke: #4ade80;
  stroke-width: 3.1;
  filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.65));
}
.mc-arrow.arr-weak {
  stroke: #f87171;
  stroke-width: 3.1;
  filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.65));
}

/* 마름모(다이아몬드) 병기/진영/진형 클릭 노드 */
.mc-diamond-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: inherit;
  z-index: 3;
  transition: transform 0.14s ease, opacity 0.15s ease;
}
.mc-diamond-btn:active { transform: translate(-50%, -50%) scale(0.94); }
.mc-diamond-btn.is-dim { opacity: 0.64; }
.mc-diamond-btn.is-sel { z-index: 6; transform: translate(-50%, -50%) scale(1.1); }

.mc-diamond-box {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  transform: rotate(45deg);
  background: linear-gradient(145deg, #212a36, #131820);
  border: 2px solid rgba(206, 162, 74, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}
.mc-diamond-inner {
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mc-diamond-btn.is-sel .mc-diamond-box {
  background: linear-gradient(145deg, #6e4e18, #38270d);
  border: 2.4px solid #fde047;
  box-shadow: 0 0 16px rgba(253, 224, 71, 0.72);
}
.mc-diamond-btn.is-strong .mc-diamond-box {
  background: linear-gradient(145deg, #174a38, #0e2d22);
  border: 2.2px solid #4ade80;
  box-shadow: 0 0 13px rgba(74, 222, 128, 0.55);
}
.mc-diamond-btn.is-weak .mc-diamond-box {
  background: linear-gradient(145deg, #5c1c20, #331013);
  border: 2.2px solid #f87171;
  box-shadow: 0 0 13px rgba(248, 113, 113, 0.55);
}
.mc-diamond-lbl {
  margin-top: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(10, 14, 20, 0.86);
  color: #f4efe4;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid rgba(206, 162, 74, 0.28);
}
.mc-diamond-btn.is-sel .mc-diamond-lbl {
  background: #92400e;
  color: #fef08a;
  border-color: #fde047;
}
.mc-rel-pill {
  position: absolute;
  top: -12px;
  right: -12px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 900;
  white-space: nowrap;
}
.mc-rel-pill.is-sel    { background: #d97706; color: #fff; }
.mc-rel-pill.is-strong { background: #15803d; color: #dcfce7; }
.mc-rel-pill.is-weak   { background: #b91c1c; color: #fee2e2; }

.mc-mini-detail {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(20, 26, 36, 0.92);
  border: 1px solid rgba(206, 162, 74, 0.42);
}
button.vmf-pill {
  cursor: pointer;
  font-family: inherit;
}

/* === v9.5: 장문 소설 서사 · 스토리 컷신 · 위치 리본 · 상단 육성 · 외전 · 강호 전적표 === */
.v95-cutin-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1.5px solid rgba(206, 162, 74, 0.58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.v95-cutin-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v95-loc-ribbon {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(14, 18, 24, 0.84);
  border: 1px solid rgba(214, 169, 76, 0.65);
  color: #f7e6bd;
  font-size: 10.5px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}
.v95-novel-body {
  white-space: pre-line;
  line-height: 1.65;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.v95-rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.v95-rec-cell { padding: 7px 6px; border-radius: 10px; text-align: center; background: rgba(206, 162, 74, 0.10); border: 1px solid rgba(206, 162, 74, 0.30); }
.v95-rec-cell span { display: block; font-size: 10.5px; color: var(--text-sub); font-weight: 700; }
.v95-rec-cell b { display: block; font-size: 13px; color: var(--gold-dark); font-weight: 900; margin-top: 2px; }
.v95-guild-card { margin-top: 10px; }
.v95-st-chip { padding: 7px 8px; border-radius: 10px; border: 1px solid var(--border); background: rgba(206, 162, 74, 0.07); }
.v95-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--border); background: rgba(206, 162, 74, 0.06); }
.v95-sub-row.owned { border-color: rgba(47, 124, 110, 0.55); }


/* ==========================================================================
 * 📖 v9.6 인터랙티브 장편 분기 소설 몰입 리더 UI (.sb-novel-sheet)
 * ========================================================================== */
.sb-novel-sheet {
  max-height: 92vh !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, #171b22 0%, #11151b 100%) !important;
  color: #f4efe4 !important;
  border-top: 2px solid #d4a64a !important;
  padding-bottom: 22px !important;
}
.sb-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(185, 60, 52, 0.28);
  border: 1px solid rgba(224, 114, 102, 0.55);
  color: #fecaca;
  font-size: 10px;
  font-weight: 900;
}
.sb-title {
  margin: 4px 0 0;
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 900;
  color: #faf3e3 !important;
}

/* 기·승·전·결 4막 진행 바 */
.sb-stage-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 9px;
}
.sb-stage-step {
  text-align: center;
  padding: 4px 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
}
.sb-stage-step.done {
  background: rgba(40, 94, 84, 0.45);
  border-color: rgba(114, 176, 162, 0.55);
  color: #ccebe3;
}
.sb-stage-step.active {
  background: linear-gradient(135deg, rgba(168, 118, 28, 0.72), rgba(116, 34, 38, 0.72));
  border-color: #fde047;
  color: #fffbeb;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.28);
}

/* 동적 전환 16:9 수묵 컷신 무대 */
@keyframes sbFadeCut {
  0%   { opacity: 0.35; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
.sb-cutin-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 13px;
  overflow: hidden;
  border: 1.5px solid rgba(214, 169, 76, 0.65);
  margin-bottom: 10px;
  background: #0d1117;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
}
.sb-cutin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: sbFadeCut 0.42s ease-out;
}
.sb-cutin-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.12) 0%, rgba(10, 14, 20, 0) 45%, rgba(10, 14, 20, 0.78) 100%);
  pointer-events: none;
}
.sb-scene-pill {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 20, 26, 0.85);
  border: 1px solid rgba(214, 169, 76, 0.65);
  color: #fde68a;
  font-size: 10px;
  font-weight: 900;
}

/* 확률 승부 결과 대형 배너 */
.sb-roll-banner {
  text-align: center;
  padding: 8px 10px;
  border-radius: 11px;
  margin-bottom: 9px;
  font-family: 'Gowun Batang', serif;
  font-size: 14px;
  font-weight: 900;
}
.sb-roll-banner.ok {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.72), rgba(146, 64, 14, 0.68));
  border: 1.5px solid #fde047;
  color: #fef08a;
}
.sb-roll-banner.fail {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.78), rgba(30, 20, 22, 0.88));
  border: 1.5px solid #f87171;
  color: #fecaca;
}

/* 지난 줄거리 접힘 아코디언 */
.sb-trail-box {
  margin-bottom: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(206, 162, 74, 0.25);
  font-size: 11.5px;
  color: #d6cfc2;
}
.sb-trail-box summary {
  cursor: pointer;
  font-weight: 800;
  color: #e8c472;
}
.sb-trail-list { margin-top: 7px; display: flex; flex-direction: column; gap: 6px; }
.sb-trail-item {
  padding-left: 8px;
  border-left: 2px solid rgba(206, 162, 74, 0.45);
}
.sb-tr-head { font-size: 10.5px; font-weight: 900; color: #fde68a; }
.sb-tr-snip { font-size: 10.5px; color: #cbd5e1; margin-top: 1px; }
.sb-tr-pick { font-size: 10.5px; color: #86efac; font-weight: 800; margin-top: 2px; }

/* 문학형 소설 본문 상자 */
.sb-prose-box {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(24, 28, 36, 0.94);
  border: 1px solid rgba(206, 162, 74, 0.38);
  margin-bottom: 11px;
}
.sb-speaker-bar {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  background: rgba(214, 169, 76, 0.18);
  border: 1px solid rgba(214, 169, 76, 0.45);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 900;
  margin-bottom: 8px;
}
.sb-prose-text {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  font-size: 13.8px;
  line-height: 1.76;
  color: #f6f1e6;
  white-space: pre-line;
  word-break: keep-all;
}

/* 갈림길 선택지 버튼 */
.sb-choice-kicker {
  font-size: 11.5px;
  font-weight: 900;
  color: #e8c472;
  margin-bottom: 7px;
}
.sb-choice-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sb-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(214, 169, 76, 0.55);
  background: linear-gradient(155deg, rgba(32, 39, 50, 0.95), rgba(20, 25, 34, 0.98));
  color: #faf3e3;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.sb-choice-btn:active { transform: scale(0.985); }
.sb-choice-btn:hover { border-color: #fde047; }
.sb-ch-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b45309, #78350f);
  border: 1px solid #fde047;
  color: #fffbeb;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-ch-txt { min-width: 0; flex: 1; }
.sb-ch-lbl { font-size: 13px; font-weight: 900; color: #fffbeb; line-height: 1.38; }
.sb-ch-sub { font-size: 10.8px; color: #a7e4d8; margin-top: 2px; font-weight: 700; }
.sb-ch-arr { font-size: 18px; color: #fde68a; font-weight: 900; flex-shrink: 0; }

/* 대단원 결말 카드 */
.sb-ending-card {
  padding: 13px 12px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(72, 48, 18, 0.72), rgba(26, 20, 14, 0.95));
  border: 1.8px solid #e2b857;
  text-align: center;
  margin-bottom: 10px;
}
.sb-end-kicker { font-size: 11px; font-weight: 900; color: #fde68a; letter-spacing: 0.06em; }
.sb-end-title {
  font-family: 'Gowun Batang', serif;
  font-size: 16.5px;
  font-weight: 900;
  color: #ffffff;
  margin: 5px 0 7px;
}
.sb-end-reward {
  font-size: 12px;
  font-weight: 800;
  color: #bbf7d0;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.65);
}
.sb-finish-btn {
  width: 100%;
  padding: 13px 12px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
.sb-launch-card {
  border: 1.5px solid rgba(214, 169, 76, 0.55) !important;
}


/* === v9.7: [20문파 × 8병기 × 18유파 × 15체질] 조합 배지 & 체질 전용 분기 스타일 === */
.sb-combo-strip {
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 169, 76, 0.34);
  margin-bottom: 9px;
}
.sb-combo-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sbc-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(214, 169, 76, 0.48);
  background: rgba(20, 24, 32, 0.85);
  color: #f3ede0;
}
.sbc-pill.sect { color: #fde68a; border-color: rgba(214, 169, 76, 0.6); }
.sbc-pill.wep  { color: #9ad1c4; border-color: rgba(88, 158, 144, 0.55); }
.sb-combo-res {
  font-size: 10.8px;
  color: #e6dfd1;
  line-height: 1.4;
  font-weight: 700;
}
.sb-choice-btn.con-special {
  background: linear-gradient(155deg, rgba(64, 42, 18, 0.92), rgba(24, 18, 16, 0.98)) !important;
  box-shadow: 0 4px 14px rgba(214, 169, 76, 0.25);
}
.sb-shelf-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(206, 162, 74, 0.42);
  background: rgba(206, 162, 74, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.sb-shelf-btn:active { transform: scale(0.985); }

/* === v9.8: 조건 충족 배지(.sb-req-pill) & 선택 업보 기억 바(.sb-mem-bar) === */
.sb-choice-btn.locked {
  opacity: 0.56;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.3) !important;
}
.sb-req-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  vertical-align: middle;
}
.sb-req-pill.met  { background: rgba(22, 101, 52, 0.55); color: #dcfce7; border: 1px solid rgba(74, 222, 128, 0.5); }
.sb-req-pill.miss { background: rgba(127, 29, 29, 0.55); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.5); }
.sb-mem-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(206, 162, 74, 0.10);
  border: 1px solid rgba(206, 162, 74, 0.30);
  font-size: 10.8px;
  margin-bottom: 8px;
}

/* === v9.9: 물아일체 1인칭 내면 독백 박스 (.sb-monologue-box) === */
.sb-monologue-box {
  padding: 9px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(40, 94, 84, 0.24), rgba(24, 28, 36, 0.90));
  border-left: 3px solid #d4a64a;
  border-top: 1px solid rgba(214, 169, 76, 0.28);
  border-right: 1px solid rgba(214, 169, 76, 0.22);
  border-bottom: 1px solid rgba(214, 169, 76, 0.22);
  margin-bottom: 9px;
}
.sb-mono-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(214, 169, 76, 0.22);
  color: #fde68a;
  font-size: 9.5px;
  font-weight: 900;
  margin-bottom: 4px;
}
.sb-mono-txt {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  font-size: 12.6px;
  line-height: 1.58;
  color: #e6f2ee;
  font-style: italic;
  word-break: keep-all;
}


/* ==========================================================================
 * 📜 v10.0 현장 체험형 한지 두루마리 RPG 리더 + 인라인 강호 결투 + 길 위 상인 + 목재 행낭!
 * ========================================================================== */
.sb-hanji-sheet {
  max-height: 94vh !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #ece4d2 !important;
  color: #241d15 !important;
  border-top: 2.5px solid #a87b32 !important;
}
body.theme-dark .sb-hanji-sheet {
  background: #1b1916 !important;
  color: #efe7d6 !important;
  border-top-color: #d4a64a !important;
}

/* 1) 상단 모험 HUD (초상화 · 생명/공력 구슬 · 6스탯) */
.sb-adv-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 7px;
  background: linear-gradient(180deg, #dfd4bd 0%, #e7dec9 100%);
  border-bottom: 1px solid rgba(138, 108, 58, 0.35);
  flex-shrink: 0;
}
body.theme-dark .sb-adv-hud {
  background: linear-gradient(180deg, #25211b 0%, #1d1a16 100%);
  border-bottom-color: rgba(212, 166, 74, 0.32);
}
.sah-av {
  width: 48px; height: 48px; border-radius: 10px;
  border: 1.5px solid #a87b32; background: #262018;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.sah-mid { min-width: 0; flex: 1; }
.sah-nm-row { display: flex; align-items: center; gap: 5px; }
.sah-nm-row b { font-size: 13px; font-weight: 900; color: inherit; }
.sah-sect { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(168, 123, 50, 0.22); color: #6e4e18; font-weight: 800; }
body.theme-dark .sah-sect { color: #f2d896; }
.sah-orbs { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; font-size: 11px; line-height: 1.05; letter-spacing: 1px; }
.orb-row.hp { color: #c43730; }
.orb-row.qi { color: #267a6b; }
.orb-row i.dim { font-style: normal; opacity: 0.35; }
.sah-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 5px;
  font-size: 10px; font-weight: 800; color: #5c4b36; flex-shrink: 0;
}
body.theme-dark .sah-stats { color: #cbbda3; }
.sah-stats b { color: #241d15; margin-left: 1px; }
body.theme-dark .sah-stats b { color: #fde68a; }
.sah-pause {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid rgba(138, 108, 58, 0.45); background: rgba(255, 255, 255, 0.55);
  color: #3a2e1f; font-size: 12px; cursor: pointer; flex-shrink: 0;
}
body.theme-dark .sah-pause { background: rgba(255,255,255,0.08); color: #fde68a; }

/* 4막 진행 막대 */
.sb-prog-track {
  position: relative; height: 18px; background: rgba(112, 86, 44, 0.18);
  border-bottom: 1px solid rgba(138, 108, 58, 0.28); flex-shrink: 0;
}
.sb-prog-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #b88935, #d4a64a);
  opacity: 0.42; transition: width 0.35s ease;
}
.sb-prog-steps {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; text-align: center;
  font-size: 10px; font-weight: 900; color: #6e5c45;
}
.sb-prog-steps span.on { color: #4a2e0b; }
body.theme-dark .sb-prog-steps { color: #9c8e78; }
body.theme-dark .sb-prog-steps span.on { color: #fde68a; }

.sb-book-titlebar {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px 2px;
  font-family: 'Gowun Batang', serif; font-size: 14.5px; font-weight: 900; flex-shrink: 0;
}
.sbb-badge {
  font-family: 'Pretendard', sans-serif; font-size: 9.5px; font-weight: 900;
  padding: 1px 7px; border-radius: 999px; background: #762529; color: #faf3e3; flex-shrink: 0;
}
.sb-book-combo {
  padding: 0 12px 6px; font-size: 10.5px; font-weight: 800; color: #6b5638;
  border-bottom: 1px dashed rgba(138, 108, 58, 0.32); flex-shrink: 0;
}
body.theme-dark .sb-book-combo { color: #d8c7a8; }

/* 2) 한지 스크롤 본문 영역 & 문단 중간 컷신 (사진 1 참고!) */
.sb-scroll-body {
  flex: 1; overflow-y: auto; padding: 11px 14px 14px;
  -webkit-overflow-scrolling: touch;
}
.sb-scene-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-bottom: 8px; font-size: 11px; font-weight: 900;
}
.sb-scene-loc { color: #7a4b14; }
.sb-scene-spk { padding: 1px 8px; border-radius: 6px; background: rgba(138, 108, 58, 0.16); color: #4a3721; }
body.theme-dark .sb-scene-loc { color: #f2d07a; }
body.theme-dark .sb-scene-spk { background: rgba(212, 166, 74, 0.18); color: #fde68a; }

.sb-hanji-prose {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
  font-size: 14px; line-height: 1.78; white-space: pre-line; word-break: keep-all;
  color: #241c13; margin-bottom: 10px;
}
body.theme-dark .sb-hanji-prose { color: #f3ece0; }

/* 거친 수묵 붓질 프레임 16:9 중간 컷신 */
.sb-brush-cutin {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  margin: 8px 0 11px;
  border: 2px solid #3a2e22;
  box-shadow: 0 6px 18px rgba(30, 22, 12, 0.35), inset 0 0 0 2px rgba(212, 166, 74, 0.45);
}
.sb-brush-cutin img { width: 100%; height: 100%; object-fit: cover; display: block; animation: sbFadeCut 0.4s ease-out; }

.sb-hanji-mono {
  padding: 7px 10px; border-left: 3px solid #267a6b;
  background: rgba(38, 122, 107, 0.09); border-radius: 0 8px 8px 0;
  font-family: 'Gowun Batang', serif; font-size: 12.5px; line-height: 1.55;
  color: #1f4d44; font-style: italic; margin-bottom: 10px;
}
body.theme-dark .sb-hanji-mono { background: rgba(38, 122, 107, 0.22); color: #c7ebe3; }

.sb-hanji-divider {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 9px;
  font-size: 10.5px; font-weight: 900; color: #7a6445;
}
.sb-hanji-divider::before, .sb-hanji-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(138, 108, 58, 0.38);
}
body.theme-dark .sb-hanji-divider { color: #d4b987; }

/* 전통 매듭(❖) 앞머리 선택지 (사진 1 & 4 참고!) */
.sb-hanji-choices { display: flex; flex-direction: column; gap: 7px; }
.sb-hanji-choice {
  display: flex; align-items: flex-start; gap: 8px; width: 100%;
  padding: 10px 11px; border-radius: 10px;
  border: 1px solid rgba(138, 108, 58, 0.42);
  background: rgba(255, 251, 242, 0.72);
  color: #211a12; text-align: left; cursor: pointer; font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease;
}
.sb-hanji-choice:active { transform: scale(0.985); }
.sb-hanji-choice.con-sp { border: 1.5px solid #c8953a; background: rgba(246, 226, 178, 0.55); }
.sb-hanji-choice.locked { opacity: 0.52; cursor: not-allowed; }
body.theme-dark .sb-hanji-choice {
  background: rgba(36, 32, 26, 0.92); color: #f6efe2; border-color: rgba(212, 166, 74, 0.38);
}
body.theme-dark .sb-hanji-choice.con-sp { background: rgba(88, 60, 22, 0.65); border-color: #fde047; }
.shc-mark { font-size: 14px; color: #8c5a18; font-weight: 900; margin-top: 1px; flex-shrink: 0; }
body.theme-dark .shc-mark { color: #fde047; }
.shc-txt { min-width: 0; flex: 1; }
.shc-txt b { display: block; font-family: 'Gowun Batang', serif; font-size: 13.5px; font-weight: 900; line-height: 1.4; }
.shc-txt small { display: block; font-size: 10.8px; color: #5c4b36; margin-top: 2px; font-weight: 700; }
body.theme-dark .shc-txt small { color: #b7d8ce; }

.sb-trail-hanji {
  margin-bottom: 8px; padding: 5px 9px; border-radius: 8px;
  background: rgba(138, 108, 58, 0.11); font-size: 11px; color: #5c4b36;
}
body.theme-dark .sb-trail-hanji { background: rgba(255,255,255,0.06); color: #d6cfc2; }
.sb-trail-hanji summary { cursor: pointer; font-weight: 800; }

.sb-hanji-ending {
  padding: 12px; border-radius: 12px; text-align: center; margin-bottom: 10px;
  background: linear-gradient(145deg, #2a2117, #19140e);
  border: 1.8px solid #d4a64a; color: #faf3e3;
}
.she-kicker { font-size: 11px; color: #fde68a; font-weight: 900; }
.she-title { font-family: 'Gowun Batang', serif; font-size: 16px; font-weight: 900; margin: 4px 0 6px; color: #fff; }
.she-rew { font-size: 11.8px; color: #bbf7d0; font-weight: 800; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,0.35); }

/* 3) 인라인 강호 결투 카드 + 20면 붉은 운명패 (사진 2 참고!) */
.sb-battle-card {
  border-radius: 12px; padding: 10px;
  background: #f5efe0; border: 2px solid #8c6a32;
  color: #241d15; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
body.theme-dark .sb-battle-card { background: #23201b; color: #f4efe4; border-color: #c8953a; }
.sbb-top { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 6px; align-items: center; margin-bottom: 7px; }
.sbb-nm { font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbb-side.right { text-align: right; }
.sbb-pow { font-size: 11px; font-weight: 900; color: #8c5a18; }
body.theme-dark .sbb-pow { color: #fde68a; }
.sbb-hp-bar {
  position: relative; height: 15px; border-radius: 4px; background: #2c251e;
  overflow: hidden; margin-top: 3px; border: 1px solid #6b5434;
}
.sbb-hp-fill { height: 100%; transition: width 0.35s ease; }
.sbb-hp-fill.my { background: linear-gradient(90deg, #1f7a68, #38a892); }
.sbb-hp-fill.foe { background: linear-gradient(90deg, #992222, #d4423a); margin-left: auto; }
.sbb-hp-bar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000;
}
.sbb-vs-mid { text-align: center; }
.sbb-rate-lbl { font-size: 9.5px; font-weight: 900; color: #9c3028; }
.sbb-rate-val { font-size: 15px; font-weight: 900; color: #b91c1c; line-height: 1.05; }
body.theme-dark .sbb-rate-val { color: #fca5a5; }
.sbb-dc { font-size: 9px; font-weight: 800; color: #6e5c45; }
body.theme-dark .sbb-dc { color: #cbd5e1; }

.sbb-arena {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden;
  background-color: #1c222b; background-size: cover; background-position: center;
  border: 1.5px solid #4a3b28; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 10px 26px; margin-bottom: 7px;
}
.sbb-fighter { transition: transform 0.25s ease, opacity 0.25s ease; }
.sbb-fighter.win-lunge { transform: translateX(18px) scale(1.08); }
.sbb-fighter.foe.win-lunge { transform: translateX(-18px) scale(1.08); }
.sbb-fighter.lose-hit { opacity: 0.45; transform: scale(0.9); }
.sbb-clash-spark {
  align-self: center; padding: 3px 10px; border-radius: 999px;
  background: rgba(18, 22, 28, 0.85); border: 1.5px solid #e2b857;
  color: #fde68a; font-family: 'Gowun Batang', serif; font-size: 13px; font-weight: 900;
}
.sbb-buff-row { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 9px; flex-wrap: wrap; }
.sbb-buff-side { display: flex; gap: 4px; flex-wrap: wrap; }
.sbb-tag { padding: 2px 6px; border-radius: 6px; background: rgba(138, 108, 58, 0.2); font-size: 10px; font-weight: 900; }
.sbb-tag.gold { background: rgba(212, 166, 74, 0.35); color: #6e4e18; }
.sbb-tag.jade { background: rgba(38, 122, 107, 0.25); color: #1a5c50; }
.sbb-tag.red  { background: rgba(185, 28, 28, 0.2); color: #991b1b; }
body.theme-dark .sbb-tag.gold { color: #fde68a; }
body.theme-dark .sbb-tag.jade { color: #9ad1c4; }
body.theme-dark .sbb-tag.red  { color: #fecaca; }

.sbb-dice-dock {
  display: grid; grid-template-columns: 74px 66px 1fr; gap: 7px; align-items: center;
}
.sbb-die-hex {
  width: 62px; height: 62px; margin: 0 auto; border: none; cursor: pointer;
  background: linear-gradient(145deg, #b92b27, #6e1416);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  color: #fffbeb; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.5); font-family: inherit;
}
.sbb-die-hex span { font-size: 9px; font-weight: 900; color: #fde68a; }
.sbb-die-hex b { font-size: 18px; line-height: 1.05; }
.sbb-btn-col { display: flex; flex-direction: column; gap: 5px; }
.sbb-btn-side {
  padding: 7px 6px; border-radius: 8px; border: 1.2px solid #8c6a32;
  background: #fffaf0; color: #2a2015; font-size: 11px; font-weight: 900; cursor: pointer; font-family: inherit;
}
.sbb-btn-side.primary { background: linear-gradient(135deg, #c69334, #9c6b1c); color: #fffbeb; border-color: #fde047; }
.sbb-btn-side.retreat { background: rgba(120, 96, 62, 0.14); font-size: 10.5px; }
body.theme-dark .sbb-btn-side:not(.primary) { background: #2e2922; color: #f4efe4; }

.sbb-res-banner { padding: 10px; border-radius: 10px; text-align: center; }
.sbb-res-banner.ok { background: rgba(22, 101, 52, 0.16); border: 1.5px solid #2f855a; }
.sbb-res-banner.fail { background: rgba(153, 27, 27, 0.16); border: 1.5px solid #c53030; }
.sbb-die-result { font-size: 12px; font-weight: 900; }
.sbb-res-title { font-family: 'Gowun Batang', serif; font-size: 14px; font-weight: 900; margin-top: 3px; }

/* 4) 길 위 상인 2장 비교 카드 (사진 3 참고!) */
.sb-ped-kicker { font-size: 11.5px; font-weight: 900; color: #8c5a18; margin-bottom: 6px; }
body.theme-dark .sb-ped-kicker { color: #fde68a; }
.sb-ped-quote {
  padding: 8px 10px; border-radius: 9px; background: rgba(138, 108, 58, 0.14);
  font-family: 'Gowun Batang', serif; font-size: 13.5px; font-weight: 900; margin-bottom: 8px;
}
.sb-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sb-item-card {
  display: flex; flex-direction: column; padding: 9px 8px; border-radius: 10px;
  background: #faf5e8; border: 1.5px solid #b89862; color: #241d15;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}
body.theme-dark .sb-item-card { background: #26221c; color: #f4efe4; border-color: #9e7e46; }
.sb-item-card.bought { opacity: 0.65; }
.sic-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 6px; }
.sic-head b { font-size: 12px; font-weight: 900; }
.sic-head span { font-size: 9.5px; padding: 1px 5px; border-radius: 6px; background: rgba(138, 108, 58, 0.2); font-weight: 800; }
.sic-mid { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.sic-ico-box {
  width: 44px; height: 44px; border-radius: 8px; background: #231d16; border: 1px solid #a87b32;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sic-stat { font-size: 10.5px; font-weight: 800; line-height: 1.35; }
.sic-desc { font-size: 10.5px; line-height: 1.4; color: #5c4b36; flex: 1; margin-bottom: 8px; }
body.theme-dark .sic-desc { color: #d6cfc2; }
.sic-buy-btn {
  width: 100%; padding: 6px 4px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, #9c6b1c, #6e4a12); color: #fffbeb;
  font-size: 11px; font-weight: 900; cursor: pointer; font-family: inherit;
}
.sic-buy-btn.poor, .sic-buy-btn.done { background: #78716c; cursor: not-allowed; opacity: 0.72; }

/* 5) 하단 어두운 목재·가죽 행낭(인벤토리) 도크 (사진 3 & 4 하단 참고!) */
.sb-satchel-dock {
  background: linear-gradient(180deg, #33251a 0%, #241911 100%);
  border-top: 2px solid #8c622b; color: #f6ead2; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}
.sbs-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sbs-eq-row { display: flex; align-items: center; gap: 5px; }
.sbs-eq-slot {
  width: 30px; height: 30px; border-radius: 7px; background: rgba(0, 0, 0, 0.42);
  border: 1.2px solid rgba(206, 162, 74, 0.35); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: rgba(255, 255, 255, 0.35);
}
.sbs-eq-slot.on { border-color: #e2b857; background: rgba(168, 123, 50, 0.26); color: #fff; }
.sbs-pow-txt { margin-left: 4px; line-height: 1.2; }
.sbs-pow-txt b { display: block; font-size: 11px; color: #fde68a; }
.sbs-pow-txt span { display: block; font-size: 10px; color: #e2d5bc; }
.sbs-toggle-btn {
  padding: 5px 10px; border-radius: 8px; border: 1px solid #c8953a;
  background: rgba(168, 123, 50, 0.28); color: #fef08a; font-size: 11px; font-weight: 900;
  cursor: pointer; font-family: inherit;
}
.sbs-grid-wrap { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(214, 169, 76, 0.32); }
.sbs-grid-hint { font-size: 10px; color: #d8c7a8; margin-bottom: 5px; text-align: center; }
.sbs-item-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.sbs-cell {
  height: 48px; border-radius: 8px; background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(168, 123, 50, 0.32); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; padding: 2px;
}
.sbs-cell.filled {
  background: rgba(68, 50, 32, 0.85); border-color: #d4a64a; color: #faf3e3; cursor: pointer; font-family: inherit;
}
.sbs-cell.filled span { font-size: 9px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ==========================================================================
 * 📜 v10.1 전 스토리 한지 책장 넘김 UI (.hanji-page-sheet) + SSS 천상 자금색(.is-sss)
 * ========================================================================== */
@keyframes hanjiPageTurn {
  0%   { opacity: 0.2; transform: translateY(18px) rotateX(6deg) scale(0.985); }
  100% { opacity: 1;   transform: translateY(0)    rotateX(0deg) scale(1); }
}
.hanji-page-sheet {
  background:
    radial-gradient(circle at 12% 10%, rgba(212, 166, 74, 0.14), transparent 46%),
    radial-gradient(circle at 90% 88%, rgba(168, 123, 50, 0.12), transparent 42%),
    linear-gradient(180deg, #f3ebd8 0%, #ebe0c8 100%) !important;
  color: #261e15 !important;
  border-top: 3px solid #9c6b1c !important;
  border-left: 1px solid rgba(156, 107, 28, 0.35) !important;
  border-right: 1px solid rgba(156, 107, 28, 0.35) !important;
  box-shadow: 0 -10px 32px rgba(24, 16, 8, 0.42), inset 0 1px 0 rgba(255, 252, 240, 0.7) !important;
  animation: hanjiPageTurn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom center;
}
body.theme-dark .hanji-page-sheet {
  background:
    radial-gradient(circle at 14% 12%, rgba(212, 166, 74, 0.10), transparent 45%),
    linear-gradient(180deg, #211d17 0%, #171410 100%) !important;
  color: #f3ebdc !important;
  border-top: 3px solid #d4a64a !important;
  border-left-color: rgba(212, 166, 74, 0.28) !important;
  border-right-color: rgba(212, 166, 74, 0.28) !important;
}
.hanji-page-hdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hanji-page-divider { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 10px; color: #8c6a32; }
.hanji-page-divider::before, .hanji-page-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(156, 107, 28, 0.48), transparent); }
.hanji-page-cutin {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin-bottom: 11px;
  border: 2px solid #4a3a26; box-shadow: 0 5px 16px rgba(32, 22, 10, 0.32), inset 0 0 0 1.5px rgba(214, 169, 76, 0.45);
}
.hanji-page-cutin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hpc-stamp {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px;
  background: rgba(20, 16, 12, 0.80); border: 1px solid rgba(214, 169, 76, 0.65);
  color: #fde68a; font-family: 'Gowun Batang', serif; font-size: 10px; font-weight: 900;
}
.hanji-page-body .sheet-title { font-family: 'Gowun Batang', 'Noto Serif KR', serif !important; color: #241b12 !important; }
body.theme-dark .hanji-page-body .sheet-title { color: #faf3e3 !important; }
.hanji-page-body .sheet-body {
  font-family: 'Gowun Batang', 'Noto Serif KR', serif !important; font-size: 13.8px !important;
  line-height: 1.72 !important; color: #2e2318 !important; white-space: pre-line;
}
body.theme-dark .hanji-page-body .sheet-body { color: #efe7d6 !important; }

/* 🌌 SSS 전용 천상 자금/오색 보라 차별화 (SS 붉은 단청과 100% 시각 분리!) */
.gacha-card.is-sss, .gacha-card.grade-sss {
  border: 2px solid #a855f7 !important;
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.92), rgba(30, 18, 56, 0.96) 55%, rgba(120, 53, 15, 0.86)) !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.48), inset 0 0 12px rgba(253, 224, 71, 0.22) !important;
}
.gacha-card.is-sss .gc-grade, .gacha-card.grade-sss .gc-grade {
  background: linear-gradient(135deg, #a855f7, #f59e0b) !important; color: #ffffff !important;
}


/* ==========================================================================
 * 🏮 v10.5 접근성(touch-action) · 컷신 수묵 낙관/체질 광채/Ken Burns 줌 · 문단 & 효과 칩!
 * ========================================================================== */
button, .btn, .chip, .opt-btn, .sb-hanji-choice {
  touch-action: manipulation;
}
@keyframes cutinKenBurns {
  0%   { opacity: 0.35; transform: scale(1.06); }
  12%  { opacity: 1;    transform: scale(1.045); }
  100% { opacity: 1;    transform: scale(1.0); }
}
.hanji-page-cutin,
.sb-brush-cutin,
.v95-cutin-banner {
  position: relative;
}
.cutin-kb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: cutinKenBurns 7.5s ease-out forwards;
  will-change: transform, opacity;
}
.cutin-seal-stack {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.cutin-seal-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(18, 16, 14, 0.80);
  border: 1.2px solid rgba(214, 169, 76, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.cutin-seal-orb img { width: 19px; height: 19px; object-fit: contain; display: block; }
.cutin-con-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.82);
  border: 1px solid rgba(214, 169, 76, 0.65);
  font-size: 9.5px;
  font-weight: 900;
  backdrop-filter: blur(3px);
}
.story-para { margin: 0 0 8px; }
.story-para:last-child { margin-bottom: 0; }
.story-fx-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.story-fx-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-family: 'Pretendard', sans-serif; font-size: 11px; font-weight: 800;
  border: 1px solid rgba(47, 124, 110, 0.42); background: rgba(47, 124, 110, 0.12); color: #1c5c50;
}
.story-fx-chip.neg { border-color: rgba(185, 60, 52, 0.45); background: rgba(185, 60, 52, 0.12); color: #9b2226; }
body.theme-dark .story-fx-chip { background: rgba(47, 124, 110, 0.28); color: #b7ebe0; }
body.theme-dark .story-fx-chip.neg { background: rgba(185, 60, 52, 0.28); color: #fecaca; }

/* === v10.6: 조합형 서사 비트 태그 배지 & 진행 바 === */
.beat-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 9px;
}
.beat-tag-kicker {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(47, 124, 110, 0.18);
  color: #1f5f53;
}
.beat-tag-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(206, 162, 74, 0.16);
  border: 1px solid rgba(168, 123, 50, 0.42);
  color: #5c4014;
}
body.theme-dark .beat-tag-kicker { background: rgba(47, 124, 110, 0.35); color: #a7f3d0; }
body.theme-dark .beat-tag-chip   { background: rgba(206, 162, 74, 0.20); color: #fde68a; border-color: rgba(214, 169, 76, 0.45); }
.beat-tracker-card { border: 1.5px solid rgba(47, 124, 110, 0.45) !important; margin-bottom: 10px; }
.beat-progress-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}
.beat-progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #2f7c6e, #d4a64a);
  transition: width 0.35s ease;
}


/* ==========================================================================
 * ⚖️ v11.0 확률바 리디자인 · 고대비 문파리그/레이드/용병/영당 다크 시트 · 칭호 배지
 * ========================================================================== */
.judge-ruler-wrap {
  padding: 12px 10px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244, 236, 218, 0.92), rgba(232, 220, 196, 0.96));
  border: 1.5px solid #a87b32;
  box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.75);
  margin: 12px 0;
}
body.theme-dark .judge-ruler-wrap {
  background: linear-gradient(180deg, #252019, #1b1712);
  border-color: #c8953a;
}
.judge-bar.v11-ruler {
  height: 28px !important;
  border-radius: 8px !important;
  border: 2px solid #4a371c;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.22);
  margin: 4px 0 10px !important;
  overflow: visible !important;
}
.judge-bar.v11-ruler .judge-green {
  background: linear-gradient(180deg, #328a74 0%, #1d5d4e 100%) !important;
  border-radius: 6px 0 0 6px !important;
  display: flex; align-items: center; justify-content: center;
  color: #f0fdf4; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,0.65);
  overflow: hidden; white-space: nowrap;
}
.judge-bar.v11-ruler .judge-red {
  background: linear-gradient(180deg, #c2423a 0%, #8a231e 100%) !important;
  border-radius: 0 6px 6px 0 !important;
  display: flex; align-items: center; justify-content: center;
  color: #fef2f2; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,0.65);
  overflow: hidden; white-space: nowrap;
}
.judge-ticks {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; justify-content: space-evenly; align-items: flex-end;
}
.judge-ticks i {
  width: 1px; height: 8px; background: rgba(253, 224, 71, 0.55); display: block;
}
.judge-bar.v11-ruler .judge-marker {
  width: 12px !important;
  height: 36px !important;
  background: linear-gradient(180deg, #fef08a 0%, #d97706 55%, #78350f 100%) !important;
  border: 2px solid #ffffff !important;
  border-radius: 4px 4px 999px 999px !important;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.85), 0 3px 8px rgba(0, 0, 0, 0.55) !important;
  z-index: 4;
}

/* 고대비 문파리그 / 레이드 / 용병 / 영당 시트 */
.v11-dark-sheet {
  background: linear-gradient(180deg, #161a22 0%, #101319 100%) !important;
  color: #f8fafc !important;
  border-top: 2.5px solid #d4a64a !important;
}
.v11-panel {
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(28, 34, 44, 0.92);
  border: 1px solid rgba(214, 169, 76, 0.35);
}
.v11-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(26, 32, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.v11-member-card.active {
  background: linear-gradient(135deg, rgba(84, 56, 18, 0.62), rgba(26, 32, 42, 0.95));
  border-color: #eab308;
}
.v11-title-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(168, 123, 50, 0.35), rgba(116, 34, 38, 0.45));
  border: 1px solid #fde047;
  color: #fef08a;
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}
.v11-rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(15, 20, 28, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.v11-rank-row.me {
  background: linear-gradient(135deg, rgba(96, 66, 20, 0.55), rgba(28, 34, 46, 0.92));
  border-color: #fde047;
}
.v11-rk-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(148, 163, 184, 0.25); color: #e2e8f0;
  font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.v11-rk-num.top { background: linear-gradient(135deg, #eab308, #b45309); color: #111827; }

/* 3진영 무림 레이드 카드 */
.v11-raid-fac-btn {
  padding: 8px 5px;
  border-radius: 12px;
  background: rgba(24, 30, 40, 0.94);
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  color: #f8fafc;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.v11-raid-fac-btn.active {
  border: 2px solid var(--fac-col, #fde047);
  background: linear-gradient(180deg, rgba(64, 48, 22, 0.72), rgba(20, 24, 34, 0.96));
  box-shadow: 0 0 14px rgba(253, 224, 71, 0.28);
}
.vrf-badge { font-size: 10.5px; font-weight: 900; color: #fde68a; }
.vrf-boss  { font-size: 10.5px; font-weight: 800; color: #e2e8f0; margin-top: 2px; }
.vrf-sub   { font-size: 9.5px; font-weight: 900; color: #86efac; margin-top: 3px; }
.v11-raid-stage {
  padding: 12px;
  border-radius: 13px;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(214, 169, 76, 0.55);
}
.v11-price-input {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(214, 169, 76, 0.5);
  background: rgba(12, 16, 22, 0.85);
  color: #fde68a;
  font-size: 12.5px;
  font-weight: 900;
  font-family: inherit;
}


/* ==========================================================================
 * 🏮 v11.1 정중앙 전서구 모달 · 화이트/다크 완전 분리 · 고퀄 확률 게이지 · 3진영 무림 지도 핀
 * ========================================================================== */
.event-backdrop {
  align-items: center !important;
  justify-content: center !important;
  padding: 20px 12px calc(20px + env(safe-area-inset-bottom)) !important;
}
.event-sheet {
  border-radius: 22px !important;
  max-height: 84vh !important;
  padding: 14px 18px 18px !important;
  box-shadow: 0 18px 48px rgba(14, 18, 26, 0.42) !important;
}
.sheet-handle { display: none; }

/* 은원보 탑바 아이콘 정렬 */
.syb-svg { width: 17px; height: 17px; flex-shrink: 0; }

/* 컷신 프레임 — 어색한 빨간 외곽선 제거, 절제된 먹선·금박 액자 */
.hanji-page-cutin,
.sb-brush-cutin,
.v95-cutin-banner {
  border: 2px solid #59462a !important;
  box-shadow: 0 6px 18px rgba(24, 18, 10, 0.28), inset 0 0 0 1px rgba(214, 169, 76, 0.42) !important;
}

/* 화이트/다크 자동 대응 시트 (.v11-themed-sheet) — 화이트 모드에선 밝은 한지, 다크 모드에선 야간 먹색! */
:root {
  --v11-sep: rgba(120, 96, 62, 0.18);
}
body.theme-dark {
  --v11-sep: rgba(255, 255, 255, 0.10);
}
.v11-themed-sheet {
  background: linear-gradient(180deg, #faf6ec 0%, #f1e9d6 100%) !important;
  color: #1f1912 !important;
  border: 1.5px solid #c69a47 !important;
}
body.theme-dark .v11-themed-sheet {
  background: linear-gradient(180deg, #1a1f28 0%, #12161d 100%) !important;
  color: #f3f6fb !important;
  border: 1.5px solid rgba(214, 169, 76, 0.55) !important;
}
.v11-themed-sheet .sheet-title { color: #1d160e !important; }
body.theme-dark .v11-themed-sheet .sheet-title { color: #ffffff !important; }

.v11-kicker {
  font-size: 11px; font-weight: 900; letter-spacing: 0.3px;
  color: #8c6218;
}
body.theme-dark .v11-kicker { color: #fde68a; }
.v11-subline { font-size: 12px; color: #473c2c; margin-top: 3px; font-weight: 700; }
body.theme-dark .v11-subline { color: #cbd5e1; }
.v11-sec-ttl { font-size: 12.5px; font-weight: 900; color: #3b2d18; }
body.theme-dark .v11-sec-ttl { color: #fde68a; }
.v11-row-name { font-size: 13px; font-weight: 900; color: #1e1810; }
body.theme-dark .v11-row-name { color: #ffffff; }
.v11-muted-xs { font-size: 11px; color: #645848; }
body.theme-dark .v11-muted-xs { color: #94a3b8; }
.v11-accent { color: #9a6700; font-weight: 900; }
body.theme-dark .v11-accent { color: #fde047; }
.v11-ok-txt { color: #1b6e58; font-weight: 900; }
body.theme-dark .v11-ok-txt { color: #86efac; }

.v11-themed-sheet .v11-panel {
  background: rgba(255, 252, 245, 0.88) !important;
  border: 1px solid rgba(168, 123, 50, 0.30) !important;
  color: #241c13 !important;
}
body.theme-dark .v11-themed-sheet .v11-panel {
  background: rgba(28, 34, 46, 0.92) !important;
  border-color: rgba(214, 169, 76, 0.32) !important;
  color: #f1f5f9 !important;
}
.v11-themed-sheet .v11-member-card {
  background: #ffffff !important;
  border: 1px solid rgba(148, 128, 96, 0.32) !important;
  color: #1f1912 !important;
}
.v11-themed-sheet .v11-member-card.active {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-color: #d97706 !important;
}
body.theme-dark .v11-themed-sheet .v11-member-card {
  background: rgba(26, 32, 44, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #f8fafc !important;
}
body.theme-dark .v11-themed-sheet .v11-member-card.active {
  background: linear-gradient(135deg, rgba(92, 62, 18, 0.62), rgba(26, 32, 44, 0.96)) !important;
  border-color: #eab308 !important;
}
.v11-themed-sheet .v11-rank-row {
  background: #ffffff !important;
  border: 1px solid rgba(148, 128, 96, 0.26) !important;
}
.v11-themed-sheet .v11-rank-row.me {
  background: #fef9c3 !important;
  border-color: #d97706 !important;
}
body.theme-dark .v11-themed-sheet .v11-rank-row {
  background: rgba(15, 20, 28, 0.78) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}
body.theme-dark .v11-themed-sheet .v11-rank-row.me {
  background: linear-gradient(135deg, rgba(96, 66, 20, 0.55), rgba(28, 34, 46, 0.92)) !important;
  border-color: #fde047 !important;
}
.v11-themed-sheet .v11-title-badge {
  background: #fef3c7 !important;
  border: 1px solid #d97706 !important;
  color: #92400e !important;
}
body.theme-dark .v11-themed-sheet .v11-title-badge {
  background: rgba(168, 123, 50, 0.35) !important;
  border-color: #fde047 !important;
  color: #fef08a !important;
}
.v11-themed-sheet .v11-price-input {
  background: #ffffff !important;
  color: #1f1912 !important;
  border: 1.5px solid #c69a47 !important;
}
body.theme-dark .v11-themed-sheet .v11-price-input {
  background: #0f141c !important;
  color: #fde68a !important;
}
.v11-themed-sheet .btn-outline {
  background: #ffffff !important;
  color: #241c13 !important;
  border: 1.5px solid #c6b69b !important;
}
body.theme-dark .v11-themed-sheet .btn-outline {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
}

/* 문파 리그전 콤팩트 3열 요약 바 */
.v11-stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.v11-stat-strip > div {
  padding: 7px 6px; border-radius: 10px; text-align: center;
  background: rgba(255, 252, 245, 0.9); border: 1px solid rgba(168, 123, 50, 0.28);
}
body.theme-dark .v11-stat-strip > div {
  background: rgba(28, 34, 46, 0.92); border-color: rgba(214, 169, 76, 0.28);
}
.v11-stat-strip span { display: block; font-size: 10px; color: #6b5e4d; }
body.theme-dark .v11-stat-strip span { color: #94a3b8; }
.v11-stat-strip b { font-size: 12px; font-weight: 900; }

.v11-bar-track { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.24); overflow: hidden; }
.v11-bar-track > div { height: 100%; border-radius: 999px; transition: width 0.3s ease; }

/* 🗺️ 무림 지도 위 3진영 핀 (클릭 영역 넉넉하고 시인성 최상) */
.v11-raid-map {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 14px;
  background-size: cover; background-position: center;
  border: 2px solid #8c6a32; overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
}
.v11-map-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 8px; border-radius: 12px;
  background: rgba(18, 22, 30, 0.88);
  border: 2px solid var(--fac-col, #d4a64a);
  color: #ffffff; font-size: 10.5px; font-weight: 900; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v11-map-pin.active {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--fac-col, #9a6700);
  border-color: #fef08a;
  box-shadow: 0 0 18px rgba(253, 224, 71, 0.72);
}
.v11-map-pin img { object-fit: contain; image-rendering: pixelated; display: block; }

/* ⚖️ 고퀄 확률 게이지 (.judge-scroll-box / .v111-gauge) */
.judge-scroll-box {
  padding: 14px 12px 12px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 169, 76, 0.18), transparent 65%),
    linear-gradient(180deg, #f8f1e0 0%, #ece0c4 100%);
  border: 2px solid #9c6b1c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 18px rgba(32, 22, 8, 0.18);
  margin: 12px 0;
}
body.theme-dark .judge-scroll-box {
  background: linear-gradient(180deg, #252019 0%, #171410 100%);
  border-color: #d4a64a;
}
.judge-scroll-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 800; margin-bottom: 10px;
}
.jsh-ok { color: #16654e; }
.jsh-fail { color: #9f2222; }
.jsh-mid {
  font-family: 'Gowun Batang', serif; font-size: 11px; font-weight: 900;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(156, 107, 28, 0.16); color: #7a5010;
}
body.theme-dark .jsh-ok { color: #6ee7b7; }
body.theme-dark .jsh-fail { color: #fca5a5; }
body.theme-dark .jsh-mid { background: rgba(214, 169, 76, 0.22); color: #fde68a; }

.judge-bar.v111-gauge {
  height: 30px !important;
  border-radius: 10px !important;
  border: 2.5px solid #3f2e15 !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.42), 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  margin: 0 0 6px !important;
  position: relative;
  overflow: visible !important;
}
.judge-bar.v111-gauge .judge-green {
  background: linear-gradient(180deg, #3ba88c 0%, #1f745e 52%, #144d3e 100%) !important;
  border-radius: 7px 0 0 7px !important;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.28);
}
.judge-bar.v111-gauge .judge-red {
  background: linear-gradient(180deg, #d14c44 0%, #a12924 52%, #6d1815 100%) !important;
  border-radius: 0 7px 7px 0 !important;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.22);
}
.judge-divider {
  position: absolute; top: -3px; bottom: -3px; width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #fef08a, #d97706);
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.85);
  z-index: 3; pointer-events: none;
}
.judge-bar.v111-gauge .judge-marker {
  width: 14px !important;
  height: 40px !important;
  background: linear-gradient(180deg, #fffbeb 0%, #f59e0b 45%, #78350f 100%) !important;
  border: 2px solid #ffffff !important;
  border-radius: 5px 5px 999px 999px !important;
  box-shadow: 0 0 14px rgba(253, 224, 71, 0.92), 0 4px 10px rgba(0, 0, 0, 0.55) !important;
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.jm-gem {
  width: 5px; height: 5px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 0 6px #fef08a;
}
.judge-foot-scale {
  display: flex; justify-content: space-between;
  font-size: 9.5px; font-weight: 800; color: #7c6a4e; padding: 0 2px;
}
body.theme-dark .judge-foot-scale { color: #94a3b8; }

/* 화이트 모드 시 dark-only full-art-sheet 버튼 가독성 보강 */
.full-art-sheet .btn-outline {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.36) !important;
}


/* ==========================================================================
 * 🎓 v1.0.4 슬림 미니멀 스포트라이트 튜토리얼 (0px 픽셀 락 · 다크 글래스 툴팁)
 * ========================================================================== */
#tutorial-root {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
}
.tut-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.tut-blocker {
  position: fixed;
  pointer-events: auto;
  background: transparent;
  z-index: 9501;
}
.tut-spotlight {
  position: fixed;
  z-index: 9502;
  border-radius: 12px;
  border: 2px solid rgba(253, 224, 71, 0.92);
  box-shadow:
    0 0 0 9999px rgba(8, 12, 20, 0.72),
    0 0 18px rgba(253, 224, 71, 0.55);
  pointer-events: none;
  animation: tutGlowSoft 2s ease-in-out infinite;
}
@keyframes tutGlowSoft {
  0%, 100% {
    border-color: rgba(253, 224, 71, 0.85);
    box-shadow: 0 0 0 9999px rgba(8, 12, 20, 0.72), 0 0 14px rgba(253, 224, 71, 0.45);
  }
  50% {
    border-color: rgba(255, 251, 235, 0.98);
    box-shadow: 0 0 0 9999px rgba(8, 12, 20, 0.72), 0 0 24px rgba(253, 224, 71, 0.78);
  }
}
.tut-tooltip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 28px));
  z-index: 9505;
  pointer-events: auto;
  background: rgba(18, 23, 33, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  border: 1px solid rgba(253, 224, 71, 0.42);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
}
.tut-tt-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.tut-tt-step {
  font-size: 10.5px;
  font-weight: 800;
  color: #fde047;
  background: rgba(253, 224, 71, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.tut-tt-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  flex: 1;
  min-width: 0;
}
.tut-tt-skip {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 4px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.tut-tt-body {
  font-size: 12.2px;
  line-height: 1.5;
  color: #cbd5e1;
}
.tut-tt-body b {
  color: #fef08a;
  font-weight: 800;
}
.tut-tt-next {
  margin-top: 10px;
  width: 100%;
  min-height: 36px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #14110b;
  font-size: 12.5px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
}


/* ==========================================================================
 * ✨ v1.0.6 촉각 터치 피드백 · 효과음 미리듣기 · 라이트/다크 천명 소환 전면 정돈
 * ========================================================================== */
button, .btn, .tab-btn, .stat-tile, .opt-btn, .g-sum-btn, .g-pool-pill,
.home-stat-btn, .costume-card, .sfx-preview-btn, .g-foot-btn, .codex-logo-tile {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.11s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.12s ease, background-color 0.14s ease, border-color 0.14s ease;
}
button:not(:disabled):active,
.btn:not(:disabled):active,
.tab-btn:not(:disabled):active,
.stat-tile:not(:disabled):active,
.opt-btn:not(:disabled):active,
.g-sum-btn:not(:disabled):active,
.g-pool-pill:not(:disabled):active,
.home-stat-btn:not(:disabled):active,
.costume-card:not(:disabled):active,
.sfx-preview-btn:not(:disabled):active,
.g-foot-btn:not(:disabled):active,
.gh-tapped {
  transform: scale(0.962) translateY(1px) !important;
  filter: brightness(0.95);
}
.gh-touch-ripple {
  position: fixed;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  border: 2px solid rgba(212, 166, 74, 0.72);
  background: radial-gradient(circle, rgba(253, 224, 71, 0.36) 0%, rgba(212, 166, 74, 0) 70%);
  animation: ghTouchRipple 0.38s cubic-bezier(0.18, 0.89, 0.32, 1) forwards;
}
@keyframes ghTouchRipple {
  0%   { transform: scale(0.45); opacity: 0.95; }
  100% { transform: scale(2.45); opacity: 0; }
}

/* 🎧 옵션창 효과음 미리듣기 6버튼 — 전부 동일한 톤 + 클릭 시 반짝 피드백! */
.sfx-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 10px;
}
.sfx-preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 36px;
  padding: 5px 4px;
  border-radius: 10px;
  border: 1.5px solid #d2c5ab;
  background: #ffffff;
  color: #2c2419;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.sfx-preview-btn.is-playing {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  border-color: #d97706 !important;
  color: #78350f !important;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22);
}
body.theme-dark .sfx-preview-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}
body.theme-dark .sfx-preview-btn.is-playing {
  background: rgba(234, 179, 8, 0.28) !important;
  border-color: #facc15 !important;
  color: #fef08a !important;
}

/* 🎴 천명 소환 — 라이트 모드(밝은 한지) vs 다크 모드(야간 먹색) 완전 분리 & 슬림 정돈 */
.gacha-shell.v106-gacha {
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, #faf6ec 0%, #f1e9d5 100%) !important;
  color: #1f1912 !important;
  border: 1.5px solid #d6c39c !important;
  box-shadow: 0 6px 20px rgba(48, 36, 16, 0.08);
}
body.theme-dark .gacha-shell.v106-gacha {
  background: linear-gradient(180deg, #131824 0%, #0b0f18 100%) !important;
  color: #f1f5f9 !important;
  border: 1.5px solid rgba(214, 169, 76, 0.34) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.v106-gacha .gacha-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.v106-gacha .gacha-back-btn,
.v106-gacha .gacha-skip-toggle {
  background: #ffffff;
  color: #2c2419;
  border: 1px solid #d4c5a8;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.v106-gacha .gacha-skip-toggle.on {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
body.theme-dark .v106-gacha .gacha-back-btn,
body.theme-dark .v106-gacha .gacha-skip-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}
body.theme-dark .v106-gacha .gacha-skip-toggle.on {
  background: rgba(234, 179, 8, 0.25);
  border-color: #facc15;
  color: #fef08a;
}

.v106-gacha .gacha-res-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.v106-gacha .g-pill {
  background: #ffffff;
  color: #3f3425;
  border: 1px solid #dfd3ba;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
}
.v106-gacha .g-pill.gold {
  background: #fef9c3;
  border-color: #d97706;
  color: #854d0e;
}
body.theme-dark .v106-gacha .g-pill {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.14);
}
body.theme-dark .v106-gacha .g-pill.gold {
  background: rgba(217, 119, 6, 0.25);
  border-color: rgba(250, 204, 21, 0.5);
  color: #fde68a;
}

.v106-gacha .gacha-kept-banner {
  background: #fffbeb;
  border: 1.5px solid #d97706;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.v106-gacha .gkb-title { font-size: 11.5px; font-weight: 900; color: #92400e; }
.v106-gacha .gkb-sub   { font-size: 10.5px; color: #6b5e4d; margin-top: 2px; }
body.theme-dark .v106-gacha .gacha-kept-banner {
  background: rgba(92, 62, 18, 0.45);
  border-color: rgba(250, 204, 21, 0.55);
}
body.theme-dark .v106-gacha .gkb-title { color: #fef08a; }
body.theme-dark .v106-gacha .gkb-sub   { color: #cbd5e1; }

.v106-banner {
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #c9b386;
  margin-bottom: 9px;
}
body.theme-dark .v106-banner { border-color: rgba(214, 169, 76, 0.42); }
.v106-banner .gacha-banner-art {
  aspect-ratio: 16 / 9;
  min-height: 158px;
  background-size: cover;
  background-position: center 22%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  position: relative;
}
.v106-banner .gacha-banner-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.36) 0%, rgba(10, 14, 22, 0.08) 45%, rgba(10, 14, 22, 0.84) 100%);
  pointer-events: none;
}
.v106-banner .gacha-banner-top,
.v106-banner .gacha-banner-caption { position: relative; z-index: 2; }
.v106-banner .gacha-banner-top { display: flex; justify-content: space-between; align-items: center; }
.v106-banner .gacha-pool-badge {
  background: rgba(15, 23, 42, 0.72);
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.v106-banner .gacha-odds-chip {
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  border: none;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.v106-banner .gacha-banner-title { font-size: 16.5px; font-weight: 900; color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.65); }
.v106-banner .gacha-banner-sub   { font-size: 11px; color: #e2e8f0; margin-top: 2px; }

/* 슬림 천장 진행 바 */
.gacha-pity-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 9px;
}
.gp-box {
  background: #ffffff;
  border: 1px solid #e0d4bc;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 11px;
  color: #3f3425;
}
.gp-box.ready { border-color: #d97706; background: #fffbeb; }
.gp-box b { font-weight: 900; color: #9a6700; }
.gp-track { height: 4px; border-radius: 999px; background: rgba(148, 128, 96, 0.22); margin-top: 4px; overflow: hidden; }
.gp-track > div { height: 100%; background: linear-gradient(90deg, #d97706, #f59e0b); border-radius: 999px; }
body.theme-dark .gp-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}
body.theme-dark .gp-box b { color: #fde047; }
body.theme-dark .gp-box.ready { border-color: #facc15; background: rgba(168, 123, 50, 0.28); }

/* 3×2 미니멀 소환 풀 칩 */
.v106-pools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.v106-pools .g-pool-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 11px;
  background: #ffffff;
  border: 1.5px solid #e2d7c1;
  color: #2c2419;
  text-align: left;
  cursor: pointer;
}
.v106-pools .g-pool-pill.active {
  background: #fffbeb;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.16);
}
.v106-pools .gpp-txt b { display: block; font-size: 11.5px; font-weight: 900; line-height: 1.2; }
.v106-pools .gpp-txt span { font-size: 10px; color: #786a56; }
body.theme-dark .v106-pools .g-pool-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
body.theme-dark .v106-pools .g-pool-pill.active {
  background: rgba(168, 123, 50, 0.26);
  border-color: #facc15;
}
body.theme-dark .v106-pools .gpp-txt span { color: #94a3b8; }

/* 병기 특화 선택 바 (라이트/다크 대응) */
.v106-gacha .gacha-wep-bar {
  background: #ffffff;
  border: 1px solid #dfd3ba;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 10px;
}
.v106-gacha .gwb-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: #473c2c; margin-bottom: 6px; }
.v106-gacha .gwb-btn { background: #faf6ec; border: 1px solid #dfd3ba; color: #2c2419; border-radius: 9px; padding: 5px 4px; }
.v106-gacha .gwb-btn.active { background: #fef3c7; border-color: #d97706; color: #92400e; }
body.theme-dark .v106-gacha .gacha-wep-bar { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); }
body.theme-dark .v106-gacha .gwb-head { color: #fde68a; }
body.theme-dark .v106-gacha .gwb-btn { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); color: #e2e8f0; }
body.theme-dark .v106-gacha .gwb-btn.active { background: rgba(234,179,8,0.25); border-color: #facc15; color: #fef08a; }

/* 2×2 소환 버튼 정돈 (라이트/다크 선명한 대비) */
.v106-gacha .gacha-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 7px;
}
.v106-gacha .g-sum-btn {
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.v106-gacha .g-sum-btn.normal,
.v106-gacha .g-sum-btn.ad-wide {
  background: linear-gradient(135deg, #1b6b59 0%, #145345 100%);
  border-color: #2f967f;
  color: #ffffff;
}
.v106-gacha .g-sum-btn.reroll-pull {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #64748b;
  color: #ffffff;
}
.v106-gacha .g-sum-btn.premium {
  background: linear-gradient(135deg, #b47815 0%, #8c570b 100%);
  border-color: #eab308;
  color: #ffffff;
}
.v106-gacha .g-sum-btn.premium10 {
  background: linear-gradient(135deg, #9f2924 0%, #731a17 100%);
  border-color: #ef4444;
  color: #ffffff;
}
.v106-gacha .g-sum-btn .gs-title { font-size: 13px; font-weight: 900; color: #ffffff; }
.v106-gacha .g-sum-btn .gs-sub   { font-size: 10.5px; color: rgba(255, 255, 255, 0.88); margin-top: 2px; }

/* 하단 2칸 푸터 + 규칙 1줄 */
.gacha-foot-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 2px;
}
.g-foot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d9cbb0;
  color: #2c2419;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.g-foot-btn small { font-size: 10px; color: #8c6218; font-weight: 800; }
body.theme-dark .g-foot-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}
body.theme-dark .g-foot-btn small { color: #fde047; }
.gacha-rule-single {
  text-align: center;
  font-size: 10px;
  color: #7c6f5b;
  margin-top: 7px;
}
body.theme-dark .gacha-rule-single { color: #94a3b8; }

/* 라이트 모드 시 결과·확정 화면 카드 가독성 보강 */
body:not(.theme-dark) .v106-gacha .gacha-detail-card,
body:not(.theme-dark) .v106-gacha .gacha-batch-section,
body:not(.theme-dark) .v106-gacha .gacha-qi-box,
body:not(.theme-dark) .v106-gacha .gacha-confirm-card {
  background: #ffffff !important;
  border-color: #dfd2b8 !important;
  color: #1f1912 !important;
}
body:not(.theme-dark) .v106-gacha .g-kpi {
  background: #faf6ec !important;
  border-color: #e5d9c2 !important;
  color: #2c2419 !important;
}
body:not(.theme-dark) .v106-gacha .g-kpi span { color: #6b5e4d !important; }
body:not(.theme-dark) .v106-gacha .g-kpi b    { color: #1f1912 !important; }
body:not(.theme-dark) .v106-gacha .g-keep-go-btn {
  background: #f0fdf4 !important;
  border-color: #15803d !important;
  color: #14532d !important;
}
body:not(.theme-dark) .v106-gacha .btn-outline {
  background: #ffffff !important;
  color: #241c13 !important;
  border-color: #cbbba0 !important;
}

/* v1.0.8 초기 무력 배지 & 튜토리얼 자유 비교 단계 확정 버튼 강조 */
.g-ovr-badge {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  color: #fde047 !important;
  border: 1px solid rgba(250, 204, 21, 0.55) !important;
  font-weight: 900 !important;
}
body:not(.theme-dark) .v106-gacha .g-ovr-badge {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #d97706 !important;
}
@keyframes tutFreePulse {
  0%, 100% {
    box-shadow: 0 0 0 2.5px rgba(250, 204, 21, 0.92), 0 0 14px rgba(250, 204, 21, 0.45);
  }
  50% {
    box-shadow: 0 0 0 3.5px rgba(254, 240, 138, 1), 0 0 22px rgba(250, 204, 21, 0.78);
  }
}
.tut-free-glow {
  position: relative;
  box-shadow: 0 0 0 2.5px rgba(250, 204, 21, 0.95), 0 0 16px rgba(250, 204, 21, 0.55) !important;
  animation: tutFreePulse 1.6s ease-in-out infinite !important;
}

/* v1.0.9 신규 명품 소액 외형 NEW 뱃지 */
.costume-card.is-new-cos { border-color: rgba(217, 119, 6, 0.55); }
.costume-thumb { position: relative; }
.cos-new-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, #e11d48, #d97706);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: 0.4px;
}


/* ==========================================================================
 * 🌙 v1.1.3 전 화면 다크 모드(body.theme-dark) 가독성·대비 완전 보강 패치
 * ========================================================================== */
.help-box-gold {
  background: #fdf7e3;
  border-color: #e5cb82;
}
.scroll-empty-msg {
  padding: 18px;
  font-size: 12.5px;
  color: #5c4b32;
  font-weight: 700;
}
.mission-tree-ttl {
  font-size: 12.5px;
  font-weight: 900;
  color: #5c3a0e;
}
.mission-tree-desc {
  font-size: 11.5px;
  padding: 0 4px;
  margin-bottom: 8px;
  color: #4a3b24;
  font-weight: 600;
}
.txt-ok   { color: #059669; }
.txt-jade { color: #0f766e; }

body.theme-dark .help-box-gold {
  background: rgba(180, 130, 30, 0.16) !important;
  border-color: rgba(250, 204, 21, 0.45) !important;
  color: #fef3c7 !important;
}
body.theme-dark .scroll-empty-msg,
body.theme-dark .mission-tree-desc {
  color: #cbd5e1 !important;
}
body.theme-dark .mission-tree-ttl {
  color: #fde68a !important;
}
body.theme-dark .txt-ok   { color: #4ade80 !important; }
body.theme-dark .txt-jade { color: #5eead4 !important; }

/* 1) 모달·시트·전서구·결과창·입력창·셀렉트 다크 모드 대비 */
body.theme-dark .letter-box,
body.theme-dark .res-sheet,
body.theme-dark .auction-slot,
body.theme-dark .sp-row,
body.theme-dark .code-area,
body.theme-dark .odds-origin-row {
  background: #1a2330 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .auction-slot.bought {
  background: rgba(30, 41, 59, 0.55) !important;
  opacity: 0.72;
}
body.theme-dark .sp-row.ready {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: rgba(250, 204, 21, 0.55) !important;
}
body.theme-dark .dt-danger-box {
  background: rgba(153, 27, 27, 0.28) !important;
  border-color: rgba(248, 113, 113, 0.55) !important;
  color: #fecaca !important;
}
body.theme-dark .defer-btn {
  background: #232f40 !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .code-area::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #94a3b8 !important;
}
body.theme-dark select,
body.theme-dark select option {
  background-color: #17202c !important;
  color: #f3f6fb !important;
}

/* 2) 캐릭터 꾸미기 모달(.cos-item) · 칭호칩 · 챕터탭 · 체크박스 다크 모드 대비 */
body.theme-dark .cos-item {
  background: #1a2330 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .cos-item.active {
  background: rgba(217, 119, 6, 0.24) !important;
  border-color: #fbbf24 !important;
}
body.theme-dark .cos-item.locked {
  background: rgba(20, 28, 38, 0.85) !important;
  color: #cbd5e1 !important;
}
body.theme-dark .cos-price.silver {
  background: #283548 !important;
  color: #e2e8f0 !important;
}
body.theme-dark .cos-price.owned {
  background: rgba(16, 185, 129, 0.24) !important;
  color: #6ee7b7 !important;
}
body.theme-dark .chapter-tab {
  background: #1a2330 !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  color: #cbd5e1 !important;
}
body.theme-dark .chapter-tab.active {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  border-color: #fde047 !important;
  color: #ffffff !important;
}
body.theme-dark .title-chip {
  background: #1c2736 !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .title-chip.active {
  background: rgba(217, 119, 6, 0.28) !important;
  border-color: #fbbf24 !important;
  color: #fef08a !important;
}
body.theme-dark .g-sq {
  background: #1e293b !important;
  border-color: #64748b !important;
}

/* 3) 배지 · 경고줄 · 상태필 · 확률표 테이블 다크 모드 대비 */
body.theme-dark .inj-debuff-line.warn {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.48) !important;
  color: #fde68a !important;
}
body.theme-dark .inj-debuff-line.crit {
  background: rgba(220, 38, 38, 0.26) !important;
  border-color: rgba(248, 113, 113, 0.55) !important;
  color: #fecaca !important;
}
body.theme-dark .req-miss-tag {
  background: rgba(220, 38, 38, 0.22) !important;
  color: #fca5a5 !important;
}
body.theme-dark .req-miss-tag.ok {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #6ee7b7 !important;
}
body.theme-dark .sheet-kicker.train,
body.theme-dark .sheet-kicker.event,
body.theme-dark .sheet-kicker.offer,
body.theme-dark .sheet-kicker.summary {
  background: rgba(217, 119, 6, 0.20) !important;
  color: #fde68a !important;
}
body.theme-dark .sheet-kicker.danger {
  background: rgba(220, 38, 38, 0.26) !important;
  color: #fecaca !important;
}
body.theme-dark .attr-ovr-pill {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fde68a !important;
}
body.theme-dark .exp-odd-pill.mythic {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #e9d5ff !important;
}
body.theme-dark .exp-odd-pill.jackpot {
  background: rgba(217, 119, 6, 0.25) !important;
  color: #fde68a !important;
}
body.theme-dark .exp-odd-pill.danger,
body.theme-dark .exp-odd-pill.fatal {
  background: rgba(220, 38, 38, 0.26) !important;
  color: #fecaca !important;
}
body.theme-dark .duel-out-badge.win {
  background: rgba(16, 185, 129, 0.24) !important;
  color: #6ee7b7 !important;
}
body.theme-dark .duel-out-badge.lose {
  background: rgba(220, 38, 38, 0.24) !important;
  color: #fca5a5 !important;
}
body.theme-dark .duel-out-badge.draw {
  background: rgba(148, 163, 184, 0.22) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .dt-pill.def {
  background: rgba(56, 189, 248, 0.20) !important;
  color: #bae6fd !important;
}
body.theme-dark .dt-pill.crit {
  background: rgba(245, 158, 11, 0.24) !important;
  color: #fde68a !important;
}
body.theme-dark .dt-pill.evade {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #6ee7b7 !important;
}
body.theme-dark .dt-pill.poison {
  background: rgba(168, 85, 247, 0.24) !important;
  color: #e9d5ff !important;
}

/* 4) 두루마리 · 연표 · 명예전당 배너 · 파견 · 텍스트 클래스 다크 모드 대비 */
body.theme-dark .hanji-scroll-track {
  background-color: #161d27 !important;
  background-image: none !important;
}
body.theme-dark .scroll-step-card,
body.theme-dark .scroll-step-card.ink-light,
body.theme-dark .scroll-step-card.ink-deep {
  background: #1f2a38 !important;
  border-color: rgba(214, 169, 76, 0.35) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .meridian-gate span {
  color: #cbd5e1 !important;
  background: rgba(16, 21, 28, 0.85) !important;
}
body.theme-dark .hall-season-notice.s1 {
  background: rgba(51, 65, 85, 0.45) !important;
  border-color: rgba(148, 163, 184, 0.40) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .hall-season-notice.s2 {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.48) !important;
  color: #fde68a !important;
}
body.theme-dark .chronicle-item.start,
body.theme-dark .chronicle-item.end {
  background: #1d2736 !important;
  border-color: rgba(251, 191, 36, 0.42) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .hq-mission-btn.selected {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #fef3c7 !important;
}
body.theme-dark .war-match-line.mine {
  background: rgba(217, 119, 6, 0.22) !important;
  color: #fef3c7 !important;
}
body.theme-dark .sub-attr-name,
body.theme-dark .patch-list,
body.theme-dark .journey-hl {
  color: #cbd5e1 !important;
}
body.theme-dark .chance-pct {
  color: #f8fafc !important;
}
body.theme-dark .enh-log-ok,
body.theme-dark .res-big.ok,
body.theme-dark .mcl-item.green,
body.theme-dark .sbb-tag.jade {
  color: #4ade80 !important;
}
body.theme-dark .orb-row.qi {
  color: #60a5fa !important;
}
body.theme-dark .v106-banner .gacha-odds-chip {
  background: rgba(15, 23, 42, 0.86) !important;
  color: #fde68a !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
}
body.theme-dark table thead tr {
  background: rgba(255, 255, 255, 0.06) !important;
}


/* ==========================================================================
 * ✨ v1.1.4 뽑기 결과창 슬림 접기 + 결과·확정 화면 라이트/다크 완벽 대응
 * ========================================================================== */
.v114-hero-compact {
  padding: 6px 0 4px !important;
  gap: 3px !important;
}
.gacha-slim-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 11px;
  margin: 8px 0 6px;
  background: #faf6ec;
  border: 1px solid #dfd2b8;
}
body.theme-dark .gacha-slim-summary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.gss-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  line-height: 1.3;
}
.gacha-detail-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px dashed #c9b386;
  background: #f5efe0;
  color: #5c4620;
  font-size: 11.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  margin-top: 2px;
}
.gacha-detail-toggle.open {
  border-style: solid;
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
body.theme-dark .gacha-detail-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(250, 204, 21, 0.34);
  color: #fde68a;
}
body.theme-dark .gacha-detail-toggle.open {
  background: rgba(217, 119, 6, 0.22);
  border-color: #facc15;
  color: #fef08a;
}
.gacha-detail-drawer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(180, 148, 92, 0.28);
}

/* 테마 대응 시맨틱 텍스트 (.gr-*) */
.v114-res-shell .gr-title  { color: #1f1912; }
.v114-res-shell .gr-sub    { color: #5c4d3a; }
.v114-res-shell .gr-accent { color: #9a5b00; }
.v114-res-shell .gr-ok     { color: #15803d; }
.v114-res-shell .gr-bad    { color: #dc2626; }

body.theme-dark .v114-res-shell .gr-title  { color: #f8fafc; }
body.theme-dark .v114-res-shell .gr-sub    { color: #cbd5e1; }
body.theme-dark .v114-res-shell .gr-accent { color: #fde047; }
body.theme-dark .v114-res-shell .gr-ok     { color: #86efac; }
body.theme-dark .v114-res-shell .gr-bad    { color: #fca5a5; }

.g-qi-uncheck-chip {
  background: #f1e9d5 !important;
  color: #78350f !important;
  border: 1px solid #d4b87c !important;
  font-weight: 900 !important;
  cursor: pointer;
}
body.theme-dark .g-qi-uncheck-chip {
  background: #334155 !important;
  color: #fde68a !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
}

/* 라이트 모드에서 결과·확정 카드 컨테이너 전체 한지/백색 대비 완벽 보정 */
body:not(.theme-dark) .v114-res-shell .gacha-keep-compare,
body:not(.theme-dark) .v114-res-shell .gacha-multi-box,
body:not(.theme-dark) .v114-res-shell .gacha-res-card,
body:not(.theme-dark) .v114-res-shell .gacha-res-card.scroll-ink,
body:not(.theme-dark) .v114-res-shell .gacha-basic-box {
  background: #ffffff !important;
  border-color: #d9c8a5 !important;
  color: #1f1912 !important;
  box-shadow: 0 3px 12px rgba(48, 36, 16, 0.07) !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-res-card.gold-b {
  border-color: #d97706 !important;
  background: linear-gradient(180deg, #fffdf5 0%, #fef9e7 100%) !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-res-card.hidden-b,
body:not(.theme-dark) .v114-res-shell .gacha-res-card.mythic {
  border-color: #dc2626 !important;
  background: linear-gradient(180deg, #fff8f8 0%, #fef2f2 100%) !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-keep-slot {
  background: #faf6ec !important;
  border-color: #dfd2b8 !important;
  color: #1f1912 !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-keep-slot.active {
  background: #fffbeb !important;
  border-color: #d97706 !important;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25) !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-trait-banner,
body:not(.theme-dark) .v114-res-shell .gacha-qi-check-box,
body:not(.theme-dark) .v114-res-shell .gtb-wep-btn,
body:not(.theme-dark) .v114-res-shell .gacha-quote-bar {
  background: #faf6ec !important;
  border-color: #dfd2b8 !important;
  color: #2c2419 !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-mini-stats .gms-cell {
  background: #faf6ec !important;
  border-color: #dfd2b8 !important;
  color: #2c2419 !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-mini-stats .gms-cell span { color: #6b5e4d !important; }
body:not(.theme-dark) .v114-res-shell .gacha-mini-stats .gms-cell b    { color: #1f1912 !important; }
body:not(.theme-dark) .v114-res-shell .gacha-mini-stats .gms-cell.main {
  background: #fffbeb !important;
  border-color: #d97706 !important;
}
body:not(.theme-dark) .v114-res-shell .g-mini-chip {
  background: #f5efe0 !important;
  color: #4a3b24 !important;
  border-color: #d4c3a1 !important;
}
body:not(.theme-dark) .v114-res-shell .g-mini-chip.active {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #b45309 !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-dark-input {
  background: #ffffff !important;
  color: #1f1912 !important;
  border-color: #cbbba0 !important;
}
body:not(.theme-dark) .v114-res-shell .gb-lbl { color: #5c4d3a !important; }
body:not(.theme-dark) .v114-res-shell .g-qi-silver-btn {
  background: #f1e9d5 !important;
  color: #2c2419 !important;
  border: 1px solid #cbbba0 !important;
}
body:not(.theme-dark) .v114-res-shell .gacha-reroll-done {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #d97706 !important;
}


/* ==========================================================================
 * ☀️ v1.1.5 라이트 모드 가독성 완전 복구 (구형 !important 다크 누출 전면 차단) & 튜토리얼 레이어 보강
 * ========================================================================== */
.tut-layer { z-index: 9500 !important; }

.update-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 72px;
  width: min(400px, calc(100vw - 24px));
  z-index: 9400;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(18, 24, 34, 0.95);
  border: 1.5px solid #d97706;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

/* 라이트 모드 천명 소환(.v106-gacha) — 구형 L9257~9452 !important 어두운 배경/연한 글씨 완전 덮어쓰기! */
body:not(.theme-dark) .v106-gacha .gacha-topbar {
  border-bottom: 1px solid rgba(180, 148, 92, 0.30) !important;
}
body:not(.theme-dark) .v106-gacha .gacha-back-btn,
body:not(.theme-dark) .v106-gacha .gacha-skip-toggle {
  background: #ffffff !important;
  color: #2c2419 !important;
  border: 1.2px solid #cbbba0 !important;
}
body:not(.theme-dark) .v106-gacha .gacha-skip-toggle.on {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}
body:not(.theme-dark) .v106-gacha .g-pill {
  background: #ffffff !important;
  color: #2c2419 !important;
  border: 1px solid #d6c5a5 !important;
}
body:not(.theme-dark) .v106-gacha .g-pill.cyan {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}
body:not(.theme-dark) .v106-gacha .g-pill.gold,
body:not(.theme-dark) .v106-gacha .g-pill.amber {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #d97706 !important;
}
body:not(.theme-dark) .v106-gacha .gacha-kept-banner {
  background: #fffbeb !important;
  border: 1.5px solid #d97706 !important;
  color: #1f1912 !important;
}
body:not(.theme-dark) .v106-gacha .gkb-title { color: #92400e !important; }
body:not(.theme-dark) .v106-gacha .gkb-sub   { color: #5c4d3a !important; }

body:not(.theme-dark) .v106-gacha .g-keep-go-btn {
  background: linear-gradient(155deg, #ecfdf5 0%, #d1fae5 100%) !important;
  border: 1.5px solid #15803d !important;
  color: #14532d !important;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.14) !important;
}
body:not(.theme-dark) .v106-gacha .gkg-tag {
  background: rgba(21, 128, 61, 0.14) !important;
  border-color: rgba(21, 128, 61, 0.42) !important;
  color: #14532d !important;
}
body:not(.theme-dark) .v106-gacha .g-qi-silver-btn {
  background: #f5efe0 !important;
  color: #2c2419 !important;
  border: 1.2px solid #cbbba0 !important;
}
body:not(.theme-dark) .v106-gacha .gacha-res-card .gtb-wep-link {
  color: #9a5b00 !important;
}
body:not(.theme-dark) .v106-gacha .gacha-res-card .g-warn-pill {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}
body:not(.theme-dark) .v106-gacha .g-sum-btn.normal,
body:not(.theme-dark) .v106-gacha .g-sum-btn.ad-wide,
body:not(.theme-dark) .v106-gacha .g-sum-btn.reroll-pull,
body:not(.theme-dark) .v106-gacha .g-sum-btn.premium,
body:not(.theme-dark) .v106-gacha .g-sum-btn.premium10 {
  color: #ffffff !important;
}
body:not(.theme-dark) .v106-gacha .g-sum-btn .gs-title { color: #ffffff !important; }
body:not(.theme-dark) .v106-gacha .g-sum-btn .gs-sub   { color: rgba(255, 255, 255, 0.90) !important; }

/* 라이트 모드 일반 모달/카드/설정창 선명한 먹색 대비 보강 */
body:not(.theme-dark) .modal-sheet,
body:not(.theme-dark) .event-sheet:not(.full-art-sheet) {
  color: #1f1912;
}
body:not(.theme-dark) .setting-row > span {
  color: #1f1912;
}
body:not(.theme-dark) .modal-sheet .chip:not(.active):not(.gold):not(.rec):not(.seal),
body:not(.theme-dark) .event-sheet:not(.full-art-sheet) .chip:not(.active):not(.gold):not(.rec):not(.seal) {
  background: #ffffff;
  color: #2c2419;
  border-color: #d4c5a8;
}
body:not(.theme-dark) .modal-sheet .btn-outline,
body:not(.theme-dark) .event-sheet:not(.full-art-sheet) .btn-outline {
  color: #241c13;
  border-color: #cbbba0;
}
body:not(.theme-dark) .modal-sheet .btn-outline:disabled,
body:not(.theme-dark) .event-sheet:not(.full-art-sheet) .btn-outline:disabled {
  color: #7c6f5b;
}


/* ==========================================================================
 * 📱 v1.1.9 iOS Safari / WebView 이미지 롱프레스 미리보기 · 드래그 고스트 완전 차단
 * ========================================================================== */
html, body, #app, #view, .topbar, .tabs, .modal-sheet, .event-sheet, button, a {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
img, svg {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  pointer-events: none;
}
input, textarea, .code-area, [contenteditable="true"] {
  -webkit-touch-callout: default !important;
  -webkit-user-select: text !important;
  user-select: text !important;
}


/* ==========================================================================
 * ✨ v1.2.0 3탭 깔끔 설정창 · 명의원 아코디언 · 쾌속/자동 수련 스타일
 * ========================================================================== */
.set-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(160, 140, 104, 0.14);
}
body.theme-dark .set-tabs { background: rgba(255, 255, 255, 0.06); }
.set-tab {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 4px;
  border-radius: 9px;
  cursor: pointer;
}
.set-tab.active {
  background: #ffffff;
  color: #1f1912;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
body.theme-dark .set-tab.active {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
}
.set-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 10px;
}
body.theme-dark .set-card {
  background: rgba(26, 35, 48, 0.92);
  border-color: rgba(148, 163, 184, 0.22);
}
.set-card.danger-zone {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.72);
}
body.theme-dark .set-card.danger-zone {
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(248, 113, 113, 0.35);
}
.set-card-ttl {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-dark);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.set-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.set-list-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #faf6ec;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.set-list-btn b { display: block; font-size: 13px; font-weight: 900; }
.set-list-btn small { display: block; font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.set-list-btn > span:last-child { font-size: 17px; font-weight: 900; opacity: 0.55; }
.set-list-btn.primary {
  background: #17202c;
  border-color: #334155;
  color: #f8fafc;
}
.set-list-btn.primary small { color: #cbd5e1; }
.set-list-btn.gold {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #d97706;
  color: #78350f;
}
.set-list-btn.gold small { color: #92400e; }
body.theme-dark .set-list-btn {
  background: rgba(30, 41, 59, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
  color: #f1f5f9;
}
body.theme-dark .set-list-btn.gold {
  background: rgba(180, 110, 18, 0.22);
  border-color: rgba(251, 191, 36, 0.52);
  color: #fef3c7;
}
body.theme-dark .set-list-btn.gold small { color: #fde68a; }
.set-sfx-fold {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
}
.set-sfx-fold summary { cursor: pointer; }
.clinic-acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px dashed #cbbba0;
  background: rgba(248, 243, 230, 0.85);
  color: #5c4620;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.clinic-acc-toggle.open {
  border-style: solid;
  border-color: #d97706;
  background: #fef3c7;
  color: #92400e;
}
body.theme-dark .clinic-acc-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}
body.theme-dark .clinic-acc-toggle.open {
  background: rgba(217, 119, 6, 0.20);
  border-color: #fbbf24;
  color: #fde68a;
}


/* ==========================================================================
 * 🔴 v1.2.1 대기업급 UX 1차 패치 — 하단 탭 레드닷 · 외형 미리보기 · 커스텀 확인 모달
 * ========================================================================== */
.tab-btn .tab-icon { position: relative; }
.tab-red-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.72);
  pointer-events: none;
}
body.theme-dark .tab-red-dot { border-color: #141b24; }
.btn-danger-solid {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  color: #ffffff !important;
  border: 1px solid #f87171 !important;
  font-weight: 900;
}
.cos-preview-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 12px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, rgba(245, 194, 72, 0.22) 0%, rgba(20, 26, 36, 0.94) 72%);
  border: 1.5px solid rgba(214, 169, 76, 0.48);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.42);
}
.cos-pv-gender-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.45);
  background: rgba(15, 23, 42, 0.82);
  color: #fde68a;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.cos-pv-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 138px;
}
.cos-pv-target {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
}


/* ==========================================================================
 * ✨ v1.2.2 대기업급 UX 2차 패치 — 재화 플로팅 숫자 · 칩 바운스 · 토스트 슬라이드 · 먹선 아이콘 정밀 정렬
 * ========================================================================== */
.k-ico-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.16em;
  line-height: 1;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-item.toast-enter {
  animation: toastSlideIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pillBump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.12); box-shadow: 0 0 12px rgba(245, 194, 72, 0.65); }
  100% { transform: scale(1); }
}
.pill-bump {
  animation: pillBump 0.34s ease-out;
}

@keyframes currencyFloat {
  0%   { opacity: 0; transform: translate(-50%, 4px) scale(0.86); }
  18%  { opacity: 1; transform: translate(-50%, -2px) scale(1.04); }
  80%  { opacity: 1; transform: translate(-50%, -18px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -28px) scale(0.94); }
}
.currency-float-pop {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  font-size: 12.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  animation: currencyFloat 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.currency-float-pop.gain {
  background: rgba(20, 83, 45, 0.92);
  color: #bbf7d0;
  border: 1px solid #4ade80;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}
.currency-float-pop.spend {
  background: rgba(127, 29, 29, 0.92);
  color: #fecaca;
  border: 1px solid #f87171;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35);
}

@keyframes centerFloatPop {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.92); }
  20%  { opacity: 1; transform: translate(-50%, 0) scale(1.02); }
  80%  { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -24px) scale(0.96); }
}
.float-pop-center {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 10040;
  pointer-events: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  background: rgba(18, 23, 33, 0.92);
  color: #fde68a;
  border: 1.5px solid #d97706;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  animation: centerFloatPop 1.1s ease-out forwards;
}
body.reduced-motion .toast-item.toast-enter,
body.reduced-motion .pill-bump,
body.reduced-motion .currency-float-pop,
body.reduced-motion .float-pop-center {
  animation: none !important;
}


/* ==========================================================================
 * ✨ v1.3.1 튜토리얼 강조 강화 · 30일 월간 출석부 · 1인 레이드 보스 액션 스테이지
 * ========================================================================== */
@keyframes tutFreePulseStrong {
  0%, 100% {
    box-shadow: 0 0 0 3px #f59e0b, 0 0 0 6px rgba(245, 158, 11, 0.28), 0 6px 18px rgba(217, 119, 6, 0.35);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 3.5px #facc15, 0 0 0 9px rgba(250, 204, 21, 0.38), 0 8px 24px rgba(234, 179, 8, 0.52);
    transform: translateY(-1px);
  }
}
.tut-free-glow {
  animation: tutFreePulseStrong 1.35s ease-in-out infinite !important;
  border-color: #d97706 !important;
}

/* 30일 월간 출석부 (5열 × 6행 컴팩트 캘린더) */
.attend-grid.month-30 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.attend-grid.month-30 .attend-cell {
  padding: 5px 3px;
  min-height: 46px;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.attend-grid.month-30 .att-day {
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.15;
}
.attend-grid.month-30 .att-lbl {
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 2px;
  word-break: keep-all;
}
.attend-grid.month-30 .attend-cell.milestone:not(.done) {
  background: linear-gradient(155deg, #fffbeb, #fef3c7);
  border-color: #d97706;
  color: #92400e;
}
body.theme-dark .attend-grid.month-30 .attend-cell.milestone:not(.done) {
  background: rgba(180, 110, 18, 0.28);
  border-color: #f59e0b;
  color: #fef08a;
}

/* 3진영 무림 레이드 실시간 보스 액션 스테이지 */
.raid-stage-box {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  border: 1.5px solid rgba(214, 169, 76, 0.55);
  background: #0d121c;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}
.raid-skip-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.55);
  background: rgba(12, 16, 24, 0.86);
  color: #fde68a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}


/* ==========================================================================
 * 🌐 v1.3.2 다국어(EN/ZH/JA) 도감 4열 그리드 가로 잘림 방지 & 텍스트 줄바꿈 보정
 * ========================================================================== */
.codex-logo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.codex-logo-tile {
  min-width: 0 !important;
  overflow: hidden;
}
.codex-logo-tile span {
  max-width: 100%;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
body[data-lang="en"] .codex-logo-tile span {
  font-size: 9.8px !important;
}


/* ==========================================================================
 * 🏔️ v1.3.6 클릭형 경지 뱃지(.realm-pill-btn) & 일대기 남은 경지 로드맵 카드
 * ========================================================================== */
.realm-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(250, 204, 21, 0.55);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.realm-pill-btn:active {
  transform: scale(0.95);
  filter: brightness(1.08);
}
.realm-pill-btn .rp-arr {
  font-size: 1.15em;
  line-height: 1;
  opacity: 0.78;
}
.rm-cur-box {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.72), rgba(250, 246, 236, 0.92));
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 12px;
  padding: 10px 11px;
}
body.theme-dark .rm-cur-box {
  background: rgba(180, 110, 18, 0.16);
  border-color: rgba(251, 191, 36, 0.38);
}
.rm-section-lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.rm-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.rm-step-pill {
  text-align: left;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(248, 244, 234, 0.85);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.rm-step-pill.next {
  border-color: #d97706;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.16);
}
.rm-step-pill.locked {
  opacity: 0.82;
}
body.theme-dark .rm-step-pill {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
}
body.theme-dark .rm-step-pill.next {
  background: rgba(180, 110, 18, 0.26);
  border-color: #fbbf24;
  color: #fef3c7;
}
.rm-sp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.rm-sp-name {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-sp-ovr {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--gold-dark);
  flex-shrink: 0;
}
body.theme-dark .rm-sp-ovr { color: #fde68a; }
.rm-sp-sub {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-done-fold {
  border-top: 1px dashed var(--border);
  padding-top: 7px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-sub);
}
.rm-done-fold summary { cursor: pointer; }
.rm-done-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}


/* ==========================================================================
 * 🎯 v1.3.8 사건 · 스토리 선택지 능력치/보상 자동 힌트 필(.opt-hint-pill)
 * ========================================================================== */
.opt-hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.opt-hint-pill {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
}
.opt-hint-pill.pos {
  background: rgba(22, 163, 74, 0.13);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.34);
}
.opt-hint-pill.gold {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.38);
}
.opt-hint-pill.warn {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.34);
}
.opt-hint-pill.neg {
  background: rgba(220, 38, 38, 0.11);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.32);
}
.opt-hint-pill.neu {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.28);
}
body.theme-dark .opt-hint-pill.pos  { background: rgba(34, 197, 94, 0.18);  color: #86efac; border-color: rgba(74, 222, 128, 0.38); }
body.theme-dark .opt-hint-pill.gold { background: rgba(245, 158, 11, 0.20); color: #fde68a; border-color: rgba(251, 191, 36, 0.42); }
body.theme-dark .opt-hint-pill.warn { background: rgba(249, 115, 22, 0.20); color: #fdba74; border-color: rgba(251, 146, 60, 0.42); }
body.theme-dark .opt-hint-pill.neg  { background: rgba(239, 68, 68, 0.20);  color: #fca5a5; border-color: rgba(248, 113, 113, 0.42); }
body.theme-dark .opt-hint-pill.neu  { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.30); }


/* ==========================================================================
 * 🏮 v1.3.9 한국풍 전통 단청 · 고금박 천명 판정 게이지 (.k-hanji-judge)
 * ========================================================================== */
.judge-scroll-box.k-hanji-judge {
  position: relative;
  padding: 16px 15px 13px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 169, 76, 0.24), transparent 68%),
    linear-gradient(180deg, #fbf6e8 0%, #f1e5ca 100%);
  border: 2px solid #b58932;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.72), 0 6px 18px rgba(72, 48, 12, 0.14);
}
body.theme-dark .judge-scroll-box.k-hanji-judge {
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 169, 76, 0.16), transparent 65%),
    linear-gradient(180deg, #252019 0%, #16130f 100%);
  border-color: #d4a64a;
  box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.16), 0 8px 22px rgba(0, 0, 0, 0.45);
}
.kj-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: #a16f1c;
  border-style: solid;
  pointer-events: none;
  opacity: 0.72;
}
.kj-corner.tl { top: 5px; left: 5px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.kj-corner.tr { top: 5px; right: 5px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.kj-corner.bl { bottom: 5px; left: 5px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.kj-corner.br { bottom: 5px; right: 5px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }
body.theme-dark .kj-corner { border-color: #eab308; }

.k-hanji-judge .jsh-mid {
  padding: 2px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b2116, #19140e);
  color: #fde68a;
  border: 1px solid #c8953a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.k-hanji-judge .jsh-ok,
.k-hanji-judge .jsh-fail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
}
.kj-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
}
.kj-dot.ok   { background: #1e7c64; box-shadow: 0 0 6px rgba(30, 124, 100, 0.55); }
.kj-dot.fail { background: #b92b27; box-shadow: 0 0 6px rgba(185, 43, 39, 0.55); }

.judge-bar.k-dancheong-gauge {
  height: 32px !important;
  border-radius: 9px !important;
  border: 2.5px solid #453114 !important;
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(214, 169, 76, 0.55) !important;
}
.judge-bar.k-dancheong-gauge .judge-green {
  background: linear-gradient(180deg, #43b699 0%, #1d7560 48%, #10493b 100%) !important;
  border-radius: 6px 0 0 6px !important;
}
.judge-bar.k-dancheong-gauge .judge-red {
  background: linear-gradient(180deg, #db544b 0%, #a52822 48%, #681512 100%) !important;
  border-radius: 0 6px 6px 0 !important;
}
.judge-bar.k-dancheong-gauge .judge-marker {
  width: 15px !important;
  height: 42px !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #fffbeb 0%, #f59e0b 46%, #7c3f0a 100%) !important;
  border: 2px solid #fffef5 !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.85), 0 3px 8px rgba(0, 0, 0, 0.45) !important;
}
