/* =============================================================
 * 云上工具 · 工具壳样式 v2.0  (cainiaoya 风格)
 *  - 顶部固定绿色 header
 *  - 三栏: 左分类导航 + 中内容 + 右侧栏 (含广告)
 *  - 信息密集型工具卡片
 * ============================================================= */

/* -------- Header (跟 yunshangtool.cn toolbar 一致: 浅色毛玻璃 + chips) -------- */
.yst-shell-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--yst-header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--yst-border);
  z-index: 999;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  font-size: 14px;
  letter-spacing: var(--yst-letter-spacing);
}
[data-yst-theme="dark"] .yst-shell-header {
  background: rgba(11, 16, 32, 0.85);
}

/* 品牌 (仅移动端显示, 桌面端交给 sidebar) */
.yst-shell-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--yst-text);
  font: 700 16px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  margin-right: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
/* 移动端专属: 桌面端隐藏品牌, 给搜索框让位 */
@media (min-width: 1024px) {
  .yst-shell-brand.yst-mobile-only { display: none; }
}
.yst-shell-brand-logo {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yst-brand);
  border-radius: var(--yst-radius);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 158, 148, 0.25);
}

/* 收起去 yst-shell-nav, 不再在顶部显示分类 */
.yst-shell-nav { display: none; }

/* 搜索框 (向右靠, margin-left: auto) */
.yst-shell-search {
  display: flex; align-items: center;
  background: var(--yst-bg-subtle);
  border: 1px solid var(--yst-border-strong);
  border-radius: 12px;
  height: 36px;
  padding: 0 6px 0 14px;
  width: 320px;
  max-width: 35vw;
  flex-shrink: 1;
  margin-left: auto;          /* 推到右侧 */
  transition: all .15s;
}
.yst-shell-search:focus-within {
  border-color: var(--yst-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 158, 148, 0.12);
}
.yst-shell-search input {
  border: none; outline: none; background: transparent;
  flex: 1;
  font: 13px var(--yst-font);
  color: var(--yst-text);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-shell-search input::placeholder { color: var(--yst-text-muted); }
.yst-shell-search .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 6px;
  background: #fff;
  border: 1px solid var(--yst-border-strong);
  border-radius: 5px;
  color: var(--yst-text-muted);
  font: 11px var(--yst-font-mono);
  letter-spacing: 0;
  white-space: nowrap;
}

/* chip 按钮组 (跟搜索框紧贴, 整体在右侧) */
.yst-shell-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.yst-shell-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border-strong);
  border-radius: 999px;
  color: var(--yst-text-2);
  font: 500 13px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.yst-shell-chip:hover {
  border-color: var(--yst-brand);
  color: var(--yst-brand);
  background: var(--yst-brand-soft);
}
.yst-shell-chip.active {
  border-color: var(--yst-brand);
  background: var(--yst-brand-soft);
  color: var(--yst-brand);
  box-shadow: inset 0 0 0 1px var(--yst-brand);
}
.yst-shell-chip svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
}

.yst-shell-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border-strong);
  border-radius: 999px;
  color: var(--yst-text-2);
  cursor: pointer;
  transition: all .15s;
}
.yst-shell-icon-btn:hover {
  border-color: var(--yst-brand);
  color: var(--yst-brand);
  background: var(--yst-brand-soft);
}
.yst-shell-icon-btn svg { width: 15px; height: 15px; }

