:root[data-theme='light'],
:root[data-theme='dark'] {
  --bg-main:    var(--m-bg-main, #0D0D11);
  --bg-sub:     #17161D;
  --bg-panel:   var(--m-bg-panel, #17161D);
  --bg-hover:   var(--m-bg-hover, #1f1d28);
  --text-main:  var(--m-text-main, #E8E6F2);
  --text-sub:   var(--m-text-sub, #8B869C);
  --text-muted: var(--m-text-muted, #4a4560);
  --border-color: var(--m-border-color, #2A2733);
  --nav-bg: var(--m-nav-bg, rgba(13,13,17,0.96));
  --accent-pink: var(--m-accent-pink, #7D2338);
  --accent-gold: var(--m-accent-sub, #8F7CFF);
  --shadow-color: rgba(0, 0, 0, 0.6);
}




/* =========================================
   기본 스크롤바 및 레이아웃
========================================= */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--m-font, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif);
  margin: 0;
  padding: 0;
  padding-bottom: 80px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.header-back {
  font-size: 20px;
  color: var(--text-sub);
  transition: color 0.3s ease;
}

.header-back:hover {
  color: var(--text-main);
}

.header-title {
  font-family: var(--m-font, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif) !important;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}


/* =========================================
   프로필 영역
========================================= */
.profile-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: 0.4s ease;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
  background-color: var(--bg-hover);
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

/* ── VEL 제작자 등급 테두리 ── */
@keyframes tierHoloBorder {
  0%{border-color:#8F7CFF !important}35%{border-color:#D8C7FF !important}70%{border-color:#FFB7D5 !important}100%{border-color:#8F7CFF !important}
}
.tier-border-rookie    { border-color: #4a4560 !important; border-width: 3px !important; }
.tier-border-choice   { border-color: #A56A7A !important; border-width: 3px !important; }
.tier-border-master   { border-color: #8F7CFF !important; border-width: 3px !important; }
.tier-border-u-general { border-color:#4a4560 !important; border-width:3px !important; }
.tier-border-u-entry   { border-color:#7A8199 !important; border-width:3px !important; }
.tier-border-u-insider { border-color:#7D2338 !important; border-width:3px !important; }
.tier-border-u-prime   { animation: tierPrimeBorder 3s linear infinite; border-width:3px !important; }

@keyframes tierPrimeBorder {
  0%{border-color:#7D2338 !important}33%{border-color:#8F7CFF !important}66%{border-color:#E8E6F2 !important}100%{border-color:#7D2338 !important}
}

.tier-border-exclusive     {
  border-width: 3px !important;
  border-style: solid !important;
  animation: tierExclusiveBorder 4s linear infinite;
}
@keyframes tierExclusiveBorder {
  0%{border-color:#8F7CFF !important}35%{border-color:#D8C7FF !important}70%{border-color:#FFB7D5 !important}100%{border-color:#8F7CFF !important}
}

.profile-text h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: 0.4s ease;
}

.profile-text p {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: var(--text-sub);
  transition: 0.4s ease;
}

.profile-btn-group {
  display: flex;
  gap: 10px;
}

.btn-outline {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  background: rgba(255, 182, 193, 0.05);
}


/* =========================================
   지갑 및 등급 카드
========================================= */
.wallet-card {
  background-color: var(--bg-sub);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin: 0 20px 20px 20px;
  padding: 20px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.4s ease;
}

.pulse-amount {
  font-size: 20px;
  color: var(--text-main);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.4s ease;
}

.charge-btn {
  background: var(--accent-pink);
  color: #E8E6F2;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.charge-btn:active {
  transform: scale(0.95);
}


/* =========================================
   🆕 등급 진행도 도트 인디케이터
========================================= */
.tier-dot-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tier-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

/* 현재 등급 도트: 약간 크게 펄스 */
.tier-dot.current {
  border: none;
  transform: scale(1.25);
  box-shadow: 0 0 5px currentColor;
}

/* 이미 달성한 도트 */
.tier-dot.achieved {
  border: none;
  opacity: 0.6;
}

/* 미달성 도트 */
.tier-dot.pending {
  opacity: 0.3;
}

.tier-next-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  transition: color 0.4s ease;
}

.tier-max-label {
  font-size: 10px;
  color: var(--accent-gold);
  text-align: right;
  transition: color 0.4s ease;
}

/* =========================================
   🆕 펄스/등급 섹션 리디자인 (이미지1 구조)
========================================= */
.section-label {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-main);
  margin: 0 20px 10px 20px;
}
.section-label-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.section-label-arrow {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: normal;
}

/* 펄스: 유료/무료 분리 */
.pulse-split {
  display: flex;
  align-items: stretch;
}
.pulse-split-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pulse-split-col:first-child {
  padding-right: 16px;
  border-right: 1px solid var(--border-color);
}
.pulse-split-col:last-child {
  padding-left: 16px;
}
.pulse-split-label {
  font-size: 13px;
  color: var(--text-sub);
}
.pulse-split-value {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-main);
}
.pulse-unit {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-muted);
}

/* 등급: 2열 그리드 */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tier-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tier-col-head {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.tier-badge-panel {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px 8px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
}
.tier-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
/* 이미지1 디자인: 진행도 도트 숨김, 다음 등급 라벨 가운데 정렬 */
.tier-progress .tier-dot-row {
  display: none;
}
.tier-progress .tier-next-label,
.tier-progress .tier-max-label {
  text-align: center;
}


/* =========================================
   메뉴 리스트
========================================= */
.menu-group {
  margin-bottom: 25px;
  transition: 0.4s ease;
}

.menu-title {
  padding: 0 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: bold;
  margin-bottom: 5px;
  transition: color 0.4s ease;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.4s;
}

.menu-item:hover {
  background-color: var(--bg-hover);
}

.menu-item:active {
  background-color: var(--border-color);
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 15px;
  color: var(--text-main);
  transition: color 0.4s ease;
}

.menu-icon {
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  transition: color 0.4s ease;
}

.vel-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.menu-icon .vel-icon {
  width: 20px;
  height: 20px;
  transform: translateY(-1px);
}

.menu-right {
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.4s ease;
}

.menu-badge {
  background: #e74c3c;
  color: #ffffff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}


/* =========================================
   <img src="https://eucwoxmpfisrzgobbnrd.supabase.co/storage/v1/object/public/icons/48px/ic_star_03_rg_48.png" alt="🌟" class="vel-icon" style="width:1.35rem;height:1.35rem;vertical-align:-0.2em;display:inline-block;"> VEL Modal System
========================================= */
.vel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vel-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.vel-modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 340px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.vel-modal-overlay.show .vel-modal-box {
  transform: scale(1);
}

@media (max-width: 480px) {
  .vel-modal-overlay {
    align-items: flex-end;
  }
  .vel-modal-box {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .vel-modal-overlay.show .vel-modal-box {
    transform: translateY(0);
  }
}

.vel-modal-message {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: keep-all;
}

.vel-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.vel-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

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

.vel-modal-btn-cancel {
  background: var(--bg-hover);
  color: var(--text-sub);
  border: 1px solid var(--border-color);
}

.vel-modal-btn-confirm {
  background: var(--accent-pink);
  color: #E8E6F2;
}


/* ════════════════════════════════════════════
   🌗 [2026-09-28] 라이트 모드 — data-theme="light" 일 때만 (지금은 관리자 미리보기만)
   ─ 왜 ─ 맨 위 변수 블록이 다크·라이트를 한 묶음으로 쓰면서 --bg-sub(#17161D)·그림자를 직접 박아뒀다.
     그래서 라이트로 켜도 「나의 펄스」·「나의 등급」 카드가 검정으로 남고 금액 글자가 묻혔다.
   ─ 방식 ─ 라이트일 때만 이 두 값을 덮는다. 다크는 이 블록을 안 탄다.
   ⚠️ 이 파일은 마이페이지 말고도 hunt·mailbox·blocked_users·creator_grant·review_event·char_studio 가 같이 쓴다
      → 그 페이지들도 라이트일 때 --bg-sub 가 흰색이 된다(다크는 무변화). 각 페이지 차례에 화면 확인할 것.
   ⚠️ 되돌리기 = 이 블록만 지우면 된다.
════════════════════════════════════════════ */
:root[data-theme="light"] {
  /* 🆕 [2026-09-28] 라벤더 값을 **직접** 적는다 — vel_icons.css(공용 색)를 안 불러오는 페이지가 있어서
     (hunt · review_event · char_studio) 그 페이지들은 --m-* 가 비어 라이트여도 다크 폴백으로 떴다.
     vel_icons.css 를 새로 붙이면 다크 글자색(--m-text-sub/muted)까지 바뀌므로, 라이트 값만 여기 둔다.
     ⚠️ 값은 vel_icons.css 의 :root[data-theme="light"] 과 같다 — 거기를 바꾸면 여기도 같이 바꿀 것. */
  --bg-main:    #F6F4FB;
  --bg-panel:   #FFFFFF;
  --bg-hover:   #EEEAF7;
  --text-main:  #25212F;
  --text-sub:   #625C72;
  --text-muted: #7E7891;
  --border-color: #DFD9EE;
  --nav-bg:     rgba(246,244,251,0.96);
  --bg-sub: #FFFFFF;                        /* 펄스 지갑 · 등급 카드 */
  --shadow-color: rgba(60,50,90,0.12);      /* 다크용 rgba(0,0,0,.6) 은 밝은 바탕에서 너무 무겁다 */
}
:root[data-theme="light"] .wallet-card { box-shadow: 0 1px 3px rgba(60,50,90,0.08); }


/* =========================================
   🆕 [2026-10-20] 마이페이지 섹션 접기 (mypage_accordion.js 가 붙이는 클래스에만 적용
   — 스위치가 꺼진 일반 유저 화면엔 이 클래스가 없어서 아무 영향 없음)
========================================= */
.menu-group.vel-acc {
  margin: 0 16px 10px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-panel);
  overflow: hidden;
}
.vel-acc-head {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: var(--text-main);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vel-acc-head:hover { background: var(--bg-hover); }
.vel-acc-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 999px;
}
.vel-acc-sp { flex: 1; }
.vel-acc-chev {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: var(--text-sub); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.vel-acc-open .vel-acc-chev { transform: rotate(90deg); }
.menu-group.vel-acc .menu-list { border-top: 1px solid var(--border-color); }
.menu-group.vel-acc .menu-list[hidden] { display: none; }
.menu-group.vel-acc .menu-item:last-of-type { border-bottom: none; }
.vel-acc-logout {
  margin: 14px 16px 0;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.vel-acc-logout .menu-item { margin-top: 0 !important; border-bottom: none; }
