
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #d8d4e8; }
body {
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #2a2158;
  -webkit-font-smoothing: antialiased;
}
.phone {
  width: 390px;
  min-height: 844px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 260px 220px at 88% -4%, rgba(196, 176, 255, .55) 0%, transparent 68%),
    radial-gradient(ellipse 230px 200px at 4% 18%, rgba(255, 214, 232, .5) 0%, transparent 70%),
    radial-gradient(ellipse 220px 180px at 100% 78%, rgba(255, 220, 190, .4) 0%, transparent 70%),
    linear-gradient(180deg, #f3eefc 0%, #f7f2fb 42%, #fbf6f2 100%);
  overflow: hidden;
}
.top {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 12px;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand strong, .top .title {
  font-size: 18px;
  font-weight: 720;
  color: #2a2158;
}
.logo { display: flex; }
.priv { font-size: 14px; color: #6b6588; }
.icon-btns { display: flex; gap: 8px; }
.ibtn {
  width: 36px; height: 36px;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 12px rgba(80,60,150,.08);
  display: grid; place-items: center;
}
.back { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; }
.top .title { flex: 1; text-align: center; margin-right: 28px; }
.scroll { flex: 1; padding: 8px 16px 20px; }
.banner {
  background: rgba(255,255,255,.72);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  color: #6b6588;
  line-height: 1.5;
  margin-bottom: 14px;
  text-align: center;
}
h1 { font-size: 24px; line-height: 1.28; font-weight: 740; margin: 0 0 6px; }
.hello { font-size: 14px; color: #8a84a3; font-weight: 650; margin-bottom: 2px; }
.lead { font-size: 15px; line-height: 1.7; color: #6b6588; margin-bottom: 16px; }
.card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(80,60,150,.08), inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
}
.sec-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0 8px;
}
.sec-hd .l {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 720;
}
.sec-hd .bar {
  width: 3px; height: 12px; border-radius: 2px;
  background: #6358f2;
}
.sec-hd .more { font-size: 14px; color: #8a84a3; }
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  padding: 14px 12px 12px;
  box-shadow: 0 8px 20px rgba(80,60,150,.07), inset 0 1px 0 rgba(255,255,255,.9);
  display: flex; flex-direction: column; gap: 8px;
}
.tile b { font-size: 16px; font-weight: 680; }
.tile span { font-size: 13px; color: #8a84a3; line-height: 1.45; }
.ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
}
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 14px; font-weight: 680;
  color: #6a5cff; margin-bottom: 6px;
}
.field input {
  width: 100%; height: 46px;
  border: 1px solid rgba(106,92,255,.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  font: inherit; font-size: 16px;
  padding: 0 14px; color: #2a2158; outline: none;
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-btn {
  height: 46px; padding: 0 12px;
  border: 0; border-radius: 14px;
  background: #efeaff; color: #5b4fe0;
  font: inherit; font-size: 14px; font-weight: 680; white-space: nowrap;
}
.primary {
  width: 100%; height: 48px; border: 0; border-radius: 24px;
  background: linear-gradient(180deg, #7a74ff 0%, #6358f2 100%);
  color: #fff; font: inherit; font-size: 16px; font-weight: 700;
  margin-top: 6px;
  box-shadow: 0 8px 18px rgba(99,88,242,.28);
}
.links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; color: #5b4fe0; font-weight: 680; }
.hint { text-align: center; font-size: 14px; color: #8a84a3; line-height: 1.6; margin-top: 14px; }
.note { font-size: 14px; line-height: 1.65; color: #6b6588; margin: 2px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #fff; border: 1px solid rgba(106,92,255,.12);
  border-radius: 16px; padding: 7px 12px;
  font-size: 15px; color: #3b3360;
}
.chip.on { background: #6358f2; border-color: #6358f2; color: #fff; }
.members {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 14px;
}
.mpill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92);
  border-radius: 22px;
  padding: 5px 12px 5px 5px;
  box-shadow: 0 6px 16px rgba(80,60,150,.07);
  font-size: 15px; font-weight: 680;
}
.mpill.on { background: #6358f2; color: #fff; }
.av {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 740;
  background: #efeaff; color: #5b4fe0;
  flex-shrink: 0;
}
.av.pink { background: #ffe9f1; color: #c44d7a; }
.mpill.on .av { background: rgba(255,255,255,.22); color: #fff; }
.addp {
  width: 36px; height: 36px; border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 16px rgba(80,60,150,.07);
  display: grid; place-items: center;
  color: #5b4fe0; font-size: 20px; font-weight: 500;
}
.mini3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mini {
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  padding: 12px 10px 10px;
  box-shadow: 0 8px 20px rgba(80,60,150,.07), inset 0 1px 0 #fff;
}
.mini .tag {
  display: inline-block; font-size: 12px; font-weight: 680;
  border-radius: 6px; padding: 1px 5px; margin-bottom: 8px;
}
.tag.ok { background: #e8f8ef; color: #1f9a58; }
.tag.wait { background: #f3f0f8; color: #8a84a3; }
.mini b { display: block; font-size: 15px; font-weight: 700; margin: 6px 0 2px; }
.mini p { font-size: 13px; color: #8a84a3; }
.tabs {
  display: flex; gap: 8px; margin: 4px 0 12px;
}
.tab {
  padding: 7px 14px; border-radius: 16px;
  font-size: 15px; font-weight: 680; color: #6b6588;
  background: transparent;
}
.tab.on { background: #6358f2; color: #fff; }
.list { background: rgba(255,255,255,.94); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 28px rgba(80,60,150,.08), inset 0 1px 0 #fff; }
.li { padding: 12px 14px; border-bottom: 1px solid #f0ecf8; }
.li:last-child { border-bottom: 0; }
.li .r1 { display: flex; justify-content: space-between; font-size: 13px; color: #8a84a3; margin-bottom: 3px; }
.li b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.li p { font-size: 14px; color: #6b6588; line-height: 1.5; }
.uploads { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 4px 0 2px; }
.up {
  background: #fff; border-radius: 16px; padding: 14px 8px 12px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(80,60,150,.06);
  border: 1px solid rgba(106,92,255,.08);
}
.up b { display: block; font-size: 15px; font-weight: 680; margin-top: 6px; }
.composer { padding: 8px 14px 18px; flex-shrink: 0; }
.bar {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95);
  border-radius: 28px;
  padding: 6px 6px 6px 10px;
  box-shadow: 0 10px 28px rgba(80,60,150,.12), inset 0 1px 0 #fff;
}
.fake { flex: 1; font-size: 16px; color: #8a84a3; }
.round {
  width: 36px; height: 36px; border-radius: 18px;
  display: grid; place-items: center; flex-shrink: 0;
  background: #f3eefc; color: #5b4fe0;
  border: 0;
}
.round.send {
  background: #5b4fe0;
  color: #fff;
  box-shadow: 0 6px 14px rgba(91,79,224,.28);
}
.form { padding: 18px 16px 16px; margin-top: 8px; }
.legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
}
.lg {
  min-width: 0;
  background: rgba(255,255,255,.94);
  border-radius: 14px;
  padding: 10px 8px 9px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(80,60,150,.06), inset 0 1px 0 #fff;
}
.lg b { display: block; font-size: 16px; font-weight: 740; margin: 4px 0 0; }
.lg span { font-size: 12px; color: #8a84a3; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; vertical-align: 0;
}
.dot.red { background: #ef5b5b; box-shadow: 0 0 0 4px rgba(239,91,91,.16); }
.dot.yellow { background: #f0b429; box-shadow: 0 0 0 4px rgba(240,180,41,.16); }
.dot.blue { background: #5b8cff; box-shadow: 0 0 0 4px rgba(91,140,255,.16); }
.dot.green { background: #2bb56f; box-shadow: 0 0 0 4px rgba(43,181,111,.16); }
.dot.lg { width: 12px; height: 12px; }
.take {
  font-size: 16px; font-weight: 740; line-height: 1.4; margin-bottom: 8px;
}
.block { padding: 14px; }
.block + .block { border-top: 1px solid #f0ecf8; }
.lab {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 720; margin-bottom: 8px;
}
.lab.red { color: #c24747; }
.lab.yellow { color: #b07a10; }
.lab.blue { color: #2f5db8; }
.lab.green { color: #1f9a58; }
.lab.purple { color: #5b4fe0; }
.p { font-size: 16px; line-height: 1.75; color: #3b3360; }
.metric {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed #eee8f5;
}
.metric:first-of-type { border-top: 0; padding-top: 0; }
.metric .nm { flex: 1 1 46%; min-width: 7.5em; overflow-wrap: anywhere; }
.metric .nm b { display: block; font-size: 16px; font-weight: 700; line-height: 1.45; }
.metric .nm small { display: block; font-size: 13px; color: #8a84a3; margin-top: 2px; line-height: 1.45; }
.metric .val { flex: 1 1 36%; max-width: 52%; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.metric .val b { display: block; font-size: 16px; font-weight: 740; line-height: 1.45; font-weight: 650; }
.metric .val span {
  display: inline-block; margin-top: 4px;
  font-size: 12px; font-weight: 680;
  border-radius: 6px; padding: 1px 6px;
}
.tag-red { background: #ffecec; color: #c24747; }
.tag-yellow { background: #fff6e0; color: #b07a10; }
.tag-blue { background: #eaf0ff; color: #2f5db8; }
.tag-green { background: #e8f8ef; color: #1f9a58; }
.dept {
  display: inline-block;
  margin-top: 8px;
  background: #ffecec; color: #c24747;
  font-size: 12px; font-weight: 680;
  border-radius: 8px; padding: 3px 8px;
}
.actions .act {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0;
  border-top: 1px dashed #eee8f5;
}
.actions .act:first-of-type { border-top: 0; padding-top: 0; }
.num {
  width: 22px; height: 22px; border-radius: 8px;
  background: #efeaff; color: #5b4fe0;
  font-size: 13px; font-weight: 740;
  display: grid; place-items: center;
  flex-shrink: 0; margin-top: 1px;
}
.num.hot { background: #ffecec; color: #c24747; }
.actions .act b { display: block; font-size: 16px; font-weight: 700; }
.actions .act span { display: block; font-size: 14px; color: #8a84a3; margin-top: 2px; }
.greens { display: flex; flex-wrap: wrap; gap: 8px; }
.gchip {
  background: #f3fbf6; color: #1f9a58;
  border-radius: 12px; padding: 6px 10px;
  font-size: 14px; font-weight: 650;
}
.safe {
  margin-top: 10px;
  background: rgba(255,255,255,.8);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px; line-height: 1.65; color: #6b6588;
}
.follow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.follow span {
  background: rgba(255,255,255,.94);
  border-radius: 16px; padding: 7px 12px;
  font-size: 14px; color: #3b3360;
  box-shadow: 0 6px 14px rgba(80,60,150,.07);
}
.mask-layer {
  position: absolute; inset: 0;
  background: rgba(42, 33, 88, .38);
  display: flex; align-items: flex-end; z-index: 5;
}
.sheet {
  width: 100%; background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 12px 16px 24px;
}
.handle { width: 36px; height: 4px; border-radius: 2px; background: #e6e1f4; margin: 0 auto 14px; }
.sheet h2 { font-size: 18px; font-weight: 740; margin-bottom: 8px; }
.sheet p { font-size: 15px; line-height: 1.7; color: #6b6588; margin-bottom: 16px; }
.ghost {
  width: 100%; height: 48px;
  border: 1px solid rgba(106,92,255,.18);
  border-radius: 24px; background: #fff; color: #5b4fe0;
  font: inherit; font-size: 16px; font-weight: 700; margin-top: 8px;
}
.demo {
  display: inline-block; font-size: 10px; font-weight: 680;
  color: #5b4fe0; background: #efeaff; border-radius: 4px;
  padding: 1px 5px; margin-left: 6px; vertical-align: 2px;
}
.privacy {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #5b4fe0; background: #efeaff;
  border-radius: 8px; padding: 2px 7px; font-weight: 680;
  margin-left: 6px; vertical-align: 1px;
}
.compare {
  margin-top: 10px;
  background: #f6f3fb;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 14px; line-height: 1.6; color: #5b4fe0;
}

/* SPA / H5 runtime additions — keep mockup look, enable real interaction */
html, body { height: 100%; }
.phone {
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: 390px;
  min-height: 0;
}
.scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
button { font: inherit; color: inherit; }
.tile, .chip, .mpill, .addp, .up, .li, .tab, .back, .ibtn, .more, .links span, .follow span, .priv, .code-btn, .primary, .ghost, .round {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back, .priv, .more, .links span, .follow span, .chip, .mpill, .addp, .up, .tile, .tab, .li, .ibtn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: inherit;
}
.chip, .mpill, .addp, .up, .tile, .tab, .ibtn, .code-btn {
  /* restore visual padding after button reset — applied in more specific rules below */
}
button.tile { display: flex; flex-direction: column; gap: 8px; text-align: left; background: rgba(255,255,255,.94); border-radius: 16px; padding: 14px 12px 12px; box-shadow: 0 8px 20px rgba(80,60,150,.07), inset 0 1px 0 rgba(255,255,255,.9); }
button.chip { background: #fff; border: 1px solid rgba(106,92,255,.12); border-radius: 16px; padding: 7px 12px; font-size: 15px; color: #3b3360; }
button.chip.on { background: #6358f2; border-color: #6358f2; color: #fff; }
button.mpill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border-radius: 22px; padding: 5px 12px 5px 5px; box-shadow: 0 6px 16px rgba(80,60,150,.07); font-size: 15px; font-weight: 680; }
button.mpill.on { background: #6358f2; color: #fff; }
button.addp { width: 36px; height: 36px; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 6px 16px rgba(80,60,150,.07); display: grid; place-items: center; color: #5b4fe0; font-size: 20px; font-weight: 500; }
button.up { background: #fff; border-radius: 16px; padding: 14px 8px 12px; text-align: center; box-shadow: 0 6px 16px rgba(80,60,150,.06); border: 1px solid rgba(106,92,255,.08); }
button.tab { padding: 7px 14px; border-radius: 16px; font-size: 15px; font-weight: 680; color: #6b6588; background: transparent; }
button.tab.on { background: #6358f2; color: #fff; }
button.li { display: block; width: 100%; padding: 12px 14px; border-bottom: 1px solid #f0ecf8; background: transparent; }
button.li:last-child { border-bottom: 0; }
.field input::placeholder, .field textarea::placeholder, .bar input::placeholder { color: #8a84a3; -webkit-text-fill-color: #8a84a3; }
.field input:disabled { background: #f6f3fb; color: #8a84a3; }
.form-error { color: #c24747; font-size: 14px; line-height: 1.6; margin: 4px 0 8px; text-align: center; }
.empty { text-align: center; color: #8a84a3; padding: 28px 16px; font-size: 14px; line-height: 1.7; }
.danger {
  width: 100%; height: 48px; border: 1px solid #ffd0d0; border-radius: 24px;
  background: #fff; color: #c24747; font: inherit; font-size: 16px; font-weight: 700;
  margin-top: 10px;
}
.primary:disabled, .code-btn:disabled, .ghost:disabled, .danger:disabled { opacity: .55; cursor: not-allowed; }
.bar input, .bar textarea {
  flex: 1; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 16px; color: #2a2158; resize: none;
  min-width: 0; line-height: 1.4; max-height: 72px;
}
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  background: #2a2158; color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 14px; z-index: 30; max-width: min(320px, 84%);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.busy-layer {
  position: absolute; inset: 0; z-index: 8;
  background: rgba(42, 33, 88, .28);
  display: flex; align-items: center; justify-content: center;
}
.busy-box {
  background: #fff; border-radius: 16px; padding: 16px 20px;
  font-size: 14px; font-weight: 680; color: #2a2158;
  box-shadow: 0 12px 28px rgba(80,60,150,.18);
}
.hidden { display: none !important; }
.qa { margin-top: 12px; }
.qa-item { background: rgba(255,255,255,.94); border-radius: 16px; padding: 12px 14px; margin-top: 8px; box-shadow: 0 8px 18px rgba(80,60,150,.06); }
.qa-item .q { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.qa-item .a { font-size: 16px; line-height: 1.7; color: #3b3360; white-space: pre-wrap; }
.members { flex-wrap: wrap; }

/* flow v2: guest chat, login sheet, logged-in home, who sheet */
.login-link,
button.login-link {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 4px 12px rgba(80,60,150,.08);
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #5b4fe0;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chat { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.bubble {
  max-width: 88%;
  background: rgba(255,255,255,.94);
  border-radius: 4px 18px 18px 18px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.7;
  color: #2a2158;
  box-shadow: 0 8px 20px rgba(80,60,150,.07), inset 0 1px 0 #fff;
}
.bubble > b { display: block; font-size: 16px; font-weight: 740; margin-bottom: 6px; }
.bubble .tips { margin-top: 10px; color: #6b6588; font-size: 14px; line-height: 1.65; }
.who-row,
button.who-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid #f0ecf8;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 680;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.who-row:last-child,
button.who-row:last-child { border-bottom: 0; }
.who-row .sub { margin-left: auto; font-size: 14px; color: #8a84a3; font-weight: 500; }
.recent { margin-top: 8px; }
.recent .li,
button.recent-li {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 12px 14px;
}
.chev { color: #8a84a3; font-weight: 500; }
#composer-input,
.bar input.ask {
  flex: 1;
  height: 36px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: #2a2158;
  outline: none;
  min-width: 0;
}
.form.onboard .field label { color: #6b6588; }
.form.onboard .field input {
  border: 0;
  background: #f6f3fb;
  box-shadow: none;
}

.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.bubble.me {
  margin-left: auto;
  background: #5b4fe0;
  color: #fff;
  border-radius: 18px 4px 18px 18px;
  box-shadow: 0 8px 20px rgba(91,79,224,.18);
}
.bubble.me .tips { color: rgba(255,255,255,.85); }
.bubble .bubble-img {
  display: block;
  max-width: min(220px, 70vw);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 12px;
  margin: 0 0 8px;
  background: #efeaff;
}
.bubble.me .bubble-img { margin-bottom: 8px; }
.bubble.img-only { padding: 6px; background: transparent; box-shadow: none; }
.bubble.img-only .bubble-img { margin: 0; }
.file-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 14px; font-weight: 650;
}
.bubble:not(.me) .file-chip { background: #f4f0ff; color: #5b4fe0; }
.result-in-chat { margin-top: 8px; }
.chat-scroll { padding-bottom: 12px; }

.comp-tools {
  display: flex; gap: 8px;
  margin: 8px 2px 0;
}
.comp-tools button {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 17px;
  background: rgba(255,255,255,.9);
  color: #3b3360;
  font: inherit;
  font-size: 14px;
  font-weight: 680;
  box-shadow: 0 4px 12px rgba(80,60,150,.06);
}
.comp-tools button:active { transform: scale(.98); }
.bubble.result-bubble {
  max-width: 100%;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.result-in-chat .card { margin-bottom: 8px; }
.result-in-chat .sec-hd { margin-top: 12px; }
.result-in-chat .p, .result-in-chat .take, .result-in-chat .compare {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.compare {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-log .bubble { overflow-wrap: anywhere; word-break: break-word; }
.new-chat-btn {
  border: 0;
  background: rgba(255,255,255,.86);
  color: #5b4fe0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(80,60,150,.08);
  white-space: nowrap;
}

.bubble.img-only { max-width: 78%; }
.photor {
  position: relative;
  width: 148px;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 38%, #f3c9c0 0 14%, transparent 15%),
    radial-gradient(circle at 58% 46%, #e8a99a 0 8%, transparent 9%),
    radial-gradient(circle at 46% 58%, #efb7ad 0 7%, transparent 8%),
    linear-gradient(180deg, #f7d7c8 0%, #e8b7a8 100%);
  display: block;
}
.photor img,
.bubble .photor img,
.bubble.img-only .photor img {
  display: block;
  width: 148px;
  height: 148px;
  max-width: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  background: transparent;
}
.photor span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(42,33,88,.45);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  padding: 5px 0;
}
.ask-card {
  background: rgba(255,255,255,.96);
  border-radius: 18px;
  padding: 12px 14px 14px;
  box-shadow: 0 8px 20px rgba(80,60,150,.07), inset 0 1px 0 #fff;
  max-width: 100%;
}
.ask-card .step {
  font-size: 13px;
  font-weight: 680;
  color: #8a84a3;
  margin-bottom: 6px;
}
.ask-card .q {
  font-size: 16px;
  font-weight: 740;
  line-height: 1.45;
  margin-bottom: 10px;
  color: #2a2158;
}
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
button.opt,
.opt {
  background: #f4f0ff;
  color: #3b3360;
  border: 0;
  border-radius: 16px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.opt.on,
.opt.on {
  background: #6358f2;
  color: #fff;
}
button.opt.alt,
.opt.alt {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(99,88,242,.22);
  color: #5b4fe0;
}
.custom {
  margin-top: 10px;
  background: #f7f4ff;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.custom .box,
.custom input.box {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #2a2158;
  font: inherit;
  font-size: 15px;
  padding: 0 10px;
  outline: none;
  min-width: 0;
}
.custom .box::placeholder { color: #8a84a3; }
button.go,
.custom .go {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #7a74ff 0%, #6358f2 100%);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
button.skip,
.skip {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-size: 14px;
  font-weight: 680;
  color: #5b4fe0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.concl {
  background: rgba(255,255,255,.96);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(80,60,150,.08), inset 0 1px 0 #fff;
}
.concl h3 {
  font-size: 18px;
  font-weight: 740;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #2a2158;
}
.block-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 720;
  color: #5b4fe0;
  margin: 12px 0 6px;
}
.block-h .bar { width: 3px; height: 12px; border-radius: 2px; background: #6358f2; display: inline-block; }
.block-h.warn { color: #c24747; }
.block-h.warn .bar { background: #ef5b5b; }
.block-h.ok { color: #1f9a58; }
.block-h.ok .bar { background: #2bb56f; }
.concl p { font-size: 16px; line-height: 1.7; color: #3b3360; }
.concl ul { padding-left: 0; list-style: none; }
.concl li {
  position: relative;
  padding: 4px 0 4px 14px;
  font-size: 16px;
  line-height: 1.65;
  color: #3b3360;
}
.concl li::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: #6358f2;
  position: absolute; left: 2px; top: 11px;
}
.concl li.warn::before { background: #ef5b5b; }
.block-h.soft { color: #6b6588; }
.block-h.soft .bar { background: #b8b3d6; }
.concl .ev-item { margin: 0 0 6px; }
.concl .ev-k {
  display: block;
  font-size: 14px;
  font-weight: 680;
  color: #8a84a3;
  margin-bottom: 2px;
}
.concl-note {
  font-size: 14px !important;
  color: #6b6588 !important;
  margin-top: 10px;
  line-height: 1.6;
}


.stream-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b6588;
  font-size: 14px;
  padding: 2px 4px 4px;
}
.stream-dots {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7b74f0;
  animation: stream-pulse 1s ease-in-out infinite;
}
@keyframes stream-pulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}
.stream-cursor::after {
  content: "▍";
  display: inline;
  margin-left: 1px;
  color: #7b74f0;
  animation: stream-blink 1s step-end infinite;
}
@keyframes stream-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
.reveal-block {
  animation: reveal-in .35s ease;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.composer.is-busy .bar,
.composer.is-busy .comp-tools {
  opacity: .55;
  pointer-events: none;
}


/* conversation drawer (phase2) */
button.ibtn, .ibtn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 12px rgba(80,60,150,.08);
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
}
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(42, 33, 88, .36);
  z-index: 16;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.drawer-mask.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 312px;
  max-width: 86%;
  background: linear-gradient(180deg, #f7f3fd 0%, #fff 28%);
  box-shadow: 12px 0 32px rgba(42,33,88,.16);
  z-index: 17;
  display: flex;
  flex-direction: column;
  padding: 16px 0 12px;
  transform: translateX(-105%);
  transition: transform .22s ease;
}
.drawer.open { transform: translateX(0); }
.drawer h2 {
  font-size: 18px;
  font-weight: 740;
  padding: 4px 18px 12px;
}
.drawer-pills {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.drawer-pills::-webkit-scrollbar { display: none; }
.drawer-pill,
button.drawer-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 20px;
  padding: 5px 12px 5px 5px;
  font: inherit;
  font-size: 15px;
  font-weight: 680;
  color: #2a2158;
  box-shadow: 0 4px 12px rgba(80,60,150,.07);
  border: 1px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.drawer-pill.on {
  border-color: #5b4fe0;
  color: #5b4fe0;
  background: #efeaff;
}
.drawer .av {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 740;
  color: #fff;
  background: #8B82FF;
}
.drawer .av.b { background: #c44d7a; color: #fff; }
.drawer .av.c { background: #5b7fd6; color: #fff; }
.drawer-list {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.drawer-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 12px 10px 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 6px 14px rgba(80,60,150,.05);
}
.drawer-item.on { outline: 1.5px solid #5b4fe0; background: #f4f1ff; }
.drawer-main,
button.drawer-main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.drawer-item .t {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.drawer-item b { font-size: 16px; font-weight: 720; }
.drawer-item .time { font-size: 13px; color: #8a84a3; white-space: nowrap; }
.drawer-item p {
  font-size: 14px;
  color: #6b6588;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.drawer-del,
button.drawer-del {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #c24747;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.drawer-newchat,
button.drawer-newchat {
  margin: 8px 16px 4px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: #5b4fe0;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.drawer-empty {
  text-align: center;
  color: #8a84a3;
  font-size: 14px;
  line-height: 1.7;
  padding: 36px 16px;
}
.drawer-login,
button.drawer-login {
  margin-top: 14px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 20px;
  background: #5b4fe0;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.drawer-confirm-mask {
  position: absolute;
  inset: 0;
  background: rgba(42, 33, 88, .28);
  z-index: 18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.del-sheet {
  position: relative;
  left: auto;
  right: auto;
  width: calc(100% - 32px);
  max-width: 358px;
  margin: 0 16px 24px;
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px 16px;
  z-index: 19;
  box-shadow: 0 16px 40px rgba(42,33,88,.2);
}
.del-sheet h3 { font-size: 18px; font-weight: 740; margin-bottom: 8px; }
.del-sheet p { font-size: 15px; line-height: 1.7; color: #6b6588; margin-bottom: 16px; }
.del-sheet .row { display: flex; gap: 10px; }
.del-sheet button,
button.del-sheet {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  margin-top: 0;
  width: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.del-sheet .ghost,
.del-sheet button.ghost {
  background: #f3eefc;
  color: #2a2158;
  border: 0;
}
.del-sheet .danger,
.del-sheet button.danger {
  background: #c24747;
  color: #fff;
  border: 0;
}
