:root { font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; color: #1f2937; background: #f3f6fb; }
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 1080px; margin: 32px auto; padding: 0 20px; }
header, .policy-head, .save-row, .keyword { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1, h2, h3, p { margin: 0; }
h3 { margin-top: 22px; }
header { margin-bottom: 20px; }
header p, .panel p { color: #64748b; margin-top: 6px; }
.panel { background: #fff; border: 1px solid #dbe3ef; border-radius: 12px; padding: 22px; box-shadow: 0 8px 28px #33415512; margin-bottom: 18px; }
.hidden { display: none !important; }
form label { display: grid; gap: 6px; margin: 14px 0; max-width: 420px; }
input, select, button { font: inherit; border-radius: 7px; border: 1px solid #cbd5e1; padding: 9px 12px; }
button { border-color: #2563eb; background: #2563eb; color: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
.secondary { background: #fff; color: #2563eb; }
.status { margin-left: 12px; color: #b45309; }
.keyword-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin: 12px 0; }
.keyword { justify-content: flex-start; border: 1px solid #dbe3ef; border-radius: 9px; padding: 7px; background: #f8fafc; gap: 8px; }
.keyword-text { min-width: 0; flex: 1; }
.keyword-category { width: 112px; }
.keyword-delete { border: 0; background: transparent; color: #dc2626; padding: 8px 4px; }
.add-row { display: grid; grid-template-columns: minmax(180px, 1fr) 190px auto; gap: 10px; margin-bottom: 18px; }
.save-row { border-top: 1px solid #e2e8f0; margin-top: 20px; padding-top: 18px; }
.module-nav { display: flex; gap: 10px; margin-bottom: 18px; }
.module-tab { background: #fff; color: #475569; border-color: #cbd5e1; }
.module-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.module-help { margin-top: 10px !important; }
.activation-binding { display: grid; gap: 6px; max-width: 320px; margin-top: 12px; }
.action-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.action-section-head h3 { margin: 0; }
.anchor-actions { display: grid; gap: 10px; margin-top: 12px; }
.anchor-action { display: grid; grid-template-columns: 110px repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 12px; border: 1px solid #dbe3ef; border-radius: 9px; background: #f8fafc; }
.anchor-action > strong { align-self: center; }
.anchor-action-identity { display: grid; gap: 5px; min-width: 0; }
.anchor-action-identity input { font-weight: 700; }
.anchor-action-identity small { color: #64748b; overflow-wrap: anywhere; }
.anchor-action-identity .compact { padding: 5px 8px; justify-self: start; }
.fixed-back-action { grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
.fixed-back-action span { color: #64748b; }
.anchor-action label { display: grid; gap: 6px; min-width: 0; }
.anchor-action input, .anchor-action select { width: 100%; min-width: 0; }
.anchor-action .field-hidden { display: none; }
.anchor-sites { display: grid; gap: 10px; margin-top: 12px; }
.anchor-site { border: 1px solid #dbe3ef; border-radius: 10px; overflow: hidden; }
.anchor-site-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; background: #f8fafc; cursor: pointer; list-style: none; }
.anchor-site-head::-webkit-details-marker { display: none; }
.anchor-site-head::after { content: "展开"; min-width: 38px; color: #2563eb; font-size: 13px; text-align: right; }
.anchor-site[open] > .anchor-site-head::after { content: "收起"; }
.anchor-site[open] > .anchor-site-head { border-bottom: 1px solid #e2e8f0; }
.anchor-site-pages { display: grid; }
.anchor-page { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr) 180px; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #e2e8f0; }
.anchor-page:first-child { border-top: 0; }
.anchor-page-key, .anchor-site-id { color: #64748b; font-size: 13px; overflow-wrap: anywhere; }
.anchor-empty { padding: 14px; color: #64748b; }
@media (max-width: 800px) {
  .anchor-action { grid-template-columns: 1fr 1fr; }
  .anchor-action > strong { grid-column: 1 / -1; }
  .anchor-page { grid-template-columns: 1fr; }
  .anchor-page input { width: 100%; }
}
@media (max-width: 680px) {
  .add-row { grid-template-columns: 1fr; }
  .keyword-list { grid-template-columns: 1fr; }
  .keyword { flex-wrap: wrap; }
  .keyword-text { flex-basis: 100%; }
  .policy-head, header { align-items: flex-start; flex-direction: column; }
  .module-nav { flex-direction: column; }
  .anchor-action { grid-template-columns: 1fr; }
  .anchor-site-head { grid-template-columns: minmax(0, 1fr) auto; }
  .anchor-site-id { grid-column: 1 / -1; grid-row: 2; }
  .anchor-site-head::after { grid-column: 2; grid-row: 1; }
}
