/* ============ 색상/변수 — 여기서 전체 톤을 바꿀 수 있어요 ============ */
/* 기본은 검정+흰색 위주이고, --accent(보라)는 버튼/포인트에만 살짝 씁니다 */
:root {
  --bg: #060607;
  --bg-soft: #0a0a0b;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --border: #2a2a2e;
  --text: #f5f5f7;
  --text-dim: #a3a3a9;
  --text-faint: #6b6b71;
  --accent: #9b4dff;
  --accent-2: #c9a3ff;
  --accent-soft: rgba(155, 77, 255, 0.10);
  --radius: 16px;
  --max-width: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background-color: var(--bg);
  background-image: url("images/facet-bg.svg");
  background-repeat: no-repeat;
  background-size: 150% 150%;
  background-position: 50% 50%;
  background-attachment: fixed;
  animation: facet-drift 70s ease-in-out infinite alternate;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* 금 간(깨진 유리) 느낌의 불규칙한 파편 무늬(images/facet-bg.svg)가 아주 천천히 흘러가는 효과 */
@keyframes facet-drift {
  0%   { background-position: 40% 38%; }
  50%  { background-position: 60% 64%; }
  100% { background-position: 44% 56%; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* ============ 오로라 배경 효과 ============ */
/* body 바로 아래 은은하게 깔리는 배경 장식이에요. 색/속도는 아래 변수와 keyframe에서 조절할 수 있어요. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20% -15%;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
  will-change: transform;
}

body::before {
  background:
    radial-gradient(45% 38% at 22% 15%, rgba(155, 77, 255, 0.42), transparent 70%),
    radial-gradient(38% 32% at 85% 5%, rgba(201, 163, 255, 0.28), transparent 70%);
  animation: aurora-drift-a 20s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(42% 36% at 65% 95%, rgba(155, 77, 255, 0.30), transparent 70%),
    radial-gradient(30% 24% at 8% 85%, rgba(255, 255, 255, 0.10), transparent 70%);
  animation: aurora-drift-b 24s ease-in-out infinite alternate;
}

@keyframes aurora-drift-a {
  0%   { transform: translate3d(0, -3%, 0) scale(1); }
  50%  { transform: translate3d(5%, 7%, 0) scale(1.12); }
  100% { transform: translate3d(-5%, 12%, 0) scale(1.04); }
}
@keyframes aurora-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-6%, -6%, 0) scale(1.1); }
  100% { transform: translate3d(4%, -12%, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============ 헤더 (떠 있는 알약 모양 네비게이션) ============ */
.header {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding-top: 18px;
  margin-bottom: 4px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(28, 28, 33, 0.92), rgba(12, 12, 15, 0.92));
  backdrop-filter: blur(16px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 로고 */
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 50% 35%, rgba(155, 77, 255, 0.55), rgba(155, 77, 255, 0.1));
  border: 1px solid rgba(155, 77, 255, 0.45);
  box-shadow: 0 0 18px rgba(155, 77, 255, 0.35);
}
.brand__badge svg { width: 18px; height: 18px; }
.brand__name {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
}

/* 메뉴 */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav__icon { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a.is-active {
  color: var(--text);
  background: rgba(155, 77, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(155, 77, 255, 0.25);
}

/* 오른쪽 버튼들 */
.header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: rgba(155, 77, 255, 0.5); background: var(--surface); }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 20px;
}
.account-btn svg { width: 16px; height: 16px; }

/* 로그인한 디스코드 프로필 (헤더 오른쪽) */
.profile {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.2s;
}
.profile:hover { border-color: rgba(155, 77, 255, 0.5); }
.profile__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(155, 77, 255, 0.5);
}
.profile__name { font-size: 13px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile__logout {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-faint);
  transition: color 0.2s, background 0.2s;
}
.profile__logout svg { width: 15px; height: 15px; }
.profile__logout:hover { color: var(--down); background: var(--down-soft); }

/* ============ 로그인 / 접근 불가 화면 ============ */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.gate__card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 36px 36px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(28, 28, 33, 0.92), rgba(12, 12, 15, 0.94));
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.gate__badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: #fff;
  background: radial-gradient(circle at 50% 35%, rgba(155, 77, 255, 0.55), rgba(155, 77, 255, 0.1));
  border: 1px solid rgba(155, 77, 255, 0.45);
  box-shadow: 0 0 26px rgba(155, 77, 255, 0.35);
}
.gate__badge svg { width: 26px; height: 26px; }
.gate__badge--deny {
  background: radial-gradient(circle at 50% 35%, rgba(255, 84, 112, 0.45), rgba(255, 84, 112, 0.08));
  border-color: rgba(255, 84, 112, 0.45);
  box-shadow: 0 0 26px rgba(255, 84, 112, 0.28);
}
.gate__title {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.gate__desc { color: var(--text-dim); font-size: 14px; line-height: 1.7; margin-bottom: 26px; }
.gate__btn { width: 100%; gap: 10px; padding: 14px 24px; }
.gate__btn svg { width: 20px; height: 20px; }
.gate__actions { display: flex; gap: 10px; width: 100%; }
.gate__actions .btn { flex: 1; }
.gate__note { margin-top: 16px; font-size: 13px; color: var(--accent-2); }
.gate__note.is-error { color: var(--down); }
.gate__steps {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.gate__steps li {
  font-size: 12.5px;
  color: var(--text-faint);
  padding-left: 20px;
  position: relative;
}
.gate__steps li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============ 버튼 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #5c1fb8);
  color: #fff;
  box-shadow: 0 8px 24px rgba(155, 77, 255, 0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(155, 77, 255, 0.5); }
.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); background: var(--surface-2); }
.btn--danger {
  background: rgba(255, 84, 112, 0.12);
  border: 1px solid rgba(255, 84, 112, 0.4);
  color: var(--down, #ff5470);
}
.btn--danger:hover { background: rgba(255, 84, 112, 0.2); border-color: var(--down, #ff5470); }

/* ============ 확인/알림 팝업 ============ */
.confirm-dialog { max-width: 380px; gap: 22px; }
.confirm-dialog__message { font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-line; }
.confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-dialog__actions .btn { padding: 10px 20px; font-size: 13px; }

/* ============ 히어로 ============ */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  text-align: center;
}
.hero__glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(155, 77, 255, 0.08), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(155, 77, 255, 0.3);
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero__title .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__desc {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 500px;
  justify-content: center;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat__num {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.stat__label { font-size: 12px; color: var(--text-faint); }

/* ============ 섹션 공통 ============ */
.section-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 40px;
}

/* ============ 앱 목록 ============ */
.apps { padding: 80px 0; }

.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155, 77, 255, 0.3);
  background: var(--surface-2);
}

.app-card__media {
  margin: -28px -28px 20px -28px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.app-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.app-card:hover .app-card__media img { transform: scale(1.04); }

.app-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.app-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.app-card__tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}

.app-card__name { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.app-card__desc { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; flex-grow: 1; }

.app-card__features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.app-card__features li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.app-card__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.app-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.app-card__version { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-faint); }
.app-card__link { font-size: 13px; font-weight: 600; color: var(--accent-2); }
.app-card__link:hover { text-decoration: underline; }

/* ============ 특징 ============ */
.features { padding: 80px 0; background: var(--bg-soft); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature {
  padding: 8px 0;
}
.feature__icon { font-size: 28px; margin-bottom: 14px; }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-dim); }

