/* =========================================================================
   AI구독비교 — 디자인 시스템
   컨셉: "가격 터미널(Price Terminal)" — 구독료 비교라는 재무적 의사결정을
   돕는 도구답게, 정밀한 금융 단말기의 느낌(잉크 다크 뉴트럴 + 골드 시그널
   컬러 + 가격은 항상 모노스페이스 숫자)을 입힌다. 흔한 인디고 그라데이션
   SaaS 톤을 피하고, 한글 본문은 Pretendard로 제대로 조판한다.
   ========================================================================= */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* ---- Light (기본) ---- */
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #efeade;
  --border: #e3ddca;
  --text: #18170f;
  --text-muted: #6f6b58;

  --gold: #a8650b;         /* 텍스트/링크/가격용 (흰 배경에서 AA 대비) */
  --gold-strong: #7a4a08;  /* hover/active */
  --gold-fill: #f5a623;    /* 장식용 채움(그 위엔 어두운 텍스트) */
  --gold-soft: #f8ecd3;    /* 배지/하이라이트 배경 */

  --success: #157f3c;
  --success-soft: #e6f4ea;
  --danger: #b3261e;
  --danger-soft: #fbeae8;

  --btn-bg: var(--text);
  --btn-bg-hover: #33301f;
  --btn-text: #fdfcf7;

  --footer-bg: #17160f;
  --footer-text: #f2efe3;
  --footer-muted: #a8a390;
  --footer-border: #322f22;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(24, 23, 15, 0.06);
  --shadow: 0 4px 16px -4px rgba(24, 23, 15, 0.12), 0 1px 3px rgba(24, 23, 15, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(24, 23, 15, 0.28);

  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- Dark: 뜬 면일수록 밝아지는 elevation 모델 ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100f0c;
    --surface: #1a1913;
    --surface-2: #242219;
    --border: #37341f;
    --text: #f2efe2;
    --text-muted: #a9a48f;

    --gold: #f0a93a;
    --gold-strong: #ffc163;
    --gold-fill: #f0a93a;
    --gold-soft: #3a2e15;

    --success: #4ade80;
    --success-soft: #123420;
    --danger: #fca5a5;
    --danger-soft: #3a1616;

    --btn-bg: var(--gold);
    --btn-bg-hover: var(--gold-strong);
    --btn-text: #17160c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 56px -16px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #100f0c;
  --surface: #1a1913;
  --surface-2: #242219;
  --border: #37341f;
  --text: #f2efe2;
  --text-muted: #a9a48f;

  --gold: #f0a93a;
  --gold-strong: #ffc163;
  --gold-fill: #f0a93a;
  --gold-soft: #3a2e15;

  --success: #4ade80;
  --success-soft: #123420;
  --danger: #fca5a5;
  --danger-soft: #3a1616;

  --btn-bg: var(--gold);
  --btn-bg-hover: var(--gold-strong);
  --btn-text: #17160c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 56px -16px rgba(0, 0, 0, 0.6);
}

/* 구버전 호환용 별칭 (일부 페이지에서 --color-* 변수를 직접 참조) */
:root {
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --color-text: var(--text);
  --color-text-muted: var(--text-muted);
  --color-primary: var(--gold);
  --color-primary-dark: var(--gold-strong);
  --color-accent: var(--gold-soft);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--gold-soft); color: var(--gold-strong); }

.mono, .price, .price-tag, .stat b, .cart-item-price, .cart-summary-total span:last-child {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ================= Header ================= */
.site-header {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.menu-toggle:hover { border-color: var(--gold); }
.menu-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
}
:root[data-theme="dark"] .logo-mark { background: var(--gold); color: #17160c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-mark { background: var(--gold); color: #17160c; }
}

.nav-rail-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}
.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.86rem;
}
.main-nav > a,
.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.main-nav > a:hover,
.nav-item > a:hover { background: var(--surface-2); color: var(--text); }
.main-nav > a.is-home { color: var(--text); }

