/* 义商网 · 设计系统：大红为主（logo 取色 #E00010），米白为底，墨色为文，衬线标题，文武线页眉 */
:root {
  --red: #E00010;        /* 主红（取样自「义」字印） */
  --red-dark: #8B000A;   /* 深红：页脚/悬停 */
  --gold: #B8934A;       /* 金：点缀 */
  --ink: #211D1A;        /* 墨色正文 */
  --sub: #6F675E;        /* 次要文字 */
  --line: #E8E0D4;       /* 分隔线 */
  --paper: #FAF6EF;      /* 米白底 */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink); background: var(--paper);
  font-size: 16px; line-height: 1.75;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
h1, h2, .brand-t b, .entry .t, .who, .foot-brand, .hero-side, .foot-motto {
  font-family: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
}

/* ── 页眉：文武双线 ── */
header { background: #fff; border-bottom: 3px double var(--red); }
.nav { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.logo { width: 46px; height: 46px; object-fit: contain; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--red); font-size: 22px; font-family: "Songti SC", "SimSun", serif; }
.brand-t { display: flex; flex-direction: column; line-height: 1.25; }
.brand-t b { font-size: 19px; letter-spacing: 3px; }
.brand-t i { font-style: normal; font-size: 10px; color: var(--sub); letter-spacing: 3.5px; }
.nav-links { margin-left: auto; display: flex; gap: 15px; font-size: 14px; flex-wrap: wrap; }
.nav-links a { color: var(--sub); padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--red); }
.nav-links a.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }

