/* 紫微斗数知识 · 阅读样式
   设计参考 iztro.com（VitePress 默认主题）浅色模式。
   本站不提供暗色模式，只有白底一套。 */

:root {
  /* 品牌色 */
  --c-brand:        #4565d8;
  --c-brand-hover:  #3451b2;
  --c-brand-soft:   rgba(69, 101, 216, 0.08);

  /* 背景 */
  --c-bg:           #ffffff;
  --c-bg-alt:       #f6f6f7;
  --c-bg-soft:      #f6f6f7;
  --c-bg-mute:      #eeeef0;

  /* 文字 */
  --c-text-1:       rgb(60, 60, 67);
  --c-text-2:       rgba(60, 60, 67, 0.78);
  --c-text-3:       rgba(60, 60, 67, 0.56);
  --c-text-4:       rgba(60, 60, 67, 0.33);

  /* 线 */
  --c-divider:      #e2e2e3;
  --c-border:       #d8d8d9;

  /* 语义色 */
  --c-tip:          #4565d8;
  --c-tip-bg:       #f6f6f7;
  --c-warning:      #b8860b;
  --c-warning-bg:   #fdf6e3;
  --c-danger:       #d5393e;
  --c-danger-bg:    #fdf2f2;
  --c-quote:        #6b7280;

  /* 字体：全站无衬线，中文正文用系统字体栈 */
  --font-base: "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  /* 布局 */
  --nav-height:     64px;
  --sidebar-width:  272px;
  --toc-width:      224px;
  --content-width:  720px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--c-text-1);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--c-brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--c-brand-hover); text-decoration: underline; text-underline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-height);
  display: flex; align-items: center; gap: 24px;
  padding: 0 32px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-divider);
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand strong {
  font-size: 16px; font-weight: 700;
  color: var(--c-text-1); letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand:hover strong { color: var(--c-brand); }

.global-search {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 260px;
  height: 40px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--c-bg-alt);
  color: var(--c-text-3);
  cursor: text; transition: border-color .2s, background .2s;
}
.global-search:focus-within { border-color: var(--c-brand); background: var(--c-bg); }
.global-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--c-text-1);
}
.global-search input::placeholder { color: var(--c-text-4); }
.global-search kbd {
  font-family: var(--font-base); font-size: 12px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: var(--c-bg); border: 1px solid var(--c-divider);
  color: var(--c-text-4);
}

.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- 布局 */

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  align-items: start;
  padding-top: var(--nav-height);
}

/* ---------------------------------------------------------------- 侧栏目录 */

.library-panel {
  position: sticky; top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 32px 24px 128px;
  background: var(--c-bg-alt);
  border-right: 1px solid var(--c-divider);
}

.panel-heading h1 {
  margin: 0 0 20px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: none;
  color: var(--c-text-3);
}

.simple-nav-group { margin-bottom: 2px; }

.simple-nav-link {
  display: block;
  padding: 6px 0;
  font-size: 14px; font-weight: 500; line-height: 20px;
  color: var(--c-text-2);
  transition: color .15s;
}
.simple-nav-link:hover { color: var(--c-brand); text-decoration: none; }
.simple-nav-link.is-active { color: var(--c-brand); font-weight: 600; }

.simple-nav-children {
  margin: 2px 0 6px;
  padding-left: 14px;
  border-left: 1px solid var(--c-divider);
}
.simple-nav-link.child-link {
  padding: 5px 0;
  font-size: 13px; font-weight: 400;
  color: var(--c-text-3);
}
.simple-nav-link.child-link:hover { color: var(--c-brand); }
.simple-nav-link.child-link.is-active { color: var(--c-brand); font-weight: 600; }

/* ---------------------------------------------------------------- 正文列 */

.reading-column {
  min-width: 0;
  padding: 32px 48px 96px;
}
.article, .reading-header { max-width: var(--content-width); margin: 0 auto; }

.reading-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}