.nav-item { position: relative; }
.nav-caret { font-size: 0.7em; opacity: 0.7; }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 210px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.85rem;
}
.nav-dropdown a:hover { background: var(--surface-2); color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ---- 검색창: 상단 메뉴 줄 아래, 가운데 정렬된 별도의 줄 (PC 전용 — 모바일은 드로어 내부 검색 사용) ---- */
.header-search-row {
  border-top: 1px solid var(--border);
}
.header-search-inner {
  display: flex;
  justify-content: center;
  padding: 10px 20px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-light { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-dark { display: inline; }
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 5px 4px 16px;
  width: 100%;
  max-width: 480px;
}
.search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: var(--font-sans);
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  border: none;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-form button:hover { background: var(--gold); }

/* ================= 모바일 메뉴 (드로어) ================= */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.mobile-nav-backdrop.is-open { opacity: 1; }

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--surface);
  z-index: 210;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  overflow-y: auto;
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav[hidden] { display: none; }

html.mobile-nav-locked,
html.mobile-nav-locked body { overflow: hidden; }

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}
.mobile-nav-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.mobile-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
}
.mobile-search-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font-sans);
}
.mobile-search-form button {
  border: none;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  cursor: pointer;
}

.mobile-nav-links { display: flex; flex-direction: column; padding: 4px 10px 24px; }
.mobile-nav-link {
  display: block;
  padding: 13px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--text);
}
.mobile-nav-link:hover { background: var(--surface-2); }

.mobile-nav-group { display: flex; flex-direction: column; }
.mobile-nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-sans);
}
.mobile-nav-parent:hover { background: var(--surface-2); }
.mobile-nav-caret { transition: transform 0.18s ease; color: var(--text-muted); }
.mobile-nav-parent[aria-expanded="true"] .mobile-nav-caret { transform: rotate(180deg); }

.mobile-nav-children {
  display: flex;
  flex-direction: column;
  padding: 2px 4px 8px 18px;
  border-left: 2px solid var(--border);
  margin: 0 12px 4px 18px;
}
.mobile-nav-children[hidden] { display: none; }
.mobile-nav-sublink {
  display: block;
  padding: 10px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.mobile-nav-sublink:hover { background: var(--surface-2); color: var(--text); }
.mobile-nav-all { color: var(--gold); font-weight: 700; }

@media (max-width: 900px) {
  .nav-rail-wrap { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-search-row { display: none; } /* 모바일은 햄버거 메뉴 안쪽 검색창을 사용 */
}
@media (min-width: 901px) {
  .mobile-nav,
  .mobile-nav-backdrop,
  .menu-toggle { display: none !important; }
}

/* ================= Main ================= */
.main-content { padding: 44px 20px 72px; min-height: 60vh; }

/* ================= Hero ================= */
.hero { text-align: center; padding: 40px 16px 44px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 14px; }
.hero .lede { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  min-width: 108px;
}
.stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat span { font-size: 0.78rem; color: var(--text-muted); }

.hero-cta { display: flex; justify-content: center; gap: 10px; margin: 26px 0 6px; flex-wrap: wrap; }

/* Category chips */
.category-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
}
.category-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.category-chip:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

/* Section titles */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 52px 0 18px;
  gap: 12px;
}
.section-title h2 { font-size: 1.3rem; margin: 0; }
.section-title a { font-size: 0.85rem; color: var(--gold); font-weight: 600; flex-shrink: 0; }
.section-title a:hover { color: var(--gold-strong); }

/* ================= Service grid/card ================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.service-card .logo-emoji { font-size: 1.6rem; }
.service-card .svc-logo-md { display: inline-flex; }
.service-card h3 { margin: 4px 0 0; font-size: 1.05rem; }
.service-card .developer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.service-card .summary { font-size: 0.87rem; color: var(--text-muted); flex-grow: 1; margin: 2px 0; }
.service-card .price-tag {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.95rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--success-soft);
  color: var(--success);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
}

/* Service logos (favicon 이미지 + 이모지 대체) — 타일 배경 적용 */
.svc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.svc-logo-img { border-radius: 6px; object-fit: contain; background: #fff; vertical-align: middle; }
.service-card .svc-logo-md { width: 44px; height: 44px; }
.service-card .svc-logo-md .svc-logo-img { width: 26px; height: 26px; }
.svc-logo-sm {
  vertical-align: middle;
  margin-right: 4px;
  width: 22px;
  height: 22px;
  background: transparent;
}
.svc-logo-sm .svc-logo-img { width: 18px; height: 18px; border-radius: 4px; }
.svc-logo-sm .logo-emoji { font-size: 1rem; }

/* ================= Category guide (애드센스 콘텐츠 보강용 본문) ================= */
.category-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 18px 0 32px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text);
}
.category-guide-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ================= Breadcrumb ================= */
.breadcrumb { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--gold); }

/* ================= Service detail ================= */
.service-detail-head {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.service-detail-head .logo-emoji { font-size: 2.6rem; }
.service-detail-head .svc-logo-lg { width: 76px; height: 76px; border-radius: var(--radius); }
.service-detail-head .svc-logo-lg .svc-logo-img { width: 48px; height: 48px; }
.service-detail-head h1 { margin: 0 0 6px; font-size: 1.5rem; }
.service-detail-head .developer {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text) !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold) !important; background: var(--gold-soft); }

