/* =========================================================
   Design Systems Gallery — neutral host
   카드 안의 brand hero가 주인공. 호스트는 차분한 grayscale.
========================================================= */

:root {
  /* Palette — slate */
  --bg-base: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.45);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  --border-default: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;
  --border-focus: #0f172a;

  --accent: #0f172a;
  --accent-hover: #1e293b;
  --accent-bg: #f1f5f9;

  /* Spacing */
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.16);

  /* Z-index */
  --z-topbar: 50;
  --z-drawer: 100;
  --z-scrim: 90;

  /* Layout */
  --topbar-h: 56px;
  --sidebar-w: 280px;
  --content-max: 1600px;
  --detail-max: 960px;

  --transition: 0.18s ease;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* author rules can override UA [hidden] */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 8px 12px; z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ========= Topbar ========= */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  height: var(--topbar-h);
  display: flex; align-items: center;
  padding: 0 var(--space-6);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-default);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  font-weight: 600;
}
.logo-mark {
  width: 18px; height: 18px; border-radius: 4px;
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
}
.logo-text { letter-spacing: -0.01em; }
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: var(--space-5); }
.result-count { color: var(--text-secondary); font-variant-numeric: tabular-nums; }


/* ========= Layout ========= */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: calc(100vh - var(--topbar-h));
}

/* ========= Sidebar / Filters ========= */
.sidebar {
  border-right: 1px solid var(--border-default);
  background: var(--bg-base);
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.sidebar-inner { padding: var(--space-6) var(--space-5) var(--space-8); }

.filter-group { margin-bottom: var(--space-6); }
.notebooklm-filter {
  margin-left: -6px;
  margin-right: -6px;
  padding: 12px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8faff, #f3f5ff);
}
.notebooklm-filter .filter-label {
  color: #3157d5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .075em;
}
.notebooklm-filter .facet-chip[aria-pressed="true"] {
  background: #3157d5;
  border-color: #3157d5;
}
.notebooklm-filter .facet-chip[aria-pressed="true"]:hover { background: #2747b5; }
.filter-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.search, .select {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search:focus, .select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15,23,42,0.10);
}

.filter-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.facet-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.facet-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.facet-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.facet-chip[aria-pressed="true"]:hover { background: var(--accent-hover); }
.facet-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.18);
}

.range-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
}
.range {
  width: 100%;
  accent-color: var(--accent);
}
.range-readout {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.btn-secondary {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
}
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-secondary:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15,23,42,0.10);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-md);
}
.btn-ghost:hover { background: var(--bg-subtle); }

/* ========= Content ========= */
.content {
  padding: var(--space-6) var(--space-7);
  min-width: 0;
}

.active-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: var(--space-5);
  min-height: 0;
}
.active-chips:empty { display: none; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.active-chip button {
  background: transparent; border: 0; color: var(--text-tertiary);
  cursor: pointer; line-height: 1; padding: 0; font-size: 14px;
}
.active-chip button:hover { color: var(--text-primary); }

/* ========= Grid ========= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* ========= Card ========= */
.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  padding: 0;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15,23,42,0.18);
}

.card-hero {
  position: relative;
  aspect-ratio: 4 / 3;     /* ~ 60% of card height for 280×360 */
  background: var(--bg-subtle);
  overflow: hidden;
  border-bottom: 1px solid var(--border-default);
  pointer-events: none;    /* never intercept clicks meant for the card link */
}
.card-hero iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  pointer-events: none;
}
.card-meta { pointer-events: none; }   /* a-tag receives all clicks */

.card-meta {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex; flex-direction: column; gap: 8px;
}
.card-title-row {
  display: flex; align-items: center; gap: 8px;
}
.card-swatch {
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;   /* 2줄(1.4×2) 높이 고정 → 카드마다 사용량 위치 정렬 */
}
.card-badges {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 2px;
}
/* Bottom row: badges (left) + usage count (bottom-right) */
.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.card-footer .card-badges { margin-top: 0; flex: 1 1 auto; min-width: 0; }
.card-usage {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.4;
}
.card-usage:empty { display: none; }
.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.badge-region { background: #f8fafc; }

/* ========= Empty ========= */
.empty {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  color: var(--text-secondary);
}
.empty-mark {
  font-size: 32px; color: var(--text-tertiary); margin-bottom: var(--space-4);
}
.empty button { display: inline-block; width: auto; padding: 0 16px; margin-top: var(--space-4); }

/* ========= Detail ========= */
.detail { background: var(--bg-base); }
.detail-inner {
  max-width: var(--detail-max);
  margin: 0 auto;
  padding: var(--space-7) var(--space-6) var(--space-8);
}
.back {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-6);
  font-size: 13px;
}
.back:hover { color: var(--text-primary); }