.breadcrumbs { font-size: 13px; color: var(--c-text-3); }
.breadcrumbs a { color: var(--c-text-3); font-weight: 400; }
.breadcrumbs a:hover { color: var(--c-brand); }
.breadcrumbs .separator { margin: 0 6px; color: var(--c-text-4); }

.copy-button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--c-text-2);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-divider); border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.copy-button:hover { color: var(--c-brand); border-color: var(--c-brand); }

/* 文章头 */

.article-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--c-brand);
  margin-bottom: 10px;
}
.article-kicker:empty { display: none; }

.article h1 {
  margin: 0;
  font-size: 32px; font-weight: 600; line-height: 40px;
  letter-spacing: -0.02em;
  color: var(--c-text-1);
}

.article-lede {
  margin: 14px 0 0;
  font-size: 16px; line-height: 26px;
  color: var(--c-text-2);
}
.article-lede:empty { display: none; }

.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.filter-row:empty { display: none; }
.filter-chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px; font-weight: 500;
  color: var(--c-text-3);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-divider); border-radius: 12px;
}

.article-rule {
  height: 1px; margin: 28px 0 0;
  background: var(--c-divider);
}

/* ---------------------------------------------------------------- 正文排版 */

.article-body { font-size: 16px; line-height: 28px; color: var(--c-text-1); }

.article-body h2 {
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--c-divider);
  font-size: 24px; font-weight: 600; line-height: 32px;
  letter-spacing: -0.02em;
}
.article-body h2:first-child { margin-top: 24px; }

.article-body h3 {
  margin: 32px 0 0;
  font-size: 20px; font-weight: 600; line-height: 28px;
  letter-spacing: -0.01em;
}
.article-body h4 {
  margin: 24px 0 0;
  font-size: 17px; font-weight: 600;
}

.article-body p { margin: 16px 0; }

.article-body strong { font-weight: 600; color: var(--c-text-1); }

.article-body ul, .article-body ol { margin: 16px 0; padding-left: 1.35rem; }
.article-body li { margin: 8px 0; }
.article-body li > ul, .article-body li > ol { margin: 8px 0; }

.article-body blockquote {
  margin: 16px 0;
  padding-left: 16px;
  border-left: 2px solid var(--c-divider);
  color: var(--c-quote);
}
.article-body blockquote p { margin: 8px 0; }
.article-body blockquote > p:first-child { margin-top: 0; }
.article-body blockquote > p:last-child { margin-bottom: 0; }

.article-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--c-divider); }

.article-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 3px 6px; border-radius: 4px;
  background: var(--c-bg-mute);
  color: #476582;
}
.article-body pre {
  margin: 16px 0; padding: 16px;
  overflow-x: auto;
  background: var(--c-bg-alt);
  border-radius: 8px;
  font-size: 14px; line-height: 1.6;
}
.article-body pre code { padding: 0; background: none; color: inherit; }

.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }

