@import url('style_tools.css');

:root {
  --df-blue: #4693e9;
  --df-blue-deep: #0e95e0;
  --df-blue-soft: rgba(14, 149, 224, 0.88);
  --df-text: #333;
  --df-muted: #666;
  --df-light: #999;
  --df-bg: #f5f5f5;
  --df-card: #fff;
  --df-line: #eee;
  --df-radius: 2px;
  --df-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  --df-container: 1200px;
  --df-gap: 20px;
  --byq-blue: #4693e9;
  --byq-blue-dark: #0e95e0;
  --byq-blue-soft: #e8f4fc;
  --byq-bg: #f5f5f5;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--df-muted);
  background: var(--df-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--df-blue); }
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: var(--df-text); font-weight: 700; }

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

.df-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--df-blue);
  color: #fff;
  padding: 8px 12px;
  z-index: 10000;
}
.df-skip:focus { left: 8px; top: 8px; }

.df-container,
.byq-container {
  width: min(100% - 32px, var(--df-container));
  margin: 0 auto;
}

/* Header */
.df-header {
  background: #fff;
  border-bottom: 1px solid var(--df-line);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.df-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}
.df-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--df-text);
  font-size: 18px;
  font-weight: 700;
}
.df-brand:hover { color: var(--df-text); }
.df-brand__logo {
  display: block;
  max-height: 40px;
  width: auto;
}
.df-brand__icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.df-brand__text { white-space: nowrap; }

.df-nav { flex: 1; min-width: 0; }
.df-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 2px;
}
.df-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  color: #3f3f3f;
  font-size: 15px;
  border-bottom: 2px solid transparent;
}
.df-nav__link:hover,
.df-nav__link.is-active {
  color: var(--df-blue);
  border-bottom-color: var(--df-blue);
}
.df-nav__caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
}
.df-nav__item { position: relative; }
.df-nav__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--df-line);
  box-shadow: var(--df-shadow);
  z-index: 20;
}
.df-nav__item:hover .df-nav__sub,
.df-nav__item:focus-within .df-nav__sub { display: block; }
.df-nav__sublink {
  display: block;
  padding: 10px 14px;
  color: #3f3f3f;
  white-space: nowrap;
}
.df-nav__sublink:hover { background: #f7fafc; color: var(--df-blue); }
.df-nav__mhead,
.df-nav__mclose { display: none; }
.df-nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0; background: transparent;
  padding: 10px 8px;
  cursor: pointer;
}
.df-nav-toggle span {
  display: block;
  height: 2px;
  background: #333;
  margin: 5px 0;
}