/* ── 首页英雄区 ── */
.hero { padding: 52px 0 40px; }
.hero h1 { font-size: 28px; }
.hero .sub { margin-top: 12px; color: var(--sub); max-width: 40em; }
.hero-home { background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); padding: 58px 0 50px; }
.hero-grid { display: flex; gap: 40px; align-items: center; }
.hero-seal img { width: 150px; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(139, 0, 10, 0.18)); }
.kicker { color: var(--gold); font-size: 13px; letter-spacing: 5px; }
.hero-home h1 { font-size: 40px; letter-spacing: 5px; margin: 10px 0 4px; color: var(--ink); }
.hero-home .sub { margin-top: 12px; color: var(--sub); max-width: 34em; }
.hero-side {
  writing-mode: vertical-rl; font-size: 20px; letter-spacing: 0.1em; color: var(--red);
  border-left: 1px solid var(--line); padding-left: 18px; margin-left: auto; align-self: center;
}
.btn-row { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; padding: 11px 26px; border-radius: 4px; font-size: 15px; border: 1px solid var(--red); transition: all 0.18s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { color: var(--red); background: #fff; }
.btn-ghost:hover { background: var(--paper); }
.btn-plain { font-size: 14px; color: var(--sub); }
.btn-plain:hover { color: var(--red); }

/* ── 标题与区块 ── */
section { padding: 30px 0; }
main section:first-of-type { border-top: none; }
h2 { font-size: 20px; display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
h2::before { content: ""; width: 6px; height: 20px; background: var(--red); border-radius: 1px; flex: none; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lead { color: var(--sub); }

/* ── 栏目卡 ── */
.entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.entry {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px; color: var(--ink); transition: all 0.18s ease;
}
.entry:hover { border-color: var(--red); box-shadow: 0 6px 18px rgba(139, 0, 10, 0.10); transform: translateY(-2px); text-decoration: none; }
.entry .zi { font-size: 34px; line-height: 1; color: var(--red); }
.entry .t { font-weight: 700; font-size: 17px; }
.entry .d { font-size: 13px; color: var(--sub); }

/* ── 列表与标签 ── */
.person { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.person:last-child { border-bottom: none; }
.person .who { font-weight: 600; font-size: 17px; }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; color: var(--sub); background: var(--paper); white-space: nowrap; }
.tag-accent { color: var(--red); border-color: var(--red); background: #fff; }
.person .desc { width: 100%; font-size: 14px; color: var(--sub); }

/* ── 七维词条 ── */
.dims { display: flex; flex-wrap: wrap; gap: 10px; }
.dim { border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: 14px; background: #fff; }

/* ── 声明块：红头签 ── */
.notice { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; padding: 14px 18px; font-size: 13.5px; color: var(--sub); line-height: 1.8; }
.notice strong { color: var(--ink); }

/* ── 简列表 ── */
.plain-list { list-style: none; }
.plain-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plain-list li:last-child { border-bottom: none; }
.muted { color: var(--sub); font-size: 13.5px; }

/* ── 筛选 ── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--sub); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; font-family: inherit; transition: all 0.15s ease; }
.tab:hover { border-color: var(--red); color: var(--red); }
.tab.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── 表单 ── */
.form { display: grid; gap: 12px; max-width: 480px; }
.form label { font-size: 14px; display: grid; gap: 4px; }
.form input, .form textarea, .form select { border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; font: inherit; font-size: 14px; background: #fff; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }

/* ── 自测 ── */
.progress { height: 4px; background: var(--paper); border-radius: 2px; overflow: hidden; margin: 18px 0 24px; }
.progress i { display: block; height: 100%; background: var(--red); width: 0; }
.q { margin-bottom: 22px; }
.q .qt { margin-bottom: 8px; }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale button { min-width: 40px; padding: 8px 0; border: 1px solid var(--line); background: #fff; border-radius: 4px; font: inherit; cursor: pointer; color: var(--ink); transition: all 0.12s ease; }
.scale button:hover { border-color: var(--red); color: var(--red); }
.scale button.sel { background: var(--red); border-color: var(--red); color: #fff; }
.scale button:disabled { opacity: 0.4; cursor: default; }
.qnav { display: flex; gap: 12px; margin-top: 8px; }
.score-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.score-table th, .score-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.bar { background: var(--paper); border-radius: 3px; height: 8px; width: 140px; overflow: hidden; display: inline-block; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--red); }
.chip { display: inline-block; background: var(--red); color: #fff; border-radius: 4px; padding: 4px 14px; font-size: 14px; margin-right: 8px; font-family: "Songti SC", "SimSun", serif; }
.radio-row { display: flex; gap: 10px; align-items: center; font-size: 14px; }

/* ── 商城 ── */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; transition: all 0.18s ease; }
.product:hover { border-color: var(--red); box-shadow: 0 6px 18px rgba(139, 0, 10, 0.08); }
.product .name { font-weight: 600; }
.product .price { color: var(--red); font-weight: 700; margin: 4px 0 8px; }
.product details { font-size: 13px; color: var(--sub); margin: 8px 0; }
.product details summary { cursor: pointer; color: var(--red); }
.buyrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.qty button { border: none; background: var(--paper); width: 28px; height: 30px; cursor: pointer; font: inherit; }
.qty span { width: 32px; display: inline-block; text-align: center; }
.cart { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-top: 28px; }
.cart ul { list-style: none; }
.cart li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.cart .total { text-align: right; margin: 10px 0; font-size: 15px; }

/* ── 页脚：深红 ── */
footer { background: var(--red-dark); color: #F5ECE4; margin-top: 56px; padding: 30px 0 38px; }
footer a { color: #F0D9B8; }
footer a:hover { color: #fff; }
.foot-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: 3px; }
.foot-brand img { width: 34px; height: 34px; object-fit: contain; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.foot-motto { margin-top: 14px; letter-spacing: 2px; color: #E8CFA0; font-size: 14px; }
.foot-legal { margin-top: 8px; font-size: 12.5px; color: rgba(245, 236, 228, 0.72); }

@media (max-width: 760px) {
  .hero-side { display: none; }
  .hero-grid { flex-direction: column; align-items: flex-start; gap: 22px; }
  .hero-home h1 { font-size: 30px; }
  .hero-home .hero-seal img { width: 110px; }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 24px; }
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav-links { margin-left: 0; width: 100%; }
  .products { grid-template-columns: 1fr; }
  .bar { width: 100px; }
}
@media print {
  header, footer, .btn-row, .qnav, .no-print { display: none !important; }
  body { font-size: 13px; }
}


/* ===== 移动端适配（2026-10-25）：安卓与 iOS 浏览器通用 ===== */
html { -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  body { font-size: 15.5px; line-height: 1.72; }
  .wrap { padding: 0 16px; }

  /* 页眉：品牌一行，导航单行横向滑动，不再堆成三行 */
  .nav { padding: 10px 0 0; gap: 0; flex-wrap: wrap; }
  .brand { width: 100%; padding-bottom: 8px; }
  .logo { width: 38px; height: 38px; }
  .brand-t b { font-size: 17px; letter-spacing: 2px; }
  .brand-t i { font-size: 9px; letter-spacing: 2.5px; }
  .nav-links {
    width: 100%; margin: 0; display: flex; flex-wrap: nowrap; gap: 0;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line); padding: 2px 0 4px; scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; padding: 9px 11px; font-size: 14px; }

  /* 标题与间距 */
  .hero { padding: 30px 0 24px; }
  .hero h1, h1 { font-size: 21px; }
  h2 { font-size: 18px; }
  .hero-home { padding: 34px 0 30px; }
  .hero-home h1 { font-size: 26px; }

  /* 按钮与表单：触控区不小于 44px；输入框 16px 防 iOS 聚焦放大 */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; }
  .btn-row { gap: 10px; margin-top: 18px; }
  input, select, textarea { font-size: 16px !important; }

  /* 表格：收紧字号并允许断词，四列表格也能塞进 360px */
  .score-table { font-size: 13px; table-layout: fixed; }
  .score-table th, .score-table td { padding: 7px 6px; word-break: break-word; }
  .bar { width: 100%; }

  /* 名录与页脚 */
  .person { gap: 6px; }
  .person .desc { flex-basis: 100%; }
  .foot-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 12px; }
  .plain-list li { gap: 6px; }
}

@media (max-width: 400px) {
  .brand-t b { font-size: 16px; letter-spacing: 1px; }
  .nav-links a { padding: 9px 9px; font-size: 13.5px; }
  .score-table { font-size: 12px; }
  h1 { font-size: 19px; }
}

/* 触控细节：去掉双击缩放延迟，点击高亮更克制 */
a, button, .tab, .scale button { -webkit-tap-highlight-color: rgba(224, 0, 16, 0.08); }
.btn, .tab, .scale button, .nav-links a { touch-action: manipulation; }