/* ============ CTA ============ */
.cta { padding: 100px 0; text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cta h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; }
.cta p { color: var(--text-dim); margin-bottom: 12px; }

/* ============ 푸터 ============ */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer__links { display: flex; gap: 20px; }
.footer__links a:hover { color: var(--text-dim); }

/* ============ 반응형 ============ */
@media (max-width: 960px) {
  .nav a { padding: 9px 10px; font-size: 13px; }
  .account-btn span { display: none; }
  .account-btn { padding: 11px 14px; }
}

@media (max-width: 760px) {
  /* 메뉴가 실제 카테고리 전환 기능이라 공개 사이트처럼 숨기지 않고, 대신 가로로 스크롤되게 해요. */
  .header__inner { height: auto; padding: 10px 10px 10px 14px; flex-wrap: wrap; row-gap: 8px; }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 640px) {
  .header { padding-top: 12px; }
  .hero { padding: 90px 0 70px; }
  .hero__stats { gap: 24px; }
  .apps, .features, .cta { padding: 56px 0; }
}

/* ============ 서브페이지 상단 헤드 ============ */
.page-head {
  position: relative;
  padding: 80px 0 40px;
  text-align: center;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(155, 77, 255, 0.07), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.page-head__title {
  position: relative;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 14px 0 10px;
}
.page-head__desc { position: relative; color: var(--text-dim); font-size: 15px; }

/* ============ 구매 (기간제 선택) ============ */
.pricing { padding: 60px 0 80px; }
.buy-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.buy-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.buy-card:hover { border-color: rgba(155, 77, 255, 0.4); }
.buy-card__media { background: var(--bg-soft); }
.buy-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buy-card__body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.buy-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.buy-card__name { font-size: 19px; font-weight: 700; }
.buy-card__tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}
.buy-card__desc { color: var(--text-dim); font-size: 13px; margin-top: -8px; }

.duration-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.duration-tab {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.duration-tab:hover { border-color: var(--accent); color: var(--text); }
.duration-tab.is-active {
  background: linear-gradient(135deg, var(--accent), #5c1fb8);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(155, 77, 255, 0.35);
}

.buy-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.buy-card__price {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 700;
}
.buy-card__price span { font-size: 12px; font-weight: 500; color: var(--text-faint); margin-left: 4px; }
.buy-card__btn { min-width: 140px; }

.pricing__note {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 36px;
}

@media (max-width: 640px) {
  .buy-card { grid-template-columns: 1fr; }
  .buy-card__media { aspect-ratio: 16 / 9; }
}

/* ============ FAQ ============ */
.faq { padding: 20px 0 90px; }
.faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--accent-2);
  font-weight: 700;
}
.faq__item[open] summary::before { content: "−"; }
.faq__item p { margin-top: 10px; padding-left: 18px; color: var(--text-dim); font-size: 13px; }

/* ============ 문의 페이지 ============ */
.contact { padding: 20px 0 100px; }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
.contact__info h2 { font-size: 20px; margin-bottom: 20px; }
.contact__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.contact__list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.contact__label { font-size: 12px; color: var(--text-faint); font-family: "JetBrains Mono", monospace; }
.contact__list a, .contact__list [data-user] { font-size: 15px; word-break: break-all; }
.contact__list a:hover { color: var(--accent-2); }
.contact__list .is-empty { font-size: 13px; color: var(--text-faint); }
.contact__discord { display: inline-flex; align-items: center; gap: 8px; }
.contact__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(155, 77, 255, 0.5);
}
.field input[readonly] {
  color: var(--text-dim);
  background: rgba(155, 77, 255, 0.05);
  border-style: dashed;
  cursor: default;
}
.contact__note { color: var(--text-faint); font-size: 13px; }

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-dim); }
.field input, .field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact__submit { margin-top: 4px; }
.contact__status {
  font-size: 13px;
  color: var(--accent-2);
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.3s;
}
.contact__status.is-visible { opacity: 1; }