/* 登录/注册按钮 */
.yst-shell-auth {
  display: flex; align-items: center; gap: 6px;
}
.yst-shell-auth .yst-shell-btn-auth {
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 14px;
  border-radius: 999px;
  font: 500 13px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.yst-shell-auth .btn-login {
  background: transparent;
  color: var(--yst-text-2);
  border: 1px solid var(--yst-border-strong);
}
.yst-shell-auth .btn-login:hover {
  border-color: var(--yst-brand);
  color: var(--yst-brand);
}
.yst-shell-auth .btn-register {
  background: var(--yst-brand);
  color: #fff;
  border: 1px solid var(--yst-brand);
  box-shadow: 0 2px 6px rgba(0, 158, 148, 0.25);
}
.yst-shell-auth .btn-register:hover {
  background: var(--yst-brand-hover);
  border-color: var(--yst-brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 158, 148, 0.35);
}

/* 响应式隐藏 */
@media (max-width: 1023px) {
  .yst-shell-chip .label { display: none; }
  .yst-shell-chip { padding: 0 10px; }
}
@media (max-width: 768px) {
  .yst-shell-header { padding: 0 12px; gap: 8px; }
  .yst-shell-search { width: auto; flex: 1; max-width: none; }
  .yst-shell-search .kbd { display: none; }
  .yst-shell-actions .yst-shell-chip:not(.keep-mobile) { display: none; }
}

/* -------- 面包屑 (header 下方一行, 浅灰条) -------- */
.yst-shell-breadcrumb-bar {
  background: var(--yst-bg-card);
  border-bottom: 1px solid var(--yst-border);
  padding: 8px var(--yst-space-4);
  margin-top: var(--yst-header-h);
  font-size: 13px;
  color: var(--yst-text-muted);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-shell-breadcrumb-bar .inner {
  max-width: var(--yst-container);
  margin: 0 auto;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.yst-shell-breadcrumb-bar a {
  color: var(--yst-text-muted);
  text-decoration: none;
  transition: color var(--yst-dur) var(--yst-ease);
}
.yst-shell-breadcrumb-bar a:hover { color: var(--yst-brand); }
.yst-shell-breadcrumb-bar .sep { color: var(--yst-text-light); }
.yst-shell-breadcrumb-bar .current { color: var(--yst-text); font-weight: 500; }

/* -------- 全站统一左侧分类导航 (默认收起 56px, hover 展开 240px) -------- */
.yst-shell-sidebar {
  position: fixed;
  left: 12px;
  top: calc(var(--yst-header-h) + 12px);
  width: 56px;
  height: calc(100vh - var(--yst-header-h) - 24px);
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
  overflow-y: hidden;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s, overflow-y 0s .25s;
}
.yst-shell-sidebar:hover,
.yst-shell-sidebar:focus-within {
  width: 240px;
  overflow-y: auto;
  box-shadow: 12px 0 28px rgba(15, 23, 42, .12), 0 1px 3px rgba(15, 23, 42, .04);
  transition: width .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s;
}

/* 收起态: 隐藏文字, 仅显示图标 */
.yst-shell-sidebar .yst-sb-link .label,
.yst-shell-sidebar .yst-sb-link .count,
.yst-shell-sidebar .yst-sb-group-label,
.yst-shell-sidebar .yst-sb-brand .title,
.yst-shell-sidebar .yst-sb-brand .subtitle,
.yst-shell-sidebar .yst-sb-featured .label,
.yst-shell-sidebar .yst-sb-featured .count {
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: opacity .15s, visibility 0s .15s;
}
.yst-shell-sidebar:hover .yst-sb-link .label,
.yst-shell-sidebar:hover .yst-sb-link .count,
.yst-shell-sidebar:hover .yst-sb-group-label,
.yst-shell-sidebar:hover .yst-sb-brand .title,
.yst-shell-sidebar:hover .yst-sb-brand .subtitle,
.yst-shell-sidebar:hover .yst-sb-featured .label,
.yst-shell-sidebar:hover .yst-sb-featured .count,
.yst-shell-sidebar:focus-within .yst-sb-link .label,
.yst-shell-sidebar:focus-within .yst-sb-link .count,
.yst-shell-sidebar:focus-within .yst-sb-group-label,
.yst-shell-sidebar:focus-within .yst-sb-brand .title,
.yst-shell-sidebar:focus-within .yst-sb-brand .subtitle,
.yst-shell-sidebar:focus-within .yst-sb-featured .label,
.yst-shell-sidebar:focus-within .yst-sb-featured .count {
  opacity: 1;
  visibility: visible;
  transition: opacity .2s .05s, visibility 0s 0s;
}

/* 收起态: 群组 label 占位空间收掉 */
.yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-group-label {
  height: 4px;
  padding: 0;
  overflow: hidden;
}

/* 收起态: 链接居中只显示图标 */
.yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-link {
  justify-content: center;
  padding: 9px 0;
}
.yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-featured {
  justify-content: center;
  padding: 8px 0;
  margin: 8px 6px;
}

@media (max-width: 1023px) {
  .yst-shell-sidebar { display: none; }
}
/* body 给 sidebar 让出空间 (只占收起态宽度, hover 时浮起覆盖内容) */
@media (min-width: 1024px) {
  body[data-yst-with-sidebar="1"] {
    padding-left: 84px;  /* 56 + 12(left) + 16(gap) */
  }
}

/* -------- 钉住模式: sidebar 固定展开, 占据 240px -------- */
@media (min-width: 1024px) {
  body[data-sidebar-pinned="1"] .yst-shell-sidebar {
    width: 240px;
    overflow-y: auto;
  }
  body[data-sidebar-pinned="1"][data-yst-with-sidebar="1"] {
    padding-left: 268px;  /* 240 + 12 + 16 */
  }
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-link .label,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-link .count,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-group-label,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-brand .title,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-brand .subtitle,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-featured .label,
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-featured .count {
    opacity: 1;
    visibility: visible;
  }
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-group-label {
    height: auto;
    padding: 10px 14px 4px;
    overflow: visible;
  }
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-link {
    justify-content: flex-start;
    padding: 9px 14px 9px 12px;
  }
  body[data-sidebar-pinned="1"] .yst-shell-sidebar .yst-sb-featured {
    justify-content: flex-start;
    padding: 10px 12px;
    margin: 10px;
  }
}

/* -------- 钉住按钮 (sidebar 顶部) -------- */
.yst-sb-pin {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px; height: 26px;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-radius: 6px;
  color: var(--yst-text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: all .15s;
  padding: 0;
}
.yst-sb-pin:hover {
  background: var(--yst-brand-soft);
  border-color: var(--yst-brand);
  color: var(--yst-brand);
}
.yst-sb-pin svg {
  width: 14px; height: 14px;
}
/* 收起态: 显示图钉, 隐藏箭头 */
.yst-sb-pin .ico-unpin { display: none; }
.yst-sb-pin .ico-pin { display: block; }
/* 钉住态: 显示左箭头 (代表点击收起), 隐藏图钉; 按钮变绿色填充表示已激活 */
body[data-sidebar-pinned="1"] .yst-sb-pin {
  background: var(--yst-brand);
  border-color: var(--yst-brand);
  color: #fff;
}
body[data-sidebar-pinned="1"] .yst-sb-pin .ico-pin { display: none; }
body[data-sidebar-pinned="1"] .yst-sb-pin .ico-unpin { display: block; }

/* 收起态时按钮位置居中 */
.yst-shell-sidebar:not(:hover):not(:focus-within):not([data-pinned]) .yst-sb-pin {
  right: 50%;
  transform: translateX(50%);
}

/* 收起态: brand title/subtitle 不占空间, 仅显示 logo img */
@media (min-width: 1024px) {
  body:not([data-sidebar-pinned="1"]) .yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-brand {
    padding: 38px 6px 10px;  /* 顶部留 38px 给钉住按钮 */
  }
  body:not([data-sidebar-pinned="1"]) .yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-brand .title,
  body:not([data-sidebar-pinned="1"]) .yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-brand .subtitle {
    display: none;
  }
  body:not([data-sidebar-pinned="1"]) .yst-shell-sidebar:not(:hover):not(:focus-within) .yst-sb-brand img {
    width: 36px; height: 36px; margin: 0 auto;
  }
  /* 钉住或展开态: 钉住按钮往侧让一点, 给 brand 让位 */
  body[data-sidebar-pinned="1"] .yst-sb-pin,
  .yst-shell-sidebar:hover .yst-sb-pin,
  .yst-shell-sidebar:focus-within .yst-sb-pin {
    top: 10px;
    right: 10px;
  }
}

/* sidebar 内部样式 (跟首页 home-sidebar 一致) */
.yst-shell-sidebar .yst-sb-brand {
  padding: 14px 12px;
  background: linear-gradient(180deg, #f0fbf9 0%, var(--yst-bg-card) 100%);
  border-bottom: 1px solid var(--yst-border);
  text-align: center;
  text-decoration: none;
  display: block;
}
.yst-shell-sidebar .yst-sb-brand img {
  width: 44px; height: 44px;
  margin: 0 auto 4px;
  display: block;
}
.yst-shell-sidebar .yst-sb-brand .title {
  font: 700 13px/1.4 var(--yst-font);
  color: var(--yst-text);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-shell-sidebar .yst-sb-brand .subtitle {
  font: 10px/1.4 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: 2px;
  margin-top: 1px;
}

.yst-shell-sidebar .yst-sb-featured {
  display: flex; align-items: center; gap: 8px;
  margin: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #00b3a8 0%, #009e94 100%);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font: 600 13px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  box-shadow: 0 4px 10px rgba(0, 158, 148, 0.22), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all .15s;
}
.yst-shell-sidebar .yst-sb-featured:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 158, 148, 0.32), inset 0 1px 0 rgba(255,255,255,0.25);
}
.yst-shell-sidebar .yst-sb-featured .icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.22);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.12);
}
.yst-shell-sidebar .yst-sb-featured .icon svg {
  width: 16px; height: 16px;
  color: #fff;
}
.yst-shell-sidebar .yst-sb-featured .label { flex: 1; }
.yst-shell-sidebar .yst-sb-featured .count {
  background: rgba(255,255,255,0.25);
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
}

.yst-shell-sidebar .yst-sb-group-label {
  padding: 10px 14px 4px;
  font: 500 10px/1.4 var(--yst-font);
  color: var(--yst-text-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.yst-shell-sidebar .yst-sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 12px;
  color: var(--yst-text-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--yst-border);
  font: 500 13px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  transition: all .15s;
  position: relative;
}
.yst-shell-sidebar .yst-sb-link::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: transparent;
  border-radius: 0 2px 2px 0;
  transition: background .15s;
}
.yst-shell-sidebar .yst-sb-link .icon {
  width: 28px; height: 28px;
  background: linear-gradient(180deg, #ffffff 0%, var(--yst-bg-subtle) 100%);
  color: var(--yst-text-2);
  border: 1px solid var(--yst-border);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all .15s;
}
.yst-shell-sidebar .yst-sb-link .icon svg {
  width: 15px; height: 15px;
}
.yst-shell-sidebar .yst-sb-link:hover .icon,
.yst-shell-sidebar .yst-sb-link.active .icon {
  background: linear-gradient(180deg, var(--yst-brand) 0%, var(--yst-brand-hover) 100%);
  color: #fff;
  border-color: var(--yst-brand-hover);
  box-shadow: 0 2px 4px rgba(0, 158, 148, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.yst-shell-sidebar .yst-sb-link .label { flex: 1; font-weight: 500; }
.yst-shell-sidebar .yst-sb-link .count {
  background: var(--yst-bg-subtle);
  color: var(--yst-text-muted);
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  min-width: 24px;
  text-align: center;
}
.yst-shell-sidebar .yst-sb-link:hover,
.yst-shell-sidebar .yst-sb-link.active {
  color: var(--yst-brand);
  background: var(--yst-brand-soft);
}
.yst-shell-sidebar .yst-sb-link:hover::before,
.yst-shell-sidebar .yst-sb-link.active::before {
  background: var(--yst-brand);
}
.yst-shell-sidebar .yst-sb-link:hover .icon,
.yst-shell-sidebar .yst-sb-link.active .icon {
  background: var(--yst-brand);
  color: #fff;
}
.yst-shell-sidebar .yst-sb-link:hover .count,
.yst-shell-sidebar .yst-sb-link.active .count {
  background: var(--yst-brand);
  color: #fff;
}
.yst-shell-sidebar .yst-sb-link.active { font-weight: 600; }

/* -------- 全局: body 让出 fixed header 高度 (适配所有工具页结构) -------- */
body.yst-page {
  padding-top: var(--yst-header-h);
}
/* 面包屑也让出 header, 此时 body 不需要重复让出 */
body.yst-page:has(.yst-shell-breadcrumb-bar) {
  padding-top: 0;
}

/* -------- 三栏主体布局 (主内容 + 右侧广告) -------- */
.yst-shell-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--yst-space-4);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--yst-space-4);
}
@media (min-width: 1280px) {
  .yst-shell-main.with-aside {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}
.yst-shell-content { min-width: 0; }

.yst-shell-aside {
  display: flex; flex-direction: column; gap: var(--yst-space-3);
}
@media (max-width: 1279px) {
  .yst-shell-aside { display: none; }
}

/* -------- 工具标题区 (替代之前的 hero, 朴素风格) -------- */
.yst-tool-header {
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-left: 3px solid var(--yst-brand);
  border-radius: var(--yst-radius);
  padding: var(--yst-space-4) var(--yst-space-5);
  margin-bottom: var(--yst-space-4);
}
.yst-tool-header h1 {
  font: 700 20px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text);
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.yst-tool-header h1 .icon {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--yst-brand);
  flex-shrink: 0;
}
.yst-tool-header h1 .icon svg { width: 22px; height: 22px; }
.yst-tool-header .desc {
  font: 13px/1.7 var(--yst-font);
  color: var(--yst-text-muted);
  margin: 0;
  letter-spacing: var(--yst-letter-spacing);
}
.yst-tool-header .features {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.yst-tool-header .features .pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  background: var(--yst-bg-subtle);
  color: var(--yst-text-muted);
  border-radius: var(--yst-radius-sm);
  font-size: 12px;
  letter-spacing: var(--yst-letter-spacing);
}

/* -------- 广告位容器 (统一规范, 含 Sponsored 标识) -------- */
.yst-ad {
  position: relative;
  margin: 18px auto;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-radius: 8px;
  padding: 22px 14px 14px;
  overflow: hidden;
  text-align: center;
  min-height: 90px;
}
.yst-ad-label {
  position: absolute;
  top: 6px; left: 10px;
  display: inline-flex; align-items: center;
  gap: 4px;
  font: 600 10px/1 var(--yst-font);
  color: var(--yst-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  background: var(--yst-bg-subtle);
  border-radius: 4px;
}
.yst-ad-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yst-warning);
}