.detail-header {
  position: relative;
  margin-bottom: var(--space-7);
}
/* Per-page light/dark control — iOS-style segmented control with a sliding thumb */
.detail-mode-toggle {
  position: absolute; top: 0; right: 0;
  display: inline-flex;
  padding: 3px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  -webkit-user-select: none; user-select: none;
}
/* The white pill that glides under the active option */
.mode-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.13), 0 1px 2px rgba(15, 23, 42, 0.10);
  transform: translate3d(0, 0, 0);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.42s ease;
  z-index: 0;
  pointer-events: none;
}
/* Thumb color follows the selected mode: light → white, dark → black */
.detail-mode-toggle[data-mode="light"] .mode-thumb { background: #ffffff; }
.detail-mode-toggle[data-mode="dark"]  .mode-thumb { background: var(--text-primary); }
.detail-mode-toggle[data-mode="dark"]  .mode-thumb { transform: translate3d(100%, 0, 0); }
.mode-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 62px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  font: 600 12.5px/1 inherit;
  letter-spacing: -0.01em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.12s ease;
}
.mode-btn:hover { color: var(--text-secondary); }
/* Active label sits on the thumb — flip its color so it reads on white vs black */
.detail-mode-toggle[data-mode="light"] .mode-btn[aria-pressed="true"] { color: var(--text-primary); }
.detail-mode-toggle[data-mode="dark"]  .mode-btn[aria-pressed="true"] { color: #ffffff; }
.mode-btn:active { transform: scale(0.96); }
.mode-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(15,23,42,0.16); }

/* Single-mode static indicator (light-only / dark-only brands) — same top-right slot */
.detail-mode-single { position: absolute; top: 0; right: 0; }
.mode-single-pill {
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  font: 600 12.5px/1 inherit;
  letter-spacing: -0.01em;
  border: 1px solid var(--border-subtle);
}
.detail-mode-single[data-mode="light"] .mode-single-pill {
  background: #ffffff; color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10);
}
.detail-mode-single[data-mode="dark"] .mode-single-pill {
  background: var(--text-primary); color: #ffffff;
  border-color: var(--text-primary);
}

/* Download count next to the action buttons (right-aligned) */
.dl-count {
  margin-left: auto;
  align-self: center;
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dl-count:empty { display: none; }
.detail-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  display: flex; align-items: center; gap: 12px;
}
.detail-swatch {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.detail-tagline {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 var(--space-5);
}
.detail-meta-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.detail-meta-row .badge { font-size: 11px; padding: 4px 8px; }

/* Raw md panel */
.raw-md-panel {
  margin: var(--space-5) 0 var(--space-7);
  padding: var(--space-5);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.raw-md-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.btn-copy, .btn-download {
  width: auto;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font: 600 13px/1 inherit;
  border: 1px solid var(--border-default);
}
.btn-copy { background: var(--bg-base); color: var(--text-primary); }
.btn-copy:hover { background: var(--bg-subtle); }
.btn-download { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.btn-download:hover { opacity: 0.9; }
.btn-copy:focus-visible, .btn-download:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(15,23,42,0.18); }
.btn-toggle-raw { width: auto; padding: 0 14px; height: 36px; }
.copy-status { font-size: 12px; color: var(--text-secondary); margin-left: 4px; }
.raw-md {
  margin: var(--space-4) 0 0;
  background: #0f172a; color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  max-height: 480px;
  overflow: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5;
  white-space: pre;
}
.raw-md.hidden { display: none; }

.detail-section {
  margin-bottom: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.detail-section:first-of-type { border-top: 0; padding-top: 0; }
.detail-section h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-3);
}
.detail-section h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
}

.detail-section h4, .detail-section h5, .detail-section h6 {
  margin: var(--space-5) 0 var(--space-3);
  font-weight: 600;
}
.detail-section h4 { font-size: 18px; }
.detail-section h5 { font-size: 15px; }

.detail-section p, .detail-section ul, .detail-section ol {
  margin: 0 0 var(--space-4);
}
.detail-section ul, .detail-section ol { padding-left: 22px; }
.detail-section li { margin-bottom: 4px; }
.detail-section li ul { margin-top: 4px; }

