:root{
  color-scheme: light;
  --bg:#f6f7fb;
  --panel:#ffffff;
  --panel-soft:#fbfcff;
  --line:#e9edf5;
  --line-strong:#d9e0ec;
  --text:#111827;
  --muted:#6b7280;
  --soft:#f2f5fb;
  --brand:#2563eb;
  --brand-soft:#edf4ff;
  --brand-line:#cfe0ff;
  --focus:#dbeafe;
  --success:#2563eb;
  --warning:#2563eb;
  --shadow:0 1px 2px rgba(17,24,39,.04),0 14px 34px rgba(17,24,39,.07);
  --shadow-soft:0 1px 1px rgba(17,24,39,.03),0 8px 24px rgba(17,24,39,.05);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Inter","SF Pro Display","Microsoft YaHei","PingFang SC",Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}
button,input,select,textarea{font:inherit}
button{
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease;
}
button.primary{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  box-shadow:0 8px 18px rgba(37,99,235,.16);
}
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:224px minmax(0,1fr) 344px;
  background:var(--bg);
}
.app-nav,.app-inspector{
  background:rgba(255,255,255,.82);
  border-right:1px solid var(--line);
}
.app-nav{
  padding:22px 14px;
  backdrop-filter:blur(18px);
}
.brand{
  padding:4px 8px 18px;
  border-bottom:1px solid var(--line);
  margin-bottom:18px;
}
.brand h1{margin:0;font-size:17px;line-height:1.35;font-weight:760}
.brand p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.65}
.nav{display:grid;gap:6px}
.nav button{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  padding:10px 12px;
  border-radius:8px;
  font-size:14px;
}
.nav button.active{
  background:#fff;
  border-color:var(--brand-line);
  box-shadow:0 1px 1px rgba(17,24,39,.03),0 8px 20px rgba(37,99,235,.08);
  color:var(--brand);
  font-weight:680;
}
.app-workspace{
  padding:22px 20px 28px;
  min-width:0;
}
.app-inspector{
  border-right:0;
  border-left:1px solid var(--line);
  padding:22px 14px;
  backdrop-filter:blur(18px);
}
.inspector-shell{
  position:sticky;
  top:22px;
  display:grid;
  gap:16px;
}
.inspector-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  margin-bottom:2px;
}
.inspector-section{
  margin-top:0;
  padding:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}
