/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #1D1D1F;
  --gray: #86868B;
  --blue: #0071E3;
  --blue-deep: #0066CC;
  --line: #D2D2D7;
  --alt: #F5F5F7;
  --white: #FFFFFF;
}
html { scroll-behavior: smooth; }
body {
  font-family: "SF Pro SC", "SF Pro Text", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* ===== 顶栏 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1440px; margin: 0 auto; height: 100%;
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.section { scroll-margin-top: 76px; }
.brand { font-size: 20px; font-weight: 700; color: var(--ink); }
.nav { display: flex; gap: 32px; }
.nav a { font-size: 15px; color: var(--ink); transition: opacity .2s; }
.nav a:hover { opacity: .6; }
.cta {
  font-size: 14px; font-weight: 600; color: #fff;
  background: var(--blue); padding: 8px 18px; border-radius: 980px;
  transition: background .2s;
}
.cta:hover { background: var(--blue-deep); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; gap: 4px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 1.5px; background: var(--ink); }

/* ===== Hero ===== */
.hero {
  min-height: 560px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 96px 48px; gap: 28px;
  background: linear-gradient(160deg, #091F4E 0%, #0066CC 50%, #00A1ED 100%);
  color: #fff;
}
.hero h1 { font-size: 60px; font-weight: 700; letter-spacing: -0.5px; }
.hero-sub { font-size: 22px; color: #E8F1FF; }
.hero-btns { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.btn {
  display: inline-block; font-size: 17px; font-weight: 600;
  padding: 14px 32px; border-radius: 980px; transition: transform .15s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: #fff; color: var(--blue-deep); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #fff; }

/* ===== 区块 ===== */
.section { padding: 80px 48px; text-align: center; }
.section-alt { background: var(--alt); }
.section h2 { font-size: 44px; font-weight: 700; letter-spacing: -0.5px; }
.section-sub { font-size: 20px; color: var(--gray); margin: 12px 0 48px; }

/* ===== 项目网格 ===== */
.grid {
  max-width: 1344px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
}
.card {
  width: 432px; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; background: #fff; text-align: left;
  transition: transform .2s, box-shadow .2s;
}
.project-card { padding: 0; color: inherit; font: inherit; cursor: pointer; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.10); }
.thumb {
  position: relative;
  width: 100%; aspect-ratio: 16 / 9; background: var(--alt);
  display: flex; align-items: center; justify-content: center;
}
.thumb span { color: var(--gray); font-size: 14px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.directory-card-media { position: relative; display: block; width: 100%; }
.content-view-badge { position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 3px 7px; border-radius: 999px; background: rgba(10, 16, 24, .72); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.2; pointer-events: none; }
.thumb .content-view-badge { color: #fff; font-size: 11px; }
.admin-view-count { display: block; margin-top: 3px; color: var(--gray); font-size: 12px; }

.project-placeholder {
  position: relative;
  background: #eaf1f8 !important;
}

.project-placeholder span { display: none; }

.project-placeholder::before {
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  top: calc(50% - 36px);
  left: calc(50% - 32px);
  border: 1px solid #7c9ab4;
  border-radius: 12px;
  box-shadow: inset 0 -17px 0 #bed6e9;
}

.project-placeholder::after {
  content: '';
  position: absolute;
  width: 58px;
  height: 4px;
  left: calc(50% - 29px);
  bottom: calc(50% - 50px);
  border-radius: 3px;
  background: #5d96c4;
  box-shadow: 0 -14px 0 #a6c5dd;
}
.card-body { display: flex; flex-direction: column; min-height: 69px; padding: 8px 14px 10px; gap: 3px; }
.tag { font-size: 13px; font-weight: 600; color: var(--blue); }
.card-body h3 { font-size: 17px; font-weight: 700; line-height: 1.32; overflow-wrap: anywhere; }
.card-body p { display: -webkit-box; overflow: hidden; color: var(--gray); font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.card-more { margin-top: 4px; color: var(--blue); font-size: 13px; font-weight: 600; }

/* ===== 工具网格 ===== */
.grid-tools { align-items: stretch; }
.tool-card {
  width: 432px; min-width: 0;
  display: flex; flex-direction: column; align-items: stretch;
  overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 18px;
  background: #fff; text-align: left; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--line); color: var(--ink); font: inherit;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.tool-card.open { box-shadow: 0 10px 24px rgba(0,0,0,0.10); }
.tool-icon {
  width: 100%; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
}
.tool-card-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.home-tool-placeholder,
.directory-tool-placeholder {
  position: relative; display: block; overflow: hidden; background: #e8edf3;
  isolation: isolate;
}
.home-tool-placeholder { width: 100%; height: 100%; }
.directory-tool-placeholder { width: 100%; aspect-ratio: 16 / 9; }
.home-tool-placeholder::before,
.directory-tool-placeholder::before {
  content: ''; position: absolute; width: 44%; aspect-ratio: 1; left: 50%; top: 50%;
  border: 2px solid #9aa9ba; border-radius: 8px; transform: translate(-50%, -50%) rotate(15deg);
}
.home-tool-placeholder::after,
.directory-tool-placeholder::after {
  content: ''; position: absolute; width: 58%; height: 2px; left: 21%; top: 68%; background: #b3bfcb;
  box-shadow: 0 -10px 0 rgba(179, 191, 203, .65);
}
.tool-body { display: flex; flex: 1; flex-direction: column; min-height: 69px; gap: 3px; min-width: 0; padding: 8px 12px 10px; }
.tool-name { font-size: 16px; font-weight: 700; line-height: 1.32; overflow-wrap: anywhere; }
.tool-role { display: -webkit-box; overflow: hidden; color: var(--gray); font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }

/* ===== 项目与工具详情 ===== */
.detail-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.42); backdrop-filter: blur(5px); }
.detail-modal[hidden] { display: none; }
.detail-dialog { position: relative; width: min(720px, 100%); max-height: min(760px, calc(100dvh - 48px)); overflow: auto; padding: 40px; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.detail-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--alt); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.detail-cover { width: 100%; max-height: 320px; margin: -8px 0 24px; border-radius: 12px; object-fit: cover; display: block; }
.detail-kicker { color: var(--blue); font-size: 14px; font-weight: 600; margin: 0 44px 8px 0; }
.detail-view-count { margin: 10px 0 20px; color: var(--gray); font-size: 14px; font-weight: 600; }
.detail-dialog h2 { font-size: 32px; line-height: 1.2; margin: 0; }
.detail-lead { margin: 14px 0 24px; color: var(--gray); font-size: 17px; line-height: 1.7; }
.detail-body { color: #333; font-size: 16px; line-height: 1.85; }
.detail-body p + p { margin-top: 14px; }
body.modal-open { overflow: hidden; }

.home-about { background: #fff; }
.home-about-text { max-width: 760px; margin: 32px auto 0; color: #515154; font-size: 17px; line-height: 1.85; text-align: left; }
.home-about-text p + p { margin-top: 14px; }

/* ===== 独立项目 / 工具页面 ===== */
.page-loading, .page-error { text-align: center; padding: 96px 24px; color: var(--gray); }
.page-error { color: #c00; }
.directory-hero { padding-bottom: 44px; }
.directory-eyebrow { color: var(--blue); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.directory-section { padding-top: 32px; padding-bottom: 96px; }
.content-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 32px auto 0; min-height: 40px; }
.content-pagination-page, .content-pagination-arrow { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 600; }
.content-pagination-page:hover, .content-pagination-arrow:hover { border-color: var(--blue); color: var(--blue); }
.content-pagination-page.is-current { border-color: var(--blue); background: var(--blue); color: var(--white); }
.content-pagination-arrow { font-size: 26px; line-height: 1; }
.content-pagination-arrow.is-disabled { color: #b7b7bd; border-color: #e5e5e8; background: #fafafa; }
.content-pagination-gap { color: var(--gray); padding: 0 2px; }
.directory-empty { width: 100%; text-align: center; }
.directory-tool-card { text-decoration: none; }
.directory-tool-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.directory-card-media--quit { display: grid; aspect-ratio: 16 / 9; place-items: center; background: linear-gradient(135deg, #e8f6ef, #bfe9d2); color: #16885b; font-size: 40px; font-weight: 800; }
.article-list-grid { display: grid; width: min(1344px, 100%); margin: 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.article-list-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.article-list-card:hover { border-color: #adc3d6; box-shadow: 0 8px 20px rgba(26, 48, 68, .07); }
.article-list-media { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #e9eff5; }
.article-list-media img { width: 100%; height: 100%; object-fit: cover; }
.article-list-placeholder { display: block; background: linear-gradient(135deg, #dce7f0, #eef3f7); }
.article-list-copy { display: flex; flex: 1; flex-direction: column; min-height: 69px; gap: 3px; min-width: 0; padding: 8px 14px 10px; }
.article-list-copy strong { color: var(--ink); font-size: 17px; line-height: 1.32; overflow-wrap: anywhere; }
.article-list-copy span { display: -webkit-box; overflow: hidden; color: var(--gray); font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.content-detail-page { max-width: 940px; margin: 0 auto; padding: 56px 24px 104px; }
.back-link { display: inline-flex; margin-bottom: 24px; color: var(--blue); font-size: 15px; font-weight: 600; }
.content-detail-article { max-width: 780px; }
.content-detail-cover { display: block; width: 100%; max-height: 440px; object-fit: cover; border-radius: 16px; margin-bottom: 28px; }
.content-detail-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 700; margin-bottom: 22px; }
.content-detail-article h1 { font-size: 46px; letter-spacing: -0.4px; line-height: 1.16; }
.tool-detail-sections { display: grid; gap: 28px; margin-top: 30px; }
.tool-detail-section { padding-top: 24px; border-top: 1px solid var(--line); }
.tool-detail-section h2 { margin-bottom: 10px; font-size: 22px; }
.tool-detail-section p, .tool-detail-section li { color: #424245; line-height: 1.8; }
.tool-detail-section ul { padding-left: 20px; display: grid; gap: 7px; }
.tool-demo { margin: 0; padding: 14px; background: var(--alt); border-radius: 12px; }
.tool-demo-launch { display: block; width: min(100%, 465px); margin: 0 auto; border: 0; padding: 0; background: #fff; border-radius: 8px; cursor: zoom-in; overflow: hidden; }
.tool-demo-launch:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.tool-demo-launch img { display: block; width: 100%; height: auto; background: #fff; border-radius: 8px; transition: transform .2s ease; }
.tool-demo-launch:hover img { transform: scale(1.01); }
.tool-demo figcaption { margin-top: 10px; color: var(--gray); font-size: 13px; text-align: center; }
.tool-privacy { padding: 18px; border-radius: 10px; background: #eef6ff; color: #16375d; }
.auth-consent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; line-height: 1.5; }
.auth-consent input { width: auto; }
.auth-consent a { color: #0969da; }
.btn-danger { color: #b42318; border-color: #e7a9a4; background: #fff; }
.policy-page { max-width: 860px; margin: 0 auto; padding: 56px 24px 80px; }
.policy-card { background: var(--alt, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 34px; }
.policy-card h1 { margin: 0 0 20px; }
.policy-card h2 { margin: 28px 0 10px; font-size: 19px; }
.policy-card p { color: var(--gray, #5e6875); line-height: 1.8; }
.seo-noscript { max-width: 900px; margin: 24px auto; padding: 0 20px; }
.tool-disclaimer { margin-top: 12px; padding: 14px 16px; border-left: 3px solid #d97706; background: #fff7ed; color: #8a3d12; font-weight: 700; }
.tool-download { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-download-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border-radius: 980px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 700; }
.tool-download-button:hover { background: var(--blue-deep); }
.tool-download-button.is-disabled { background: #d2d2d7; color: #6e6e73; cursor: not-allowed; }
.tool-download-note { color: var(--gray); font-size: 13px; }
.download-links-label { margin: 0 0 18px; color: var(--ink); font-size: 17px; font-weight: 700; }
.download-link-list { display: grid; gap: 12px; }
.download-link-list a { width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: var(--ink); font-size: 16px; line-height: 1.6; text-decoration: none; }
.download-link-list a:hover, .download-link-list a:focus-visible { color: var(--blue); text-decoration: underline; }
.admin-field-help { display: block; margin-top: 6px; color: var(--gray); font-size: 12px; }

/* ===== 演示图片全屏预览 ===== */
body.demo-viewer-open { overflow: hidden; }
.demo-viewer { position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; padding: 84px 28px 28px; background: rgba(9, 12, 18, .96); color: #fff; }
.demo-viewer-toolbar { position: absolute; z-index: 2; top: 20px; right: 24px; display: flex; gap: 8px; }
.demo-viewer-button { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.11); color: #fff; cursor: pointer; transition: background .18s, transform .18s; }
.demo-viewer-button:hover { background: rgba(255,255,255,.22); transform: scale(1.04); }
.demo-viewer-button:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 3px; }
.demo-viewer-button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.demo-viewer-button svg { width: 21px; height: 21px; }
.demo-viewer-button::after { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; max-width: 150px; padding: 6px 8px; border-radius: 6px; background: #fff; color: #17191d; content: attr(data-tooltip); font-size: 12px; line-height: 1.3; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .15s, transform .15s; }
.demo-viewer-button:hover::after, .demo-viewer-button:focus-visible::after { opacity: 1; transform: translateY(0); }
.demo-viewer-stage { width: 100%; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.demo-viewer-stage:active { cursor: grabbing; }
.demo-viewer-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; transform-origin: center; will-change: transform; user-select: none; }

/* ===== 关于 ===== */
.about-hero { padding: 120px 48px 40px; }
.about-hero h1 { font-size: 56px; font-weight: 700; letter-spacing: -0.5px; }
.about-body { padding-top: 40px; padding-bottom: 100px; }
.about-text { max-width: 720px; margin: 0 auto 28px; font-size: 19px; color: #333; line-height: 1.8; }
.about-subtitle { max-width: 720px; margin: 48px auto 16px; font-size: 24px; font-weight: 600; color: var(--ink); }
.quote-box { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.quote-text { font-size: 22px; color: var(--blue-deep); min-height: 32px; transition: opacity .3s; }

/* ===== 页脚 ===== */
.site-footer { background: var(--alt); padding: 64px 48px 32px; }
.footer-inner {
  max-width: 1344px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand .brand { font-size: 20px; font-weight: 700; }
.footer-brand p { color: var(--gray); font-size: 14px; margin-top: 8px; }
.footer-links { display: flex; gap: 64px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.col h4 { font-size: 13px; font-weight: 700; }
.col a,
.col button { font-size: 14px; color: #515154; transition: color .2s; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.col a:hover,
.col button:hover { color: var(--blue); }
.nav .admin-only-link[hidden],
.footer-links .admin-only-link[hidden] { display: none !important; }
.copyright { max-width: 1344px; margin: 40px auto 0; font-size: 13px; color: var(--gray); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.82); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .header-inner { padding: 0 20px; }
  .hero h1 { font-size: 40px; }
  .section { padding: 56px 20px; }
  .card, .tool-card { width: 100%; max-width: 480px; }
}

@media (max-width: 680px) {
  /* Directory cards use a compact two-column layout on phones. */
  .grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
  }

  .card,
  .tool-card {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .project-card {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #172333;
    color: #f7fbff;
    box-shadow: none;
  }

  .project-card:hover { transform: none; box-shadow: none; }

  .project-card:focus-visible,
  .tool-card:focus-visible {
    outline: 3px solid #2374be;
    outline-offset: 2px;
  }

  .project-card .thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    flex: 0 0 auto;
    overflow: hidden;
    background: #2a3c50;
  }

  .project-card .thumb img { object-position: center; }

  .project-placeholder {
    position: relative;
    background: #263a50 !important;
  }

  .project-placeholder::before {
    content: '';
    position: absolute;
    width: 42px;
    height: 42px;
    top: 21px;
    left: calc(50% - 21px);
    border: 1px solid rgba(220, 239, 255, 0.72);
    border-radius: 8px;
    box-shadow: inset 0 -11px 0 rgba(123, 191, 242, 0.28);
  }

  .project-placeholder::after {
    content: '';
    position: absolute;
    width: 38px;
    height: 3px;
    left: 14px;
    bottom: 14px;
    border-radius: 3px;
    background: #9cd4ff;
    box-shadow: 0 -10px 0 rgba(195, 226, 249, 0.45);
  }

  .project-card .card-body {
    flex: 1;
    min-height: 60px;
    padding: 7px 10px 8px;
    gap: 3px;
  }

  .project-card .card-body h3 {
    order: 1;
    margin: 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .project-card .card-body p {
    order: 2;
    margin: 0;
    color: #b9c5d1;
    font-size: 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .project-card .tag {
    order: 3;
    margin-top: auto;
    color: #a9d7ff;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .project-card .card-more {
    order: 4;
    margin-top: 2px;
    color: #8dc9ff;
    font-size: 10px;
    line-height: 1.2;
  }

  .grid-tools { gap: 10px; }

  .tool-card {
    min-height: 0;
    padding: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border-radius: 10px;
    box-shadow: none;
  }

  .tool-card:hover { transform: none; box-shadow: none; }

  .tool-icon,
  .tool-card-cover,
  .directory-tool-cover,
  .directory-tool-placeholder { width: 100%; aspect-ratio: 16 / 9; height: auto; flex: 0 0 auto; border-radius: 0; }

  .tool-body { width: 100%; min-height: 60px; min-width: 0; gap: 2px; padding: 6px 10px 8px; }

  .tool-name {
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .tool-role {
    font-size: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .site-header { height: auto; min-height: 56px; }
  .header-inner { min-height: 56px; height: auto; padding: 0 16px; gap: 10px; position: relative; flex-wrap: wrap; }
  .brand { font-size: 17px; white-space: nowrap; }
  .nav { display: none; }
  .nav.is-open { position: static; order: 4; flex-basis: 100%; width: calc(100% + 32px); margin: 0 -16px; display: flex; flex-direction: column; gap: 0; padding: 8px 20px 16px; background: rgba(255,255,255,.98); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav.is-open a { padding: 12px 4px; font-size: 16px; }
  .cta { margin-left: auto; padding: 7px 12px; font-size: 13px; }
  .menu-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
  .section { padding: 52px 18px; scroll-margin-top: 68px; }
  .section h2 { font-size: 30px; }
  .section-sub { margin-bottom: 32px; font-size: 17px; }
  .hero { min-height: 440px; padding: 72px 20px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 18px; }
  .hero-btns { flex-wrap: wrap; justify-content: center; }
  .detail-modal { padding: 16px; }
  .detail-dialog { max-height: calc(100dvh - 32px); padding: 30px 22px 24px; border-radius: 14px; }
  .detail-dialog h2 { font-size: 26px; }
  .detail-lead, .home-about-text { font-size: 16px; }
  .detail-cover { max-height: 220px; }
  .home-about-text { text-align: left; }
  .directory-hero { padding-top: 56px; padding-bottom: 28px; }
  .directory-section { padding-top: 24px; padding-bottom: 64px; }
  .content-detail-page { padding: 34px 18px 72px; }
  .content-detail-cover { border-radius: 12px; margin-bottom: 22px; }
  .content-detail-article h1 { font-size: 32px; }
  .article-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .article-list-card { border-radius: 10px; }
  .article-list-copy { min-height: 60px; gap: 2px; padding: 6px 10px 8px; }
  .article-list-copy strong { font-size: 13px; line-height: 1.3; }
  .article-list-copy span { font-size: 10px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
  .cover-field { align-items: stretch; flex-direction: column; }
  .cover-field .item-image-upload { max-width: none; }
  .item-row-actions { width: 100%; justify-content: flex-end; }
}

/* ===== 文章详情 ===== */
.article-page { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.article-page h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.5px; }
.article-meta { color: var(--gray); margin: 16px 0 32px; font-size: 14px; }
.article-cover { margin: 24px 0; border-radius: 14px; overflow: hidden; }
.article-cover img { width: 100%; display: block; }
.article-favorite-wrap { margin-top: 24px; }
.section-entry-favorite-wrap { margin-top: 24px; }
.article-body { font-size: 17px; line-height: 1.9; color: #222; }
.article-body p { margin: 0 0 18px; }
.article-body img { max-width: 100%; border-radius: 10px; cursor: zoom-in; }
.article-card { color: inherit; }
.rich-content { overflow-wrap: anywhere; }
.rich-content img, .rich-content video { max-width: 100%; height: auto; }
.detail-body.rich-content img, .section-entry-detail-body img { cursor: zoom-in; }
.rich-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.rich-content td, .rich-content th { padding: 8px; border: 1px solid var(--line); }
.favorite-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin: 0 0 24px; padding: 7px 15px; border: 1px solid #0071e3; border-radius: 980px; background: #fff; color: #0071e3; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.favorite-btn[aria-pressed="true"] { background: #0071e3; color: #fff; }

/* ===== 统一登录与我的 ===== */
.account-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--alt); }
.account-card { width: min(420px, 100%); padding: 36px; border: 1px solid #e5e5e7; border-radius: 16px; background: #fff; }
.account-card .brand { display: inline-block; margin-bottom: 30px; }
.account-card h1 { margin-bottom: 8px; font-size: 30px; }
.account-hint { margin-bottom: 24px; color: var(--gray); font-size: 14px; }
.account-tabs { display: flex; gap: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.account-tabs button { padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--gray); font: inherit; cursor: pointer; }
.account-tabs button.active { border-bottom-color: var(--blue); color: var(--ink); font-weight: 600; }
.account-card label { display: block; margin-bottom: 14px; color: var(--ink); }
.account-card input { display: block; width: 100%; margin-top: 6px; }
.account-error { min-height: 20px; margin: 8px 0 12px; color: #d72d26; font-size: 13px; }
.me-page { max-width: 960px; margin: 0 auto; padding: 56px 24px 96px; }
.me-profile, .me-section { margin-bottom: 20px; padding: 28px; border: 1px solid #e5e5e7; border-radius: 14px; background: #fff; }
.me-profile-head { display: flex; align-items: center; gap: 18px; }
.me-profile-head h1 { font-size: 30px; }.me-profile-head p:last-child { color: var(--gray); }
.profile-avatar { display: inline-grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; border-radius: 50%; color: #fff; font-size: 23px; font-weight: 700; }
.avatar-blue { background: #0071e3; }.avatar-green { background: #34c759; }.avatar-orange { background: #ff9500; }.avatar-purple { background: #5856d6; }.avatar-rose { background: #ff2d55; }.avatar-slate { background: #6e6e73; }
.avatar-orb { background: #155e75; font-size: 30px; }.avatar-tile { border-radius: 12px; background: #7c3aed; font-size: 25px; }.avatar-arc { background: #b45309; font-size: 28px; }.avatar-spark { background: #be185d; font-size: 25px; }.avatar-grid { border-radius: 10px; background: #0f766e; font-size: 24px; }.avatar-wave { background: #1d4ed8; font-size: 27px; }
.profile-form { max-width: 520px; margin-top: 28px; }.profile-form label { display: block; color: var(--ink); }.profile-form input[type="text"], .profile-form input:not([type]) { display: block; width: 100%; margin-top: 6px; }
.profile-form fieldset { margin: 18px 0; padding: 0; border: 0; }.profile-form legend { margin-bottom: 10px; font-size: 14px; color: var(--ink); }
.avatar-options { display: flex; flex-wrap: wrap; gap: 10px; }.avatar-options label { margin: 0; cursor: pointer; }.avatar-options input { position: absolute; opacity: 0; }.avatar-options .profile-avatar { width: 40px; height: 40px; font-size: 16px; border: 3px solid transparent; }.avatar-options .avatar-orb { font-size: 24px; }.avatar-options .avatar-tile, .avatar-options .avatar-arc, .avatar-options .avatar-wave { font-size: 20px; }.avatar-options .avatar-spark, .avatar-options .avatar-grid { font-size: 18px; }.avatar-options input:checked + .profile-avatar { border-color: #1d1d1f; }
.profile-actions { margin-top: 24px; }.profile-actions .btn { min-width: 116px; }
.me-section h2 { margin-bottom: 16px; font-size: 22px; }.me-list { display: grid; gap: 0; }.me-item { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #eee; }.me-item:first-child { border-top: 0; }.me-item strong, .me-item small { display: block; }.me-item small, .me-item time { color: var(--gray); font-size: 13px; }.me-type { color: var(--blue); font-size: 13px; font-weight: 600; }.me-empty { color: var(--gray); }

/* ===== 后台登录 ===== */
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #091F4E, #0066CC); }
.login-card { background: #fff; padding: 40px; border-radius: 20px; width: 320px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card h1 { font-size: 24px; }
.login-sub { color: var(--gray); margin-top: -6px; }
.login-card input { text-align: center; }
.login-err { color: #FF3B30; font-size: 13px; min-height: 16px; }

/* ===== 后台主体 ===== */
.admin-dash { display: flex; min-height: 100vh; }
.admin-side { width: 220px; background: #1D1D1F; color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 8px; flex: 0 0 220px; }
.admin-logo { font-size: 20px; font-weight: 700; padding: 8px 12px 16px; }
.admin-side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tab { background: transparent; border: none; color: #cfcfd2; text-align: left; padding: 12px; border-radius: 10px; cursor: pointer; font-size: 15px; transition: background .2s; }
.tab:hover { background: rgba(255, 255, 255, .08); }
.tab.active { background: #0071E3; color: #fff; }
.logout { background: transparent; border: 1px solid rgba(255, 255, 255, .2); color: #cfcfd2; padding: 10px; border-radius: 10px; cursor: pointer; }
.admin-main { flex: 1; padding: 32px 40px; overflow: auto; background: #fafafa; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.panel-head h2 { font-size: 26px; }
.btn-solid-fill { background: #0071E3; color: #fff; border: none; padding: 10px 20px; border-radius: 980px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-solid-fill.sm { padding: 8px 16px; font-size: 13px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.row-title { font-size: 16px; font-weight: 700; }
.row-sub { font-size: 13px; color: var(--gray); margin-top: 4px; }
.row-actions { display: flex; gap: 14px; }
.lnk { background: none; border: none; color: #0071E3; cursor: pointer; font-size: 14px; }
.lnk.danger { color: #FF3B30; }
.badge { font-size: 12px; background: #e8e8ed; color: #666; padding: 2px 8px; border-radius: 8px; }
.badge.ok { background: #e3f3e7; color: #1a7f37; }
.editor { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.editor h3 { font-size: 18px; }
.form-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.form-group h4 { font-size: 15px; margin-bottom: 12px; color: var(--ink); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--gray); margin-bottom: 10px; }
input, textarea, select { font: inherit; font-size: 14px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { resize: vertical; }
.arr-head { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 8px; font-size: 13px; color: var(--ink); }
.arr { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.item-row label { margin: 0; flex: 1; min-width: 140px; }
.item-row .item-row-detail { flex-basis: 100%; }
.item-row-actions { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.item-row-actions .lnk { min-width: 28px; min-height: 30px; font-size: 18px; }
.item-row-actions .lnk:disabled { color: var(--line); cursor: not-allowed; }
.cover-field { display: flex; gap: 8px; align-items: center; }
.cover-field input[data-k="image"] { min-width: 0; flex: 1; }
.cover-field .item-image-upload { max-width: 126px; padding: 7px; }
.muted { color: var(--gray); font-size: 14px; }
.up-item { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.up-item img { max-width: 160px; border-radius: 10px; border: 1px solid var(--line); }
.up-item input { flex: 1; }

/* ===== 永遇乐式管理后台 ===== */
.admin-body { min-height: 100vh; background: #f5f5f7; color: #1d1d1f; }
.admin-body [hidden] { display: none !important; }
.admin-auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f5f5f7; }
.admin-auth-box { width: min(420px, 100%); padding: 44px 36px; background: #fff; border: 1px solid #e5e5e7; border-radius: 18px; box-shadow: 0 8px 30px rgba(46,42,38,.06); }
.admin-auth-kicker { margin-bottom: 8px; color: #b5762e; font-size: 13px; font-weight: 600; }
.admin-auth-box h1 { margin-bottom: 8px; font-size: 26px; }
.admin-auth-subtitle { margin-bottom: 30px; color: #6e6e73; font-size: 14px; }
.admin-form-label { display: block; margin: 0 0 14px; color: #1d1d1f; font-size: 13px; font-weight: 500; }
.admin-form-label .admin-input { display: block; width: 100%; margin-top: 6px; }
.admin-input { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; background: #fff; color: #1d1d1f; font-size: 14px; outline: none; }
.admin-input:focus { border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.10); }
.admin-textarea { min-height: 90px; line-height: 1.65; }
.admin-login-error { min-height: 20px; margin: -2px 0 12px; color: #d72d26; font-size: 13px; }
.admin-login-submit { width: 100%; min-height: 42px; }
.admin-btn { min-height: 34px; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; background: #fff; color: #1d1d1f; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.admin-btn:hover { background: #f5f5f7; }
.admin-btn:disabled { cursor: not-allowed; opacity: .45; }
.admin-btn-primary { background: #0071e3; color: #fff; }
.admin-btn-primary:hover { background: #0077ed; }
.admin-btn-secondary { border-color: #d2d2d7; background: #f5f5f7; color: #3a3a3c; }
.admin-btn-outline { border-color: #d2d2d7; }
.admin-btn-danger { border-color: #ffcccb; background: #fff; color: #d72d26; }
.admin-btn-danger:hover { border-color: #f3a6a2; background: #fff5f5; }
.admin-btn-small { min-height: 30px; padding: 5px 9px; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 240px; overflow-y: auto; background: #1d1d1f; color: #fff; padding: 24px 0; }
.admin-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 24px 20px; border-bottom: 1px solid rgba(255,255,255,.10); color: #fff; font-size: 20px; font-weight: 600; }
.admin-brand-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #b5762e; color: #fff; font-size: 14px; }
.admin-nav-item { width: 100%; border: 0; background: transparent; padding: 10px 24px; color: rgba(255,255,255,.72); text-align: left; font-size: 14px; cursor: pointer; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,.10); color: #fff; }
.admin-quick-management-nav { margin: 6px 0; }
.admin-quick-management-item { display: flex; align-items: center; gap: 9px; }
.admin-quick-management-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; overflow: hidden; border-radius: 7px; background: #4a586a; color: #fff; font-size: 12px; font-weight: 700; }
.admin-quick-management-icon img { width: 100%; height: 100%; object-fit: cover; }
.admin-sidebar-spacer { flex: 1; min-height: 24px; }
.admin-return-link { color: rgba(255,255,255,.42); }
.admin-main { min-width: 0; flex: 1; margin-left: 240px; }
.admin-topbar { position: sticky; top: 0; z-index: 10; display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; border-bottom: 1px solid #e5e5e7; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.admin-page-title { margin: 0; font-size: 19px; font-weight: 600; }
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }
.admin-user-state { color: #6e6e73; font-size: 13px; }
.admin-content { padding: 28px 36px 56px; }
.admin-page[hidden] { display: none !important; }
.admin-panel { margin-bottom: 18px; border: 1px solid #e5e5e7; border-radius: 12px; background: #fff; padding: 24px; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-panel-title { margin: 0 0 18px; font-size: 17px; font-weight: 600; }
.admin-panel-head .admin-panel-title { margin: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-stat { border-radius: 12px; background: #f5f5f7; padding: 18px; }
.admin-stat p { margin: 0 0 4px; color: #6e6e73; font-size: 12px; }
.admin-stat strong { font-size: 30px; font-weight: 600; }
.admin-dashboard-note p, .admin-muted { color: #6e6e73; font-size: 14px; line-height: 1.7; }
.admin-table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.admin-table th { padding: 11px 14px; border-bottom: 1px solid #e5e5e7; color: #6e6e73; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-align: left; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f2; color: #1d1d1f; font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td small { margin-top: 3px; max-width: 280px; overflow: hidden; color: #86868b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-table-cover { display: block; width: 76px; height: 46px; border-radius: 7px; object-fit: cover; }
.admin-no-cover { color: #86868b; font-size: 12px; }
.admin-row-actions, .admin-sort-controls { display: flex; align-items: center; gap: 6px; }
.admin-icon-btn { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #d2d2d7; border-radius: 6px; background: #fff; color: #3a3a3c; cursor: pointer; }
.admin-icon-btn:disabled { cursor: not-allowed; opacity: .35; }
.admin-sort-controls span { min-width: 16px; color: #6e6e73; font-size: 12px; text-align: center; }
.admin-empty-cell { padding: 28px !important; color: #86868b !important; text-align: center; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.admin-form-grid-compact { align-items: start; }
.admin-download-grid { gap: 0 14px; }
.admin-cover-input { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.admin-cover-input .admin-input { margin-top: 0; }
.admin-upload-inline { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.admin-image-field { display: grid; gap: 8px; min-width: 0; }
.admin-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.admin-cover-preview { min-height: 0; }
.admin-cover-preview img { display: block; max-width: 220px; max-height: 132px; margin-top: 8px; border: 1px solid #e5e5e7; border-radius: 8px; object-fit: contain; }
.admin-board-fieldset { margin: 2px 0; padding: 14px 16px 12px; border: 1px solid #d8d8de; border-radius: 12px; background: #fafafa; }
.admin-board-fieldset legend { padding: 0 6px; color: #1d1d1f; font-size: 14px; font-weight: 600; }
.admin-board-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-board-option { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid #e2e2e8; border-radius: 10px; background: #fff; cursor: pointer; }
.admin-board-option input { flex: 0 0 auto; margin-top: 3px; }
.admin-board-option span { display: grid; gap: 3px; min-width: 0; }
.admin-board-option strong { color: #1d1d1f; font-size: 14px; font-weight: 600; }
.admin-board-option small { color: #6e6e73; font-size: 12px; line-height: 1.45; }
.admin-board-option:has(input:checked) { border-color: rgba(0,113,227,.38); box-shadow: 0 0 0 2px rgba(0,113,227,.08); }
.admin-board-option:has(input:disabled) { background: #f5f7fb; cursor: default; }
.rich-editor-shell { overflow: hidden; border: 1px solid #d2d2d7; border-radius: 8px; background: #fff; }
.rich-editor-shell #richToolbar { border-bottom: 1px solid #e5e5e7; background: #fafafa; }
.rich-editor-shell #richEditor { min-height: 420px; max-height: min(56vh, 680px); overflow-y: auto; }
.rich-editor-shell .w-e-toolbar { flex-wrap: wrap; }
.rich-editor-shell .w-e-text-container { background: #fff; }
.admin-forbidden-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: stretch; justify-content: flex-start; padding: 12px 16px 12px calc(240px + 16px); background: rgba(0,0,0,.40); backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; }
.modal-box { width: min(760px, 100%); max-height: min(86vh, 820px); overflow-y: auto; border-radius: 18px; background: #fff; padding: 30px 32px; box-shadow: 0 18px 60px rgba(0,0,0,.20); }
.admin-item-modal { display: flex; width: 100%; max-width: none; height: calc(100vh - 24px); max-height: calc(100vh - 24px); flex-direction: column; overflow: hidden; border-radius: 18px; padding: 24px 28px 20px; }
.admin-item-modal #itemForm { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.admin-item-modal #itemFields { display: grid; min-height: 0; flex: 1; gap: 16px; overflow-y: auto; padding-right: 4px; }
.admin-item-modal #itemFields > * { min-width: 0; }
.admin-item-modal .modal-header { margin-bottom: 16px; }
.admin-item-modal .modal-actions { margin-top: 16px; padding-top: 12px; border-top: 1px solid #ececf1; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #6e6e73; font-size: 26px; cursor: pointer; line-height: 1; }
.modal-close:hover { background: #f5f5f7; color: #1d1d1f; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.admin-upload-drop { display: grid; min-height: 138px; place-content: center; gap: 7px; margin-top: 16px; border: 1px dashed #b8b8bd; border-radius: 12px; background: #fafafa; color: #0071e3; cursor: pointer; text-align: center; }
.admin-upload-drop small { color: #86868b; font-size: 12px; }
.admin-upload-result { margin-top: 18px; }
.admin-upload-card { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid #e5e5e7; border-radius: 10px; }
.admin-upload-card img { width: 104px; height: 70px; border-radius: 8px; object-fit: contain; background: #f5f5f7; }
.admin-upload-card p { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.admin-upload-card .admin-input { margin-bottom: 8px; }

@media (max-width: 760px) {
  .admin-auth-box { padding: 32px 24px; }
  .admin-layout { display: block; }
  .admin-sidebar { position: static; width: 100%; min-height: auto; padding: 16px; }
  .admin-sidebar-brand { padding: 0 8px 14px; margin-bottom: 4px; }
  .admin-nav-item { display: inline-flex; width: auto; padding: 9px 10px; border-radius: 7px; }
  .admin-quick-management-nav { display: block; max-width: 100%; margin: 0; padding: 0; }
  .admin-quick-management-item { display: flex; width: 100%; padding: 9px 10px; border-radius: 7px; background: transparent; }
  .admin-sidebar-spacer { display: none; }
  .admin-return-link { display: none; }
  .admin-main { margin-left: 0; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px 14px 40px; }
  .admin-panel { padding: 18px; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-media-grid { grid-template-columns: 1fr; }
  .admin-board-list { grid-template-columns: 1fr; }
  .modal-overlay { align-items: stretch; padding: 12px; overflow: hidden; }
  .modal-box { width: 100%; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); min-height: 0; margin: 0; padding: 22px 18px; border-radius: 14px; }
  .admin-item-modal { height: 100%; max-height: none; min-height: 0; padding: 20px 18px 18px; }
  .admin-item-modal #itemFields { overflow-y: auto; padding-right: 0; }
  .admin-cover-input { align-items: stretch; flex-direction: column; }
  .rich-editor-shell #richEditor { min-height: 300px; max-height: 48vh; }
  .rich-editor-shell .w-e-toolbar { max-height: 132px; overflow-y: auto; }
  .admin-upload-inline { text-align: center; }
  .admin-upload-card { align-items: flex-start; flex-direction: column; }
  .content-detail-page { padding: 32px 16px 72px; }
  .content-detail-article h1 { font-size: 34px; }
  .tool-demo { padding: 8px; }
}

@media (max-width: 680px) {
  .account-card { padding: 28px 22px; }
  .me-page { padding: 32px 16px 72px; }
  .me-profile, .me-section { padding: 20px; border-radius: 12px; }
  .me-item { grid-template-columns: 48px minmax(0, 1fr); }
  .me-item time { grid-column: 2; }
  .me-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .demo-viewer { padding: 76px 12px 16px; }
  .demo-viewer-toolbar { top: 12px; right: 12px; gap: 6px; }
  .demo-viewer-button { width: 46px; height: 46px; }
  .demo-viewer-button::after { display: none; }
}

/* ===== 深色首页内容流（仅首页） ===== */
body.home-page { background: #17191d; color: #edf0f5; }
.home-page #app { min-height: 100dvh; }
.home-page .site-footer { background: #101216; color: #aab1bc; border-top: 1px solid #2a2e35; }
.home-page .footer-brand .brand, .home-page .col h4 { color: #f3f5f8; }
.home-page .footer-brand p, .home-page .col a, .home-page .copyright { color: #9ca4af; }
.home-page .col a:hover { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.home-header { position: sticky; top: 0; z-index: 80; height: 64px; background: rgba(20, 22, 27, .94); border-bottom: 1px solid #2a2e35; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.home-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; width: min(1320px, 100%); height: 100%; margin: 0 auto; padding: 0 24px; }
.home-header-left, .home-header-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-nav { display: flex; align-items: center; gap: 22px; }
.home-nav a { color: #b7bec8; font-size: 14px; transition: color .18s ease; }
.home-nav a:hover, .home-nav a:focus-visible { color: #fff; }
.home-brand { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 7px; color: #f8fafc; font-size: 15px; font-weight: 700; letter-spacing: .08em; transform: translate(-50%, -50%); }
.home-brand img { width: 30px; height: 30px; object-fit: contain; border-radius: 7px; }
.home-menu-toggle { display: none; width: 36px; height: 36px; padding: 8px; border: 0; background: transparent; cursor: pointer; }
.home-menu-toggle span { display: block; width: 18px; height: 1.5px; margin: 4px auto; background: #f3f5f8; }
.home-search-toggle { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #e9edf2; cursor: pointer; }
.home-search-toggle:hover, .home-search-toggle:focus-visible { background: #2a2f37; }
.home-search-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.home-account { max-width: 112px; overflow: hidden; color: #edf1f5; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.home-account:hover { color: #fff; }
.home-search { position: absolute; top: 7px; right: 18px; z-index: 4; display: flex; align-items: center; width: min(420px, calc(100vw - 36px)); height: 50px; padding: 0 8px 0 14px; border: 1px solid #3d4652; border-radius: 10px; background: #222831; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.home-search[hidden] { display: none; }
.home-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; }
.home-search input::placeholder { color: #87919f; }
.home-search button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: #c7cdd6; font-size: 24px; line-height: 1; cursor: pointer; }

.home-main { overflow: clip; }
.home-feature { position: relative; width: min(1320px, calc(100% - 48px)); margin: 28px auto 0; }
.home-feature-viewport { position: relative; }
.home-feature-inner { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #303641; border-radius: 16px; background: #22272f; color: #fff; }
.home-feature-inner[hidden] { display: none; }
.home-feature-inner--contact { width: 100%; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.home-feature-inner::after { position: absolute; z-index: 1; inset: 0; content: ''; background: linear-gradient(90deg, rgba(10, 17, 27, .84) 0%, rgba(10, 17, 27, .6) 38%, rgba(10, 17, 27, .16) 68%, rgba(10, 17, 27, .04) 100%); pointer-events: none; }
.home-feature-inner--plain-image::after { display: none; }
.home-feature-inner:focus-visible { outline: 3px solid #79aefa; outline-offset: 3px; }
.home-feature-copy { position: absolute; z-index: 2; inset: 0 auto 0 0; display: flex; width: min(68%, 720px); flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 4.2vw, 68px); }
.home-kicker, .home-feed-heading > span { color: #79aefa; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.home-feature h1 { max-width: 670px; margin: 12px 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.12; letter-spacing: 0; }
.home-feature p { max-width: 590px; color: rgba(255, 255, 255, .82); font-size: 16px; line-height: 1.7; }
.home-feature-link { display: inline-flex; gap: 8px; margin-top: 26px; color: #fff; font-size: 14px; font-weight: 700; }
.home-feature-art { position: absolute; z-index: 0; inset: 0; display: block; overflow: hidden; background: #1b2028; }
.home-feature-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-feature-orbit { position: absolute; width: min(34vw, 440px); aspect-ratio: 1; top: 50%; left: 74%; border: 1px solid #4a5666; border-radius: 50%; transform: translate(-50%, -50%); }
.home-feature-tile { position: absolute; width: clamp(86px, 10vw, 142px); aspect-ratio: 1; top: 50%; left: 74%; border: 1px solid #84aee0; border-radius: 18px; background: #2d435a; box-shadow: inset 0 -34px 0 #385c7e; transform: translate(-50%, -50%) rotate(-9deg); }
.home-feature-line { position: absolute; width: clamp(110px, 12vw, 170px); height: 3px; bottom: 20%; left: 74%; border-radius: 4px; background: #8bbef2; box-shadow: 0 -14px 0 #456986; transform: translateX(-50%); }
.home-feature-controls { position: absolute; z-index: 4; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.home-feature-control { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: rgba(15, 21, 29, .48); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; pointer-events: auto; transition: background .18s ease, transform .18s ease; }
.home-feature-control:hover, .home-feature-control:focus-visible { background: rgba(15, 21, 29, .78); outline: none; transform: scale(1.06); }
.home-feature-dots { position: absolute; bottom: 17px; left: 50%; display: flex; gap: 7px; transform: translateX(-50%); pointer-events: auto; }
.home-feature-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: width .18s ease, background .18s ease; }
.home-feature-dot.is-active { width: 22px; border-radius: 999px; background: #fff; }
.home-feature-dot:focus-visible { outline: 2px solid #79aefa; outline-offset: 3px; }

.home-quick-section { width: min(1320px, calc(100% - 48px)); margin: 16px auto 0; }
.home-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-quick-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-width: 0; width: 100%; padding: 16px; border: 1px solid #303641; border-radius: 12px; background: #20242b; color: inherit; font: inherit; text-align: left; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.home-quick-card:hover { border-color: var(--quick-color); background: #252b33; transform: translateY(-2px); }
.home-quick-card:active, .home-feed-card:active, .home-feature-inner:active { transform: scale(.985); }
.home-quick-card--contact { cursor: pointer; }
.home-quick-icon { grid-row: span 2; display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--quick-color, #3b82f6); color: #fff; font-size: 16px; font-weight: 700; }
.home-quick-icon.has-image { overflow: hidden; background: transparent; }
.home-quick-icon img { width: 100%; height: 100%; object-fit: cover; }
.home-quick-card strong { overflow: hidden; color: #f5f7fa; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.home-quick-card small { overflow: hidden; color: #9da7b4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-contact-panel { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 18px; border: 1px solid #303641; border-radius: 10px; background: #20242b; color: #cbd3dc; }

.home-feed-section { width: min(1320px, calc(100% - 48px)); margin: 42px auto 72px; }
.home-board-tabs-shell { display: grid; gap: 18px; }
.home-board-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding: 0 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.home-board-tabs::-webkit-scrollbar { display: none; }
.home-board-tab {
  flex: 0 0 auto;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #9da7b4;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.home-board-tab:hover,
.home-board-tab:focus-visible { color: #f5f7fa; outline: 0; }
.home-board-tab.is-active { color: #f5f7fa; border-bottom-color: #9fc1ff; }
.home-board-panel[hidden] { display: none; }
.home-content-section + .home-content-section { margin-top: 38px; }
.home-content-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.home-content-section-head h2 { margin: 0 0 4px; color: #f6f8fb; font-size: 27px; line-height: 1.2; }
.home-content-section-head p { margin: 0; color: #929ba7; font-size: 14px; }
.home-content-more { flex: 0 0 auto; color: #9fc1ff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.home-content-more:hover { color: #fff; }
.home-feed { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-feed-card { display: flex; width: 100%; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #303641; border-radius: 12px; background: #20242b; color: #eef2f7; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); animation: home-card-in .36s ease both; animation-delay: var(--card-delay, 0ms); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.home-feed-card:hover { border-color: #4a5b70; background: #252b33; transform: translateY(-3px); }
.home-feed-card[hidden] { display: none; }
.home-card-media { position: relative; display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; background: #293442; }
.home-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-geometry-mark { position: relative; width: 56px; height: 56px; border: 1px solid #b6d6f0; border-radius: 12px; background: #36536e; box-shadow: inset 0 -15px 0 #4d789d; }
.home-geometry-mark::after { content: ''; position: absolute; width: 46px; height: 3px; left: 5px; bottom: -18px; border-radius: 4px; background: #8fc7f2; box-shadow: 0 -10px 0 #547995; }
.home-tool-mark { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 14px; background: var(--tool-color); color: #fff; font-size: 18px; font-weight: 800; }
.home-card-body { display: flex; flex: 0 0 69px; min-height: 69px; max-height: 69px; flex-direction: column; padding: 8px 12px 10px; }
.home-card-topline, .home-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.home-card-type { color: #89bbef; font-size: 11px; font-weight: 700; }
.home-card-category { overflow: hidden; color: #9ca5b1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-card-title { margin-top: 0; color: #f6f8fa; font-size: 15px; line-height: 1.32; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-card-summary { margin-top: 3px; color: #a6aeb9; font-size: 12px; line-height: 1.4; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.home-card-meta { margin-top: auto; padding-top: 11px; color: #85909d; font-size: 11px; }
.home-card-meta span { color: #9fc8f3; font-size: 14px; }
.home-feed-empty, .home-search-empty { color: #a7afba; font-size: 14px; }
.home-search-empty { margin-top: 22px; text-align: center; }
@keyframes home-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) { .home-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .home-header { height: 56px; }
  .home-header-inner { padding: 0 12px; }
  .home-menu-toggle { display: block; }
  .home-nav { display: none; }
  .home-nav.is-open { position: absolute; top: 48px; left: 10px; z-index: 8; display: grid; width: min(248px, calc(100vw - 20px)); gap: 0; overflow: hidden; border: 1px solid #39424e; border-radius: 10px; background: #222831; box-shadow: 0 16px 36px rgba(0, 0, 0, .4); }
  .home-nav.is-open a { padding: 13px 15px; border-bottom: 1px solid #303842; color: #e9edf2; }
  .home-nav.is-open a:last-child { border-bottom: 0; }
  .home-brand { font-size: 14px; }
  .home-brand img { width: 28px; height: 28px; }
  .home-header-actions { gap: 4px; }
  .home-account { max-width: 74px; font-size: 12px; }
  .home-feature { width: calc(100% - 24px); margin-top: 14px; }
  .home-feature-inner { aspect-ratio: 16 / 9; border-radius: 12px; }
  .home-feature-inner::after { background: linear-gradient(90deg, rgba(10, 17, 27, .84) 0%, rgba(10, 17, 27, .6) 52%, rgba(10, 17, 27, .18) 100%); }
  .home-feature-copy { width: 82%; padding: 20px; }
  .home-feature h1 { margin: 8px 0; font-size: 25px; }
  .home-feature p { font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .home-feature-link { margin-top: 13px; font-size: 12px; }
  .home-feature-orbit { width: 52%; top: 50%; left: 77%; }
  .home-feature-tile { width: 68px; left: 77%; border-radius: 12px; box-shadow: inset 0 -22px 0 #385c7e; }
  .home-feature-line { width: 82px; left: 77%; bottom: 18%; box-shadow: 0 -10px 0 #456986; }
  .home-feature-controls { padding: 0 10px; }
  .home-feature-control { width: 32px; height: 32px; font-size: 25px; }
  .home-feature-dots { bottom: 10px; gap: 5px; }
  .home-feature-dot { width: 6px; height: 6px; }
  .home-feature-dot.is-active { width: 17px; }
  .home-quick-section, .home-feed-section { width: calc(100% - 24px); }
  .home-quick-section { margin-top: 10px; }
  .home-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .home-quick-card { min-width: 0; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; min-height: 64px; padding: 8px; border-radius: 10px; text-align: left; }
  .home-quick-icon { grid-row: span 2; align-self: center; justify-self: center; width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
  .home-quick-card strong { align-self: end; font-size: 12px; }
  .home-quick-card small { align-self: start; font-size: 10px; }
  .home-feed-section { margin-top: 30px; margin-bottom: 46px; }
  .home-board-tabs-shell { gap: 14px; }
  .home-board-tabs { gap: 14px; padding-bottom: 2px; }
  .home-board-tab { padding-bottom: 8px; font-size: 14px; }
  .home-content-section + .home-content-section { margin-top: 28px; }
  .home-content-section-head { align-items: center; gap: 12px; margin-bottom: 12px; }
  .home-content-section-head h2 { font-size: 21px; }
  .home-content-section-head p { font-size: 12px; }
  .home-content-more { font-size: 12px; }
  .home-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-feed-card { min-height: 0; border-radius: 10px; }
  .home-card-body { flex-basis: 60px; min-height: 60px; max-height: 60px; padding: 6px 10px 8px; }
  .home-card-title { margin-top: 0; font-size: 13px; line-height: 1.3; }
  .home-card-summary { margin-top: 2px; font-size: 10px; line-height: 1.3; -webkit-line-clamp: 1; }
  .home-card-meta { padding-top: 8px; }
  .home-card-topline, .home-card-meta { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .home-page *, .home-page *::before, .home-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ===== 日间 / 夜间主题 ===== */
.theme-toggle, .home-theme-toggle { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.theme-toggle:hover, .theme-toggle:focus-visible, .home-theme-toggle:hover, .home-theme-toggle:focus-visible { border-color: rgba(0, 113, 227, .24); background: rgba(0, 113, 227, .09); outline: 0; }
.theme-toggle:active, .home-theme-toggle:active { transform: scale(.94); }
.theme-toggle-menu, .home-theme-toggle-menu { display: none; }

/* The compact content flow remains intact; light mode is the explicit default. */
body.home-page:not(.theme-dark) { background: #f4f7fa; color: #202833; }
body.home-page:not(.theme-dark) .site-footer { background: #fff; color: #5e6875; border-top-color: #e0e6ec; }
body.home-page:not(.theme-dark) .footer-brand .brand, body.home-page:not(.theme-dark) .col h4 { color: #1f2935; }
body.home-page:not(.theme-dark) .footer-brand p, body.home-page:not(.theme-dark) .col a, body.home-page:not(.theme-dark) .copyright { color: #697584; }
body.home-page:not(.theme-dark) .col a:hover { color: #0071e3; }
body.home-page:not(.theme-dark) .home-header { background: rgba(255, 255, 255, .9); border-bottom-color: rgba(24, 39, 56, .1); }
body.home-page:not(.theme-dark) .home-nav a { color: #526171; }
body.home-page:not(.theme-dark) .home-nav a:hover, body.home-page:not(.theme-dark) .home-nav a:focus-visible { color: #111b27; }
body.home-page:not(.theme-dark) .home-brand { color: #17202b; }
body.home-page:not(.theme-dark) .home-menu-toggle span { background: #273543; }
body.home-page:not(.theme-dark) .home-search-toggle, body.home-page:not(.theme-dark) .home-theme-toggle { color: #243342; }
body.home-page:not(.theme-dark) .home-search-toggle:hover, body.home-page:not(.theme-dark) .home-search-toggle:focus-visible { background: #edf3f8; }
body.home-page:not(.theme-dark) .home-account { color: #273543; }
body.home-page:not(.theme-dark) .home-account:hover { color: #0071e3; }
body.home-page:not(.theme-dark) .home-search { border-color: #d7e0e8; background: #fff; box-shadow: 0 12px 30px rgba(37, 53, 69, .14); }
body.home-page:not(.theme-dark) .home-search input { color: #1d2935; }
body.home-page:not(.theme-dark) .home-search input::placeholder { color: #8491a0; }
body.home-page:not(.theme-dark) .home-search button { color: #526171; }
body.home-page:not(.theme-dark) .home-feature-inner { border-color: #dce4ec; background: #eaf1f7; color: #fff; box-shadow: 0 12px 30px rgba(35, 52, 70, .08); }
body.home-page:not(.theme-dark) .home-kicker, body.home-page:not(.theme-dark) .home-feed-heading > span { color: #0066cc; }
body.home-page:not(.theme-dark) .home-feature p { color: rgba(255, 255, 255, .86); }
body.home-page:not(.theme-dark) .home-feature-link { color: #fff; }
body.home-page:not(.theme-dark) .home-feature-art { background: #eaf1f7; }
body.home-page:not(.theme-dark) .home-feature-orbit { border-color: #a9bacb; }
body.home-page:not(.theme-dark) .home-feature-tile { border-color: #5684b4; background: #bcd6ea; box-shadow: inset 0 -34px 0 #85b0d0; }
body.home-page:not(.theme-dark) .home-feature-line { background: #579bd2; box-shadow: 0 -14px 0 #96bedc; }
body.home-page:not(.theme-dark) .home-quick-card, body.home-page:not(.theme-dark) .home-feed-card { border-color: #dce4ec; background: #fff; box-shadow: 0 7px 20px rgba(38, 56, 75, .055); }
body.home-page:not(.theme-dark) .home-quick-card:hover { border-color: var(--quick-color); background: #fff; }
body.home-page:not(.theme-dark) .home-feed-card:hover { border-color: #b5c6d7; background: #fff; box-shadow: 0 12px 26px rgba(38, 56, 75, .1); }
body.home-page:not(.theme-dark) .home-quick-card strong, body.home-page:not(.theme-dark) .home-content-section-head h2, body.home-page:not(.theme-dark) .home-card-title { color: #1e2a36; }
body.home-page:not(.theme-dark) .home-quick-card small, body.home-page:not(.theme-dark) .home-content-section-head p, body.home-page:not(.theme-dark) .home-card-summary, body.home-page:not(.theme-dark) .home-card-category, body.home-page:not(.theme-dark) .home-card-meta, body.home-page:not(.theme-dark) .home-feed-empty, body.home-page:not(.theme-dark) .home-search-empty { color: #718091; }
body.home-page:not(.theme-dark) .home-content-more { color: #0066cc; }
body.home-page:not(.theme-dark) .home-content-more:hover { color: #004b99; }
body.home-page:not(.theme-dark) .home-board-tab { color: #7a8796; }
body.home-page:not(.theme-dark) .home-board-tab:hover,
body.home-page:not(.theme-dark) .home-board-tab:focus-visible,
body.home-page:not(.theme-dark) .home-board-tab.is-active { color: #1e2a36; }
body.home-page:not(.theme-dark) .home-board-tab.is-active { border-bottom-color: #0066cc; }
body.home-page:not(.theme-dark) .home-card-type, body.home-page:not(.theme-dark) .home-card-meta span { color: #0066cc; }
body.home-page:not(.theme-dark) .home-card-media { background: #e9f0f6; }
body.home-page:not(.theme-dark) .home-contact-panel { border-color: #dce4ec; background: #fff; color: #526171; box-shadow: 0 7px 20px rgba(38, 56, 75, .055); }
body.home-page:not(.theme-dark) .home-geometry-mark { border-color: #7193b3; background: #bbd3e5; box-shadow: inset 0 -15px 0 #89b1cf; }
body.home-page:not(.theme-dark) .home-geometry-mark::after { background: #5c9bd0; box-shadow: 0 -10px 0 #9bc1dc; }

/* Shared public pages use the same persisted night palette. Admin intentionally stays unchanged. */
body.theme-dark:not(.admin-body):not(.home-page) { --ink: #edf0f5; --gray: #a7b0bc; --line: #303641; --alt: #20242b; --white: #17191d; background: #17191d; color: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .site-header { background: rgba(20, 22, 27, .94); border-bottom-color: #2a2e35; }
body.theme-dark:not(.admin-body):not(.home-page) .brand, body.theme-dark:not(.admin-body):not(.home-page) .nav a { color: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .menu-toggle span { background: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .site-footer { background: #101216; color: #aab1bc; }
body.theme-dark:not(.admin-body):not(.home-page) .footer-brand .brand, body.theme-dark:not(.admin-body):not(.home-page) .col h4 { color: #f3f5f8; }
body.theme-dark:not(.admin-body):not(.home-page) .col a, body.theme-dark:not(.admin-body):not(.home-page) .col button { color: #aab1bc; }
body.theme-dark:not(.admin-body):not(.home-page) .card, body.theme-dark:not(.admin-body):not(.home-page) .tool-card, body.theme-dark:not(.admin-body):not(.home-page) .detail-dialog, body.theme-dark:not(.admin-body):not(.home-page) .me-profile, body.theme-dark:not(.admin-body):not(.home-page) .me-section { background: #20242b; border-color: #303641; color: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .card-body p, body.theme-dark:not(.admin-body):not(.home-page) .tool-role, body.theme-dark:not(.admin-body):not(.home-page) .detail-lead, body.theme-dark:not(.admin-body):not(.home-page) .tool-detail-section p, body.theme-dark:not(.admin-body):not(.home-page) .tool-detail-section li, body.theme-dark:not(.admin-body):not(.home-page) .about-text, body.theme-dark:not(.admin-body):not(.home-page) .article-body, body.theme-dark:not(.admin-body):not(.home-page) .home-about-text { color: #bac2cc; }
body.theme-dark:not(.admin-body):not(.home-page) .tool-demo, body.theme-dark:not(.admin-body):not(.home-page) .section-alt, body.theme-dark:not(.admin-body):not(.home-page) .account-page { background: #20242b; }
body.theme-dark:not(.admin-body):not(.home-page) .tool-demo-launch, body.theme-dark:not(.admin-body):not(.home-page) .tool-demo-launch img { background: #17191d; }
body.theme-dark:not(.admin-body):not(.home-page) .favorite-btn { background: #20242b; color: #79aefa; border-color: #5799df; }
body.theme-dark:not(.admin-body):not(.home-page) .favorite-btn[aria-pressed="true"] { background: #0071e3; color: #fff; }

@media (max-width: 680px) {
  .theme-toggle-header, .home-theme-toggle-header { display: none; }
  .nav.is-open .theme-toggle-menu { display: grid; align-self: flex-start; margin: 2px 0 6px; }
  .home-nav.is-open .home-theme-toggle-menu { display: grid; margin: 8px 10px 5px; color: #e9edf2; }
  body.home-page:not(.theme-dark) .home-nav.is-open { border-color: #dbe4ec; background: #fff; box-shadow: 0 16px 36px rgba(35, 52, 70, .16); }
  body.home-page:not(.theme-dark) .home-nav.is-open a { border-bottom-color: #e4eaf0; color: #334353; }
  body.home-page:not(.theme-dark) .home-nav.is-open .home-theme-toggle-menu { color: #273543; }
  body.theme-dark:not(.admin-body):not(.home-page) .nav.is-open { background: #20242b; border-top-color: #303641; border-bottom-color: #303641; box-shadow: 0 12px 24px rgba(0,0,0,.35); }
  body.theme-dark:not(.admin-body):not(.home-page) .nav.is-open a { color: #edf0f5; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .home-theme-toggle, .public-theme-toggle { transition-duration: .01ms !important; }
}

/* ===== 统一公开页头：日间模式 ===== */
.site-header.public-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 56px;
  min-height: 56px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e8ebef;
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.public-header-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: min(1440px, 100%);
  height: 56px;
  margin: 0 auto;
  padding: 0 18px;
}
.public-header-left,
.public-header-actions { display: flex; align-items: center; min-width: 0; }
.public-header-actions { justify-self: end; gap: 8px; }
.public-menu-toggle {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #202833;
  cursor: pointer;
}
.public-menu-toggle:hover,
.public-menu-toggle:focus-visible,
.public-search-toggle:hover,
.public-search-toggle:focus-visible { background: #f1f4f7; outline: 0; }
.public-menu-toggle span { display: block; width: 18px; height: 1.5px; margin: 3px auto; background: currentColor; }
.public-brand {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  color: #1b2430;
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.public-brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; }
.nav.public-nav {
  position: absolute;
  top: calc(100% + 8px);
  left: 14px;
  z-index: 2;
  display: none;
  width: min(256px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #e2e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(26, 39, 54, .14);
}
.nav.public-nav.is-open { display: grid; gap: 0; }
.nav.public-nav a,
.nav.public-nav button { display: block; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #edf0f3; background: transparent; color: #26313e; font-size: 14px; text-align: left; font: inherit; cursor: pointer; }
.nav.public-nav a:last-child,
.nav.public-nav button:last-child { border-bottom: 0; }
.nav.public-nav a:hover,
.nav.public-nav a:focus-visible,
.nav.public-nav button:hover,
.nav.public-nav button:focus-visible { background: #f5f7f9; color: #0a66c2; opacity: 1; outline: 0; }
.public-search-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #273543;
  cursor: pointer;
}
.public-search-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.public-account,
.public-admin-link { max-width: 108px; overflow: hidden; color: #253443; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.public-account:hover,
.public-admin-link:hover { color: #0071e3; }
.public-admin-link { color: #0066cc; }
.site-search {
  position: absolute;
  top: 7px;
  right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  width: min(420px, calc(100vw - 28px));
  height: 42px;
  padding: 0 8px 0 13px;
  border: 1px solid #dbe2e9;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(27, 42, 58, .14);
}
.site-search[hidden] { display: none; }
.site-search input { width: 100%; border: 0; outline: 0; color: #1e2935; background: transparent; font: inherit; }
.site-search input::placeholder { color: #8793a0; }
.site-search button { width: 30px; height: 30px; border: 0; border-radius: 7px; color: #526171; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.account-page { min-height: calc(100dvh - 56px); }
.footer-contact-col { align-items: center; }
.footer-contact-qr { display: grid; gap: 8px; justify-items: center; }
.footer-contact-qr img,
.footer-contact-qr-placeholder { width: 120px; aspect-ratio: 1; border-radius: 14px; border: 1px solid rgba(0, 0, 0, .08); background: #fff; object-fit: cover; }
.footer-contact-qr-placeholder { display: block; background: linear-gradient(135deg, #edf2f7, #dfe7ef); }
.footer-contact-qr span { font-size: 14px; color: inherit; }
.site-contact-layer[hidden] { display: none; }
.site-contact-layer.is-open { position: fixed; inset: 0; z-index: 118; display: block; pointer-events: auto; }
.site-contact-backdrop { position: fixed; inset: 0; z-index: 119; border: 0; background: rgba(17, 23, 31, .36); pointer-events: auto; }
.site-contact-popover { position: fixed; z-index: 120; width: 220px; padding: 18px 18px 14px; border: 1px solid #d8e0e8; border-radius: 16px; background: rgba(255, 255, 255, .98); box-shadow: 0 18px 42px rgba(20, 34, 50, .18); pointer-events: auto; }
.site-contact-layer.is-modal { pointer-events: auto; }
.site-contact-layer.is-modal .site-contact-popover { width: min(260px, calc(100vw - 28px)); }
.site-contact-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #455261; font-size: 20px; line-height: 1; cursor: pointer; }
.site-contact-qr { display: grid; gap: 10px; justify-items: center; }
.site-contact-qr img,
.site-contact-qr-placeholder { width: 168px; aspect-ratio: 1; border-radius: 12px; background: linear-gradient(135deg, #edf2f7, #dfe7ef); object-fit: cover; }
.site-contact-popover p { margin-top: 12px; text-align: center; color: #253443; font-size: 14px; font-weight: 700; }

@media (max-width: 680px) {
  .public-header-inner { padding: 0 12px; }
  .public-brand { gap: 6px; font-size: 14px; }
  .public-brand img { width: 28px; height: 28px; }
  .public-header-actions { gap: 4px; }
  .public-account,
  .public-admin-link { max-width: 62px; font-size: 12px; }
  .nav.public-nav { left: 10px; width: min(248px, calc(100vw - 20px)); }
  .nav.public-nav a,
  .nav.public-nav button { padding: 13px 15px; font-size: 15px; }
  .site-search { right: 10px; width: calc(100vw - 20px); }
}

/* ===== 统一公开页头：持久化夜间模式 ===== */
.public-theme-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #273543;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.public-theme-toggle:hover,
.public-theme-toggle:focus-visible { background: #f1f4f7; outline: 0; }
.public-theme-toggle:active { transform: scale(.94); }

body.theme-dark:not(.admin-body) { background: #17191d; color: #edf0f5; }
body.theme-dark:not(.admin-body) .site-header.public-header {
  background: rgba(20, 22, 27, .96);
  border-bottom-color: #2e3440;
}
body.theme-dark:not(.admin-body) .public-menu-toggle,
body.theme-dark:not(.admin-body) .public-brand,
body.theme-dark:not(.admin-body) .public-theme-toggle,
body.theme-dark:not(.admin-body) .public-search-toggle { color: #edf0f5; }
body.theme-dark:not(.admin-body) .public-menu-toggle:hover,
body.theme-dark:not(.admin-body) .public-menu-toggle:focus-visible,
body.theme-dark:not(.admin-body) .public-theme-toggle:hover,
body.theme-dark:not(.admin-body) .public-theme-toggle:focus-visible,
body.theme-dark:not(.admin-body) .public-search-toggle:hover,
body.theme-dark:not(.admin-body) .public-search-toggle:focus-visible { background: #2a3039; }
body.theme-dark:not(.admin-body) .nav.public-nav {
  border-color: #363d48;
  background: #20242b;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .38);
}
body.theme-dark:not(.admin-body) .nav.public-nav a,
body.theme-dark:not(.admin-body) .nav.public-nav button { border-bottom-color: #303641; color: #edf0f5; }
body.theme-dark:not(.admin-body) .nav.public-nav a:hover,
body.theme-dark:not(.admin-body) .nav.public-nav a:focus-visible,
body.theme-dark:not(.admin-body) .nav.public-nav button:hover,
body.theme-dark:not(.admin-body) .nav.public-nav button:focus-visible { background: #2b313a; color: #8fc5ff; }
body.theme-dark:not(.admin-body) .public-account { color: #edf0f5; }
body.theme-dark:not(.admin-body) .public-admin-link { color: #8fc5ff; }
body.theme-dark:not(.admin-body) .site-search { border-color: #3a424e; background: #20242b; box-shadow: 0 10px 26px rgba(0, 0, 0, .42); }
body.theme-dark:not(.admin-body) .site-search input { color: #f1f4f7; }
body.theme-dark:not(.admin-body) .site-search input::placeholder,
body.theme-dark:not(.admin-body) .site-search button { color: #aeb7c2; }
body.theme-dark:not(.admin-body) .footer-contact-qr img,
body.theme-dark:not(.admin-body) .footer-contact-qr-placeholder,
body.theme-dark:not(.admin-body) .site-contact-qr img,
body.theme-dark:not(.admin-body) .site-contact-qr-placeholder { border-color: #3a424e; background: #20242b; }
body.theme-dark:not(.admin-body) .site-contact-popover { border-color: #3a424e; background: rgba(23, 25, 29, .98); box-shadow: 0 18px 42px rgba(0, 0, 0, .45); }
body.theme-dark:not(.admin-body) .site-contact-close,
body.theme-dark:not(.admin-body) .site-contact-popover p { color: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .article-list-card,
body.theme-dark:not(.admin-body):not(.home-page) .account-card,
body.theme-dark:not(.admin-body):not(.home-page) .account-tabs,
body.theme-dark:not(.admin-body):not(.home-page) .login-card,
body.theme-dark:not(.admin-body):not(.home-page) .register-card { background: #20242b; border-color: #303641; color: #edf0f5; }
body.theme-dark:not(.admin-body):not(.home-page) .article-list-card h2,
body.theme-dark:not(.admin-body):not(.home-page) .article-list-card h3,
body.theme-dark:not(.admin-body):not(.home-page) .account-card h1,
body.theme-dark:not(.admin-body):not(.home-page) .account-card h2,
body.theme-dark:not(.admin-body):not(.home-page) .login-card h1,
body.theme-dark:not(.admin-body):not(.home-page) .register-card h1 { color: #f3f5f8; }
body.theme-dark:not(.admin-body):not(.home-page) .article-list-card p,
body.theme-dark:not(.admin-body):not(.home-page) .article-list-card time,
body.theme-dark:not(.admin-body):not(.home-page) .account-card p,
body.theme-dark:not(.admin-body):not(.home-page) .account-card label,
body.theme-dark:not(.admin-body):not(.home-page) .login-card p,
body.theme-dark:not(.admin-body):not(.home-page) .register-card p { color: #bac2cc; }
body.theme-dark:not(.admin-body):not(.home-page) .account-card input,
body.theme-dark:not(.admin-body):not(.home-page) .account-card select,
body.theme-dark:not(.admin-body):not(.home-page) .login-card input,
body.theme-dark:not(.admin-body):not(.home-page) .register-card input { border-color: #3a424e; background: #17191d; color: #f1f4f7; }
body.theme-dark:not(.admin-body):not(.home-page) .account-tabs button { color: #c5cdd7; }
body.theme-dark:not(.admin-body):not(.home-page) .account-tabs button.is-active { color: #8fc5ff; border-color: #8fc5ff; }

@media (prefers-reduced-motion: reduce) {
  .public-theme-toggle { transition-duration: .01ms !important; }
}

/* ===== 搜索结果页 ===== */
.search-page-main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}
.search-hero {
  margin-bottom: 22px;
}
.search-hero h1 {
  margin: 0 0 10px;
  color: #1d2935;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.16;
}
.search-summary {
  margin: 0;
  color: #5c6b7a;
  font-size: 15px;
  line-height: 1.7;
}
.search-results {
  display: grid;
  gap: 16px;
}
.search-result-card {
  min-width: 0;
}
.search-result-link {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e2e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(25, 39, 54, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.search-result-link:hover,
.search-result-link:focus-visible {
  transform: translateY(-1px);
  border-color: #cdd7e1;
  box-shadow: 0 16px 34px rgba(25, 39, 54, .12);
  outline: 0;
}
.search-result-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #eef3f8;
}
.search-result-media img,
.search-result-placeholder {
  width: 100%;
  height: 100%;
}
.search-result-media img {
  display: block;
  object-fit: cover;
}
.search-result-placeholder {
  display: block;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.82), transparent 36%),
    linear-gradient(135deg, #d7e4f6, #c6d5eb 52%, #edf3fb);
}
.search-result-placeholder--tool {
  background:
    radial-gradient(circle at 70% 28%, rgba(255,255,255,.78), transparent 28%),
    linear-gradient(135deg, #d9e6fb, #c7d8f3 52%, #eef4fd);
}
.search-result-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 2px 0;
}
.search-result-board {
  color: #0a66c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.search-result-title {
  display: -webkit-box;
  overflow: hidden;
  color: #1d2935;
  font-size: 22px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.search-result-snippet {
  display: -webkit-box;
  overflow: hidden;
  color: #536272;
  font-size: 15px;
  line-height: 1.8;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.search-result-snippet--empty {
  color: #8793a0;
}
.search-empty-state {
  padding: 34px 22px;
  border: 1px dashed #d7dee6;
  border-radius: 14px;
  background: #f8fafc;
  color: #6b7a89;
  text-align: center;
}
.search-empty-state p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

@media (max-width: 760px) {
  .search-page-main {
    width: calc(100vw - 20px);
    padding: 24px 0 44px;
  }
  .search-result-link {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  .search-result-title {
    font-size: 18px;
  }
  .search-result-snippet {
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 4;
  }
}

body.theme-dark.search-page .search-hero h1,
body.theme-dark.search-page .search-result-title {
  color: #f3f5f8;
}
body.theme-dark.search-page .search-summary,
body.theme-dark.search-page .search-result-snippet,
body.theme-dark.search-page .search-empty-state {
  color: #bac2cc;
}
body.theme-dark.search-page .search-result-link {
  border-color: #303641;
  background: #20242b;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
}
body.theme-dark.search-page .search-result-link:hover,
body.theme-dark.search-page .search-result-link:focus-visible {
  border-color: #3f4855;
}
body.theme-dark.search-page .search-result-board {
  color: #8fc5ff;
}
body.theme-dark.search-page .search-empty-state {
  border-color: #3a424e;
  background: #20242b;
}

/* ===== 首页编排后台 ===== */
.admin-panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-home-list { display: grid; gap: 10px; margin-top: 18px; }
.admin-home-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px; border: 1px solid #e5e5e7; border-radius: 10px; background: #fafafa; }
.admin-home-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-home-card-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-home-fields label { display: grid; gap: 5px; min-width: 0; color: #3a3a3c; font-size: 12px; font-weight: 600; }
.admin-home-icon-field { grid-column: span 2; }
.admin-home-icon-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-home-icon-preview { display: grid; min-height: 42px; place-items: start; }
.admin-home-icon-preview img { width: 56px; height: 56px; border: 1px solid #e5e5e7; border-radius: 8px; object-fit: cover; }
.admin-home-check { display: flex !important; align-items: center; gap: 7px !important; padding-top: 27px; }
.admin-home-check input { width: 15px; height: 15px; }
.admin-focus-slides { display: grid; gap: 16px; }
.admin-focus-slide { padding: 16px; border: 1px solid #e0e4e8; border-radius: 10px; background: #fafbfc; }
.admin-focus-slide-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.admin-focus-slide-head > strong { color: #1d1d1f; font-size: 14px; }
@media (max-width: 760px) { .admin-panel-actions { width: 100%; justify-content: flex-start; } .admin-home-row { grid-template-columns: 1fr auto; } .admin-home-row .admin-sort-controls { grid-column: 1; grid-row: 1; } .admin-home-row > .admin-btn { grid-column: 2; grid-row: 1; } .admin-home-fields, .admin-home-card-fields { grid-column: 1 / -1; grid-template-columns: 1fr; } .admin-home-icon-field { grid-column: auto; } .admin-home-check { padding-top: 0; } }

/* ===== 动态独立板块 ===== */
.board-subtabs { width: min(1120px, 100%); margin: 0 auto 22px; }
.board-subtabs-scroll { display: flex; min-width: 0; gap: 8px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.board-subtab { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--gray); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.board-subtab:hover, .board-subtab:focus-visible { border-color: var(--blue); color: var(--blue); outline: none; }
.board-subtab.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.admin-subboard-manager { margin-top: 18px; }
.admin-subboard-rows { display: grid; gap: 10px; margin-top: 16px; }
.admin-subboard-row { display: grid; grid-template-columns: auto minmax(150px, 1fr) minmax(180px, 1.3fr) auto; align-items: end; gap: 12px; padding: 12px; border: 1px solid #e5e5e7; border-radius: 10px; background: #fafafa; }
.admin-subboard-row label { display: grid; gap: 5px; color: #3a3a3c; font-size: 12px; font-weight: 600; }
.admin-subboard-fieldset { background: #f7fafc; }
.admin-subboard-group + .admin-subboard-group { margin-top: 12px; }
.admin-subboard-group > strong { display: block; margin-bottom: 8px; color: #1d1d1f; font-size: 13px; }
.admin-subboard-choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-subboard-option { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid #dbe1e8; border-radius: 8px; background: #fff; color: #30343a; font-size: 13px; }
.admin-batch-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 10px 12px; border: 1px solid #dbe1e8; border-radius: 10px; background: #f7fafc; }
.admin-batch-select-all { display: inline-flex; align-items: center; gap: 7px; color: #30343a; font-size: 13px; font-weight: 700; }
.admin-batch-count { min-width: 86px; color: #58606a; font-size: 13px; }
.admin-batch-toolbar .admin-field-help { flex: 1 1 220px; margin: 0; }
.admin-batch-column, .admin-batch-cell { width: 42px; text-align: center; }
.admin-batch-column input, .admin-batch-cell input { width: 16px; height: 16px; accent-color: var(--blue); }
.admin-batch-modal { width: min(620px, calc(100vw - 32px)); }
.admin-batch-actions { justify-content: flex-end; }
body.theme-dark .board-subtab { border-color: #414957; background: #20242b; color: #c9d1db; }
body.theme-dark .board-subtab.is-active { border-color: #8fc5ff; background: #8fc5ff; color: #132033; }
body.theme-dark .admin-subboard-manager, body.theme-dark .admin-subboard-row, body.theme-dark .admin-subboard-fieldset { border-color: #3a424e; background: #20242b; color: #edf0f5; }
body.theme-dark .admin-subboard-row label, body.theme-dark .admin-subboard-group > strong { color: #edf0f5; }
body.theme-dark .admin-subboard-option { border-color: #3a424e; background: #252b34; color: #edf0f5; }
body.theme-dark .admin-batch-toolbar { border-color: #3a424e; background: #20242b; }
body.theme-dark .admin-batch-select-all, body.theme-dark .admin-batch-count { color: #edf0f5; }
.section-entry-list { padding-top: 8px; padding-bottom: 88px; }
.section-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: min(1120px, 100%); margin: 0 auto; }
.section-entry-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.section-entry-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.section-entry-media { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; background: #e7edf3; }
.section-entry-media img { width: 100%; height: 100%; object-fit: cover; }
.section-entry-placeholder::before { width: 50px; height: 50px; border: 1px solid #91a3b5; border-radius: 13px; content: ''; box-shadow: inset 0 -14px 0 #c4d0da; transform: rotate(-8deg); }
.section-entry-card-copy { display: grid; gap: 5px; min-height: 94px; padding: 13px 14px; }
.section-entry-card-copy strong { color: inherit; font-size: 17px; line-height: 1.32; overflow-wrap: anywhere; }
.section-entry-card-copy span { display: -webkit-box; overflow: hidden; color: var(--gray); font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.section-entry-empty { width: min(1120px, 100%); margin: 0 auto; padding: 30px 0; color: var(--gray); text-align: center; }
.section-entry-detail { width: min(860px, calc(100% - 48px)); margin: 0 auto 96px; }
.section-back-link { display: inline-block; margin-bottom: 22px; color: var(--blue); font-weight: 700; }
.section-entry-detail-cover { display: block; width: 100%; max-height: 460px; margin-bottom: 28px; border-radius: 14px; object-fit: cover; }
.section-entry-detail h2 { margin: 0; color: var(--ink); font-size: clamp(30px, 4vw, 46px); line-height: 1.16; }
.section-entry-detail-lead { margin: 15px 0 28px; color: var(--gray); font-size: 18px; line-height: 1.7; }
.section-entry-detail-body { color: var(--ink); font-size: 16px; line-height: 1.9; }
.section-entry-detail-body img { max-width: 100%; height: auto; }
.section-entry-detail-body video { display: block; width: 100%; max-height: 72dvh; margin: 22px 0; border-radius: 12px; background: #111; object-fit: contain; }
body.theme-dark.section-page .section-entry-card, body.theme-dark.section-page .section-entry-detail { background: #20242b; border-color: #303641; color: #edf0f5; }
body.theme-dark.section-page .section-entry-media { background: #293442; }
body.theme-dark.section-page .section-entry-card-copy span, body.theme-dark.section-page .section-entry-detail-lead { color: #bac2cc; }
body.theme-dark.section-page .section-entry-detail h2, body.theme-dark.section-page .section-entry-detail-body { color: #edf0f5; }
.not-found-page { display: grid; min-height: 70dvh; place-content: center; gap: 14px; padding: 48px 24px; color: var(--ink); text-align: center; }
.not-found-page h1, .not-found-page p { margin: 0; }
.not-found-page h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; }
.not-found-page p { color: var(--gray); }
.not-found-page .button { justify-self: center; margin-top: 8px; }
body.theme-dark .not-found-page { color: #edf0f5; }
body.theme-dark .not-found-page p { color: #bac2cc; }
@media (max-width: 680px) {
  .board-subtabs { width: 100%; margin-bottom: 14px; }
  .board-subtabs-scroll { gap: 7px; padding-left: 1px; padding-right: 1px; }
  .board-subtab { min-height: 34px; padding: 0 13px; font-size: 13px; }
  .admin-subboard-row { grid-template-columns: 1fr auto; align-items: start; }
  .admin-subboard-row .admin-sort-controls { grid-column: 1; }
  .admin-subboard-row > .admin-btn { grid-column: 2; grid-row: 1; }
  .admin-subboard-row label { grid-column: 1 / -1; }
  .admin-batch-toolbar { align-items: flex-start; }
  .admin-batch-toolbar .admin-field-help { flex-basis: 100%; }
  .admin-batch-actions { justify-content: stretch; }
  .admin-batch-actions .admin-btn { flex: 1 1 100%; }
  .section-entry-list { padding: 0 12px 64px; }
  .section-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .section-entry-card { border-radius: 10px; }
  .section-entry-card-copy { min-height: 71px; padding: 8px 10px 10px; }
  .section-entry-card-copy strong { font-size: 13px; }
  .section-entry-card-copy span { font-size: 10px; line-height: 1.35; -webkit-line-clamp: 1; }
  .section-entry-grid.is-dynamic-wallpaper-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .section-entry-grid.is-dynamic-wallpaper-grid .section-entry-card-copy { min-height: 0; padding: 12px 14px 14px; }
  .section-entry-grid.is-dynamic-wallpaper-grid .section-entry-card-copy strong { font-size: 16px; line-height: 1.38; }
  .section-entry-grid.is-dynamic-wallpaper-grid .section-entry-card-copy span { font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; }
  .section-entry-detail { width: calc(100% - 32px); margin-bottom: 72px; }
  .section-entry-detail-cover { margin-bottom: 22px; border-radius: 10px; }
  .section-entry-detail h2 { font-size: 31px; }
  .section-entry-detail-lead { font-size: 16px; }
  .section-entry-detail-body video { max-height: 68dvh; margin: 18px 0; border-radius: 10px; }
}
