/* 默认皮肤 v0.3.0:像素级对齐 bgrdh(OneNav onenav2 mini-sidebar 形态)。
   全部数值来自 onenav-style.css 实测 token(见 doc-20260706-skin-pixel-01 §2),手写实现。 */
:root {
  --luopan-primary: #1e73be;
  --op-body-bg: #f9f9f9;
  --op-body-fg: #282a2d;
  /* 白天侧栏 = OneNav io-grey-mode 实测:底 #f0f2f4、字 #515C6B、hover 主色 */
  --op-side-bg: #f0f2f4;
  --op-side-fg: #515C6B;
  --op-side-strong: #333;
  --op-side-hover-bg: rgba(136, 136, 136, .14);
  --op-side-split: rgba(0, 0, 0, .08);
  --op-header-h: 74px;
  --op-rail-w: 60px;
  --op-card-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3);
}
[data-bs-theme="dark"] {
  --op-body-bg: #16181c;
  --op-body-fg: #c9ccd1;
  /* 夜间侧栏 = OneNav 深色形态 */
  --op-side-bg: #202225;
  --op-side-fg: #b2b8be;
  --op-side-strong: #fff;
  --op-side-hover-bg: rgba(136, 136, 136, .18);
  --op-side-split: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--op-body-bg);
  color: var(--op-body-fg);
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  transition: background-color .3s;
}
a { text-decoration: none; color: inherit; }
.text-primary, .link-primary { color: var(--luopan-primary) !important; }
.btn-primary {
  --bs-btn-bg: var(--luopan-primary);
  --bs-btn-border-color: var(--luopan-primary);
  --bs-btn-hover-bg: color-mix(in srgb, var(--luopan-primary) 85%, black);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--luopan-primary) 85%, black);
}
.btn-outline-primary {
  --bs-btn-color: var(--luopan-primary);
  --bs-btn-border-color: var(--luopan-primary);
  --bs-btn-hover-bg: var(--luopan-primary);
  --bs-btn-hover-border-color: var(--luopan-primary);
}

/* ============ 左侧图标栏(OneNav mini-sidebar:60px,不展开) ============ */
.sidebar-inner {
  width: 100%; height: 100%;
  background: var(--op-side-bg);
  display: flex; flex-direction: column;
  transition: background-color .3s;
}
.side-logo {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--op-header-h); line-height: var(--op-header-h);
  color: var(--op-side-strong);
}
.side-logo img { max-height: 40px; max-width: 40px; border-radius: 8px; }
.side-logo-text {
  width: 36px; height: 36px; line-height: 36px; text-align: center;
  background: var(--luopan-primary); color: #fff; font-weight: 700; border-radius: 8px;
}
.side-logo-name { display: none; margin-left: 10px; color: var(--op-side-strong); font-weight: 600; }
.side-tree { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 6px 0; scrollbar-width: none; }
.side-tree::-webkit-scrollbar { display: none; }
/* 父分类行尾箭头:整行点击 = 定位 + 展开/收起(合并动作);.open 旋转 90° */
.tree-arrow { margin-left: auto; font-size: .7rem; opacity: .6; transition: transform .25s; }
.tree-top.open .tree-arrow { transform: rotate(90deg); }
.side-tree .tree-top,
.side-tree .tree-children a,
.side-bottom a {
  display: flex; align-items: center; overflow: hidden;
  padding: 8px 10px; margin: 1.5px 8px;
  color: var(--op-side-fg); border-radius: 6px;
  white-space: nowrap; transition: all .3s;
}
.side-tree .tree-top:hover, .side-tree .tree-children a:hover, .side-bottom a:hover {
  color: var(--luopan-primary); background: var(--op-side-hover-bg);
}
.side-tree i, .side-bottom i { font-size: 1.15rem; flex: none; width: 24px; text-align: center; }
.side-tree span, .side-bottom span { margin-left: 8px; }
.side-bottom { padding-bottom: 10px; }
.tree-children { background: rgba(136, 136, 136, .05); border-radius: 6px; margin: 0 8px; }
.tree-children a { padding-left: 34px; font-size: .82rem; margin: 0 !important; }
/* 展开态/移动端抽屉:子分类缩进,层级清晰(排除折叠态 hover 弹层 .rail-pop) */
.tree-children:not(.rail-pop) {
  background: transparent; border-radius: 0;
  margin: 2px 10px 8px 26px; padding-left: 8px;
}
.tree-children:not(.rail-pop) a { padding: 6px 10px; font-size: .84rem; }
.pop-title { display: none; }
.side-split { border-bottom: 1px solid var(--op-side-split); margin: 6px 14px; }

