:root {
  --ink: #172126;
  --muted: #68737a;
  --paper: #f6f7f4;
  --white: #ffffff;
  --line: #dde2df;
  --brand: #16795c;
  --brand-dark: #0e5943;
  --accent: #e9a23b;
  --danger: #c44438;
  --shadow: 0 14px 35px rgba(22, 38, 32, .09);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.65;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.icon { width: 18px; height: 18px; stroke-width: 2; flex: 0 0 auto; }
.muted { color: var(--muted); }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }

.site-header {
  height: 68px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner.container { width: min(1480px, calc(100% - 40px)); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--brand); color: white; border-radius: 6px; }
.brand-mark .icon { width: 21px; height: 21px; }
.brand-mark.has-logo { overflow: hidden; background: transparent; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.main-nav { min-width: 0; display: flex; align-items: center; justify-content: space-evenly; gap: clamp(4px, .55vw, 12px); flex: 1; padding: 0 clamp(6px, 1vw, 18px); }
.nav-category { position: relative; flex: 0 0 auto; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 9px 7px; color: #3e494e; font-size: 14px; font-weight: 600; white-space: nowrap; border-radius: 6px; }
.nav-link .nav-label { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link > .icon:last-child { width: 14px; height: 14px; }
.nav-link:hover, .nav-link.active { color: var(--brand); background: #edf5f1; }
.nav-submenu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 190px; padding: 8px; visibility: hidden; opacity: 0; transform: translateY(-5px); background: white; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.nav-submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }
.nav-category:hover .nav-submenu, .nav-category:focus-within .nav-submenu { visibility: visible; opacity: 1; transform: translateY(0); }
.nav-submenu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; color: #465157; border-radius: 5px; font-size: 13px; white-space: nowrap; }
.nav-submenu a:hover, .nav-submenu a:focus { color: var(--brand); background: #edf5f1; }
.nav-submenu .icon { width: 15px; height: 15px; }
.nav-link > .nav-custom-icon, .nav-submenu .nav-custom-icon { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; flex: 0 0 auto; }
.nav-more > .nav-link { border: 0; background: transparent; cursor: pointer; }
.nav-more > .nav-link:hover, .nav-more > .nav-link.active { color: var(--brand); background: #edf5f1; }
.nav-more-menu { left: auto; right: 0; width: min(520px, calc(100vw - 40px)); max-height: min(65vh, 560px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; overflow-y: auto; padding: 10px 14px; }
.nav-category:hover .nav-more-menu, .nav-category:focus-within .nav-more-menu { display: grid; }
.nav-more-group { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nav-more-category { display: grid !important; grid-template-columns: 18px minmax(0, 1fr) 15px; align-items: center; gap: 8px; padding: 7px 8px !important; color: var(--ink) !important; font-size: 14px !important; font-weight: 800; }
.nav-more-category span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-more-category:hover, .nav-more-category.active { color: var(--brand) !important; background: #edf5f1; }
.nav-more-category .category-custom-icon { width: 18px; height: 18px; }
.nav-more-category .icon:last-child { width: 14px; height: 14px; color: var(--muted); }
.nav-more-subcategories { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 0 34px; }
.nav-more-subcategories a { padding: 3px 7px; color: var(--muted); background: #f4f6f4; border-radius: 4px; font-size: 12px; line-height: 1.5; }
.nav-more-empty { display: block; padding: 4px 8px 0 34px; color: #9aa3a6; font-size: 12px; }
.nav-about .nav-submenu { min-width: 220px; }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.header-actions .plain-btn span, .header-actions .primary-btn span { max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn, .plain-btn, .primary-btn, .danger-btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 6px;
  font-weight: 700;
}
.icon-btn { width: 40px; padding: 0; background: transparent; color: var(--ink); }
.icon-btn:hover { background: #edf0ee; }
.plain-btn { padding: 0 14px; background: white; color: var(--ink); border: 1px solid var(--line); }
.primary-btn { padding: 0 17px; background: var(--brand); color: white; }
.primary-btn:hover { background: var(--brand-dark); }
.danger-btn { padding: 0 14px; color: var(--danger); background: #fff0ee; }
.menu-btn { display: none; }

.hero {
  min-height: 460px;
  color: white;
  background-color: rgba(16,29,27,.72);
  background-image: url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1800&q=85");
  background-blend-mode: multiply;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.hero-inner { padding: 70px 0 82px; max-width: 820px; }
.hero h1 { max-width: 700px; margin: 8px 0 14px; font-size: 58px; line-height: 1.15; letter-spacing: 0; }
.hero p { margin: 0 0 28px; font-size: 18px; color: rgba(255,255,255,.82); }
.hero-search { max-width: 720px; height: 58px; display: grid; grid-template-columns: 148px 1fr 58px; background: white; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.hero-search select, .hero-search input { min-width: 0; border: 0; outline: 0; padding: 0 16px; color: var(--ink); background: white; }
.hero-search select { border-right: 1px solid var(--line); }
.hero-search button { border: 0; background: var(--accent); color: #33230c; cursor: pointer; }
.hot-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; align-items: center; font-size: 13px; }
.hot-words button { border: 1px solid rgba(255,255,255,.28); background: rgba(10,20,18,.38); color: white; padding: 5px 10px; border-radius: 4px; cursor: pointer; }

.category-strip { padding: 28px 0; background: #f2f4f5; border-bottom: 1px solid var(--line); }
.home-wide.container { width: min(1480px, calc(100% - 40px)); }
.category-grid.container { width: min(1480px, calc(100% - 40px)); }
.category-grid { display: grid; grid-template-columns: repeat(var(--category-columns, 4), minmax(0, 1fr)); gap: 14px; }
.category-tile { position: relative; height: 126px; min-width: 0; padding: 0; overflow: hidden; color: white; background: var(--ink); border: 0; border-radius: 7px; cursor: pointer; }
.category-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 16, 20, .82), rgba(7, 16, 20, .08) 72%); transition: background .18s ease; }
.category-tile:hover::after { background: linear-gradient(to top, rgba(7, 16, 20, .72), rgba(7, 16, 20, .02) 72%); }
.category-tile-image { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.category-tile:hover .category-tile-image { transform: scale(1.035); }
.category-tile-overlay { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 15px; text-align: left; }
.category-count { position: absolute; top: 10px; right: 10px; padding: 3px 8px; color: white; background: rgba(22, 121, 92, .92); border: 1px solid rgba(255,255,255,.18); border-radius: 5px; font-size: 11px; font-weight: 800; }
.category-tile strong { font-size: 19px; line-height: 1.3; }
.category-icon { width: 50px; height: 50px; display: grid; place-items: center; background: #e6f2ed; color: var(--brand); border-radius: 7px; }
.category-icon .icon { width: 25px; height: 25px; }
.category-custom-icon { width: 70%; height: 70%; object-fit: contain; border-radius: 4px; }
.nav-link .category-custom-icon { width: 18px; height: 18px; }

.category-page { min-height: 70vh; }
.category-page-hero { position: relative; min-height: 190px; overflow: hidden; color: white; background: var(--ink); }
.category-page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(8, 17, 22, .7); }
.category-page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.category-page-hero .container { position: relative; z-index: 1; min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; }
.category-page-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); border-radius: 7px; }
.category-page-icon .icon { width: 27px; height: 27px; }
.category-page-icon .category-custom-icon { width: 34px; height: 34px; }
.category-page-hero h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: 0; }
.category-page-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.76); font-size: 14px; }
.category-filter-band { background: white; border-bottom: 1px solid var(--line); }
.category-filters { padding: 8px 0; }
.category-filter-row { min-height: 52px; display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: center; gap: 16px; border-bottom: 1px solid #edf0ee; }
.category-filter-row:last-child { border-bottom: 0; }
.filter-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.filter-label .icon, .filter-label .category-custom-icon { width: 16px; height: 16px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-options button { min-height: 32px; padding: 4px 11px; color: #465157; background: transparent; border: 0; border-radius: 5px; cursor: pointer; font-size: 13px; }
.filter-options button:hover { color: var(--brand); background: #edf5f1; }
.filter-options button.active { color: white; background: var(--brand); }
.category-results { padding-top: 48px; }
.category-article-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.category-article-grid .article-card { display: flex; flex-direction: column; }
.category-article-grid .article-body { flex: 1; }

.home-ad-section { padding: 22px 0 0; }
.native-ad-carousel { position: relative; overflow: hidden; background: #e9eeeb; border-radius: var(--radius); }
.carousel-track, .native-banner-ad { aspect-ratio: 1920 / 500; }
.native-banner-ad { width: 100%; overflow: hidden; background: #e9eeeb; border-radius: var(--radius); }
.carousel-slide { display: none; }
.carousel-slide.active { display: block; }
.native-banner-ad > img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-ad-copy small { width: max-content; color: #8b6a26; font-size: 10px; font-weight: 800; }
.carousel-controls { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.carousel-arrow { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.18); background: rgba(12,20,22,.62); color: white; cursor: pointer; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: auto; }
.carousel-arrow:hover { background: rgba(12,20,22,.82); }
.carousel-arrow:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.carousel-arrow .icon { width: 20px; height: 20px; }

.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 4px 0 0; font-size: 30px; line-height: 1.25; letter-spacing: 0; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); color: var(--muted); background: white; padding: 8px 13px; border-radius: 5px; cursor: pointer; }
.tab.active { background: var(--ink); border-color: var(--ink); color: white; }
.feature-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; }
.article-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card.featured { grid-row: span 2; }
.article-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.featured .article-cover { aspect-ratio: 16/10; }
.article-body { padding: 18px; }
.article-card h3 { margin: 8px 0 10px; font-size: 18px; line-height: 1.45; letter-spacing: 0; }
.featured h3 { font-size: 24px; }
.article-card p { color: var(--muted); margin: 0 0 15px; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 15px; color: #849097; font-size: 12px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 14px; height: 14px; }
.tag { display: inline-flex; color: var(--brand); background: #eaf4ef; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }

.latest { background: #eef1ed; }
.latest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; align-items: start; }
.article-list { display: grid; gap: 14px; }
.list-item { display: grid; grid-template-columns: 210px 1fr; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.list-item img { width: 100%; height: 100%; min-height: 154px; object-fit: cover; }
.list-copy { padding: 19px 22px; }
.list-copy h3 { margin: 7px 0 7px; font-size: 20px; line-height: 1.4; letter-spacing: 0; }
.list-copy p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.sidebar { position: sticky; top: 92px; }
.sidebar-block { padding: 0 0 27px; margin-bottom: 27px; border-bottom: 1px solid #ccd3ce; }
.sidebar h3 { margin: 0 0 15px; font-size: 18px; }
.rank-list { display: grid; gap: 13px; }
.rank-item { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; cursor: pointer; font-size: 14px; }
.rank-num { color: var(--accent); font-weight: 800; font-size: 18px; line-height: 1.4; }
.newsletter { background: var(--ink); color: white; padding: 24px; border-radius: var(--radius); }
.newsletter p { color: #b7c1c4; font-size: 13px; }
.sidebar-ad { display: block; margin: 0 0 24px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.sidebar-ad:hover { border-color: #bdc8c2; }
.sidebar-ad > img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.sidebar-ad-copy { display: grid; gap: 5px; padding: 14px 15px 16px; }
.sidebar-ad-copy strong { font-size: 15px; line-height: 1.45; }
.sidebar-ad-copy > span { color: var(--muted); font-size: 12px; }
.sidebar-ad-link { display: inline-flex !important; align-items: center; gap: 5px; margin-top: 4px; color: var(--brand) !important; font-weight: 800; }
.sidebar-ad-link .icon { width: 14px; height: 14px; }
.mobile-inline-ad { display: none; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed #cbd3ce; border-radius: var(--radius); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination button { min-width: 38px; height: 38px; border: 1px solid var(--line); background: white; border-radius: 5px; cursor: pointer; }
.pagination button.active { background: var(--brand); color: white; border-color: var(--brand); }

.article-page { padding: 45px 0 80px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 800px) 280px; justify-content: space-between; gap: 48px; }
.article-header h1 { margin: 10px 0 13px; font-size: 38px; line-height: 1.25; letter-spacing: 0; }
.article-hero { width: 100%; aspect-ratio: 16/8.5; object-fit: cover; border-radius: var(--radius); margin: 28px 0; }
.prose { font-size: 17px; color: #303b40; }
.prose p { margin: 0 0 20px; }
.prose h2 { margin: 34px 0 12px; font-size: 25px; }
.prose h3 { margin: 28px 0 10px; font-size: 20px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.site-info-page .article-header { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.site-page-prose { min-height: 280px; padding-top: 30px; }
.page-link-list { display: grid; }
.page-link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; color: var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.page-link-list a:last-child { border-bottom: 0; }
.page-link-list a:hover { color: var(--brand); }
.page-link-list .icon { width: 16px; height: 16px; }
.download-panel { margin-top: 36px; padding: 25px; border-left: 4px solid var(--accent); background: #fff8ec; }
.download-panel h3 { margin: 0 0 7px; }
.download-panel p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.donation-panel { margin-top: 34px; padding: 28px 0; display: grid; grid-template-columns: minmax(0,1fr) 156px; gap: 34px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.donation-copy { display: flex; gap: 16px; align-items: flex-start; }
.donation-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand); background: #eaf4ef; border-radius: 7px; }
.donation-icon .icon { width: 24px; height: 24px; }
.donation-copy h3 { margin: 0 0 6px; font-size: 20px; }
.donation-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.donation-panel figure { margin: 0; text-align: center; }
.donation-panel figure img { width: 140px; height: 140px; margin: 0 auto; object-fit: contain; background: white; border: 1px solid var(--line); padding: 5px; border-radius: 6px; }
.donation-panel figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.comments-section { margin-top: 46px; padding-top: 34px; border-top: 1px solid var(--line); }
.comments-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.comments-head h2 { margin: 3px 0 0; font-size: 25px; }
.comments-head h2 small { color: var(--muted); font-size: 14px; font-weight: 500; }
.commenting-as { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.commenting-as .icon { width: 15px; height: 15px; }
.comment-form { margin-bottom: 28px; border: 1px solid #cfd6d2; background: white; border-radius: 6px; overflow: hidden; }
.comment-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,121,92,.1); }
.comment-form textarea { width: 100%; min-height: 110px; display: block; padding: 14px 16px; border: 0; outline: 0; resize: vertical; }
.comment-form-actions { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 7px 9px 7px 16px; background: #f7f8f6; border-top: 1px solid var(--line); }
.comment-form-actions > span { color: var(--muted); font-size: 11px; }
.comment-login { min-height: 86px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 13px; align-items: center; margin-bottom: 28px; padding: 14px 16px; background: #f1f4f1; border-radius: 6px; }
.comment-login-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--brand); background: white; border-radius: 6px; }
.comment-login strong { font-size: 14px; }
.comment-login p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.comment-list { display: grid; }
.comment-item { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 13px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-avatar { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 50%; font-size: 14px; font-weight: 800; }
.comment-item header { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.comment-item header strong { font-size: 14px; }
.comment-item time { color: #8a9690; font-size: 11px; }
.comment-item p { margin: 7px 0 0; color: #3e494e; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-empty { padding: 30px 0; color: var(--muted); text-align: center; font-size: 13px; }

.auth-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-visual { background-color: rgba(10,30,24,.62); background-image: url("https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=1400&q=85"); background-blend-mode: multiply; background-size: cover; background-position: center; color: white; padding: 80px; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-visual h1 { margin: 0 0 8px; font-size: 42px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: white; }
.auth-form { width: min(420px, 100%); }
.auth-form h2 { margin: 0 0 6px; font-size: 30px; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 25px 0; border-bottom: 1px solid var(--line); }
.auth-switch button { background: transparent; border: 0; padding: 12px; cursor: pointer; color: var(--muted); }
.auth-switch button.active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cfd6d2; background: white; padding: 11px 12px; border-radius: 5px; outline: 0; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,121,92,.1); }
.field-help { color: var(--muted); font-size: 12px; }
.media-field { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px; align-items: center; padding: 12px; background: #f7f8f6; border: 1px solid var(--line); border-radius: 6px; }
.media-preview-wrap { width: 150px; height: 90px; position: relative; display: grid; place-items: center; overflow: hidden; background: #e9eeea; border-radius: 5px; color: #98a49e; }
.media-preview-wrap > span { position: absolute; }
.media-preview { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media-preview.empty { display: none; }
.media-controls { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.media-controls input[data-image-url] { min-width: 0; }
.media-controls .field-help { grid-column: 1 / -1; }
.upload-btn { position: relative; overflow: hidden; white-space: nowrap; }
.upload-btn input, .custom-icon-upload input, .nav-icon-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rich-editor { overflow: hidden; border: 1px solid #cfd6d2; border-radius: 6px; background: white; }
.rich-editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,121,92,.1); }
.rich-toolbar { min-height: 48px; display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: #f5f7f5; border-bottom: 1px solid var(--line); }
.rich-toolbar select { width: 112px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.rich-toolbar button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); border-radius: 4px; cursor: pointer; }
.rich-toolbar button:hover { background: white; color: var(--brand); }
.rich-toolbar button .icon { width: 17px; height: 17px; }
.rich-content { min-height: 250px; padding: 18px; outline: 0; line-height: 1.75; }
.rich-content:empty::before { content: "开始撰写文章正文..."; color: #9aa59f; pointer-events: none; }
.rich-content h2 { margin: 24px 0 10px; font-size: 24px; }
.rich-content h3 { margin: 20px 0 8px; font-size: 19px; }
.rich-content p { margin: 0 0 14px; }
.icon-source { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 14px; background: #f7f8f6; border: 1px solid var(--line); border-radius: 6px; }
.icon-library { display: grid; grid-template-columns: repeat(8, 40px); gap: 7px; }
.icon-choice { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: white; color: #59666a; cursor: pointer; }
.icon-choice:hover, .icon-choice.active { color: var(--brand); border-color: var(--brand); background: #eaf4ef; }
.custom-icon-upload { position: relative; display: flex; align-items: center; gap: 10px; }
.custom-icon-preview { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--brand); }
.custom-icon-preview .icon { width: 24px; height: 24px; }
.custom-icon-preview .category-custom-icon { width: 80%; height: 80%; }
.form-error { min-height: 22px; color: var(--danger); font-size: 13px; margin-bottom: 8px; }
.auth-form .primary-btn { width: 100%; }
.demo-hint { margin-top: 20px; padding: 12px; background: #f3f5f3; color: var(--muted); font-size: 12px; border-radius: 5px; }

.admin-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 230px 1fr; }
.admin-nav { background: var(--ink); color: white; padding: 28px 18px; }
.admin-nav h2 { margin: 0 10px 22px; font-size: 18px; }
.admin-nav button { width: 100%; display: flex; align-items: center; gap: 10px; color: #c6ced1; border: 0; background: transparent; padding: 11px 12px; border-radius: 5px; cursor: pointer; text-align: left; }
.admin-nav button.active, .admin-nav button:hover { background: #2a373a; color: white; }
.admin-main { padding: 36px 4vw 70px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-top h1 { margin: 0; font-size: 28px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { background: white; border: 1px solid var(--line); padding: 20px; border-radius: var(--radius); }
.stat strong { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; }
.admin-content { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-toolbar h2 { margin: 0; font-size: 19px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.data-table th { color: var(--muted); background: #fafbfa; font-weight: 600; }
.table-subcategory { display: block; color: var(--muted); font-size: 11px; }
.thumb { width: 68px; height: 45px; object-fit: cover; border-radius: 4px; }
.row-actions { display: flex; gap: 4px; }
.row-actions button { width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; border-radius: 4px; }
.row-actions button:hover { background: #edf0ee; }
.editor { padding: 24px; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.editor .full { grid-column: 1 / -1; }
.editor-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.icon-preview { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.ad-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ad-setting { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.ad-setting-title { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ad-setting-title h3 { margin: 0; font-size: 16px; }
.ad-setting-title .icon-btn { color: var(--danger); }
.ad-live-preview { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 12px; align-items: center; margin-bottom: 20px; padding: 10px; background: #f3f5f3; border: 1px solid var(--line); border-radius: 6px; }
.ad-live-preview img { width: 100px; height: 64px; object-fit: cover; border-radius: 4px; }
.ad-live-preview span { min-width: 0; display: grid; gap: 2px; }
.ad-live-preview small { color: #8b6a26; font-size: 10px; font-style: normal; }
.ad-live-preview strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ad-live-preview em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; font-style: normal; }
.sidebar-preview { grid-template-columns: 82px minmax(0,1fr); }
.sidebar-preview img { width: 82px; height: 68px; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.donation-admin-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; align-items: start; }
.donation-admin-preview { min-height: 250px; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; align-content: center; padding: 24px; background: #f3f5f3; border: 1px solid var(--line); border-radius: var(--radius); }
.donation-admin-preview small { color: var(--brand); font-size: 11px; font-weight: 800; }
.donation-admin-preview h3 { margin: 5px 0; font-size: 18px; }
.donation-admin-preview p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.donation-admin-preview [data-donation-preview="label"] { color: var(--muted); font-size: 12px; }
.donation-code-placeholder { grid-column: 1 / -1; width: 132px; height: 132px; display: grid; place-items: center; margin: 12px auto 0; overflow: hidden; color: #9aa59f; background: white; border: 1px dashed #c8d0cb; border-radius: 6px; }
.donation-code-placeholder img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.donation-code-placeholder .icon { width: 34px; height: 34px; }
.site-settings-pages { display: grid; gap: 22px; margin-top: 26px; }
.site-brand-settings { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.site-page-editor { padding: 22px; background: #f7f8f6; border: 1px solid var(--line); border-radius: var(--radius); }
.site-page-editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.site-page-editor-head > span { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand); background: white; border: 1px solid var(--line); border-radius: 6px; }
.site-page-editor-head h3 { margin: 0 0 2px; font-size: 17px; }
.site-page-editor-head p { margin: 0; color: var(--muted); font-size: 12px; }
.site-page-editor .rich-content { min-height: 190px; background: white; }
.toggle-row { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--brand); }

.footer-cta { padding: 58px 0 62px; color: white; background: linear-gradient(110deg, #273f73 0%, #68405b 48%, #2a1732 100%); }
.footer-cta-inner { max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-cta-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 12px; color: #dcecff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 7px; }
.footer-cta-icon .icon { width: 23px; height: 23px; }
.footer-cta h2 { margin: 0 0 7px; font-size: 28px; letter-spacing: 0; }
.footer-cta p { max-width: 620px; margin: 0; color: rgba(255,255,255,.72); font-size: 14px; }
.footer-cta-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.footer-cta-button { min-width: 210px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 18px; color: white; background: #287fd4; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; box-shadow: 0 8px 22px rgba(11,26,58,.22); font-size: 14px; font-weight: 800; }
.footer-cta-button:hover { background: #1e6ebd; transform: translateY(-1px); }
.footer-cta-button.secondary { background: #159b70; }
.footer-cta-button.secondary:hover { background: #10845f; }
.footer-cta-button .icon { width: 16px; height: 16px; }
.footer-cta-settings, .about-menu-settings { margin: 26px 0; padding: 22px; background: #f7f8f6; border: 1px solid var(--line); border-radius: var(--radius); }
.about-menu-main { margin-top: 20px; }
.about-links-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 8px; }
.about-links-editor { border-top: 1px solid var(--line); }
.about-link-editor { display: grid; grid-template-columns: 150px minmax(160px, .8fr) minmax(220px, 1.2fr) 40px; align-items: end; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.about-link-editor label { display: grid; gap: 7px; color: #465157; font-size: 12px; font-weight: 700; }
.about-link-editor .icon-btn { margin-bottom: 0; color: var(--danger); background: #fff0ee; }
.nav-icon-field { display: grid; gap: 7px; }
.nav-icon-label { color: #465157; font-size: 12px; font-weight: 700; }
.nav-icon-control { display: grid; gap: 8px; }
.nav-icon-picker { display: grid; grid-template-columns: repeat(4, 32px); gap: 5px; }
.nav-icon-choice { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: #59666a; background: white; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.nav-icon-choice .icon { width: 16px; height: 16px; }
.nav-icon-choice:hover, .nav-icon-choice.active { color: var(--brand); background: #eaf4ef; border-color: var(--brand); }
.nav-icon-choice.active { box-shadow: inset 0 0 0 1px var(--brand); }
.nav-icon-upload { position: relative; display: flex; align-items: center; gap: 8px; }
.nav-icon-upload .plain-btn { min-height: 34px; padding: 0 10px; font-size: 12px; }
.nav-icon-preview { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; color: var(--brand); background: white; border: 1px solid var(--line); border-radius: 5px; }
.nav-icon-preview .icon, .nav-icon-preview .nav-custom-icon { width: 20px; height: 20px; object-fit: contain; }
.download-settings { margin-top: 8px; padding: 18px; background: #f7f8f6; border: 1px solid var(--line); border-radius: var(--radius); }
.download-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.download-settings-head > div { display: grid; gap: 3px; }
.download-settings-head span { color: var(--muted); font-size: 12px; }
.download-links-editor { border-top: 1px solid var(--line); }
.download-link-editor { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(260px, 1.3fr) 40px; align-items: end; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.download-link-editor label { display: grid; gap: 7px; color: #465157; font-size: 12px; font-weight: 700; }
.download-link-editor .icon-btn { color: var(--danger); background: #fff0ee; }
.site-footer { background: #10191c; color: white; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(2, 1fr); gap: 50px; }
.footer-grid p, .footer-grid a { color: #9fabad; font-size: 13px; }
.footer-links { display: grid; gap: 8px; }
.copyright { margin-top: 35px; padding-top: 22px; border-top: 1px solid #2d373a; color: #7e898c; font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; background: var(--ink); color: white; padding: 12px 18px; border-radius: 6px; box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1180px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 12px 20px; background: white; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .main-nav.open { display: flex; }
  .nav-category { width: 100%; }
  .nav-category .nav-link { width: 100%; }
  .nav-link .nav-label { max-width: none; }
  .nav-submenu { position: static; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 2px 0 8px 26px; padding: 4px; visibility: visible; opacity: 1; transform: none; background: #f7f9f7; border: 0; box-shadow: none; }
  .nav-about .nav-submenu { min-width: 0; }
  .nav-more-menu { width: auto; max-height: 52vh; grid-template-columns: 1fr; gap: 0; overflow-y: auto; }
  .nav-more-group { padding: 7px 0; }
  .nav-submenu::before { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions .plain-btn span { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .featured { grid-column: 1 / -1; grid-row: auto !important; display: grid; grid-template-columns: 1.15fr 1fr; }
  .featured .article-cover { height: 100%; aspect-ratio: auto; }
  .latest-layout, .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .desktop-sidebar-ad { display: none; }
  .mobile-inline-ad { display: grid; grid-template-columns: 190px minmax(0,1fr); margin: 0; }
  .mobile-inline-ad > img { height: 100%; min-height: 150px; aspect-ratio: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 300px; padding: 50px; }
  .category-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .category-article-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (min-width: 1181px) and (max-width: 1540px) {
  .header-inner { gap: 12px; }
  .brand { font-size: 18px; }
  .main-nav { gap: 2px; padding-inline: 4px; }
  .nav-link { gap: 5px; padding: 8px 5px; font-size: 13px; }
  .header-actions .plain-btn, .header-actions .primary-btn { width: 40px; padding: 0; }
  .header-actions .plain-btn span, .header-actions .primary-btn span { display: none; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 28px, 1180px); }
  .home-wide.container { width: min(100% - 28px, 1480px); }
  .header-inner.container { width: min(100% - 28px, 1480px); }
  .site-header { height: 60px; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
  .header-actions .plain-btn { display: none; }
  .header-actions .primary-btn { width: 40px; padding: 0; }
  .header-actions .primary-btn span { display: none; }
  .brand { font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }
  .main-nav { top: 60px; }
  .hero { min-height: 480px; }
  .hero-inner { padding: 55px 0; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .hero-search { height: auto; grid-template-columns: 1fr 52px; }
  .hero-search select { grid-column: 1 / -1; height: 44px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-search input, .hero-search button { height: 52px; }
  .category-strip { padding: 18px 0; }
  .category-grid.container { width: 100%; }
  .category-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; padding: 0 14px; }
  .category-tile { height: 110px; }
  .category-page-hero, .category-page-hero .container { min-height: 170px; }
  .category-page-hero .container { justify-content: flex-start; }
  .category-page-hero h1 { font-size: 25px; }
  .category-filter-row { grid-template-columns: 1fr; gap: 7px; padding: 12px 0; }
  .filter-options { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-options button { flex: 0 0 auto; }
  .category-results { padding-top: 36px; }
  .category-article-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .home-ad-section { padding-top: 14px; }
  .carousel-controls { padding: 0 8px; }
  .carousel-arrow { width: 32px; height: 32px; }
  .carousel-arrow .icon { width: 16px; height: 16px; }
  .section-head { align-items: start; flex-direction: column; }
  .section-head h2 { font-size: 25px; }
  .feature-grid { grid-template-columns: 1fr; }
  .featured { grid-column: auto; display: block; }
  .featured .article-cover { aspect-ratio: 16/9; }
  .list-item { grid-template-columns: 112px 1fr; }
  .list-item img { min-height: 165px; }
  .list-copy { padding: 14px; }
  .list-copy h3 { font-size: 16px; }
  .list-copy p { display: none; }
  .sidebar { grid-template-columns: 1fr; }
  .mobile-inline-ad { grid-template-columns: 112px minmax(0,1fr); }
  .mobile-inline-ad > img { min-height: 150px; }
  .article-header h1 { font-size: 30px; }
  .donation-panel { grid-template-columns: 1fr; }
  .donation-panel figure { justify-self: start; margin-left: 62px; }
  .comments-head { align-items: start; flex-direction: column; }
  .comment-login { grid-template-columns: 40px minmax(0,1fr); }
  .comment-login .plain-btn { grid-column: 1 / -1; width: 100%; }
  .comment-item header { align-items: start; flex-direction: column; gap: 2px; }
  .auth-visual { min-height: 240px; padding: 30px; }
  .auth-visual h1 { font-size: 32px; }
  .auth-panel { padding: 34px 20px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { display: flex; overflow-x: auto; padding: 10px 14px; position: sticky; top: 60px; z-index: 20; }
  .admin-nav h2 { display: none; }
  .admin-nav button { width: auto; white-space: nowrap; }
  .admin-main { padding: 26px 14px 60px; }
  .stats { grid-template-columns: 1fr; }
  .admin-content { overflow-x: auto; }
  .data-table { min-width: 720px; }
  .editor { min-width: 0; }
  .editor-grid { grid-template-columns: 1fr; }
  .about-link-editor { grid-template-columns: 1fr 40px; align-items: end; }
  .about-link-editor label, .about-link-editor .nav-icon-field { grid-column: 1 / -1; }
  .about-link-editor .icon-btn { grid-column: 2; }
  .download-settings-head { align-items: stretch; flex-direction: column; }
  .download-settings-head .plain-btn { width: 100%; }
  .download-link-editor { grid-template-columns: 1fr 40px; }
  .download-link-editor label { grid-column: 1 / -1; }
  .download-link-editor .icon-btn { grid-column: 2; }
  .ad-settings-grid { grid-template-columns: 1fr; }
  .date-fields { grid-template-columns: 1fr; gap: 0; }
  .donation-admin-layout { grid-template-columns: 1fr; }
  .media-field { grid-template-columns: 1fr; }
  .media-preview-wrap { width: 100%; height: 150px; }
  .media-controls { grid-template-columns: 1fr; }
  .media-controls .plain-btn { width: 100%; }
  .media-controls .field-help { grid-column: auto; }
  .rich-toolbar { flex-wrap: wrap; }
  .icon-source { grid-template-columns: 1fr; }
  .icon-library { grid-template-columns: repeat(6, 40px); }
  .editor .full { grid-column: auto; }
  .footer-cta { padding: 44px 0 48px; }
  .footer-cta h2 { font-size: 24px; }
  .footer-cta-actions { width: 100%; flex-direction: column; }
  .footer-cta-button { width: 100%; min-width: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