/* 表格：窄屏可横向滚动 */
.article-body table {
  display: block; width: max-content; max-width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.article-body th, .article-body td {
  padding: 8px 16px;
  border: 1px solid var(--c-divider);
  text-align: left; line-height: 24px;
}
.article-body th {
  background: var(--c-bg-alt);
  font-weight: 600; font-size: 14px;
}
.article-body tr:nth-child(2n) td { background: var(--c-bg-alt); }

/* 双链 */
.wikilink { font-weight: 500; }
.wikilink.is-missing {
  color: var(--c-text-4);
  border-bottom: 1px dashed var(--c-text-4);
  cursor: help;
}

/* 提示框 —— 对应 markdown 里的 ::: tip / warning / danger / quote */
.custom-block {
  margin: 20px 0;
  padding: 16px 16px 8px;
  border-radius: 8px;
  border-left: 4px solid var(--c-tip);
  background: var(--c-tip-bg);
  font-size: 15px; line-height: 26px;
  color: var(--c-text-1);
}
.custom-block-title {
  margin-bottom: 6px;
  font-weight: 600; font-size: 14px;
  color: var(--c-tip);
}
.custom-block p { margin: 8px 0; }
.custom-block ul, .custom-block ol { margin: 8px 0; }
.custom-block a { font-weight: 600; }

.custom-block.warning { border-left-color: var(--c-warning); background: var(--c-warning-bg); }
.custom-block.warning .custom-block-title { color: var(--c-warning); }
.custom-block.danger  { border-left-color: var(--c-danger);  background: var(--c-danger-bg); }
.custom-block.danger  .custom-block-title { color: var(--c-danger); }
.custom-block.quote   { border-left-color: var(--c-border);  background: var(--c-bg-alt); }
.custom-block.quote   .custom-block-title { color: var(--c-text-3); }
.custom-block.info    { border-left-color: var(--c-text-3);  background: var(--c-bg-alt); }
.custom-block.info    .custom-block-title { color: var(--c-text-2); }
/* 存疑块：内容与原始资料有出入、等待交叉验证。用醒目的琥珀色 + 虚线边，
   和普通 warning 区分开——warning 是「注意这个知识点」，check 是「这里可能是错的」。*/
.custom-block.check {
  border-left-color: #c2410c;
  border-top: 1px dashed #fdba74;
  border-right: 1px dashed #fdba74;
  border-bottom: 1px dashed #fdba74;
  background: #fff7ed;
}
.custom-block.check .custom-block-title { color: #c2410c; }
.custom-block.check .custom-block-title::before { content: "🔍 "; }

/* 校勘记录页 */
.check-origin { margin: 4px 0 12px; font-size: 13px; color: var(--c-text-3); }

/* 案例块：这套内容里案例极多，给它一个和提示框不同的绿色标识 */
.custom-block.case    { border-left-color: #3a9a5c; background: #f2f9f4; }
.custom-block.case    .custom-block-title { color: #2f7d4a; }

/* 来源区块 */
#sources { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-divider); }
#sources h2 { margin: 0 0 16px; padding: 0; border: 0; font-size: 20px; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-divider);
  font-size: 14px; line-height: 22px;
}
.source-item:last-child { border-bottom: 0; }
.source-item .meta-label {
  flex-shrink: 0;
  padding: 2px 8px; border-radius: 4px;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  font-size: 12px; font-weight: 600;
}
.source-item strong { font-weight: 600; }
.source-item code {
  width: 100%;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--c-text-4); background: none; padding: 0;
  word-break: break-all;
}

/* ---------------------------------------------------------------- 页内目录 */

.toc {
  position: sticky; top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 36px 24px 96px 8px;
}
.toc-label {
  margin-bottom: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--c-text-1);
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0; }
.toc-list a {
  display: block; padding: 4px 0;
  font-size: 13px; font-weight: 400; line-height: 20px;
  color: var(--c-text-3);
  transition: color .15s;
}
.toc-list a:hover { color: var(--c-brand); text-decoration: none; }
.toc-list a.is-current { color: var(--c-brand); font-weight: 500; }

/* ---------------------------------------------------------------- 搜索结果 */

.search-overlay {
  position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.28);
  overflow-y: auto;
  padding: 24px 16px 64px;
}
.search-overlay[hidden] { display: none; }
.search-results {
  max-width: 640px; margin: 0 auto;
  background: var(--c-bg);
  border: 1px solid var(--c-divider); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.node-card {
  display: block; padding: 12px 16px;
  border-bottom: 1px solid var(--c-divider);
  font-weight: 400;
}
.node-card:last-child { border-bottom: 0; }
.node-card:hover { background: var(--c-bg-alt); text-decoration: none; }
.node-card-title { font-size: 15px; font-weight: 600; color: var(--c-text-1); }
.node-card-meta { margin-top: 3px; font-size: 12px; color: var(--c-text-4); }
.empty-state { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--c-text-4); }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 90;
  transform: translate(-50%, 12px);
  padding: 10px 20px; border-radius: 8px;
  background: var(--c-text-1); color: #fff;
  font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 移动端 */