/* 桌面默认 60px 图标态(bgrdh mini 同款);html.side-expanded = 展开 220px */
@media (min-width: 992px) {
  .sidebar-nav {
    position: fixed; top: 0; left: 0; z-index: 1081;
    /* BS .offcanvas-lg 在 ≥lg 带 width/height:auto!important,必须同级压回 */
    width: var(--op-rail-w) !important; height: 100vh !important;
    visibility: visible !important; transform: none !important;
    transition: width .3s;
  }
  .main-content { margin-left: var(--op-rail-w); transition: margin-left .3s; }
  .page-header { left: var(--op-rail-w); transition: left .3s, background-color .3s; }
  /* mini 态隐藏文字/箭头/子级,图标居中 */
  .side-tree span, .side-bottom span, .side-logo-name, .tree-arrow, .side-tree .tree-children { display: none; }
  .side-tree .tree-top, .side-bottom a { justify-content: center; padding: 9px 0; }
  .side-tree i, .side-bottom i { width: auto; }
  /* 展开态(左上角按钮切换,localStorage 记忆) */
  html.side-expanded .sidebar-nav { width: 220px !important; }
  html.side-expanded .main-content { margin-left: 220px; }
  html.side-expanded .page-header { left: 220px; }
  html.side-expanded .side-tree span, html.side-expanded .side-bottom span,
  html.side-expanded .side-logo-name, html.side-expanded .tree-arrow { display: inline-flex; }
  html.side-expanded .side-tree .tree-children { display: block; }
  html.side-expanded .side-tree .tree-children:not(.show):not(.collapsing) { display: none; }
  html.side-expanded .side-tree .tree-top, html.side-expanded .side-bottom a { justify-content: flex-start; padding: 8px 10px; }
  html.side-expanded .side-tree i, html.side-expanded .side-bottom i { width: 24px; }

  /* mini 态 popup 子菜单改用 JS 加 .rail-pop(fixed 定位),见下方 —— 逃出 .side-tree overflow 裁剪 */
}

/* 收起态 hover 弹出的 popup:.side-tree 有 overflow,absolute 会被裁,故用 fixed(top 由 JS 按 item 位置算) */
.side-tree .tree-children.rail-pop {
  display: block !important;
  position: fixed; left: var(--op-rail-w);
  min-width: 184px; max-height: 80vh; overflow-y: auto;
  margin: 0; padding: 0 0 6px;
  background: var(--op-side-bg);
  border-radius: 0 8px 8px 0;
  box-shadow: 8px 6px 22px rgba(0, 0, 0, .22);
  z-index: 1090;
}
.side-tree .tree-children.rail-pop .pop-title {
  display: block; color: var(--op-side-strong); font-weight: 600; font-size: .875rem;
  background: var(--op-side-hover-bg); padding: 12px 16px; margin-bottom: 4px;
}
.side-tree .tree-children.rail-pop a { padding: 10px 16px; font-size: .855rem; justify-content: flex-start; }
/* mini 态 .side-tree span{display:none} 会连 popup 子项文字一起藏掉,这里在浮层里重新显示 */
.side-tree .tree-children.rail-pop a span { display: inline; margin-left: 0; }
/* 移动端:Bootstrap offcanvas 抽屉(220px,子级经箭头展开) */
.sidebar-nav.offcanvas-lg { --bs-offcanvas-width: 220px; background: var(--op-side-bg); }
@media (max-width: 991.98px) {
  .main-content { margin-left: 0; }
  .page-header { left: 0; }
}

