/* 增强层 5：首页输入区可用性 —— 框1（她的话）常驻发送键 */

.field-her { gap: 6px; padding-right: 6px; }

.her-send {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  margin: 3px 0;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.her-send[disabled] {
  background: #D9D6CD;
  cursor: default;
}
.her-send:active:not([disabled]) {
  background: var(--brand-deep);
  transform: scale(.94);
}
.her-send svg { display: block; }

/* ── 输入区合并：一个外框，两个语义区（她的话 / 我的想法） ── */
.composer-inner {
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2px;
  transition: border-color .15s, box-shadow .15s;
}
.composer-inner:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 上区：她的话（去边框，融进外框） */
.field-her {
  background: transparent;
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 2px 2px 2px 16px;
}
.field-her:focus-within,
.field-her:focus {
  border: none;
  box-shadow: none;
}

/* 下区：我的想法（用一条分隔线表达"另一个语义区"，而不是另一个框） */
.box2 {
  background: transparent;
  border: none;
  border-top: 1px solid transparent;
  border-radius: 0 0 20px 20px;
  margin-top: 1px;
}
.box2::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 14px;
  background: var(--border);
}
.box2:focus-within,
.box2.expanded {
  border: none;
  border-top-color: transparent;
  box-shadow: none;
}

/* 展开态：分隔线变主色，提示"这里是另一个区" */
.box2.expanded::before {
  background: var(--brand-soft);
}

/* 展开后由框2 自己的发送键负责提交，隐藏上区的快捷发送键，避免两个绿箭头 */
.composer-inner:has(.box2.expanded) .her-send {
  display: none;
}

/* 折叠态：下区是一行轻提示，不像第二个输入框 */
.mini-row { padding: 7px 10px 7px 16px; }
.mini-ph { font-size: 13.5px; color: var(--faint); }

/* 修：.field:focus-within 的特异性高于 .field-her，导致内部仍有描边 */
.composer-inner .field.field-her,
.composer-inner .field.field-her:focus-within,
.composer-inner .field.field-her:focus {
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
}
/* 分隔线加深一点，让"两个语义区"看得见 */
.composer-inner .box2::before {
  background: #DCD8CC;
}

/* 合并后聚焦提示交给外框，输入框自身不再画焦点环（否则像框中框） */
.composer-inner .field-input:focus,
.composer-inner .field-input:focus-visible {
  outline: none;
}

/* ── 新建她的档案（P0 收口） ── */
.wb5-mask {
  position: fixed; inset: 0; background: rgba(25,28,24,.5);
  z-index: 97; display: none;
}
.wb5-mask.on { display: flex; align-items: flex-end; justify-content: center; }

.wb5-sheet {
  width: 100%; max-width: 520px; box-sizing: border-box;
  background: var(--bg);
  border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: wb5up .22s var(--ease, ease) both;
}
@keyframes wb5up { from { transform: translateY(16px); opacity: .6 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .wb5-sheet { animation: none } }

.wb5-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wb5-head b { font-size: var(--fs-18, 18px); }
.wb5-x { border: 0; background: none; font-size: 17px; color: var(--faint); width: 44px; height: 44px; margin: -10px -10px 0 0; cursor: pointer; }
.wb5-note { margin: 0 0 14px; font-size: 13px; color: var(--sub); line-height: 1.7; }

.wb5-input {
  width: 100%; box-sizing: border-box; height: 46px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); padding: 0 13px;
  font: inherit; font-size: 15px; color: var(--ink); outline: none;
  margin-bottom: 12px;
}
.wb5-input:focus { border-color: var(--brand); background: #fff; }

.wb5-stage { display: flex; gap: 8px; margin-bottom: 16px; }
.wb5-chip {
  flex: 1; height: 40px; border-radius: 11px;
  border: 1px solid var(--border); background: #fff;
  color: var(--sub); font-size: 13px; cursor: pointer;
}
.wb5-chip.on {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand-deep); font-weight: 600;
}

.wb5-ok {
  width: 100%; height: 48px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer;
}
.wb5-ok:active { background: var(--brand-deep); }

/* 用户新建的卡片：和内置人物区分开，但不多加视觉噪音 */
.her-card2.user-her .ring-num { color: var(--faint); }