.detail-section .code {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0 0 var(--space-4);
}
.detail-section code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.92em; background: var(--bg-subtle); padding: 1px 5px; border-radius: 3px; }
/* Reset inline-code styles when nested inside a code block (pre) */
.detail-section pre code,
.raw-md code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* Color swatch grid */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 0 0 var(--space-5);
}
.swatch {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.swatch-color { aspect-ratio: 3/2; }
.swatch-meta {
  padding: 6px 8px;
  font-size: 10.5px;
  font-family: ui-monospace, monospace;
  color: var(--text-secondary);
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 2px;
}
.swatch-meta .swatch-name { color: var(--text-primary); }

/* Token visualizers */
.token-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 12px;
  margin: 0 0 var(--space-5);
}
.token-cell {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-base);
}
.token-cell .token-vis {
  width: 64px; height: 64px;
  background: #fff;
  border: 1px solid var(--border-default);
}
.token-cell .token-name {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}
.token-cell .token-value {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* Type preview */
.type-preview {
  padding: var(--space-6);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin: 0 0 var(--space-5);
}
.type-preview-display {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--space-3);
}
.type-preview-body {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* Signature demo iframe */
.sig-demo-wrap {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 0 var(--space-4);
}
.sig-demo {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}
.sig-demo-actions {
  position: absolute; top: 12px; right: 30px;
  display: flex; gap: 6px;
}
.sig-demo-actions button {
  background: rgba(15,23,42,0.85);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
}
.sig-demo-actions button:hover { background: var(--accent); }

/* ⑫ signature source — every code block collapses together under one toggle */
.sig-code { margin: 0 0 var(--space-4); }
.sig-code.hidden { display: none; }
.sig-code .code { margin-bottom: var(--space-3); }
.sig-code .code:last-child { margin-bottom: 0; }

.sources-list {
  margin: 0; padding-left: 20px;
}
.sources-list li { margin-bottom: 4px; }
.sources-list a { color: var(--accent); text-decoration: none; }
.sources-list a:hover { text-decoration: underline; }

/* ========= Responsive ========= */
.mobile-only { display: none; }

@media (max-width: 880px) {
  .mobile-only { display: inline-flex; align-items: center; gap: 6px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    height: 100vh;
    width: 320px;
    max-width: 90vw;
    z-index: var(--z-drawer);
    background: var(--bg-base);
    border-right: 1px solid var(--border-default);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .sidebar[data-open="true"] { transform: translateX(0); }
  .sidebar-inner { padding-top: calc(var(--topbar-h) + var(--space-4)); }
  .scrim {
    position: fixed; inset: 0; background: var(--bg-overlay);
    z-index: var(--z-scrim);
  }
  .content { padding: var(--space-5) var(--space-5); }
  .detail-inner { padding: var(--space-5) var(--space-5) var(--space-7); }
  .detail-title { font-size: 28px; }
  /* On narrow screens the toggle can collide with the title — flow it below the meta. */
  .detail-mode-toggle, .detail-mode-single { position: relative; top: auto; right: auto; margin-top: var(--space-4); }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Inflearn Light theme
   Source: inflearn-light.md supplied by the user.
========================================================= */
.inflearn-light-theme {
  --color-primary-50: #f0faf5;
  --color-primary-100: #b8ebd0;
  --color-primary-300: #3fc881;
  --color-primary-500: #00c471;
  --color-primary-600: #00a75e;
  --color-primary-700: #008549;
  --color-secondary-500: #5e6ad2;
  --primary-rgb: 0, 196, 113;
  --primary-contrast: #ffffff;
  --theme-tint: #f8fcfa;

  --bg-base: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-elevated: #ffffff;
  --bg-overlay: rgba(31, 41, 55, 0.55);

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;

  --border-default: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-strong: #d1d5db;
  --border-focus: #00c471;

  --accent: #00c471;
  --accent-hover: #00a75e;
  --accent-bg: #f0faf5;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);

  --topbar-h: 64px;
  --sidebar-w: 276px;
  --content-max: 1440px;
  --detail-max: 1080px;
  --transition: 150ms ease;

  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  background: var(--bg-base);
}

.inflearn-light-theme ::selection {
  color: var(--color-primary-700);
  background: var(--color-primary-100);
}

.inflearn-light-theme .skip-link {
  background: var(--color-primary-500);
  border-radius: var(--radius-md);
  font-weight: 800;
}

/* Header */
.inflearn-light-theme .topbar {
  height: var(--topbar-h);
  padding: 0 clamp(18px, 3vw, 38px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border-default);
  backdrop-filter: saturate(140%) blur(12px);
}

.inflearn-light-theme .logo {
  gap: 11px;
  font-weight: 900;
}

.inflearn-light-theme .logo-mark {
  position: relative;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--color-primary-500);
  box-shadow: 0 7px 16px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .logo-mark::after {
  content: "K";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--primary-contrast);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.inflearn-light-theme .logo-text {
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.inflearn-light-theme .logo-text::first-letter {
  color: var(--color-primary-500);
}

.inflearn-light-theme .topbar-meta {
  gap: 12px;
}

.inflearn-light-theme .result-count {
  padding: 7px 11px;
  border: 1px solid var(--color-primary-100);
  border-radius: 999px;
  color: var(--color-primary-700);
  background: var(--color-primary-50);
  font-size: 12px;
  font-weight: 800;
}

/* Main shell */
.inflearn-light-theme .layout {
  max-width: var(--content-max);
  min-height: calc(100vh - var(--topbar-h));
}

.inflearn-light-theme .sidebar {
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  border-right-color: var(--border-default);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  scrollbar-color: #cdd8d2 transparent;
  scrollbar-width: thin;
}

.inflearn-light-theme .sidebar-inner {
  padding: 28px 18px 48px;
}

.inflearn-light-theme .filter-group {
  margin-bottom: 25px;
}

.inflearn-light-theme .filter-label {
  margin-bottom: 9px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: none;
}

.inflearn-light-theme .search,
.inflearn-light-theme .select {
  height: 42px;
  padding: 0 14px;
  border-color: var(--border-default);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.inflearn-light-theme .select {
  border-radius: var(--radius-md);
  background-color: #ffffff;
}

.inflearn-light-theme .search::placeholder {
  color: #9ca3af;
}

.inflearn-light-theme .search:focus,
.inflearn-light-theme .select:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.inflearn-light-theme .filter-options {
  gap: 7px 6px;
}

.inflearn-light-theme .facet-chip {
  min-height: 30px;
  padding: 5px 10px;
  border-color: var(--border-default);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.inflearn-light-theme .facet-chip:hover {
  color: var(--color-primary-700);
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.inflearn-light-theme .facet-chip[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--text-primary);
  background: var(--text-primary);
}

.inflearn-light-theme .facet-chip[aria-pressed="true"]:hover {
  color: #ffffff;
  border-color: #111827;
  background: #111827;
}

.inflearn-light-theme .facet-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .notebooklm-filter {
  margin: 0 -6px 26px;
  padding: 14px 12px;
  border-color: var(--color-primary-100);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--color-primary-50), var(--theme-tint));
}

.inflearn-light-theme .notebooklm-filter .filter-label {
  color: var(--color-primary-700);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.inflearn-light-theme .notebooklm-filter .facet-chip {
  border-color: #dce9e2;
}

.inflearn-light-theme .notebooklm-filter .facet-chip[aria-pressed="true"],
.inflearn-light-theme .notebooklm-filter .facet-chip[aria-pressed="true"]:hover {
  color: var(--primary-contrast);
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
}

.inflearn-light-theme .btn-secondary {
  height: 41px;
  border-color: var(--color-primary-500);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--color-primary-600);
  font-size: 13px;
  font-weight: 800;
}

.inflearn-light-theme .btn-secondary:hover {
  background: var(--color-primary-50);
}

.inflearn-light-theme .btn-secondary:focus-visible,
.inflearn-light-theme .btn-ghost:focus-visible {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .btn-ghost {
  height: 36px;
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 800;
}

.inflearn-light-theme .btn-ghost:hover {
  color: var(--color-primary-700);
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

/* Catalog */
.inflearn-light-theme .content {
  min-width: 0;
  padding: 30px clamp(22px, 3vw, 40px) 64px;
  background: #ffffff;
}

.inflearn-light-theme .active-chips {
  gap: 8px;
  margin-bottom: 22px;
}

.inflearn-light-theme .active-chip {
  padding: 7px 11px;
  border-color: var(--color-primary-100);
  border-radius: 999px;
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  font-size: 12px;
  font-weight: 750;
}

.inflearn-light-theme .active-chip button {
  color: var(--color-primary-600);
  font-weight: 900;
}

.inflearn-light-theme .grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 31px 20px;
}

.inflearn-light-theme .card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: transform var(--transition);
}

.inflearn-light-theme .card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: none;
}

.inflearn-light-theme .card:focus-visible {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-xl);
}

.inflearn-light-theme .card-hero {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.inflearn-light-theme .card:hover .card-hero {
  border-color: var(--color-primary-300);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.11);
}

.inflearn-light-theme .card-meta {
  gap: 7px;
  padding: 13px 3px 0;
}

.inflearn-light-theme .card-title-row {
  gap: 8px;
}

.inflearn-light-theme .card-swatch {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--color-primary-50);
}

.inflearn-light-theme .card-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -0.018em;
}