@media (max-width: 760px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* ============ 상태 페이지 ============ */
:root {
  --ok: #2fd96b;
  --ok-soft: rgba(47, 217, 107, 0.14);
  --warn: #f5b93d;
  --warn-soft: rgba(245, 185, 61, 0.14);
  --down: #ff5470;
  --down-soft: rgba(255, 84, 112, 0.14);
}

.status-summary-wrap { padding: 10px 0 0; }
.status-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.status-summary__text { font-weight: 600; font-size: 15px; }
.status-summary__time { margin-left: auto; font-size: 12px; color: var(--text-faint); font-family: "JetBrains Mono", monospace; }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}
.is-warn .status-dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.is-down .status-dot { background: var(--down); box-shadow: 0 0 0 4px var(--down-soft); }

.status { padding: 40px 0 80px; }
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color 0.25s ease;
}
.status-item:hover { border-color: rgba(155, 77, 255, 0.35); }
.status-item__left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.status-item__name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.status-item__meta { font-size: 12px; color: var(--text-faint); }

.status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
}
.is-warn .status-badge { background: var(--warn-soft); color: var(--warn); }
.is-down .status-badge { background: var(--down-soft); color: var(--down); }

.status__note {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 28px;
}

@media (max-width: 560px) {
  .status-item { flex-direction: column; align-items: flex-start; }
  .status-summary__time { margin-left: 0; }
}

/* ============ 공지 배너 (모든 페이지 상단, script.js가 삽입) ============ */
.announce-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 13px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.announce-banner.is-warning { background: var(--warn-soft); border-color: rgba(245, 185, 61, 0.3); }
.announce-banner.is-critical { background: var(--down-soft); border-color: rgba(255, 84, 112, 0.3); }

.announce-banner__icon { font-size: 15px; flex-shrink: 0; }
.announce-banner__title { font-weight: 700; flex-shrink: 0; }
.announce-banner.is-warning .announce-banner__title { color: var(--warn); }
.announce-banner.is-critical .announce-banner__title { color: var(--down); }

.announce-banner__body {
  flex: 1;
  min-width: 0;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.announce-banner__link {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--accent-2);
}
.announce-banner__link:hover { text-decoration: underline; }
.announce-banner__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--text-faint);
}
.announce-banner__close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

@media (max-width: 640px) {
  .announce-banner__body { display: none; }
}

/* ============ 공지 페이지 목록 ============ */
.announce-list { display: flex; flex-direction: column; gap: 14px; }
.announce-empty {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  padding: 40px 0;
}

.announce-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 0.25s ease;
}
.announce-item:hover { border-color: rgba(155, 77, 255, 0.4); border-left-color: var(--accent); }
.announce-item.is-warning { border-left-color: var(--warn); }
.announce-item.is-critical { border-left-color: var(--down); }

.announce-item__icon { font-size: 20px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.announce-item__body { min-width: 0; flex: 1; }
.announce-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.announce-item__title { font-size: 16px; font-weight: 700; }
.announce-item__pin { font-size: 11px; color: var(--accent-2); }
.announce-item__text {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.announce-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
}

/* ============ 제품 상세 페이지 ============ */
.product-detail-wrap { padding: 40px 0 90px; }
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--text); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* 이미지 갤러리 */
.gallery__main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  transition: all 0.2s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb:hover { opacity: 0.85; }
.gallery__thumb.is-active { border-color: var(--accent); opacity: 1; }

/* 기능 박스 */
.features-box {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.features-box h3 { font-size: 15px; margin-bottom: 16px; }
.features-box ul { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.features-box li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.features-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}
.features-box__more { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.features-box__more p { font-size: 13px; color: var(--text-dim); }
.btn--sm { padding: 8px 16px; font-size: 13px; }

/* 오른쪽 정보 컬럼 */
.product-info__name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 12px 0 8px;
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
  margin-bottom: 14px;
}
.product-status:hover { text-decoration: underline; }
.product-status.is-warn { color: var(--warn); }
.product-status.is-down { color: var(--down); }

.product-info__desc { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }

.discount-badge {
  display: inline-flex;
  background: var(--down-soft);
  color: var(--down);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 24px;
}
.price-row__current {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 800;
}
.price-row__original {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--text-faint);
  text-decoration: line-through;
  margin-left: 8px;
}
.stock-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  white-space: nowrap;
}

.variant-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; margin-bottom: 22px; }
.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.variant-row:hover { border-color: rgba(155, 77, 255, 0.4); }
.variant-row.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.variant-row__name { font-size: 14px; font-weight: 700; }
.variant-row__stock { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.variant-row__price { display: flex; align-items: center; gap: 8px; }
.variant-row__current { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 14px; }
.variant-row__original {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: line-through;
}
.variant-row__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all 0.2s;
}
.variant-row.is-selected .variant-row__check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.variant-row.is-selected .variant-row__check::after { content: "✓"; }

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; }
}

