/* ============================================================
   Loom（Serein 内置 AI 工具）— 独立视觉体系，类名一律 .lm-*，别处勿用
   白 / 灰 / 墨 + 毛玻璃；紫 #8a7ba8 只做实色小圆点
   ============================================================ */
.lm-screen { background: #f5f5f7; }
.lm-screen > .app-header { display: none; }
.lm-app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; color: #16161a; }
.lm-bg { position: absolute; inset: 0; background: radial-gradient(120% 60% at 0% 0%, #ffffff 0%, #f3f3f6 55%, #ececf0 100%); pointer-events: none; }

/* 顶栏 */
.lm-top { position: relative; z-index: 3; flex: none; display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: calc(24px + env(safe-area-inset-top, 0px)) 18px 6px; }
.lm-ham { width: 40px; height: 40px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding-left: 8px; cursor: pointer; }
.lm-ham i { display: block; height: 2px; background: #16161a; border-radius: 2px; }
.lm-ham i:nth-child(1), .lm-ham i:nth-child(3) { width: 20px; }
.lm-ham i:nth-child(2) { width: 14px; }
.lm-wm { position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; text-align: center; cursor: pointer; max-width: 58%; }
.lm-wm s { overflow: hidden; text-overflow: ellipsis; }
.lm-wm b { font-family: Georgia, serif; font-style: italic; font-weight: 400; font-size: 21px; letter-spacing: .5px; }
.lm-wm s { display: block; text-decoration: none; font-size: 10.5px; letter-spacing: 3px; color: #8a8a92; margin-top: -1px; white-space: nowrap; }
.lm-api { height: 30px; padding: 0 11px; border-radius: 15px; background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #55555c; cursor: pointer; }
.lm-api em { width: 6px; height: 6px; border-radius: 50%; background: #c7c7cc; }
.lm-api.own em { background: #8a7ba8; }

/* 内容区 */
.lm-scroll { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 170px; overscroll-behavior: contain; }
.lm-pad { padding: 6px 20px 0; }
.lm-h1 { font-size: 34px; font-weight: 700; letter-spacing: 1px; margin: 10px 0 4px; }
.lm-lead { font-size: 12.5px; color: #8a8a92; margin-bottom: 18px; line-height: 1.6; }
.lm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lm-cat { background: rgba(255,255,255,.78); border-radius: 22px; padding: 12px; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 18px rgba(20,20,40,.06), 0 0 0 .5px rgba(0,0,0,.05); }
.lm-cat:active { transform: scale(.98); }
.lm-row { display: flex; justify-content: space-between; align-items: baseline; }
.lm-row b { font-size: 14px; font-weight: 600; }
.lm-row small { font-size: 11px; color: #9a9aa2; }
.lm-th { height: 76px; border-radius: 14px; background: #efeff2; position: relative; overflow: hidden; margin-bottom: 10px; }
.lm-big .lm-th { height: 150px; border-radius: 22px; box-shadow: 0 0 0 .5px rgba(0,0,0,.05); }
.lm-th i { position: absolute; font-style: normal; }
.t-chat i { height: 12px; border-radius: 7px; }
.t-chat .a { left: 10px; top: 12px; width: 46px; background: #fff; }
.t-chat .b { right: 10px; top: 30px; width: 58px; background: #1b1b1f; }
.t-chat .c { left: 10px; top: 48px; width: 34px; background: #fff; }
.lm-th.t-off { background: #26262b; }
.t-off i { left: 12px; right: 12px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); }
.t-bub i { border-radius: 10px; }
.t-bub .a { left: 14px; top: 14px; width: 70px; height: 20px; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
.t-bub .b { right: 14px; top: 42px; width: 58px; height: 20px; background: #dcdcf0; }
.t-mind .ring { left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #8a7ba8; }
.t-orb .o { right: -8px; top: 50%; margin-top: -15px; width: 30px; height: 30px; border-radius: 50%; background: rgba(28,28,32,.55); }
.t-orb .o::after { content: ""; position: absolute; left: 10px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.lm-th.t-if { background: #141419; }
.t-if b { position: absolute; left: 10px; top: 4px; font-size: 44px; color: rgba(255,255,255,.14); font-weight: 800; }
.lm-sug { display: flex; flex-direction: column; gap: 10px; }
.lm-sug div { background: rgba(255,255,255,.72); border-radius: 16px; padding: 13px 15px; font-size: 13.5px; line-height: 1.5; color: #3a3a40;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.05); cursor: pointer; }
.lm-sec { font-size: 12px; letter-spacing: 2px; color: #9a9aa2; margin: 22px 2px 10px; }
.lm-list { background: rgba(255,255,255,.62); border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.05); }
.lm-list div { padding: 12px 14px; display: flex; justify-content: space-between; font-size: 13.5px; border-top: .5px solid rgba(0,0,0,.05); cursor: pointer; }
.lm-list div:first-child { border-top: 0; }
.lm-list small { color: #9a9aa2; font-size: 11.5px; }

/* 对话 */
.lm-th-list { padding-top: 4px; }
.lm-q { margin: 14px 0 18px auto; width: fit-content; max-width: 80%; background: #e8e8ec; border-radius: 18px 18px 6px 18px;
  padding: 11px 14px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.lm-qi { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.lm-qi img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.lm-ans { font-size: 14.5px; line-height: 1.75; color: #2a2a30; margin: 0 2px 12px; word-break: break-word; }
.lm-ans.err { color: #8e8e93; }
.lm-think { display: flex; gap: 5px; padding: 6px 4px 14px; }
.lm-think i { width: 6px; height: 6px; border-radius: 50%; background: #b5b5bc; animation: lmDot 1.1s infinite ease-in-out; }
.lm-think i:nth-child(2) { animation-delay: .15s; }
.lm-think i:nth-child(3) { animation-delay: .3s; background: #8a7ba8; }
.lm-think { align-items: center; }
.lm-stop { margin-left: 8px; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: #b3b3b9; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lm-stop svg { width: 20px; height: 20px; }
.lm-stop:active { opacity: .5; }
@keyframes lmDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.lm-res, .lm-pic { background: #fff; border-radius: 22px; margin-bottom: 18px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(20,20,40,.08), 0 0 0 .5px rgba(0,0,0,.05); }
.lm-pic img { display: block; width: 100%; }
.lm-rh { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; gap: 10px; }
.lm-rh b { font-size: 13.5px; }
.lm-rh small { font-size: 11px; color: #9a9aa2; margin-left: 8px; }
.lm-seg { flex: none; display: flex; background: #f0f0f3; border-radius: 9px; padding: 2px; }
.lm-seg span { font-size: 11.5px; padding: 4px 10px; border-radius: 7px; color: #77777e; cursor: pointer; }
.lm-seg span.o { background: #fff; color: #16161a; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lm-pv { margin: 0 12px; height: 300px; border-radius: 16px; overflow: hidden; background: #f3f3f6; }
.lm-pv iframe { width: 100%; height: 100%; border: 0; display: block; }
.lm-code { margin: 0 12px; max-height: 300px; overflow: auto; border-radius: 16px; background: #f4f4f6; padding: 12px;
  font: 11.5px/1.55 ui-monospace, Menlo, monospace; color: #3a3a40; white-space: pre-wrap; word-break: break-all; }
.lm-pc { margin: 0 14px; }
.lm-pc b { font-size: 18px; display: block; margin-bottom: 4px; }
.lm-pc p { font-size: 13px; color: #55555c; line-height: 1.6; margin-bottom: 8px; }
.lm-pc div { font-size: 12.5px; color: #3a3a40; line-height: 1.6; padding: 8px 0; border-top: .5px solid rgba(0,0,0,.06); }
.lm-pc div span { color: #9a9aa2; margin-right: 8px; }
.lm-acts { display: flex; gap: 8px; padding: 12px; }
.lm-a { flex: 1; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: #f0f0f3; color: #2a2a30; cursor: pointer; }
.lm-a.pri { flex: 1.6; background: #16161a; color: #fff; }
.lm-a:active { opacity: .8; }

/* 输入区 */
.lm-cmp { position: absolute; z-index: 4; left: 14px; right: 14px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 26px; background: rgba(255,255,255,.74); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(20,20,40,.12), 0 0 0 .5px rgba(0,0,0,.06); padding: 10px 12px 10px; }
.lm-cmp textarea { display: block; width: 100%; border: 0; outline: 0; background: none; resize: none; font-size: 16px; line-height: 1.45;
  color: #16161a; padding: 4px 6px 10px; font-family: inherit; max-height: 120px; }
.lm-cmp textarea::placeholder { color: #a3a3aa; }
.lm-att { display: flex; gap: 8px; padding: 2px 4px 8px; }
.lm-ch { position: relative; width: 48px; height: 48px; }
.lm-ch img { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; }
.lm-ch i { position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: #16161a; color: #fff;
  font-style: normal; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lm-tools { display: flex; align-items: center; gap: 6px; }
.lm-tl { height: 32px; padding: 0 11px; border-radius: 10px; background: #f0f0f3; display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #4a4a50; cursor: pointer; }
.lm-tl svg { width: 15px; height: 15px; }
.lm-sty { flex: 1; height: 32px; display: flex; align-items: center; justify-content: center; color: #c7c7cc; cursor: pointer; }
.lm-sty svg { width: 19px; height: 19px; }
.lm-sty.on { color: #8e8e93; }
.lm-sty.off { opacity: .35; pointer-events: none; }
.lm-go { margin-left: auto; width: 52px; height: 34px; border-radius: 12px; background: #16161a; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lm-go svg { width: 18px; height: 18px; }

/* 侧边栏 */
.lm-dim { position: absolute; inset: 0; z-index: 20; background: rgba(20,20,26,0); transition: background .22s; }
.lm-dim.in { background: rgba(20,20,26,.28); }
.lm-dr { position: absolute; left: 0; top: 0; bottom: 0; width: 302px; max-width: 80%; background: rgba(250,250,252,.94);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); box-shadow: 12px 0 40px rgba(0,0,0,.14);
  padding: 0 16px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.3,.9,.3,1); display: flex; flex-direction: column; }
.lm-dim.in .lm-dr { transform: none; }
.lm-brand { flex: none; padding: calc(30px + env(safe-area-inset-top, 0px)) 6px 18px; display: flex; align-items: baseline; gap: 10px; }
.lm-brand b { font-family: Georgia, serif; font-style: italic; font-weight: 400; font-size: 30px; }
.lm-brand span { font-size: 11px; letter-spacing: 3px; color: #9a9aa2; }
.lm-exit { align-self: center; width: 30px; height: 30px; margin-left: -6px; display: flex; align-items: center; justify-content: center; color: #55555c; cursor: pointer; }
.lm-exit svg { width: 20px; height: 20px; }
.lm-dsc { flex: 1; min-height: 0; overflow-y: auto; }
.lm-it { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 10px; border-radius: 14px; font-size: 15px; cursor: pointer; }
.lm-it svg { width: 20px; height: 20px; flex: none; }
.lm-it span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-it.on { background: #fff; box-shadow: 0 2px 10px rgba(20,20,40,.07), 0 0 0 .5px rgba(0,0,0,.05); font-weight: 600; }
.lm-n { font-style: normal; font-size: 11.5px; color: #9a9aa2; font-weight: 400; }
.lm-sub { margin: 2px 0 8px 42px; border-left: 1px solid rgba(0,0,0,.08); padding-left: 12px; }
.lm-sub div { height: 32px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #55555c; cursor: pointer; position: relative; }
.lm-sub div.cur { color: #16161a; font-weight: 600; }
.lm-sub div.cur::before { content: ""; position: absolute; left: -15px; width: 5px; height: 5px; border-radius: 50%; background: #8a7ba8; }
.lm-sub em { font-style: normal; font-size: 11px; color: #a3a3aa; }
.lm-hr { height: .5px; background: rgba(0,0,0,.07); margin: 10px 6px; }
.lm-lab { font-size: 11px; letter-spacing: 2px; color: #a3a3aa; padding: 6px 10px; }
.lm-new { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; font-size: 13.5px; color: #55555c; cursor: pointer; }
.lm-new i { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.2px #b5b5bc; display: flex; align-items: center;
  justify-content: center; font-style: normal; font-size: 15px; color: #77777e; }
.lm-foot { flex: none; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

/* 弹层 */
.lm-ov { position: absolute; inset: 0; z-index: 30; background: rgba(20,20,26,.28); display: flex; align-items: flex-end; }
.lm-sheet { width: 100%; max-height: 80%; overflow-y: auto; background: rgba(250,250,252,.96); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  border-radius: 26px 26px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
.lm-sh-t { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 12px; }
.lm-si { height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #2a2a30; cursor: pointer; }
.lm-si:active { opacity: .5; }
.lm-sh-row { display: flex; gap: 10px; margin-top: 12px; }
.lm-b2 { flex: 1; height: 44px; border-radius: 14px; background: #ececef; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }
.lm-b2.pri { background: #16161a; color: #fff; }
.lm-fl { display: block; margin-bottom: 12px; }
.lm-fl span { display: block; font-size: 12px; color: #8a8a92; margin: 0 4px 6px; }
.lm-fl input, .lm-fl textarea { width: 100%; border: 0; outline: 0; background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 16px;
  font-family: inherit; color: #16161a; box-shadow: 0 0 0 .5px rgba(0,0,0,.07); resize: none; }
.lm-note { font-size: 11.5px; color: #9a9aa2; margin: 0 4px 4px; line-height: 1.5; }
.lm-sw { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 14px; box-shadow: 0 0 0 .5px rgba(0,0,0,.07); }
.lm-sw i { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #dcdce0; cursor: pointer; transition: background .2s; }
.lm-sw i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.lm-sw i.on { background: #16161a; }
.lm-sw i.on::after { transform: translateX(18px); }
.lm-pks { display: flex; flex-direction: column; gap: 6px; }
.lm-pk { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #fff; border-radius: 14px; cursor: pointer; box-shadow: 0 0 0 .5px rgba(0,0,0,.05); }
.lm-pk b { flex: 1; font-size: 14px; font-weight: 500; }
.lm-pk i { width: 8px; height: 8px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1px #c7c7cc; }
.lm-pk.on i { background: #8a7ba8; box-shadow: none; }
.lm-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #ececef; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #77777e; flex: none; }
.lm-av img { width: 100%; height: 100%; object-fit: cover; }
.lm-empty { text-align: center; color: #9a9aa2; font-size: 13px; padding: 20px 0; }

/* 全屏预览 */
.lm-full { position: absolute; inset: 0; z-index: 40; background: #fff; }
.lm-full iframe { width: 100%; height: 100%; border: 0; display: block; }
.lm-fx { position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 4px 14px rgba(0,0,0,.14);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lm-fx svg { width: 20px; height: 20px; }

/* 裁切 */
.lm-crop { position: absolute; inset: 0; z-index: 40; background: #121216; display: flex; flex-direction: column; }
.lm-cr-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(30px + env(safe-area-inset-top, 0px)) 16px 10px; }
.lm-cr-stage img { max-width: 100%; max-height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.lm-cr-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.55), inset 0 0 0 1.5px #fff; touch-action: none; cursor: move; }
.lm-cr-box .h { position: absolute; left: 33.3%; right: 33.3%; top: 0; bottom: 0; border-left: .5px solid rgba(255,255,255,.4); border-right: .5px solid rgba(255,255,255,.4); }
.lm-cr-bar { flex: none; background: rgba(250,250,252,.96); border-radius: 26px 26px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.lm-cr-rs { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.lm-cr-rs span { font-size: 12.5px; padding: 6px 12px; border-radius: 10px; background: #ececef; color: #55555c; cursor: pointer; }
.lm-cr-rs span.on { background: #16161a; color: #fff; }
.lm-cr-sz { width: 100%; accent-color: #16161a; }

/* 窗口切换 */
.lm-wins { padding-top: 16px; }
.lm-wh { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 14px; }
.lm-wh b { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.lm-wnew { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px; border-radius: 12px; background: #16161a; color: #fff;
  font-size: 13px; cursor: pointer; }
.lm-wnew svg { width: 15px; height: 15px; }
.lm-wl { background: #fff; border-radius: 18px; box-shadow: 0 0 0 .5px rgba(0,0,0,.05); overflow: hidden; }
.lm-wr { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; }
.lm-wr + .lm-wr::before { content: ""; position: absolute; left: 36px; right: 0; top: 0; height: .5px; background: rgba(0,0,0,.07); }
.lm-wr > i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #dedee3; }
.lm-wr.on > i { background: #8a7ba8; }
.lm-wr > div { flex: 1; min-width: 0; }
.lm-wr b { display: block; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-wr.on b { font-weight: 600; }
.lm-wr small { display: block; font-size: 11.5px; color: #9a9aa2; margin-top: 2px; }
.lm-wbusy { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #e2e2e6; border-top-color: #8a7ba8; animation: lmSpin .8s linear infinite; }
@keyframes lmSpin { to { transform: rotate(360deg); } }

/* ---------- 表情包（v0.55.43）：主角瓷片（头像+名字+紫点）/ 张数网格缩样 / 切好的表情网格 ---------- */
.lm-stk { margin-bottom: 4px; }
.lm-sts { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.lm-sts::-webkit-scrollbar { display: none; }
.lm-stw { flex: none; width: 68px; padding: 10px 0 9px; border-radius: 18px; background: rgba(255,255,255,.72);
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; position: relative; }
.lm-stw .lm-av { width: 40px; height: 40px; }
.lm-stw b { font-size: 11.5px; font-weight: 500; color: #3a3a40; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-stw i { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px #c7c7cc; }
.lm-stw.on { background: #fff; box-shadow: 0 4px 14px rgba(20,20,30,.07); }
.lm-stw.on i { background: #8a7ba8; box-shadow: none; }
.lm-stns { display: flex; gap: 10px; }
.lm-stn { flex: 1; padding: 12px 0 10px; border-radius: 18px; background: rgba(255,255,255,.72); cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lm-stg { display: grid; gap: 3px; width: 40px; height: 40px; }
.lm-stg i { border-radius: 4px; background: #dcdce2; }
.lm-stn b { font-size: 12px; font-weight: 500; color: #3a3a40; }
.lm-stn em { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px #c7c7cc; }
.lm-stn.on { background: #fff; box-shadow: 0 4px 14px rgba(20,20,30,.07); }
.lm-stn.on .lm-stg i { background: #9d9da6; }
.lm-stn.on em { background: #8a7ba8; box-shadow: none; }
.lm-stbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 4px 0 14px; border-radius: 18px;
  background: rgba(255,255,255,.72); cursor: pointer; }
.lm-stavs { display: flex; }
.lm-stavs .lm-av { width: 26px; height: 26px; margin-right: -7px; box-shadow: 0 0 0 2px #fff; }
.lm-stavs:not(:empty) { margin-right: 6px; }
.lm-stbar b { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-stbar small { font-size: 12px; color: #8a8a92; }
.lm-stbar > i { width: 8px; height: 8px; border-right: 1.8px solid #8a8a92; border-bottom: 1.8px solid #8a8a92; transform: rotate(45deg) translate(-2px,-2px); }
.lm-stbar > i.up { transform: rotate(-135deg) translate(-2px,-2px); }
.lm-stbar + .lm-stk { margin: -6px 0 16px; }
.lm-sgrid { display: grid; gap: 8px; padding: 2px 12px 12px; }
.lm-scell { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.lm-scell span { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; background: #f3f3f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lm-scell img { width: 92%; height: 92%; object-fit: contain; }
.lm-scell small { font-size: 10.5px; line-height: 1.35; color: #6e6e76; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lm-scell.off span { opacity: .3; }
.lm-scell.off small { text-decoration: line-through; color: #b3b3b9; }
.lm-stload { display: flex; align-items: center; justify-content: center; gap: 10px; height: 150px; margin: 0 12px 12px; border-radius: 16px;
  background: #f7f7f9; font-size: 13px; color: #a8a8ae; }
.lm-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #e6e6ea; border-top-color: #a8a8ae; animation: lmSpin .9s linear infinite; }
@keyframes lmSpin { to { transform: rotate(360deg); } }
.lm-sterr { margin: 0 14px 12px; font-size: 12.5px; color: #8a8a92; line-height: 1.5; }

/* ---------- 生图（v0.55.44） ---------- */
.lm-gg { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; }
.lm-gg i { display: block; border-radius: 5px; background: #dcdce2; }
.lm-stn.on .lm-gg i { background: #9d9da6; }
.lm-stn .lm-gg + b { margin-top: 2px; }
.lm-gpics { padding: 2px 12px 8px; }
.lm-gpics span { display: block; border-radius: 16px; overflow: hidden; background: #f3f3f6; cursor: pointer; }
.lm-gpics img { display: block; width: 100%; }
.lm-gpics.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lm-gpics.two span { aspect-ratio: 1 / 1; }
.lm-gpics.two img { height: 100%; object-fit: cover; }
.lm-gdesc { padding: 0 16px 10px; font-size: 12.5px; line-height: 1.6; color: #6e6e76; }

/* v0.56.145 生图结果卡：无图画框内显示提示词；右下角同尺寸图标键，无底色无描边 */
.lm-gframe { display: flex !important; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 20px; cursor: default !important; }
.lm-gframe i { font-style: normal; font-size: 12.5px; line-height: 1.65; color: #8a8a92; white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.lm-gframe em { font-style: normal; font-size: 12px; color: #a0a0a8; }
.lm-gp { padding: 0 16px 6px; font-size: 12px; line-height: 1.6; color: #a6a6ae; white-space: pre-wrap; word-break: break-word; }
.lm-icrow { display: flex; justify-content: flex-end; gap: 4px; padding: 2px 8px 8px; }
.lm-ic { width: 38px; height: 38px; padding: 0; border: 0; background: none; color: #8e8e93; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lm-ic svg { width: 21px; height: 21px; }
.lm-ic:active { opacity: .5; }
.lm-gdesc[data-gx] { color: #2c2c32; cursor: pointer; }
.lm-pic .lm-gpics { padding-top: 12px; }
/* v0.56.147 底部图标面板：图标在上、名称在下，无底色无描边 */
.lm-icsh { width: 100%; background: rgba(252,252,253,.98); border-radius: 24px 24px 0 0; padding: 22px 10px calc(22px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 20px; box-shadow: 0 -10px 30px rgba(20,20,40,.08); }
.lm-ict { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #3a3a40; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lm-ict svg { width: 25px; height: 25px; }
.lm-ict span { font-size: 11.5px; color: #8a8a92; letter-spacing: .02em; }

.lm-ict:active { opacity: .5; }
.lm-pic img[data-pimg] { cursor: pointer; }
/* v0.56.149 弹层标题行：左取消、右确定（无底色图标）；确认弹层只有标题行 */
.lm-dh { display: flex; align-items: center; gap: 8px; margin: -4px -4px 14px; }
.lm-dh > div { flex: 1; text-align: center; min-width: 0; }
.lm-dh b { display: block; font-size: 15px; font-weight: 600; }
.lm-dh small { display: block; font-size: 12px; color: #9a9aa2; margin-top: 3px; }
.lm-dx { width: 40px; height: 40px; padding: 0; border: 0; background: none; color: #3a3a40; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.lm-dx svg { width: 22px; height: 22px; }
.lm-dx:active { opacity: .5; }
.lm-cf .lm-dh { margin-bottom: 0; }
/* v0.56.154 卡片底部操作栏：整行均分，图标在上名称在下，无底色无描边 */
.lm-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); padding: 4px 6px 10px; }
.lm-bi { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border: 0; background: none; color: #c2c2c7; cursor: pointer; -webkit-tap-highlight-color: transparent; min-width: 0; }
.lm-bi svg { width: 20px; height: 20px; }
.lm-bi:active { opacity: .5; }
