 
.lfw {
  --green: #00c853;
  --green-ink: #0a8f3c;
  --brand: #1f4d2b;
  --ink: #1d1d1f;
  --ink-2: #48484d;
  --muted: #8a8a8f;
  --line: rgba(0, 0, 0, .07);
  --soft: #f5f6f4;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  container-type: inline-size;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Manrope, Inter, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.lfw *, .lfw *::before, .lfw *::after { box-sizing: border-box; }

 
.lfw-win {
  position: relative;
  height: 560px;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .05),
    0 2px 4px rgba(0, 0, 0, .03),
    0 24px 60px -18px rgba(20, 50, 30, .28),
    0 60px 120px -40px rgba(20, 50, 30, .22);
  overflow: hidden;
  z-index: 2;
}
.lfw-bar {
  flex: none; height: 48px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fbfbfa, #f6f7f5);
}
.lfw-dots { display: flex; gap: 7px; flex: none; }
.lfw-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lfw-dots i:nth-child(2) { background: #febc2e; }
.lfw-dots i:nth-child(3) { background: #28c840; }
.lfw-title {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.lfw-title img { width: 18px; height: 18px; object-fit: contain; border-radius: 5px; }
.lfw-title span { transition: opacity .35s; }
.lfw-title.is-swap span, .lfw-title.is-swap img { opacity: 0; }
.lfw-title img { transition: opacity .35s; }
.lfw-conn { flex: none; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lfw-conn img { width: 18px; height: 18px; border-radius: 5px; object-fit: contain; margin-left: -4px; box-shadow: 0 0 0 2px #f7f8f6; background: #fff; }
.lfw-conn img:first-of-type { margin-left: 0; }
.lfw-conn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0, 200, 83, .18); margin-right: 4px; }

 
.lfw-feed {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 20px 6px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent 0, #000 56px);
          mask-image: linear-gradient(transparent 0, #000 56px);
  transition: opacity .45s;
}
.lfw-feed.is-out { opacity: 0; }
.lfw-msg { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.2, .8, .2, 1); }
.lfw-msg > div { min-height: 0; overflow: hidden; }
.lfw-msg.is-in { grid-template-rows: 1fr; }
.lfw-msg__in { padding-top: 12px; opacity: 0; translate: 0 10px; filter: blur(3px); transition: opacity .5s .08s, translate .55s .08s cubic-bezier(.2, .8, .2, 1), filter .5s .08s; }
.lfw-msg.is-in .lfw-msg__in { opacity: 1; translate: 0 0; filter: blur(0); }

 
.lfw-user { display: flex; justify-content: flex-end; }
.lfw-user p {
  margin: 0; max-width: 82%;
  padding: 10px 15px;
  border-radius: 20px 20px 6px 20px;
  background: var(--brand); color: #fff;
  font-size: 15px; line-height: 1.35;
}

 
.lfw-tool {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 13.5px; line-height: 1.3; color: var(--ink-2);
}
.lfw-tool img { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; flex: none; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.lfw-tool b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lfw-tool .t { flex: 1; min-width: 0; }
.lfw-tool .t em { font-style: normal; color: var(--muted); }
.lfw-st { width: 18px; height: 18px; flex: none; position: relative; }
.lfw-st::before {
  content: ""; position: absolute; inset: 1px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .1); border-top-color: var(--green-ink);
  animation: lfw-spin .8s linear infinite;
}
.lfw-tool.is-done .lfw-st::before { animation: none; border: 0; background: var(--green); }
.lfw-tool.is-done .lfw-st::after {
  content: ""; position: absolute; left: 6px; top: 4px; width: 5px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg;
}
@keyframes lfw-spin { to { rotate: 360deg; } }

 
.lfw-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px -14px rgba(0, 0, 0, .18);
  padding: 15px 16px 14px;
}
.lfw-eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.lfw-big { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; }
.lfw-big b { white-space: nowrap; font-size: 32px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; color: #d93025; font-variant-numeric: tabular-nums; }
.lfw-big b.is-good { color: var(--green-ink); }
.lfw-big span { font-size: 13.5px; color: var(--ink-2); line-height: 1.3; }
.lfw-row {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.lfw-row img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; }
.lfw-row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lfw-bar-mini { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: #f0f1ef; overflow: hidden; margin-top: -3px; }
.lfw-bar-mini i { display: block; height: 100%; width: 0; border-radius: 2px; background: #ff6b5e; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.lfw-bar-mini.is-good i { background: var(--green); }

 
.lfw-plan ul { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 7px; }
.lfw-plan li { display: flex; gap: 9px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.lfw-plan li::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 1.5px; border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18);
}
.lfw-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lfw-btn {
  border: 0; font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 12px; cursor: default;
  background: #eef0ed; color: var(--ink);
  transition: transform .15s, background .3s, box-shadow .3s;
}
.lfw-btn--go { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 77, 43, .6); }
.lfw-btn.is-press { transform: scale(.95); }
.lfw-btn.is-done { background: var(--green); }
.lfw-note { font-size: 12px; color: var(--muted); margin-left: 4px; }
.lfw-plan.is-ok li::before { background: var(--green); box-shadow: none; }

 
.lfw-agent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.lfw-agent img { width: 24px; height: 24px; border-radius: 7px; flex: none; object-fit: contain; margin-top: 1px; }
.lfw-agent p { margin: 0; }

 
.lfw-empty {
  position: absolute; left: 0; right: 0; top: 48px; bottom: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; text-align: center;
  opacity: 0; translate: 0 8px;
  transition: opacity .45s, translate .55s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.lfw-empty.is-show { opacity: 1; translate: 0 0; }
.lfw-empty__ic {
  width: 58px; height: 58px; border-radius: 17px; margin-bottom: 8px;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line), 0 12px 28px -12px rgba(0, 0, 0, .28);
}
.lfw-empty__ic img { width: 58%; height: 58%; object-fit: contain; }
.lfw-empty h4 { margin: 0; font-family: inherit; font-size: 22px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.lfw-empty p { margin: 0; font-size: 13.5px; color: var(--muted); }
.lfw-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; max-width: 460px; }
.lfw-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px 8px 9px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .09);
  font-size: 13.5px; color: var(--ink-2);
  transition: box-shadow .3s, background .3s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.lfw-chip img { width: 18px; height: 18px; border-radius: 5px; object-fit: contain; background: #fff; }
.lfw-chip img + img { margin-left: -12px; box-shadow: 0 0 0 2px #fff; }
.lfw-chip.is-pick { background: #f2fbf4; color: var(--ink); transform: scale(1.04); box-shadow: 0 0 0 1.5px var(--green), 0 8px 18px -8px rgba(0, 160, 60, .5); }

 
.lfw-input {
  flex: none; margin: 8px 14px 14px;
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 6px 6px 6px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .09), 0 4px 14px -8px rgba(0, 0, 0, .18);
  font-size: 15px;
}
.lfw-type { flex: 1; min-width: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.lfw-type:empty::before { content: attr(data-ph); color: #a1a1a6; }
.lfw-type.is-typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: var(--green-ink); animation: lfw-caret 1s steps(1) infinite; }
@keyframes lfw-caret { 50% { opacity: 0; } }
.lfw-send {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: #e8eae7; transition: background .25s, transform .15s;
}
.lfw-send svg { width: 16px; height: 16px; }
.lfw-send.is-ready { background: var(--brand); }
.lfw-send.is-press { transform: scale(.9); }

 
.lfw-works {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 22px;
  font-size: 13px; color: var(--muted);
}
.lfw-works span { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.lfw-works img { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; }

 
@container (max-width: 520px) {
  .lfw-win { height: 500px; border-radius: 20px; }
  .lfw-feed { padding: 0 14px 4px; }
  .lfw-user p { font-size: 14px; }
  .lfw-tool, .lfw-row, .lfw-big span { font-size: 12.5px; }
  .lfw-big b { font-size: 27px; }
  .lfw-plan li { font-size: 13px; }
  .lfw-agent { font-size: 13.5px; }
  .lfw-conn span { display: none; }
  .lfw-input { margin: 6px 10px 10px; font-size: 14px; }
  .lfw-note { display: none; }
  .lfw-empty { top: 48px; bottom: 66px; padding: 0 14px; }
  .lfw-empty h4 { font-size: 19px; }
  .lfw-chip { font-size: 12.5px; padding: 7px 11px 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .lfw *, .lfw *::before, .lfw *::after { animation: none !important; transition: none !important; }
}