/* ================= Plans grid/card ================= */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 20px 0 40px;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  position: relative;
  overflow: hidden;
}
.plan-card h4 { margin: 0 0 12px; font-size: 1.05rem; }
.plan-card .price { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 0; }
.plan-card .price-note { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 8px; }
.plan-card ul { list-style: none; padding: 0; margin: 14px 0 0; font-size: 0.87rem; color: var(--text); }
.plan-card ul li { padding: 5px 0; border-top: 1px dashed var(--border); }
.plan-card ul li:first-child { border-top: none; }

/* ---- 요금제 가격 라인 (월간/연간 구분 + 장바구니 담기 칩) ---- */
.price-line { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.price-line:last-of-type { border-bottom: none; padding-bottom: 0; }
.price-line-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price-line-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.price-line-yearly .price { font-size: 1.05rem; color: var(--gold); }
.price-line-yearly .price-line-label { color: var(--gold); }

/* ---- 월간/연간 결제 토글 (서비스 상세 페이지 요금제 영역 상단) ---- */
.billing-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 4px 0 20px;
  gap: 2px;
}
.billing-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.billing-toggle-btn.is-active { background: var(--text); color: var(--bg); }
.billing-save-badge {
  background: var(--gold);
  color: #17160c;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.billing-toggle-btn:not(.is-active) .billing-save-badge { background: var(--gold-soft); color: var(--gold-strong); }

/* ---- 연간 결제 절약 배지 / 정보 없음 안내 (요금제 카드 내부) ---- */
.price-save-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--gold-strong);
  background: var(--gold-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin: 2px 0 6px;
}
.price-note-fallback {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 2px 0;
  margin: 0;
}
.billing-fallback-switch {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.billing-fallback-switch:hover { color: var(--gold-strong); }

.cart-check {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}
.cart-check input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.cart-check span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  transition: all 0.15s ease;
}
.cart-check span::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  font-size: 0.85rem;
  line-height: 1;
}
.cart-check:hover span { border-color: var(--gold); color: var(--gold); }
.cart-check input:checked + span {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.cart-check input:checked + span::before { content: '✓'; }
.cart-check input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.compare-plan-list { list-style: none !important; }
.compare-plan-list li { padding: 12px 0 !important; border-top: 1px solid var(--border); }
.compare-plan-list li:first-child { border-top: none; }
.compare-plan-list li strong { display: block; margin-bottom: 6px; font-size: 0.92rem; }

/* ================= Description / static ================= */
.service-description {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 32px;
}
.static-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
}
.static-page h1 { font-size: 1.5rem; margin-bottom: 18px; }
.static-page h2 { font-size: 1.1rem; margin-top: 30px; color: var(--gold); }

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ================= Compare page ================= */
.compare-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
}
.compare-picker form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.compare-picker select {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  min-width: 180px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
}
.compare-picker button {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  font-weight: 700;
}
.compare-picker button:hover { background: var(--btn-bg-hover); }

.compare-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  min-width: 640px;
}
table.compare-table th, table.compare-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}
table.compare-table th:last-child, table.compare-table td:last-child { border-right: none; }
table.compare-table tr:last-child td { border-bottom: none; }
table.compare-table thead th {
  background: var(--surface-2);
  position: sticky;
  top: 0;
}
table.compare-table tbody tr:hover { background: color-mix(in srgb, var(--gold-soft) 45%, transparent); }
table.compare-table td.empty-plans { color: var(--text-muted); font-size: 0.82rem; }

/* ================= Footer (항상 다크 — 브랜드 북엔드) ================= */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 48px;
}
.footer-inner { padding: 40px 20px 32px; text-align: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; font-size: 0.85rem; }
.footer-links a { color: var(--footer-text); }
.footer-links a:hover { color: var(--gold-fill); }
.footer-disclaimer { font-size: 0.78rem; color: var(--footer-muted); max-width: 640px; margin: 0 auto 14px; line-height: 1.7; }
.footer-copy { font-size: 0.76rem; color: var(--footer-muted); padding-top: 14px; border-top: 1px solid var(--footer-border); }

.ad-slot {
  margin: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .hero h1 { font-size: 1.5rem; }
  .service-detail-head { padding: 20px; }
  .section-title { margin: 40px 0 14px; }
}