.df-header__aside { margin-left: auto; }
.df-search-toggle {
  width: 40px; height: 40px;
  border: 0; background: transparent;
  color: #3f3f3f;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.df-search-toggle:hover { color: var(--df-blue); }

.df-search-panel {
  border-top: 1px solid var(--df-line);
  background: #fff;
  padding: 12px 0 16px;
}
.df-search-panel__form {
  width: min(100% - 32px, var(--df-container));
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.df-search-panel__input {
  flex: 1;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: var(--df-radius);
  padding: 0 12px;
  font-size: 14px;
}
.df-search-panel__submit,
.df-btn,
.df-more,
.df-sr-form__btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--df-radius);
  background: var(--df-blue);
  color: #fff !important;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.df-search-panel__submit:hover,
.df-btn:hover,
.df-more:hover,
.df-sr-form__btn:hover { background: var(--df-blue-deep); color: #fff !important; }
.df-search-panel__close {
  width: 40px; height: 40px;
  border: 0; background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

body.df-nav-lock { overflow: hidden; }

/* Layout */
.df-home { padding: 20px 0 40px; }
.df-catepage { padding: 18px 0 40px; }
.df-layout,
.byq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--df-gap);
  align-items: start;
}
.df-maincol,
.byq-maincol { min-width: 0; }

/* 分类头图（对齐参考站） */
.df-cate-hero {
  position: relative;
  min-height: 200px;
  background: #2a3a4a center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.df-cate-hero__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 28, 40, 0.72) 0%, rgba(20, 28, 40, 0.45) 55%, rgba(20, 28, 40, 0.35) 100%);
  pointer-events: none;
}
.df-cate-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 0 28px;
  min-height: 200px;
}
.df-cate-hero__title {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.df-cate-hero__desc {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.9);
}
.df-cate-hero__crumb {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
  padding-bottom: 6px;
}
.df-cate-hero__crumb a { color: #fff; }
.df-cate-hero__crumb a:hover { color: #cfe6ff; }
.df-cate-hero__home {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 2px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 3.4L3 11h2.5v8.5h5V14h3v5.5h5V11H21L12 3.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.df-cate-hero__sep { opacity: .7; }

.df-breadcrumb,
.byq-breadcrumb {
  padding: 0 0 14px;
  color: var(--df-light);
  font-size: 13px;
}
.df-breadcrumb a:hover { color: var(--df-blue); }

.df-pagehead { padding: 8px 0 16px; }
.df-pagehead__title { font-size: 22px; margin-bottom: 6px; }
.df-pagehead__desc { margin: 0; color: var(--df-light); }

.df-feed--cate { gap: 14px; }
.df-sidebar { position: sticky; top: 78px; }

/* Post cards */
.df-feed { display: flex; flex-direction: column; gap: 14px; }
.df-feed__count { color: var(--df-light); margin-bottom: 4px; }

.df-post {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  background: var(--df-card);
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
  padding: 15px;
  overflow: hidden;
}
.df-post__new {
  position: absolute;
  top: 0; right: 0;
  z-index: 2;
  width: 52px; height: 52px;
  background: linear-gradient(45deg, transparent 50%, #ff4d4f 50%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  padding: 6px 4px 0 0;
  pointer-events: none;
}
.df-post__thumb {
  position: relative;
  display: block;
  width: 220px;
  height: 150px;
  border-radius: 2px;
  overflow: hidden;
  background: #e6ecf2;
  flex-shrink: 0;
}
.df-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.df-post__cat {
  position: absolute;
  left: 0; top: 0;
  z-index: 1;
  background: var(--df-blue-soft);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 0 0 8px 0;
}
.df-post__body { min-width: 0; display: flex; flex-direction: column; }
.df-post__title {
  font-size: 18px;
  line-height: 1.45;
  margin: 0 0 8px;
}
.df-post__title a { color: var(--df-text); }
.df-post__title a:hover { color: var(--df-blue); }
.df-post__desc {
  margin: 0;
  color: var(--df-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.df-post__meta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--df-light);
  font-size: 13px;
}
.df-post__author::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.df-post__meta time::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2zm13 8H6v10h14V10zM6 8h14V6H6v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.df-post__views::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.df-morewrap { margin-top: 18px; text-align: center; }
.df-more { min-width: 160px; }

/* Sidebar */
.df-sidebar,
.byq-sidebar { display: flex; flex-direction: column; gap: 14px; }
.df-widget,
.byq-widget {
  background: var(--df-card);
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
  padding: 14px 16px 16px;
}
.df-widget__title,
.byq-widget__title {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--df-muted);
  padding: 0 0 10px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--df-line);
  display: flex;
  align-items: center;
  gap: 6px;
}
.df-widget__title::before,
.byq-widget__title::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 3px; height: 14px;
  background: var(--df-blue);
  border-radius: 1px;
}
.df-widget__marks {
  display: inline-block;
  width: 12px;
  height: 10px;
  margin-left: 2px;
  background:
    linear-gradient(115deg, transparent 35%, #7ed321 35%, #7ed321 48%, transparent 48%),
    linear-gradient(115deg, transparent 52%, #f5a623 52%, #f5a623 65%, transparent 65%);
  background-size: 100% 100%;
  flex-shrink: 0;
}

.df-side-cats li + li { margin-top: 2px; }
.df-side-cats a {
  display: block;
  position: relative;
  padding: 8px 4px 8px 14px;
  color: var(--df-text);
  border-bottom: 1px dashed #f0f0f0;
}
.df-side-cats a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 5px; height: 5px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--df-blue);
  opacity: .85;
}
.df-side-cats a:hover { color: var(--df-blue); }

.df-side-recent li + li { margin-top: 8px; }
.df-side-recent a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--df-text);
}
.df-side-recent a:hover { color: var(--df-blue); }
.df-side-recent__num {
  font-style: normal;
  font-size: 18px;
  line-height: 1.2;
  color: #f0a070;
  font-weight: 700;
}
.df-side-recent li:nth-child(-n+3) .df-side-recent__num { color: #e85d4c; }
.df-side-recent span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.df-side-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.df-side-links a { color: var(--df-muted); }
.df-side-links a:hover { color: var(--df-blue); }

/* Article */
.df-article {
  background: var(--df-card);
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
  padding: 24px 22px 28px;
}
.df-article__title {
  font-size: 26px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.df-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--df-light);
  font-size: 13px;
  margin-bottom: 14px;
}
.df-article__intro {
  background: #f8fafc;
  border-left: 3px solid var(--df-blue);
  padding: 10px 14px;
  margin-bottom: 18px;
  color: var(--df-muted);
}
.df-article__content { color: #444; font-size: 16px; line-height: 1.85; }
.df-prose p { margin: 0 0 1em; }
.df-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
  border-radius: 2px;
}
.df-prose h2, .df-prose h3 { margin: 1.2em 0 0.6em; }
.df-prose a { color: var(--df-blue); }
.df-article__about {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--df-line);
  color: var(--df-light);
  font-size: 13px;
}

