/* 力哥易对话页视觉升级。仅作用于 HomeMain 容器，不改变登录或管理页面。 */
body .container-main.legaleasy-unified {
  --le-ink: #1e293b;
  --le-copy: #475569;
  --le-muted: #64748b;
  --le-line: #e2e8f0;
  --le-blue: #3b82f6;
  background: #fff !important;
  color: var(--le-ink);
}
body .container-main.legaleasy-unified .n-layout,
body .container-main.legaleasy-unified .n-layout-content,
body .container-main.legaleasy-unified .n-layout-content > .n-layout-scroll-container {
  background: #fff !important;
}
body .container-main.legaleasy-unified .n-layout-sider { border-right: 1px solid #edf1f5; }
body .container-main.legaleasy-unified .sider-main { background: #fff; }
body .container-main.legaleasy-unified .sider-main .sider-top .x-dna { width: 154px; height: auto; min-height: 64px; margin: 25px 0 0 28px; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list { margin-top: 25px; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .people-grid { gap: 8px; padding: 16px; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card {
  --le-card-tint: #f7faff;
  --le-card-accent: #3b82f6;
  min-height: 82px;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: var(--le-card-tint);
  box-shadow: none;
  white-space: normal;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card:nth-child(2) { --le-card-tint: #f7fbf9; --le-card-accent: #4b8b78; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card:nth-child(3) { --le-card-tint: #fffbf6; --le-card-accent: #b88748; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card:nth-child(4) { --le-card-tint: #fbf9ff; --le-card-accent: #8a75b4; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--le-card-accent) 30%, white);
  background: #fff;
  box-shadow: 0 9px 21px rgba(1,30,76,.07);
}
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card.active {
  border-color: color-mix(in srgb, var(--le-card-accent) 32%, white);
  background: var(--le-card-tint);
  box-shadow: 0 5px 15px rgba(1,30,76,.045);
}
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .avatar { width: 52px; height: 52px; padding: 3px; border-radius: 14px; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-name { margin: 2px 0 4px; color: var(--le-ink); font-size: 14px; font-weight: 650; }
body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-description {
  display: -webkit-box;
  overflow: hidden;
  color: #8290a3;
  font-size: 10.5px;
  line-height: 1.45;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body .container-main.legaleasy-unified .sider-main > div:last-child { padding-bottom: 22px !important; }
body .container-main.legaleasy-unified .sider-main .qr-item .qr-code,
body .container-main.legaleasy-unified .opening .qr-item .qr-code {
  border: 2px solid var(--le-line);
  border-radius: 16px;
  background: #f8fafc;
  cursor: zoom-in;
  transition: border-color .18s ease, box-shadow .18s ease;
}
body .container-main.legaleasy-unified .sider-main .qr-item .qr-code { width: 140px; height: 140px; margin-bottom: 9px; }
body .container-main.legaleasy-unified .opening .qr-item .qr-code { width: 192px; height: 192px; }
body .container-main.legaleasy-unified .qr-item .qr-code:hover,
body .container-main.legaleasy-unified .qr-item .qr-code:focus-within { border-color: #aacbed; box-shadow: 0 6px 18px rgba(47,103,165,.1); }
body .container-main.legaleasy-unified .qr-code img:focus-visible { outline: 3px solid #8bb9f1; outline-offset: 5px; }
body .container-main.legaleasy-unified .sider-main .qr-label { color: var(--le-ink); font-size: 12px; font-weight: 600; }
body .container-main.legaleasy-unified .sider-main .qr-item > span:last-child { color: var(--le-muted); font-size: 11px; }
body .container-main.legaleasy-unified .sider-main .agent .title { margin-top: 10px; color: var(--le-muted); font-size: 11px; }

/* 原有购买和兑换图片仍负责点击；只给入口提供不同的容器反馈。 */
body .container-main.legaleasy-unified .flex-end.p-b-20 { align-items: center; gap: 12px; padding-bottom: 0; }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20 { display: flex; align-items: center; min-height: 48px; margin-right: 0; padding: 5px 10px; border-radius: 16px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20:first-child { border: 1px solid #dbeafe; background: #f8fbff; }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20:first-child:hover { border-color: #9fc5f3; box-shadow: 0 7px 18px rgba(59,130,246,.08); }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20:nth-child(2) { border: 1px solid #ece8f7; background: #faf9ff; }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20:nth-child(2):hover { border-color: #cfc7eb; background: #f5f2ff; }
body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20 img { display: block; max-width: 96px; }

body .container-main.legaleasy-unified .conver-main { position: relative; width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 clamp(22px,4vw,56px); }
body .container-main.legaleasy-unified .conver-main::before { content: none; }
body .container-main.legaleasy-unified .n-layout-content { position: relative; isolation: isolate; }
body .container-main.legaleasy-unified .n-layout-content::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -15%;
  pointer-events: none;
  background: radial-gradient(ellipse at 73% 17%,rgba(147,197,253,.2),transparent 42%), radial-gradient(ellipse at 91% 31%,rgba(196,181,253,.2),transparent 39%), radial-gradient(ellipse at 39% 91%,rgba(165,227,239,.12),transparent 42%);
  filter: blur(46px);
  transform-origin: 65% 35%;
  animation: legaleasy-ambient-flow 32s ease-in-out infinite alternate;
}
body .container-main.legaleasy-unified .n-layout-content > .legaleasy-workspace-shell { position: relative; z-index: 1; background: transparent !important; }
@keyframes legaleasy-ambient-flow {
  0% { transform: translate3d(-2%,-1.5%,0) scale(1); opacity: .72; }
  50% { transform: translate3d(1%,2%,0) scale(1.035) rotate(1deg); opacity: .9; }
  100% { transform: translate3d(3%,-1%,0) scale(1.06) rotate(-1deg); opacity: .78; }
}
body .container-main.legaleasy-unified .conver-main > * { position: relative; z-index: 1; }
body .container-main.legaleasy-unified .conver-main .conversation-main { padding: 0; }
body .container-main.legaleasy-unified .conver-main .conversation-main > .flex-between:first-child { min-height: 78px; align-items: center; }
body .container-main.legaleasy-unified .conver-main .conversation-main .avator { width: 58px; height: 58px; border-radius: 16px; }
body .container-main.legaleasy-unified .conver-main .conversation-main .title { color: var(--le-ink); font-size: clamp(24px,2vw,30px); font-weight: 700; line-height: 1.3; }
body .container-main.legaleasy-unified .legaleasy-feature-intro { max-width: 900px; margin: 6px auto 13px; color: var(--le-muted); }
body .container-main.legaleasy-unified .legaleasy-feature-intro strong { display: block; color: var(--le-blue); font-size: 12px; font-weight: 600; }
body .container-main.legaleasy-unified .legaleasy-feature-intro p { margin: 8px 0 0; font-size: 14px; line-height: 1.78; }
body .container-main.legaleasy-unified .conver-main .conver-center { margin-top: 0; }
body .container-main.legaleasy-unified .opening { padding: 0 clamp(0px,6vw,100px); }
body .container-main.legaleasy-unified .opening .oping { color: var(--le-ink); font-size: 18px; font-weight: 650; }
body .container-main.legaleasy-unified .opening .conver-item { color: var(--le-muted); font-size: 14px; line-height: 1.75; }
body .container-main.legaleasy-unified .opening > div[style*="padding-top:50px"] { padding-top: 28px !important; }
body .container-main.legaleasy-unified .opening .qr-item .qr-label { margin-top: 2px; color: var(--le-muted); font-size: 12px; line-height: 1.5; }
body .container-main.legaleasy-unified .conver-main .conver-center .disclaimer { margin-bottom: 16px; padding: 0 clamp(0px,6vw,100px); color: var(--le-muted); font-size: 12px; line-height: 1.65; }
body .container-main.legaleasy-unified .conver-center > div[style*="padding"] { padding: 0 clamp(0px,6vw,100px) !important; }
body .container-main.legaleasy-unified .input-container { border: 1px solid #edf1f5; border-radius: 30px; box-shadow: 0 18px 35px 5px rgba(1,30,76,.05); }
body .container-main.legaleasy-unified .input-container .input-field { color: var(--le-ink); font-size: 14px; line-height: 1.65; }
body .container-main.legaleasy-unified .input-container .input-field::placeholder { color: #9caec5; }
body .container-main.legaleasy-unified .input-container .input-actions { display: flex; align-items: center; gap: 9px; }
body .container-main.legaleasy-unified .input-container .input-actions .n-button { border-radius: 13px; }
body .container-main.legaleasy-unified .files .file-item { border-radius: 12px; background: #f7faff; }
body .container-main.legaleasy-unified .messages-container { padding: 0 clamp(0px,7vw,110px); }
body .container-main.legaleasy-unified .message-text.user { border-radius: 16px 16px 5px 16px; background: #e7f0ff; }

/* 桌面端只由消息区域处理滚动；输入区独立占位，并保留 24px 留白。 */
@media (min-width: 801px) {
  html:has(.container-main.legaleasy-unified),
  body:has(.container-main.legaleasy-unified) { height: 100%; overflow: hidden; }
  body .container-main.legaleasy-unified { height: 100dvh; overflow: hidden; }
  body .container-main.legaleasy-unified > .n-layout,
  body .container-main.legaleasy-unified > .n-layout > .n-layout-scroll-container,
  body .container-main.legaleasy-unified .n-layout-content,
  body .container-main.legaleasy-unified .n-layout-sider-scroll-container { height: 100%; min-height: 0; overflow: hidden !important; }
  body .container-main.legaleasy-unified .legaleasy-workspace-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden !important; }
  body .container-main.legaleasy-unified .legaleasy-topbar-shell { flex: 0 0 auto; }
  body .container-main.legaleasy-unified .legaleasy-conversation-viewport { display: flex; flex: 1 1 0%; flex-direction: column; min-height: 0; height: auto !important; padding-bottom: 22px; overflow: hidden; }
  body .container-main.legaleasy-unified .legaleasy-conversation-viewport > .n-spin-container,
  body .container-main.legaleasy-unified .legaleasy-conversation-viewport > .n-spin-container > .n-spin-content { display: flex; flex: 1 1 0%; flex-direction: column; width: 100%; min-height: 0; }
  body .container-main.legaleasy-unified .conver-main { flex: 1 1 0%; min-height: 0; }
  body .container-main.legaleasy-unified .conver-main .conversation-main { display: flex; flex: 1 1 0%; flex-direction: column; min-height: 0; }
  body .container-main.legaleasy-unified .conversation-main > .flex-between:first-child,
  body .container-main.legaleasy-unified .legaleasy-feature-intro { flex: 0 0 auto; }
  body .container-main.legaleasy-unified .conver-main .conver-center { display: flex; flex: 1 1 0%; flex-direction: column; min-height: 0; }
  body .container-main.legaleasy-unified .conver-main .conver-center .conver-content { flex: 1 1 0%; min-height: 0; height: auto !important; margin-bottom: 24px; overflow: hidden; }
  body .container-main.legaleasy-unified .conver-content:has(.opening) { overflow-y: auto !important; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #cfdae7 transparent; }
  body .container-main.legaleasy-unified .conver-main .messages-container { height: 100% !important; min-height: 0; padding-bottom: 12px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #cfdae7 transparent; }
  body .container-main.legaleasy-unified .messages-container::-webkit-scrollbar { display: block; width: 6px; }
  body .container-main.legaleasy-unified .messages-container::-webkit-scrollbar-thumb { border-radius: 6px; background: #cfdae7; }
  body .container-main.legaleasy-unified .messages-container::-webkit-scrollbar-track { background: transparent; }
  body .container-main.legaleasy-unified .conver-center > .disclaimer,
  body .container-main.legaleasy-unified .legaleasy-composer-shell { flex: 0 0 auto; }
  body .container-main.legaleasy-unified .input-field { resize: none; scrollbar-width: none; }
}
@media (min-width: 801px) and (max-height: 760px) {
  body .container-main.legaleasy-unified .sider-main .sider-top .x-dna { min-height: 48px; margin-top: 14px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list { margin-top: 8px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .people-grid { gap: 6px; padding: 10px 16px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card { min-height: 60px; padding: 7px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .avatar { width: 42px; height: 42px; }
  body .container-main.legaleasy-unified .sider-main .qr-item .qr-code { width: 112px; height: 112px; padding: 8px; }
  body .container-main.legaleasy-unified .sider-main > div:last-child { padding-bottom: 12px !important; }
  body .container-main.legaleasy-unified .conver-main .conversation-main > .flex-between:first-child { min-height: 62px; }
  body .container-main.legaleasy-unified .conver-main .conversation-main .avator { width: 46px; height: 46px; }
  body .container-main.legaleasy-unified .legaleasy-feature-intro p { font-size: 12px; line-height: 1.6; }
  body .container-main.legaleasy-unified .legaleasy-conversation-viewport { padding-bottom: 16px; }
}

body .container-main.legaleasy-unified .legaleasy-mobile-contact { display: none; }
#legaleasy-qr-dialog { width: min(440px,calc(100vw - 32px)); max-height: min(86dvh,620px); padding: 28px 25px 24px; border: 1px solid #e4eaf2; border-radius: 29px; background: #fff; color: #1e293b; box-shadow: 0 28px 80px rgba(28,53,83,.28); text-align: center; }
#legaleasy-qr-dialog::backdrop { background: rgba(18,35,59,.34); backdrop-filter: blur(5px); }
#legaleasy-qr-dialog h2 { margin: 0 0 7px; font-size: 20px; }
#legaleasy-qr-dialog p { margin: 0 0 18px; color: #64748b; font-size: 12px; }
#legaleasy-qr-dialog img { display: block; width: min(300px,100%); aspect-ratio: 1; margin: 0 auto; padding: 11px; border: 2px solid #e2e8f0; border-radius: 16px; background: #f8fafc; object-fit: contain; }
#legaleasy-qr-dialog a { display: inline-block; margin-top: 15px; color: #3977c5; font-size: 12px; text-decoration: none; }
#legaleasy-qr-dialog .legaleasy-qr-close { position: absolute; top: 12px; right: 14px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f4f7fb; color: #718096; font-size: 19px; cursor: pointer; }

@media (max-width: 800px) {
  body .container-main.legaleasy-unified { min-height: 100dvh; height: auto; }
  body .container-main.legaleasy-unified > .n-layout { display: flex; flex-direction: column; min-height: 100dvh; height: auto !important; }
  body .container-main.legaleasy-unified > .n-layout > .n-layout-scroll-container { display: flex; flex-direction: column !important; min-height: 100dvh; height: auto !important; }
  body .container-main.legaleasy-unified .n-layout-sider { width: 100% !important; min-width: 0 !important; max-width: none !important; flex: 0 0 auto !important; border-right: 0; border-bottom: 1px solid #edf1f5; }
  body .container-main.legaleasy-unified .sider-main { height: auto; }
  body .container-main.legaleasy-unified .sider-main .sider-top .x-dna { width: 116px; min-height: 45px; margin: 8px 0 0 15px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list { margin-top: 2px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .people-grid { display: flex; gap: 7px; overflow-x: auto; padding: 8px 15px 12px; scrollbar-width: none; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .people-grid::-webkit-scrollbar { display: none; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-card { min-width: 165px; min-height: 58px; flex: 0 0 165px; padding: 6px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .avatar { width: 39px; height: 39px; padding: 2px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-name { margin: 1px 0 2px; font-size: 11px; }
  body .container-main.legaleasy-unified .sider-main .sider-top .menu-list .person-description { font-size: 9px; -webkit-line-clamp: 1; }
  body .container-main.legaleasy-unified .sider-main > div:last-child { display: none; }
  body .container-main.legaleasy-unified .n-layout-content { width: 100%; min-height: 0; overflow: visible; }
  body .container-main.legaleasy-unified .n-layout-content > .n-layout-scroll-container { height: auto; overflow: visible; }
  body .container-main.legaleasy-unified .n-layout-content > .n-layout-scroll-container > div:last-child { min-height: calc(100dvh - 210px); height: auto !important; }
  body .container-main.legaleasy-unified .conver-main { padding: 0 22px; }
  body .container-main.legaleasy-unified .conver-main .conversation-main > .flex-between:first-child { min-height: 67px; }
  body .container-main.legaleasy-unified .conver-main .conversation-main .avator { width: 52px; height: 52px; }
  body .container-main.legaleasy-unified .conver-main .conversation-main .title { font-size: 22px; }
  body .container-main.legaleasy-unified .legaleasy-feature-intro { margin: 0 auto 12px; }
  body .container-main.legaleasy-unified .legaleasy-feature-intro p { font-size: 12px; line-height: 1.65; }
  body .container-main.legaleasy-unified .opening { padding: 0; }
  body .container-main.legaleasy-unified .opening > div:last-child { display: none; }
  body .container-main.legaleasy-unified .conver-main .conver-center .disclaimer { padding: 0; font-size: 11px; }
  body .container-main.legaleasy-unified .conver-center > div[style*="padding"] { padding: 0 !important; }
  body .container-main.legaleasy-unified .messages-container { padding: 0; }
  body .container-main.legaleasy-unified .legaleasy-mobile-contact { display: block; margin: 6px auto 17px; }
  body .container-main.legaleasy-unified .legaleasy-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; max-width: 430px; margin: 0 auto; }
  body .container-main.legaleasy-unified .legaleasy-contact-card { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading { display: flex; flex: 0 0 58px; flex-direction: column; align-items: center; justify-content: flex-end; height: 58px; margin-bottom: 12px; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading span { color: #7a92b3; font-size: 11px; font-weight: 600; line-height: 16px; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading strong { margin-top: 4px; color: var(--le-ink); font-size: 15px; font-weight: 650; line-height: 21px; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger { display: block; width: fit-content; padding: 0; border: 0; border-radius: 16px; background: transparent; line-height: 0; cursor: zoom-in; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger img { display: block; width: 170px; height: 170px; max-width: 100%; padding: 9px; border: 2px solid var(--le-line); border-radius: 16px; background: #f8fafc; object-fit: contain; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger:hover img { border-color: #aacbed; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger:focus-visible { outline: 3px solid #8bb9f1; outline-offset: 4px; }
  body .container-main.legaleasy-unified .legaleasy-contact-card p { min-height: 2.8em; margin: 11px 0 0; color: var(--le-muted); font-size: 12px; line-height: 1.5; }
  body .container-main.legaleasy-unified .legaleasy-contact-phone { display: block; width: fit-content; margin: 8px auto 0; color: var(--le-muted); font-size: 11px; text-decoration: none; }
}
@media (max-width: 570px) {
  body .container-main.legaleasy-unified .flex-end.p-b-20 { gap: 6px; }
  body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20 { min-height: 40px; padding: 5px; border-radius: 13px; }
  body .container-main.legaleasy-unified .conver-main { padding: 0 16px; }
  body .container-main.legaleasy-unified .conver-main .conversation-main .title { font-size: 21px; }
  body .container-main.legaleasy-unified .legaleasy-contact-grid { gap: 9px; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading { height: 48px; flex-basis: 48px; margin-bottom: 10px; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading span { font-size: 10px; line-height: 14px; }
  body .container-main.legaleasy-unified .legaleasy-contact-heading strong { margin-top: 3px; font-size: 12px; line-height: 18px; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger img { width: min(100%,153px); height: auto; aspect-ratio: 1; padding: 8px; }
  body .container-main.legaleasy-unified .legaleasy-contact-card p { margin-top: 8px; font-size: 10px; }
  body .container-main.legaleasy-unified .input-container { border-radius: 24px; }
  body .container-main.legaleasy-unified .input-container .input-field { font-size: 12px; }
}
@media (max-width: 360px) {
  body .container-main.legaleasy-unified .legaleasy-contact-grid { grid-template-columns: 1fr; gap: 23px; }
  body .container-main.legaleasy-unified .legaleasy-qr-trigger img { width: 175px; }
}
@media (prefers-reduced-motion: reduce) {
  body .container-main.legaleasy-unified .n-layout-content::before { animation: none; }
  body .container-main.legaleasy-unified .person-card,
  body .container-main.legaleasy-unified .qr-code,
  body .container-main.legaleasy-unified .flex-end.p-b-20 > .m-r-20 { transition: none !important; }
}
