@charset "UTF-8";
/* 如意工作室 · 样式表
   方向：浅灰底 + 深色大卡首屏 + 荧光青柠点缀，圆角与软阴影，无衬线大字。 */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0b0f14;
  --ink-2: #151b23;
  --muted: #626b78;
  --muted-2: #8b93a1;
  --line: #e6e9ef;
  --line-2: #eef1f5;
  --lime: #c9f75a;
  --lime-deep: #a8dd2c;
  --lime-soft: #eefbd0;
  --blue: #2f6bff;
  --blue-soft: #e8eeff;
  --amber-soft: #fff0d6;
  --danger: #d64545;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 15, 20, .05);
  --shadow-md: 0 14px 40px rgba(11, 15, 20, .08);
  --shadow-lg: 0 30px 80px rgba(11, 15, 20, .16);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin: 0 auto; }
.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; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 99; border-radius: 8px; }
.skip:focus { left: 12px; top: 12px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.8; }
.small { font-size: 12px; }

.kicker { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--muted-2); text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #eef0f4; color: #48505c; font-size: 12px; font-weight: 600; }
.pill-lime { background: var(--lime); color: #14210a; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid transparent; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: transform .15s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #222a35; }
.btn-lime { background: var(--lime); color: #14210a; }
.btn-lime:hover { background: var(--lime-deep); }
.btn-line { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: #c9cfd9; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--ink); border-color: #c9cfd9; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.icon-btn:hover { border-color: #c9cfd9; }

/* 顶部 */
.announce { background: var(--ink); color: #e8ecf1; font-size: 12.5px; }
.announce-inner { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.announce a { color: var(--lime); margin-left: auto; }
.announce-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(201,247,90,.2); }

.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-inner { height: 66px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: var(--lime);
  font-size: 17px; font-weight: 800;
  box-shadow: inset 0 -6px 14px rgba(201,247,90,.16);
}
.brand-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: none; }
.brand-text strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-text small { display: block; font-size: 10.5px; color: var(--muted-2); letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; color: #3c444f; font-weight: 500;
  transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: #f1f3f6; color: var(--ink); }
.nav a.is-active { background: var(--ink); color: #fff; }
.head-actions { display: flex; align-items: center; gap: 8px; }

/* 首屏 */
.hero {
  position: relative; overflow: hidden;
  margin: 22px auto 0; width: min(var(--wrap), calc(100% - 40px));
  background: var(--ink); color: #f2f5f8;
  border-radius: 28px;
  padding: 60px 56px 48px;
  box-shadow: var(--shadow-lg);
}
.hero-glow {
  position: absolute; width: 760px; height: 760px; right: -220px; top: -320px;
  background: radial-gradient(circle, rgba(201,247,90,.34), rgba(201,247,90,0) 68%);
  filter: blur(30px); pointer-events: none;
}
.hero-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 30%, transparent 78%);
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.12;
  color: #fff; text-wrap: balance;
}
.hero-sub { max-width: 560px; color: rgba(238,242,247,.66); font-size: 15px; line-height: 1.8; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 6px 6px 6px 18px;
  background: rgba(255,255,255,.96); border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  max-width: 560px; color: #5b6470;
}
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 2px; font-size: 14.5px; color: var(--ink); }
.search-box input::placeholder { color: #98a1ae; }
.search-box button {
  border: 0; cursor: pointer; background: var(--ink); color: var(--lime);
  font-weight: 700; font-size: 13.5px; padding: 10px 20px; border-radius: 999px;
}
.search-box button:hover { background: #232b36; }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; color: rgba(238,242,247,.55); font-size: 12.5px; }
.hero-stats strong { color: var(--lime); font-size: 16px; margin-right: 3px; }

/* 栏目卡 */
.portals {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: -34px; position: relative; z-index: 3;
}
.portal-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8dee8; }
.portal-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #14210a;
}
.portal-box .portal-icon { background: var(--lime-soft); color: #4b6b12; }
.portal-guide .portal-icon { background: var(--blue-soft); color: #244db3; }
.portal-ji .portal-icon { background: var(--amber-soft); color: #8a5a10; }
.portal-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.portal-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted-2); }
.portal-body strong { font-size: 17px; }
.portal-desc { font-size: 12.5px; color: var(--muted); }
.portal-arrow { margin-left: auto; color: var(--muted-2); font-size: 15px; }
.portal-card:hover .portal-arrow { color: var(--ink); }

/* 区块 */
.section { padding: 56px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; margin-top: 4px; }
.count { font-size: 12.5px; color: var(--muted-2); }
.link-more { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; }
.link-more:hover { color: var(--ink); }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 内容卡 */
.entry-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.entry-link { display: flex; flex-direction: column; height: 100%; }
.entry-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e9edf3; }
.entry-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.entry-card:hover .entry-media img { transform: scale(1.04); }
.entry-media-empty {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(140deg, #eef2f8, #e3eaf5 55%, #eaf0e4);
}
.entry-media-empty span { font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: #9aa8bd; }
.entry-body { display: flex; flex-direction: column; gap: 7px; padding: 16px 16px 15px; flex: 1; }
.entry-title { font-size: 16px; font-weight: 700; line-height: 1.45; }
.entry-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.entry-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted-2); }
.meta-dot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: rgba(11,15,20,.72); color: #fff;
  backdrop-filter: blur(6px);
}
.entry-media .chip { position: absolute; left: 10px; top: 10px; }
.chip-box { background: rgba(201,247,90,.92); color: #14210a; }
.chip-guide { background: rgba(47,107,255,.92); }
.chip-ji { background: rgba(255,196,92,.95); color: #2b1c00; }

/* 首页价值卡 */
.value-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 70px; }
.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.value-icon { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.value-card h3 { font-size: 15.5px; margin: 8px 0 6px; }
.value-card p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* 栏目头图 */
.band { background: var(--ink); color: #eef2f7; padding: 46px 0; position: relative; overflow: hidden; }
.band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 320px at 85% -20%, rgba(201,247,90,.22), transparent 62%);
}
.band-inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 8px 0 8px; color: #fff; }
.band p { color: rgba(238,242,247,.62); font-size: 13.5px; max-width: 520px; }
.band .kicker { color: rgba(201,247,90,.8); }
.search-inline { margin: 0; max-width: 380px; width: 100%; background: rgba(255,255,255,.1); box-shadow: none; border: 1px solid rgba(255,255,255,.16); color: #cfd6df; padding-left: 16px; }
.search-inline input { color: #fff; }
.search-inline input::placeholder { color: rgba(238,242,247,.45); }
.search-inline button { background: var(--lime); color: #14210a; }
.band-shop::after { background: radial-gradient(700px 320px at 85% -20%, rgba(255,196,92,.22), transparent 62%); }
.band-shop .kicker { color: rgba(255,196,92,.85); }
.shop-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* 宝盒目录 */
.dir-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 32px; padding: 32px 0 70px; }
.dir-aside { position: sticky; top: 86px; align-self: start; }
.dir-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--muted-2); margin-bottom: 10px; }
.dir-nav { display: flex; flex-direction: column; gap: 2px; }
.dir-nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: 9px; font-size: 13px; color: #3c444f;
}
.dir-nav a:hover { background: #eceff4; }
.dir-nav em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.dir-tip { margin-top: 20px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.dir-tip strong { font-size: 12.5px; }
.dir-tip p { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.75; }
.dir-group { margin-bottom: 34px; scroll-margin-top: 90px; }
.dir-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dir-group-head h2 { font-size: 17px; }
.dir-group-head span { font-size: 11.5px; color: var(--muted-2); }
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.site-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 14px; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.site-tile:hover { border-color: #cfd7e2; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.site-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none; overflow: hidden;
  display: grid; place-items: center;
  background: #f0f3f8; color: #3a4450; font-weight: 700; font-size: 15px;
}
.site-icon img { width: 100%; height: 100%; object-fit: cover; }
.site-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.site-name { font-size: 13.5px; font-weight: 600; }
.site-desc { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-tags { display: flex; gap: 5px; margin-top: 3px; }
.site-tags em { font-style: normal; font-size: 10px; color: #6c757f; background: #f2f4f8; padding: 1px 6px; border-radius: 5px; }
.site-host { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.dir-total { font-size: 12px; color: var(--muted-2); padding-top: 8px; }

/* 商城 */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 28px; padding: 28px 0 70px; align-items: start; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter { padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: #4a525d; }
.filter:hover { border-color: #cbd3df; }
.filter.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-media { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef1f5; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media-empty { display: grid; place-items: center; height: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: .28em; color: #9aa4b2; }
.product-media .chip { position: absolute; left: 9px; top: 9px; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.product-desc { font-size: 12px; color: var(--muted); line-height: 1.7; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.shop-note { margin-top: 18px; font-size: 12px; color: var(--muted-2); }
.shop-aside { position: sticky; top: 86px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: 18px; margin: 6px 0 8px; }
.contact-card > p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.qr { width: 148px; height: 148px; object-fit: contain; margin: 16px auto 6px; border-radius: 12px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.qr-note { display: block; text-align: center; font-size: 11px; color: var(--muted-2); }
.contact-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.contact-hours { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); text-align: center; }

/* 详情页 */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted-2); padding: 22px 0 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs-cur { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 20px 0 64px; align-items: start; }
.article { min-width: 0; }
.article-head { padding: 6px 0 20px; }
.article-head h1 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 12px 0 12px; letter-spacing: -.025em; }
.article-lead { font-size: 15px; color: var(--muted); line-height: 1.85; max-width: 680px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; font-size: 11.5px; color: var(--muted-2); }
.article-tags { display: flex; gap: 6px; }
.article-tags em { font-style: normal; color: var(--blue); }
.article-cover { margin: 0 0 24px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: #eef1f5; }
.article-cover img { width: 100%; max-height: 460px; object-fit: cover; }
.article-aside { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.side-card h2 { font-size: 15px; }
.side-text { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: 8px 0 14px; }
.side-price { display: block; font-size: 24px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.02em; }
.side-buy > p { font-size: 12px; color: var(--muted); }
.side-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.side-hours { display: block; margin-top: 10px; font-size: 11px; color: var(--muted-2); text-align: center; }
.article-cta {
  margin-top: 28px; padding: 18px 20px; border-radius: var(--r-md);
  background: var(--ink); color: #eef2f7;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.article-cta strong { display: block; font-size: 14.5px; }
.article-cta p { font-size: 12px; color: rgba(238,242,247,.6); margin-top: 3px; }

/* 正文 */
.prose { font-size: 15px; line-height: 1.95; color: #232a33; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 21px; margin-top: 1.8em; }
.prose h3 { font-size: 17.5px; margin-top: 1.6em; }
.prose h4 { font-size: 15.5px; margin-top: 1.4em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: #1b4fd8; }
.prose img { border-radius: var(--r-sm); border: 1px solid var(--line); margin: 6px auto; max-height: 560px; width: auto; max-width: 100%; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .3em 0; }
.prose blockquote {
  margin: 1.2em 0; padding: 12px 16px; border-radius: 10px;
  background: #f4f6fa; color: #465060; font-size: 14px;
  border-left: 3px solid #cfd7e4;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.icode {
  font-family: var(--mono); font-size: 12.8px;
  background: #eef1f6; color: #b3336b;
  padding: 2px 6px; border-radius: 6px; border: 1px solid #e4e8ef;
  white-space: nowrap;
}
.code-card {
  margin: 1.4em 0; border-radius: 14px; overflow: hidden;
  background: #0d1218; border: 1px solid #1c242e;
  box-shadow: var(--shadow-sm);
}
.code-card figcaption {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: #141b24; border-bottom: 1px solid #1f2833;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: #8fa0b3;
}
.copy-btn {
  border: 1px solid #2b3644; background: #182029; color: #b9c6d4;
  font-size: 11px; padding: 4px 10px; border-radius: 7px; cursor: pointer;
  transition: all .15s ease;
}
.copy-btn:hover { color: #fff; border-color: #3a4757; }
.copy-btn.is-done { background: var(--lime); color: #14210a; border-color: var(--lime); }
.code-card pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; }
.code-card code { font-family: var(--mono); font-size: 12.8px; line-height: 1.75; color: #d7e2ee; background: none; padding: 0; display: block; }

/* 空状态 / 分页 */
.empty {
  display: flex; align-items: center; gap: 16px;
  padding: 26px 24px; background: var(--surface);
  border: 1px dashed #d8dee8; border-radius: var(--r-md);
}
.empty-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--lime-soft); color: #5b7a1a; display: grid; place-items: center; flex: none; }
.empty strong { font-size: 14.5px; }
.empty p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.pager-info { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.notfound { padding: 90px 0 110px; max-width: 620px; }
.notfound h1 { font-size: 2rem; margin: 10px 0 10px; }
.notfound p { color: var(--muted); margin-bottom: 22px; }

/* 页脚 */
.site-foot { background: var(--ink); color: rgba(233,238,244,.62); margin-top: 80px; padding: 52px 0 20px; }
.foot-top { display: grid; grid-template-columns: 1.6fr .8fr 1fr .9fr; gap: 36px; padding-bottom: 36px; }
.foot-top.has-qr { grid-template-columns: 1.5fr .7fr .95fr .8fr auto; gap: 30px; }
.foot-sponsor a { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.foot-sponsor img {
  width: 104px; height: 104px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 5px;
}
.foot-sponsor span { font-size: 10.5px; letter-spacing: .06em; color: rgba(233,238,244,.45); }
.foot-sponsor a:hover span { color: var(--lime); }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: rgba(233,238,244,.45); }
.foot-brand p { margin-top: 14px; font-size: 12.5px; line-height: 1.85; max-width: 320px; color: rgba(233,238,244,.55); }
.foot-contact { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 11.5px; color: rgba(233,238,244,.5); }
.foot-contact a:hover { color: var(--lime); }
.foot-col h2 { font-size: 12px; letter-spacing: .12em; color: rgba(201,247,90,.85); margin-bottom: 12px; font-family: var(--mono); font-weight: 500; }
.foot-col li { margin-bottom: 8px; font-size: 12.5px; }
.foot-col a:hover { color: var(--lime); }
.foot-empty { font-size: 11.5px; color: rgba(233,238,244,.35); line-height: 1.8; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px; color: rgba(233,238,244,.35);
}
.foot-legal { display: flex; gap: 14px; }
.foot-legal a:hover { color: var(--lime); }

.flash { margin: 16px 0 0; padding: 11px 15px; border-radius: 10px; background: var(--lime-soft); color: #40551a; font-size: 13px; border: 1px solid #dcefb4; }
.flash-error { background: #fdecec; color: #9c3232; border-color: #f6d4d4; }

/* 后台 */
.admin-body { background: #f2f4f7; }
.admin-head { background: var(--ink); color: #eef2f7; position: sticky; top: 0; z-index: 20; }
.admin-head-inner { height: 60px; display: flex; align-items: center; gap: 24px; }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; }
.admin-brand strong { display: block; font-size: 14px; color: #fff; line-height: 1.3; }
.admin-brand small { display: block; font-size: 10px; color: rgba(238,242,247,.4); font-family: var(--mono); letter-spacing: .1em; }
.admin-nav { display: flex; gap: 4px; margin-left: auto; }
.admin-nav a { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: rgba(238,242,247,.66); }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.is-active { background: var(--lime); color: #14210a; }
.admin-logout { background: transparent; border: 1px solid rgba(255,255,255,.18); color: rgba(238,242,247,.7); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.admin-logout:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.admin-main { padding: 28px 0 70px; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-page-head h1 { font-size: 26px; }
.admin-lead { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat strong { font-size: 19px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.admin-table th { text-align: left; padding: 10px 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted-2); font-weight: 500; border-bottom: 1px solid var(--line); background: #fafbfc; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td strong { display: block; font-weight: 600; }
.admin-table td small { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.nowrap { white-space: nowrap; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-published { background: var(--lime-soft); color: #4d6b12; }
.status-draft { background: #eef0f4; color: #6b7480; }
.td-actions { white-space: nowrap; }
.td-actions > * { margin-right: 10px; }
.td-actions > *:last-child { margin-right: 0; }
.td-actions a, .td-actions button { background: none; border: 0; padding: 0; font-size: 12px; color: var(--blue); cursor: pointer; }
.td-actions .danger { color: var(--danger); }
.inline-form { display: inline; }
.hidden-form { display: none; }
.admin-empty { margin-top: 8px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 14px; }
.panel-head span { font-size: 11.5px; color: var(--muted-2); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: #333b45; margin-bottom: 12px; }
.field > small { font-weight: 400; font-size: 11px; color: var(--muted-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid #dfe3ea; background: #fff; border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; font-weight: 400;
}
.field textarea { line-height: 1.75; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { background: #fdecec; border: 1px solid #f6d4d4; color: #9c3232; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; }
.form-error ul { padding-left: 18px; list-style: disc; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.editor-main, .editor-side { display: flex; flex-direction: column; gap: 14px; }
.editor-side { position: sticky; top: 76px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.toolbar button {
  border: 1px solid var(--line); background: #fafbfc; color: #3f4854;
  font-size: 12px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
}
.toolbar button:hover { border-color: #c9d2df; background: #fff; }
.editor-body { min-height: 340px; font-family: var(--mono); font-size: 13px; line-height: 1.85; }
.drop-hint { font-size: 11px; color: var(--muted-2); margin-top: 6px; }
.upload-row { display: flex; align-items: center; gap: 12px; }
.thumb { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; background: #f3f5f8; }
.thumb-empty { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed #d6dce5; display: grid; place-items: center; font-size: 11px; color: var(--muted-2); }
.file-input { font-size: 12px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; max-width: 880px; }
.cat-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: none; }
.settings-card h2 { font-size: 14px; margin-bottom: 2px; }
.settings-card .hint { font-size: 12px; color: var(--muted-2); margin-bottom: 12px; }
.settings-full { grid-column: 1 / -1; }
.link-list { border-top: 1px solid var(--line-2); margin-bottom: 12px; }
.link-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.link-list small { display: block; font-size: 11px; color: var(--muted-2); word-break: break-all; }
.link-list button { background: none; border: 0; color: var(--danger); font-size: 11.5px; cursor: pointer; }

.cat-list { border-top: 1px solid var(--line-2); }
.cat-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.cat-row { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.cat-name { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 5px 7px; font-size: 13px; }
.cat-name:hover { border-color: #bcc7d6; }
.cat-name:focus { border-color: var(--blue); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.cat-sort { width: 62px; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 5px 4px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-align: center; }
.cat-sort:hover { border-color: #bcc7d6; }
.cat-count { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.cat-save { border: 0; background: none; color: var(--blue); font-size: 11.5px; cursor: pointer; }
.cat-del { border: 0; background: none; color: var(--danger); font-size: 11.5px; cursor: pointer; }

/* 赞助 */
.band-sponsor::after { background: radial-gradient(700px 320px at 85% -20%, rgba(255,140,170,.22), transparent 62%); }
.band-sponsor .kicker { color: rgba(255,170,190,.85); }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sponsor-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; align-items: stretch;
}
.sponsor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sponsor-head strong { font-size: 15px; }
.sponsor-kind { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted-2); }
.sponsor-qr { margin: 0; text-align: center; }
.sponsor-qr img {
  width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: contain;
  margin: 0 auto; border-radius: 12px; border: 1px solid var(--line);
  padding: 8px; background: #fff;
}
.sponsor-qr figcaption { margin-top: 8px; font-size: 11.5px; color: var(--muted-2); }
.sponsor-btn { margin-top: 2px; }
.sponsor-note { font-size: 12px; color: var(--muted); line-height: 1.75; }
.sponsor-thanks {
  margin-top: 22px; font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 16px;
}

/* 开屏公告 */
.splash { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; }
.splash[hidden] { display: none; }
.splash-veil { position: absolute; inset: 0; background: rgba(8, 12, 16, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.splash-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(8, 12, 16, .38);
  animation: splashUp .32s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes splashUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.splash-media { background: #eef1f5; max-height: 44vh; overflow: hidden; }
.splash-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.splash-copy { padding: 18px 20px 18px; overflow-y: auto; }
.splash-copy h2 { font-size: 18px; margin-bottom: 6px; }
.splash-copy p { font-size: 13px; color: var(--muted); line-height: 1.85; }
.splash-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.splash-x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11, 15, 20, .55); color: #fff; font-size: 18px; line-height: 1;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.splash-x:hover { background: rgba(11, 15, 20, .8); }

/* 安装 / 登录 */
.install-body { background: #0b0f14; min-height: 100vh; color: #eef2f7; }
.install-body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 420px at 78% -10%, rgba(201,247,90,.22), transparent 62%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}
.install-shell { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 44px 18px; }
.install-card { width: min(640px, 100%); background: #fff; color: var(--ink); border-radius: 22px; padding: 32px 34px 28px; box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.install-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.install-brand strong { display: block; font-size: 14px; }
.install-brand small { display: block; font-size: 10px; color: var(--muted-2); font-family: var(--mono); letter-spacing: .12em; }
.install-card h1 { font-size: 26px; margin-bottom: 8px; }
.install-lead { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.install-form { display: flex; flex-direction: column; gap: 12px; }
.install-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: #333b45; }
.install-form input, .install-form select { width: 100%; border: 1px solid #dfe3ea; border-radius: 9px; padding: 9px 11px; font-size: 13.5px; font-weight: 400; }
.install-form input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.install-form small { font-weight: 400; font-size: 11px; color: var(--muted-2); }
.db-choice { border: 0; padding: 0; margin: 0; }
.db-choice legend { font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.db-choice .radio { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; border: 1px solid #e2e6ed; border-radius: 11px; padding: 11px 13px; margin-bottom: 7px; font-weight: 400; cursor: pointer; background: #fafbfc; }
.db-choice .radio input[type="radio"] { width: auto; flex: none; margin: 4px 0 0; accent-color: #2f6bff; }
.db-choice .radio strong { display: block; font-size: 13px; }
.db-choice .radio small { display: block; margin-top: 2px; }
.install-divider { height: 1px; background: var(--line); margin: 4px 0; }
.install-submit { width: 100%; margin-top: 4px; }
.install-note { margin-top: 16px; font-size: 11.5px; color: var(--muted-2); line-height: 1.8; }
.install-note a { color: var(--blue); }
.install-error { background: #fdecec; border: 1px solid #f6d4d4; color: #9c3232; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; }
.install-error ul { padding-left: 18px; list-style: disc; }
.install-steps { margin: 0 0 20px; padding-left: 18px; font-size: 13px; line-height: 1.9; color: #3c4552; }
.install-steps strong { display: block; }
.install-steps span { font-size: 12px; color: var(--muted); }
.install-steps code { font-family: var(--mono); background: #f0f3f7; padding: 1px 5px; border-radius: 5px; }
.install-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-card { max-width: 440px; }

@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-aside { position: static; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-top.has-qr { grid-template-columns: 1fr 1fr; }
  .foot-sponsor a { align-items: flex-start; }
}

@media (max-width: 900px) {
  .hero { padding: 44px 30px 38px; }
  .portals { grid-template-columns: 1fr; margin-top: -24px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-row { grid-template-columns: 1fr; }
  .dir-layout { grid-template-columns: 1fr; gap: 18px; }
  .dir-aside { position: static; }
  .dir-nav { flex-direction: row; flex-wrap: wrap; }
  .site-grid { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .wrap { width: calc(100% - 28px); }
  .head-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px 14px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 2px; overflow-x: auto; }
  .nav a { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
  .head-actions { margin-left: auto; }
  .hero { width: calc(100% - 24px); margin-top: 14px; border-radius: 22px; padding: 34px 20px 30px; }
  .hero-glow { opacity: .55; }
  .hero h1 { font-size: 1.85rem; }
  .hero-sub { font-size: 13.5px; }
  .search-box { padding: 5px 5px 5px 14px; }
  .search-box button { padding: 9px 15px; }
  .hero-stats { gap: 16px; font-size: 11.5px; }
  .portals { margin-top: -18px; }
  .section { padding-top: 38px; }
  .grid-3 { grid-template-columns: 1fr; }
  .band { padding: 34px 0; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .search-inline { max-width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .article-head h1 { font-size: 1.55rem; }
  .prose { font-size: 14.5px; line-height: 1.9; }
  .code-card code { font-size: 12px; }
  .foot-top { grid-template-columns: 1fr; gap: 24px; }
  .foot-top.has-qr { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; }
  .site-host { display: none; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; }
  .stat span { font-size: 11px; line-height: 1.2; }
  .stat strong { font-size: 18px; }
  .admin-search { gap: 6px; }
  .admin-search input[type="search"] { flex: 1 1 100%; min-width: 0; }
  .filter-count { margin-left: 0; }
  .admin-head-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .settings-bar { position: static; }
  .admin-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .field-row { grid-template-columns: 1fr; }
  .install-card { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* 一键采集 */
.tool-scrape { border-color: #cfe89a !important; background: #f4ffdc !important; color: #3c5a12 !important; font-weight: 600; }
.tool-scrape:hover { background: #e9ffc4 !important; border-color: #b7dc63 !important; }
.scrape-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.scrape-modal[hidden] { display: none; }
.scrape-veil { position: absolute; inset: 0; background: rgba(8, 12, 16, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.scrape-card {
  position: relative; width: min(660px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 18px; padding: 20px 22px 18px;
  box-shadow: 0 30px 80px rgba(8, 12, 16, .35);
  animation: splashUp .26s cubic-bezier(.2, .8, .2, 1) both;
}
.scrape-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.scrape-head h2 { font-size: 17px; }
.scrape-x {
  width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer;
  background: #f1f3f6; color: #5a6472; font-size: 17px; line-height: 1; display: grid; place-items: center;
}
.scrape-x:hover { background: #e6eaef; }
.scrape-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 4px; flex-wrap: wrap; }
.scrape-status { font-size: 12px; color: #4c5663; background: #f5f7fa; border-radius: 8px; padding: 8px 10px; margin: 8px 0; word-break: break-all; }
.scrape-status.is-error { color: #b3261e; background: #fdecea; }
.scrape-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.scrape-tip { margin-top: 8px; font-size: 12px; color: #2f6b1f; background: #eefbe4; border-radius: 8px; padding: 7px 10px; transition: opacity .5s; }
.scrape-tip.is-out { opacity: 0; }
#scrape-preview { font-family: var(--mono); font-size: 12.5px; line-height: 1.8; }

/* 设置子页与保存栏 */
.settings-bar {
  position: sticky; top: 60px; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 10px; margin-bottom: 6px;
  background: #f2f4f7;
}
.settings-save { flex: 0 0 auto; }
.settings-tabs {
  position: static; flex: 1; min-width: 0;
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0; margin: 0; background: none;
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #4a5461;
  font-size: 12.5px; white-space: nowrap;
}
.settings-tab:hover { border-color: #c9d2df; }
.settings-tab.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.settings-save-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0 4px; margin-top: 8px;
}
.save-state { font-size: 12px; color: var(--muted); }
.save-state.is-ok { color: #2f6b1f; }
.save-state.is-err { color: #b3261e; }
.section-copy { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.section-copy:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.section-copy-title { font-size: 12px; font-weight: 700; color: #2b3440; margin-bottom: 8px; letter-spacing: .02em; }
.kv-list { list-style: none; display: grid; gap: 6px; margin: 8px 0 14px; }
.kv-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 7px 10px; background: #f7f8fa; border-radius: 8px; }
.kv-list span { color: var(--muted); }
.sponsor-admin { list-style: none; display: grid; gap: 8px; margin: 10px 0; }
.sponsor-admin li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sponsor-admin .thumb, .sponsor-admin .thumb-empty { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); font-size: 11px; }
.sponsor-admin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sponsor-admin-info small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.danger-link { border: 0; background: none; color: #b3261e; font-size: 12px; cursor: pointer; }

/* 页脚微信二维码 */
.foot-wechat { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.foot-wechat img { width: 84px; height: 84px; background: #fff; border-radius: 10px; padding: 4px; object-fit: contain; }
.foot-wechat span { font-size: 11px; line-height: 1.7; color: rgba(233, 238, 244, .5); }

/* 后台：官网采集与标题操作 */
.site-fetch { border: 1px solid #dff0c4; background: #f8ffec; }
.site-fetch .panel-head { margin-bottom: 8px; }
.site-fetch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.site-fetch-row input { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; }
.site-fetch-status { margin-top: 8px; font-size: 12px; color: #3f5b1c; }
.site-fetch-status.is-error { color: #b3261e; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* hidden 属性必须优先生效（避免被 display:grid/flex 覆盖） */
[hidden] { display: none !important; }

/* 上传框：拖拽与粘贴 */
.upload-row.is-drag { border-color: var(--lime) !important; background: #fbffee !important; }
.paste-hint { display: block; margin-top: 6px; font-size: 11.5px; color: #8a94a2; }

/* 后台：当前管理员 */
.admin-who { display: flex; align-items: center; gap: 10px; }
.admin-who > span { font-size: 12px; color: rgba(238,242,247,.55); }
.admin-who form { margin: 0; }
.role-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #f1f4f8; color: #4a5461; }
.role-tag.is-owner { background: #eefbe4; color: #2f6b1f; }
.status-tag { font-size: 11.5px; color: #2f6b1f; }
.status-tag.is-off { color: #b3261e; }
.admin-table { width: 100%; min-width: 800px; border-collapse: collapse; font-size: 13px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table th { font-weight: 600; color: #6b7480; font-size: 12px; }
.admin-table tr:last-child td { border-bottom: 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { padding: 5px 8px; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; }

/* 正文首行缩进与字体颜色 */
.prose { --body-indent: 0em; }
.prose > p { text-indent: var(--body-indent); }
.prose > p:has(> img:only-child) { text-indent: 0; }
.prose span[style*="color"] { font-weight: inherit; }
.color-tool { display: inline-flex; align-items: center; gap: 4px; }
.color-tool input[type="color"] {
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; cursor: pointer;
}

/* 批量导入 */
.import-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #4c5663; }
.import-bar { width: 180px; height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.import-bar span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 999px; transition: width .25s ease; }
.import-log { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; max-height: 260px; overflow-y: auto; }
.import-log li { padding: 5px 8px; border-radius: 6px; background: #f7f8fa; }
.import-log li.is-ok { color: #2f6b1f; background: #f1faea; }
.import-log li.is-err { color: #b3261e; background: #fdecea; }
.import-log li.is-skip { color: #8a6d1f; background: #fdf6e3; }
@media (max-width: 640px) { .import-bar { width: 120px; } }

/* 后台内容列表：搜索、批量、分页 */
.admin-search { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 10px; }
.admin-search input[type="search"] {
  flex: 1; min-width: 220px; padding: 9px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.admin-search select {
  padding: 9px 10px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.filter-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.stat.is-on { outline: 2px solid var(--ink); outline-offset: -2px; }
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin: 10px 0; border: 1px solid var(--line);
  border-radius: 12px; background: #fbfcfd; font-size: 12.5px;
}
.bulk-bar select, .bulk-bar input[type="text"] {
  padding: 7px 9px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.bulk-count { color: var(--muted); }
.bulk-bar[hidden] { display: none; }
.sort-val { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.sort-moves { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
.sort-moves button {
  width: 20px; height: 20px; padding: 0; line-height: 1; font-size: 11px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #5a6472; cursor: pointer;
}
.sort-moves button:hover { background: #eef2f7; color: var(--ink); border-color: #c3ccd9; }
.admin-list .chip { background: transparent; border: 1px solid #cfd7e2; color: #46505e; }
.admin-list .td-check { width: 34px; }
.admin-list .row-title { font-weight: 600; color: #1f2937; }
.admin-list .row-title:hover { text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 4px; font-size: 12.5px; color: var(--muted); }

/* ---------- 后台：列表缩略图 / 排序 / 行操作浮层 ---------- */
.admin-table .td-icon { width: 56px; }
.row-thumb { display: block; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #eef1f5; border: 1px solid #e7ebf1; }
.row-thumb-empty { display: grid; place-items: center; font-size: 11px; color: #a2abb6; }
.admin-table .td-sort { width: 48px; color: #6d7681; font-variant-numeric: tabular-nums; }
.btn-mini { display: inline-block; padding: 4px 10px; border-radius: 8px; background: #f1f4f8; color: #2b323b !important; font-size: 12px; text-decoration: none; }
.btn-mini:hover { background: #e6ebf2; }
.row-more { margin-left: 6px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid #e2e7ee; background: #fff; color: #59616c; font-size: 15px; line-height: 1; cursor: pointer; }
.row-more:hover { background: #f3f6fa; }
.row-pop {
  position: fixed; z-index: 80; min-width: 148px; padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid #e6eaf0; box-shadow: 0 16px 36px rgba(15, 25, 40, .16);
  display: grid; gap: 2px;
}
.row-pop a, .row-pop button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: #232a33; font-size: 13px; text-decoration: none; cursor: pointer;
}
.row-pop a:hover, .row-pop button:hover { background: #f3f6fa; }
.row-pop .danger { color: #c0392b; }

/* ---------- 后台：顶栏用户菜单 ---------- */
.admin-user { position: relative; margin-left: 10px; }
.admin-user summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; }
.admin-user summary::-webkit-details-marker { display: none; }
.admin-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; }
.admin-name { font-size: 12.5px; color: rgba(238,242,247,.75); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; padding: 6px;
  background: #fff; border: 1px solid #e6eaf0; border-radius: 12px; box-shadow: 0 16px 36px rgba(15,25,40,.2);
  display: grid; gap: 2px;
}
.admin-user-menu a, .admin-user-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: #232a33; font-size: 13px; text-decoration: none; cursor: pointer;
}
.admin-user-menu a:hover, .admin-user-menu button:hover { background: #f3f6fa; }

/* ---------- 后台：编辑页 ---------- */
.editor-side { position: sticky; top: 84px; align-self: start; }
.panel-save { background: #0b0f14; border-color: #0b0f14; }
.panel-save .btn-dark { background: var(--lime); color: #14210a; }
.panel-save .btn-line { background: transparent; color: #eef2f7; border-color: rgba(255,255,255,.3); }
.panel-save .save-hint { margin: 10px 0 0; font-size: 11.5px; color: rgba(238,242,247,.55); text-align: center; }
.field-narrow { max-width: 260px; }
.save-hint { font-size: 11.5px; color: #97a1ad; margin: 10px 0 0; }
.file-drop {
  display: grid; place-items: center; min-width: 120px; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed #cfd7e2; color: #4a5563; font-size: 12px; cursor: pointer; background: #fafbfd;
}
.file-drop:hover { border-color: #aab7c6; background: #fff; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---------- 后台：窄屏导航 ---------- */
@media (max-width: 760px) {
  .admin-nav { flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { flex: 0 0 auto; }
  .admin-name { display: none; }
}

/* 后台页面留出吸底条的空间，避免被浏览器底边裁掉 */
.admin-main { padding-bottom: 110px; }

/* 原生文件选择控件统一成按钮样式 */
.settings-card input[type="file"]::file-selector-button,
.install-card input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 7px 12px; border-radius: 8px; border: 1px solid #d8dee8;
  background: #fff; color: #2b323b; font-size: 12px; cursor: pointer;
}
.settings-card input[type="file"]::file-selector-button:hover { background: #f4f7fa; }

/* ---------- 3.8.0 前台细节 ---------- */
.hero-inner { max-width: 880px; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.25rem); word-break: keep-all; overflow-wrap: anywhere; }
.hero-glow {
  filter: blur(64px);
  background: radial-gradient(circle, rgba(201,247,90,.20), rgba(201,247,90,.05) 46%, rgba(201,247,90,0) 72%);
}

/* 宝盒：长标题不挤压域名 */
.site-name { flex: 0 1 auto; max-width: 64%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-host { flex: none; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
.dir-nav a.is-on { background: #0b0f14; color: #fff; }
.dir-nav a.is-on em { color: rgba(255,255,255,.6); }
.dir-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-filter-note { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.dir-filter-note a { color: var(--ink); text-decoration: underline; }

/* 卡片等高：标题 2 行、摘要 3 行 */
.entry-card { height: 100%; }
.entry-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid-1 { grid-template-columns: minmax(0, 560px); justify-content: center; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 宝集：封面比例统一 + 微信号单独一行 */
.product-media { aspect-ratio: 16 / 10; }
.contact-id { display: block; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 6px; letter-spacing: .02em; }

/* 公告条：太长时省略，不撑破一行 */
.announce-inner > span:not(.announce-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 76ch; }

/* 开屏公告图片限高 */
.splash-media { max-height: 260px; }
.splash-media img { max-height: 260px; }

/* 宝盒详情：官网按钮紧跟标题 */
.article-cta-top { margin: 6px 0 24px; }

@media (max-width: 760px) {
  .announce-inner > span:not(.announce-dot) { max-width: none; }
  .grid-1 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* 宝盒详情：同类内容用站点行卡，不用大封面 */
.site-grid-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .site-grid-related { grid-template-columns: minmax(0, 1fr); } }