.mobile-toolbar { display: none; }

@media (max-width: 1280px) {
  .workspace { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .toc { display: none; }
  .reading-column { padding: 32px 40px 96px; }
}

@media (max-width: 960px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .global-search { max-width: none; }
  .global-search kbd { display: none; }

  .workspace { grid-template-columns: minmax(0, 1fr); }

  .mobile-toolbar {
    display: block;
    position: sticky; top: var(--nav-height); z-index: 50;
    padding: 8px 16px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-divider);
  }
  .mobile-nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    font-family: inherit; font-size: 14px; font-weight: 500;
    color: var(--c-text-2);
    background: var(--c-bg-alt);
    border: 1px solid var(--c-divider); border-radius: 8px;
    cursor: pointer;
  }

  .library-panel {
    display: none;
    position: fixed; top: calc(var(--nav-height) + 45px); left: 0; right: 0; bottom: 0;
    z-index: 55;
    height: auto;
    border-right: 0;
  }
  .library-panel.is-open { display: block; }

  .reading-column { padding: 24px 16px 80px; }
  .article h1 { font-size: 26px; line-height: 34px; }
  .article-body h2 { font-size: 21px; margin-top: 40px; }
  .reading-header { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- 打印 */

@media print {
  .topbar, .library-panel, .toc, .mobile-toolbar, .reading-actions { display: none; }
  .workspace { grid-template-columns: 1fr; padding-top: 0; }
  .reading-column { padding: 0; }
}

/* ---------------------------------------------------------- 插图 */
.fig {
  margin: 24px 0;
  padding: 0;
}
.fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--vp-c-divider, #e2e2e3);
  border-radius: 8px;
  background: #fff;
}
.fig figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--vp-c-text-2, rgba(60, 60, 67, .78));
  text-align: center;
}
.custom-block .fig { margin: 16px 0; }
.img-missing {
  padding: 12px 16px;
  border: 1px dashed #f0a4a4;
  border-radius: 6px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 14px;
}

/* 判断链库：分区内按数据层再分一级小标题 */
.simple-nav-grouplabel {
  margin: 10px 0 2px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--c-text-3); opacity: .75;
}
.simple-nav-grandchildren {
  padding-left: 10px;
  border-left: 1px dashed var(--c-divider);
}
.simple-nav-grandchildren .simple-nav-link.child-link { padding: 4px 0; font-size: 12.5px; }

/* 宽页模式：数据表页用，正文列加宽以容纳多列表格 */
.article.is-wide { max-width: min(1500px, calc(100vw - 96px)); }
.article.is-wide .reading-header { max-width: none; }
/* 表格列不再被挤成竖条：给单元格最小宽度，超出则整表横向滚动 */
.article-body td, .article-body th { min-width: 4.5em; }
.article-body td { max-width: 34em; }
.article-body table { scrollbar-width: thin; }


/* ── 顶栏与主站一致（2026-09-05 用户）：导航居中、搜索下沉到二级行 ──────────── */
.topbar-app { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-app::-webkit-scrollbar { display: none; }
.topbar-app a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 8px; color: var(--c-text-2); font-size: 14px; text-decoration: none;
  white-space: nowrap; transition: background .15s, color .15s;
}
.topbar-app a:hover { background: var(--c-bg-soft); color: var(--c-brand); }
.topbar-app a.is-active { color: var(--c-brand); font-weight: 600; }
/* 站名不占顶栏（2026-09-05 用户）：顶栏只剩导航，居中铺满；站名在二级面包屑与左侧目录里 */
.topbar { justify-content: center; }

/* 搜索框下沉到面包屑那一行 */
.reading-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.reading-actions .global-search { position: static; width: min(320px, 42vw); height: 34px; margin: 0; }
.reading-actions .global-search input { height: 34px; font-size: 13px; }
@media (max-width: 1100px) { .topbar-app { justify-content: center; } }
@media (max-width: 860px) {
  .topbar-app a:nth-child(n+4) { display: none; }
  .reading-actions .global-search { width: 180px; }
}