/* ── 人物实体：档案内记忆块 ── */
.her-mem {
  margin: 10px 0 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.her-mem-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.her-mem-head span { font-size: 11px; font-weight: 400; color: var(--faint); }
.her-mem-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.6; color: var(--ink);
  padding: 5px 0;
  border-top: 1px solid var(--border);
}
.her-mem-row:first-of-type { border-top: 0; }
.her-mem-row i {
  flex: 0 0 auto; font-style: normal; font-size: 10px;
  padding: 1px 5px; border-radius: 5px; margin-top: 3px;
  background: var(--brand-soft); color: var(--brand-deep);
}
.her-mem-row.warn i { background: #FFF0EA; color: var(--accent); }
.her-mem-row span { flex: 1; }
.her-mem-row em { flex: 0 0 auto; font-style: normal; font-size: 11px; color: var(--faint); }
.her-mem-empty { font-size: 12.5px; color: var(--faint); padding: 6px 0; }

/* ── 记忆页：对象切换 ── */
.mem-who {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: -4px 0 12px;
}
.mem-who-chip {
  border: 1px solid var(--border); background: #fff; color: var(--sub);
  border-radius: 99px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.mem-who-chip.on {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand-deep); font-weight: 600;
}
.mem-owner {
  font-style: normal; font-size: 10.5px; color: var(--brand-deep);
  background: var(--brand-soft); border-radius: 5px; padding: 1px 5px;
  margin-left: 6px; white-space: nowrap;
}
.mem-empty { font-size: 13px; color: var(--faint); padding: 18px 4px; text-align: center; }

/* ── 结果页：本次参考了谁 ── */
.res-profile {
  margin: 0 0 12px;
  font-size: 12px; color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 8px; padding: 6px 10px;
  display: inline-block;
}

/* ── 套餐四周期 ── */
.pk-tiers {
  display: flex; gap: 8px; margin: 4px 0 12px;
  overflow-x: auto; padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.pk-tier {
  flex: 0 0 auto; width: 154px;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 11px; background: #fff; cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}
.pk-tier.on { border: 1.5px solid var(--brand); background: var(--brand-soft); }
.pk-tier.hot { box-shadow: 0 2px 10px rgba(31,122,109,.10); }
.pk-badge {
  position: absolute; top: -8px; right: 8px;
  font-size: 10px; padding: 1px 6px; border-radius: 99px;
  background: var(--brand); color: #fff;
}
.pk-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pk-credits { font-size: 12px; color: var(--brand-deep); margin: 2px 0 1px; font-weight: 600; }
.pk-desc { font-size: 11px; color: var(--faint); margin-bottom: 6px; }
.pk-feats { margin: 0; padding: 0; list-style: none; }
.pk-feats li {
  font-size: 11px; color: var(--sub); line-height: 1.75;
  padding-left: 11px; position: relative;
}
.pk-feats li::before {
  content: "·"; position: absolute; left: 2px; color: var(--brand);
  font-weight: 700;
}

.pk-cycles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.pk-cyc {
  border: 1px solid var(--border); background: #fff;
  border-radius: 11px; padding: 8px 10px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.pk-cyc.on { border: 1.5px solid var(--ink); background: #fff; }
.pk-cyc-label { font-size: 12px; color: var(--sub); }
.pk-cyc-label i {
  font-style: normal; font-size: 10px; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 0 4px; margin-left: 4px;
}
.pk-cyc-price { font-size: 15px; font-weight: 700; color: var(--ink); }
.pk-cyc.on .pk-cyc-price { color: var(--brand-deep); }

.pk-buy {
  width: 100%; height: 46px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 15.5px; font-weight: 600;
  cursor: pointer; margin-top: 2px;
}
.pk-buy:active { background: var(--brand-deep); }
.pk-note {
  margin: 8px 0 0; font-size: 11px; color: var(--faint); line-height: 1.7;
}

.pk-done { text-align: center; padding: 14px 4px 6px; }
.pk-ok {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 22px;
  line-height: 46px;
}
.pk-done b { font-size: 15px; }
.pk-done p { margin: 8px 0 0; font-size: 12.5px; color: var(--sub); line-height: 1.75; }
.pk-demo { font-size: 11px !important; color: var(--faint) !important; }

/* ── 订阅管理 ── */
.sub-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 6px 14px; margin: 6px 0 12px;
}
.sub-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border);
  font-size: 13px;
}
.sub-line:first-child { border-top: 0; }
.sub-line span { color: var(--sub); }
.sub-line b { color: var(--ink); font-weight: 600; }
.pk-cancel {
  width: 100%; height: 44px; border-radius: 12px;
  border: 1px solid var(--accent); background: #fff; color: var(--accent);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.pk-cancel:active { background: var(--accent-soft); }

/* 模型面板：档位标注（真实 token 预算 / 思考强度） */
.pop .opt i {
  font-style: normal;
  font-size: 10px;
  color: var(--faint);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.pop .opt.on i { color: var(--brand-deep); }
.pop .opt em { margin-left: 4px; }

/* ── .219 关系状态机 × 知识库智能战术胶囊与短板靶向特训 ── */
.tactical-pill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31,122,109,.24);
  background: linear-gradient(180deg, #F4FBF9 0%, #FFFFFF 100%);
}
.tactical-pill-bar.tone-hot {
  border-color: rgba(235,107,69,.32);
  background: linear-gradient(180deg, #FFF7F3 0%, #FFFFFF 100%);
}
.tactical-pill-bar.tone-cool {
  border-color: rgba(71,120,178,.28);
  background: linear-gradient(180deg, #F3F8FD 0%, #FFFFFF 100%);
}
.tactical-pill-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tactical-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.tactical-pill-sub {
  font-size: 11.5px;
  color: var(--sub);
  line-height: 1.4;
}
.tactical-pill-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tactical-pill-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  white-space: nowrap;
}
.tactical-pill-dismiss {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.85);
  color: var(--sub);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rel-pill.silent {
  color: #8A5410;
  background: #FFF4E2;
  border: 1px solid rgba(217,138,31,.28);
}
.rpg-roster-tactical {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  color: var(--brand-deep);
  background: rgba(31,122,109,.08);
}
.rpg-roster-tactical.tone-hot {
  color: #B93E23;
  background: #FFF3EE;
}
.rpg-roster-tactical.tone-cool {
  color: #2B5E94;
  background: #EEF5FC;
}
.rpg-roster-tactical.tone-calm {
  color: #1D5E54;
  background: #EDF8F4;
}
.tactical-pill-bar.tone-hot .tactical-pill-btn,
.tactical-alert-banner.tone-hot .tactical-pill-btn {
  background: #DF5A3B;
}
.tactical-pill-btn:disabled { opacity: .6; cursor: default; }

.tactical-result-box {
  margin: 8px 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(17,24,39,.04);
}
.tactical-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--ink);
}
.tactical-res-tip {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  line-height: 1.55;
}
.tactical-opt-card { margin-bottom: 8px; }
.tactical-kb-foot {
  margin: 6px 2px 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.5;
}
.tactical-alert-banner {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(235,107,69,.32);
  background: #FFF7F3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tactical-alert-banner.tone-cool {
  border-color: rgba(71,120,178,.28);
  background: #F3F8FD;
}
.tactical-alert-text {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.tactical-alert-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rank-training-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(31,122,109,.22);
  background: linear-gradient(180deg, #F5FBF9 0%, #FFFFFF 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rank-training-title { font-size: 13.5px; color: var(--ink); }
.rank-training-kb { margin: 0; font-size: 12px; color: var(--brand-deep); line-height: 1.5; }
.review-diagnosis-box {
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(31,122,109,.28);
  background: linear-gradient(180deg, #F3FBF8 0%, #FFFFFF 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-diagnosis-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: .02em;
}
.review-diagnosis-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
}
.review-kb-strip {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.45;
  padding-top: 4px;
  border-top: 1px dashed rgba(31,122,109,.18);
}
.review-replies-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-reply-card {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.review-reply-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(31,122,109,.09);
  padding: 3px 8px;
  border-radius: 999px;
}
.review-reply-text {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
}
.review-reply-why {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
}
