/* =========================================================
   Apple-inspired design system
   灰底 #f5f5f7 / 白卡片 / 大圆角 / 大留白 / 克制的品牌色
   ========================================================= */
:root {
  --brand: #f97316;
  --brand-dark: color-mix(in srgb, var(--brand) 84%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --line-soft: rgba(0, 0, 0, .05);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .05);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .10);
  --max: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
::selection { background: var(--brand-soft); }

.container { width: min(var(--max), 92vw); margin: 0 auto; }
.narrow { width: min(720px, 92vw); margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { letter-spacing: -.025em; font-weight: 700; line-height: 1.15; }
.display { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.08; }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.035em; }
.kicker {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .08em;
  color: var(--brand); text-transform: uppercase; margin-bottom: .9rem;
}
.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); line-height: 1.6; }
.prose { font-size: 1.08rem; color: var(--ink-2); line-height: 1.85; white-space: pre-line; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 252, .78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand img { height: 30px; width: auto; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: .85rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; font-size: .85rem; }
.nav-links a { color: var(--ink-2); transition: color .2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.lang-switch {
  border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-size: .78rem !important;
}
.nav-toggle { display: none; background: none; border: 0; font-size: 1.35rem; cursor: pointer; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: .82rem 1.7rem; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--bg); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: .5rem 1rem; font-size: .85rem; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, #fff 0%, transparent 70%), linear-gradient(180deg, #fafafa 0%, var(--bg) 100%);
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.hero.has-bg { background-size: cover; background-position: center; }
.hero.has-bg::before { content: ''; position: absolute; inset: 0; background: rgba(245,245,247,.86); }
.hero-inner { position: relative; }
.hero-badge {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .03em;
  color: var(--brand); background: var(--brand-soft); border-radius: 999px;
  padding: .45rem 1rem; margin-bottom: 1.8rem;
}
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); letter-spacing: -.05em; line-height: 1.08; margin-bottom: 1.4rem; }
.hero .sub { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted); max-width: 680px; margin: 0 auto 2.4rem; line-height: 1.6; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .28; pointer-events: none;
  background: var(--brand); width: 420px; height: 420px; top: -180px; left: 50%; transform: translateX(-50%);
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section.white { background: #fff; }
.section.gray { background: var(--bg); }
.section.dark { background: #1d1d1f; color: #f5f5f7; }
.section.dark .lede, .section.dark .muted { color: #a1a1a6; }
.section-head { margin-bottom: 3rem; }
.section-head.center { text-align: center; }
.section-head .lede { max-width: 640px; margin-top: .6rem; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem 1.8rem;
  box-shadow: var(--shadow); border: 1px solid var(--line-soft);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.4rem; margin-bottom: 1.4rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.card .more { display: inline-block; margin-top: 1rem; color: var(--brand); font-size: .88rem; font-weight: 600; }
.card .tag {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: .25rem .7rem;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-bottom: 1rem;
}

/* ---------- Stats ---------- */
.stats { display: flex; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap; margin-top: 2.5rem; }
.stat .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.04em; color: var(--ink); }
.stat .lbl { color: var(--muted); font-size: .88rem; margin-top: .2rem; }

/* ---------- Two column ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ---------- News ---------- */
.news-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s; display: block;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card img { height: 200px; width: 100%; object-fit: cover; }
.news-card .ph { height: 200px; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.news-body { padding: 1.5rem 1.7rem 1.8rem; }
.news-body .date { color: var(--muted); font-size: .78rem; margin-bottom: .5rem; }
.news-body h3 { font-size: 1.15rem; margin-bottom: .6rem; line-height: 1.4; }
.news-body p { color: var(--muted); font-size: .92rem; }

/* ---------- Page hero (内页) ---------- */
.page-hero { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); text-align: center; }
.page-hero .lede { max-width: 620px; margin: 1rem auto 0; }
.page-hero .kicker { margin-bottom: 1rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: clamp(4rem, 9vw, 7rem) 0; }
.cta-band .display { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1rem; }
.cta-band .lede { max-width: 560px; margin: 0 auto 2rem; }

/* ---------- Custom modules: 3 styles ---------- */
/* 1) cards */
.mod-cards .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mod-cards .m-card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem 1.8rem;
  box-shadow: var(--shadow); border: 1px solid var(--line-soft);
}
.mod-cards .m-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .95rem; margin-bottom: 1.3rem;
}
.mod-cards h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.mod-cards p { color: var(--muted); font-size: .93rem; }
/* 2) split */
.mod-split .split-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.mod-split .split-visual {
  border-radius: var(--radius); min-height: 320px; padding: 2.5rem;
  background: linear-gradient(145deg, var(--brand-soft), #fff); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.2rem; justify-content: center;
}
.mod-split .quote {
  background: var(--surface); border-radius: var(--radius-sm); padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow); font-size: .95rem; color: var(--ink-2);
}
.mod-split .quote strong { display: block; margin-top: .7rem; color: var(--ink); font-size: .85rem; }
.mod-split .split-text .lede { margin-bottom: 1.6rem; }
.mod-split .split-text .prose { font-size: 1rem; }
/* 3) minimal */
.mod-minimal .m-list { max-width: 860px; margin: 0 auto; }
.mod-minimal .m-row { border-top: 1px solid var(--line); padding: 1.8rem 0; }
.mod-minimal .m-row:last-child { border-bottom: 1px solid var(--line); }
.mod-minimal h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: .6rem; letter-spacing: -.02em; }
.mod-minimal p { color: var(--muted); font-size: 1rem; }
.section.dark .mod-minimal .m-row { border-color: rgba(255,255,255,.14); }
.section.dark .mod-cards .m-card { background: #2a2a2e; border-color: rgba(255,255,255,.08); color: #fff; }
.section.dark .mod-cards p { color: #a1a1a6; }
.section.dark .mod-split .split-visual { background: #2a2a2e; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.info-card { background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.info-card .row { padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.info-card .row:last-child { border-bottom: 0; }
.info-card .row .lb { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.info-card .row .vl { font-size: 1rem; font-weight: 600; word-break: break-all; }
.form-card { background: #fff; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); border: 1px solid var(--line-soft); }

/* ---------- Forms（统一尺寸：匹配所有 input，不依赖 type 属性） ---------- */
.field { margin-bottom: 1.25rem; }
.field > label, .lbl-top {
  display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: .45rem;
}
.field :is(input, textarea, select),
.contact-form :is(input, textarea, select),
.form-card :is(input, textarea, select) {
  display: block; width: 100%; min-height: 46px; padding: .72rem .95rem;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid rgba(0, 0, 0, .14); border-radius: 12px;
  box-sizing: border-box; transition: border-color .2s, box-shadow .2s;
}
.field :is(input, textarea, select):focus,
.contact-form :is(input, textarea, select):focus,
.form-card :is(input, textarea, select):focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.field textarea, .contact-form textarea, .form-card textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.field select, .form-card select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
/* 例外控件 */
.field input[type=checkbox], .field input[type=radio],
.form-card input[type=checkbox] { display: inline-block; width: 17px; min-height: auto; height: 17px; padding: 0; margin: 0 .45rem 0 0; vertical-align: -3px; accent-color: var(--brand); border: 1px solid rgba(0,0,0,.2); border-radius: 4px; box-shadow: none; }
.field input[type=color] { width: 72px; height: 46px; padding: 4px; cursor: pointer; }
.field input[type=file] { padding: .55rem .7rem; font-size: .88rem; }
.field label.check { display: flex; align-items: center; gap: .1rem; font-size: .92rem; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .4rem; line-height: 1.5; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form .btn { align-self: flex-start; margin-top: .4rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line-soft); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 2.5rem; }
.site-footer h4 { font-size: .85rem; color: var(--ink); margin-bottom: 1.1rem; letter-spacing: 0; }
.site-footer a, .site-footer p { color: var(--muted); font-size: .88rem; }
.site-footer a { display: block; margin-bottom: .5rem; transition: color .2s; }
.site-footer a:hover { color: var(--brand); }
.site-footer .social a { display: inline-block; margin-right: 1rem; }
.footer-bottom {
  border-top: 1px solid var(--line-soft); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: .8rem;
}
.footer-manage { opacity: .28; font-size: .75rem !important; transition: opacity .2s; }
.footer-manage:hover { opacity: .75; color: var(--muted) !important; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1d1d1f; color: #fff; padding: .9rem 1.5rem; border-radius: 14px;
  opacity: 0; transition: all .3s; z-index: 100; box-shadow: var(--shadow-lg); max-width: 90vw; font-size: .92rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(6rem, 14vw, 10rem) 0; }

/* =========================================================
   Admin
   ========================================================= */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: #fff; border-right: 1px solid var(--line-soft); padding: 1.8rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { font-weight: 700; font-size: 1rem; margin: 0 .6rem 1.6rem; letter-spacing: -.02em; }
.sidebar .group { font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 1.4rem .6rem .5rem; }
.sidebar a { display: block; color: var(--ink-2); padding: .55rem .75rem; border-radius: 10px; font-size: .88rem; margin-bottom: .15rem; transition: background .15s, color .15s; }
.sidebar a:hover { background: var(--bg); }
.sidebar a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar .foot { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }
.admin-main { padding: clamp(1.5rem, 3vw, 2.5rem); overflow: auto; max-width: 100%; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.admin-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.035em; }
.admin-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.admin-card h2 { font-size: 1.15rem; margin-bottom: 1.2rem; }
.admin-card h2:not(:first-child) { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.8rem; }
.admin-stat { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.admin-stat .n { font-size: 2rem; font-weight: 700; color: var(--brand); letter-spacing: -.04em; }
.admin-stat .l { color: var(--muted); font-size: .85rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: .9rem; vertical-align: middle; }
.admin-table th { background: var(--bg); font-size: .8rem; color: var(--muted); font-weight: 600; }
.admin-table img { height: 42px; border-radius: 8px; }
.admin-table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .73rem; font-weight: 600; }
.badge.on { background: #dcfce7; color: #166534; }
.badge.off { background: #f1f1f3; color: #6e6e73; }
.badge.draft { background: #fef3c7; color: #92400e; }
.badge.core { background: var(--brand-soft); color: var(--brand); }
.preview-img { max-height: 110px; border-radius: 10px; border: 1px solid var(--line); margin-top: .6rem; }
.alert { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .9rem; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.info { background: var(--brand-soft); color: var(--ink-2); line-height: 1.6; }
.style-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.style-choice label {
  display: block; border: 1px solid rgba(0,0,0,.14); border-radius: 14px; padding: .9rem 1rem;
  cursor: pointer; font-size: .88rem; transition: border-color .2s, background .2s;
}
.style-choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.style-choice label strong { display: block; font-size: .92rem; margin-bottom: .25rem; }
.style-choice label span { color: var(--muted); font-size: .8rem; line-height: 1.45; display: block; margin-top: .15rem; }
.style-choice input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; margin: 0 .35rem 0 0; vertical-align: -2px; }
.item-row { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .8rem; background: var(--bg); }
.item-row .row-2 { margin-bottom: .7rem; }
.item-row .item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box { background: #fff; padding: 2.4rem; border-radius: var(--radius); width: min(370px, 92vw); box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.login-box h1 { font-size: 1.15rem; margin-bottom: 1.6rem; letter-spacing: -.02em; }
.login-box .btn { width: 100%; }
.empty { color: var(--muted); text-align: center; padding: 2.5rem; }

/* ---------- 页眉三套外观 + 右侧按钮 ---------- */
.site-header.header-glass { background: rgba(250,250,252,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line-soft); }
.site-header.header-solid { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--line); }
.site-header.header-plain { background: rgba(245,245,247,.55); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
.nav-cta { background: var(--brand) !important; color: #fff !important; border-radius: 999px; padding: .45rem 1.05rem !important; font-size: .8rem !important; font-weight: 600; transition: background .2s, transform .15s; }
.nav-cta:hover { background: var(--brand-dark) !important; color: #fff !important; transform: translateY(-1px); }

/* ---------- 社交图标（只显示图标，不显示文字） ---------- */
.social-icons { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: 1.1rem; }
.social-icon {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: auto; height: auto; margin: 0 !important; padding: 0;
  border: 0; background: transparent;
}
/* 彩色品牌图标：品牌色圆角底 + 白色实心官方 logo */
.brand-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; background: var(--b, #8e8e93);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--b, #8e8e93) 32%, transparent);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.brand-chip .ico { width: 20px; height: 20px; display: block; }
.social-icon:hover .brand-chip {
  transform: translateY(-2px) scale(1.05); filter: saturate(1.12) brightness(1.04);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--b, #8e8e93) 46%, transparent);
}
.info-card .social-icons { margin-top: .2rem; }
.info-card .brand-chip { width: 34px; height: 34px; border-radius: 11px; }
.info-card .brand-chip .ico { width: 18px; height: 18px; }

/* ---------- 页脚：三套外观 + 底部一排 ---------- */
.site-footer.footer-light { background: #fff; border-top: 1px solid var(--line-soft); }
.site-footer.footer-gray { background: #f0f0f2; border-top: 1px solid var(--line-soft); }
.site-footer.footer-dark { background: #1d1d1f; border-top: 1px solid #333; }
.site-footer.footer-dark h4 { color: #f5f5f7; }
.site-footer.footer-dark a, .site-footer.footer-dark p, .site-footer.footer-dark .footer-bottom { color: #a1a1a6; }
.site-footer.footer-dark a:hover { color: var(--brand); }
.site-footer.footer-dark .social-icon { background: transparent; }
.site-footer.footer-dark .brand-chip { box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.site-footer.footer-dark .footer-bottom { border-top-color: #3a3a3c; }
.footer-bottom { gap: .55rem 1rem; }
.footer-bottom > * { display: inline-flex; align-items: center; }
.footer-bottom > * + *::before { content: "·"; margin-right: 1rem; color: var(--muted); opacity: .55; }
.footer-bottom a { display: inline-flex !important; margin: 0 !important; }
.footer-bottom .footer-manage { opacity: .3; font-size: .75rem !important; }
.footer-bottom .footer-manage:hover { opacity: .8; }
.footer-icp { font-size: .8rem; }

/* ---------- 404 温馨插画 ---------- */
.error-page { padding: clamp(3rem, 8vw, 6rem) 0 clamp(5rem, 12vw, 8rem); }
.error-art { width: min(360px, 76vw); margin: 0 auto 1.5rem; }
.error-art svg { width: 100%; height: auto; display: block; }
.error-art .smoke { animation: smoke-float 3.2s ease-in-out infinite; transform-origin: 219px 60px; }
@keyframes smoke-float { 0%,100% { opacity: .45; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .error-art .smoke { animation: none; } }

/* ---------- 后台可视化列表（+ 添加、上下排序） ---------- */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.rep-row .item-head { display: flex; justify-content: space-between; align-items: center; }
.rep-tools { display: inline-flex; gap: .3rem; }
.rep-tools .btn { padding: .25rem .6rem; font-size: .75rem; }
.rep-extra { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); }
.rep-ico { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--brand); overflow: hidden; }
.rep-ico .brand-chip { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.rep-ico .brand-chip .ico { width: 16px; height: 16px; }
.rep-ico .ico { width: 18px; height: 18px; }
.rep-hint { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.admin-card code { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 5px; padding: .05rem .3rem; font-size: .86em; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 58px; left: 0; right: 0; flex-direction: column; align-items: flex-start; background: rgba(255,255,255,.97); backdrop-filter: blur(20px); padding: 1rem 5vw 1.4rem; border-bottom: 1px solid var(--line); gap: .9rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .two-col, .contact-wrap, .mod-split .split-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; gap: .25rem; padding: 1rem; }
  .sidebar .logo { width: 100%; margin: 0 0 .6rem; }
  .sidebar .group { display: none; }
  .sidebar a { padding: .45rem .7rem; }
  .sidebar .foot { display: contents; }
  .admin-table { display: block; overflow-x: auto; }
}

/* =========================================================
   v3：顶部信息条 / 语言下拉 / 多语表单 / 产品 / 访问限制
   ========================================================= */

/* ---------- 顶部信息条 ---------- */
.topbar { font-size: .76rem; line-height: 1.4; border-bottom: 1px solid rgba(0,0,0,.05); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 34px; flex-wrap: wrap; padding: .3rem 0; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.topbar a, .topbar span { color: inherit; opacity: .78; transition: opacity .2s; }
.topbar a:hover { opacity: 1; }
.topbar a { display: inline-flex; align-items: center; gap: .35rem; }
.topbar .ico { width: 13px; height: 13px; flex: none; }
.topbar-light { background: #fafafa; color: #6e6e73; }
.topbar-brand { background: var(--brand); color: #fff; border-bottom-color: transparent; }
.topbar-brand a, .topbar-brand span { opacity: .95; }
.topbar-dark { background: #1d1d1f; color: #d2d2d7; border-bottom-color: #333; }

/* ---------- 语言下拉（看得懂的当前语言名 + 列表） ---------- */
.lang-menu { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: .35rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .28rem .7rem; font-size: .78rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.lang-btn .ico { width: 14px; height: 14px; }
.lang-btn .chev { font-size: .9rem; line-height: 1; margin-top: -.25rem; opacity: .6; }
.lang-drop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 152px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s; z-index: 60; }
.lang-menu:hover .lang-drop, .lang-menu:focus-within .lang-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-drop a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border-radius: 9px; font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.lang-drop a:hover { background: var(--bg); }
.lang-drop a.current { color: var(--brand); font-weight: 600; }
.lang-drop i { font-style: normal; }

/* ---------- 后台：多语字段组 ---------- */
.ml-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); border-radius: 14px; padding: .7rem 1rem; margin-bottom: 1.5rem; font-size: .85rem; color: var(--ink-2); }
.ml-group { margin-bottom: 1.35rem; }
.ml-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ml-label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.ml-label em { color: var(--brand); font-style: normal; }
.ml-btn { border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 999px; padding: .12rem .55rem; font-size: .72rem; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.6; }
.ml-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.ml-btn:disabled { opacity: .5; cursor: wait; }
.ml-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ml-cols-1 { grid-template-columns: 1fr; }
.ml-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ml-cols-4 { grid-template-columns: repeat(2, 1fr); }
.ml-field { margin-bottom: 0 !important; min-width: 0; }
.ml-flabel { display: flex !important; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ml-badge { font-size: .66rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .05rem .45rem; }
.ml-flabel .ml-btn { margin-left: auto; }
.ml-field :is(input, textarea) { width: 100%; }
.ml-link { margin-left: auto; font-size: .76rem; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.ml-link:hover { text-decoration: underline; }
.ml-group .hint { margin-top: .45rem; }

/* ---------- 后台：翻译中心（全站 i18n 一页管理） ---------- */
.i18n-stats { margin-top: 1.2rem; padding: .8rem 1rem; background: var(--bg); border-radius: 12px; font-size: .88rem; color: var(--ink-2); }
.i18n-stats strong { color: var(--ink); }
.i18n-warn { color: var(--brand) !important; }
.i18n-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1.4rem; position: sticky; top: .6rem; z-index: 20; box-shadow: var(--shadow); }
.i18n-tools > input { flex: 1 1 210px; min-width: 170px; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; font-size: .85rem; background: #fff; color: var(--ink); }
.i18n-tools > input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.i18n-tools .check { font-size: .82rem; white-space: nowrap; }
.i18n-progress { font-size: .8rem; color: var(--muted); flex: 1 1 110px; text-align: right; }
.i18n-group { border: 1px solid var(--line-soft); border-radius: 14px; padding: 0 1rem; margin-bottom: 1rem; background: #fff; }
.i18n-group > summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: .95rem; list-style: none; }
.i18n-group > summary::-webkit-details-marker { display: none; }
.i18n-group > summary::before { content: '▸'; display: inline-block; margin-right: .5rem; color: var(--muted); transition: transform .15s; }
.i18n-group[open] > summary::before { transform: rotate(90deg); }
.i18n-grid-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .55rem .8rem; background: var(--bg); border-radius: 9px; font-size: .76rem; font-weight: 600; color: var(--muted); margin-bottom: .5rem; }
.i18n-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line-soft); align-items: start; }
.i18n-row:last-child { border-bottom: 0; }
.i18n-row.blank { background: color-mix(in srgb, var(--brand) 3%, transparent); }
.i18n-label { font-size: .75rem; color: var(--muted); margin-bottom: .3rem; }
.i18n-text { font-size: .86rem; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; max-height: 9rem; overflow: auto; }
.i18n-target textarea { width: 100%; font-size: .86rem !important; min-height: 52px !important; resize: vertical; }
@media (max-width: 820px) {
  .i18n-row, .i18n-grid-head { grid-template-columns: 1fr; }
  .i18n-tools { position: static; }
}

/* ---------- 后台：语言选择 / 界面文案 ---------- */
.lang-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.lang-opt { display: flex; align-items: flex-start; gap: .55rem; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; transition: border-color .2s, background .2s; }
.lang-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.lang-opt input { width: 16px; height: 16px; margin-top: .2rem; accent-color: var(--brand); flex: none; }
.lang-opt strong { display: block; font-size: .9rem; font-weight: 600; }
.lang-opt span { display: block; font-size: .74rem; color: var(--muted); margin-top: .1rem; }
.ui-lang-list { display: flex; flex-direction: column; gap: .7rem; }
.ui-lang-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--line-soft); border-radius: 12px; padding: .7rem 1rem; }
.ui-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .5rem 1rem; }
.ui-edit-row { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; color: var(--muted); }
.ui-edit-row input { font-size: .84rem !important; padding: .5rem .7rem !important; min-height: 38px !important; }
.preset-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.preset-row .btn { padding: .3rem .7rem; font-size: .76rem; }
.test-out { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: .9rem 1rem; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; color: var(--ink-2); }
.code-box { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.code-box code { font-size: 1rem; letter-spacing: .04em; font-weight: 600; color: var(--brand); word-break: break-all; }

/* ---------- 找回密码 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.6rem, 4vw, 2.4rem); width: min(480px, 96vw); }
.auth-box h1 { font-size: 1.25rem; margin-bottom: .4rem; }
.auth-box h2 { font-size: 1rem; margin-bottom: 1rem; }
.login-forgot { color: var(--muted); font-size: .8rem; opacity: .7; }
.login-forgot:hover { color: var(--brand); opacity: 1; }

/* ---------- 后台：图集 ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.gal-item { border: 1px solid var(--line); border-radius: 12px; padding: .5rem; background: var(--bg); font-size: .8rem; }
.gal-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: .5rem; background: #fff; }
.gal-item .check { display: flex; align-items: center; gap: .3rem; color: var(--muted); }

/* ---------- 前台：产品卡片 ---------- */
.product-grid { gap: 1.6rem; }
.product-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-thumb { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--bg); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .product-thumb img { transform: scale(1.045); }
.product-thumb .tag { position: absolute; left: 1.2rem; top: 1.2rem; background: rgba(255,255,255,.94); }
.product-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.product-ph span { font-size: 3.6rem; opacity: .65; }
.product-ph.big { border-radius: var(--radius); aspect-ratio: 3 / 2; }
.product-body { padding: 1.6rem 1.8rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.product-title { color: inherit; }
.product-title:hover h3 { color: var(--brand); }
.product-body h3 { font-size: 1.35rem; margin-bottom: .55rem; }
.product-body > p { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: auto; padding-top: 1.5rem; }
.product-foot strong { font-size: 1.05rem; }
.product-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.card-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; margin-bottom: 1rem; }
.product-mini .card-cover { margin: -1px -1px 1rem; border-radius: 0; max-height: 170px; }

/* ---------- 前台：产品详情 ---------- */
.back-link { color: var(--muted); font-size: .86rem; }
.back-link:hover { color: var(--brand); }
.product-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.product-hero-media > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.thumbs { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.thumb { width: 74px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--bg); padding: 0; cursor: pointer; }
.thumb.on { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-price { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); display: flex; align-items: baseline; gap: .8rem; }
.product-price span { font-size: .8rem; color: var(--muted); }
.product-price strong { font-size: 1.5rem; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.spec-row { display: flex; align-items: center; gap: .7rem; background: var(--bg); border-radius: 12px; padding: .85rem 1.1rem; font-size: .95rem; }
.spec-check { color: var(--brand); font-weight: 700; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid a { display: block; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform .25s; }
.gallery-grid a:hover { transform: translateY(-4px); }
.gallery-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

@media (max-width: 860px) {
  .product-hero { grid-template-columns: 1fr; }
  .ml-cols-3, .ml-cols-4 { grid-template-columns: 1fr 1fr; }
  .topbar-inner { justify-content: center; text-align: center; }
  .lang-drop { right: auto; left: 0; }
}
@media (max-width: 600px) {
  .ml-cols, .ml-cols-3, .ml-cols-4 { grid-template-columns: 1fr; }
  .topbar-right { gap: .8rem; }
}
