/* 顶部导航条 */
.top-nav { max-width: 1280px; width: 100%; margin: 0 auto; padding: 16px 24px 0; display: flex; align-items: center; gap: 20px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; position: relative; z-index: 10; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav__item { display: flex; flex-direction: column; gap: 2px; cursor: pointer; transition: transform .2s, color .2s; }
.top-nav__item:hover { transform: translateY(-1px); }
.top-nav__item:hover .top-nav__title { color: var(--accent-deep); }
.top-nav__title { font-size: .92rem; font-weight: 700; color: var(--ink); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.top-nav__badge { font-size: .6rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; line-height: 1.4; letter-spacing: .05em; }
.top-nav__badge--warm { background: rgba(255, 184, 107, .18); color: #B86E1C; }
.top-nav__badge--pink { background: rgba(255, 126, 179, .18); color: #C22A63; }
.top-nav__badge--blue { background: rgba(79, 168, 255, .15); color: #2C6EAD; }

/* Header */
.site-header { max-width: 1280px; width: 100%; margin: 0 auto; padding: 20px 24px 6px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.brand__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 1.1rem; box-shadow: 0 6px 16px -6px rgba(46, 196, 182, .7); flex: none; }
/* 站点 logo（原图 images/logo.png，此处用等比压缩版 25KB / 省 98%） */
.brand__logo {
  height: 40px;
  width: auto;
  display: block;
  flex: none;
  border-radius: 8px;
  object-fit: contain;
}
.brand__sub { margin-left: 6px; padding: .24rem .62rem; border: 1px solid var(--bd-strong); border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-deep); font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.tagline { margin: 0; color: var(--muted); font-size: .85rem; }
.mobile-menu-btn { display: none; background: var(--surface); border: 1px solid var(--bd); border-radius: 12px; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--ink); font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s, border-color .2s; }
.mobile-menu-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* 布局 */
.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 24px 80px; }
.content { min-width: 0; }
.sidebar { position: sticky; top: 24px; min-width: 0; }

/* 页脚 */
.site-footer { margin-top: auto; padding: 26px 24px 38px; border-top: 1px solid var(--bd); color: var(--muted); font-size: .78rem; text-align: center; }
.site-footer p { margin: 4px 0; }

/* 左侧抽屉 (Drawer) */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15, 40, 40, .4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 2000; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer-overlay.active { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; left: -340px; width: 320px; max-width: 85vw; height: 100vh; background: var(--surface); z-index: 2001; box-shadow: 8px 0 32px rgba(0,0,0,.1); display: flex; flex-direction: column; transition: left .3s cubic-bezier(.4,0,.2,1); border-radius: 0 22px 22px 0; }
.drawer.active { left: 0; }
.drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--bd); }
.drawer__title { font-family: var(--font-title); font-size: 1.1rem; font-weight: 800; margin: 0; }
.drawer__close { background: none; border: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 50%; transition: background .2s, color .2s; display: flex; }
.drawer__close:hover { background: var(--accent-soft); color: var(--ink); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.drawer__link { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 12px; background: transparent; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.drawer__link:hover { background: var(--accent-soft); border-color: var(--bd-strong); }
.drawer__link-title { font-size: .95rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.drawer__link-desc { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* 响应式 */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .sidebar { position: static; }
}
@media (min-width: 961px) {
  .layout:not(:has(.sidebar .ad-slot:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
  .sidebar:not(:has(.ad-slot:not([hidden]))) { display: none; }
}
@media (max-width: 768px) {
  .top-nav { display: none; }
  .site-header { padding: 12px 12px 4px; }
  .header-inner { gap: 8px; position: relative; }
  .brand { font-size: 1.2rem; }
  .brand__icon { width: 32px; height: 32px; border-radius: 8px; font-size: .9rem; }
  .brand__logo { height: 30px; }
  .brand__sub { font-size: .6rem; padding: .15rem .4rem; margin-left: 4px; }
  .tagline { display: none; }
  .mobile-menu-btn { display: flex; }
  .layout { padding: 0 10px 64px; gap: 16px; }
  .sidebar { margin-top: 10px; padding: 14px; }
}