/* ============ 구매 팝업 (모달) ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 1, 5, 0.72);
  backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(155, 77, 255, 0.15);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.modal__close:hover { color: var(--text); border-color: var(--accent); }

.modal__product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 30px;
}
.modal__product img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.modal__product h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

.modal__section { display: flex; flex-direction: column; gap: 10px; }
.modal__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-faint);
}

.modal__price {
  font-family: "JetBrains Mono", monospace;
  font-size: 30px;
  font-weight: 700;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.modal__price span { font-size: 13px; font-weight: 500; color: var(--text-faint); margin-left: 6px; }

.modal__submit { width: 100%; }
.modal__status {
  font-size: 13px;
  color: var(--accent-2);
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.3s;
}
.modal__status.is-visible { opacity: 1; }
.modal__status.is-error { color: var(--down); }

/* ============ 부드러운 움직임 ============ */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 스크롤 등장 — transform 대신 translate를 써서 카드 기울기(transform)와 겹치지 않게 합니다 */
.reveal {
  opacity: 0;
  translate: 0 22px;
  transition:
    opacity 0.8s var(--ease-out),
    translate 0.8s var(--ease-out),
    border-color 0.4s var(--ease-out),
    background-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}
.reveal.is-visible { opacity: 1; translate: 0 0; }

/* 공통 전환 곡선을 더 부드럽게 */
.btn {
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}
.nav a, .icon-btn, .profile, .profile__logout, .variant-row, .variant-row__check,
.gallery__thumb, .back-link, .footer__links a, .contact__list a,
.field input, .field textarea, .product-status {
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-out);
}

/* ---------- 페이지 이동 전환 (크롬/엣지/사파리) ---------- */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }
.nav a.is-active { view-transition-name: nav-active; }

::view-transition-old(root) { animation: vt-out 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-new(root) { animation: vt-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-group(site-header),
::view-transition-group(nav-active) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

/* 위 기능을 지원하지 않는 브라우저용 (script.js가 .no-vt를 붙임) */
.no-vt body { animation: page-in-fallback 0.55s var(--ease-out) backwards; }
.no-vt body.is-leaving { opacity: 0; transition: opacity 0.22s ease; }
@keyframes page-in-fallback { from { opacity: 0; } }

/* 로그인/거부 카드 등장 */
.gate__card { animation: gate-in 0.9s var(--ease-out) both; }
@keyframes gate-in { from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(8px); } }

/* ---------- 메뉴 호버 인디케이터 ---------- */
.nav { position: relative; }
.nav a { position: relative; z-index: 1; }
.nav:has(.nav__indicator) a:hover { background: transparent; }
.nav__indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s var(--ease-out),
    width 0.5s var(--ease-out),
    height 0.5s var(--ease-out),
    opacity 0.35s var(--ease-out);
}
.nav__indicator.is-visible { opacity: 1; }

/* ---------- 카드: 마우스 따라 빛 반사 + 기울기 ---------- */
.has-spotlight { position: relative; }
.has-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(155, 77, 255, 0.13), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.has-spotlight:hover::after { opacity: 1; }

.app-card.has-tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    opacity 0.8s var(--ease-out),
    translate 0.8s var(--ease-out),
    border-color 0.4s var(--ease-out),
    background-color 0.4s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}
.app-card.has-tilt:hover { box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }
.app-card__media img { transition: transform 0.8s var(--ease-out); }

/* ---------- 커서를 따라다니는 은은한 빛 ---------- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(155, 77, 255, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }

/* ---------- 작은 상호작용 ---------- */
#gallery-main { transition: opacity 0.35s var(--ease-out), scale 0.6s var(--ease-out); }
#gallery-main.is-swapping { opacity: 0; scale: 1.04; }

.price-bump { display: inline-block; animation: price-bump 0.5s var(--ease-out); }
@keyframes price-bump { from { opacity: 0.2; transform: translateY(8px); filter: blur(3px); } }

.variant-row.is-selected .variant-row__check { animation: check-pop 0.45s var(--ease-spring); }
@keyframes check-pop { from { transform: scale(0.4); } }

.features-box__more:not([hidden]),
.faq__item[open] p { animation: soft-in 0.5s var(--ease-out) both; }
@keyframes soft-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 페이지 이동 전환 (크롬/엣지/사파리) ---------- */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }

::view-transition-old(root) { animation: vt-out 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-new(root) { animation: vt-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-group(site-header) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

/* 위 기능을 지원하지 않는 브라우저용 (page-transitions.js가 .no-vt를 붙임) */
.no-vt body { animation: page-in-fallback 0.55s var(--ease-out) backwards; }
.no-vt body.is-leaving { opacity: 0; transition: opacity 0.22s ease; }
@keyframes page-in-fallback { from { opacity: 0; } }

/* ---------- 리셀러 패널: 탭(대시보드/제품구매/라이센스키/입금내역) 전환도 같은 방식으로 부드럽게 ---------- */
#overview-section, #buy-section, #keys-section, #charges-section {
  view-transition-name: panel-tab;
}
/* 탭 전환 중에는 헤더·페이지 제목·푸터 등 안 바뀌는 부분까지 같이 흔들리지 않게, root 전환은 꺼둡니다. */
.tab-transition::view-transition-old(root),
.tab-transition::view-transition-new(root) {
  animation: none;
}
::view-transition-group(panel-tab) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-old(panel-tab) { animation: vt-out 0.22s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-new(panel-tab) { animation: vt-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- 움직임 줄이기 설정 존중 ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; }
}

/* ============ 총관리 사이트 전용 ============ */

/* 고유번호 입력 (verify.html) */
.code-form { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.code-input {
  width: 100%;
  text-align: center;
  letter-spacing: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
}
.code-input:focus { outline: none; border-color: var(--accent); }
.code-input.is-error { border-color: var(--down); animation: shake 0.4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.gate__error {
  font-size: 13px;
  color: var(--down);
  min-height: 18px;
}
.gate__whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  width: 100%;
}
.gate__whoami img { width: 28px; height: 28px; border-radius: 50%; }
.gate__whoami span { font-size: 13px; color: var(--text-dim); }

/* 전체 화면 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  gap: 16px;
  background: rgba(6, 6, 7, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.loading-overlay.is-active { opacity: 1; pointer-events: auto; }
.loading-overlay__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay__text { font-size: 13px; color: var(--text-dim); font-family: "JetBrains Mono", monospace; }

/* 등급 뱃지 */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid rgba(155, 77, 255, 0.3);
}

/* 대시보드 */
.dash-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.dash-head img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(155, 77, 255, 0.4); }
.dash-head__name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.dash-head__scope { font-size: 13px; color: var(--text-dim); margin-top: 6px; max-width: 480px; }