/* 文章页推广条（对齐目标站 new-ad1：头/尾 + 双按钮） */
.df-promo {
  display: block;
  padding: 12px 20px;
  margin: 0 0 16px;
  background: #f5f5f5;
  border: 0;
  border-radius: 10px;
}
.df-promo--bottom { margin: 18px 0 0; }
.df-promo__info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.df-promo__icon {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
}
.df-promo__icon img {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 5px;
  object-fit: cover;
}
.df-promo__body { flex: 1; min-width: 0; overflow: hidden; }
.df-promo__title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.df-promo__desc {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 24px;
  color: #999;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.df-promo__actions {
  margin-top: 15px;
  display: flex;
  gap: 40px;
}
.df-promo__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 12px;
  border-radius: 5px;
  color: #fff !important;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.df-promo__btn--reg { background: #43ab04; }
.df-promo__btn--app { background: #8080ff; }
.df-promo__btn:hover { filter: brightness(1.05); color: #fff !important; }
body.df-dark .df-promo { background: #222a35; }
body.df-dark .df-promo__title { color: #e8edf3; }
body.df-dark .df-promo__desc { color: #8b97a8; }

/* 上下篇（对齐目标站：纵向 上一篇/下一篇） */
.df-prevnext {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
}
.df-prevnext__item a,
.df-prevnext__empty {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--df-text);
  font-size: 14px;
  line-height: 1.6;
}
.df-prevnext__item a:hover { color: var(--df-blue); }
.df-prevnext__item a span,
.df-prevnext__empty {
  color: inherit;
}
.df-prevnext__item strong {
  font-weight: 600;
  color: var(--df-text);
  flex-shrink: 0;
}
.df-prevnext__ico {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  flex-shrink: 0;
  vertical-align: -1px;
  background: center / contain no-repeat;
}
.df-prevnext__item--prev .df-prevnext__ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e85d4c'%3E%3Cpath d='M12 4l-8 8h5v8h6v-8h5L12 4z'/%3E%3C/svg%3E");
}
.df-prevnext__item--next .df-prevnext__ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M12 20l8-8h-5V4H9v8H4l8 8z'/%3E%3C/svg%3E");
}
.df-prevnext__empty { color: var(--df-light); }

.df-related {
  background: #fff;
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  padding: 16px;
  margin-bottom: 20px;
}
.df-related__title {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--df-line);
}
.df-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.df-related__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: #e6ecf2;
  margin-bottom: 8px;
}
.df-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.df-related__item h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search form */
.df-sr-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  max-width: 520px;
}
.df-sr-form__input {
  flex: 1;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: var(--df-radius);
  padding: 0 12px;
}