/* ================= 장바구니(예상 구독료 합계) 위젯 ================= */
#cart-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  font-size: 0.9rem;
}
#cart-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}
#cart-toggle:hover { transform: translateY(-2px); }
#cart-toggle .cart-icon { font-size: 1.05rem; }
#cart-toggle .cart-count {
  background: var(--gold);
  color: #17160c;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#cart-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 350px;
  max-width: calc(100vw - 40px);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.cart-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cart-panel-head h3 { margin: 0; font-size: 1rem; }
#cart-close { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted); }
#cart-close:hover { color: var(--text); }

.cart-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.cart-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cart-tab:hover { border-color: var(--gold); color: var(--text); }
.cart-tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.cart-tab-count {
  background: var(--gold);
  color: #17160c;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-tab:not(.is-active) .cart-tab-count { background: var(--gold-soft); color: var(--gold-strong); }

.cart-empty { font-size: 0.82rem; color: var(--text-muted); padding: 10px 0; line-height: 1.6; }

.cart-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-category {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-title { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-plan { font-size: 0.74rem; color: var(--text-muted); }
.cart-item-price { font-size: 0.82rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.cart-item-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.8rem; padding: 2px 4px; }

.cart-summary { border-top: 1px solid var(--border); padding-top: 12px; }
.cart-summary-line { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--gold-strong);
}
.cart-summary-rate {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  margin: 8px 0 0;
  line-height: 1.6;
}
.cart-rate-source { font-family: var(--font-sans); font-style: normal; opacity: 0.8; }
.cart-summary-note { font-size: 0.7rem; color: var(--text-muted); margin: 10px 0 0; line-height: 1.5; }

.cart-panel-foot { margin-top: 14px; text-align: right; }
.cart-panel-foot .btn { padding: 6px 14px; font-size: 0.78rem; }

@media (max-width: 480px) {
  #cart-panel { width: calc(100vw - 32px); right: -4px; }
  #cart-widget { right: 14px; bottom: 14px; }
}

/* ================= 신규 등록 / 할인 배지 ================= */
/* (참고) .service-card는 이미 position: relative 이므로 카드 모서리에 리본처럼 얹힌다. */
.new-badge, .discount-badge {
  position: absolute;
  top: 12px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.new-badge {
  left: 12px;
  background: var(--gold);
  color: #17160c;
}
/* 할인 배지는 라이트/다크 어느 테마에서도 항상 눈에 띄는 고정 레드를 사용한다
   (--danger 토큰은 다크 모드에서 밝은 핑크라 흰 텍스트와 대비가 약해지므로 의도적으로 하드코딩) */
.discount-badge {
  right: 12px;
  background: #dc2626;
  color: #fff;
}
.new-badge-inline, .discount-badge-inline {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 3px 11px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 10px;
}
.new-badge-inline { background: var(--gold); color: #17160c; }
.discount-badge-inline { background: #dc2626; color: #fff; }

/* ================= 신규 등록 서비스 캐러셀 ================= */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .service-card {
  scroll-snap-align: start;
  flex: 0 0 240px;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow);
  z-index: 2;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.carousel-btn:hover { border-color: var(--gold); color: var(--gold); }
.carousel-btn[hidden] { display: none; }
.carousel-prev { left: -16px; }
.carousel-next { right: -16px; }
@media (max-width: 700px) {
  .carousel-prev { left: -6px; }
  .carousel-next { right: -6px; }
}

/* ================= 공지사항 (메인 스트립 / 목록 / 상세) ================= */
.notice-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 22px;
  margin-bottom: 8px;
}
.notice-strip-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px dashed var(--border);
}
.notice-strip-item:first-child { border-top: none; }
.notice-strip-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.notice-strip-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-strip-item:hover .notice-strip-title { color: var(--gold); }
.notice-strip-tag {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  background: #dc2626;
  padding: 2px 9px;
  border-radius: 999px;
}

.notice-list { display: flex; flex-direction: column; gap: 12px; }
.notice-list-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.notice-list-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.notice-list-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }
.notice-list-title { font-weight: 700; flex: 1; min-width: 0; }

.notice-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 28px;
}
.notice-detail-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.notice-detail-body {
  font-size: 0.96rem;
  line-height: 1.85;
  margin: 18px 0;
  white-space: normal;
}

@media (max-width: 480px) {
  .notice-strip { padding: 2px 16px; }
  .notice-strip-item { flex-wrap: wrap; gap: 4px; }
  .notice-list-item { flex-wrap: wrap; gap: 6px; padding: 14px 16px; }
}