/* Banner 728×90 类型 */
.yst-ad-banner { max-width: 760px; min-height: 110px; }
.yst-ad-banner > div, .yst-ad-banner iframe { margin: 0 auto; }

/* Native Banner 类型 */
.yst-ad-native { min-height: 240px; }

/* 侧栏粘性广告 */
.yst-ad-aside {
  position: sticky;
  top: calc(var(--yst-header-h) + 12px);
  min-height: 260px;
  margin: 0;
}

/* 占位 (开发预览) */
.yst-ad.is-placeholder {
  background:
    repeating-linear-gradient(45deg, var(--yst-bg-card), var(--yst-bg-card) 8px, var(--yst-bg-subtle) 8px, var(--yst-bg-subtle) 16px);
  border-style: dashed;
  border-color: var(--yst-border-strong);
  color: var(--yst-text-muted);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: var(--yst-letter-spacing);
}

/* 兼容老类名 .yst-ad-slot (跟 .yst-ad 等价) */
.yst-ad-slot {
  position: relative;
  margin: 18px auto;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-radius: 8px;
  padding: 22px 14px 14px;
  overflow: hidden;
  text-align: center;
  min-height: 90px;
}
.yst-ad-slot::before {
  content: "广告 SPONSORED";
  position: absolute; top: 6px; left: 10px;
  font: 600 10px/1.6 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: 0.08em;
  padding: 3px 7px;
  background: var(--yst-bg-subtle);
  border-radius: 4px;
}
.yst-ad-slot.is-empty::after {
  content: attr(data-empty-text);
  display: block;
  padding: 24px 12px;
  color: var(--yst-text-light);
  font-size: 12px;
  letter-spacing: var(--yst-letter-spacing);
}
.yst-ad-bottom { margin: 28px auto 16px; max-width: 800px; }

