/* ============================================================
   BSIS 品牌服务生产平台 · 设计系统
   LINLEE 林里 · 街头潮牌 (TIME TO BREAK)
   ============================================================ */
:root {
  /* 品牌色 */
  --green: #8CC63F;
  --green-deep: #6FA82E;
  --green-dark: #4d7d1f;
  --green-soft: #eef7e1;
  --black: #1A1A1A;
  --ink: #21251c;
  --purple: #A0408F;
  --yellow: #D7DF23;
  --duck: #F4D62E;
  --lime: #A6CE39;

  /* 中性 */
  --bg: #f4f6f1;
  --panel: #ffffff;
  --line: #e6e9e1;
  --line-strong: #d2d8c8;
  --muted: #6c7363;
  --muted-2: #9aa18f;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(36, 45, 25, 0.08);
  --shadow-lg: 0 18px 50px rgba(36, 45, 25, 0.16);
  --sidebar-w: 248px;

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Arial Black", "Arial", "Helvetica Neue", var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--green); color: #fff; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6c4; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--green-deep); }

/* ============================================================
   布局
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--black);
  color: #fff;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  z-index: 30;
}
.brand-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo .bsis {
  font-family: var(--display); font-weight: 900; font-size: 30px; letter-spacing: 1px;
  color: #fff; line-height: 1;
}
.brand-logo .bsis b { color: var(--green); }
.brand-logo .sub { font-size: 11px; color: var(--muted-2); letter-spacing: 2px; margin-top: 6px; text-transform: uppercase; }
.brand-logo .cn { font-size: 12.5px; color: var(--yellow); margin-top: 7px; font-weight: 600; }

.nav { padding: 12px 12px 20px; overflow-y: auto; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group > .label { font-size: 11px; color: var(--muted-2); letter-spacing: 1.5px; padding: 6px 12px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px; color: #d6dace;
  font-size: 14px; font-weight: 500; margin: 2px 0; transition: .15s;
}
.nav-item .ico { width: 20px; text-align: center; font-size: 16px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--green); color: var(--black); font-weight: 700; }
.nav-item.active .ico { filter: none; }
.sidebar .foot { padding: 14px 18px; font-size: 11px; color: var(--muted-2); border-top: 1px solid rgba(255,255,255,.08); }

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 13px; color: var(--muted); }
.topbar .crumb b { color: var(--ink); }
.topbar .title { font-weight: 800; font-size: 17px; }
.topbar .spacer { flex: 1; }
.topbar .pill { font-size: 12px; background: var(--green-soft); color: var(--green-dark); padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.content { padding: 26px 30px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ============================================================
   通用组件
   ============================================================ */
.section-head { margin: 0 0 18px; }
.section-head h1 { font-size: 26px; font-weight: 900; margin: 0 0 6px; letter-spacing: -.3px; }
.section-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.eyebrow { font-family: var(--display); font-weight: 900; color: var(--green-deep); letter-spacing: 1px; font-size: 13px; text-transform: uppercase; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: none; border-radius: 11px; padding: 11px 18px; font-weight: 700; font-size: 14px;
  background: var(--black); color: #fff; transition: .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn.green { background: var(--green); color: var(--black); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.chip.dark { background: #2a2f24; color: #d7e9bf; }
.chip.purple { background: #f6e8f4; color: var(--purple); }
.chip.yellow { background: #faf7c8; color: #8a8d12; }

.tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: .5px; }
.tag.main { background: var(--green); color: var(--black); }
.tag.assist { background: var(--black); color: #fff; }

/* ============================================================
   工作台 / Dashboard
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 40px 40px 36px; color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 60%, var(--green-dark) 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: var(--hero-slogan, "TIME TO BREAK"); position: absolute; right: -10px; bottom: -22px;
  font-family: var(--display); font-weight: 900; font-size: 86px; color: rgba(255,255,255,.10);
  letter-spacing: 2px; white-space: nowrap; pointer-events: none;
}
.hero .kicker { font-family: var(--display); letter-spacing: 2px; font-size: 13px; opacity: .9; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: 56px; margin: 6px 0 4px; line-height: 1; letter-spacing: 1px; }
.hero .lead { font-size: 15.5px; max-width: 640px; opacity: .96; margin-top: 12px; }
.hero .duck { position: absolute; right: 40px; top: 28px; width: 96px; opacity: .96; filter: drop-shadow(0 6px 12px rgba(0,0,0,.18)); }

.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; text-align: center; }
.stat .n { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--green-deep); line-height: 1; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 7px; }

.module-card {
  display: block; padding: 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: .18s; position: relative; overflow: hidden;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.module-card .ic { font-size: 30px; }
.module-card h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 800; }
.module-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.module-card .arrow { position: absolute; right: 18px; top: 20px; color: var(--line-strong); font-size: 20px; transition: .18s; }
.module-card:hover .arrow { color: var(--green); transform: translateX(3px); }

/* ============================================================
   手册浏览
   ============================================================ */
.manual-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.manual-toc { position: sticky; top: 80px; }
.toc-sec { margin-bottom: 8px; }
.toc-sec > .h { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14px; padding: 9px 10px; border-radius: 9px; }
.toc-sec > .h .num { font-family: var(--display); color: var(--green-deep); font-size: 15px; }
.toc-sub { display: block; font-size: 13px; color: var(--muted); padding: 7px 10px 7px 30px; border-radius: 8px; transition: .12s; }
.toc-sub:hover { background: var(--green-soft); color: var(--green-dark); }
.toc-sub.active { background: var(--green); color: var(--black); font-weight: 700; }

.sub-page { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sub-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 3px solid var(--green); padding-bottom: 12px; margin-bottom: 22px; }
.sub-head .id { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--green-deep); }
.sub-head h2 { font-size: 23px; font-weight: 900; margin: 0; }

.block-lead { font-size: 17px; font-weight: 600; color: var(--green-dark); background: var(--green-soft); border-left: 4px solid var(--green); padding: 13px 18px; border-radius: 0 12px 12px 0; margin: 0 0 20px; }
.block-para { margin: 0 0 18px; }
.block-para h4 { margin: 0 0 6px; font-size: 15px; color: var(--green-deep); display: flex; align-items: center; gap: 8px; }
.block-para h4::before { content: ""; width: 7px; height: 7px; background: var(--green); border-radius: 2px; }
.block-para p { margin: 0; color: #3a4030; font-size: 14.5px; }

.field-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.field-card .ft { font-weight: 800; color: var(--green-dark); margin-bottom: 5px; font-size: 14px; }
.field-card .fv { color: #3a4030; font-size: 14.5px; }

.block-hero { text-align: center; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; border-radius: 18px; padding: 34px 28px; margin: 0 0 22px; }
.block-hero .big { font-size: 30px; font-weight: 900; letter-spacing: 1px; }
.block-hero .sub { margin-top: 12px; font-size: 14.5px; opacity: .95; max-width: 620px; margin-left: auto; margin-right: auto; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 20px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 20px; }
.kv-card { border-radius: 14px; padding: 20px; color: #fff; background: var(--green-deep); }
.kv-card .k { font-family: var(--display); font-size: 22px; font-weight: 900; }
.kv-card .v { margin-top: 8px; font-size: 14px; opacity: .95; }

.timeline { position: relative; margin: 8px 0 20px; padding-left: 8px; }
.timeline .tl { display: flex; gap: 16px; padding: 0 0 18px; position: relative; }
.timeline .tl::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: -4px; width: 2px; background: var(--line-strong); }
.timeline .tl:last-child::before { display: none; }
.timeline .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green); flex: 0 0 auto; margin-top: 4px; z-index: 1; }
.timeline .y { font-family: var(--display); font-weight: 900; color: var(--green-deep); min-width: 78px; }
.timeline .t { color: #3a4030; font-size: 14px; }

/* 角色卡 */
.role-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; background: var(--panel); }
.role-avatar { width: 110px; height: 130px; border-radius: 12px; background: linear-gradient(160deg, var(--green), var(--green-deep)); display: flex; align-items: center; justify-content: center; font-size: 46px; color: #fff; }
.role-card .rname { font-size: 18px; font-weight: 900; margin: 2px 0 8px; display: flex; align-items: center; gap: 10px; }
.role-card .feat { color: #3a4030; font-size: 14px; margin-bottom: 12px; }
.role-scenes { display: flex; flex-direction: column; gap: 8px; }
.role-scene { display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 13.5px; }
.role-scene .s { font-weight: 700; color: var(--green-dark); }
.role-scene .c { color: var(--muted); }

/* persona */
.persona { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 18px; }
.persona-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); }
.persona-card .ph { display: flex; align-items: center; gap: 12px; }
.persona-card .pa { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.persona-card .pn { font-weight: 800; }
.persona-card .pr { font-size: 12.5px; color: var(--muted); }
.persona-card .quote { margin: 12px 0; font-size: 14px; color: #3a4030; font-style: italic; border-left: 3px solid var(--green); padding-left: 12px; }
.persona-card .factor { font-size: 13px; color: var(--green-dark); font-weight: 600; }

/* template / 留白 */
.tpl-card { border: 2px dashed var(--line-strong); border-radius: 14px; padding: 18px; background: #fbfcf9; margin-bottom: 16px; }
.tpl-card .tt { font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.tpl-field { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: #3a4030; }
.tpl-field:last-child { border-bottom: none; }
.tpl-field .blank { flex: 1; border-bottom: 1.5px dotted var(--line-strong); min-height: 18px; }

/* 原始扫描 */
.scan-strip { margin-top: 22px; }
.scan-strip .lab { font-size: 12px; color: var(--muted-2); margin-bottom: 10px; letter-spacing: .5px; }
.scan-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.scan-grid img { width: 130px; height: auto; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; transition: .15s; box-shadow: var(--shadow); }
.scan-grid img:hover { transform: scale(1.03); border-color: var(--green); }

/* ============================================================
   旅程图
   ============================================================ */
.journey-wrap { overflow-x: auto; padding-bottom: 14px; }
.journey-track { display: grid; grid-auto-flow: column; gap: 0; min-width: 1100px; }
.j-col { min-width: 150px; border-right: 1px dashed var(--line); padding: 0 10px; }
.j-col:last-child { border-right: none; }
.j-phase { font-size: 11px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 1px; padding: 4px 0; }
.j-name { font-weight: 800; font-size: 14px; margin: 4px 0 12px; display: flex; align-items: center; gap: 6px; }
.j-name .wow { color: var(--yellow); }
.j-curve { height: 70px; position: relative; margin-bottom: 12px; }
.j-emo { position: absolute; bottom: 0; width: 100%; }
.j-behavior { font-size: 12.5px; color: #3a4030; margin-bottom: 10px; min-height: 54px; }
.j-touch { font-size: 11.5px; color: var(--green-dark); background: var(--green-soft); border-radius: 8px; padding: 8px 10px; }

/* scenarios */
.scn { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.scn-head { background: var(--green); color: var(--black); padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.scn-head .act { font-family: var(--display); font-weight: 900; }
.scn-head .ti { font-weight: 900; font-size: 17px; }
.scn-head .goal { font-size: 12.5px; opacity: .8; margin-left: auto; max-width: 360px; text-align: right; }
.scn-body { padding: 8px 18px 16px; }
.scn-step { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.scn-step:last-child { border-bottom: none; }
.scn-step .no { font-family: var(--display); font-weight: 900; color: var(--green-deep); font-size: 16px; }
.scn-step .sn { font-weight: 800; margin-bottom: 6px; }
.scn-step .work { font-size: 13px; color: var(--muted); }
.scn-step .talk { margin-top: 8px; font-size: 13.5px; background: #fbfcf9; border-left: 3px solid var(--yellow); padding: 8px 12px; border-radius: 0 8px 8px 0; color: #3a4030; }
.scn-step .talk::before { content: "话术 · "; font-weight: 700; color: #8a8d12; }

.zone-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 18px; }
.zone-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel); }
.zone-item .z { font-weight: 800; color: var(--green-dark); }
.zone-item .d { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   品牌资产库 / 色彩
   ============================================================ */
.color-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.color-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: .15s; }
.color-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.color-swatch { height: 120px; display: flex; align-items: flex-end; padding: 12px; font-weight: 800; }
.color-meta { padding: 14px 16px; background: var(--panel); }
.color-meta .cn { font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.color-meta .cn .role { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.color-meta .hex { font-family: var(--display); letter-spacing: .5px; color: var(--muted); margin-top: 4px; font-size: 14px; }
.color-meta .usage { font-size: 12px; color: var(--muted-2); margin-top: 8px; }
.ratio-bar { display: flex; height: 40px; border-radius: 12px; overflow: hidden; margin: 18px 0; box-shadow: var(--shadow); }
.ratio-bar span { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }

.asset-logo { display: flex; flex-wrap: wrap; gap: 18px; }
.asset-logo .lc { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--panel); text-align: center; box-shadow: var(--shadow); }
.asset-logo .lc.dark { background: var(--black); }
.asset-logo .lc.green { background: var(--green); }
.asset-logo .lc img { height: 70px; margin: 0 auto 14px; }
.asset-logo .lc .dl { font-size: 12.5px; color: var(--muted); }
.asset-logo .lc.dark .dl, .asset-logo .lc.green .dl { color: rgba(255,255,255,.8); }

/* ============================================================
   触点物料清单 / BOM
   ============================================================ */
.bom-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bom-toolbar .count { margin-left: auto; font-size: 13px; color: var(--muted); }
.bom-toolbar .count b { color: var(--green-deep); font-family: var(--display); font-size: 18px; }
.bom-group { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.bom-group-head { padding: 12px 18px; color: #fff; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.bom-module { border-top: 1px solid var(--line); }
.bom-module-head { padding: 10px 18px; background: #fafbf7; font-weight: 700; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.bom-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; }
.bom-item { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); border-radius: 9px; padding: 7px 12px; font-size: 13px; cursor: pointer; transition: .12s; user-select: none; background: #fff; }
.bom-item:hover { border-color: var(--green); }
.bom-item.on { background: var(--green); border-color: var(--green); color: var(--black); font-weight: 700; }
.bom-item .ck { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.bom-item.on .ck { background: var(--black); border-color: var(--black); color: var(--green); }

/* systems chips */
.sys-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* ============================================================
   物料生产配置工具
   ============================================================ */
.cfg-layout { display: grid; grid-template-columns: 220px 1fr 320px; gap: 20px; align-items: start; }
.cfg-list { position: sticky; top: 80px; }
.cfg-list .t { font-size: 12px; color: var(--muted-2); letter-spacing: 1px; padding: 4px 10px; text-transform: uppercase; }
.cfg-tpl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; cursor: pointer; transition: .12s; font-size: 13.5px; font-weight: 500; }
.cfg-tpl:hover { background: var(--green-soft); }
.cfg-tpl.active { background: var(--black); color: #fff; }
.cfg-tpl .i { font-size: 18px; }
.cfg-tpl .meta small { display: block; font-size: 11px; color: var(--muted-2); }
.cfg-tpl.active .meta small { color: rgba(255,255,255,.6); }

.cfg-stage { background: repeating-conic-gradient(#f0f2ec 0% 25%, #f7f8f4 0% 50%) 50% / 22px 22px; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; align-items: center; justify-content: center; min-height: 540px; box-shadow: var(--shadow) inset; }
.cfg-preview { box-shadow: var(--shadow-lg); border-radius: 6px; overflow: hidden; background: #fff; max-width: 100%; }
.cfg-preview svg { display: block; max-width: 100%; height: auto; }

.cfg-panel { position: sticky; top: 80px; }
.cfg-panel .ph { font-weight: 900; font-size: 17px; margin-bottom: 3px; }
.cfg-panel .pspec { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input[type=text], .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 9px 12px;
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff; transition: .12s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140,198,63,.18); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field .colorrow { display: flex; align-items: center; gap: 10px; }
.field input[type=color] { width: 44px; height: 38px; border: 1.5px solid var(--line-strong); border-radius: 9px; padding: 2px; background: #fff; cursor: pointer; }
.swatch-pick { display: flex; gap: 7px; }
.swatch-pick .sw { width: 28px; height: 28px; border-radius: 7px; cursor: pointer; border: 2px solid transparent; }
.swatch-pick .sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.toggle .sw { width: 40px; height: 23px; border-radius: 999px; background: var(--line-strong); position: relative; transition: .15s; }
.toggle .sw::after { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on .sw { background: var(--green); }
.toggle.on .sw::after { left: 19px; }
.cfg-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }

/* spec sheet output */
.spec-sheet { font-size: 13px; }
.spec-sheet .row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.spec-sheet .row .k { color: var(--muted); }
.spec-sheet .row .v { font-weight: 600; }

/* ============================================================
   场景搭建器
   ============================================================ */
.scene-layout { display: grid; grid-template-columns: 210px 1fr 300px; gap: 18px; align-items: start; }
.scene-palette { position: sticky; top: 80px; }
.scene-palette .t { font-size: 12px; color: var(--muted-2); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.pal-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: grab; font-size: 13px; background: #fff; transition: .12s; }
.pal-item:hover { border-color: var(--green); transform: translateX(2px); }
.pal-item:active { cursor: grabbing; }
.pal-item .sw { width: 18px; height: 18px; border-radius: 5px; }

.scene-canvas-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.scene-tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbf7; }
.scene-tab { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.scene-tab.active { background: var(--black); color: #fff; }
.scene-canvas { position: relative; height: 540px; background:
   linear-gradient(#eef1ea 1px, transparent 1px) 0 0 / 26px 26px,
   linear-gradient(90deg, #eef1ea 1px, transparent 1px) 0 0 / 26px 26px,
   #f7f8f4;
  overflow: hidden; }
.placed { position: absolute; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; cursor: move; box-shadow: 0 4px 12px rgba(0,0,0,.18); user-select: none; text-align: center; padding: 3px; border: 2px solid rgba(255,255,255,.5); }
.placed .x { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #e0463c; color: #fff; font-size: 12px; display: none; align-items: center; justify-content: center; line-height: 1; }
.placed:hover .x { display: flex; }
.placed.sel { outline: 3px solid var(--yellow); outline-offset: 1px; }
.flow-node { position: absolute; width: 54px; height: 54px; border-radius: 50%; background: rgba(224,70,60,.85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; cursor: move; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(224,70,60,.4); }
.flow-num { position: absolute; top: -7px; left: -7px; width: 20px; height: 20px; background: var(--black); border-radius: 50%; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

.scene-side .t { font-weight: 800; margin-bottom: 10px; }
.bom-out { font-size: 13px; }
.bom-out .bi { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bom-out .bi .sw { width: 12px; height: 12px; border-radius: 3px; }
.bom-out .bi .ct { margin-left: auto; font-weight: 700; color: var(--green-deep); }
.scene-empty { color: var(--muted-2); font-size: 13px; text-align: center; padding: 30px 10px; }

/* ============================================================
   Lightbox 大图
   ============================================================ */
.lightbox { position: fixed; inset: 0; background: rgba(20,24,16,.86); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 30px; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox .close { position: absolute; top: 22px; right: 30px; color: #fff; font-size: 30px; cursor: pointer; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--black); color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; transition: .25s; z-index: 200; box-shadow: var(--shadow-lg); pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--green); }

/* ============================================================
   品牌切换器（顶栏）
   ============================================================ */
.brand-switch { position: relative; }
.bswitch-btn { display: flex; align-items: center; gap: 9px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 11px; padding: 7px 12px; font-size: 13px; color: var(--ink); transition: .12s; }
.bswitch-btn:hover { border-color: var(--green); }
.bswitch-btn .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 2px #fff inset; }
.bswitch-btn .bn { font-weight: 800; }
.bswitch-btn .fmt { font-size: 11px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.bswitch-btn .caret { color: var(--muted-2); font-size: 11px; }
.bswitch-menu { position: absolute; right: 0; top: 46px; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 40; }
.bswitch-menu.on { display: block; }
.bswitch-lab { font-size: 11px; color: var(--muted-2); letter-spacing: 1px; padding: 6px 10px; text-transform: uppercase; }
.bswitch-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; transition: .12s; }
.bswitch-item:hover { background: var(--green-soft); }
.bswitch-item.on { background: var(--green-soft); }
.bswitch-item .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.bswitch-item .bn { font-weight: 600; flex: 1; }
.bswitch-item .fi { font-size: 14px; }
.bswitch-item .ck { color: var(--green-deep); font-weight: 800; }
.bswitch-foot { border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 10px 4px; }
.bswitch-foot a { font-size: 13px; font-weight: 700; color: var(--green-deep); cursor: pointer; }

/* hero 生成徽标 */
.hero-badge { width: 150px !important; height: auto; top: 24px !important; right: 30px !important; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-badge svg { display: block; width: 100%; height: auto; }

/* ============================================================
   品牌中心
   ============================================================ */
.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.brand-card { display: grid; grid-template-columns: 150px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--panel); box-shadow: var(--shadow); position: relative; align-items: center; }
.brand-card.active { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft), var(--shadow); }
.brand-card-logo { border-radius: 10px; overflow: hidden; }
.brand-card-logo svg { display: block; width: 100%; height: auto; }
.brand-card-body { min-width: 0; }
.bc-name { font-weight: 900; font-size: 16px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bc-fmt { font-size: 12.5px; color: var(--muted); margin: 5px 0 9px; }
.bc-dots { display: flex; gap: 5px; }
.bdot { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); }
.brand-card-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px dashed var(--line); padding-top: 12px; }

/* ============================================================
   弹窗
   ============================================================ */
.modal-ov { position: fixed; inset: 0; background: rgba(20,24,16,.55); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; z-index: 120; padding: 40px 20px; overflow-y: auto; }
.modal-ov.on { display: flex; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; width: 100%; position: relative; animation: fade .25s ease; }
.modal-x { position: absolute; top: 16px; right: 20px; font-size: 26px; color: var(--muted-2); cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal h3 { font-size: 19px; }

/* 资产库 LOGO 框 */
.logo-frame { background: repeating-conic-gradient(#f0f2ec 0% 25%, #f7f8f4 0% 50%) 50% / 16px 16px; border-radius: 10px; padding: 16px; display: flex; align-items: center; justify-content: center; min-height: 110px; margin-bottom: 12px; }
.logo-frame svg { max-height: 90px; width: auto; }

/* responsive */
@media (max-width: 1100px) {
  .cfg-layout, .scene-layout { grid-template-columns: 1fr; }
  .cfg-list, .cfg-panel, .scene-palette, .scene-side { position: static; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-toc { position: static; }
  .stat-row { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .g2, .g3, .g4, .cards-3, .cards-2, .color-grid, .persona, .zone-list, .brand-grid { grid-template-columns: 1fr; }
  .brand-card { grid-template-columns: 110px 1fr; }
  .content { padding: 18px; }
  .hero h1 { font-size: 40px; }
}
.hide { display: none !important; }
