/* 4. 장비 비교 & 교체 모달창 (중앙 팝업 대화상자) */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show,
.modal-overlay.active {
  display: flex !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-width: 388px;
  background: linear-gradient(180deg, #1e2738 0%, #101624 100%);
  border-radius: 24px;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  padding: 18px 16px 20px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.15);
  animation: popModalIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

@keyframes popModalIn {
  0% { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tag {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.modal-heading {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 비교 카드 레이아웃 */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.compare-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.compare-card.new-gear {
  border: 1.5px solid var(--accent-gold);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.card-status-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-status-badge.new-badge {
  color: #fbbf24;
  font-weight: 900;
}

.gear-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.item-icon-img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}

.gear-icon-box.new-icon-box {
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.gear-name {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}

.gear-tier-badge {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  background: #475569;
  color: #fff;
  margin-bottom: 4px;
}

.gear-tier-badge.t1 { background: #94a3b8; color: #0f172a; }
.gear-tier-badge.t2 { background: #38bdf8; color: #0f172a; }
.gear-tier-badge.t3 { background: #10b981; color: #0f172a; }
.gear-tier-badge.t4 { background: #eab308; color: #0f172a; }
.gear-tier-badge.t5 { background: #ef4444; color: #fff; }
.gear-tier-badge.t6 { background: #a855f7; color: #fff; }
.gear-tier-badge.t7 { background: #06b6d4; color: #0f172a; }
.gear-tier-badge.t8 { background: #8b5cf6; color: #fff; }
.gear-tier-badge.t9 { background: #92400e; color: #fff; }
.gear-tier-badge.t10 { background: #f97316; color: #fff; }

.gear-stat-line {
  font-size: 0.72rem;
  font-weight: 800;
}

.gear-stat-line.stat-dmg { color: var(--stat-dmg-color); }
.gear-stat-line.stat-hp { color: var(--stat-hp-color); }

.gear-substats-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 3px 0;
  min-height: 16px;
}

.substat-pill {
  font-size: 0.58rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.substat-pill.empty {
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.gear-sell-note {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.stat-diff-badge {
  font-size: 0.65rem;
  font-weight: 900;
  color: #4ade80;
  margin-top: 3px;
  background: rgba(74, 222, 128, 0.15);
  padding: 1px 5px;
  border-radius: 5px;
}

.stat-diff-badge.down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.compare-arrow {
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-weight: 900;
}

.cp-change-banner {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.cp-change-banner strong {
  color: #fde047;
  font-weight: 900;
}

.stat-diff-tag {
  font-weight: 800;
  margin-left: 3px;
  display: inline-block;
}

.stat-diff-tag.up {
  color: #34d399;
}

.stat-diff-tag.down {
  color: #f87171;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 9px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s;
}

.modal-btn:active {
  transform: scale(0.96);
}

.btn-sell-new {
  background: #334155;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-sell-new .btn-main-txt {
  font-size: 0.75rem;
  font-weight: 800;
}

.btn-sell-new .btn-sub-txt {
  font-size: 0.65rem;
  color: #fde047;
  font-weight: 800;
}

.btn-equip-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-equip-new .btn-main-txt {
  font-size: 0.78rem;
  font-weight: 900;
}

.btn-equip-new .btn-sub-txt {
  font-size: 0.62rem;
  opacity: 0.9;
  font-weight: 700;
}

/* 5. ⓘ 확률 비교 & 아이템 도감 모달창 */
.rates-sheet {
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}

/* 모달 상단 탭 내비게이션 */
.rates-tab-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 12px;
  gap: 4px;
}

.rates-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
}

.rates-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* 탭 뷰 전환 */
.rates-tab-view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.rates-tab-view.active {
  display: flex;
}

.rates-level-compare-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}

.lvl-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lvl-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
}

.lvl-value {
  font-size: 1.1rem;
  font-weight: 900;
}

.current-box .lvl-value { color: #fff; }
.next-box .lvl-value { color: #38bdf8; }

.lvl-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* 탭 2: 전체 아이템 도감 스타일 */
.rates-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.rates-filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}

.rates-filter-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rates-filter-chip.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.35);
}

.catalog-info-sub {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.3;
}

.rates-items-catalog-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
  padding-right: 4px;
  max-height: 52vh;
}

.rates-items-catalog-grid::-webkit-scrollbar {
  width: 4px;
}

.rates-items-catalog-grid::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

.rates-catalog-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 10px;
  border-radius: 12px;
  transition: border-color 0.15s;
}

.rates-catalog-card.obtainable {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(30, 41, 59, 0.5);
}

.rates-catalog-card.locked {
  opacity: 0.55;
}

.catalog-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-item-icon {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.catalog-tier-tag {
  font-size: 0.58rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
}

.catalog-atk-tag {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.catalog-atk-tag.melee {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.catalog-atk-tag.ranged {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.catalog-item-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

.catalog-item-stats {
  font-size: 0.68rem;
  font-weight: 700;
}

.catalog-item-stats.stat-dmg { color: #f87171; }
.catalog-item-stats.stat-hp { color: #4ade80; }

.catalog-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.catalog-prob-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
}

.catalog-prob-badge.active-drop {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.catalog-prob-badge.locked-drop {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.catalog-sell-price {
  font-size: 0.6rem;
  color: #fbbf24;
  font-weight: 700;
}

.rates-compare-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding-right: 4px;
}

.rates-compare-list::-webkit-scrollbar {
  width: 4px;
}

.rates-compare-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

.rate-compare-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: 10px;
}

.rate-tier-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-badge-pill {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.rate-tier-name {
  font-size: 0.75rem;
  font-weight: 800;
  color: #e2e8f0;
}

.rate-values-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.rate-cur {
  color: var(--text-muted);
  font-weight: 700;
}

.rate-next {
  color: #38bdf8;
  font-weight: 900;
}

.rate-diff-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.rate-diff-tag.up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.rate-diff-tag.down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.rate-diff-tag.new {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
}

.btn-confirm-rates {
  background: #3b82f6;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 14px;
}

/* 플로팅 토스트 메시지 */
.float-toast {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  z-index: 999;
  pointer-events: none;
  animation: toastFade 1.2s ease forwards;
  white-space: nowrap;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}


/* 👤 프로필 & 설정 모달 */
.profile-settings-sheet { max-width: 360px; }
.profile-card {
  display: flex; gap: 12px; align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px; padding: 10px; margin-bottom: 12px;
}
.profile-card-img {
  width: 84px; height: 84px; flex: 0 0 auto; border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #27344d 0%, #0f172a 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.profile-card-img img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.profile-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.profile-card-name { font-size: 15px; font-weight: 900; color: #f1f5f9; }
.profile-card-costume { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.profile-card-costume small { color: #fbbf24; font-weight: 700; margin-left: 4px; }
.profile-card-stats { font-size: 11px; color: #94a3b8; }
.profile-card-stats strong { color: #f1f5f9; }
.profile-goto-btn {
  margin-top: 4px; align-self: flex-start;
  background: linear-gradient(135deg, #be185d, #9d174d); color: #fff;
  border: 1px solid rgba(244, 114, 182, 0.6); border-radius: 8px;
  font-size: 11px; font-weight: 800; padding: 5px 10px; cursor: pointer;
}
.profile-setting-block {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 10px;
}
.profile-setting-title { font-size: 12px; font-weight: 800; color: #f1f5f9; margin-bottom: 6px; }
.profile-setting-row .profile-setting-title { margin-bottom: 2px; }
.profile-setting-sub { font-size: 10px; color: #94a3b8; }
.profile-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-chip-row { display: flex; gap: 6px; }
.profile-chip {
  flex: 1; background: rgba(30, 41, 59, 0.8); color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px;
  font-size: 11px; font-weight: 800; padding: 8px 4px; cursor: pointer;
}
.profile-chip.active {
  background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff;
  border-color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}
.profile-toggle {
  min-width: 56px; padding: 7px 10px; border-radius: 16px; cursor: pointer;
  background: rgba(71, 85, 105, 0.7); color: #cbd5e1; font-size: 11px; font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.profile-toggle.active { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; border-color: #4ade80; }


/* 🗺️ 해금 로드맵 (스테이지 한 줄 타임라인) */
.btn-roadmap-open {
  margin-left: 8px; vertical-align: middle;
  background: rgba(56, 189, 248, 0.18); color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.5); border-radius: 8px;
  font-size: 11px; font-weight: 800; padding: 3px 8px; cursor: pointer;
}
.roadmap-sheet { max-width: 380px; max-height: 86vh; display: flex; flex-direction: column; }
.roadmap-summary {
  font-size: 12px; color: #cbd5e1; background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px;
}
.roadmap-summary strong { color: #fbbf24; }
.roadmap-dev-note { margin-top: 4px; font-size: 10px; color: #94a3b8; }
.roadmap-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.roadmap-line { position: relative; padding-left: 4px; }
.roadmap-line::before {
  content: ''; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 3px;
  background: #334155; border-radius: 2px;
}
.roadmap-node {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 0; margin-bottom: 4px;
}
.roadmap-dot {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900;
  background: #1e293b; border: 2px solid #475569; color: #cbd5e1;
}
.roadmap-dot.small { width: 16px; height: 16px; font-size: 10px; margin: 0 6px; border-width: 2px; }
.roadmap-body { flex: 1; min-width: 0; }
.roadmap-title { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #f1f5f9; }
.roadmap-title.pass-title { font-size: 11px; color: #cbd5e1; font-weight: 700; }
.roadmap-kind {
  font-size: 9px; font-weight: 800; color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px; padding: 0 5px;
}
.roadmap-desc { font-size: 10px; color: #94a3b8; margin-top: 1px; }
.roadmap-stage { font-size: 11px; font-weight: 900; color: #7dd3fc; flex: 0 0 auto; }
.roadmap-node.feature { background: rgba(30, 41, 59, 0.6); border-radius: 10px; padding-left: 0; }
.roadmap-node.feature.reached .roadmap-dot { background: #15803d; border-color: #4ade80; color: #fff; }
.roadmap-node.feature.locked .roadmap-dot { border-color: #38bdf8; }
.roadmap-node.feature.kind-chest .roadmap-dot { border-color: #fbbf24; }
.roadmap-node.feature.kind-dungeon .roadmap-dot { border-color: #f472b6; }
.roadmap-node.pass.reached .roadmap-dot { background: #4ade80; border-color: #4ade80; color: #0f172a; }
.roadmap-node.locked { opacity: 0.85; }
.roadmap-node.pass.locked { opacity: 0.6; }
.roadmap-here {
  position: relative; z-index: 1; display: flex; justify-content: center; margin: 4px 0 8px;
}
.roadmap-here span {
  background: #38bdf8; color: #0f172a; font-size: 11px; font-weight: 900;
  border-radius: 10px; padding: 3px 12px; box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}


/* ↩️ 판매 기록 (재구매) */
.btn-salelog { position: relative; }
.salelog-badge {
  position: absolute; top: -6px; right: -8px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: #ef4444; color: #fff; font-size: 9px; font-weight: 900; line-height: 15px; text-align: center;
}
.salelog-sheet { max-width: 360px; }
.salelog-hint { font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.salelog-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.salelog-empty { text-align: center; color: #94a3b8; font-size: 12px; padding: 24px 0; }
.salelog-row {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
}
.salelog-icon { width: 40px; height: 40px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.salelog-icon img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.salelog-info { flex: 1; min-width: 0; }
.salelog-name { font-size: 12px; font-weight: 800; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.salelog-tier { font-size: 10px; font-weight: 900; color: #7dd3fc; margin-right: 3px; }
.salelog-stat { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.salelog-buy {
  flex: 0 0 auto; background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff;
  border: 1px solid #38bdf8; border-radius: 8px; font-size: 11px; font-weight: 800; padding: 5px 9px; cursor: pointer; line-height: 1.25;
}
.salelog-buy small { font-weight: 700; color: #fde68a; }
.salelog-buy:disabled { opacity: 0.45; cursor: not-allowed; }


/* 🔎 착용 장비 정보 모달 */
.iteminfo-sheet { max-width: 340px; }
.iteminfo-top {
  display: flex; gap: 12px; align-items: center; padding: 10px;
  background: rgba(15, 23, 42, 0.7); border: 1.5px solid rgba(255, 255, 255, 0.15); border-radius: 12px; margin-bottom: 10px;
}
.iteminfo-icon {
  width: 64px; height: 64px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 40px;
  background: radial-gradient(circle at 50% 40%, #27344d 0%, #0f172a 100%); border-radius: 12px;
}
.iteminfo-icon img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.iteminfo-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.iteminfo-name { font-size: 15px; font-weight: 900; color: #f1f5f9; }
.iteminfo-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.iteminfo-style { font-size: 10px; font-weight: 800; color: #cbd5e1; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 1px 6px; }
.iteminfo-stat { font-size: 14px; font-weight: 800; padding: 8px 10px; background: rgba(15, 23, 42, 0.55); border-radius: 10px; margin-bottom: 10px; }
.iteminfo-stat strong { float: right; }
.iteminfo-sub-title { font-size: 11px; font-weight: 800; color: #94a3b8; margin-bottom: 4px; }
.iteminfo-subs { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.iteminfo-sell { font-size: 12px; color: #cbd5e1; text-align: right; }
.iteminfo-sell strong { color: #fde68a; }


/* 프로필 스탯 표 (내용이 길어 모달 안에서 스크롤) */
.profile-settings-sheet { max-height: 88vh; overflow-y: auto; }
.pstat-section { margin-bottom: 8px; }
.pstat-title { font-size: 11px; font-weight: 900; color: #7dd3fc; margin-bottom: 3px; }
.pstat-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  font-size: 11px; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.pstat-label { color: #94a3b8; font-weight: 700; flex: 0 0 auto; }
.pstat-val { color: #f1f5f9; font-weight: 800; text-align: right; }
.pstat-val small { display: block; color: #64748b; font-weight: 600; font-size: 9px; margin-top: 1px; }


/* 🔓 해금 알림 모달 */
#unlock-notice-modal { z-index: 1200; }
.unlock-notice-sheet { max-width: 330px; text-align: center; }
.unlock-notice-burst { font-size: 44px; line-height: 1; margin-bottom: 4px; animation: unlockPop 0.5s ease-out; }
@keyframes unlockPop { 0% { transform: scale(0.3) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.unlock-notice-title { font-size: 18px; font-weight: 900; color: #fde68a; margin: 0 0 2px; }
.unlock-notice-stage { font-size: 11px; font-weight: 800; color: #7dd3fc; margin-bottom: 10px; }
.unlock-notice-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 40vh; overflow-y: auto; }
.unlock-notice-item {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px;
  background: rgba(15, 23, 42, 0.75); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px;
}
.unlock-notice-item.kind-chest { border-color: rgba(251, 191, 36, 0.5); }
.unlock-notice-item.kind-dungeon { border-color: rgba(244, 114, 182, 0.5); }
.unlock-notice-item.kind-system { border-color: rgba(56, 189, 248, 0.5); }
.unlock-notice-icon { font-size: 26px; flex: 0 0 auto; }
.unlock-notice-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unlock-notice-info strong { font-size: 13px; color: #f1f5f9; }
.unlock-notice-info small { font-size: 10px; color: #94a3b8; line-height: 1.35; }
.unlock-notice-btn {
  width: 100%; padding: 10px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #0284c7, #0369a1); border: 1px solid #38bdf8;
}


/* 🌙 오프라인 보상 모달 */
#offline-reward-modal { z-index: 1250; }
.offline-reward-sheet { max-width: 320px; text-align: center; }
.offline-reward-icon { font-size: 42px; line-height: 1; }
.offline-reward-title { font-size: 18px; font-weight: 900; color: #fde68a; margin: 4px 0 2px; }
.offline-reward-time { font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.offline-reward-time strong { color: #7dd3fc; }
.offline-reward-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.offline-reward-item {
  display: flex; justify-content: space-between; align-items: center; padding: 9px 12px;
  background: rgba(15, 23, 42, 0.75); border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 12px;
  font-size: 13px; font-weight: 800; color: #e2e8f0;
}
.offline-reward-item strong { color: #fde68a; font-size: 15px; }
.offline-reward-notes { font-size: 11px; color: #4ade80; margin-bottom: 6px; font-weight: 700; }
.offline-reward-rule { font-size: 10px; color: #64748b; margin-bottom: 12px; }
.offline-reward-btn {
  width: 100%; padding: 10px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #16a34a, #15803d); border: 1px solid #4ade80;
}

.iteminfo-family { font-size: 11px; color: #fbbf24; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; line-height: 1.4; }


/* ================= 장비 비교창: 상하 배치 ================= */
.comparison-grid {
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 8px;
}
.compare-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  text-align: left;
  padding: 8px 10px;
}
.compare-card .gear-icon-box { grid-row: 1 / span 5; grid-column: 1; width: 54px; height: 54px; margin: 0; }
.compare-card .card-status-badge,
.compare-card .gear-name,
.compare-card .gear-tier-badge,
.compare-card .gear-stat-line,
.compare-card .gear-sell-note,
.compare-card .stat-diff-badge { grid-column: 2; margin: 0; }
.compare-card .gear-name { max-width: none; white-space: normal; font-size: 0.8rem; line-height: 1.25; }
.compare-card .gear-tier-badge { justify-self: start; margin: 2px 0; }
.compare-card .stat-diff-badge { justify-self: start; margin-top: 2px; }
.compare-card .gear-substats-list { display: none; }
.compare-arrow { transform: rotate(90deg); justify-self: center; line-height: 1; margin: -2px 0; }

/* 비교표 */
.compare-options {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.cmp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); font-size: 0.7rem;
}
.cmp-row:last-child { border-bottom: none; }
.cmp-label { color: #94a3b8; font-weight: 700; white-space: nowrap; }
.cmp-vals { display: flex; align-items: center; gap: 5px; font-weight: 800; color: #e2e8f0; }
.cmp-arrow { color: #64748b; font-size: 0.65rem; }
.cmp-new.up { color: #4ade80; }
.cmp-new.down { color: #f87171; }
.cmp-mark { font-size: 0.6rem; width: 10px; text-align: center; }
.cmp-mark.up { color: #4ade80; }
.cmp-mark.down { color: #f87171; }
.cmp-mark.same { color: #64748b; }
.cmp-family-note { font-size: 0.62rem; color: #fbbf24; background: rgba(251, 191, 36, 0.08); border-radius: 6px; padding: 3px 6px; margin: 2px 0 3px; line-height: 1.35; }


/* 쿠폰 코드 입력 */
.coupon-row { display: flex; gap: 6px; }
.coupon-input {
  flex: 1; min-width: 0; background: rgba(30, 41, 59, 0.8); color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; user-select: text;
}
.coupon-input:focus { outline: none; border-color: #38bdf8; }
.coupon-btn { flex-shrink: 0; min-width: 52px; }
.coupon-message { min-height: 14px; margin-top: 6px; font-size: 11px; font-weight: 700; color: #94a3b8; }
.coupon-message.ok { color: #4ade80; }
.coupon-message.err { color: #f87171; }


/* ===== 재료 선택 창 (재봉틀 원단 / 부화기 알) ===== */
#material-pick-modal { z-index: 1230; }
.mat-pick-sheet { max-height: 80%; display: flex; flex-direction: column; }
.mat-pick-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 4px 2px 2px; }
.mat-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; color: #e2e8f0; text-align: left; cursor: pointer;
  background: rgba(30, 41, 59, 0.85); border: 1.5px solid var(--mc, rgba(255, 255, 255, 0.15)); border-radius: 12px; }
.mat-pick-row:active { transform: scale(0.98); }
.mat-pick-ico { font-size: 26px; width: 34px; text-align: center; flex-shrink: 0; }
.mat-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mat-pick-main b { font-size: 13px; }
.mat-pick-main small { font-size: 11px; color: #94a3b8; }
.mat-pick-count { font-size: 14px; font-weight: 900; color: #fde68a; }


/* ===== 상자 확률 창: 보조옵션 탭 ===== */
.sr-section-title { font-size: 12px; font-weight: 800; color: #fbbf24; margin: 10px 0 6px; }
.sr-tier-list { display: flex; flex-direction: column; gap: 4px; }
.sr-tier-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; }
.sr-tier-name { font-weight: 800; color: #e2e8f0; }
.sr-tier-row small { color: #94a3b8; font-size: 10.5px; }
.sr-none { color: #94a3b8; }
.sr-opt-head, .sr-opt-row { display: grid; grid-template-columns: 1.5fr 1.4fr repeat(2, 0.8fr); align-items: center; gap: 6px; padding: 6px 8px; font-size: 11.5px; }
.sr-opt-head { font-size: 10.5px; color: #94a3b8; font-weight: 800; }
.sr-opt-row { background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; margin-top: 4px; }
.sr-opt-name { font-weight: 800; color: #e2e8f0; display: flex; align-items: center; gap: 4px; }
.sr-opt-range { color: #e2e8f0; display: flex; flex-direction: column; font-weight: 700; }
.sr-opt-range small { font-size: 10px; color: #94a3b8; font-weight: 600; }
.sr-chance { text-align: center; font-weight: 900; color: #86efac; }
.sr-chance.sr-head { color: #94a3b8; font-size: 10.5px; display: flex; flex-direction: column; }
.sr-chance.sr-head small { font-size: 9px; font-weight: 600; }

.sr-rank { font-style: normal; font-size: 10px; font-weight: 900; color: #0f172a; background: #fbbf24; min-width: 16px; text-align: center; padding: 1px 3px; border-radius: 4px; margin-right: 2px; }

.sr-grade-list { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.sr-grade { display: flex; flex-direction: column; align-items: center; padding: 5px 0; background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; }
.sr-grade small { font-size: 8.5px; color: #94a3b8; }
.sr-grade b { font-size: 10px; color: #e2e8f0; }
.sr-grade.mid { border-color: #fbbf24; } .sr-grade.mid b { color: #fbbf24; }
.sr-grade.top { border-color: #4ade80; } .sr-grade.top b { color: #4ade80; }

.sr-opt-row.sr-pet-row { grid-template-columns: 1.5fr 1.6fr; }

/* 장비 비교: 보조옵션 교체 후 합계 */
.cmp-opt-head { font-size: 0.66rem; font-weight: 800; color: #cbd5e1; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.cmp-opt-head small { color: #64748b; font-weight: 700; margin-left: 4px; }
.cmp-label .cmp-sub { display: block; font-size: 0.56rem; color: #64748b; font-weight: 700; margin-top: 1px; }
.cmp-result { font-size: 0.62rem; color: #94a3b8; text-align: right; padding: 0 0 4px; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); }
.cmp-result b.up { color: #4ade80; } .cmp-result b.down { color: #f87171; }