/* 付费章节的锁标（2026-09-05）：标题露出来、内容锁住 */
.nav-lock { display:inline-block; margin-left:6px; padding:0 5px; border-radius:4px;
  background:var(--c-bg-mute); color:var(--c-text-3); font-size:10px; line-height:16px; vertical-align:1px; }
.simple-nav-link.is-paid { color:var(--c-text-3); }
.simple-nav-link.is-paid:hover { color:var(--c-brand); }
.simple-nav-link.is-paid.is-active { color:var(--c-brand); }

/* 取象词条卡（2026-09-05）：原来是课程字卡截图，现在把词条排成标签。
   截图看着像别人的笔记，而且不能搜索、不能选中、手机上还糊。 */
.term-card { margin: 18px 0; padding: 14px 16px; border-radius: 10px;
  background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line, #e6e8ec); }
.term-card-title { margin: 0 0 10px; font-size: 13px; font-weight: 600;
  color: var(--ink-mid, #5a6070); letter-spacing: .03em; }
.term-list { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.term-list .term { display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line, #e6e8ec);
  color: var(--ink, #2c3040); font-size: 13px; line-height: 1.5; }
@media (max-width: 640px) { .term-card { padding: 12px 13px; } .term-list .term { font-size: 12.5px; } }

/* 案例章目录带三级标题（本命盘／大限／流年／小限各步），2026-09-06 */
.toc-list li.toc-sub a { padding-left: 14px; font-size: 12px; opacity: .85; }

/* 页尾上一页／下一页（2026-09-06） */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 8px; padding-top: 18px; border-top: 1px solid var(--c-border, #e5e7eb); }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--c-border, #e5e7eb); border-radius: 10px; text-decoration: none; color: var(--c-text, #111); }
.pager a:hover { border-color: var(--c-brand); color: var(--c-brand); text-decoration: none; }
.pager a small { font-size: 12px; color: var(--c-text-3, #6b7280); }
.pager .pager-next { text-align: right; align-items: flex-end; }
.pager .is-empty { display: block; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } }

/* 线上顶栏登录态（2026-09-06）：与应用头部同一组项 */
.topbar-account { position: relative; display: flex; align-items: center; gap: 8px; margin-left: 8px; flex: 0 0 auto; }
.kb-auth { padding: 6px 12px; border: 1px solid var(--c-border, #e5e7eb); border-radius: 999px; font-size: 13px; color: var(--c-text, #111); text-decoration: none; white-space: nowrap; }
.kb-auth-primary { background: var(--c-brand, #224aa6); border-color: var(--c-brand, #224aa6); color: #fff; }
.kb-user { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--c-border, #e5e7eb); border-radius: 999px; background: #fff; font-size: 13px; color: var(--c-text, #111); cursor: pointer; white-space: nowrap; }
.kb-points { padding: 2px 8px; border-radius: 999px; background: #eef2fb; color: var(--c-brand, #224aa6); font-size: 12px; }
.kb-dropdown { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 160px; display: grid; padding: 6px; background: #fff; border: 1px solid var(--c-border, #e5e7eb); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.kb-dropdown a, .kb-dropdown button { display: block; padding: 9px 12px; border: 0; background: transparent; color: var(--c-text, #111); font-size: 14px; text-align: left; text-decoration: none; border-radius: 6px; cursor: pointer; }
.kb-dropdown a:hover, .kb-dropdown button:hover { background: #f5f5f7; }
.kb-dd-divider { display: block; height: 1px; margin: 4px 0; background: var(--c-border, #e5e7eb); }
@media (max-width: 640px) { .kb-user-name { display: none; } }

.kb-pro { border-color:#e2c26a; background:#fff8e6; color:#5a3d00; }
.kb-pro-badge { margin-left:4px; background:#f3d27a; color:#5a3d00; }