.yst-ad-showcase {
  padding: 18px 18px 16px;
}
.yst-ad-showcase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.yst-ad-showcase-copy {
  flex: 1;
  min-width: 0;
}
.yst-ad-showcase-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font: 700 11px/1.4 var(--yst-font);
  color: var(--yst-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.yst-ad-showcase-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yst-brand);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}
.yst-ad-showcase-title {
  margin: 0;
  font: 700 20px/1.35 var(--yst-font);
  color: var(--yst-text);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-ad-showcase-desc {
  margin: 8px 0 0;
  font: 13px/1.7 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-ad-showcase .yst-ad {
  margin: 0;
}
.yst-ad-showcase-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.yst-ad-showcase-point {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--yst-border);
  background: var(--yst-bg-subtle);
  color: var(--yst-text-muted);
  font: 600 12px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
}

/* -------- 赞助推荐 立体 CTA 按钮 (Direct Link #5) -------- */
.yst-cta-sponsored {
  display: block;
  position: relative;
  margin: 28px auto;
  max-width: 760px;
  padding: 22px 28px;
  background: #fff;
  border: 1.5px solid #18181b;
  border-radius: 14px;
  box-shadow: 4px 4px 0 0 #18181b;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  cursor: pointer;
  overflow: hidden;
}
.yst-cta-sponsored:hover {
  background: #fafafa;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--yst-brand);
}
.yst-cta-sponsored:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 0 #18181b;
}
.yst-cta-sponsored::before {
  content: "广告 SPONSORED";
  position: absolute; top: 8px; left: 12px;
  font: 600 9px/1 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: 0.12em;
  padding: 2px 6px;
  background: var(--yst-bg-subtle);
  border-radius: 3px;
}
.yst-cta-sponsored .yst-cta-row {
  display: flex; align-items: center; gap: 18px;
  margin-top: 10px;
}
.yst-cta-sponsored .yst-cta-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff8a4a, #ff5722);
  border: 1.5px solid #18181b;
  border-radius: 12px;
  box-shadow: 2px 2px 0 0 #18181b;
  font-size: 28px;
}
.yst-cta-sponsored .yst-cta-text { flex: 1; min-width: 0; }
.yst-cta-sponsored .yst-cta-eyebrow {
  display: inline-block;
  font: 700 11px/1.4 var(--yst-font);
  color: var(--yst-danger);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.yst-cta-sponsored .yst-cta-title {
  font: 700 18px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text);
  margin-bottom: 4px;
}
.yst-cta-sponsored .yst-cta-desc {
  font: 13px/1.5 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-cta-sponsored .yst-cta-button {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 42px; padding: 0 22px;
  background: var(--yst-brand);
  border: 1.5px solid #18181b;
  border-radius: 10px;
  box-shadow: 2px 2px 0 0 #18181b;
  color: #fff;
  font: 700 14px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  white-space: nowrap;
  transition: all .15s ease;
}
.yst-cta-sponsored:hover .yst-cta-button {
  background: var(--yst-brand-hover);
}
@media (max-width: 640px) {
  .yst-ad-showcase {
    padding: 16px 14px 14px;
  }
  .yst-ad-showcase-head {
    margin-bottom: 12px;
  }
  .yst-ad-showcase-title {
    font-size: 18px;
  }
  .yst-cta-sponsored { padding: 18px 16px; }
  .yst-cta-sponsored .yst-cta-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .yst-cta-sponsored .yst-cta-icon { margin: 0 auto; }
  .yst-cta-sponsored .yst-cta-text { text-align: center; }
}

/* -------- 紧凑版侧栏赞助推荐卡片 (右侧栏使用) -------- */
.yst-aside-sponsored {
  display: block;
  position: relative;
  padding: 16px 14px 14px;
  background: #fff;
  border: 1.5px solid #18181b;
  border-radius: 10px;
  box-shadow: 3px 3px 0 0 #18181b;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  cursor: pointer;
  overflow: hidden;
}
.yst-aside-sponsored:hover {
  background: #fafafa;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--yst-brand);
}
.yst-aside-sponsored:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 #18181b;
}
.yst-aside-sponsored::before {
  content: "广告";
  position: absolute; top: 6px; right: 8px;
  font: 600 9px/1 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: 0.1em;
  padding: 2px 5px;
  background: var(--yst-bg-subtle);
  border-radius: 3px;
}
.yst-aside-sponsored .as-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 700 11px/1.4 var(--yst-font);
  color: var(--yst-danger);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.yst-aside-sponsored .as-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yst-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}