/* ============ 固定顶栏(74px,白底特征阴影) ============ */
.page-header {
  position: fixed; top: 0; right: 0; z-index: 1030;
  height: var(--op-header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: var(--bs-body-bg);
  box-shadow: 0 0 25px 5px rgba(10, 10, 10, .05);
  transition: background-color .3s;
}
.topbar-btn { border: 0; font-size: 1.25rem; color: var(--op-body-fg); padding: 4px 8px; }
/* 顶部菜单(独立于左侧分类树;settings.top_menu 配置,部分项 hover 弹下拉)。
   不设 overflow —— 否则会裁掉向下弹出的 .top-dropdown(项少,桌面不溢出)。 */
.top-menu { display: flex; align-items: center; }
.top-item { position: relative; }
.top-item > a {
  display: flex; align-items: center; gap: 6px; height: var(--op-header-h);
  padding: 0 12px; white-space: nowrap; color: var(--op-body-fg); font-size: .9rem;
}
.top-item > a > .bi:first-child { font-size: 1rem; color: var(--luopan-primary); }
/* 图片图标(icon 值为 URL 时,_icon 模板渲染 <img>):em 单位随所在字号自适应,各处菜单通用 */
.menu-ico-img { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -0.2em; border-radius: 3px; }
/* emoji 图标:系统自带彩色 emoji 字体直出,零内置成本 */
.ico-emoji { font-style: normal; font-size: 1.08em; line-height: 1; vertical-align: -0.08em; }

/* 彩色图标字体(io-*)已内置:见 assets/vendor/iconfont/(7 个 woff2 共 ~18KB,
   COLR/CPAL 自带配色)。类名清单在同目录 icons.json,供 admin 的图标选择器读取。
   用法:分类/菜单的 icon 字段填 io-xxx 即可。 */
.top-item > a:hover { color: var(--luopan-primary); }
.top-caret { font-size: .62rem !important; opacity: .55; color: inherit !important; transition: transform .2s; }
.top-item.has-sub:hover .top-caret { transform: rotate(180deg); }
/* 下拉浮层(page-header 不裁剪,absolute 即可) */
.top-dropdown {
  position: absolute; top: calc(var(--op-header-h) - 10px); left: 8px;
  min-width: 170px; padding: 6px 0;
  background: var(--bs-body-bg);
  border: 1px solid var(--op-side-split); border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 1040;
}
.top-item.has-sub:hover > .top-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.top-dropdown a {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px;
  color: var(--op-body-fg); font-size: .875rem; white-space: nowrap;
}
.top-dropdown a .bi { color: var(--luopan-primary); font-size: .95rem; }
.top-dropdown a:hover { background: var(--op-side-hover-bg); color: var(--luopan-primary); }
.top-search {
  display: flex; align-items: center; gap: 6px;
  background: rgba(128, 128, 128, .1); border-radius: 50px; padding: 6px 14px;
}
.top-search i { color: #888; font-size: .9rem; }
.top-search input { border: 0; background: transparent; outline: 0; width: 130px; font-size: .85rem; color: inherit; }

.main-content { display: flex; flex-direction: column; min-height: 100vh; }
.page-body { flex: 1 1 auto; padding: calc(var(--op-header-h) + 16px) 20px 20px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ============ 公告 / 首屏搜索区 ============ */
.announce {
  background: rgba(255, 193, 7, .12); border: 1px solid rgba(255, 193, 7, .3);
  color: #8a6d1a; border-radius: 6px; padding: 8px 14px; font-size: .82rem; margin-bottom: 16px;
}
[data-bs-theme="dark"] .announce { color: #e3c96b; }
/* 首屏搜索 banner(OneNav big-header-banner 同款):全宽铺到顶、透明顶栏叠在星空上 */
.search-hero.hero-banner {
  position: relative; overflow: hidden;
  margin: 0; border-radius: 0;
  background: #110E19; text-align: center;
  padding: calc(var(--op-header-h) + 58px) 16px 84px;
  min-height: 440px;
  display: flex; align-items: center; justify-content: center;
}
body.has-hero .page-body { padding-top: 20px; }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; width: 100%; }
/* 顶栏透明态(首屏未滚动):白字浮于星空,滚动后回落白底(JS 加 body.header-bg) */
body.has-hero:not(.header-bg) .page-header { background: transparent; box-shadow: none; }
/* 只把顶级菜单项变白;下拉浮层是白底面板,其链接保持深色不受影响 */
body.has-hero:not(.header-bg) .top-item > a,
body.has-hero:not(.header-bg) .top-item > a > .bi:first-child,
body.has-hero:not(.header-bg) .topbar-btn { color: #eee; }
body.has-hero:not(.header-bg) .top-item > a:hover { color: #fff; }
body.has-hero:not(.header-bg) .top-search { background: rgba(255, 255, 255, .16); }
body.has-hero:not(.header-bg) .top-search input { color: #fff; }
body.has-hero:not(.header-bg) .top-search input::placeholder { color: rgba(255, 255, 255, .6); }
body.has-hero:not(.header-bg) .top-search i { color: rgba(255, 255, 255, .7); }
/* 分组 tab:白字 + 选中短下划线(bgrdh 同款,非胶囊) */
.hero-banner .slider-pills { background: transparent; border: 0; gap: 24px; margin-bottom: 18px; }
.hero-banner .slider-pills .nav-link {
  position: relative; height: auto; line-height: 1.7; padding: 2px;
  font-size: 15px; color: rgba(255, 255, 255, .72);
  background: transparent !important; box-shadow: none !important;
}
.hero-banner .slider-pills .nav-link:hover { color: #fff; }
.hero-banner .slider-pills .nav-link.active { color: #fff; font-weight: 600; }
.hero-banner .slider-pills .nav-link.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -5px; width: 22px; height: 3px; border-radius: 2px; background: #fff;
}
.hero-search {
  background: rgba(0, 0, 0, .6) !important;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50px !important; box-shadow: none !important;
}
.hero-search .search-input { color: #fff; padding: 9px 20px; }
.hero-search .search-input::placeholder { color: rgba(255, 255, 255, .55); }
.hero-search .search-btn { color: rgba(255, 255, 255, .75); }
.hero-search .search-btn:hover { color: #fff; }
/* 下排引擎列表(bgrdh search-group 同款:分组切换后展示组内站点) */
.engine-list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 2px 4px; margin: 12px 0 0; padding: 0; list-style: none;
}
.engine-list button {
  border: 0; background: transparent;
  color: rgba(255, 255, 255, .55); font-size: .8rem;
  padding: 3px 11px; border-radius: 20px; transition: .2s;
}
.engine-list button:hover { color: #fff; }
.engine-list button.active { color: #fff; background: transparent; font-weight: 600; }

/* 我的导航 / 最近使用(同区双 tab + 编辑模式 + 「+」添加卡,bgrdh 同款) */
.local-section .cards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.local-card .url-body { padding: 8px 10px; }
.local-card .card-ico { width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; }
.local-card .card-name { font-size: .85rem; font-weight: 500; }
.local-add .url-body {
  justify-content: center; cursor: pointer;
  border: 1px dashed rgba(128, 128, 128, .45);
  background: transparent; box-shadow: none;
  color: #999; font-size: 1.15rem; min-height: 44px;
}
.local-add .url-body:hover {
  transform: none; box-shadow: none;
  color: var(--luopan-primary); border-color: var(--luopan-primary);
}
.local-del {
  position: absolute; top: -7px; right: -7px; z-index: 3;
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #f1404b; color: #fff; font-size: 13px; line-height: 1;
  display: none; align-items: center; justify-content: center;
}
.local-section.editing .local-del { display: flex; }
.local-section.editing .local-add { display: none; }
.local-empty { padding: 18px 0; font-size: .82rem; }

.search-hero { padding: 34px 0 30px; }
.engine-tabs { justify-content: center; margin-bottom: 16px; gap: 0; }
/* 胶囊滑块 tab(slider_menu 同款):容器浅胶囊 + active 主色圆胶囊 */
.slider-pills, .slider-tab {
  display: inline-flex; list-style: none; padding: 0; margin: 0;
  /* Bootstrap 的 .nav 自带 flex-wrap:wrap —— 不覆盖的话 tab 会换成多行,
     下面的 overflow-x 就永远不触发(内容换行了就不溢出)。单行 + 横向滚动靠这一条。 */
  flex-wrap: nowrap;
  background: rgba(0, 0, 0, .1); border-radius: 50px; border: 3px solid transparent;
}
/* 单行滚动时不许压缩/断字,否则窄屏下 tab 会被挤成竖排文字 */
.slider-pills .nav-item, .slider-tab .nav-item { flex: 0 0 auto; }
[data-bs-theme="dark"] .slider-pills, [data-bs-theme="dark"] .slider-tab { background: rgba(255, 255, 255, .08); }
.slider-pills .nav-link, .slider-tab .nav-link {
  height: 28px; line-height: 28px; padding: 0 14px;
  font-size: 14px; color: #888; border: 0; border-radius: 100px;
  background: transparent; transition: .25s; white-space: nowrap;
}
/* 分区 tab 与本地分区(我的导航/最近使用)统一走 28px 基准,不再放大 */
.slider-pills .nav-link:hover, .slider-tab .nav-link:hover { color: var(--luopan-primary); }
.slider-pills .nav-link.active, .slider-tab .nav-link.active {
  color: #fff; background: var(--luopan-primary);
  box-shadow: 0 5px 20px -3px color-mix(in srgb, var(--luopan-primary) 60%, transparent);
}
.search-box {
  max-width: 600px; margin: 0 auto; display: flex;
  background: #fff; border-radius: 3px;
  box-shadow: 0 3px 20px 0 rgba(0, 0, 0, .06);
}
[data-bs-theme="dark"] .search-box { background: #232529; }
.search-input {
  flex: 1 1 auto; height: 50px; padding: 12px;
  border: 0; outline: 0; background: transparent; font-size: 16px; color: inherit;
}
.search-btn {
  width: 68px; border: 0; background: transparent; color: #888;
  font-size: 1.1rem; cursor: pointer; transition: color .2s;
}
.search-btn:hover { color: var(--luopan-primary); }

/* ============ 分区与卡片(url-card 同款) ============ */
.cat-section { margin-bottom: 26px; scroll-margin-top: calc(var(--op-header-h) + 12px); }
/* 分区头两行(bgrdh 同款):标题一行,tab 胶囊条第二行——胶囊只包住 tab 本身,左对齐;超宽才横向滚动 */
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
/* 最大宽度 = 容器(即窗口)宽度;超出则横向滚动,底部常显细滚动条作为提示 */
.section-head .slider-tab {
  max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  /* 滚动条**常显**(原先隐藏,导致用户看不出这里能左右滑)。
     只在真的溢出时才出现 —— overflow-x:auto 自带这个判断,不用 JS。 */
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, .5) transparent;
  /* 滚动条画在 padding 盒底缘:padding-bottom 归零,条就紧跟在 tab 下方。
     但**保留 pill 那 3px 底边框** —— 去掉会让 tab 上下不对称(顶部有边距、底部没有),
     留着还能给滚动条外侧一点呼吸间距。 */
  padding-bottom: 0;
}
.section-head .slider-tab::-webkit-scrollbar { height: 5px; }
/* WebKit 一旦自定义了滚动条,两端会冒出箭头按钮(Windows Chrome 尤其明显),显式关掉 */
.section-head .slider-tab::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.section-head .slider-tab::-webkit-scrollbar-corner { background: transparent; }
.section-head .slider-tab::-webkit-scrollbar-track { background: transparent; }
.section-head .slider-tab::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, .5); border-radius: 10px;
}
.section-head .slider-tab:hover::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, .75); }
[data-bs-theme="dark"] .section-head .slider-tab {
  scrollbar-color: rgba(255, 255, 255, .35) transparent;
}
[data-bs-theme="dark"] .section-head .slider-tab::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); }
[data-bs-theme="dark"] .section-head .slider-tab:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .6); }
/* 本地分区(我的导航/最近使用)头仍为单行:tab 左 + 编辑右 */
.section-head.local-head { flex-direction: row; align-items: center; gap: 14px; }
.section-head.local-head .slider-tab { width: auto; }
.section-title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 1.125rem; font-weight: 600; color: #555;
}
[data-bs-theme="dark"] .section-title { color: #aaa; }
.section-title i { font-size: 1.333rem; color: var(--luopan-primary); }
.section-title a { color: inherit; }
.section-title a:hover { color: var(--luopan-primary); }
.tab-content { width: 100%; }

/* 宽屏一行 6 个(bgrdh 同款):min 190 → 1360 内容区排 6 列,卡片约 213px;窄屏自适应递减 */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

/* 友情链接分区(bgrdh 同款:白底圆角卡片,链接以 · 分隔、自动换行) */
.friend-card {
  background: var(--bs-body-bg); border-radius: 10px; padding: 14px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  display: flex; flex-wrap: wrap; align-items: center;
}
.friend-card a { color: #666; font-size: .875rem; white-space: nowrap; padding: 3px 0; }
[data-bs-theme="dark"] .friend-card a { color: #9aa2ab; }
.friend-card a:hover { color: var(--luopan-primary); }
.friend-card a:not(:last-child)::after { content: "·"; margin: 0 .6em; color: #ccc; }
[data-bs-theme="dark"] .friend-card a:not(:last-child)::after { color: #555; }
.url-card .url-body {
  /* 箭头尺寸/位置/间距集中在这几个变量;文字右间距由它们算出 —— 改大小不用手调 */
  --go-size: 13px;   /* 箭头直径 */
  --go-right: 6px;   /* 箭头 → 卡片右边缘(随箭头缩小一起收紧,原 10px 是 26px 箭头时定的) */
  --go-gap: 5px;     /* 文字 → 箭头 */
  --card-pad: 12px;  /* 卡片内边距,算文字让位时要扣掉 */
  position: relative; display: flex; align-items: center; gap: 10px;
  background: var(--bs-body-bg); border-radius: 8px; padding: var(--card-pad);
  will-change: transform; transition: all .3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.url-card .url-body:hover { transform: translateY(-6px); box-shadow: var(--op-card-shadow); }
.card-ico {
  flex: none; width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(128, 128, 128, .1);
  color: var(--luopan-primary); font-weight: 700; font-size: 1.05rem; overflow: hidden;
}
.card-ico img { width: 100%; height: 100%; object-fit: contain; }
/* 右侧箭头是 absolute(脱离文档流),文字必须自己让位,否则会压在箭头下面 */
.url-info {
  min-width: 0; flex: 1 1 auto; overflow: hidden;
  /* 箭头左边缘距卡片右边缘 = go-right + go-size;卡片自身已有 card-pad 的内缩,
     所以文字只需再让出「超出 card-pad 的那部分 + go-gap」,不是整个 go-right+go-size。
     原来漏扣 card-pad,导致文字被多推了 12px(看起来间距过大)。 */
  padding-right: calc(var(--go-size) + var(--go-right) + var(--go-gap) - var(--card-pad));
}
.card-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.card-name a { color: var(--op-body-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc {
  margin: 2px 0 0; font-size: .76rem; color: #888;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 卡片彩色徽标(推荐 / Hot / 新 …;配色类见 skin/badges.go 的 promoTagClass) */
.card-tag {
  flex: none; display: inline-flex; align-items: center;
  font-size: .6rem; font-weight: 700; line-height: 1; color: #fff;
  padding: .3em .45em; border-radius: .3rem; letter-spacing: .02em; white-space: nowrap;
}
.card-tag.tag-rec       { background: #f5455c; box-shadow: 0 1px 3px rgba(245, 69, 92, .35); }
.card-tag.tag-hot       { background: linear-gradient(135deg, #ff8a3d, #fa5a1e); box-shadow: 0 1px 3px rgba(250, 90, 30, .38); }
.card-tag.tag-new       { background: #22c55e; box-shadow: 0 1px 3px rgba(34, 197, 94, .35); }
.card-tag.tag-official  { background: #3b82f6; box-shadow: 0 1px 3px rgba(59, 130, 246, .35); }
.card-tag.tag-free      { background: #14b8a6; box-shadow: 0 1px 3px rgba(20, 184, 166, .35); }
.card-tag.tag-vip       { background: linear-gradient(135deg, #f5c451, #e0912f); box-shadow: 0 1px 3px rgba(224, 145, 47, .4); }
.card-tag.tag-exclusive { background: #8b5cf6; box-shadow: 0 1px 3px rgba(139, 92, 246, .35); }
.card-tag.tag-original  { background: #ec4899; box-shadow: 0 1px 3px rgba(236, 72, 153, .35); }
/* 直达角标:圆圈箭头(bgrdh 同款,常显淡色,hover 主色) */
.togo.card-go {
  position: absolute; top: 50%; right: var(--go-right); transform: translateY(-50%);
  width: var(--go-size); height: var(--go-size);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(128, 128, 128, .35); border-radius: 50%;
  color: var(--op-body-fg); font-size: .38rem;
  opacity: .45; transition: .25s; z-index: 2;
}
.url-card .url-body:hover .togo { opacity: .9; }
.togo:hover { color: var(--luopan-primary) !important; border-color: var(--luopan-primary); opacity: 1 !important; }

/* ============ 详情页 / 分类页 / 评论 ============ */
.breadcrumb { --bs-breadcrumb-margin-bottom: 0; font-size: .85rem; }
.breadcrumb a:hover { color: var(--luopan-primary); }
.card.border { background: var(--bs-body-bg); border-radius: 10px !important; border-color: rgba(128, 128, 128, .14) !important; }
.entry-head { display: flex; gap: 16px; align-items: flex-start; }
.entry-head .entry-ico {
  flex: none; width: 64px; height: 64px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700;
  background: rgba(128, 128, 128, .1); color: var(--luopan-primary); overflow: hidden;
}
.entry-head .entry-ico img { width: 100%; height: 100%; object-fit: contain; }
.entry-meta { color: #888; font-size: .85rem; }
/* 详情页信息卡:左大图标面板 + 右分类/标题/描述/标签(对齐 bgrdh 内页) */
.site-panel {
  background: rgba(128, 128, 128, .08); border-radius: 18px; padding: 28px 20px; text-align: center;
}
.site-panel-ico {
  width: 100%; max-width: 190px; aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 26px;
  background: var(--bs-body-bg); box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem; font-weight: 700; color: var(--luopan-primary); overflow: hidden;
}
.site-panel-ico img { width: 68%; height: 68%; object-fit: contain; }
.site-stats { display: flex; justify-content: center; gap: 30px; margin-top: 20px; }
.site-stat { display: inline-flex; align-items: center; gap: 8px; color: #888; font-size: .85rem; }
.site-stat i {
  width: 38px; height: 38px; border-radius: 50%; background: var(--bs-body-bg);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.site-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-cat {
  font-size: .78rem; padding: .26rem .62rem; border-radius: 6px;
  background: var(--luopan-primary); color: #fff; text-decoration: none; line-height: 1.5;
}
.badge-cat:hover { color: #fff; opacity: .86; }
.site-name { font-size: 1.8rem; font-weight: 700; margin: .7rem 0 .85rem; }
.site-sum { color: var(--bs-secondary-color); line-height: 1.95; margin-bottom: .9rem; }
.site-tags { color: #999; font-size: .85rem; }
.site-tags .tags-label { margin-right: .55rem; }
.site-tags .tag-item {
  margin-right: .9rem; color: var(--bs-secondary-color); text-decoration: none;
  border-bottom: 1px dashed rgba(128, 128, 128, .45);
}
.site-tags .tag-item:hover { color: var(--luopan-primary); border-bottom-color: var(--luopan-primary); }

/* 按钮组(对齐 bgrdh:浅灰胶囊 + 图标;反馈为红色图标按钮) */
.site-actions {
  /* 三个按钮统一高度。原先各自靠 padding + line-height 自然撑开,而红色那个是**纯图标**
     (字号 1.05rem)、文字按钮是 .95rem —— 两边各算各的,红色就高出一圈。 */
  --act-h: 42px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.5rem;
}
.site-actions .dropdown { display: inline-flex; }
.btn-act {
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--act-h);            /* 高度定死,不再由内容字号决定 */
  padding: 0 1.15rem; border: 0; border-radius: 10px;
  background: rgba(128, 128, 128, .13); color: var(--bs-body-color);
  font-size: .95rem; line-height: 1.5; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.btn-act:hover { background: rgba(128, 128, 128, .22); color: var(--bs-body-color); }
.btn-act i { font-size: .9rem; opacity: .65; }
/* 图标按钮:宽 = 高,正方形,与文字按钮等高 */
.btn-act-danger {
  background: #e23b3b; color: #fff;
  width: var(--act-h); padding: 0; justify-content: center;
}
.btn-act-danger:hover { background: #c92f2f; color: #fff; }
.btn-act-danger i { opacity: 1; font-size: 1.05rem; }
@media (max-width: 575.98px) {
  .site-panel { padding: 20px 14px; }
  .site-panel-ico { max-width: 130px; font-size: 2.4rem; }
  .site-name { font-size: 1.4rem; }
}

/* 移动端顶部居中 logo(img_16;桌面靠 .d-md-none 隐藏) */
.header-logo {
  display: inline-flex; align-items: center; gap: 6px;
  position: absolute; left: 50%; transform: translateX(-50%);
  font-weight: 700; font-size: .98rem; color: var(--op-body-fg); white-space: nowrap;
}
.header-logo img { height: 30px; width: auto; border-radius: 6px; }
body.has-hero:not(.header-bg) .header-logo { color: #fff; }

@media (max-width: 767.98px) {
  /* 星空矮一点,少占空间(img_16) */
  .search-hero.hero-banner { min-height: 300px; padding: calc(var(--op-header-h) + 22px) 14px 38px; }
  /* 导航卡片一行 2 个(原 minmax(190px) 在窄屏只排 1 个) */
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.entry-desc { border-top: 1px solid rgba(128, 128, 128, .15); margin-top: 18px; padding-top: 18px; }
.entry-desc h1, .entry-desc h2, .entry-desc h3 { font-size: 1.18rem; font-weight: 700; margin: 1.6em 0 .7em; }
.entry-desc h4, .entry-desc h5, .entry-desc h6 { font-size: 1.05rem; font-weight: 600; margin: 1.3em 0 .5em; }
.entry-desc img { max-width: 100%; }
.entry-desc a { color: var(--luopan-primary); text-decoration: none; word-break: break-all; }
.entry-desc a:hover { text-decoration: underline; }
#qr-box { display: flex; justify-content: center; padding: 12px; }
.comment-item { border-bottom: 1px solid rgba(128, 128, 128, .12); padding: 12px 0; }
.comment-item:last-child { border-bottom: 0; }
.comment-nick { font-weight: 600; font-size: .9rem; }
.comment-time { color: #999; font-size: .75rem; }

/* 评论表单(img_17:头像 + 大 textarea + 昵称|邮箱 + 右下按钮) */
.comment-card { border: 1px solid var(--bs-border-color); border-radius: 12px; }
.comment-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: #e9ecef; color: #aab0b6; font-size: 1.35rem;
}
.comment-form .form-control { background: #f4f5f7; border: 1px solid transparent; border-radius: 8px; }
.comment-form .form-control:focus { background: #fff; border-color: rgba(30, 115, 190, .4); box-shadow: 0 0 0 .18rem rgba(30, 115, 190, .12); }
.comment-textarea { min-height: 96px; resize: vertical; }
[data-bs-theme="dark"] .comment-avatar { background: #333; color: #777; }
[data-bs-theme="dark"] .comment-form .form-control { background: #2a2a2e; }
[data-bs-theme="dark"] .comment-form .form-control:focus { background: #232326; }
.page-title { font-size: 1.25rem; font-weight: 600; }

/* ============ 悬浮工具 / 页脚 / 通用 ============ */
.floating-tools { position: fixed; right: 18px; bottom: 24px; z-index: 1030; }
.tool-btn {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bs-body-bg); color: var(--op-body-fg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .13);
}
.tool-btn:hover { color: var(--luopan-primary); }
.site-footer {
  margin-top: 10px; padding: 22px 20px 26px;
  text-align: center; color: #999; font-size: 12px;
}
.site-footer a { color: #999; }
.site-footer a:hover { color: var(--luopan-primary); }
.footer-links a + a::before {
  content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 .5em;
  border-radius: 50%; background: #888; opacity: .3; vertical-align: .2em;
}
.empty-state { color: #888; text-align: center; padding: 48px 0; }
.not-found { text-align: center; padding: 70px 0; }
.not-found h1 { font-size: 64px; color: var(--luopan-primary); margin: 0; }

/* 验证码弹窗(SEC:触发式,点提交后才出现) */
.cap-modal[hidden] { display: none; }
.cap-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.cap-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.cap-dialog {
  position: relative; width: 340px; max-width: calc(100vw - 24px);
  background: var(--bs-body-bg); color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 16px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .35);
}
.cap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cap-title { font-size: 14px; font-weight: 600; }
.cap-x { border: 0; background: none; font-size: 22px; line-height: 1; color: #999; cursor: pointer; padding: 0 4px; }
.cap-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* math:算术题 */
.captcha-widget .captcha-img {
  height: 46px; width: 130px; border: 1px solid var(--bs-border-color);
  border-radius: 6px; cursor: pointer; background: #f2f3f7; flex: 0 0 auto;
}
.captcha-widget .captcha-code { max-width: 130px; }
.captcha-widget .captcha-row { flex-wrap: wrap; }

/* gocaptcha:中文点选 */
.captcha-click .gc-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.captcha-click .gc-thumb { height: 34px; width: auto; border: 1px solid var(--bs-border-color); border-radius: 4px; background: #fff; }
.captcha-click .gc-count { font-size: 12px; color: var(--luopan-primary); }
.captcha-click .gc-stage { position: relative; display: inline-block; line-height: 0; max-width: 100%; }
.captcha-click .gc-master {
  border: 1px solid var(--bs-border-color); border-radius: 6px; cursor: crosshair;
  max-width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.captcha-click .gc-dot {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: rgba(30, 115, 190, .85); color: #fff; font-size: 12px; line-height: 22px; text-align: center;
  pointer-events: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .75);
}

/* 首页分类限量后的「查看全部」入口 */
.cat-more-row { text-align: center; padding: 10px 0 2px; }
.cat-more {
  font-size: 13px; color: var(--luopan-primary); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 14px;
  border: 1px solid var(--bs-border-color); border-radius: 999px; transition: background .15s;
}
.cat-more:hover { background: rgba(30, 115, 190, .08); }
.pane-loading { padding: 28px 0; text-align: center; color: #888; font-size: 13px; }
.cat-loadmore { text-align: center; min-height: 24px; }