.inflearn-light-theme .card-subtitle {
  min-height: 2.9em;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.inflearn-light-theme .card-footer {
  align-items: center;
  margin-top: 3px;
}

.inflearn-light-theme .card-badges {
  gap: 5px;
}

.inflearn-light-theme .badge {
  padding: 3px 7px;
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.inflearn-light-theme .badge-region {
  color: var(--color-primary-700);
  border-color: var(--color-primary-100);
  background: var(--color-primary-50);
}

.inflearn-light-theme .card-usage {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
}

.inflearn-light-theme .empty {
  margin-top: 20px;
  padding: 64px 24px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--bg-subtle);
}

.inflearn-light-theme .empty-mark {
  color: var(--color-primary-500);
}

/* Detail page */
.inflearn-light-theme .detail {
  min-height: calc(100vh - var(--topbar-h));
  background: var(--bg-subtle);
}

.inflearn-light-theme .detail-inner {
  max-width: var(--detail-max);
  padding: 32px 24px 72px;
}

.inflearn-light-theme .back {
  margin-bottom: 18px;
  padding: 7px 11px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.inflearn-light-theme .back:hover {
  color: var(--color-primary-700);
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.inflearn-light-theme .detail-header {
  margin-bottom: 16px;
  padding: 30px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.inflearn-light-theme .detail-title {
  max-width: calc(100% - 150px);
  margin-bottom: 9px;
  color: var(--text-primary);
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.inflearn-light-theme .detail-swatch {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--color-primary-50);
}

.inflearn-light-theme .detail-tagline {
  max-width: 700px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.inflearn-light-theme .detail-meta-row {
  gap: 6px;
}

.inflearn-light-theme .detail-meta-row .badge {
  padding: 5px 8px;
  font-size: 11px;
}

.inflearn-light-theme .detail-mode-toggle {
  border-color: var(--border-default);
  background: var(--bg-subtle);
  box-shadow: inset 0 1px 2px rgba(31, 41, 55, 0.04);
}

.inflearn-light-theme .mode-thumb {
  box-shadow: var(--shadow-sm);
}

.inflearn-light-theme .mode-btn {
  font-weight: 750;
}

.inflearn-light-theme .mode-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .mode-single-pill {
  border-color: var(--border-default);
  font-weight: 750;
}

.inflearn-light-theme .raw-md-panel {
  margin: 0 0 16px;
  padding: 18px;
  border-color: var(--color-primary-100);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-primary-50), #ffffff);
}

.inflearn-light-theme .raw-md-actions {
  gap: 9px;
}

.inflearn-light-theme .btn-copy,
.inflearn-light-theme .btn-download {
  height: 41px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
}

.inflearn-light-theme .btn-copy {
  color: var(--color-primary-700);
  border-color: var(--color-primary-500);
  background: #ffffff;
}

.inflearn-light-theme .btn-copy:hover {
  background: var(--color-primary-50);
}

.inflearn-light-theme .btn-download {
  color: var(--primary-contrast);
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.24);
}

.inflearn-light-theme .btn-download:hover {
  background: var(--color-primary-600);
  opacity: 1;
}

.inflearn-light-theme .btn-copy:focus-visible,
.inflearn-light-theme .btn-download:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .copy-status,
.inflearn-light-theme .dl-count {
  color: var(--color-primary-700);
  font-weight: 700;
}

.inflearn-light-theme .raw-md {
  border-radius: var(--radius-lg);
  background: #17211c;
  color: #e8fff4;
  font-family: "JetBrains Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
}

.inflearn-light-theme .detail-section {
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.inflearn-light-theme .detail-section:first-of-type {
  padding-top: 28px;
  border: 1px solid var(--border-default);
}

.inflearn-light-theme .detail-section h2 {
  margin-bottom: 8px;
  color: var(--color-primary-700);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.inflearn-light-theme .detail-section h3 {
  margin-bottom: 18px;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.inflearn-light-theme .detail-section h4,
.inflearn-light-theme .detail-section h5,
.inflearn-light-theme .detail-section h6 {
  font-weight: 800;
}

.inflearn-light-theme .detail-section p,
.inflearn-light-theme .detail-section ul,
.inflearn-light-theme .detail-section ol {
  color: var(--text-secondary);
  font-weight: 550;
  line-height: 1.7;
}

.inflearn-light-theme .detail-section strong {
  color: var(--text-primary);
  font-weight: 800;
}

.inflearn-light-theme .detail-section .code {
  border-radius: var(--radius-lg);
  background: #17211c;
  color: #e8fff4;
  font-family: "JetBrains Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
}

.inflearn-light-theme .detail-section code {
  color: var(--color-primary-700);
  background: var(--color-primary-50);
}

.inflearn-light-theme .swatch,
.inflearn-light-theme .token-cell {
  border-color: var(--border-default);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.inflearn-light-theme .type-preview {
  border: 1px solid var(--color-primary-100);
  border-radius: var(--radius-lg);
  background: var(--color-primary-50);
}

.inflearn-light-theme .type-preview-display {
  font-weight: 900;
}

.inflearn-light-theme .sig-demo-wrap {
  border-color: var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.inflearn-light-theme .sig-demo-actions button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(23, 33, 28, 0.9);
  font-weight: 800;
}

.inflearn-light-theme .sig-demo-actions button:hover {
  background: var(--color-primary-600);
}

.inflearn-light-theme .sources-list a {
  color: var(--color-primary-700);
  font-weight: 750;
}

@media (max-width: 1080px) {
  .inflearn-light-theme .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 880px) {
  .inflearn-light-theme {
    --topbar-h: 60px;
  }

  .inflearn-light-theme .topbar {
    padding: 0 16px;
  }

  .inflearn-light-theme .logo-mark {
    width: 28px;
    height: 28px;
  }

  .inflearn-light-theme .logo-text {
    font-size: 17px;
  }

  .inflearn-light-theme .sidebar {
    top: 0;
    height: 100vh;
    border-right-color: var(--border-default);
    background: #ffffff;
  }

  .inflearn-light-theme .sidebar-inner {
    padding: calc(var(--topbar-h) + 18px) 18px 48px;
  }

  .inflearn-light-theme .content {
    padding: 22px 17px 52px;
  }

  .inflearn-light-theme .detail-inner {
    padding: 22px 16px 52px;
  }

  .inflearn-light-theme .detail-title {
    max-width: none;
  }

  .inflearn-light-theme .detail-mode-toggle,
  .inflearn-light-theme .detail-mode-single {
    margin-top: 16px;
  }
}

@media (max-width: 620px) {
  .inflearn-light-theme .result-count {
    padding: 6px 8px;
    font-size: 11px;
  }

  .inflearn-light-theme .logo-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .inflearn-light-theme .grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .inflearn-light-theme .card-hero {
    border-radius: var(--radius-lg);
  }

  .inflearn-light-theme .detail-header,
  .inflearn-light-theme .detail-section {
    padding: 21px;
  }

  .inflearn-light-theme .detail-section:first-of-type {
    padding-top: 21px;
  }

  .inflearn-light-theme .detail-title {
    font-size: 27px;
  }

  .inflearn-light-theme .raw-md-actions {
    align-items: stretch;
  }

  .inflearn-light-theme .btn-copy,
  .inflearn-light-theme .btn-download,
  .inflearn-light-theme .btn-toggle-raw {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ========= Appearance toolbar ========= */
.inflearn-light-theme {
  --appearance-h: 52px;
}

.inflearn-light-theme .appearance-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: calc(var(--z-topbar) - 1);
  height: var(--appearance-h);
  border-bottom: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(12px);
}

.inflearn-light-theme .appearance-inner {
  width: min(var(--content-max), 100%);
  height: 100%;
  margin: 0 auto;
  padding: 8px clamp(18px, 3vw, 38px);
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.inflearn-light-theme .appearance-inner::-webkit-scrollbar {
  display: none;
}

.inflearn-light-theme .appearance-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.inflearn-light-theme .appearance-label {
  margin-right: 3px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.inflearn-light-theme .appearance-divider {
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  background: var(--border-default);
}

.inflearn-light-theme .appearance-option {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.inflearn-light-theme .appearance-option:hover {
  color: var(--color-primary-700);
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.inflearn-light-theme .appearance-option[aria-pressed="true"] {
  color: var(--primary-contrast);
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
  box-shadow: 0 3px 9px rgba(var(--primary-rgb), 0.2);
}

.inflearn-light-theme .appearance-option:active {
  transform: translateY(1px);
}

.inflearn-light-theme .appearance-option:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.inflearn-light-theme .layout {
  min-height: calc(100vh - var(--topbar-h) - var(--appearance-h));
}

.inflearn-light-theme .sidebar {
  top: calc(var(--topbar-h) + var(--appearance-h));
  height: calc(100vh - var(--topbar-h) - var(--appearance-h));
}

.inflearn-light-theme .detail {
  min-height: calc(100vh - var(--topbar-h) - var(--appearance-h));
}

/* ========= Font toggle ========= */
body.inflearn-light-theme[data-font="pretendard"],
body.inflearn-light-theme[data-font="pretendard"] button,
body.inflearn-light-theme[data-font="pretendard"] input,
body.inflearn-light-theme[data-font="pretendard"] select,
body.inflearn-light-theme[data-font="pretendard"] textarea {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", system-ui, sans-serif;
}

body.inflearn-light-theme[data-font="noto-sans"],
body.inflearn-light-theme[data-font="noto-sans"] button,
body.inflearn-light-theme[data-font="noto-sans"] input,
body.inflearn-light-theme[data-font="noto-sans"] select,
body.inflearn-light-theme[data-font="noto-sans"] textarea {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

body.inflearn-light-theme[data-font="handwriting"],
body.inflearn-light-theme[data-font="handwriting"] button,
body.inflearn-light-theme[data-font="handwriting"] input,
body.inflearn-light-theme[data-font="handwriting"] select,
body.inflearn-light-theme[data-font="handwriting"] textarea {
  font-family: "Nanum Pen Script", "Gowun Dodum", "나눔손글씨 펜", cursive;
}

body.inflearn-light-theme[data-font="handwriting"] {
  font-size: 15px;
  letter-spacing: 0.005em;
}

body.inflearn-light-theme[data-font="handwriting"] .logo-text,
body.inflearn-light-theme[data-font="handwriting"] .detail-title,
body.inflearn-light-theme[data-font="handwriting"] .card-title {
  letter-spacing: 0;
}

body.inflearn-light-theme[data-font="handwriting"] .appearance-option,
body.inflearn-light-theme[data-font="handwriting"] .facet-chip,
body.inflearn-light-theme[data-font="handwriting"] .badge {
  font-size: 13px;
}

body.inflearn-light-theme[data-font] .raw-md,
body.inflearn-light-theme[data-font] .detail-section .code,
body.inflearn-light-theme[data-font] .detail-section code,
body.inflearn-light-theme[data-font] .swatch-meta,
body.inflearn-light-theme[data-font] .token-name,
body.inflearn-light-theme[data-font] .token-value {
  font-family: inherit;
}

/* ========= Current / Inflearn style ========= */
body.inflearn-light-theme[data-site-style="current"] .logo-mark::after {
  content: "K";
}

/* ========= Kakao style ========= */
body.inflearn-light-theme[data-site-style="kakao"] {
  --color-primary-50: #fffbea;
  --color-primary-100: #fff2a6;
  --color-primary-300: #ffe657;
  --color-primary-500: #fee500;
  --color-primary-600: #f4d900;
  --color-primary-700: #3c1e1e;
  --primary-rgb: 254, 229, 0;
  --primary-contrast: #191919;
  --theme-tint: #fffdf5;
  --bg-base: #ffffff;
  --bg-subtle: #fffdf7;
  --text-primary: #191919;
  --text-secondary: #4c4542;
  --text-tertiary: #776f6b;
  --border-default: #ece8df;
  --border-subtle: #f5f2ea;
  --border-strong: #ded8ca;
  --border-focus: #fee500;
  --accent: #fee500;
  --accent-hover: #f4d900;
  --accent-bg: #fffbea;
}

body.inflearn-light-theme[data-site-style="kakao"] .topbar,
body.inflearn-light-theme[data-site-style="kakao"] .appearance-bar {
  background: rgba(255, 255, 255, 0.96);
}

body.inflearn-light-theme[data-site-style="kakao"] .logo-mark {
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(var(--primary-rgb), 0.24);
}

body.inflearn-light-theme[data-site-style="kakao"] .logo-mark::before {
  content: "";
  position: absolute;
  right: 2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  background: var(--color-primary-500);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transform: rotate(18deg);
}

body.inflearn-light-theme[data-site-style="kakao"] .logo-mark::after {
  content: "K";
}

body.inflearn-light-theme[data-site-style="kakao"] .result-count,
body.inflearn-light-theme[data-site-style="kakao"] .active-chip,
body.inflearn-light-theme[data-site-style="kakao"] .badge-region {
  color: #3c1e1e;
}

body.inflearn-light-theme[data-site-style="kakao"] .card-hero {
  border-radius: 14px;
}

body.inflearn-light-theme[data-site-style="kakao"] .skip-link {
  color: #191919;
}

/* ========= Npay style ========= */
body.inflearn-light-theme[data-site-style="npay"] {
  --color-primary-50: #eefcf3;
  --color-primary-100: #c6f3d5;
  --color-primary-300: #61df8d;
  --color-primary-500: #03c75a;
  --color-primary-600: #00b451;
  --color-primary-700: #008c3d;
  --primary-rgb: 3, 199, 90;
  --primary-contrast: #ffffff;
  --theme-tint: #f7fef9;
  --border-focus: #03c75a;
  --accent: #03c75a;
  --accent-hover: #00b451;
  --accent-bg: #eefcf3;
}

body.inflearn-light-theme[data-site-style="npay"] .topbar {
  border-bottom: 2px solid var(--color-primary-500);
}

body.inflearn-light-theme[data-site-style="npay"] .logo-mark {
  border-radius: 7px;
  box-shadow: 0 7px 16px rgba(var(--primary-rgb), 0.2);
}

body.inflearn-light-theme[data-site-style="npay"] .logo-mark::after {
  content: "N";
  font-size: 17px;
}

body.inflearn-light-theme[data-site-style="npay"] .card-hero {
  border-radius: 7px;
}

body.inflearn-light-theme[data-site-style="npay"] .appearance-option,
body.inflearn-light-theme[data-site-style="npay"] .facet-chip {
  border-radius: 6px;
}

/* ========= Claude style ========= */
body.inflearn-light-theme[data-site-style="claude"] {
  --color-primary-50: #f8f1eb;
  --color-primary-100: #efd9ca;
  --color-primary-300: #e5a082;
  --color-primary-500: #d97757;
  --color-primary-600: #c86647;
  --color-primary-700: #994b35;
  --primary-rgb: 217, 119, 87;
  --primary-contrast: #ffffff;
  --theme-tint: #fffaf6;
  --bg-base: #fbfaf7;
  --bg-subtle: #f4f1ea;
  --bg-elevated: #fffefa;
  --text-primary: #2d2926;
  --text-secondary: #5d554f;
  --text-tertiary: #81776f;
  --border-default: #dfd9d1;
  --border-subtle: #eee9e2;
  --border-strong: #ccc4ba;
  --border-focus: #d97757;
  --accent: #d97757;
  --accent-hover: #c86647;
  --accent-bg: #f8f1eb;
}

body.inflearn-light-theme[data-site-style="claude"] .topbar,
body.inflearn-light-theme[data-site-style="claude"] .appearance-bar {
  background: rgba(251, 250, 247, 0.95);
}

body.inflearn-light-theme[data-site-style="claude"] .content,
body.inflearn-light-theme[data-site-style="claude"] .sidebar,
body.inflearn-light-theme[data-site-style="claude"] .detail {
  background: var(--bg-base);
}

body.inflearn-light-theme[data-site-style="claude"] .logo-mark {
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(var(--primary-rgb), 0.18);
}

body.inflearn-light-theme[data-site-style="claude"] .logo-mark::after {
  content: "C";
}

body.inflearn-light-theme[data-site-style="claude"] .card-hero,
body.inflearn-light-theme[data-site-style="claude"] .detail-header,
body.inflearn-light-theme[data-site-style="claude"] .detail-section,
body.inflearn-light-theme[data-site-style="claude"] .raw-md-panel {
  border-radius: 16px;
}

body.inflearn-light-theme[data-site-style="claude"] .card-meta {
  padding-top: 15px;
}

body.inflearn-light-theme[data-site-style="claude"] .raw-md {
  background: #2d2926;
  color: #f7f1ea;
}

@media (max-width: 880px) {
  .inflearn-light-theme .appearance-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .inflearn-light-theme .sidebar {
    top: 0;
    height: 100vh;
  }
}

@media (max-width: 620px) {
  .inflearn-light-theme .appearance-label {
    display: none;
  }

  .inflearn-light-theme .appearance-inner {
    gap: 9px;
  }

  .inflearn-light-theme .appearance-option {
    padding: 0 10px;
  }
}