.yst-aside-sponsored .as-title {
  font: 700 14px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text);
  margin-bottom: 4px;
}
.yst-aside-sponsored .as-desc {
  font: 12px/1.5 var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: var(--yst-letter-spacing);
  margin-bottom: 12px;
}
.yst-aside-sponsored .as-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  height: 36px; padding: 0 14px;
  background: var(--yst-brand);
  color: #fff;
  border: 1.5px solid #18181b;
  border-radius: 8px;
  box-shadow: 2px 2px 0 0 #18181b;
  font: 700 13px/1 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  transition: all .15s ease;
}
.yst-aside-sponsored:hover .as-button {
  background: var(--yst-brand-hover);
}

/* -------- 本页导航 / 章节锚点 (无 emoji, 编号方块 + 立体感) -------- */
.yst-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yst-toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  position: relative;
  transition: all .15s;
}
.yst-toc-item::after {
  content: "→";
  margin-left: auto;
  font-size: 12px;
  color: var(--yst-text-light);
  opacity: 0;
  transform: translateX(-4px);
  transition: all .15s;
}
.yst-toc-item:hover {
  background: var(--yst-brand-soft);
  border-color: rgba(0, 158, 148, 0.18);
}
.yst-toc-item:hover::after,
.yst-toc-item.active::after {
  opacity: 1;
  transform: translateX(0);
  color: var(--yst-brand);
}
.yst-toc-item .num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 26px; height: 22px;
  background: linear-gradient(180deg, #ffffff 0%, var(--yst-bg-subtle) 100%);
  border: 1px solid var(--yst-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), inset 0 1px 0 rgba(255,255,255,0.7);
  font: 700 11px var(--yst-font-mono);
  letter-spacing: 0.5px;
  color: var(--yst-text-2);
  transition: all .15s;
}
.yst-toc-item:hover .num,
.yst-toc-item.active .num {
  background: linear-gradient(180deg, var(--yst-brand) 0%, var(--yst-brand-hover) 100%);
  color: #fff;
  border-color: var(--yst-brand-hover);
  box-shadow: 0 2px 4px rgba(0, 158, 148, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}
.yst-toc-item .label {
  font: 500 13px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text);
}
.yst-toc-item:hover .label,
.yst-toc-item.active .label {
  color: var(--yst-brand);
  font-weight: 600;
}

