/* =========================================================
 * 云上工具 · 共享站点导航条 + 广告位 + 底部赞助卡
 * 用于第三方风格工具页面（保留原工具 UI 同时整合站内导航与广告）
 * ========================================================= */

/* ---- 顶部站点导航条 ---- */
.yst-site-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.yst-site-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #4b5563;
  flex-wrap: wrap;
}
.yst-site-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  flex-shrink: 0;
}
.yst-site-bar-brand:hover { color: #059669; }
.yst-site-bar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}
.yst-site-bar-name { font-size: 14px; }

.yst-site-bar-crumb {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #6b7280;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.yst-site-bar-crumb li { display: inline-flex; }
.yst-site-bar-crumb li.sep { color: #d1d5db; }
.yst-site-bar-crumb li a {
  color: #4b5563;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all .15s;
}
.yst-site-bar-crumb li a:hover { color: #059669; background: rgba(5,150,105,.05); }
.yst-site-bar-crumb li.cur span {
  color: #111827;
  font-weight: 600;
  padding: 2px 4px;
}
.yst-site-bar-crumb li meta { display: none; }

.yst-site-bar-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  transition: all .15s;
  flex-shrink: 0;
}
.yst-site-bar-back:hover {
  color: #059669;
  border-color: #059669;
  background: rgba(5,150,105,.05);
}

@media (max-width: 640px) {
  .yst-site-bar-inner { gap: 10px; padding: 8px 14px; }
  .yst-site-bar-name { display: none; }
  .yst-site-bar-back { padding: 4px 8px; }
}

/* ---- 广告位通用 ---- */
.yst-ad {
  position: relative;
  margin: 24px auto;
  padding: 32px 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.yst-ad-label {
  position: absolute;
  top: 8px; left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: .5px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.yst-ad-label::before {
  content: "";
  width: 5px; height: 5px;
  background: #f59e0b;
  border-radius: 50%;
}
.yst-ad-banner {
  max-width: 760px;
  min-height: 110px;
}
.yst-ad-banner > div,
.yst-ad-banner iframe { margin: 0 auto; }

.yst-ad-native { min-height: 240px; }

/* ---- 底部赞助卡 ---- */
.yst-bottom-sponsored {
  display: block;
  position: relative;
  margin: 32px auto 12px;
  padding: 22px 20px 18px;
  max-width: 760px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 1px 0 0 #18181b;
  transition: all .15s;
  text-align: center;
}
.yst-bottom-sponsored:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 #059669;
  border-color: #059669;
}
.yst-bottom-sponsored::before {
  content: "广告 Sponsored";
  position: absolute;
  top: 8px; right: 14px;
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: .5px;
}
.yst-bottom-sponsored .ybs-eyebrow {
  display: block;
  font-size: 12px;
  color: #059669;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.yst-bottom-sponsored .ybs-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.yst-bottom-sponsored .ybs-desc {
  display: block;
  font-size: 13.5px;
  color: #6b7280;
  margin-bottom: 12px;
}
.yst-bottom-sponsored .ybs-button {
  display: inline-block;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  border-radius: 6px;
}

/* ---- 暗色模式（Restoria/PixCast 默认浅色，但保留兜底） ---- */
@media (prefers-color-scheme: dark) {
  body[data-prefers-light] .yst-site-bar { background: #fff; }
}