.inspector-section summary{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  color:var(--text);
  font-size:13px;
  font-weight:680;
}
.inspector-section-body{
  padding:0 14px 14px;
}
.inspector-section[open] summary{
  border-bottom:1px solid var(--line);
}
.inspector-kicker{
  color:var(--brand);
  font-size:12px;
  font-weight:720;
  letter-spacing:0;
  margin-bottom:4px;
}
.inspector-head h3{
  margin:0;
  font-size:17px;
  line-height:1.3;
}
.inspector-body{
  display:grid;
  gap:10px;
}
.topbar{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:18px;
}
.topbar h2{margin:0;font-size:24px;line-height:1.25;font-weight:760}
.topbar p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.page{display:none}
.page.active{display:block}
.page > .panel{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}
.page > .panel > h3{
  display:none;
}
.home-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.layout{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:12px;
  margin-bottom:12px;
}
.gallery-page{
  display:grid;
  gap:16px;
  width:100%;
}
.gallery-filters{
  display:grid;
  gap:12px;
}
.gallery-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.gallery-count{
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
}
.panel,.card,.product-card,.section-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:var(--shadow-soft);
}
.card,.product-card{padding:16px}
.card{
  min-height:104px;
  cursor:pointer;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.home-grid .card{
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.home-grid .card::after{
  content:"打开";
  align-self:flex-start;
  margin-top:18px;
  color:var(--brand);
  font-size:12px;
  font-weight:680;
  padding:2px 8px;
  border:1px solid var(--brand-line);
  border-radius:999px;
  background:var(--brand-soft);
}
.card:hover,.product-card:hover,.product-row:hover{
  border-color:var(--brand-line);
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}
.card h3,.section-card h3,.product-card h3{margin:0 0 8px;font-size:16px;font-weight:720}
.card p,.muted,.small{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.panel{padding:16px}
label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
input,select,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  padding:9px 11px;
  background:#fff;
  color:var(--text);
  outline:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px var(--focus);
}
textarea{min-height:84px;resize:vertical}
.filters{display:grid;gap:10px}
.list{display:grid;gap:10px}
.product-card{cursor:pointer}
.product-card.active{
  border-color:var(--brand-line);
  box-shadow:0 0 0 3px var(--focus);
}
.meta{font-size:13px;color:var(--muted);line-height:1.55}
.pill{
  display:inline-flex;
  min-height:24px;
  align-items:center;
  padding:2px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel-soft);
  color:#4b5563;
  font-size:12px;
  margin-right:6px;
  margin-bottom:6px;
}
.actions{display:flex;gap:8px;flex-wrap:wrap}
details{
  margin-top:10px;
  border-top:1px solid var(--line);
  padding-top:10px;
}
summary{cursor:pointer;font-weight:680;color:var(--brand)}
.evidence-item{
  margin-top:8px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel-soft);
}
.note{
  padding:12px;
  border-radius:8px;
  border:1px solid var(--line);
  background:var(--panel-soft);
  color:var(--text);
  font-size:13px;
  line-height:1.7;
}
.hidden{display:none !important}
.product-admin{
  display:grid;
  grid-template-columns:360px minmax(0,1fr);
  gap:14px;
}
.toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.product-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  border:1px solid var(--line);
  background:#fff;
  border-radius:8px;
  padding:12px;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.product-row.active{
  border-color:var(--brand-line);
  box-shadow:0 0 0 3px var(--focus);
}
.product-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.product-gallery{
  align-items:stretch;
}
.product-grid-card{
  position:relative;
  display:grid;
  gap:12px;
  text-align:left;
  width:100%;
  min-height:210px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.product-grid-card > *:not(.product-grid-cover){
  position:relative;
  z-index:1;
}
.product-grid-cover{
  position:absolute;
  inset:0;
  background-image:var(--card-cover);
  background-size:cover;
  background-position:center top;
  opacity:.08;
  pointer-events:none;
  z-index:0;
}
.product-grid-card:hover{
  border-color:var(--brand-line);
  box-shadow:var(--shadow);
  transform:translateY(-2px);
}
.product-grid-card-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.product-grid-title{
  font-weight:760;
  color:var(--text);
  line-height:1.4;
  font-size:16px;
}
.product-grid-badge{
  padding:3px 8px;
  border-radius:999px;
  background:var(--brand-soft);
  border:1px solid var(--brand-line);
  color:var(--brand);
  font-size:12px;
  white-space:nowrap;
}
.product-grid-summary{
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.product-grid-metrics{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  font-size:12px;
  color:var(--muted);
  align-self:end;
}
.product-grid-metrics span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--panel-soft);
}
.overlay-backdrop{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,.28);
  backdrop-filter:blur(10px);
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:28px 18px;
  z-index:40;
}
.overlay-panel{
  width:min(1120px,100%);
  max-height:calc(100vh - 56px);
  overflow:auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:var(--shadow);
  padding:18px;
}
.overlay-header{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:14px;
}
.overlay-body{
  display:grid;
  gap:14px;
}
.score-line{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.55}
.form-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.field-block{margin-bottom:12px}
.field-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:6px;
}
.ghost-note{
  color:var(--brand);
  font-size:12px;
}
.inline-actions{display:flex;gap:8px;flex-wrap:wrap}
.evidence-card{
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px;
  background:var(--panel-soft);
  margin-top:8px;
}
.evidence-grid{
  display:grid;
  gap:10px;
}
.evidence-compact{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}
.section-title{
  margin:0 0 10px;
  font-size:16px;
  font-weight:720;
}
.compare-workspace{
  display:grid;
  grid-template-columns:360px minmax(0,1fr);
  gap:14px;
}
.document-workspace{
  display:grid;
  grid-template-columns:420px minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.document-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.compare-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.compare-col{min-width:0}
.compare-col h3{margin:0 0 6px;font-size:18px}
.compare-section{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.compare-module-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.compare-summary{margin-top:14px}
.plan-workspace{
  display:grid;
  grid-template-columns:360px minmax(0,1fr);
  gap:14px;
}
.field-group{
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid var(--line);
}
.field-group-title{
  font-size:13px;
  font-weight:700;
  margin-bottom:10px;
  color:var(--text);
}
.plan-step{
  margin-bottom:14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel-soft);
}
.plan-step-title{
  font-weight:700;
  margin-bottom:10px;
}
.plan-line{
  margin-top:10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.plan-tone{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 8px;
  border-radius:999px;
  background:var(--brand-soft);
  border:1px solid var(--brand-line);
  color:var(--brand);
  font-size:12px;
  margin-bottom:6px;
}
.candidate-card{
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  margin-top:12px;
}
.candidate-card.warning{
  border-color:var(--brand-line);
}
.candidate-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.candidate-title{
  font-size:15px;
  font-weight:740;
  line-height:1.35;
}
.candidate-badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.candidate-body{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.candidate-row{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:12px;
  padding:9px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.candidate-row span:first-child{
  color:#4b5563;
  font-weight:650;
}
.view-card{
  display:grid;
  gap:10px;
  min-width:0;
}
.view-fields{
  display:grid;
  gap:8px;
  margin-top:4px;
}
.view-field{
  display:grid;
  gap:4px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel-soft);
}
.view-label{
  color:var(--muted);
  font-size:12px;
}
.view-value{
  color:var(--text);
  font-size:14px;
  line-height:1.6;
  word-break:break-word;
}
@media (max-width: 1180px){
  .app-shell{grid-template-columns:1fr}
  .app-nav,.app-inspector{border-right:0;border-left:0;border-bottom:1px solid var(--line)}
  .app-inspector{border-top:1px solid var(--line)}
  .inspector-shell{position:static}
  .home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .layout,.search-row,.product-admin,.compare-workspace,.document-workspace,.document-stats,.compare-grid,.plan-workspace,.product-grid{grid-template-columns:1fr}
}
@media (max-width: 720px){
  .topbar{flex-direction:column}
  .home-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
}