/* 让锚点跳转避开 fixed header (滚动到 #section 时不被 header 遮挡) */
[id] { scroll-margin-top: calc(var(--yst-header-h) + 16px); }

/* -------- 智能相关工具推荐 (右侧栏紧凑列表, 无 emoji) -------- */
.yst-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yst-related-list li { margin: 0; }
.yst-related-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: all .15s;
  position: relative;
}
.yst-related-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  background: var(--yst-brand);
  border-radius: 0 2px 2px 0;
  transition: height .15s ease;
}
.yst-related-item:hover {
  background: var(--yst-brand-soft);
  border-color: rgba(0, 158, 148, 0.18);
}
.yst-related-item:hover::before {
  height: 60%;
}
.yst-related-name {
  font: 600 13px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text);
}
.yst-related-item:hover .yst-related-name {
  color: var(--yst-brand);
}
.yst-related-desc {
  font: 11px/1.4 var(--yst-font);
  letter-spacing: var(--yst-letter-spacing);
  color: var(--yst-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .page-header,
body.yst-page[data-yst-tool*="文本图片"] #tool .header,
body.yst-page[data-yst-tool*="文本图片"] #tool .intro-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .info-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .guide-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenarios-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .adsense-content,
body.yst-page[data-yst-tool*="文本图片"] #tool .faq-section {
  padding: 24px !important;
  margin-bottom: 20px !important;
  border-radius: 14px !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .page-header h1,
body.yst-page[data-yst-tool*="文本图片"] #tool .header h1,
body.yst-page[data-yst-tool*="文本图片"] #tool .header-title,
body.yst-page[data-yst-tool*="文本图片"] #tool .site-title,
body.yst-page[data-yst-tool*="文本图片"] #tool .intro-section h2,
body.yst-page[data-yst-tool*="文本图片"] #tool .info-section h2,
body.yst-page[data-yst-tool*="文本图片"] #tool .guide-section h2,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenarios-section h2,
body.yst-page[data-yst-tool*="文本图片"] #tool .adsense-content h2,
body.yst-page[data-yst-tool*="文本图片"] #tool .section-title {
  font-size: 22px !important;
  margin-bottom: 14px !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .page-header p,
body.yst-page[data-yst-tool*="文本图片"] #tool .header p,
body.yst-page[data-yst-tool*="文本图片"] #tool .intro-section p,
body.yst-page[data-yst-tool*="文本图片"] #tool .info-item p,
body.yst-page[data-yst-tool*="文本图片"] #tool .guide-step p,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenario-item p,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenario-card p,
body.yst-page[data-yst-tool*="文本图片"] #tool .adsense-content p,
body.yst-page[data-yst-tool*="文本图片"] #tool .faq-answer,
body.yst-page[data-yst-tool*="文本图片"] #tool li {
  font-size: 14px !important;
  line-height: 1.75 !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .features-grid,
body.yst-page[data-yst-tool*="文本图片"] #tool .info-grid,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenarios-grid,
body.yst-page[data-yst-tool*="文本图片"] #tool .feature-grid,
body.yst-page[data-yst-tool*="文本图片"] #tool .related-tools-grid {
  gap: 16px !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .feature-card,
body.yst-page[data-yst-tool*="文本图片"] #tool .info-item,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenario-item,
body.yst-page[data-yst-tool*="文本图片"] #tool .scenario-card,
body.yst-page[data-yst-tool*="文本图片"] #tool .guide-step,
body.yst-page[data-yst-tool*="文本图片"] #tool .feature-item {
  padding: 18px !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .stats {
  gap: 24px !important;
  margin-top: 20px !important;
}

body.yst-page[data-yst-tool*="文本图片"] #tool .faq-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .related-tools-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .ys-guide__related,
body.yst-page[data-yst-tool*="文本图片"] #tool #recommend-area,
body.yst-page[data-yst-tool*="文本图片"] #tool .recommend-tools-section,
body.yst-page[data-yst-tool*="文本图片"] #tool .site-footer,
body.yst-page[data-yst-tool*="文本图片"] #tool .footer-nav,
body.yst-page[data-yst-tool*="文本图片"] #tool footer.footer {
  display: none !important;
}

@media (max-width: 768px) {
  body.yst-page[data-yst-tool*="文本图片"] #tool .page-header,
  body.yst-page[data-yst-tool*="文本图片"] #tool .header,
  body.yst-page[data-yst-tool*="文本图片"] #tool .intro-section,
  body.yst-page[data-yst-tool*="文本图片"] #tool .info-section,
  body.yst-page[data-yst-tool*="文本图片"] #tool .guide-section,
  body.yst-page[data-yst-tool*="文本图片"] #tool .scenarios-section,
  body.yst-page[data-yst-tool*="文本图片"] #tool .adsense-content {
    padding: 18px !important;
  }

  body.yst-page[data-yst-tool*="文本图片"] #tool .page-header h1,
  body.yst-page[data-yst-tool*="文本图片"] #tool .header h1,
  body.yst-page[data-yst-tool*="文本图片"] #tool .header-title,
  body.yst-page[data-yst-tool*="文本图片"] #tool .site-title,
  body.yst-page[data-yst-tool*="文本图片"] #tool .intro-section h2,
  body.yst-page[data-yst-tool*="文本图片"] #tool .info-section h2,
  body.yst-page[data-yst-tool*="文本图片"] #tool .guide-section h2,
  body.yst-page[data-yst-tool*="文本图片"] #tool .scenarios-section h2,
  body.yst-page[data-yst-tool*="文本图片"] #tool .section-title {
    font-size: 18px !important;
  }
}