/* 사이트 상태 (온라인 / 잠수 / 오프라인) — dash-head 맨 왼쪽에 표시 */
.dash-head__divider { width: 1px; align-self: stretch; min-height: 40px; background: var(--border); }
.site-status { display: flex; align-items: center; gap: 10px; }
.site-status__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-faint);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.site-status__dot.is-online { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: site-status-pulse 2s ease-out infinite; }
.site-status__dot.is-away { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.site-status__dot.is-offline { background: var(--down); box-shadow: 0 0 0 4px var(--down-soft); }
@keyframes site-status-pulse {
  0% { box-shadow: 0 0 0 0 var(--ok-soft); }
  70% { box-shadow: 0 0 0 6px rgba(47, 217, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 217, 107, 0); }
}
.site-status__label { font-size: 14px; font-weight: 700; }
.site-status__sub { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
@media (max-width: 640px) {
  .dash-head__divider { display: none; }
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.perm-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.perm-card.is-unlocked:hover { border-color: rgba(155, 77, 255, 0.4); transform: translateY(-2px); }
.perm-card.is-locked { opacity: 0.4; }
.perm-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  margin-bottom: 14px;
  font-size: 18px;
}
.perm-card__title { font-size: 15px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.perm-card__desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.perm-card__status {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.perm-card.is-unlocked .perm-card__status { background: var(--ok-soft, rgba(47,217,107,.14)); color: var(--ok, #2fd96b); }
.perm-card.is-locked .perm-card__status { background: rgba(255,255,255,0.06); color: var(--text-faint); }

/* ============ 접속 현황 (온라인 / 잠수 / 오프라인) ============ */
.presence-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.presence-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: opacity 0.2s;
}
.presence-item.is-offline { opacity: 0.55; }
.presence-item__avatar-wrap { position: relative; flex-shrink: 0; line-height: 0; }
.presence-item__avatar { width: 32px; height: 32px; border-radius: 50%; display: block; }
.presence-item__dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--text-faint);
}
.presence-item.is-online .presence-item__dot { background: var(--ok); }
.presence-item.is-away .presence-item__dot { background: var(--warn); }
.presence-item.is-offline .presence-item__dot { background: var(--text-faint); }
.presence-item__body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.presence-item__name-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.presence-item__name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence-item__tier { font-size: 11px; color: var(--accent-2); flex-shrink: 0; }
.presence-item__sub { font-size: 11.5px; color: var(--text-faint); }
.presence-item__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.presence-item__badge.is-online { background: var(--ok-soft); color: var(--ok); }
.presence-item__badge.is-away { background: var(--warn-soft); color: var(--warn); }
.presence-item__badge.is-offline { background: rgba(255, 255, 255, 0.06); color: var(--text-faint); }

/* ============ 역할별 멤버 ============ */
.team-roster { display: flex; flex-direction: column; gap: 12px; }
.team-roster__row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.team-roster__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 84px;
}
.team-roster__members { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.team-roster__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}
.team-roster__chip img { width: 22px; height: 22px; border-radius: 50%; }
.team-roster__empty { font-size: 12px; color: var(--text-faint); }
.team-roster__error { font-size: 12px; color: var(--warn, #f5b93d); }

/* ============ 대시보드: 카테고리 메뉴 (대시보드/문의/구매요청/공지사항/스탯) ============ */
/* .dash-tab 은 헤더 .nav 안의 진짜 <a> 라서 기존 .nav a / .nav a.is-active 스타일을 그대로 씁니다. */
/* .nav a 가 display:inline-flex 를 주기 때문에 브라우저 기본 [hidden] 규칙을 이겨버려요 — 명시적으로 다시 숨겨줘야 해요. */
.nav a.dash-tab[hidden] { display: none; }
.dash-tab__count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--down-soft, rgba(255,84,112,.14));
  color: var(--down, #ff5470);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
}
/* 메뉴를 눌러 스크롤할 때 헤더에 내용이 가려지지 않게 여유를 둬요. */
#overview-section, #team-roster-section, #inquiries-section, #purchases-section, #announcements-section, #stats-section {
  scroll-margin-top: 110px;
}

/* ============ 대시보드: 문의/구매 상태 필터 (전체/답장없음/진행중/종료) ============ */
.status-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.status-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
}
.status-filter:hover { color: var(--text-dim); border-color: rgba(155, 77, 255, 0.3); }
.status-filter.is-active { background: var(--surface); color: var(--text); border-color: rgba(155, 77, 255, 0.4); }
.status-filter__count { font-family: "JetBrains Mono", monospace; opacity: 0.8; }
.status-filter[data-filter="unanswered"].is-active { color: var(--down, #ff5470); border-color: rgba(255, 84, 112, 0.4); }
.status-filter[data-filter="open"].is-active { color: var(--warn, #f5b93d); border-color: rgba(245, 185, 61, 0.4); }
.status-filter[data-filter="closed"].is-active { color: var(--ok, #2fd96b); border-color: rgba(47, 217, 107, 0.4); }

/* ============ 대시보드: 문의/구매 탭 ============ */
.panel-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.panel-tab {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}
.panel-tab.is-active { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(155, 77, 255, 0.4); }
.panel-tab .panel-tab__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--down-soft, rgba(255,84,112,.14));
  color: var(--down, #ff5470);
  font-size: 11px;
}
.panel-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
}

.data-list { display: flex; flex-direction: column; gap: 12px; }
.data-list[hidden] { display: none; }
.data-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  text-align: left;
  width: 100%;
}
.data-item:hover { border-color: rgba(155, 77, 255, 0.4); transform: translateY(-1px); }
.data-item.is-unanswered { border-left: 3px solid var(--down, #ff5470); }
.data-item.is-open { border-left: 3px solid var(--warn); }
.data-item.is-closed { border-left: 3px solid var(--ok); opacity: 0.75; }
.data-item__avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.data-item__body { flex: 1; min-width: 0; }
.data-item__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.data-item__name { font-weight: 700; font-size: 14px; }
.data-item__time { font-size: 11px; color: var(--text-faint); font-family: "JetBrains Mono", monospace; }
.data-item__text { font-size: 13px; color: var(--text-dim); line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-item__meta { font-size: 12px; color: var(--accent-2); margin-top: 4px; }
.data-item__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.data-item.is-unanswered .data-item__badge { background: var(--down-soft, rgba(255,84,112,.14)); color: var(--down, #ff5470); }
.data-item.is-open .data-item__badge { background: var(--warn-soft, rgba(245,185,61,.14)); color: var(--warn, #f5b93d); }
.data-item.is-closed .data-item__badge { background: var(--ok-soft, rgba(47,217,107,.14)); color: var(--ok, #2fd96b); }
.data-item__delete {
  flex-shrink: 0;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.data-item__delete:hover { border-color: var(--down); color: var(--down); }

/* ============ 공지사항 관리 (어드민 이상) ============ */
.announce-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: end;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.field--full { grid-column: 1 / -1; }
.field-select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.field-select:focus { outline: none; border-color: var(--accent); }
.announce-form__pin { flex-direction: row; align-items: center; gap: 8px; }
.announce-form__pin input { width: 16px; height: 16px; accent-color: var(--accent); }
.announce-form__submit { grid-column: 1 / -1; justify-self: start; }

.announce-admin-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.announce-admin-item.is-warning { border-left-color: var(--warn); }
.announce-admin-item.is-critical { border-left-color: var(--down); }
.announce-admin-item__icon { font-size: 18px; flex-shrink: 0; }
.announce-admin-item__body { flex: 1; min-width: 0; }
.announce-admin-item__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.announce-admin-item__title { font-weight: 700; font-size: 14px; }
.announce-admin-item__text { font-size: 13px; color: var(--text-dim); line-height: 1.6; white-space: pre-wrap; margin-bottom: 6px; }
.announce-admin-item__meta { font-size: 11px; color: var(--text-faint); font-family: "JetBrains Mono", monospace; }
.announce-admin-item__delete {
  flex-shrink: 0;
  align-self: flex-start;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.announce-admin-item__delete:hover { border-color: var(--down); color: var(--down); }

/* ============ 대화 모달 (문의/구매 상세, 1:1 답장) ============ */
.modal--wide { max-width: 720px; }
.modal__danger {
  margin-top: -4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.modal__danger .btn { padding: 9px 16px; font-size: 13px; }
/* .modal__danger 가 display:flex 를 주기 때문에 브라우저 기본 [hidden] 규칙을 이겨버려요 — 명시적으로 다시 숨겨줘야 해요.
   (이게 없으면 "종료 안내"와 "처리 완료" 버튼이 상태와 상관없이 동시에 보여서, 실수로 대화를 종료시키기 쉬워집니다.) */
.modal__danger[hidden] { display: none; }

.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.chat-status.is-unanswered { background: var(--down-soft, rgba(255,84,112,.14)); color: var(--down, #ff5470); }
.chat-status.is-open { background: var(--warn-soft, rgba(245,185,61,.14)); color: var(--warn, #f5b93d); }
.chat-status.is-closed { background: var(--ok-soft, rgba(47,217,107,.14)); color: var(--ok, #2fd96b); }

.chat-meta[hidden] { display: none; }
.chat-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.chat-meta__name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.chat-meta__sub { font-size: 12px; color: var(--text-faint); }

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 6px 4px 2px;
  max-height: min(58vh, 620px);
  overflow-y: auto;
}
.chat-reply[hidden] { display: none; }
.chat-closed-note {
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.chat-bubble { display: flex; gap: 9px; max-width: 85%; }
.chat-bubble.is-admin { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.is-user { align-self: flex-start; }
.chat-bubble__avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.chat-bubble__col { min-width: 0; }
.chat-bubble.is-admin .chat-bubble__col { text-align: right; }
.chat-bubble__meta { font-size: 10px; color: var(--text-faint); margin-bottom: 4px; }
.chat-bubble__content {
  display: inline-block;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.is-admin .chat-bubble__content {
  background: linear-gradient(135deg, var(--accent), #5c1fb8);
  color: #fff;
  border-color: transparent;
}

.chat-reply { display: flex; flex-direction: column; gap: 10px; }
.chat-reply__row { display: flex; gap: 10px; align-items: flex-end; }
.chat-reply textarea {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 42px;
}
.chat-reply textarea:focus { outline: none; border-color: var(--accent); }

/* 이미지 첨부 버튼 + 미리보기 */
.chat-attach__btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s;
}
.chat-attach__btn:hover { border-color: var(--accent); color: var(--accent-2); }
.chat-attach__btn svg { width: 17px; height: 17px; }
.chat-attach__preview { position: relative; width: fit-content; }
.chat-attach__preview[hidden] { display: none; }
.chat-attach__preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.chat-attach__file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 220px;
}
.chat-attach__file svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-2); }
.chat-attach__file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--down, #ff5470);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}

/* 채팅 안의 첨부 이미지 */
.chat-bubble__image {
  display: block;
  max-width: 200px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  margin-top: 4px;
  object-fit: cover;
}
.chat-bubble.is-admin .chat-bubble__image { margin-left: auto; }

/* 채팅 안의 파일 첨부(다운로드 카드) */
.chat-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 11px;
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  max-width: 220px;
  transition: border-color 0.2s;
}
.chat-file-card:hover { border-color: var(--accent); }
.chat-bubble.is-admin .chat-file-card { margin-left: auto; }
.chat-file-card__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-2); }
.chat-file-card__info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.chat-file-card__name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-card__size { font-size: 10.5px; color: var(--text-faint); }

/* 첨부 이미지 크게 보기 */
.image-lightbox { cursor: zoom-out; background: rgba(3, 1, 5, 0.9); }
.image-lightbox img { max-width: min(90vw, 900px); max-height: 90vh; border-radius: 12px; object-fit: contain; }

/* ============ 대시보드: 스탯 편집 ============ */
.stats-edit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: end;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stats-edit__readonly { display: flex; flex-direction: column; gap: 4px; }
.stats-edit input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}
.stats-edit input:focus { outline: none; border-color: var(--accent); }

/* ============ 대시보드: 제품 상태 (정상 작동/점검 중/작동 중지) ============ */
.product-status-list { display: flex; flex-direction: column; gap: 10px; }
.product-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.product-status-row__icon { font-size: 18px; flex-shrink: 0; }
.product-status-row__name { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; }
.product-status-row__select {
  width: auto;
  min-width: 130px;
  padding: 8px 12px;
  font-size: 13px;
}
.product-status-row__saved { font-size: 12px; color: var(--ok, #2fd96b); flex-shrink: 0; }
.product-status-row__saved[hidden] { display: none; }

/* ============ 브랜딩 (사이트 이름 · 로고) ============ */
.brand__badge.has-logo { overflow: hidden; padding: 0; background: var(--surface-2, #141416); }
.brand__logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand__name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate__switch { display: inline-block; margin-top: 14px; }
@media (max-width: 560px) { .brand__name { max-width: 150px; } }

/* ============ 리셀러: 소개 페이지 카드 ============ */
.reseller-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.reseller-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.reseller-info-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 20px;
  margin-bottom: 14px;
}
.reseller-info-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.reseller-info-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
@media (max-width: 760px) {
  .reseller-info-grid { grid-template-columns: 1fr; }
}

/* ============ 리셀러: 등급 카드 ============ */
.reseller-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.reseller-tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.reseller-tier-card__label { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.reseller-tier-card__discount {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.reseller-tier-card__join { font-size: 13px; color: var(--text-dim); }
@media (max-width: 760px) {
  .reseller-tier-grid { grid-template-columns: 1fr; }
}

/* ============ 리셀러 패널: 잔액 카드 ============ */
.reseller-balance__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(155, 77, 255, 0.4);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-2);
  flex-shrink: 0;
}
.reseller-balance__amount { font-size: 24px; font-weight: 800; margin-top: 4px; }
@media (max-width: 640px) {
  #balance-card { flex-wrap: wrap; }
  #charge-btn { margin-left: 0 !important; width: 100%; }
}

/* ============ 리셀러 패널: 제품 구매 (생성형 2단 레이아웃) ============ */
.generate-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}
.generate-card,
.generate-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.generate-card .field { margin-bottom: 16px; }
.generate-card__price { font-size: 13px; color: var(--text-dim); margin: 4px 0 18px; }
.generate-card__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 4px 0 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.generate-card__summary strong { font-size: 15px; color: var(--text); }
.generate-card__summary strong.is-error { color: var(--down, #ff5470); }
.generate-card__submit { width: 100%; }
.generate-card__submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.generate-info-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.generate-info-card__icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 16px;
  flex-shrink: 0;
}
.generate-info-card__head h3 { font-size: 15px; font-weight: 700; }
.generate-info-card__desc { font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.generate-info-card__divider { height: 1px; background: var(--border); margin: 18px 0; }
.generate-info-card__stats { display: flex; flex-direction: column; gap: 12px; }
.generate-info-card__stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}
.generate-info-card__stat strong { font-size: 13px; color: var(--text); font-weight: 700; }
@media (max-width: 800px) {
  .generate-grid { grid-template-columns: 1fr; }
}

/* ============ 리셀러 패널: 라이센스 키 목록 ============ */
.reseller-order-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.reseller-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.reseller-order-row__meta { display: flex; flex-direction: column; gap: 4px; }
.reseller-order-row__name { font-weight: 700; font-size: 14px; }
.reseller-order-row__time { font-size: 12px; color: var(--text-faint); }
.reseller-order-row__key {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--accent-2);
}

/* ============ 리셀러 패널: 대시보드 (등급 · 유효기간 · 판매 제품) ============ */
.reseller-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.reseller-overview-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.reseller-overview-card__label { font-size: 12px; color: var(--text-faint); }
.reseller-overview-card__value { font-size: 20px; font-weight: 800; }
.reseller-overview-card__value.is-error { color: var(--down, #ff5470); }
.reseller-overview-card__sub { font-size: 12px; color: var(--text-dim); }
@media (max-width: 760px) {
  .reseller-overview-grid { grid-template-columns: 1fr; }
}

.reseller-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.reseller-chip {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}

/* ============ 리셀러 패널: 입금 상태 배지 ============ */
.reseller-charge-status {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.reseller-charge-status.is-pending { background: rgba(255, 196, 0, 0.12); color: #ffc400; }
.reseller-charge-status.is-done { background: rgba(47, 217, 107, 0.12); color: var(--ok, #2fd96b); }

/* ============ 리셀러 패널: 충전 신청 — 입금 안내 ============ */
.reseller-bank-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 4px;
}
.reseller-bank-box__bank { font-size: 14px; color: var(--text-dim); font-weight: 700; }
.reseller-bank-box__number { font-family: "JetBrains Mono", monospace; font-size: 17px; font-weight: 800; color: var(--accent-2); }

/* ============ 리셀러 패널: 구매 완료(키 발급) 모달 ============ */
.reseller-key-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  max-height: 240px;
  overflow-y: auto;
}
.reseller-key-box__item {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--accent-2);
  word-break: break-all;
}

/* ============ 키 패널 (key-public) ============ */
#dashboard-section, #generate-section, #keys-section, #apps-section, #guide-section { view-transition-name: panel-tab; }

.kp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kp-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.kp-stat span { font-size: 12px; color: var(--text-faint); }
.kp-stat strong { font-size: 26px; font-weight: 800; }
.kp-stat strong.is-ok { color: var(--ok, #2fd96b); }
.kp-stat strong.is-bad { color: var(--down, #ff5470); }
@media (max-width: 900px) { .kp-stats { grid-template-columns: repeat(2, 1fr); } }

.kp-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.kp-h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.kp-h3__sub { font-size: 12px; font-weight: 500; color: var(--text-faint); margin-left: 6px; }
.kp-p { font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; }
.kp-note { font-size: 12px; color: var(--text-dim); margin-top: 14px; line-height: 1.7; }
.kp-steps, .kp-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}
.kp-panel code, .kp-table code, .section-sub code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--accent-2);
}
.kp-kv { display: grid; grid-template-columns: 90px 1fr; gap: 10px 16px; margin-top: 18px; align-items: center; font-size: 13px; }
.kp-kv dt { color: var(--text-faint); }
.kp-kv dd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; word-break: break-all; }

.kp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kp-row--3 { grid-template-columns: 1.2fr 1.5fr auto; align-items: end; }
.kp-row--3 .btn { margin-bottom: 0; height: 44px; }
@media (max-width: 640px) { .kp-row, .kp-row--3 { grid-template-columns: 1fr; } }

.kp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.kp-chip:hover { border-color: var(--accent); color: var(--text); }
.kp-chip.is-selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

.kp-result {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.kp-result__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kp-result__actions { display: flex; gap: 8px; }
.kp-result__text {
  width: 100%;
  resize: vertical;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--accent-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
}

.kp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.kp-toolbar .field-select { width: auto; min-width: 150px; }
.kp-search {
  flex: 1;
  min-width: 220px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.kp-search:focus { outline: none; border-color: var(--accent); }

.kp-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(155, 77, 255, 0.35);
  border-radius: 12px;
  font-size: 13px;
}
.kp-bulkbar[hidden] { display: none; }
.kp-bulkbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kp-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.kp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kp-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.kp-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.kp-table tbody tr:last-child td { border-bottom: 0; }
.kp-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.kp-table--keys td { white-space: nowrap; }
.kp-empty { text-align: center; color: var(--text-faint); padding: 28px 14px !important; }
.kp-check { width: 36px; }
.kp-actions .btn { margin-right: 6px; }
.kp-actions .btn:last-child { margin-right: 0; }

.kp-key {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: var(--accent-2);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.kp-key:hover { text-decoration: underline; }

.kp-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.kp-badge.is-unused { background: rgba(255, 255, 255, 0.07); color: var(--text-dim); }
.kp-badge.is-active { background: rgba(47, 217, 107, 0.12); color: #2fd96b; }
.kp-badge.is-expired { background: rgba(255, 196, 0, 0.12); color: #ffc400; }
.kp-badge.is-revoked { background: rgba(255, 84, 112, 0.12); color: #ff5470; }

.kp-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--text-dim); }
.kp-pager .btn:disabled { opacity: 0.4; cursor: not-allowed; }

.kp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kp-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.kp-tab:hover { color: var(--text); }
.kp-tab.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

.kp-code { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; }
.kp-code pre { margin: 0; padding: 16px 18px; overflow: auto; max-height: 520px; }
.kp-panel .kp-code code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
  background: none;
  border: 0;
  padding: 0;
}
.kp-code__copy { position: absolute; top: 10px; right: 10px; z-index: 1; background: var(--surface); }

.kp-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 12px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.kp-toast[hidden] { display: none; }
.kp-table--keys th, .kp-table--keys td { padding: 10px 9px; }
.kp-table--keys .kp-memo { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.kp-table--keys .kp-actions .btn { padding: 5px 9px; font-size: 12px; margin-right: 4px; }

/* ---- 화면 정리: 제목·간격 ---- */
.status { padding: 48px 0 72px; }
.section-title {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 8px;
}
.section-title--gap { margin-top: 40px; }
.section-title + .kp-stats, .section-title + .kp-table-wrap { margin-top: 16px; }
.section-sub { margin-bottom: 24px; font-size: 14px; }
.kp-stats + .section-title { margin-top: 40px; }
.section-title + .section-sub { margin-top: 0; }
.kp-stat strong { line-height: 1.1; }