/* Pagination */
.df-pagination,
.byq-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 20px 0 8px;
}
.df-pagination a,
.df-pagination span,
.byq-pagination a,
.byq-pagination span,
.byq-pagination b {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--df-line);
  background: #fff;
  border-radius: var(--df-radius);
  color: var(--df-muted);
}
.df-pagination .current,
.df-pagination span.current,
.byq-pagination .current,
.byq-pagination b {
  background: var(--df-blue);
  border-color: var(--df-blue);
  color: #fff;
}
.df-pagination a:hover { border-color: var(--df-blue); color: var(--df-blue); }

/* Empty / footer */
.df-empty {
  background: #fff;
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--df-light);
}
.df-empty--page { margin: 40px 0; }
.df-empty__title { font-size: 48px; color: var(--df-blue); margin-bottom: 8px; }

.df-footer {
  margin-top: 24px;
  background: #fff;
  border-top: 1px solid var(--df-line);
  padding: 24px 0 28px;
  color: var(--df-light);
  font-size: 13px;
}
.df-footer__disclaimer {
  background: #fafafa;
  border: 1px solid var(--df-line);
  border-radius: var(--df-radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.df-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
}
.df-footer__meta { margin: 0; }
.df-footer__nav { display: flex; gap: 14px; }
.df-footer__uptime,
.df-footer__beian { color: var(--df-light); }
.df-footer a:hover { color: var(--df-blue); }

/* 右下浮动：夜间模式 + 回顶 */
.df-float {
  position: fixed;
  right: 14px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.df-float__btn {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--df-blue);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(70, 147, 233, 0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.df-float__btn:hover { background: var(--df-blue-deep); }
.df-float__top {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.df-float__top.is-show { opacity: 1; pointer-events: auto; }
.df-backtop { display: none !important; }

/* 夜间模式 */
body.df-dark {
  --df-bg: #12161c;
  --df-card: #1b222c;
  --df-text: #e8edf3;
  --df-muted: #b7c0cc;
  --df-light: #8b97a8;
  --df-line: #2a3340;
  background: var(--df-bg);
  color: var(--df-muted);
}
body.df-dark .df-header,
body.df-dark .df-footer,
body.df-dark .df-widget,
body.df-dark .df-post,
body.df-dark .df-article,
body.df-dark .df-empty,
body.df-dark .df-related,
body.df-dark .df-search-panel {
  background: var(--df-card);
  border-color: var(--df-line);
}
body.df-dark .df-nav__link { color: #c9d3df; }
body.df-dark .df-post__title a,
body.df-dark .df-brand__text,
body.df-dark .df-article__title { color: var(--df-text); }
body.df-dark .df-footer__disclaimer { background: #151b23; border-color: var(--df-line); }

/* Tool pages: align page-bar with new chrome */
.byq-page-bar {
  background: transparent;
  padding: 8px 0 0;
}
.byq-page-bar__title { color: var(--df-text); }
#byq-main { padding-bottom: 24px; }

@media (max-width: 980px) {
  .df-layout,
  .byq-layout { grid-template-columns: 1fr; }
  .df-sidebar {
    order: 2;
    position: static;
  }
  .df-cate-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 28px 0 22px;
    min-height: 160px;
  }
  .df-cate-hero__crumb {
    padding-bottom: 0;
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .df-nav-toggle { display: inline-block; }
  .df-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    background: #fff;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    z-index: 1200;
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.df-dark .df-nav { background: #1b222c; }
  .df-nav.is-open { transform: translateX(0); }
  .df-nav__mhead {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--df-text);
    margin-bottom: 12px;
  }
  .df-nav__mclose {
    display: block;
    position: absolute;
    right: 10px; top: 8px;
    border: 0; background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #666;
  }
  .df-nav__list { flex-direction: column; align-items: stretch; }
  .df-nav__link {
    border-bottom: 0;
    padding: 12px 8px;
  }
  .df-nav__sub {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    padding-left: 12px;
  }
  .df-nav__item.is-open .df-nav__sub { display: block; }
  .df-nav__item:hover .df-nav__sub { display: none; }
  .df-nav__item.is-open:hover .df-nav__sub { display: block; }
}

@media (max-width: 720px) {
  .df-brand__icon { width: 32px; height: 32px; }
  .df-brand__text { font-size: 16px; }
  .df-cate-hero { min-height: 140px; }
  .df-cate-hero__inner { min-height: 140px; padding: 22px 0 18px; }
  .df-cate-hero__title { font-size: 24px; }
  .df-cate-hero__desc {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* 手机分类列表：左文右图（对齐图四） */
  .df-feed--cate { gap: 10px; }
  .df-post {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-radius: 8px;
  }
  .df-post__thumb {
    order: 2;
    width: 118px;
    height: 86px;
    border-radius: 6px;
  }
  .df-post__body {
    order: 1;
    display: flex;
    flex-direction: column;
    min-height: 86px;
  }
  .df-post__title {
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .df-post__desc { display: none; }
  .df-post__cat { display: none; }
  .df-post__meta {
    margin-top: auto;
    padding-top: 0;
    gap: 10px;
    font-size: 12px;
  }
  .df-post__meta time { display: none; }
  .df-post__new {
    width: 44px;
    height: 44px;
    font-size: 10px;
    padding: 4px 3px 0 0;
    /* NEW 挂在缩略图右上：卡片右上角即缩略图角 */
    right: 0;
    top: 0;
  }
  .df-article { padding: 18px 14px 22px; }
  .df-article__title { font-size: 22px; }
  .df-related__grid { grid-template-columns: 1fr; }
  .df-prevnext { padding: 12px; }
  .df-footer__bottom { flex-direction: column; align-items: flex-start; }
  .df-side-links { grid-template-columns: 1fr; }
  .df-promo { padding: 12px 14px; }
  .df-promo__icon,
  .df-promo__icon img { width: 56px; height: 56px; flex-basis: 56px; }
  .df-promo__title { font-size: 17px; }
  .df-promo__desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }
  .df-promo__actions { gap: 12px; margin-top: 12px; }
  .df-promo__btn { height: 42px; font-size: 13px; }
  .df-float {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .df-float__btn {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .df-nav,
  .df-float__top,
  .df-float__btn { transition: none !important; }
}

/* Bridge: older byq feed cards on tool/exchange pages */
.byq-feed__item { background:#fff; border:1px solid #eee; border-radius:2px; box-shadow:0 1px 3px rgba(0,0,0,.03); margin-bottom:12px; }
.byq-feed__link { display:grid; grid-template-columns:180px minmax(0,1fr); gap:14px; padding:14px; }
.byq-feed__thumb { position:relative; width:180px; height:120px; overflow:hidden; border-radius:2px; background:#e6ecf2; }
.byq-feed__thumb img { width:100%; height:100%; object-fit:cover; }
.byq-feed__title { font-size:17px; color:#333; margin:0 0 8px; }
.byq-feed__desc { margin:0; color:#666; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.byq-feed__meta { margin-top:10px; color:#999; font-size:13px; display:flex; gap:12px; flex-wrap:wrap; }
@media (max-width:720px){
  .byq-feed__link { grid-template-columns:1fr; }
  .byq-feed__thumb { width:100%; height:auto; aspect-ratio:16/10; }
}
