/* =============================================
   토닥 메인 스타일시트 v2.0
   등급 테마: 동(Bronze) / 은(Silver) / 금(Gold) / 다이아(Diamond) / 블랙(Black)
   ============================================= */

/* ── CSS 변수 ── */
:root {
  --primary:      #6b3a1f;
  --primary-light:#8b5e3c;
  --accent:       #d4a853;
  --bg:           #fdf6ec;
  --bg2:          #f5e6d3;
  --card:         #ffffff;
  --text:         #2d2d2d;
  --text-muted:   #888888;
  --border:       #e5d9c8;
  --shadow:       0 4px 20px rgba(0,0,0,0.08);
  --radius:       12px;
  --font:         'Noto Sans KR', sans-serif;
}

/* ── 등급 테마 클래스 ── */
.grade-bronze  { --gc:#CD7F32; --gd:#8B4513; --gl:#f5e6d3; --gt:#fff; }
.grade-silver  { --gc:#C0C0C0; --gd:#808080; --gl:#f0f0f0; --gt:#fff; }
.grade-gold    { --gc:#FFD700; --gd:#B8860B; --gl:#fff9d6; --gt:#333; }
.grade-diamond { --gc:#00B4D8; --gd:#0077A8; --gl:#e0f7ff; --gt:#fff; }
.grade-black   { --gc:#2c2c2c; --gd:#000000; --gl:#2d2d2d; --gt:#FFD700; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 60px 0; }
.section-title {
  text-align: center; margin-bottom: 40px;
  font-size: 1.8rem; color: var(--primary); font-weight: 800;
  position: relative;
}
.section-title::after {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--accent); margin: 10px auto 0; border-radius: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s; text-decoration: none;
  font-family: var(--font);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-accent  { background: linear-gradient(135deg, var(--accent), #c8872a); color: #fff; }
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm  { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg  { padding: 14px 32px; font-size: 0.95rem; border-radius: 10px; }
.btn-full { width: 100%; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1e0e05 0%, #4a1e0a 50%, #6b3a1f 100%);
  color: #fff; padding: 80px 0 60px; position: relative; overflow: hidden;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-title { font-size: 2.6rem; font-weight: 900; margin-bottom: 14px; line-height: 1.25; }
.hero-title em { color: var(--accent); font-style: normal; }
.hero-subtitle { font-size: 1.05rem; opacity: 0.85; margin-bottom: 28px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px;
}
.hero-stat {
  background: rgba(255,255,255,0.1); border-radius: 12px; padding: 18px; text-align: center;
  backdrop-filter: blur(8px);
}
.hero-stat-value { font-size: 1.8rem; font-weight: 900; color: var(--accent); }
.hero-stat-label { font-size: 0.82rem; opacity: 0.8; margin-top: 4px; }
.hero-promo {
  margin-top: 20px; background: rgba(255,255,255,0.1);
  border-radius: 14px; padding: 18px;
}
.hero-promo-title { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin-bottom: 8px; }
.hero-promo-coin  { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.hero-promo-sub   { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ── Category Quick Links ── */
.cat-bar {
  background: #fff; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cat-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.cat-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 20px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 0.85rem; font-weight: 600; color: #555;
  transition: all 0.2s; text-decoration: none;
}
.cat-link:hover, .cat-link.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ── Counselor Cards ── */
.counselor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.counselor-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s;
}
.counselor-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.13); }
.c-card-img {
  position: relative; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  display: flex; align-items: center; justify-content: center;
}
.c-card-img img { width: 100%; height: 100%; object-fit: cover; }
.c-avatar { font-size: 5rem; opacity: 0.25; color: var(--primary); }
.status-dot {
  position: absolute; top: 12px; right: 12px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #4caf50; border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.3);
}
.status-dot.off { background: #bbb; box-shadow: none; }
.c-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.badge {
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.68rem; font-weight: 800;
}
.badge-popular { background: #ef4444; color: #fff; }
.badge-new     { background: #3b82f6; color: #fff; }
.badge-recommend { background: #22c55e; color: #fff; }

.c-card-body { padding: 16px; }
.c-name      { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.c-tag       { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.c-meta      { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.c-rating    { display: flex; align-items: center; gap: 3px; font-size: 0.83rem; font-weight: 700; color: #f59e0b; }
.c-count     { font-size: 0.75rem; color: var(--text-muted); }
.c-price     { font-size: 0.83rem; color: var(--primary); font-weight: 700; margin-bottom: 12px; }
.c-actions   { display: flex; gap: 8px; }
.c-actions .btn { flex: 1; padding: 8px 10px; font-size: 0.8rem; }

/* ── Category Tabs ── */
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.category-tab {
  padding: 7px 18px; border-radius: 20px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 0.85rem; font-weight: 600; color: #666; cursor: pointer; transition: all 0.2s;
}
.category-tab:hover, .category-tab.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ── Grade Info Cards ── */
.grade-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }
.grade-card {
  border-radius: 14px; padding: 22px 14px; text-align: center;
  position: relative; overflow: hidden; color: #fff;
}
.grade-card.bronze  { background: linear-gradient(135deg, #CD7F32, #8B4513); }
.grade-card.silver  { background: linear-gradient(135deg, #C0C0C0, #808080); }
.grade-card.gold    { background: linear-gradient(135deg, #FFD700, #FFA500); color: #333; }
.grade-card.diamond { background: linear-gradient(135deg, #B9F2FF, #0077b6); }
.grade-card.black   { background: linear-gradient(135deg, #2c2c2c, #000); color: #FFD700; }
.grade-icon  { font-size: 1.8rem; margin-bottom: 8px; }
.grade-name  { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.grade-cond  { font-size: 0.72rem; opacity: 0.85; line-height: 1.4; }

/* ── Auth Pages ── */
.auth-wrap {
  min-height: calc(100vh - 68px); display: flex;
  align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
}
.auth-card {
  background: #fff; border-radius: 20px; padding: 44px 38px;
  width: 100%; max-width: 460px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}
.auth-title { text-align: center; font-size: 1.5rem; font-weight: 900; color: var(--primary); margin-bottom: 6px; }
.auth-sub   { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 28px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: #444; margin-bottom: 5px; }
.form-label .req { color: #ef4444; margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.9rem; font-family: var(--font); background: #fff; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107,58,31,0.1); }
.form-control.is-valid   { border-color: #22c55e; }
.form-control.is-invalid { border-color: #ef4444; }
.form-feedback { font-size: 0.78rem; margin-top: 4px; }
.form-feedback.valid   { color: #22c55e; }
.form-feedback.invalid { color: #ef4444; }
.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }

/* ── Alert ── */
.alert {
  padding: 13px 16px; border-radius: 10px; margin-bottom: 18px;
  font-size: 0.88rem; display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: #fff5f5; border: 1px solid #fca5a5; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ── Mypage Layout ── */
.mypage-wrap {
  display: grid; grid-template-columns: 230px 1fr; gap: 28px;
  max-width: 1100px; margin: 36px auto; padding: 0 20px;
}
.mypage-sidebar {
  background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); height: fit-content;
}
.mypage-user { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.mypage-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; overflow: hidden;
}
.mypage-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mypage-nickname { font-weight: 700; font-size: 0.95rem; margin-bottom: 5px; }
.mypage-point    { font-size: 0.82rem; color: var(--primary); font-weight: 700; }
.mypage-nav { display: flex; flex-direction: column; gap: 3px; }
.mypage-nav a {
  padding: 9px 14px; border-radius: 8px;
  font-size: 0.88rem; color: #555; display: flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.mypage-nav a:hover, .mypage-nav a.active {
  background: var(--bg); color: var(--primary); font-weight: 700;
}
.mypage-content {
  background: #fff; border-radius: 16px; padding: 30px; box-shadow: var(--shadow);
  min-width: 0; /* [add] 그리드 자식이 안쪽 넓은 표(min-width:560px)/요약카드 때문에 뷰포트를 넘기지 않도록 — overflow-x 스크롤 래퍼가 제대로 동작하게 함 */
}
.mypage-content-title {
  font-size: 1.2rem; font-weight: 700; color: var(--primary);
  margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}

/* ── Grade Badge (인라인) ── */
.grade-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 10px; font-size: 0.72rem; font-weight: 800;
}
.grade-badge.bronze  { background: linear-gradient(135deg,#CD7F32,#8B4513); color: #fff; }
.grade-badge.silver  { background: linear-gradient(135deg,#C0C0C0,#808080); color: #fff; }
.grade-badge.gold    { background: linear-gradient(135deg,#FFD700,#FFA500); color: #333; }
.grade-badge.diamond { background: linear-gradient(135deg,#B9F2FF,#00B4D8); color: #fff; }
.grade-badge.black   { background: linear-gradient(135deg,#2c2c2c,#000); color: #FFD700; }

/* ── Point Charge ── */
.charge-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 20px; }
.charge-opt {
  border: 2px solid var(--border); border-radius: 12px; padding: 14px 10px;
  text-align: center; cursor: pointer; transition: all 0.2s; background: #fff;
}
.charge-opt:hover, .charge-opt.selected {
  border-color: var(--primary); background: var(--bg);
}
.charge-opt .amount { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.charge-opt .bonus  { font-size: 0.75rem; color: #22c55e; font-weight: 700; margin-top: 3px; }

/* ── Reviews ── */
.review-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin-bottom: 14px;
}
.review-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-author { font-weight: 700; font-size: 0.88rem; }
.review-date   { font-size: 0.78rem; color: var(--text-muted); margin-left: auto; }
.star-wrap { display: flex; gap: 1px; }
.star     { font-size: 1rem; color: #ddd; }
.star.on  { color: #f59e0b; }
.review-content { font-size: 0.88rem; color: #444; line-height: 1.7; }
.review-reply {
  margin-top: 10px; padding: 10px 14px;
  background: var(--bg); border-left: 3px solid var(--accent);
  font-size: 0.82rem; color: #555; border-radius: 0 8px 8px 0;
}

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 36px; }
.page-item a, .page-item span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); font-size: 0.85rem; color: #555;
  transition: all 0.2s; background: #fff;
}
.page-item.active span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-item a:hover { background: var(--bg); color: var(--primary); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 9000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 18px; padding: 30px;
  width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-title   { font-size: 1.15rem; font-weight: 800; margin-bottom: 18px; color: var(--primary); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ── Star Picker ── */
.star-picker { display: flex; gap: 6px; }
.star-pick   { font-size: 1.8rem; cursor: pointer; color: #ddd; transition: color 0.15s; }
.star-pick.hover, .star-pick.selected { color: #f59e0b; }

/* ── Counselor Detail ── */
.detail-wrap {
  max-width: 1100px; margin: 36px auto; padding: 0 20px;
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px;
}
.detail-wrap > * { min-width: 0; }
.detail-card { background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.counselor-profile-img {
  width: 180px; height: 180px; border-radius: 50%;
  margin: 0 auto 18px; overflow: hidden;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--border);
}
.counselor-profile-img img { width: 100%; height: 100%; object-fit: cover; }
.counselor-profile-avatar { font-size: 5rem; opacity: 0.25; color: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.stat-box {
  background: var(--bg); border-radius: 12px; padding: 14px; text-align: center;
}
.stat-value { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

/* ── Admin ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table thead { background: var(--bg); }
.admin-table th { text-align: left; padding: 12px 14px; color: #555; font-weight: 700; }
.admin-table td { padding: 12px 14px; border-top: 1px solid var(--border); }

/* ── Divider ── */
.divider { text-align: center; position: relative; margin: 18px 0; color: var(--text-muted); font-size: 0.8rem; }
.divider::before, .divider::after { content:''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.divider::before { left: 0; }
.divider::after  { right: 0; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grade-cards { grid-template-columns: repeat(3,1fr); }
  .detail-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .hero-inner  { grid-template-columns: 1fr; }
  /* [중복 제거됨] .hero-title 중복 (768px) — 라인 946의 새 값 사용 */
  .grade-cards { grid-template-columns: repeat(2,1fr); }
  .mypage-wrap { grid-template-columns: 1fr; }
  .mypage-content { padding: 22px 16px; } /* [add] 모바일에서 30px는 좁은 폭에 과해 카드가 눌림 — 여백 축소 */
  .charge-options { grid-template-columns: repeat(2,1fr); }
  .detail-card { padding: 20px; }
  /* [중복 제거됨] .counselor-grid 중복 (768px) — 라인 976의 새 값 사용 */
}
@media (max-width: 480px) {
  /* [중복 제거됨] .grade-cards 중복 (480px) — 라인 1004의 새 값 사용 */
  /* [중복 제거됨] .auth-card 중복 (480px) — 로그인 페이지 블록의 새 값 사용 */
  .hero-stats  { grid-template-columns: 1fr; }
  .detail-card { padding: 18px 16px; }
  .stat-box { padding: 12px 6px; }
  .stat-value { font-size: 1.25rem; }
}

body.grade-bronze {
  --primary: #8B4513;
  --accent: #CD7F32;
  --bg: #fdf6ec;
}

body.grade-silver {
  --primary: #808080;
  --accent: #C0C0C0;
  --bg: #f5f5f5;
}

body.grade-gold {
  --primary: #B8860B;
  --accent: #FFD700;
  --bg: #fff9d6;
}

body.grade-diamond {
  --primary: #0077A8;
  --accent: #00B4D8;
  --bg: #e0f7ff;
}

body.grade-black {
  --primary: #1a1a1a;
  --accent: #ff3b7f;
  --bg: #f3f1f0;
}

.login-tab {
  flex:1;
  padding:10px;
  background:none;
  border:none;
  cursor:pointer;
  font-weight:600;
  color:var(--text-muted);
  border-bottom:2px solid transparent;
}

.login-tab.active {
  color:var(--primary);
  border-bottom:2px solid var(--primary);
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

.modal-content{
  width: 600px;          /* 모달 가로 크기 */
  max-width: 90%;

  background: #fff;
  border-radius: 16px;

  padding: 24px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-content h3{
  margin-bottom: 16px;
}

#counselorNote{
  width: 100%;
  min-height: 220px;    /* textarea 높이 */
  resize: vertical;

  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;

  font-size: 15px;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  min-width: 0;

  padding: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e5d9c8;
}


/* ====================================================================
   토닥 — 헤더/푸터 CSS 패치 (반응형 + UX 개선)
   --------------------------------------------------------------------
   이 블록은 기존 style.css의 다음 두 구역을 교체한다:

     [구역 1] header / .header-inner / .logo / .logo-icon / nav /
              .header-right / .point-badge / .hamburger
              (기존 style.css 50~90줄 부근)

     [구역 2] footer / .footer-* 일체
              (기존 style.css 394~410줄 부근)

   그리고 기존 미디어쿼리 안의 헤더/푸터 관련 부분도 같이 교체.
   (기존 .hamburger {display:flex} / nav {display:none...} / .footer-top
   관련 줄은 삭제하고 이 파일 맨 아래 미디어쿼리로 대체.)

   적용 방법:
   1) style.css 백업
   2) 위 두 구역과 미디어쿼리 내 헤더/푸터 줄을 모두 삭제
   3) 이 파일 내용 전체를 style.css 적당한 위치에 붙여넣기
   ==================================================================== */

/* ────────────────────────────────────────────────
   헤더 — 데스크탑 기본
   ──────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 로고 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo em { color: var(--accent); font-style: normal; }

/* PC 네비게이션 — ★ 별자리 적용 */
#mainNav { position: relative; flex: 1 1 auto; min-width: 0; }
nav ul {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;       /* 로고와 우측영역 사이 가운데 정렬 */
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
nav ul li a {
  position: relative;
  display: block;
  padding: 16px 9px 7px;          /* 상단 여백 = 별점 자리 */
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #555;
  white-space: nowrap;             /* 단어 중간 줄바꿈 방지(로그인 시 헤더 깨짐 해결) */
  transition: color 0.2s, background 0.2s, font-weight 0.2s;
}
nav ul li a:hover,
nav ul li a.active {
  background: var(--bg);
  color: var(--primary);
  font-weight: 700;
}

/* ★ 별점 (메뉴 위 작은 별) */
nav ul li a::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  transition: width 0.25s, height 0.25s, background 0.25s, box-shadow 0.25s;
}
nav ul li a:hover::before,
nav ul li a.active::before {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgba(212, 168, 83, 0.55);
}

/* ★ 별자리 연결선 (JS가 좌표 계산해 그림 → 메뉴 증감 시 자동 재배치) */
svg.nav-constellation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
svg.nav-constellation line {
  stroke: var(--border);
  stroke-width: 1;
  transition: stroke 0.25s, stroke-width 0.25s;
}
svg.nav-constellation line.lit {
  stroke: var(--accent);
  stroke-width: 1.6;
}

/* ★ '준비중' 배지 (PC·모바일 공용) */
.nav-soon {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary-light);
  border-radius: 8px;
  padding: 1px 6px;
  vertical-align: middle;
}

/* 우측 영역 (로그인 정보) */
/* ───────── 상담사 찾기 메가패널 (고민별 / 방식별) ───────── */
.nav-mega { position: relative; }
.nav-mega-trigger .nav-caret { font-size: .62rem; margin-left: 5px; vertical-align: middle; transition: transform .2s; }
.nav-mega:hover .nav-caret { transform: rotate(180deg); }
.mega-panel {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 580px; max-width: 92vw;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 22px 54px rgba(107, 58, 31, .20);
  padding: 18px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 200;
}
.mega-panel::before {            /* 트리거-패널 사이 hover 끊김 방지 */
  content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px;
}
.nav-mega:hover .mega-panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.mega-head { font-size: .76rem; font-weight: 800; color: var(--accent); letter-spacing: .3px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.mega-item {
  display: grid; grid-template-columns: 28px 1fr; column-gap: 11px; align-items: center;
  padding: 8px 10px; border-radius: 12px; text-decoration: none; transition: background .14s;
}
.mega-item:hover { background: var(--bg); }
.mega-item .mi-emoji { grid-column: 1; grid-row: 1 / span 2; font-size: 1.2rem; text-align: center; align-self: center; }
.mega-item .mi-t { grid-column: 2; grid-row: 1; font-weight: 700; color: var(--text); font-size: .9rem; }
.mega-item .mi-d { grid-column: 2; grid-row: 2; font-size: .71rem; color: #9a8a74; }
.mega-col-method { border-left: 1px solid var(--border); padding-left: 14px; }
.mega-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; padding: 11px; border-radius: 12px; text-decoration: none;
  font-weight: 800; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), #c2974a);
}

/* ───────── 모바일: 상담사 찾기 별 → 고민/방식 갈래 ───────── */
.mobile-constellation .m-finder { cursor: pointer; }
.mobile-constellation .m-finder .dot { width: 16px; height: 16px; box-shadow: 0 0 16px 4px rgba(212, 168, 83, 0.7); }
.mobile-constellation .m-finder .m-caret { font-size: .58rem; margin-left: 5px; color: var(--accent); transition: transform .25s; }
.mobile-constellation.finder-open .m-finder .m-caret { transform: rotate(180deg); }
/* 하위 별은 접힘 상태에서 확실히 숨김 (.m-node 보다 높은 우선순위) */
.mobile-constellation .m-sub { display: none; }
.mobile-constellation.finder-open .m-sub { display: flex; animation: mSubPop .35s ease both; }
.mobile-constellation .m-sub .dot { width: 9px; height: 9px; box-shadow: 0 0 8px 2px rgba(212, 168, 83, 0.5); }
.mobile-constellation .m-sub .lbl { font-size: .76rem; color: #e6d8bf; }
@keyframes mSubPop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 상담사 가입 — 고민 태그 체크칩 */
.concern-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.concern-chip { position: relative; cursor: pointer; }
.concern-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.concern-chip span { display: inline-block; padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 600; color: var(--text); transition: all .14s; }
.concern-chip input:checked + span { background: linear-gradient(135deg, var(--accent), #c2974a); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(212, 168, 83, .35); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-user-link {
  font-size: 0.85rem;
  color: #555;
  font-weight: 700;
}
.point-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

/* 햄버거 (PC에서 숨김) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
/* 햄버거 → X 변환 */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 메뉴 (PC에서 숨김) */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 999;
  overflow-y: auto;
  padding: 0;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
}
.mobile-menu-backdrop.open { display: block; }

/* 모바일 메뉴 — 사용자 영역 */
.mobile-menu-user {
  background: var(--bg);
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-user-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-user-grade {
  font-size: 0.72rem;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.mobile-user-point {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
}
.mobile-login-buttons {
  display: flex;
  gap: 8px;
}

/* 모바일 메뉴 — ★ 별자리 영역 (세로 리스트 → 밤하늘 별자리로 교체) */
.mobile-constellation {
  position: relative;
  flex: 1;
  min-height: 360px;
  background: radial-gradient(ellipse at 50% 30%, #3a2a4a 0%, #241a30 60%, #1a1322 100%);
  overflow: hidden;
  transition: height 0.35s ease;
}
.mobile-constellation .m-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mobile-constellation .m-lines line {
  stroke: rgba(212, 168, 83, 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.mobile-constellation .twinkle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
}
.m-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.4s;
}
.mobile-menu.open .m-node { opacity: 1; }
.m-node .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 3px rgba(212, 168, 83, 0.6);
  transition: transform 0.2s;
}
.m-node:hover .dot,
.m-node:active .dot { transform: scale(1.35); }
.m-node .lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f3e9d6;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.m-node .lbl i { margin-right: 4px; color: var(--accent); }
.m-node .lbl .nav-soon { margin-left: 4px; }

/* 모바일 로그아웃 바 (별자리 영역 하단) */
.mobile-logout-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #888;
  background: #fff;
  border-top: 1px solid var(--border);
}

/* ────────────────────────────────────────────────
   푸터 — 데스크탑 기본
   ──────────────────────────────────────────────── */
footer {
  background: #1a0d05;
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 28px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand { /* 로고/소개 컬럼 */ }
.footer-logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-logo-icon {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}
.footer-desc {
  font-size: 0.82rem;
  line-height: 1.7;
  opacity: 0.65;
}

/* 푸터 컬럼 (서비스/고객센터/멤버십) */
.footer-col { /* PC에선 그냥 컬럼 */ }
.footer-head {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: default;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-arrow {
  display: none; /* PC에선 화살표 숨김 */
  font-size: 0.7rem;
  opacity: 0.5;
  transition: transform 0.25s;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer-links a {
  font-size: 0.8rem;
  opacity: 0.65;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  opacity: 0.5;
}
.footer-biz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.footer-biz-sep { opacity: 0.4; }

/* ────────────────────────────────────────────────
   반응형 — 헤더/푸터
   ──────────────────────────────────────────────── */

/* 태블릿 */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 8px; }
}

/* 모바일 (메인 분기점) */
@media (max-width: 768px) {
  /* PC 네비/우측영역 숨김 */
  nav,
  .header-right { display: none; }

  /* 햄버거 표시 */
  .hamburger { display: flex; }

  /* 로고 살짝 축소 */
  .header-inner { padding: 0 14px; height: 60px; }
  .logo { font-size: 1.3rem; gap: 8px; }
  .logo-icon { width: 34px; height: 34px; font-size: 1rem; }

  /* 모바일 메뉴 위치 보정 (header 높이 변경 반영) */
  .mobile-menu,
  .mobile-menu-backdrop { top: 60px; }

  /* 푸터: brand 위, 컬럼 3개를 그 아래 accordion으로 */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 24px;
  }
  .footer-brand {
    grid-column: auto;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
  }

  /* 푸터 컬럼: 접힘 상태로 시작 */
  .footer-col {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .footer-head {
    padding: 14px 0;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.92rem;
  }
  .footer-arrow { display: inline-block; }
  .footer-col.open .footer-arrow { transform: rotate(180deg); }

  .footer-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    gap: 0;
  }
  .footer-col.open .footer-links {
    max-height: 400px;
    padding-bottom: 14px;
  }
  .footer-links a {
    padding: 10px 0;
    font-size: 0.85rem;
  }

  /* 푸터 하단 */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-top: 20px;
  }
}

/* 소형 모바일 */
@media (max-width: 480px) {
  .footer-biz { font-size: 0.72rem; }
  .footer-biz-sep { display: none; } /* 구분자 숨기고 줄바꿈 */
  .footer-biz > span { display: block; width: 100%; }
}



/* ────────────────────────────────────────────────────────────
   "왜 토닥인가요?" 섹션 — feature 카드 그리드
   (기본 스타일 + 반응형 — 다른 페이지에서도 재활용 가능한 컴포넌트)
   ──────────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.feature-icon { font-size: 2.2rem; margin-bottom: 14px; }
.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--primary);
}
.feature-card p {
  color: #888;
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ────────────────────────────────────────────────────────────
   메인 페이지 — 반응형 미디어쿼리
   ──────────────────────────────────────────────────────────── */

/* === 768px 이하 (모바일) === */
@media (max-width: 768px) {
  /* Hero 영역 */
  .hero { padding: 50px 0 40px; }
  .hero-title { font-size: 1.7rem; line-height: 1.3; }
  .hero-subtitle { font-size: 0.92rem; margin-bottom: 22px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stat { padding: 12px 6px; }
  .hero-stat-value { font-size: 1.3rem; }
  .hero-stat-label { font-size: 0.7rem; }
  .hero-promo { margin-top: 24px; padding: 16px; }
  .hero-promo-coin { font-size: 1.05rem; }

  /* 카테고리 바 — 가로 스크롤로 전환 */
  .cat-bar { padding: 14px 0; }
  .cat-bar-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-bar-inner::-webkit-scrollbar { display: none; }
  .cat-link {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* 상담사 카드 그리드 — 2열 강제 */
  .counselor-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .c-card-img { height: 150px; }
  .c-avatar { font-size: 3.5rem; }
  .c-card-body { padding: 12px; }
  .c-name { font-size: 0.95rem; }
  .c-tag { font-size: 0.75rem; }
  .c-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .c-actions { flex-direction: column; gap: 6px; }
  .c-actions .btn { padding: 8px; font-size: 0.78rem; }

  /* 섹션 공통 */
  .section { padding: 40px 0; }
  .section-title { font-size: 1.4rem; margin-bottom: 24px; }

  /* feature 카드 — 2x2 그리드 */
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-card { padding: 20px 14px; }
  .feature-icon { font-size: 1.8rem; }
}

/* === 480px 이하 (소형 모바일) === */
@media (max-width: 480px) {
  /* Hero 추가 축소 */
  .hero { padding: 40px 0 30px; }
  .hero-title { font-size: 1.45rem; }
  .hero-subtitle { font-size: 0.88rem; }

  /* 멤버십 등급 — 2열 유지 (기본 1열 → 2열로 덮어쓰기) */
  .grade-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grade-card { padding: 18px 10px; }
  .grade-icon { font-size: 1.5rem; }
  .grade-name { font-size: 0.9rem; }
  .grade-cond { font-size: 0.68rem; }
}

/* === 380px 이하 (초소형) === */
@media (max-width: 380px) {
  /* 상담사/feature 카드 1열 */
  .counselor-grid { grid-template-columns: 1fr; }
  .c-card-img { height: 180px; }
  .feature-grid { grid-template-columns: 1fr; }
}



/* ====================================================================
   로그인 페이지 스타일 (login.jsp에서 이전됨)
   --------------------------------------------------------------------
   원본: login.jsp 상단 <style> 블록 (검증 완료)
   중복 처리: .auth-card (@media 480px) 기존 줄은 위에서 주석 처리됨
   ==================================================================== */

/* ── 비밀번호 입력 박스 (보기 토글 포함) ───────── */
.pwd-wrap { position: relative; }
.pwd-wrap .form-control { padding-right: 44px; }
.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 0.95rem;
}
.pwd-toggle:hover { color: var(--primary); }

/* ── 로그인 유지 / 비번 재설정 줄 ───────── */
.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
}
.login-find-pwd {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ── 회원가입 안내 영역 ───────── */
.signup-guide { text-align: center; margin-top: 18px; }
.signup-guide-text {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}
.signup-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.signup-buttons .btn {
  flex: 1;
  max-width: 180px;
}

/* ── 신규 혜택 안내 박스 ───────── */
.welcome-bonus {
  margin-top: 20px;
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--primary);
  text-align: center;
}

/* ── 비밀번호 재설정 모달 보강 ───────── */
.modal-step-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}
.modal-box .form-control { margin-bottom: 12px; }
.modal-back {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.modal-back:hover { color: var(--primary); }

/* ────────────────────────────────────────────────
   로그인 페이지 — 반응형
   ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-wrap { padding: 24px 14px; }
  .auth-card { padding: 28px 22px; }      /* 기존 28px 18px 대체 */
  .auth-title { font-size: 1.3rem; }
  /* [중복 제거됨] .auth-sub 중복 (480px) — 회원가입 페이지 블록의 0.85rem 값 사용 */

  /* 회원가입 두 버튼 세로로 */
  .signup-buttons { flex-direction: column; }
  .signup-buttons .btn { max-width: 100%; width: 100%; }

  /* 비번 보기 버튼 터치 영역 확대 */
  .pwd-toggle { width: 44px; height: 44px; font-size: 1rem; }
  .pwd-wrap .form-control { padding-right: 50px; }

  /* 로그인 유지/비번재설정 줄 — 좁으면 줄바꿈 */
  .login-row { flex-wrap: wrap; }
  
  /* 로그인 폼 옵션 영역 — 이메일 저장 + 로그인 유지 가로 배치 */
  .login-options {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .auth-card { padding: 22px 16px; }
  .login-remember,
  .login-find-pwd { font-size: 0.8rem; }
}



/* ====================================================================
   회원가입 페이지 스타일 (signup.jsp에서 이전됨)
   --------------------------------------------------------------------
   원본: signup.jsp 상단 <style> 블록 (검증 완료)

   [충돌 정리 내역]
   - .pwd-wrap, .pwd-wrap .form-control, .pwd-toggle, .pwd-toggle:hover
     → 로그인 페이지 블록과 동일 → 회원가입 쪽에서 삭제 (재사용)
   - @media 480px의 .auth-title, .pwd-toggle, .pwd-wrap .form-control
     → 로그인 페이지 블록과 동일 → 회원가입 쪽에서 삭제 (재사용)
   - @media 480px의 .auth-sub
     → 값 차이 (0.82rem → 0.85rem), 로그인 쪽 줄 주석 처리, 이쪽 값 적용
   ==================================================================== */

/* ── 카드 ───────── */
.signup-wrap { padding: 50px 20px; }
.signup-card { max-width: 520px; }

/* (.pwd-wrap, .pwd-toggle 계열은 로그인 페이지 블록에서 이미 정의됨 — 재사용) */

/* ── 비밀번호 강도 표시 ───────── */
.pwd-strength {
  display: flex; gap: 4px; margin-top: 6px;
}
.pwd-strength-bar {
  flex: 1; height: 4px; background: #e5e5e5; border-radius: 2px;
  transition: background 0.2s;
}
.pwd-strength-bar.active-weak   { background: #ef4444; }
.pwd-strength-bar.active-medium { background: #f59e0b; }
.pwd-strength-bar.active-strong { background: #10b981; }
.pwd-strength-text {
  font-size: 0.78rem; margin-top: 4px; color: #888;
}
.pwd-strength-text.weak   { color: #ef4444; }
.pwd-strength-text.medium { color: #f59e0b; }
.pwd-strength-text.strong { color: #10b981; }

/* ── 휴대폰 인증 그룹 ───────── */
.phone-verify-group {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.phone-verify-group .form-group { margin-bottom: 10px; }
.phone-verify-group .form-group:last-child { margin-bottom: 0; }
.phone-verify-group .form-label { font-size: 0.85rem; }
.sms-timer {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
}
.sms-verified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #10b981; color: #fff;
  padding: 4px 10px; border-radius: 12px;
  font-size: 0.78rem; font-weight: 700;
  margin-left: 6px;
}

/* ── 약관 동의 영역 ───────── */
.agree-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.agree-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 12px;
}
.agree-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}
.agree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}
.agree-label.all { font-weight: 700; font-size: 0.92rem; }
.agree-label:last-child { margin-bottom: 0; }
.agree-label input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── 로그인 안내 ───────── */
.login-guide {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: #666;
}
.login-guide a {
  color: var(--primary);
  font-weight: 800;
  margin-left: 4px;
}

/* ────────────────────────────────────────────────
   회원가입 페이지 — 반응형
   ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .signup-wrap { padding: 24px 14px; }
  .signup-card { padding: 28px 22px; }
  .auth-sub { font-size: 0.85rem; margin-bottom: 22px; }   /* 로그인 0.82rem 대체 */

  /* (.auth-title, .pwd-toggle, .pwd-wrap .form-control은 로그인 블록에서 정의됨) */

  /* 이메일/닉네임 input-group — 좁은 화면에서 세로 정렬 */
  .input-group { flex-direction: column; gap: 8px; }
  .input-group .form-control { width: 100%; }
  .input-group .btn { width: 100%; }

  /* 약관 폰트 가독성 확보 */
  .agree-label { font-size: 0.9rem; }
  .agree-label.all { font-size: 0.95rem; }
  
  /* ★ v2 추가 — 암호화 안내 컴포넌트 모바일 */
  .pwd-encrypt-warn { font-size: 0.8rem; padding: 10px 12px; }
  .signup-modal-card { width: calc(100% - 24px); }
  .signup-modal-body { padding: 18px; }
}

@media (max-width: 360px) {
  .signup-card { padding: 22px 16px; }
}

/* ════════════════════════════════════════════════
   회원가입 v2 — 암호화 안내 컴포넌트
   - 비밀번호 옆 경고 박스 (.pwd-encrypt-warn)
   - 약관 암호화 항목 (.agree-label.agree-encryption)
   - 가입 직전 빨간 모달 (.signup-modal*)
   ════════════════════════════════════════════════ */

   /* 비밀번호 옆 경고 박스 */
   .pwd-encrypt-warn {
     margin-top: 12px;
     padding: 12px 14px;
     background: #fff8e1;
     border-left: 3px solid #f59e0b;
     border-radius: 6px;
     display: flex;
     gap: 10px;
     align-items: flex-start;
     font-size: 0.85rem;
     line-height: 1.5;
     color: #6b4f00;
   }
   .pwd-encrypt-warn i { font-size: 1.1rem; color: #f59e0b; margin-top: 2px; }
   .pwd-encrypt-warn strong { color: #92400e; }
   .pwd-encrypt-warn .warn-strong { display: inline-block; color: #b91c1c; font-weight: 600; }

   /* 약관 동의 - 암호화 항목 */
   .agree-label.agree-encryption { background: #fef3c7; padding: 10px; border-radius: 6px; align-items: flex-start; }
   .agree-label.agree-encryption .agree-sub {
     display: block;
     margin-top: 4px;
     font-size: 0.78rem;
     color: #92400e;
     line-height: 1.4;
   }

   /* 가입 직전 모달 */
   .signup-modal {
     position: fixed; inset: 0; z-index: 9999;
     display: flex; align-items: center; justify-content: center;
   }
   .signup-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
   .signup-modal-card {
     position: relative; z-index: 1;
     max-width: 480px; width: calc(100% - 32px);
     background: #fff; border-radius: 12px; overflow: hidden;
     box-shadow: 0 10px 40px rgba(0,0,0,0.2);
   }
   .signup-modal-header {
     padding: 18px 22px; background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
     color: #fff; display: flex; align-items: center; gap: 10px;
   }
   .signup-modal-header i { font-size: 1.3rem; }
   .signup-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
   .signup-modal-body { padding: 22px; }
   .modal-lead { margin: 0 0 14px; font-size: 0.95rem; color: #374151; }
   .modal-warn-box {
     padding: 14px 16px; background: #fef2f2; border-left: 4px solid #ef4444;
     border-radius: 6px; font-size: 0.88rem; line-height: 1.6; color: #7f1d1d;
   }
   .modal-warn-box strong { color: #991b1b; display: block; margin-bottom: 8px; }
   .modal-warn-box ul { margin: 0; padding-left: 20px; }
   .modal-warn-box li { margin-top: 4px; }
   .modal-confirm-check {
     display: flex; gap: 8px; align-items: flex-start;
     margin-top: 18px; padding: 12px; background: #f9fafb; border-radius: 6px;
     cursor: pointer; font-size: 0.9rem;
   }
   .modal-confirm-check input { margin-top: 2px; }
   .signup-modal-footer {
     padding: 14px 22px 22px; display: flex; gap: 10px; justify-content: flex-end;
   }
   .signup-modal-footer .btn { min-width: 100px; }
   
   
   /* MZ 스타일 로그아웃 버튼 — specificity 강화 */
   .header-right button.logout-btn,
   button.logout-btn {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 8px 14px;
     background: transparent;
     border: 1px solid rgba(0, 0, 0, 0.08);
     border-radius: 10px;
     color: #6b7280;
     font-size: 0.85rem;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.2s ease;
     font-family: inherit;
   }
   .header-right button.logout-btn i,
   button.logout-btn i {
     font-size: 0.9rem;
     transition: transform 0.2s ease;
   }
   .header-right button.logout-btn:hover,
   button.logout-btn:hover {
     background: #fef2f2 !important;
     border-color: #fecaca !important;
     color: #dc2626 !important;
     transform: translateY(-1px);
     box-shadow: 0 4px 12px -3px rgba(220, 38, 38, 0.18);
   }
   .header-right button.logout-btn:hover i,
   button.logout-btn:hover i {
     transform: translateX(2px);
   }
   .header-right button.logout-btn:active,
   button.logout-btn:active {
     transform: translateY(0);
     box-shadow: 0 1px 3px -1px rgba(220, 38, 38, 0.15);
   }
   
   /* PC 등급 배지 — 등급별 그라데이션 + shimmer */
   .header-user-grade {
     display: inline-flex;
     align-items: center;
     gap: 3px;
     font-size: 0.72rem;
     font-weight: 700;
     padding: 3px 10px;
     border-radius: 12px;
     margin-left: 6px;
     vertical-align: middle;
     position: relative;
     overflow: hidden;
     letter-spacing: 0.02em;
   }

   /* shimmer 반짝임 효과 — 의사 요소로 가로지르는 빛 */
   .header-user-grade::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 60%;
     height: 100%;
     background: linear-gradient(90deg,
                 transparent,
                 rgba(255, 255, 255, 0.35),
                 transparent);
     animation: gradeShimmer 3s infinite;
   }
   @keyframes gradeShimmer {
     0%   { left: -100%; }
     60%  { left: 200%; }
     100% { left: 200%; }
   }

   /* 등급별 배경 그라데이션 + 색상 */
   body.grade-bronze .header-user-grade {
     background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
     color: #fff;
     box-shadow: 0 2px 6px -2px rgba(139, 69, 19, 0.4);
   }
   body.grade-silver .header-user-grade {
     background: linear-gradient(135deg, #E8E8E8 0%, #A8A8A8 100%);
     color: #333;
     box-shadow: 0 2px 6px -2px rgba(120, 120, 120, 0.4);
   }
   body.grade-silver .header-user-grade::before {
     animation-duration: 2.5s;
   }
   body.grade-gold .header-user-grade {
     background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
     color: #fff;
     box-shadow: 0 2px 8px -2px rgba(184, 134, 11, 0.5);
     text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
   }
   body.grade-gold .header-user-grade::before {
     animation-duration: 2s;
   }
   body.grade-diamond .header-user-grade {
     background: linear-gradient(135deg, #00B4D8 0%, #0077A8 100%);
     color: #fff;
     box-shadow: 0 2px 10px -2px rgba(0, 119, 168, 0.6),
                 0 0 12px -2px rgba(0, 180, 216, 0.3);
   }
   body.grade-diamond .header-user-grade::before {
     animation-duration: 2s;
     background: linear-gradient(90deg,
                 transparent,
                 rgba(255, 255, 255, 0.5),
                 transparent);
   }
   body.grade-black .header-user-grade {
     background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
     color: #FFD700;
     box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.6),
                 0 0 16px -4px rgba(255, 215, 0, 0.4);
     border: 1px solid rgba(255, 215, 0, 0.3);
   }
   body.grade-black .header-user-grade::before {
     animation-duration: 1.5s;
     background: linear-gradient(90deg,
                 transparent,
                 rgba(255, 215, 0, 0.5),
                 transparent);
   }

   /* 등급 미정/게스트 — 정적 */
   body.grade-guest .header-user-grade,
   body:not([class*="grade-"]) .header-user-grade {
     background: var(--primary);
     color: #fff;
   }
   body.grade-guest .header-user-grade::before {
     animation: none;
   }
   
   
   /* ════════════════════════════════════════════════
      세션 타이머 
      ════════════════════════════════════════════════ */

   /* 세션 타이머 — 헤더 우측 */
   .session-timer {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 6px 12px;
     background: #f9fafb;
     border: 1px solid #e5e7eb;
     border-radius: 10px;
     font-size: 0.82rem;
     font-weight: 600;
     color: #4b5563;
     cursor: pointer;
     transition: all 0.2s ease;
     font-variant-numeric: tabular-nums;
     user-select: none;
   }
   .session-timer i {
     font-size: 0.85rem;
     color: #6b7280;
     transition: transform 0.2s ease;
   }
   .session-timer:hover {
     background: #f3f4f6;
     border-color: #d1d5db;
     color: #1f2937;
   }
   .session-timer:hover i { transform: rotate(15deg); }
   .session-timer:focus-visible {
     outline: 2px solid var(--primary);
     outline-offset: 2px;
   }

   /* 경고 상태 (warning) — 33% 이하 */
   .session-timer.warning {
     background: #fef3c7;
     border-color: #fcd34d;
     color: #92400e;
     animation: sessionWarningPulse 2s ease-in-out infinite;
   }
   .session-timer.warning i { color: #d97706; }
   @keyframes sessionWarningPulse {
     0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
     50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
   }

   /* 위험 상태 (critical) — 17% 이하 */
   .session-timer.critical {
     background: #fee2e2;
     border-color: #fca5a5;
     color: #991b1b;
     animation: sessionCriticalPulse 1s ease-in-out infinite;
   }
   .session-timer.critical i { color: #dc2626; }
   @keyframes sessionCriticalPulse {
     0%, 100% { 
       box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
       transform: scale(1);
     }
     50% { 
       box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
       transform: scale(1.02);
     }
   }

   /* 연장 중 상태 (extending) */
   .session-timer.extending {
     background: #dbeafe;
     border-color: #93c5fd;
     color: #1e40af;
     pointer-events: none;
     animation: sessionExtendingPulse 0.6s ease-in-out infinite;
   }
   .session-timer.extending i { 
     color: #2563eb;
     animation: spin 1s linear infinite;
     transform: none !important;
   }
   @keyframes sessionExtendingPulse {
     0%, 100% { opacity: 1; }
     50%      { opacity: 0.7; }
   }
   @keyframes spin {
     to { transform: rotate(360deg); }
   }

   /* 세션 만료 모달 */
   .session-modal {
     position: fixed;
     inset: 0;
     z-index: 9999;
     display: none;
     align-items: center;
     justify-content: center;
   }
   .session-modal.active { display: flex; }
   .session-modal-backdrop {
     position: absolute;
     inset: 0;
     background: rgba(0, 0, 0, 0.55);
   }
   .session-modal-card {
     position: relative;
     z-index: 1;
     max-width: 440px;
     width: calc(100% - 32px);
     background: #fff;
     border-radius: 12px;
     overflow: hidden;
     box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
     animation: sessionModalIn 0.3s ease-out;
   }
   @keyframes sessionModalIn {
     from { opacity: 0; transform: scale(0.95) translateY(-10px); }
     to   { opacity: 1; transform: scale(1) translateY(0); }
   }
   .session-modal-header {
     padding: 18px 22px;
     background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
     color: #fff;
     display: flex;
     align-items: center;
     gap: 10px;
   }
   .session-modal-header i { font-size: 1.3rem; }
   .session-modal-header h3 { 
     margin: 0; 
     font-size: 1.1rem; 
     font-weight: 600; 
   }
   .session-modal-body { padding: 22px; }
   .session-modal-lead {
     margin: 0 0 16px;
     font-size: 0.95rem;
     color: #374151;
     line-height: 1.6;
   }
   .session-modal-time {
     padding: 14px;
     background: #fef2f2;
     border-radius: 8px;
     text-align: center;
     font-size: 0.95rem;
     color: #7f1d1d;
   }
   .session-modal-time strong {
     display: inline-block;
     margin-left: 6px;
     font-size: 1.4rem;
     font-weight: 800;
     color: #dc2626;
     font-variant-numeric: tabular-nums;
   }
   .session-modal-footer {
     padding: 14px 22px 22px;
     display: flex;
     gap: 10px;
     justify-content: flex-end;
   }
   .session-modal-footer .btn { min-width: 110px; }

   /* 모바일 — 1024px 이하에서는 PC 타이머 숨김 (햄버거 메뉴에 추후 표시) */
   @media (max-width: 1024px) {
     .session-timer { display: none; }
   }
   
   /* ════════════════════════════════════════════════
      모바일 세션 바 — 햄버거 메뉴 내부 (v3)
      ════════════════════════════════════════════════ */
   .mobile-session-bar {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 10px;
     margin-top: 12px;
     padding: 12px 14px;
     background: #f9fafb;
     border: 1px solid #e5e7eb;
     border-radius: 10px;
     transition: all 0.2s ease;
   }
   .mobile-session-info {
     display: flex;
     align-items: center;
     gap: 8px;
     font-size: 0.85rem;
     color: #4b5563;
     flex: 1;
     min-width: 0;
   }
   .mobile-session-info i { 
     font-size: 0.95rem; 
     color: #6b7280; 
     flex-shrink: 0; 
   }
   .mobile-session-label {
     color: #6b7280;
     font-weight: 500;
   }
   .mobile-session-time {
     font-weight: 700;
     color: #1f2937;
     font-variant-numeric: tabular-nums;
     margin-left: auto;
     padding-right: 4px;
   }
   .mobile-session-extend {
     display: inline-flex;
     align-items: center;
     gap: 5px;
     padding: 6px 12px;
     background: var(--primary);
     color: #fff;
     border: none;
     border-radius: 8px;
     font-size: 0.8rem;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.2s ease;
     font-family: inherit;
     flex-shrink: 0;
   }
   .mobile-session-extend i { font-size: 0.75rem; }
   .mobile-session-extend:hover { 
     background: var(--primary-dark, #6f4a1d); 
     transform: translateY(-1px); 
   }
   .mobile-session-extend:active { transform: translateY(0); }

   /* 모바일 세션 바 — 상태별 색상 (PC와 동일 임계값) */
   .mobile-session-bar.warning {
     background: #fef3c7;
     border-color: #fcd34d;
     animation: sessionWarningPulse 2s ease-in-out infinite;
   }
   .mobile-session-bar.warning .mobile-session-info,
   .mobile-session-bar.warning .mobile-session-label { color: #92400e; }
   .mobile-session-bar.warning .mobile-session-info i { color: #d97706; }
   .mobile-session-bar.warning .mobile-session-time { color: #78350f; }

   .mobile-session-bar.critical {
     background: #fee2e2;
     border-color: #fca5a5;
     animation: sessionCriticalPulse 1s ease-in-out infinite;
   }
   .mobile-session-bar.critical .mobile-session-info,
   .mobile-session-bar.critical .mobile-session-label { color: #991b1b; }
   .mobile-session-bar.critical .mobile-session-info i { color: #dc2626; }
   .mobile-session-bar.critical .mobile-session-time { color: #7f1d1d; }
   .mobile-session-bar.critical .mobile-session-extend {
     background: #dc2626;
   }

   .mobile-session-bar.extending {
     background: #dbeafe;
     border-color: #93c5fd;
     pointer-events: none;
     animation: sessionExtendingPulse 0.6s ease-in-out infinite;
   }
   .mobile-session-bar.extending .mobile-session-info,
   .mobile-session-bar.extending .mobile-session-label { color: #1e40af; }
   .mobile-session-bar.extending .mobile-session-info i { 
     color: #2563eb;
     animation: spin 1s linear infinite;
   }
   .mobile-session-bar.extending .mobile-session-time { color: #1e3a8a; }
   
   
   /* ════════════════════════════════════════════════
      마이페이지 별자리 대시보드 (v2)
      - 중앙: 등급 색상 그라데이션 + 반짝임 (body.grade-* 변수 활용)
      - 6개 카드: 별자리 배치 (12시 / 2시 / 4시 / 6시 / 8시 / 10시)
      - 토글 사이드바: 우측 슬라이드 인
      ════════════════════════════════════════════════ */

   /* 전체 스테이지 — 우주 같은 배경 */
   .constellation-stage {
     position: relative;
     min-height: calc(100vh - 200px);
     padding: 60px 20px;
     background: 
       radial-gradient(ellipse at top, rgba(255, 235, 200, 0.15) 0%, transparent 50%),
       radial-gradient(ellipse at bottom right, rgba(200, 180, 255, 0.08) 0%, transparent 50%),
       linear-gradient(180deg, #1a1410 0%, #2d1f15 100%);
     overflow: hidden;
     isolation: isolate;
   }

   /* 배경 별빛 (점점이 반짝이는 별들) */
   .constellation-stars {
     position: absolute;
     inset: 0;
     pointer-events: none;
     z-index: 0;
     background-image:
       radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
       radial-gradient(1px 1px at 80% 20%, rgba(255,235,180,0.6), transparent),
       radial-gradient(1.5px 1.5px at 35% 80%, rgba(255,255,255,0.7), transparent),
       radial-gradient(1px 1px at 60% 65%, rgba(255,235,180,0.5), transparent),
       radial-gradient(2px 2px at 90% 90%, rgba(255,255,255,0.9), transparent),
       radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.4), transparent),
       radial-gradient(1.5px 1.5px at 15% 70%, rgba(255,235,180,0.6), transparent),
       radial-gradient(1px 1px at 75% 45%, rgba(255,255,255,0.5), transparent);
     background-size: 100% 100%;
     animation: starsTwinkle 8s ease-in-out infinite;
   }
   @keyframes starsTwinkle {
     0%, 100% { opacity: 0.6; }
     50%      { opacity: 1; }
   }

   /* 사이드바 토글 버튼 (우측 상단, 별 모양) */
   .constellation-toggle {
     position: absolute;
     top: 30px;
     right: 30px;
     z-index: 50;
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 10px 18px;
     background: rgba(255, 255, 255, 0.08);
     border: 1px solid rgba(255, 215, 130, 0.3);
     border-radius: 30px;
     color: #fff5e0;
     font-size: 0.88rem;
     font-weight: 600;
     cursor: pointer;
     backdrop-filter: blur(8px);
     -webkit-backdrop-filter: blur(8px);
     transition: all 0.3s ease;
     font-family: inherit;
   }
   .constellation-toggle:hover {
     background: rgba(255, 215, 130, 0.18);
     border-color: rgba(255, 215, 130, 0.6);
     transform: translateY(-2px);
     box-shadow: 0 6px 20px -4px rgba(255, 215, 130, 0.4);
   }
   .constellation-toggle .toggle-star {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     color: #ffd770;
     animation: toggleStarSpin 4s linear infinite;
   }
   @keyframes toggleStarSpin {
     to { transform: rotate(360deg); }
   }
   .constellation-toggle:hover .toggle-star {
     animation-duration: 1.5s;
     color: #fff;
   }

   /* 별자리 보드 — 카드 배치 영역 */
   .constellation-board {
     position: relative;
     width: 100%;
     max-width: 900px;
     height: 600px;
     margin: 0 auto;
     z-index: 1;
   }

   /* 별자리 연결선 (SVG) */
   .constellation-lines {
     position: absolute;
     inset: 0;
     width: 100%;
     height: 100%;
     pointer-events: none;
     z-index: 0;
   }
   .constellation-lines .line {
     stroke: rgba(255, 215, 130, 0.18);
     stroke-width: 1;
     stroke-dasharray: 4 6;
     animation: lineFlow 6s linear infinite;
   }
   @keyframes lineFlow {
     to { stroke-dashoffset: -20; }
   }

   /* 중앙 사용자 카드 */
   .constellation-center {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     width: 200px;
     height: 200px;
     border-radius: 50%;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 4px;
     background: linear-gradient(135deg, var(--gc, #8B4513) 0%, var(--gd, #5a2d0a) 100%);
     color: var(--gt, #fff);
     box-shadow:
       0 0 40px rgba(255, 215, 130, 0.4),
       inset 0 0 30px rgba(0, 0, 0, 0.2);
     z-index: 5;
     text-align: center;
     overflow: hidden;
     isolation: isolate;
   }
   .center-aura {
     position: absolute;
     inset: -20px;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(255, 215, 130, 0.3) 0%, transparent 70%);
     z-index: -1;
     pointer-events: none; /* [add] 장식 후광 — 모바일에서 center가 static이 되면 board 기준으로 커져 카드 탭을 가로채므로 입력 차단 */
     animation: centerPulse 4s ease-in-out infinite;
   }
   @keyframes centerPulse {
     0%, 100% { transform: scale(1);    opacity: 0.6; }
     50%      { transform: scale(1.15); opacity: 1;   }
   }
   .center-avatar {
     font-size: 2.2rem;
     line-height: 1;
     margin-bottom: 2px;
     filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
   }
   .center-nickname {
     font-size: 1.1rem;
     font-weight: 800;
     text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
   }
   .center-grade {
     font-size: 0.85rem;
     font-weight: 700;
     opacity: 0.95;
   }
   .center-point {
     font-size: 0.95rem;
     font-weight: 700;
     margin-top: 2px;
     font-variant-numeric: tabular-nums;
   }

   /* 별자리 카드 (공통) */
   .constellation-card {
     position: absolute;
     touch-action: manipulation;
     -webkit-tap-highlight-color: rgba(255,215,130,.25);
     width: 130px;
     height: 130px;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 4px;
     padding: 14px;
     background: rgba(255, 255, 255, 0.08);
     border: 1px solid rgba(255, 215, 130, 0.25);
     border-radius: 18px;
     color: #fff5e0;
     text-decoration: none;
     text-align: center;
     backdrop-filter: blur(6px);
     -webkit-backdrop-filter: blur(6px);
     transition: all 0.3s ease;
     z-index: 2;
     overflow: hidden;
     isolation: isolate;
   }
   .constellation-card:hover {
     transform: translateY(-4px) scale(1.05);
     border-color: rgba(255, 215, 130, 0.7);
     background: rgba(255, 215, 130, 0.12);
     box-shadow: 0 10px 30px -8px rgba(255, 215, 130, 0.45);
     color: #fff;
   }
   .card-glow {
     position: absolute;
     inset: 0;
     background: radial-gradient(circle at center, rgba(255, 215, 130, 0.25) 0%, transparent 70%);
     opacity: 0;
     transition: opacity 0.3s ease;
     z-index: -1;
     pointer-events: none; /* [add] 장식 글로우 — 입력 차단(카드 자체만 탭 대상) */
   }
   .constellation-card:hover .card-glow { opacity: 1; }
   .card-icon {
     font-size: 1.8rem;
     line-height: 1;
     margin-bottom: 4px;
     filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
   }
   .card-title {
     font-size: 0.92rem;
     font-weight: 700;
   }
   .card-sub {
     font-size: 0.72rem;
     opacity: 0.75;
     font-weight: 500;
   }

   /* 카드 위치 — 별자리 배치 (12 / 2 / 4 / 6 / 8 / 10시) */
   .card-pos-top    { top: 0;       left: 50%; transform: translateX(-50%); }
   .card-pos-tr     { top: 18%;     right: 5%;  }
   .card-pos-br     { bottom: 18%;  right: 5%;  }
   .card-pos-bottom { bottom: 0;    left: 50%; transform: translateX(-50%); }
   .card-pos-bl     { bottom: 18%;  left: 5%;   }
   .card-pos-tl     { top: 18%;     left: 5%;   }

   /* 호버 시 위치 변환 유지 + 떠오름 효과 같이 */
   .card-pos-top:hover    { transform: translateX(-50%) translateY(-6px) scale(1.05); }
   .card-pos-bottom:hover { transform: translateX(-50%) translateY(-6px) scale(1.05); }

   /* ════════════════════════════════════════════════
      토글 사이드바
      ════════════════════════════════════════════════ */

   .constellation-sidebar {
     position: fixed;
     inset: 0;
     z-index: 9000;
     pointer-events: none;
   }
   .constellation-sidebar.active { pointer-events: auto; }

   .sidebar-backdrop {
     position: absolute;
     inset: 0;
     background: rgba(0, 0, 0, 0.5);
     opacity: 0;
     transition: opacity 0.3s ease;
   }
   .constellation-sidebar.active .sidebar-backdrop { opacity: 1; }

   .sidebar-panel {
     position: absolute;
     top: 0;
     right: 0;
     width: 320px;
     height: 100%;
     background: linear-gradient(180deg, #2d1f15 0%, #1a1410 100%);
     border-left: 1px solid rgba(255, 215, 130, 0.2);
     box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
     transform: translateX(100%);
     transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
     display: flex;
     flex-direction: column;
     overflow-y: auto;
   }
   .constellation-sidebar.active .sidebar-panel { transform: translateX(0); }

   .sidebar-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 20px 22px;
     border-bottom: 1px solid rgba(255, 215, 130, 0.15);
   }
   .sidebar-title {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     color: #fff5e0;
     font-size: 1rem;
     font-weight: 700;
   }
   .sidebar-title i { color: #ffd770; }
   .sidebar-close {
     background: transparent;
     border: 1px solid rgba(255, 255, 255, 0.15);
     color: #fff5e0;
     width: 32px;
     height: 32px;
     border-radius: 8px;
     cursor: pointer;
     transition: all 0.2s ease;
     font-family: inherit;
   }
   .sidebar-close:hover {
     background: rgba(255, 255, 255, 0.1);
     border-color: rgba(255, 215, 130, 0.4);
   }

   .sidebar-user {
     display: flex;
     align-items: center;
     gap: 12px;
     padding: 18px 22px;
     background: rgba(255, 215, 130, 0.05);
     border-bottom: 1px solid rgba(255, 215, 130, 0.1);
   }
   .sidebar-user-avatar {
     width: 44px;
     height: 44px;
     border-radius: 50%;
     background: linear-gradient(135deg, var(--gc, #8B4513) 0%, var(--gd, #5a2d0a) 100%);
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.4rem;
     color: var(--gt, #fff);
     flex-shrink: 0;
   }
   .sidebar-user-info { flex: 1; min-width: 0; }
   .sidebar-user-nickname {
     color: #fff;
     font-size: 0.95rem;
     font-weight: 700;
     margin-bottom: 2px;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
   }
   .sidebar-user-meta {
     color: #c9b896;
     font-size: 0.8rem;
   }

   .sidebar-nav {
     padding: 14px 0;
     flex: 1;
   }
   .sidebar-section-title {
     padding: 10px 22px 6px;
     color: #a89070;
     font-size: 0.72rem;
     font-weight: 700;
     letter-spacing: 0.05em;
     text-transform: uppercase;
   }
   .sidebar-link {
     display: flex;
     align-items: center;
     gap: 12px;
     padding: 11px 22px;
     color: #ddd0b8;
     font-size: 0.9rem;
     font-weight: 500;
     text-decoration: none;
     transition: all 0.2s ease;
     position: relative;
   }
   .sidebar-link i {
     width: 18px;
     color: #c9b896;
     transition: color 0.2s ease;
   }
   .sidebar-link:hover {
     background: rgba(255, 215, 130, 0.08);
     color: #fff;
   }
   .sidebar-link:hover i { color: #ffd770; }
   .sidebar-link.active {
     background: rgba(255, 215, 130, 0.12);
     color: #fff;
     border-left: 3px solid #ffd770;
     padding-left: 19px;
   }
   .sidebar-link.active i { color: #ffd770; }

   .sidebar-link-soon { opacity: 0.65; }
   .sidebar-soon-badge {
     margin-left: auto;
     padding: 2px 8px;
     background: rgba(255, 255, 255, 0.08);
     border: 1px solid rgba(255, 255, 255, 0.15);
     border-radius: 10px;
     font-size: 0.68rem;
     font-weight: 600;
     color: #c9b896;
   }
   .sidebar-link-danger { color: #f5a89d; }
   .sidebar-link-danger i { color: #ef9485; }
   .sidebar-link-danger:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }
   .sidebar-link-danger:hover i { color: #ef4444; }

   /* ════════════════════════════════════════════════
      모바일 — 별자리 배치 → 카드 그리드로 폴백
      ════════════════════════════════════════════════ */
   @media (max-width: 768px) {
     .constellation-stage { padding: 30px 16px; }
     .constellation-toggle {
       top: 16px;
       right: 16px;
       padding: 8px 14px;
       font-size: 0.82rem;
     }
     
     .constellation-board {
       height: auto;
       display: flex;
       flex-direction: column;
       align-items: center;
       gap: 20px;
     }
     
     .constellation-lines { display: none; }
     
     .constellation-center {
       position: static;
       transform: none;
       width: 180px;
       height: 180px;
       margin: 20px 0;
     }
     
     .constellation-card {
       position: static !important;
       transform: none !important;
       width: calc(50% - 8px);
       max-width: 200px;
     }
     .constellation-card > * { pointer-events: none; }
     
     .card-pos-top, .card-pos-tr, .card-pos-br,
     .card-pos-bottom, .card-pos-bl, .card-pos-tl {
       position: static !important;
       top: auto; right: auto; bottom: auto; left: auto;
       transform: none !important;
     }
     
     /* 카드 두 줄 그리드 — 12,2시 / 4,10시 / 6,8시 식으로 짝지어 */
     .constellation-card:hover {
       transform: none !important;
     }
     
     /* 카드들을 grid 컨테이너로 묶기 위한 wrapper가 필요할 수도 있는데,
        일단 flex-wrap으로 처리 */
     .constellation-board {
       flex-wrap: wrap;
       justify-content: center;
     }
   }

   @media (max-width: 480px) {
     .constellation-card {
       width: 100%;
       max-width: 320px;
     }
     .sidebar-panel {
       width: calc(100% - 60px);
     }
   }

   /* ════════════════════════════════════════════════
      별자리 대시보드 — 라이트 모드 / 다크 모드 분리 (v3)
      - 기본(별자리 v2 CSS) = 다크 모드 스타일
      - .theme-light = 라이트 모드 override (낮 하늘)
      - .theme-dark  = 다크 모드 (밤하늘 별빛, 기본 그대로)
      - 테마 토글 버튼 디자인
      ════════════════════════════════════════════════ */

   /* 우측 상단 컨트롤 컨테이너 — 테마 토글 + 사이드바 토글 가로 배치 */
   .constellation-controls {
     position: absolute;
     top: 30px;
     right: 30px;
     z-index: 50;
     display: flex;
     align-items: center;
     gap: 10px;
   }

   /* 기존 .constellation-toggle의 position을 제거 (컨테이너가 위치 잡음) */
   .constellation-controls .constellation-toggle {
     position: static !important;
     top: auto !important;
     right: auto !important;
   }

   /* 테마 토글 버튼 — 다크 기본 */
   .constellation-theme-toggle {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     width: 44px;
     height: 44px;
     background: rgba(255, 255, 255, 0.08);
     border: 1px solid rgba(255, 215, 130, 0.3);
     border-radius: 50%;
     color: #ffd770;
     font-size: 1rem;
     cursor: pointer;
     backdrop-filter: blur(8px);
     -webkit-backdrop-filter: blur(8px);
     transition: all 0.3s ease;
     font-family: inherit;
   }
   .constellation-theme-toggle:hover {
     background: rgba(255, 215, 130, 0.18);
     border-color: rgba(255, 215, 130, 0.6);
     transform: scale(1.08) rotate(20deg);
     box-shadow: 0 4px 15px -3px rgba(255, 215, 130, 0.4);
   }

   /* ════════════════════════════════════════════════
      라이트 모드 — 낮 하늘 (토닥 기본 톤)
      ════════════════════════════════════════════════ */

   .constellation-stage.theme-light {
     background:
       radial-gradient(ellipse at top, rgba(255, 220, 180, 0.5) 0%, transparent 60%),
       radial-gradient(ellipse at bottom right, rgba(255, 240, 220, 0.4) 0%, transparent 50%),
       linear-gradient(180deg, #fef9f3 0%, #fbf3e7 100%);
   }

   /* 별빛은 라이트 모드에선 보이지 않음 (낮이니까) */
   .constellation-stage.theme-light .constellation-stars {
     opacity: 0;
   }

   /* 테마 토글 버튼 — 라이트 모드 */
   .constellation-stage.theme-light .constellation-theme-toggle {
     background: rgba(255, 255, 255, 0.7);
     border-color: rgba(139, 69, 19, 0.2);
     color: #8B4513;
     backdrop-filter: blur(4px);
   }
   .constellation-stage.theme-light .constellation-theme-toggle:hover {
     background: rgba(255, 220, 180, 0.6);
     border-color: rgba(139, 69, 19, 0.4);
     box-shadow: 0 4px 15px -3px rgba(139, 69, 19, 0.25);
   }

   /* 사이드바 토글 — 라이트 모드 */
   .constellation-stage.theme-light .constellation-toggle {
     background: rgba(255, 255, 255, 0.7);
     border-color: rgba(139, 69, 19, 0.25);
     color: #5a3a1a;
   }
   .constellation-stage.theme-light .constellation-toggle:hover {
     background: rgba(255, 220, 180, 0.6);
     border-color: rgba(139, 69, 19, 0.5);
     box-shadow: 0 6px 20px -4px rgba(139, 69, 19, 0.3);
   }
   .constellation-stage.theme-light .constellation-toggle .toggle-star {
     color: #d4a017;
   }
   .constellation-stage.theme-light .constellation-toggle:hover .toggle-star {
     color: #8B4513;
   }

   /* 별자리 연결선 — 라이트 모드 (옅은 갈색 점선) */
   .constellation-stage.theme-light .constellation-lines .line {
     stroke: rgba(139, 69, 19, 0.18);
   }

   /* 별자리 카드 — 라이트 모드 (흰 카드 + 부드러운 그림자) */
   .constellation-stage.theme-light .constellation-card {
     background: rgba(255, 255, 255, 0.85);
     border-color: rgba(139, 69, 19, 0.12);
     color: #4a2c0a;
     backdrop-filter: blur(4px);
     box-shadow: 
       0 4px 16px -4px rgba(139, 69, 19, 0.15),
       0 1px 3px rgba(139, 69, 19, 0.08);
   }
   .constellation-stage.theme-light .constellation-card:hover {
     background: #ffffff;
     border-color: rgba(212, 160, 23, 0.6);
     color: #2d1810;
     box-shadow:
       0 12px 30px -8px rgba(139, 69, 19, 0.3),
       0 4px 12px rgba(212, 160, 23, 0.2);
   }
   .constellation-stage.theme-light .card-glow {
     background: radial-gradient(circle at center, rgba(255, 200, 100, 0.25) 0%, transparent 70%);
   }
   .constellation-stage.theme-light .card-sub {
     opacity: 0.7;
     color: #5a3a1a;
   }

   /* 중앙 사용자 카드 — 라이트 모드 (등급 그라데이션 유지 + 부드러운 그림자) */
   .constellation-stage.theme-light .constellation-center {
     /* 등급 색상은 그대로 (var(--gc), var(--gd)) */
     box-shadow:
       0 0 50px rgba(255, 200, 100, 0.5),
       0 8px 24px -6px rgba(139, 69, 19, 0.35),
       inset 0 0 30px rgba(0, 0, 0, 0.1);
   }
   .constellation-stage.theme-light .center-aura {
     background: radial-gradient(circle, rgba(255, 200, 100, 0.4) 0%, transparent 70%);
   }

   /* ════════════════════════════════════════════════
      다크 모드 — 명시적 클래스 (기본과 동일하지만 깔끔하게)
      ════════════════════════════════════════════════ */

   .constellation-stage.theme-dark {
     background:
       radial-gradient(ellipse at top, rgba(255, 235, 200, 0.15) 0%, transparent 50%),
       radial-gradient(ellipse at bottom right, rgba(200, 180, 255, 0.08) 0%, transparent 50%),
       linear-gradient(180deg, #1a1410 0%, #2d1f15 100%);
   }
   .constellation-stage.theme-dark .constellation-stars { opacity: 1; }

   /* ════════════════════════════════════════════════
      부드러운 테마 전환 애니메이션
      ════════════════════════════════════════════════ */

   .constellation-stage,
   .constellation-stage * {
     transition:
       background-color 0.4s ease,
       background-image 0.4s ease,
       border-color 0.4s ease,
       color 0.3s ease,
       box-shadow 0.4s ease,
       opacity 0.4s ease;
   }

   /* 모바일에서 우측 상단 컨트롤 위치 조정 */
   @media (max-width: 768px) {
     .constellation-controls {
       top: 16px;
       right: 16px;
       gap: 8px;
     }
     .constellation-theme-toggle {
       width: 38px;
       height: 38px;
       font-size: 0.9rem;
     }
   }
   /* ════════════════════════════════════════════════
      별자리 동적 배치 — 카드 개수에 따라 균등 분포 (v5)
      - 기존 .card-pos-* 위치 클래스는 그대로 두고, 여기서 override
      - JS가 카드별 --tx, --ty CSS 변수를 설정
      - 모바일에서는 CSS가 카드 그리드로 폴백 (JS도 비활성)
      ════════════════════════════════════════════════ */

   /* 카드 기본 위치 — 모두 중앙에서 출발, JS가 --tx, --ty로 이동 */
   .constellation-card {
     top: 50% !important;
     left: 50% !important;
     right: auto !important;
     bottom: auto !important;
     transform: translate(-50%, -50%) translate(var(--tx, 0px), var(--ty, 0px)) !important;
     transition:
       transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
       background-color 0.4s ease,
       background-image 0.4s ease,
       border-color 0.4s ease,
       color 0.3s ease,
       box-shadow 0.4s ease,
       opacity 0.4s ease;
   }

   /* 호버 — 위치 유지 + 떠오름 + 살짝 확대 */
   .constellation-card:hover {
     transform: translate(-50%, -50%) 
                translate(var(--tx, 0px), var(--ty, 0px)) 
                translateY(-6px) 
                scale(1.05) !important;
   }

   /* SVG 연결선 — viewBox를 JS가 설정, preserveAspectRatio는 카드와 1:1 매칭용 */
   .constellation-lines {
     position: absolute;
     inset: 0;
     width: 100%;
     height: 100%;
     pointer-events: none;
     z-index: 0;
   }

   /* 모바일 — 동적 배치 OFF, 카드 그리드로 폴백 */
   @media (max-width: 768px) {
     .constellation-card {
       position: static !important;
       top: auto !important;
       left: auto !important;
       right: auto !important;
       bottom: auto !important;
       transform: none !important;
     }
     .constellation-card:hover {
       transform: none !important;
     }
     .constellation-lines {
       display: none;
     }
   }

/* 헤더 NEW 배지 — 새 글/강조 공지 알림 (@since 2026.06.11) */
.nav-new { display: inline-block; margin-left: 5px; background: #e74c3c; color: #fff;
  font-size: .58rem; font-weight: 800; padding: 1px 5px; border-radius: 8px; line-height: 1.5;
  vertical-align: top; animation: navNewPulse 1.8s ease-in-out infinite; }
@keyframes navNewPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,.55); } 70% { box-shadow: 0 0 0 5px rgba(231,76,60,0); } }

/* ============================================================
   공통 비회원 잠금 커버 (.guest-lock) — AI 상담사·토정비결·오늘의 운세 공용.
   마크업은 /WEB-INF/views/common/guest-lock.jsp fragment. 페이지별 잠금 CSS 중복 제거 통합본.
   ============================================================ */
.guest-lock { position: relative; }
.guest-lock.is-locked .guest-lock-blur { filter: blur(3px); pointer-events: none; user-select: none; }
.guest-lock-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 24px; border-radius: 18px; background: rgba(40,28,8,.5); backdrop-filter: blur(2px);
}
.guest-lock-cover .ic {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(212,168,83,.2); color: var(--accent); font-size: 22px;
}
.guest-lock-cover p { margin: 0; font-weight: 800; color: #fff; font-size: 1rem; }
.guest-lock-cover p small { display: block; margin-top: 6px; font-weight: 500; color: #f0e6d2; font-size: .82rem; line-height: 1.5; }
.guest-lock-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.guest-lock-cta a { padding: 11px 20px; border-radius: 10px; font-weight: 800; font-size: .9rem; text-decoration: none; }
.guest-lock-cta .lk-login { border: 1px solid var(--accent); color: var(--accent); background: rgba(255,255,255,.92); }
.guest-lock-cta .lk-signup { background: var(--accent); color: #3a2a05; }