/* -------- Footer (cainiaoya 风格: 浅灰底 + 小字) -------- */
.yst-shell-footer {
  margin-top: var(--yst-space-8);
  background: var(--yst-bg-subtle);
  border-top: 1px solid var(--yst-border);
  font-size: 13px;
  letter-spacing: var(--yst-letter-spacing);
}
.yst-friend-bar {
  background: #ededed;
  border-top: 1px solid var(--yst-border-strong);
  border-bottom: 1px solid var(--yst-border-strong);
  padding: 8px var(--yst-space-4);
  font-size: 13px;
}
.yst-friend-bar .inner {
  max-width: var(--yst-container);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.yst-friend-bar .label {
  color: var(--yst-text-2);
  font-weight: 600;
  margin-right: 4px;
}
.yst-friend-bar a {
  color: var(--yst-brand);
  padding: 2px 6px;
  border: 1px solid var(--yst-border-strong);
  border-radius: var(--yst-radius-sm);
  font-size: 12px;
  text-decoration: none;
  transition: all var(--yst-dur) var(--yst-ease);
}
.yst-friend-bar a:hover {
  background: var(--yst-brand-soft);
  border-color: var(--yst-brand);
}

.yst-shell-footer-inner {
  max-width: var(--yst-container);
  margin: 0 auto;
  padding: var(--yst-space-6) var(--yst-space-4) var(--yst-space-4);
  display: grid; gap: var(--yst-space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .yst-shell-footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.yst-footer-col h4 {
  font: 600 13px/1.4 var(--yst-font);
  color: var(--yst-text);
  margin: 0 0 var(--yst-space-2);
  padding-bottom: var(--yst-space-2);
  letter-spacing: var(--yst-letter-spacing);
}
.yst-footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
}
.yst-footer-col ul li { line-height: 2.4; }
.yst-footer-col a {
  color: var(--yst-text-2);
  font-size: 12px;
  text-decoration: none;
}
.yst-footer-col a:hover { color: var(--yst-brand); }
.yst-footer-brand .desc {
  color: var(--yst-text-muted);
  font-size: 12px;
  line-height: 1.8;
  max-width: 360px;
}

.yst-shell-footer-bottom {
  background: #dddddd;
  color: var(--yst-text-2);
  text-align: center;
  font-size: 12px;
  padding: 12px;
  letter-spacing: var(--yst-letter-spacing);
}

/* -------- 工具卡片网格 (cainiaoya .codelist-box 风格) -------- */
.yst-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.yst-tool-grid .item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--yst-bg-card);
  border: 1px solid var(--yst-border);
  border-radius: var(--yst-radius);
  text-decoration: none;
  transition: all var(--yst-dur) var(--yst-ease);
  height: 64px;
  overflow: hidden;
}
.yst-tool-grid .item:hover {
  border-color: var(--yst-brand);
  box-shadow: var(--yst-shadow-hover);
}
.yst-tool-grid .item .icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--yst-radius);
  background: var(--yst-brand-soft);
  color: var(--yst-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.yst-tool-grid .item .text { min-width: 0; }
.yst-tool-grid .item .name {
  display: block;
  font: 600 14px/1.4 var(--yst-font);
  color: var(--yst-text);
  letter-spacing: var(--yst-letter-spacing);
  margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.yst-tool-grid .item .sub {
  display: block;
  font: 12px var(--yst-font);
  color: var(--yst-text-muted);
  letter-spacing: var(--yst-letter-spacing);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* -------- 复制按钮的成功反馈 -------- */
.yst-copy-btn[data-state="copied"] {
  background: var(--yst-success-bg);
  color: var(--yst-success);
  border-color: var(--yst-success);
}
