:root{
  --wa-green:#00a884;
  --wa-send:#25d366;
  --wa-out:#d9fdd3;
  --wa-in:#fff;
  --ink:#111b21;
  --muted:#667781;
  --panel:#fff;
  font-family:Roboto,"Noto Sans CJK TC","Noto Sans TC","PingFang TC","Microsoft JhengHei UI","Microsoft JhengHei",system-ui,sans-serif;
  color:var(--ink);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#eef2f4}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.app-shell{display:grid;grid-template-columns:390px minmax(520px,1fr);min-height:100vh}
.editor-panel{height:100vh;overflow:auto;background:#fff;border-right:1px solid #d9e0e3;padding:22px 20px 28px;position:sticky;top:0}
.editor-title{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
.editor-title h1{font-size:21px;margin:0 0 5px}
.editor-title p{font-size:12px;color:var(--muted);margin:0}
.icon-btn{width:34px;height:34px;border:1px solid #d8dfe2;border-radius:10px;background:#f8fafb;font-size:21px;color:#54656f}
.form-card{background:#f8fafb;border:1px solid #e4e9eb;border-radius:16px;padding:15px;margin-bottom:14px}
.form-card h2{font-size:14px;margin:0 0 12px}
.form-card label,.compact-label{display:block;font-size:12px;color:#54656f;margin-top:10px}
.form-card input,.form-card textarea,.form-card select{width:100%;margin-top:5px;border:1px solid #d8e0e3;border-radius:9px;background:#fff;color:var(--ink);padding:9px 10px;outline:none}
.form-card input:focus,.form-card textarea:focus,.form-card select:focus{border-color:var(--wa-green);box-shadow:0 0 0 3px rgba(0,168,132,.09)}
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.avatar-upload{display:flex;align-items:center;gap:12px}
.avatar-upload img{width:52px;height:52px;border-radius:50%;object-fit:cover;border:1px solid #d7dfe1}
.soft-btn{border:1px solid #cbd6da;border-radius:9px;background:#fff;padding:8px 10px;color:#34444c;font-size:12px;margin-right:6px;margin-bottom:5px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.section-head h2{margin:0}
.section-head>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.mini-add{border:0;border-radius:8px;padding:6px 8px;font-size:11px}
.incoming-add{background:#fff;color:#34444c;border:1px solid #d8e0e3}
.outgoing-add{background:#d9fdd3;color:#167466}
.image-add{background:#00a884;color:#fff}
.message-edit-list{display:flex;flex-direction:column;gap:9px;margin-top:12px}
.message-editor{border:1px solid #e2e7e9;border-radius:11px;padding:9px;background:#fff}
.message-editor.outgoing{border-left:4px solid #36c798}
.message-editor.incoming{border-left:4px solid #bcc7cb}
.message-editor-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.editor-selects{display:flex;gap:5px;flex:1}
.editor-selects select{width:auto;margin:0;padding:5px 7px;font-size:11px}
.order-tools{display:flex;gap:4px}
.order-tools button{width:25px;height:25px;border:1px solid #d9e0e3;background:#f8fafb;border-radius:7px;color:#5d6b72}
.order-tools button:disabled{opacity:.35}
.order-tools .delete{color:#d9534f}
.message-editor textarea{resize:vertical;line-height:1.35}
.message-meta-edit{display:grid;grid-template-columns:90px 1fr;gap:8px}
.message-meta-edit input,.message-meta-edit select{padding:6px 8px;font-size:11px}
.image-edit-row{display:flex;align-items:center;gap:9px;margin-top:9px}
.image-edit-row img{width:76px;height:76px;object-fit:cover;border-radius:10px;border:1px solid #dce3e5;background:#e9edef}
.image-edit-row>div{flex:1}
.editor-actions{position:sticky;bottom:-28px;background:linear-gradient(transparent,#fff 24%);padding:22px 0 4px;display:grid;grid-template-columns:1fr 1fr;gap:9px}
.primary-btn,.export-btn{border:0;border-radius:11px;padding:12px;font-weight:700}
.primary-btn{background:#e5f7f2;color:#087b67}
.export-btn{background:var(--wa-green);color:#fff}.export-btn:disabled{opacity:.6}

.preview-stage{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;overflow:auto;position:relative}
.phone-frame{width:393px;height:852px;background:#fff;box-shadow:0 24px 70px rgba(17,27,33,.18),0 0 0 1px rgba(17,27,33,.08);border-radius:22px;overflow:hidden;display:flex;flex-direction:column;position:relative;transform-origin:center}
.status-bar{height:33px;display:flex;align-items:center;justify-content:space-between;padding:0 13px 0 18px;background:#fff;color:#0b141a;font-size:14px;flex:none;z-index:6}
.status-bar.dark-surface{background:#101417;color:#fff}
.status-time{font-size:15px;font-weight:500}
.status-right{display:flex;align-items:center;gap:5px;height:100%;font-size:11px}
.silent{font-size:15px;transform:rotate(-25deg)}
.volte{font-size:7px;line-height:7px;text-align:center;font-weight:700}
.network{font-size:9px;font-weight:700}
.signal-bars{height:15px;display:flex;align-items:flex-end;gap:1.6px}
.signal-bars i{display:block;width:2.3px;background:currentColor;border-radius:1px}
.signal-bars i:nth-child(1){height:4px}.signal-bars i:nth-child(2){height:7px}.signal-bars i:nth-child(3){height:11px}.signal-bars i:nth-child(4){height:15px}
.battery-text{font-size:13px;margin-left:1px}
.battery-icon{width:10px;height:17px;border:1.4px solid currentColor;border-radius:2px;position:relative;padding:1px;display:flex;align-items:flex-end}
.battery-icon:after{content:"";position:absolute;right:-3px;top:5px;width:2px;height:5px;background:currentColor;border-radius:0 1px 1px 0}
.battery-icon i{display:block;width:100%;background:currentColor;border-radius:1px}
.chat-header{height:65px;background:#fff;display:flex;align-items:center;padding:0 7px 0 3px;border-bottom:1px solid #f0f2f3;flex:none;z-index:5}
.chat-header button,.media-toolbar button,.viewer-toolbar button{border:0;background:transparent;color:inherit;padding:4px;display:grid;place-items:center}
.chat-header svg,.media-toolbar svg,.viewer-toolbar svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.header-icon{width:39px}.header-icon svg{width:29px;height:29px}
.contact-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;flex:none}
.contact-info{display:flex;flex-direction:column;min-width:0;margin-left:10px;flex:1}
.contact-info strong{font-size:17px;font-weight:500;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.contact-info span{font-size:12px;color:var(--muted);line-height:17px}
.header-actions{display:flex;align-items:center;gap:10px;margin-left:6px}
.more-dots{width:26px;display:flex!important;flex-direction:column;gap:2px!important}.more-dots i{display:block;width:3px;height:3px;background:currentColor;border-radius:50%}

.chat-area{position:relative;flex:1;min-height:0;background:#efeae2;display:flex;flex-direction:column;overflow:hidden}
.chat-area:before{content:"";position:absolute;inset:0;opacity:.32;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23989b91' stroke-width='1.4' opacity='.55'%3E%3Cpath d='M18 26c7-8 17-8 24 0-6 9-14 14-24 17-6-7-6-12 0-17z'/%3E%3Ccircle cx='84' cy='31' r='12'/%3E%3Cpath d='M78 31h12M84 25v12M132 19l8 10-11 5-8-10zM26 97c9-10 19-10 28 0l-14 21zM100 98c0-8 6-14 14-14s14 6 14 14-6 14-14 14-14-6-14-14zM109 96h10M114 91v10M145 79l15 15M160 79l-15 15M55 142l10-18 10 18zM126 144c6-10 18-10 24 0-7 8-15 12-24 14-5-5-5-10 0-14z'/%3E%3C/g%3E%3C/svg%3E")}
.day-label{align-self:center;background:#fff;border-radius:8px;padding:6px 12px;font-size:12px;color:#54656f;box-shadow:0 1px 1px rgba(11,20,26,.13);margin-top:9px;margin-bottom:8px;z-index:1}
.messages{display:flex;flex-direction:column;gap:3px;padding:0 10px 90px;overflow-y:auto;scrollbar-width:none;z-index:1}.messages::-webkit-scrollbar{display:none}
.message-row{display:flex;width:100%}.message-row.incoming{justify-content:flex-start}.message-row.outgoing{justify-content:flex-end}
.bubble{position:relative;max-width:82%;box-shadow:0 1px .5px rgba(11,20,26,.15);font-size:14.3px;line-height:19px;overflow-wrap:anywhere}
.text-bubble{min-width:74px;padding:6px 7px 7px 8px;border-radius:8px;white-space:pre-wrap}
.bubble.incoming{background:var(--wa-in);border-top-left-radius:3px}.bubble.outgoing{background:var(--wa-out);border-top-right-radius:3px}
.text-bubble.incoming:before,.image-bubble.incoming:before{content:"";position:absolute;left:-7px;top:0;border-top:9px solid #fff;border-left:8px solid transparent}
.text-bubble.outgoing:after,.image-bubble.outgoing:after{content:"";position:absolute;right:-7px;top:0;border-top:9px solid var(--wa-out);border-right:8px solid transparent}
.bubble-meta{float:right;display:inline-flex;align-items:center;gap:2px;margin-left:6px;margin-top:5px;color:var(--muted);font-size:10.5px;line-height:11px;height:11px}
.ticks{display:inline-flex;color:var(--muted)}.ticks-blue{color:#53bdeb}.ticks svg{width:18px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.image-bubble{width:292px;padding:4px 4px 21px;border-radius:10px;overflow:visible;cursor:zoom-in}
.image-media-wrap{height:290px;border-radius:7px;overflow:hidden;background:#d7dcde}.message-image{width:100%;height:100%;display:block}.message-image.fit-cover{object-fit:cover}.message-image.fit-contain{object-fit:contain;background:#111}
.image-caption{padding:7px 7px 1px;font-size:14.3px;line-height:19px;white-space:pre-wrap}
.image-caption+.image-bubble-meta{bottom:5px}.image-bubble-meta{position:absolute;right:7px;bottom:5px;display:flex;align-items:center;gap:2px;color:#667781;font-size:10.5px;line-height:12px;text-shadow:0 1px rgba(255,255,255,.2)}
.image-bubble:not(:has(.image-caption)) .image-bubble-meta{color:#fff;background:rgba(0,0,0,.35);padding:2px 4px;border-radius:5px;text-shadow:0 1px 2px #000}
.composer-wrap{position:absolute;left:7px;right:7px;bottom:7px;display:flex;align-items:flex-end;gap:6px;z-index:3}
.composer{height:47px;background:#fff;border-radius:24px;display:flex;align-items:center;flex:1;box-shadow:0 1px 2px rgba(11,20,26,.12);padding:0 7px;color:#54656f}
.composer button,.mic-button{border:0;background:transparent;color:inherit;display:grid;place-items:center;padding:0}.composer svg,.mic-button svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.composer-plus{width:35px}.composer-plus svg{width:29px;height:29px}.composer-emoji{width:35px}.composer-emoji svg{width:25px;height:25px}.placeholder{font-size:15px;color:var(--muted);margin-left:2px}.composer-spacer{flex:1}.composer-camera{width:37px}.composer-camera svg{width:26px;height:26px}
.mic-button{width:47px;height:47px;border-radius:50%;background:var(--wa-green);color:#fff;box-shadow:0 1px 2px rgba(11,20,26,.18)}

.media-preview-phone{background:#fff}
.media-preview-screen{flex:1;min-height:0;display:flex;flex-direction:column;background:#fff}
.media-toolbar{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;flex:none}.media-toolbar>button svg{width:29px;height:29px}.media-toolbar-actions{display:flex;gap:24px;align-items:center}.media-toolbar-actions button{width:28px;height:38px}.media-toolbar-actions .text-tool{font-weight:700;font-size:29px;line-height:1}
.media-canvas{height:510px;margin:7px 14px 0;border-radius:8px;overflow:hidden;background:#111;display:grid;place-items:center}.media-canvas img{width:100%;height:100%;object-fit:contain}
.media-caption-row{height:57px;margin:16px 12px 0;border-radius:29px;background:#f0f2f5;display:flex;align-items:center;padding:0 14px;gap:9px;color:#54656f}.caption-image-icon svg,.view-once svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9}.media-caption-row textarea{flex:1;border:0;outline:0;background:transparent;resize:none;height:28px;line-height:28px;font-size:15px;color:#111b21;padding:0}.view-once{border:0;background:transparent;color:#54656f;padding:0;display:grid;place-items:center}
.media-thumbnails{height:72px;padding:12px 14px;border-bottom:1px solid #e9edef}.thumb{width:48px;height:48px;border:3px solid var(--wa-green);border-radius:12px;position:relative;padding:2px}.thumb img{width:100%;height:100%;object-fit:cover;border-radius:7px}.thumb span{position:absolute;right:-10px;top:-10px;width:22px;height:22px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);display:grid;place-items:center;color:#54656f;font-size:18px}
.media-send-row{flex:1;display:flex;align-items:center;justify-content:space-between;padding:9px 19px 15px}.recipient-pill{background:#f0f2f5;border-radius:22px;padding:10px 15px;color:#54656f;font-size:13px}.status-ring{margin-right:8px}.media-send-button{width:55px;height:55px;border:0;border-radius:50%;background:#21c063;color:#fff;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.15)}.media-send-button svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.image-viewer-phone{background:#101417;color:#fff}
.image-viewer-screen{flex:1;min-height:0;display:flex;flex-direction:column;background:#101417}.viewer-toolbar{height:66px;display:flex;align-items:center;padding:0 7px;color:#fff}.viewer-toolbar>button{width:40px}.viewer-title{display:flex;flex-direction:column;flex:1;margin-left:4px}.viewer-title strong{font-size:15px;font-weight:500}.viewer-title span{font-size:11px;color:#b7c1c7}.viewer-actions{display:flex;gap:10px}.viewer-actions button{width:34px}.viewer-actions svg{width:22px;height:22px}
.viewer-canvas{flex:1;min-height:0;display:grid;place-items:center;background:#000}.viewer-canvas img{width:100%;height:100%;object-fit:contain}.viewer-caption{padding:12px 16px 16px;font-size:14px;background:#101417}

.android-nav{height:31px;background:#fff;display:flex;align-items:center;justify-content:space-around;color:#171d20;flex:none}.android-nav.dark-nav{background:#101417;color:#fff}.recent-lines{font-size:18px;letter-spacing:1px;transform:rotate(90deg);font-weight:300}.home-circle{width:16px;height:16px;border:2px solid currentColor;border-radius:50%}.android-back{font-size:34px;line-height:20px;transform:translateY(-1px)}
.exit-pure{position:fixed;z-index:20;top:15px;right:15px;border:0;border-radius:20px;background:rgba(17,27,33,.82);color:#fff;padding:9px 15px;box-shadow:0 6px 20px rgba(0,0,0,.22)}
.pure-mode{display:block;background:#151a1d;min-height:100vh}.pure-mode .preview-stage{padding:0;min-height:100vh}.pure-mode .phone-frame{border-radius:0;box-shadow:none;transform:none;width:min(393px,100vw);height:min(852px,100vh)}

@media(max-width:980px){.app-shell{grid-template-columns:1fr}.editor-panel{height:auto;position:static;border-right:0;border-bottom:1px solid #d9e0e3}.preview-stage{min-height:auto;padding:22px 10px 38px}.phone-frame{transform:scale(.92);margin:-34px 0}.editor-actions{bottom:0;padding-bottom:10px}.message-edit-list{max-height:520px;overflow:auto}}
@media(max-width:430px){.editor-panel{padding:16px 12px}.preview-stage{padding:0;background:#fff}.phone-frame{width:100vw;height:852px;border-radius:0;box-shadow:none;transform:none;margin:0}.app-shell:not(.pure-mode) .preview-stage{border-top:10px solid #eef2f4}}

/* v3 手机版：无独立编辑框，直接在 WhatsApp 界面修改 */
html,body,#app{width:100%;min-height:100%;overscroll-behavior:none}
.app-shell.mobile-first{display:block;min-height:100dvh;background:#eef2f4}
.mobile-first .preview-stage{min-height:100dvh;width:100%;display:flex;align-items:center;justify-content:center;padding:24px;position:relative;overflow:hidden}
.mobile-first .phone-frame{flex:none}

.direct-edit{-webkit-tap-highlight-color:transparent}
.is-editing .direct-edit{cursor:text}
.is-editing .contact-avatar,.is-editing [data-action="image-message"],.is-editing [data-action="edit-battery"]{cursor:pointer}
.is-editing .contact-avatar{outline:2px solid rgba(0,168,132,.18);outline-offset:1px}
.is-editing .direct-edit:focus{outline:0;background:rgba(0,168,132,.10);border-radius:4px;box-shadow:0 0 0 2px rgba(0,168,132,.12)}
.is-editing .status-time:focus,.is-editing .day-label:focus,.is-editing .placeholder:focus{padding-left:2px;padding-right:2px}
.is-editing .bubble-text:focus,.is-editing .image-caption:focus{background:rgba(255,255,255,.42);box-shadow:none}
.caption-hint{color:#829198;font-size:12px;font-style:italic}
.empty-caption{min-height:26px}
.phone-frame:not(.is-editing) .empty-caption{display:none}

.ticks{border:0;background:transparent;padding:0;margin:0;display:inline-flex;color:var(--muted);height:13px;min-width:18px;align-items:center;justify-content:center}
.tick-empty{width:18px;opacity:.25;border-bottom:1px dashed #667781}
.phone-frame:not(.is-editing) .tick-empty{display:none}

/* 浮动工具，不进入导出截图 */
.mobile-tools{position:fixed;right:max(-18px,calc(env(safe-area-inset-right) - 18px));bottom:max(60px,calc(env(safe-area-inset-bottom) + 48px));z-index:50;display:flex;flex-direction:column;align-items:flex-end;gap:10px;transition:right .18s ease}
.mobile-tools.open{right:max(10px,env(safe-area-inset-right))}
.edit-fab{width:54px;height:54px;border:0;border-radius:50%;display:grid;place-items:center;color:#fff;background:#00a884;box-shadow:0 8px 26px rgba(0,0,0,.28);transition:transform .18s ease,box-shadow .18s ease}
.edit-fab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mobile-tools:not(.open) .edit-fab{box-shadow:0 8px 22px rgba(0,0,0,.22)}
.mobile-tools.open .edit-fab{transform:rotate(45deg)}
.tool-menu{display:flex;flex-direction:column;align-items:flex-end;gap:8px;opacity:0;pointer-events:none;transform:translateY(10px) scale(.96);transform-origin:bottom right;transition:.16s ease}
.mobile-tools.open .tool-menu{opacity:1;pointer-events:auto;transform:none}
.tool-menu button{border:0;background:#fff;color:#233139;height:42px;border-radius:22px;padding:0 14px 0 10px;display:flex;align-items:center;gap:9px;box-shadow:0 5px 18px rgba(0,0,0,.18)}
.tool-menu button span{width:28px;height:28px;border-radius:50%;background:#e5f7f2;color:#007d69;display:grid;place-items:center}
.tool-menu button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tool-menu button b{font-size:13px;font-weight:600;white-space:nowrap}

.exit-preview{position:fixed;z-index:55;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));border:0;border-radius:22px;background:rgba(17,27,33,.78);color:#fff;padding:9px 14px;box-shadow:0 5px 18px rgba(0,0,0,.22);backdrop-filter:blur(8px)}
.toast{position:fixed;left:50%;bottom:max(120px,calc(env(safe-area-inset-bottom) + 100px));z-index:70;transform:translateX(-50%);max-width:calc(100vw - 40px);background:rgba(17,27,33,.88);color:#fff;border-radius:20px;padding:9px 15px;font-size:12px;white-space:nowrap;box-shadow:0 7px 24px rgba(0,0,0,.2);pointer-events:none;animation:toast-in .18s ease}
@keyframes toast-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}

/* 长按消息弹出的底部操作单 */
.sheet-mask{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.38);display:flex;align-items:flex-end;justify-content:center;animation:mask-in .16s ease}
@keyframes mask-in{from{opacity:0}to{opacity:1}}
.action-sheet{width:min(520px,100%);max-height:82dvh;overflow:auto;background:#fff;border-radius:22px 22px 0 0;padding:8px 14px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(0,0,0,.22);animation:sheet-up .18s ease}
@keyframes sheet-up{from{transform:translateY(100%)}to{transform:none}}
.sheet-handle{width:40px;height:4px;border-radius:4px;background:#c9d0d3;margin:2px auto 8px}
.sheet-title{text-align:center;font-size:13px;color:#667781;padding:4px 0 8px}
.action-sheet button{display:block;width:100%;border:0;border-bottom:1px solid #eef1f2;background:#fff;color:#111b21;text-align:left;padding:13px 9px;font-size:15px}
.action-sheet button:disabled{opacity:.35}
.action-sheet button.danger{color:#d9363e}
.action-sheet .sheet-cancel{margin-top:8px;border:0;border-radius:12px;background:#f0f2f5;text-align:center;font-weight:600}

/* 图片发送页在不同手机高度下自适应 */
.media-preview-screen{min-height:0}
.media-canvas{flex:1;height:auto;min-height:260px;max-height:none}
.media-send-row{min-height:78px;flex:none}

@media(max-width:700px){
  .app-shell.mobile-first{background:#fff}
  .mobile-first .preview-stage{padding:0;align-items:flex-start;background:#fff}
  .mobile-first .phone-frame{width:100vw;height:100dvh;min-height:620px;border-radius:0;box-shadow:none;transform:none;margin:0}
  .status-bar{padding-top:env(safe-area-inset-top);height:calc(33px + env(safe-area-inset-top))}
  .android-nav{padding-bottom:env(safe-area-inset-bottom);height:calc(31px + env(safe-area-inset-bottom))}
  .messages{padding-bottom:96px}
  .composer-wrap{bottom:calc(7px + env(safe-area-inset-bottom))}
  .image-bubble{width:min(292px,calc(100vw - 58px))}
  .image-media-wrap{height:min(290px,calc(100vw - 60px))}
}

@media(min-width:701px){
  .mobile-tools{right:calc(50% - 286px);bottom:42px}.mobile-tools.open{right:calc(50% - 250px)}
  .exit-preview{right:calc(50% - 255px);top:28px}
}


/* v4 高还原度：按最新版 Android WhatsApp 比例重构 */
:root{
  --wa-green:#00a884;
  --wa-send:#21c063;
  --wa-out:#d9fdd3;
  --wa-in:#ffffff;
  --wa-wall:#efeae2;
}
body,button,input,textarea,select{font-family:Roboto,"Noto Sans CJK TC","Noto Sans TC","PingFang TC","Microsoft JhengHei UI","Microsoft JhengHei",system-ui,sans-serif}
.phone-frame{width:393px;height:852px;border-radius:18px}
.status-bar{height:31px;padding:0 12px 0 18px;font-size:14px;letter-spacing:-.1px}
.status-time{font-size:14px;font-weight:500;line-height:1}
.status-right{gap:4px;color:#111820}
.status-silent{width:17px;height:17px;display:grid;place-items:center;margin-right:1px}
.status-silent svg{width:16px;height:16px;fill:#111820;stroke:#111820;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.dark-surface .status-silent svg{fill:#fff;stroke:#fff}
.volte{font-size:6.5px;line-height:6.7px;font-weight:700;letter-spacing:-.4px;margin-left:-1px}
.network{font-size:9px;font-weight:700;letter-spacing:-.3px;margin-left:1px}
.data-arrows{height:15px;display:flex;flex-direction:column;justify-content:center;line-height:6px;font-size:7px;font-weight:800;margin-left:-2px;margin-right:0}
.signal-bars{height:14px;gap:1.45px;margin-left:1px}
.signal-bars i{width:2.15px;border-radius:1px}
.signal-bars i:nth-child(1){height:4px}.signal-bars i:nth-child(2){height:7px}.signal-bars i:nth-child(3){height:10px}.signal-bars i:nth-child(4){height:14px}
.battery-text{font-size:12.5px;margin-left:2px;letter-spacing:-.25px}
.battery-icon{width:18px;height:9px;border:1.25px solid currentColor;border-radius:2px;padding:1px;display:flex;align-items:center;overflow:visible;margin-left:0}
.battery-icon:after{right:-2.8px;top:2px;width:2px;height:4px;border-radius:0 1px 1px 0}
.battery-icon i{height:100%!important;min-width:1px;background:currentColor;border-radius:.8px}

.chat-header{height:64px;padding:0 5px 0 2px;border-bottom:1px solid #f3f4f4}
.chat-header button{padding:0}
.chat-header svg{stroke-width:2.15}
.header-icon{width:43px;height:48px}.header-icon svg{width:28px;height:28px}
.contact-avatar{width:40px;height:40px}
.contact-info{margin-left:9px;padding-top:1px}
.contact-info strong{font-size:16.5px;line-height:20px;font-weight:500;letter-spacing:-.15px}
.contact-info span{font-size:11.3px;line-height:16px;color:#667781}
.header-actions{gap:17px;margin-left:8px;margin-right:3px}
.header-actions button{width:25px;height:42px}
.header-actions svg{width:23px;height:23px;stroke-width:2.15}
.more-dots{width:21px!important;height:38px!important;gap:2.6px!important}.more-dots i{width:3px;height:3px}

.chat-area{background:var(--wa-wall)}
.chat-area:before{
  background-image:url("../assets/whatsapp-doodle-latest.webp");
  background-repeat:repeat;
  background-size:410px 729px;
  background-position:center top;
  opacity:.18;
}
.day-label{border-radius:9px;padding:5px 10px 5.5px;font-size:11.2px;line-height:15px;color:#54656f;margin-top:8px;margin-bottom:6px;box-shadow:0 1px .5px rgba(11,20,26,.15)}
.messages{gap:1.5px;padding:0 8px 82px}
.message-row{min-height:0}
.message-row.group-start:not(:first-child),.message-row.group-single:not(:first-child){margin-top:5px}
.bubble{max-width:85%;box-shadow:0 1px .5px rgba(11,20,26,.13);font-size:14.25px;line-height:19.6px;letter-spacing:-.05px}
.text-bubble{min-width:66px;padding:6px 7px 6.5px 8.5px;border-radius:12px;white-space:pre-wrap}
.bubble.incoming,.bubble.outgoing{border-radius:12px}
.message-row.group-start .bubble.incoming,.message-row.group-middle .bubble.incoming,.message-row.group-end .bubble.incoming{border-top-left-radius:5px}
.message-row.group-start .bubble.outgoing,.message-row.group-middle .bubble.outgoing,.message-row.group-end .bubble.outgoing{border-top-right-radius:5px}
.message-row.group-start .bubble.incoming,.message-row.group-start .bubble.outgoing{border-bottom-left-radius:12px;border-bottom-right-radius:12px}
.message-row.group-middle .bubble.incoming{border-bottom-left-radius:5px}
.message-row.group-middle .bubble.outgoing{border-bottom-right-radius:5px}
.message-row.group-end .bubble.incoming{border-bottom-left-radius:12px}
.message-row.group-end .bubble.outgoing{border-bottom-right-radius:12px}
.message-row.group-single .bubble.incoming{border-top-left-radius:3px}
.message-row.group-single .bubble.outgoing{border-top-right-radius:3px}
.text-bubble.incoming:before,.image-bubble.incoming:before,.text-bubble.outgoing:after,.image-bubble.outgoing:after{display:none}
.message-row.group-single .text-bubble.incoming:before,.message-row.group-single .image-bubble.incoming:before,
.message-row.group-start .text-bubble.incoming:before,.message-row.group-start .image-bubble.incoming:before{display:block;content:"";position:absolute;left:-7px;top:0;width:10px;height:12px;background:#fff;clip-path:polygon(100% 0,100% 100%,0 0)}
.message-row.group-single .text-bubble.outgoing:after,.message-row.group-single .image-bubble.outgoing:after,
.message-row.group-start .text-bubble.outgoing:after,.message-row.group-start .image-bubble.outgoing:after{display:block;content:"";position:absolute;right:-7px;top:0;width:10px;height:12px;background:var(--wa-out);clip-path:polygon(0 0,100% 0,0 100%)}
.bubble-meta{gap:1px;margin-left:6px;margin-top:6px;font-size:10px;line-height:10px;height:10px;letter-spacing:-.15px}
.ticks{height:12px;min-width:17px}.ticks svg{width:17px;height:11px;stroke-width:1.75}
.ticks-blue{color:#53bdeb}

.image-bubble{width:284px;padding:3px 3px 19px;border-radius:15px;overflow:visible}
.message-row.group-start .image-bubble.incoming,.message-row.group-middle .image-bubble.incoming,.message-row.group-end .image-bubble.incoming{border-top-left-radius:6px}.message-row.group-start .image-bubble.outgoing,.message-row.group-middle .image-bubble.outgoing,.message-row.group-end .image-bubble.outgoing{border-top-right-radius:6px}.message-row.group-middle .image-bubble.incoming{border-bottom-left-radius:6px}.message-row.group-middle .image-bubble.outgoing{border-bottom-right-radius:6px}
.image-media-wrap{height:279px;border-radius:12px;overflow:hidden;background:#d8dcdd}
.message-image.fit-cover{object-fit:cover}.message-image.fit-contain{object-fit:contain;background:#111}
.image-caption{padding:7px 7px 1px;font-size:14.25px;line-height:19.5px;min-height:26px}
.image-bubble-meta{right:7px;bottom:4px;gap:1px;font-size:10px;line-height:11px;letter-spacing:-.15px}
.image-bubble:not(:has(.image-caption)) .image-bubble-meta{right:7px;bottom:7px;padding:2px 4px;border-radius:6px;background:rgba(17,27,33,.45)}

.composer-wrap{left:5px;right:5px;bottom:5px;gap:4px;align-items:center}
.composer{height:50px;border-radius:25px;padding:0 8px 0 5px;box-shadow:0 1px 2px rgba(11,20,26,.14)}
.composer button{height:42px}
.composer-emoji{width:38px}.composer-emoji svg{width:24px;height:24px;stroke-width:1.85}
.placeholder{font-size:15.2px;margin-left:1px;color:#667781;line-height:20px}
.composer-attach{width:34px;transform:rotate(-43deg)}.composer-attach svg{width:24px;height:24px;stroke-width:1.85}
.composer-camera{width:35px}.composer-camera svg{width:24px;height:24px;stroke-width:1.85}
.mic-button{width:50px;height:50px;border-radius:50%;background:#00a884;box-shadow:0 1px 2px rgba(11,20,26,.18)}
.mic-button svg{width:23px;height:23px;stroke-width:2}

.android-nav{height:31px;padding:0 47px;background:#fff;justify-content:space-between;color:#111820}
.nav-recent{width:17px;height:17px;display:flex;justify-content:space-between;align-items:center;transform:rotate(90deg)}
.nav-recent i{width:2px;height:16px;background:currentColor;border-radius:1px}
.home-circle{width:16px;height:16px;border:2px solid currentColor}
.android-back{width:20px;height:22px;display:grid;place-items:center}.android-back svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* 图片发送页 */
.media-toolbar{height:62px;padding:0 13px}.media-toolbar>button{width:38px}.media-toolbar>button svg{width:27px;height:27px;stroke-width:2.1}
.media-toolbar-actions{gap:22px}.media-toolbar-actions button{width:28px;height:38px}.media-toolbar-actions svg{width:24px;height:24px;stroke-width:2}.media-toolbar-actions .text-tool{font-size:27px}
.media-canvas{margin:6px 14px 0;border-radius:9px;min-height:250px;background:#f4f5f5}.media-canvas img{object-fit:contain}
.media-caption-row{height:54px;margin:14px 12px 0;border-radius:27px;padding:0 13px;gap:9px;background:#f0f2f5}
.media-caption-row textarea{font-size:15px;height:26px;line-height:26px}
.media-thumbnails{height:67px;padding:10px 13px}.thumb{width:47px;height:47px;border-width:3px;border-radius:11px}.thumb img{border-radius:6px}
.media-send-row{min-height:76px;padding:8px 18px 13px}.recipient-pill{padding:9px 14px;border-radius:21px;font-size:12.5px}.media-send-button{width:54px;height:54px;background:#21c063}

/* 编辑态提示更轻，不污染界面 */
.is-editing .direct-edit:focus{background:rgba(0,168,132,.08);box-shadow:0 0 0 1.5px rgba(0,168,132,.14)}
.toast{bottom:max(94px,calc(env(safe-area-inset-bottom) + 86px));font-size:11.5px;padding:8px 13px;background:rgba(17,27,33,.84)}

@media(max-width:700px){
  .messages{padding-bottom:89px}
  .composer-wrap{bottom:calc(5px + env(safe-area-inset-bottom))}
  .image-bubble{width:min(284px,calc(100vw - 54px))}
  .image-media-wrap{height:min(279px,calc(100vw - 60px))}
}

/* v8: 多图发送与拼图样式 */
.image-media-wrap.grid-wrap{display:block;background:#d8dcdd;padding:0}
.image-grid{width:100%;height:100%;display:grid;gap:2px;background:#fff}
.image-grid.count-2{grid-template-columns:1fr 1fr}
.image-grid.count-3{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.image-grid.count-3 .cell-1{grid-row:1 / span 2}
.image-grid.count-4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.image-grid .grid-cell{overflow:hidden;background:#d8dcdd}
.image-grid .grid-cell img{width:100%;height:100%;display:block;object-fit:cover}
.image-bubble.is-collage .image-media-wrap{height:282px}
.image-bubble .overlay-meta{color:#fff;background:rgba(17,27,33,.45);padding:2px 4px;border-radius:6px;text-shadow:0 1px 2px #000}
.media-thumbnails{display:flex;align-items:center;gap:8px;overflow-x:auto;overflow-y:hidden}
.media-thumbnails .thumb{flex:none;border-color:#d6dde0;background:#fff}
.media-thumbnails .thumb.active{border-color:var(--wa-green)}
.media-thumbnails .thumb.add-thumb{display:grid;place-items:center;color:#667781;font-size:26px;font-weight:400;border-style:dashed;background:#f7f8f8}
.media-thumbnails .thumb span{line-height:1}
.viewer-thumb-row{display:flex;gap:6px;padding:8px 12px 0;background:#101417;overflow-x:auto}
.viewer-thumb-row img{width:44px;height:44px;object-fit:cover;border-radius:7px;flex:none;border:1px solid rgba(255,255,255,.16)}
@media(max-width:700px){
  .image-bubble.is-collage .image-media-wrap{height:min(279px,calc(100vw - 60px))}
}

/* v9: 响应式布局与键盘稳定性优化 */
:root{
  --vvw:100vw;
  --vvh:100dvh;
}
html,body,#app{width:100%;min-height:100%;height:auto;overflow:hidden}
.app-shell.mobile-first,
.mobile-first .preview-stage{min-height:var(--vvh);height:var(--vvh)}
.mobile-first .preview-stage{padding:max(0px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(0px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));background:#eef2f4}
.mobile-first .phone-frame{max-width:100vw;max-height:var(--vvh)}
.contact-info strong,
.contact-info span,
.placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tool-menu button b{max-width:110px;overflow:hidden;text-overflow:ellipsis}
.keyboard-open .mobile-first .preview-stage{align-items:flex-start}
.keyboard-open .mobile-first .phone-frame{height:var(--vvh)!important;max-height:var(--vvh)!important}
.keyboard-open .messages{padding-bottom:78px!important}
.keyboard-open .composer-wrap{bottom:max(4px,env(safe-area-inset-bottom))!important}
.keyboard-open .toast{display:none}

@media (max-width:700px){
  .mobile-first .preview-stage{width:100vw}
  .mobile-first .phone-frame{width:100vw;height:var(--vvh);min-height:0}
}

@media (max-width:380px){
  .status-bar{padding:0 9px 0 14px}
  .chat-header{height:60px;padding:0 3px 0 1px}
  .contact-avatar{width:36px;height:36px}
  .contact-info{margin-left:7px}
  .contact-info strong{font-size:15.2px;line-height:18px}
  .contact-info span{font-size:10.4px;line-height:14px}
  .header-actions{gap:11px;margin-left:5px;margin-right:1px}
  .header-actions button{width:22px;height:38px}
  .header-actions svg{width:20px;height:20px}
  .messages{padding:0 6px 84px}
  .bubble{max-width:88%;font-size:13.8px;line-height:19px}
  .composer{height:47px}
  .composer-emoji svg,.composer-attach svg,.composer-camera svg{width:22px;height:22px}
  .mic-button{width:47px;height:47px}
  .image-bubble{width:min(272px,calc(100vw - 46px))}
  .image-media-wrap,.image-bubble.is-collage .image-media-wrap{height:min(267px,calc(100vw - 54px))}
}

@media (min-width:701px) and (max-width:1024px){
  .mobile-first .preview-stage{padding:18px;background:linear-gradient(180deg,#eef2f4,#e6ebee)}
  .mobile-first .phone-frame{width:min(430px,calc(100vw - 36px));height:min(900px,var(--vvh) - 20px);border-radius:20px;box-shadow:0 18px 52px rgba(17,27,33,.16)}
  .mobile-tools{right:calc(50% - min(430px,calc(100vw - 36px))/2 - 20px)}
}

@media (max-width:950px) and (orientation:landscape){
  .mobile-first .preview-stage{padding:0;background:#dfe6e8;align-items:center;justify-content:center}
  .mobile-first .phone-frame{width:min(420px,42vw);height:var(--vvh);border-radius:0;box-shadow:none}
  .status-bar{height:28px;font-size:13px}
  .chat-header{height:56px}
  .contact-avatar{width:34px;height:34px}
  .contact-info strong{font-size:14.5px;line-height:17px}
  .contact-info span{font-size:10px;line-height:13px}
  .day-label{margin-top:5px;margin-bottom:4px;padding:4px 9px}
  .messages{padding:0 6px 72px}
  .bubble{font-size:13.4px;line-height:18px}
  .image-bubble{width:min(240px,34vw)}
  .image-media-wrap,.image-bubble.is-collage .image-media-wrap{height:min(235px,34vw)}
  .composer-wrap{left:4px;right:4px;bottom:4px}
  .composer{height:42px}
  .composer button{height:36px}
  .placeholder{font-size:14px}
  .mic-button{width:42px;height:42px}
  .android-nav{height:27px}
  .media-toolbar{height:52px}
  .media-canvas{margin:4px 12px 0;min-height:160px}
  .media-caption-row{height:46px;margin:10px 10px 0}
  .media-thumbnails{height:58px;padding:7px 10px}
  .media-send-row{min-height:56px;padding:6px 14px 10px}
}

/* v10: 编辑稳定、多图单独替换、导出按比例裁切配套样式 */
.editing-inline .messages{scroll-behavior:auto;overscroll-behavior:contain}
.editing-inline .direct-edit.editing-now{background:rgba(0,168,132,.06);box-shadow:0 0 0 1.5px rgba(0,168,132,.14)}
.image-grid .grid-cell{cursor:pointer;position:relative}
.image-grid .grid-cell::after{content:"";position:absolute;inset:0;pointer-events:none}
.keyboard-open.editing-inline .tool-menu{display:none}

/* v11: 多图查看切换与沉浸式全屏 */
.image-viewer-screen{position:relative}
.viewer-canvas{position:relative;touch-action:pan-y;user-select:none}
.viewer-arrow{position:absolute;top:50%;z-index:3;width:40px;height:40px;margin-top:-20px;border:0;border-radius:50%;background:rgba(17,20,23,.5);color:#fff;display:grid;place-items:center;backdrop-filter:blur(5px)}
.viewer-arrow svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.viewer-prev{left:10px}
.viewer-next{right:10px}
.viewer-thumb-row{display:flex;gap:7px;padding:8px 12px 10px;background:#101417;overflow-x:auto;scrollbar-width:none}
.viewer-thumb-row::-webkit-scrollbar{display:none}
.viewer-thumb{width:48px;height:48px;flex:none;border:2px solid transparent;border-radius:9px;background:transparent;padding:1px;opacity:.64}
.viewer-thumb.active{border-color:#25d366;opacity:1}
.viewer-thumb img{width:100%;height:100%;display:block;object-fit:cover;border-radius:6px;border:0}

html:fullscreen,html:fullscreen body,html:fullscreen #app{width:100%;height:100%;background:#000}
html:fullscreen .mobile-first .preview-stage{height:100vh;min-height:100vh;padding:0;background:#000}
html:fullscreen .mobile-first .phone-frame{width:100vw;height:100vh;max-width:none;max-height:none;border-radius:0;box-shadow:none}
.standalone-mode .mobile-first .preview-stage,.native-immersive .mobile-first .preview-stage{padding:0;background:#000}
.standalone-mode .mobile-first .phone-frame,.native-immersive .mobile-first .phone-frame{width:100vw;height:var(--vvh);max-width:none;max-height:none;border-radius:0;box-shadow:none}
.native-status-visible .status-bar{display:none}
.native-status-visible .chat-header{border-top:0}

@media(max-width:700px){
  .viewer-arrow{width:36px;height:36px;margin-top:-18px}
  .viewer-prev{left:7px}.viewer-next{right:7px}
}

/* v12：真正的响应式布局。桌面等比例缩放，手机使用真实可视区。 */
:root{
  --phone-scale:1;
  --phone-display-width:393px;
  --phone-display-height:852px;
}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
html,body,#app{
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.app-shell.mobile-first{
  width:100%;
  height:var(--vvh,100dvh);
  min-height:0;
}
.mobile-first .preview-stage{
  width:100%;
  height:var(--vvh,100dvh);
  min-height:0!important;
  padding:0!important;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  background:#eef2f4;
}
.phone-stage-shell{
  width:var(--phone-display-width);
  height:var(--phone-display-height);
  flex:0 0 auto;
  position:relative;
  overflow:visible;
}
.phone-stage-shell>.phone-frame{
  position:absolute!important;
  inset:0 auto auto 0!important;
  width:393px!important;
  height:852px!important;
  max-width:none!important;
  max-height:none!important;
  min-height:0!important;
  margin:0!important;
  transform:scale(var(--phone-scale))!important;
  transform-origin:top left!important;
}
.chat-area{
  min-height:0!important;
  overflow:hidden!important;
}
.day-label{
  flex:0 0 auto;
}
.messages{
  flex:1 1 auto!important;
  min-height:0!important;
  height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  position:relative;
  overscroll-behavior:contain;
}
.message-row{
  flex:0 0 auto!important;
  min-width:0;
}
.bubble{
  flex:0 0 auto;
  min-height:max-content;
}
.bubble-text,.image-caption,.contact-info strong,.contact-info span,.placeholder{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
.composer-wrap{
  flex:0 0 auto;
}

/* 桌面与平板：按钮跟着手机框走，不再压住输入栏。 */
.layout-desktop .mobile-tools{
  position:absolute!important;
  left:calc(50% + (var(--phone-display-width) / 2) - 18px)!important;
  right:auto!important;
  bottom:calc((100% - var(--phone-display-height)) / 2 + 18px)!important;
}
.layout-desktop .mobile-tools.open{
  left:calc(50% + (var(--phone-display-width) / 2) + 8px)!important;
  right:auto!important;
}
.layout-desktop .exit-preview{
  position:absolute!important;
  left:calc(50% + (var(--phone-display-width) / 2) - 8px)!important;
  right:auto!important;
  top:calc((100% - var(--phone-display-height)) / 2 + 10px)!important;
}

/* 手机：真正铺满屏幕，不进行宽高分别拉伸。 */
.layout-mobile .phone-stage-shell{
  width:100vw!important;
  height:var(--vvh,100dvh)!important;
}
.layout-mobile .phone-stage-shell>.phone-frame{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  border-radius:0!important;
  box-shadow:none!important;
  transform:none!important;
}
.layout-mobile .mobile-tools{
  position:fixed!important;
  left:auto!important;
  right:-18px!important;
  bottom:max(56px,calc(env(safe-area-inset-bottom) + 46px))!important;
}
.layout-mobile .mobile-tools.open{
  left:auto!important;
  right:max(10px,env(safe-area-inset-right))!important;
}
.layout-mobile .exit-preview{
  position:fixed!important;
  left:auto!important;
  right:max(10px,env(safe-area-inset-right))!important;
  top:max(10px,env(safe-area-inset-top))!important;
}
.layout-mobile .status-bar{
  padding-top:env(safe-area-inset-top);
  height:calc(31px + env(safe-area-inset-top));
}
.layout-mobile .android-nav{
  padding-bottom:env(safe-area-inset-bottom);
  height:calc(31px + env(safe-area-inset-bottom));
}
.layout-mobile .composer-wrap{
  bottom:calc(5px + env(safe-area-inset-bottom))!important;
}
.layout-mobile .messages{
  padding-bottom:89px!important;
}

/* 手机横屏仍全屏，但缩短固定区域，把空间留给消息。 */
.layout-mobile.is-landscape-mobile .chat-header{
  height:54px!important;
}
.layout-mobile.is-landscape-mobile .status-bar{
  height:calc(27px + env(safe-area-inset-top))!important;
}
.layout-mobile.is-landscape-mobile .android-nav{
  height:calc(27px + env(safe-area-inset-bottom))!important;
}
.layout-mobile.is-landscape-mobile .contact-avatar{
  width:34px!important;
  height:34px!important;
}
.layout-mobile.is-landscape-mobile .messages{
  padding-bottom:72px!important;
}
.layout-mobile.is-landscape-mobile .composer,
.layout-mobile.is-landscape-mobile .mic-button{
  height:43px!important;
}
.layout-mobile.is-landscape-mobile .mic-button{
  width:43px!important;
}
.layout-mobile.is-landscape-mobile .image-bubble{
  width:min(286px,45vw)!important;
}
.layout-mobile.is-landscape-mobile .image-media-wrap,
.layout-mobile.is-landscape-mobile .image-bubble.is-collage .image-media-wrap{
  height:min(240px,35vh)!important;
}

/* 极窄屏：保证顶部按钮和输入栏不挤爆。 */
@media(max-width:360px){
  .layout-mobile .header-actions{gap:8px!important;margin-left:3px!important}
  .layout-mobile .header-actions button{width:21px!important}
  .layout-mobile .contact-avatar{width:35px!important;height:35px!important}
  .layout-mobile .contact-info{margin-left:6px!important}
  .layout-mobile .contact-info strong{font-size:14.8px!important}
  .layout-mobile .contact-info span{font-size:10px!important}
  .layout-mobile .composer-attach{width:30px!important}
  .layout-mobile .composer-camera{width:31px!important}
  .layout-mobile .image-bubble{width:min(272px,calc(100vw - 44px))!important}
}

/* v12.1：修正旧媒体查询残留的顶部边框，并让手机工具键避开麦克风。 */
.mobile-first .preview-stage{border:0!important}
.layout-mobile .mobile-tools{
  bottom:max(112px,calc(env(safe-area-inset-bottom) + 100px))!important;
}
.layout-mobile .edit-fab{
  width:48px!important;
  height:48px!important;
}
.layout-mobile .edit-fab svg{
  width:21px!important;
  height:21px!important;
}

/* v13：WhatsApp Web 电脑端独立布局 */
.app-shell.desktop-first{display:block;width:100%;height:100dvh;min-height:620px;background:#e9edef;overflow:hidden}
.desktop-stage{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:18px;background:linear-gradient(180deg,#00a884 0 126px,#e9edef 126px 100%);position:relative;overflow:hidden}
.desktop-app{position:relative;width:min(1600px,calc(100vw - 36px));height:min(960px,calc(100vh - 36px));min-width:960px;min-height:600px;display:grid;grid-template-columns:64px clamp(310px,25vw,390px) minmax(0,1fr);background:#fff;border-radius:4px;overflow:hidden;box-shadow:0 8px 32px rgba(11,20,26,.18)}
.desktop-app button{font:inherit}
.desktop-nav{background:#f0f2f5;border-right:1px solid #dfe3e5;display:flex;flex-direction:column;align-items:center;padding:12px 0 10px;z-index:4}
.desktop-wa-logo{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#25d366;margin:0 0 18px}
.desktop-wa-logo svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.desktop-nav nav{display:flex;flex-direction:column;gap:8px;width:100%;align-items:center}
.desktop-nav button{width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:#54656f;display:grid;place-items:center;position:relative}
.desktop-nav button:hover,.desktop-nav button.active{background:#dfe3e5;color:#111b21}
.desktop-nav button.active:before{content:"";position:absolute;left:-10px;width:4px;height:24px;border-radius:0 4px 4px 0;background:#00a884}
.desktop-nav button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-nav-bottom{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:7px}
.desktop-nav-bottom img{width:34px;height:34px;border-radius:50%;object-fit:cover;margin-top:4px}

.desktop-chat-list{min-width:0;background:#fff;border-right:1px solid #dfe3e5;display:flex;flex-direction:column;z-index:3}
.desktop-list-top{height:58px;background:#f0f2f5;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #e3e6e8}
.desktop-list-top>img{width:38px;height:38px;border-radius:50%;object-fit:cover}
.desktop-list-top>div{display:flex;align-items:center;gap:10px}
.desktop-list-top button,.desktop-list-heading button{border:0;background:transparent;color:#54656f;width:36px;height:36px;border-radius:50%;display:grid;place-items:center}
.desktop-list-top button:hover,.desktop-list-heading button:hover{background:#e2e6e8}
.desktop-list-top svg,.desktop-list-heading svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-list-top .more-dots{display:flex;flex-direction:column;gap:2.5px}
.desktop-list-top .more-dots i{display:block;width:3px;height:3px;border-radius:50%;background:currentColor}
.desktop-list-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px}
.desktop-list-heading h1{font-size:22px;line-height:28px;margin:0;font-weight:600;letter-spacing:-.3px}
.desktop-search{height:38px;margin:0 12px 8px;border-radius:8px;background:#f0f2f5;display:flex;align-items:center;padding:0 12px;gap:10px;color:#667781}
.desktop-search svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-search input{border:0;outline:0;background:transparent;min-width:0;flex:1;font-size:13.5px;color:#111b21}
.desktop-filters{display:flex;gap:7px;padding:0 12px 10px;overflow-x:auto;scrollbar-width:none}
.desktop-filters::-webkit-scrollbar{display:none}
.desktop-filters button{height:31px;border:0;border-radius:16px;background:#f0f2f5;color:#54656f;padding:0 13px;font-size:12.5px;white-space:nowrap}
.desktop-filters button.active{background:#d9fdd3;color:#008069}
.desktop-chat-rows{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c5cdd1 transparent}
.desktop-chat-row{height:74px;display:flex;align-items:center;gap:12px;padding:0 12px;cursor:default;position:relative}
.desktop-chat-row:after{content:"";position:absolute;left:74px;right:0;bottom:0;height:1px;background:#eef0f1}
.desktop-chat-row:hover,.desktop-chat-row.active{background:#f0f2f5}
.desktop-chat-row>img,.fake-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;flex:none}
.fake-avatar{display:grid;place-items:center;color:#fff;font-weight:600;font-size:16px}
.fake-avatar.teal{background:linear-gradient(135deg,#35b7a1,#0b7c6b)}
.fake-avatar.violet{background:linear-gradient(135deg,#9a83d4,#684aad)}
.fake-avatar.amber{background:linear-gradient(135deg,#f1b258,#d47a18)}
.fake-avatar.blue{background:linear-gradient(135deg,#70a9e8,#356fbd)}
.desktop-chat-row-main{min-width:0;flex:1}
.desktop-chat-row-main>div{display:flex;align-items:center;gap:8px}
.desktop-chat-row-main strong{min-width:0;flex:1;font-size:15px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-chat-row-main time{font-size:10.5px;color:#667781;white-space:nowrap}
.desktop-chat-row-main p{margin:5px 0 0;font-size:12.5px;color:#667781;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.desktop-main-chat{min-width:0;display:flex;flex-direction:column;background:#efeae2}
.desktop-chat-header{height:58px;flex:none;display:flex;align-items:center;padding:0 16px;background:#f0f2f5;border-bottom:1px solid #dfe3e5;z-index:3}
.desktop-chat-header .contact-avatar{width:38px;height:38px}
.desktop-chat-header .contact-info{margin-left:11px}
.desktop-chat-header .contact-info strong{font-size:15.5px;line-height:19px}
.desktop-chat-header .contact-info span{font-size:11px;line-height:15px}
.desktop-header-actions{display:flex;align-items:center;gap:13px;margin-left:auto;color:#54656f}
.desktop-header-actions button{border:0;background:transparent;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:inherit}
.desktop-header-actions button:hover{background:#dfe3e5}
.desktop-header-actions svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-header-actions .more-dots{display:flex;flex-direction:column;gap:2.5px}
.desktop-header-actions .more-dots i{display:block;width:3px;height:3px;border-radius:50%;background:currentColor}
.desktop-chat-wall{position:relative;min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;background:#efeae2}
.desktop-chat-wall:before{content:"";position:absolute;inset:0;background-image:url("../assets/whatsapp-doodle-latest.webp");background-size:410px 729px;background-repeat:repeat;background-position:center top;opacity:.18;pointer-events:none}
.desktop-chat-wall>.day-label{position:relative;z-index:1;align-self:center;margin:12px 0 7px}
.desktop-app .messages{position:relative;z-index:1;flex:1;min-height:0;width:100%;padding:0 clamp(34px,7vw,108px) 18px;gap:2px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(84,101,111,.28) transparent}
.desktop-app .message-row.group-start:not(:first-child),.desktop-app .message-row.group-single:not(:first-child){margin-top:6px}
.desktop-app .bubble{max-width:68%;font-size:14px;line-height:19px}
.desktop-app .image-bubble{width:min(360px,55vw)}
.desktop-app .image-media-wrap{height:330px}
.desktop-app .image-bubble.is-collage .image-media-wrap{height:330px}
.desktop-composer-wrap{position:relative;z-index:2;flex:none;min-height:60px;background:#f0f2f5;display:flex;align-items:center;gap:10px;padding:8px 14px}
.desktop-composer-wrap>button{border:0;background:transparent;color:#54656f;width:34px;height:38px;display:grid;place-items:center}
.desktop-composer-wrap svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-attach{transform:rotate(-43deg)}
.desktop-input{height:40px;min-width:0;flex:1;display:flex;align-items:center;border-radius:8px;background:#fff;color:#667781;padding:0 13px;font-size:14px;outline:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-input:focus{color:#111b21}

.desktop-editor-rail{position:absolute;right:12px;top:76px;z-index:20;display:flex;flex-direction:column;gap:6px;padding:7px;border-radius:14px;background:rgba(255,255,255,.94);box-shadow:0 8px 28px rgba(11,20,26,.18);backdrop-filter:blur(12px)}
.desktop-editor-rail button{width:42px;height:42px;border:0;border-radius:10px;background:transparent;color:#54656f;display:grid;place-items:center;position:relative}
.desktop-editor-rail button:hover{background:#e7f7f2;color:#008069}
.desktop-editor-rail svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-editor-rail button span{position:absolute;right:50px;top:50%;transform:translateY(-50%);display:none;background:#111b21;color:#fff;padding:5px 8px;border-radius:6px;font-size:11px;white-space:nowrap}
.desktop-editor-rail button:hover span{display:block}
.desktop-exit-preview{position:absolute;right:18px;top:72px;z-index:25;border:0;border-radius:20px;background:rgba(17,27,33,.78);color:#fff;padding:8px 13px;box-shadow:0 4px 16px rgba(0,0,0,.2)}
.desktop-toast{bottom:34px}

.desktop-modal-backdrop{position:absolute;inset:0;z-index:80;background:rgba(17,27,33,.62);display:flex;align-items:center;justify-content:center;padding:28px}
.desktop-media-dialog{width:min(1060px,92%);height:min(720px,88%);min-height:520px;background:#fff;border-radius:10px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 70px rgba(0,0,0,.3)}
.desktop-modal-header{height:58px;flex:none;display:flex;align-items:center;padding:0 16px;border-bottom:1px solid #e5e8ea;background:#f7f9fa}
.desktop-modal-header>button,.desktop-modal-tools button{border:0;background:transparent;color:#54656f;width:36px;height:36px;display:grid;place-items:center}
.desktop-modal-header svg,.desktop-modal-tools svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-modal-header strong{font-size:16px;margin-left:8px}
.desktop-modal-tools{margin-left:auto;display:flex;gap:12px}
.desktop-modal-tools .text-tool{font-size:24px}
.desktop-media-content{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 300px;background:#111b21}
.desktop-media-canvas{min-width:0;min-height:0;display:grid;place-items:center;padding:20px;background:#111}
.desktop-media-canvas img{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}
.desktop-media-side{background:#fff;display:flex;flex-direction:column;padding:18px;gap:16px}
.desktop-media-thumbs{display:flex;gap:10px;flex-wrap:wrap}
.desktop-media-thumbs .thumb{width:58px;height:58px;border-radius:9px;border:2px solid #d9e0e3;background:#fff;padding:2px;position:relative}
.desktop-media-thumbs .thumb.active{border-color:#00a884}
.desktop-media-thumbs .thumb img{width:100%;height:100%;border-radius:5px;object-fit:cover}
.desktop-media-thumbs .thumb span{position:absolute;right:-7px;top:-7px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);display:grid;place-items:center}
.desktop-media-thumbs .add-thumb{display:grid;place-items:center;font-size:24px;border-style:dashed;color:#667781}
.desktop-caption-box{display:grid;grid-template-columns:28px 1fr 34px;align-items:start;gap:8px;border:1px solid #d9e0e3;border-radius:10px;padding:9px}
.desktop-caption-box>span svg,.desktop-caption-box button svg{width:21px;height:21px;fill:none;stroke:#667781;stroke-width:1.8}
.desktop-caption-box textarea{border:0;outline:0;resize:none;font-size:13.5px;line-height:19px;min-height:70px}
.desktop-caption-box button{border:0;background:transparent}
.desktop-send-target{margin-top:auto;display:flex;align-items:center;justify-content:space-between;padding-top:14px;border-top:1px solid #e5e8ea}
.desktop-send-target>span{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:500}
.desktop-send-target img{width:30px;height:30px;border-radius:50%;object-fit:cover}
.desktop-send-button{width:50px;height:50px;border:0;border-radius:50%;background:#00a884;color:#fff;display:grid;place-items:center}
.desktop-send-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.desktop-viewer-overlay{position:absolute;inset:0;z-index:90;background:#0b0e10;color:#fff;display:flex;flex-direction:column}
.desktop-viewer-header{height:62px;flex:none;display:flex;align-items:center;padding:0 18px;background:#11171a;border-bottom:1px solid rgba(255,255,255,.08)}
.desktop-viewer-header>button,.desktop-viewer-actions button{border:0;background:transparent;color:#fff;width:38px;height:38px;display:grid;place-items:center}
.desktop-viewer-header svg,.desktop-viewer-actions svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.desktop-viewer-header>img{width:36px;height:36px;border-radius:50%;object-fit:cover;margin-left:8px}
.desktop-viewer-header>div:not(.desktop-viewer-actions){margin-left:10px;display:flex;flex-direction:column}
.desktop-viewer-header strong{font-size:14px}.desktop-viewer-header span{font-size:11px;color:#aebac1;margin-top:2px}
.desktop-viewer-actions{margin-left:auto;display:flex;gap:10px}
.desktop-viewer-canvas{flex:1;min-height:0;position:relative;display:grid;place-items:center;padding:18px 70px}
.desktop-viewer-canvas>img{max-width:100%;max-height:100%;object-fit:contain}
.desktop-viewer-canvas .viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center}
.desktop-viewer-canvas .viewer-prev{left:18px}.desktop-viewer-canvas .viewer-next{right:18px}
.desktop-viewer-canvas .viewer-arrow svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.desktop-viewer-thumbs{height:64px;display:flex;justify-content:center;gap:8px;padding:7px;background:#11171a}
.desktop-viewer-thumbs .viewer-thumb{width:50px;height:50px;border:2px solid transparent;border-radius:7px;padding:2px;background:transparent}
.desktop-viewer-thumbs .viewer-thumb.active{border-color:#00a884}
.desktop-viewer-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.desktop-viewer-caption{padding:10px 18px 14px;text-align:center;background:#11171a;font-size:13px;color:#e9edef}

.desktop-app.export-clean{border-radius:0;box-shadow:none}
.desktop-app.export-clean .desktop-editor-rail,.desktop-app.export-clean .desktop-exit-preview{display:none!important}

@media (min-width:1024px) and (max-width:1200px){
  .desktop-stage{padding:10px}
  .desktop-app{width:calc(100vw - 20px);height:calc(100vh - 20px);grid-template-columns:58px 300px minmax(0,1fr)}
  .desktop-app .messages{padding-left:34px;padding-right:50px}
  .desktop-editor-rail{right:8px}
  .desktop-chat-row{padding-left:9px;padding-right:9px}
  .desktop-chat-row>img,.fake-avatar{width:44px;height:44px}
}

@media (min-width:1600px){
  .desktop-app{grid-template-columns:68px 390px minmax(0,1fr)}
  .desktop-app .bubble{max-width:62%}
  .desktop-app .image-bubble{width:380px}
  .desktop-app .image-media-wrap,.desktop-app .image-bubble.is-collage .image-media-wrap{height:350px}
}

/* v14：继续抠手机端还原度，不影响 WhatsApp Web 电脑端 */
.layout-mobile .status-bar{
  position:relative;
  height:calc(29px + env(safe-area-inset-top))!important;
  padding-left:15px!important;
  padding-right:11px!important;
}
.layout-mobile .status-bar::before{
  content:"";
  position:absolute;
  left:50%;
  top:calc(env(safe-area-inset-top) + 5px);
  width:7px;
  height:7px;
  border-radius:50%;
  background:#0b0f12;
  box-shadow:0 0 0 1px rgba(255,255,255,.22);
  transform:translateX(-50%);
  z-index:2;
  pointer-events:none;
}
.layout-mobile .status-time{font-size:13.4px!important;font-weight:500!important}
.layout-mobile .status-right{gap:3.5px!important}
.layout-mobile .status-silent{width:15px!important;height:15px!important}
.layout-mobile .status-silent svg{width:14px!important;height:14px!important}
.layout-mobile .network{font-size:8.5px!important}
.layout-mobile .signal-bars{height:13px!important}
.layout-mobile .battery-text{font-size:11.8px!important}
.layout-mobile .battery-icon{width:17px!important;height:8px!important}

.layout-mobile .chat-header{
  height:58px!important;
  padding:0 4px 0 1px!important;
  border-bottom-color:#f0f2f3!important;
}
.layout-mobile .header-icon{width:39px!important;height:44px!important}
.layout-mobile .header-icon svg{width:25px!important;height:25px!important;stroke-width:2!important}
.layout-mobile .contact-avatar{width:37px!important;height:37px!important;outline-width:1px!important;outline-offset:1px!important}
.layout-mobile .contact-info{margin-left:8px!important;padding-top:0!important}
.layout-mobile .contact-info strong{font-size:15.7px!important;line-height:18.5px!important;letter-spacing:-.1px!important}
.layout-mobile .contact-info span{font-size:10.6px!important;line-height:14px!important}
.layout-mobile .header-actions{gap:13px!important;margin-left:6px!important;margin-right:2px!important}
.layout-mobile .header-actions button{width:23px!important;height:38px!important}
.layout-mobile .header-actions svg{width:21px!important;height:21px!important;stroke-width:2!important}
.layout-mobile .more-dots{width:18px!important;height:34px!important;gap:2.3px!important}
.layout-mobile .more-dots i{width:2.6px!important;height:2.6px!important}

.layout-mobile .day-label{
  margin-top:7px!important;
  margin-bottom:5px!important;
  padding:4px 9px 4.5px!important;
  border-radius:8px!important;
  font-size:10.8px!important;
}
.layout-mobile .messages{gap:1px!important;padding-left:7px!important;padding-right:7px!important;padding-bottom:80px!important}
.layout-mobile .message-row.group-start:not(:first-child),
.layout-mobile .message-row.group-single:not(:first-child){margin-top:4px!important}
.layout-mobile .bubble{
  max-width:86%!important;
  font-size:14.15px!important;
  line-height:19.5px!important;
  border-radius:15px!important;
  box-shadow:0 1px .45px rgba(11,20,26,.12)!important;
}
.layout-mobile .text-bubble{
  min-width:64px!important;
  padding:7px 8px 7px 9px!important;
  border-radius:15px!important;
}
.layout-mobile .message-row.group-start .bubble.incoming,
.layout-mobile .message-row.group-middle .bubble.incoming,
.layout-mobile .message-row.group-end .bubble.incoming{border-top-left-radius:5px!important}
.layout-mobile .message-row.group-start .bubble.outgoing,
.layout-mobile .message-row.group-middle .bubble.outgoing,
.layout-mobile .message-row.group-end .bubble.outgoing{border-top-right-radius:5px!important}
.layout-mobile .message-row.group-middle .bubble.incoming{border-bottom-left-radius:5px!important}
.layout-mobile .message-row.group-middle .bubble.outgoing{border-bottom-right-radius:5px!important}
.layout-mobile .message-row.group-single .bubble.incoming{border-top-left-radius:3px!important}
.layout-mobile .message-row.group-single .bubble.outgoing{border-top-right-radius:3px!important}
.layout-mobile .bubble-meta{font-size:9.7px!important;margin-top:6px!important;margin-left:5px!important}
.layout-mobile .ticks svg{width:16px!important;height:10px!important;stroke-width:1.65!important}

.layout-mobile .image-bubble{
  width:min(282px,calc(100vw - 54px))!important;
  padding:2px 2px 18px!important;
  border-radius:14px!important;
}
.layout-mobile .image-media-wrap,
.layout-mobile .image-bubble.is-collage .image-media-wrap{
  height:min(276px,calc(100vw - 61px))!important;
  border-radius:12px!important;
  position:relative;
}
.layout-mobile .image-caption{
  padding:6px 7px 0!important;
  min-height:25px!important;
  font-size:14.1px!important;
  line-height:19px!important;
}
.layout-mobile .image-bubble-meta{
  right:6px!important;
  bottom:4px!important;
  font-size:9.7px!important;
}
.layout-mobile .image-bubble:not(:has(.image-caption)) .image-media-wrap::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:48px;
  background:linear-gradient(to top,rgba(0,0,0,.45),rgba(0,0,0,0));
  pointer-events:none;
}
.layout-mobile .image-bubble:not(:has(.image-caption)) .image-bubble-meta,
.layout-mobile .image-bubble .overlay-meta{
  background:transparent!important;
  padding:0!important;
  border-radius:0!important;
  text-shadow:0 1px 2px rgba(0,0,0,.85)!important;
  color:#fff!important;
}

.layout-mobile .composer-wrap{
  left:4px!important;
  right:4px!important;
  bottom:calc(4px + env(safe-area-inset-bottom))!important;
  gap:4px!important;
}
.layout-mobile .composer{
  height:45px!important;
  min-height:45px!important;
  border-radius:23px!important;
  padding:0 7px 0 4px!important;
}
.layout-mobile .composer button{height:38px!important}
.layout-mobile .composer-emoji{width:35px!important}
.layout-mobile .composer-emoji svg{width:22px!important;height:22px!important}
.layout-mobile .placeholder{font-size:14.5px!important;line-height:19px!important}
.layout-mobile .composer-attach{width:31px!important}
.layout-mobile .composer-camera{width:32px!important}
.layout-mobile .composer-attach svg,
.layout-mobile .composer-camera svg{width:21.5px!important;height:21.5px!important;stroke-width:1.8!important}
.layout-mobile .mic-button{
  width:45px!important;
  height:45px!important;
  min-width:45px!important;
  min-height:45px!important;
  background:#00a884!important;
}
.layout-mobile .mic-button svg{width:21px!important;height:21px!important;stroke-width:1.95!important}

/* 默认采用更接近近期 Android 截图的手势导航条。 */
.layout-mobile .android-nav.gesture-nav{
  height:calc(23px + env(safe-area-inset-bottom))!important;
  min-height:23px!important;
  padding:0 0 env(safe-area-inset-bottom)!important;
  justify-content:center!important;
  align-items:center!important;
}
.layout-mobile .gesture-pill{
  display:block;
  width:104px;
  height:4px;
  border-radius:99px;
  background:#1b2023;
}
.layout-mobile .dark-nav .gesture-pill{background:#f3f5f6}

/* 编辑入口改成边缘小标签，打开后才恢复完整按钮。 */
.layout-mobile .mobile-tools{
  right:-5px!important;
  bottom:max(80px,calc(env(safe-area-inset-bottom) + 68px))!important;
}
.layout-mobile .mobile-tools:not(.open) .edit-fab{
  width:24px!important;
  height:48px!important;
  min-width:24px!important;
  border-radius:24px 0 0 24px!important;
  box-shadow:0 5px 16px rgba(0,0,0,.18)!important;
}
.layout-mobile .mobile-tools:not(.open) .edit-fab svg{
  width:13px!important;
  height:13px!important;
  transform:translateX(-1px);
}
.layout-mobile .mobile-tools.open{right:max(8px,env(safe-area-inset-right))!important}
.layout-mobile .mobile-tools.open .edit-fab{
  width:48px!important;
  height:48px!important;
  border-radius:50%!important;
}

@media(max-width:360px){
  .layout-mobile .chat-header{height:56px!important}
  .layout-mobile .contact-avatar{width:35px!important;height:35px!important}
  .layout-mobile .header-actions{gap:9px!important}
  .layout-mobile .composer{height:43px!important;min-height:43px!important}
  .layout-mobile .mic-button{width:43px!important;height:43px!important;min-width:43px!important;min-height:43px!important}
  .layout-mobile .messages{padding-bottom:76px!important}
}


/* v15：继续完善手机端高还原 */
.layout-mobile .status-bar{
  height:calc(28px + env(safe-area-inset-top))!important;
  padding-left:14px!important;
  padding-right:10px!important;
}
.layout-mobile .status-bar::before{
  top:calc(env(safe-area-inset-top) + 4px)!important;
  width:60px!important;
  height:15px!important;
  border-radius:0 0 12px 12px!important;
  background:#0b0f12!important;
  box-shadow:none!important;
}
.layout-mobile .status-time{font-size:13px!important;letter-spacing:-.1px!important}
.layout-mobile .status-right{gap:2.8px!important}
.layout-mobile .status-silent{width:13px!important;height:13px!important}
.layout-mobile .status-silent svg{width:13px!important;height:13px!important}
.layout-mobile .network{font-size:8.1px!important;letter-spacing:-.05px!important}
.layout-mobile .battery-text{font-size:11.4px!important}
.layout-mobile .battery-icon{width:16px!important;height:8px!important}
.layout-mobile .signal-bars{height:12px!important}
.layout-mobile .data-arrows{gap:0!important}

.layout-mobile .chat-header{
  height:56px!important;
  padding:0 3px 0 1px!important;
}
.layout-mobile .header-icon{width:38px!important;height:42px!important}
.layout-mobile .header-icon svg{width:24px!important;height:24px!important;stroke-width:1.95!important}
.layout-mobile .contact-avatar{width:35px!important;height:35px!important}
.layout-mobile .contact-info{margin-left:7px!important}
.layout-mobile .contact-info strong{font-size:15.2px!important;line-height:18px!important}
.layout-mobile .contact-info span{font-size:10.3px!important;line-height:13.5px!important}
.layout-mobile .header-actions{gap:10px!important;margin-left:5px!important;margin-right:1px!important}
.layout-mobile .header-actions button{width:21px!important;height:34px!important}
.layout-mobile .header-actions svg{width:19px!important;height:19px!important;stroke-width:1.95!important}
.layout-mobile .more-dots{width:15px!important;height:30px!important;gap:2.2px!important}
.layout-mobile .more-dots i{width:2.3px!important;height:2.3px!important}

.layout-mobile .chat-area:before{opacity:.14!important;background-size:400px 712px!important}
.layout-mobile .day-label{margin-top:6px!important;margin-bottom:4px!important;padding:4px 9px!important;font-size:10.6px!important;border-radius:8px!important}
.layout-mobile .messages{padding-left:7px!important;padding-right:7px!important;padding-bottom:77px!important}
.layout-mobile .bubble{max-width:84.5%!important;font-size:14px!important;line-height:19.2px!important;border-radius:16px!important}
.layout-mobile .text-bubble{padding:7px 8px 6.5px 9px!important;border-radius:16px!important}
.layout-mobile .bubble-meta{font-size:9.5px!important;margin-top:5px!important}
.layout-mobile .ticks svg{width:15px!important;height:10px!important;stroke-width:1.55!important}
.layout-mobile .message-row.group-single .bubble.incoming,.layout-mobile .message-row.group-start .bubble.incoming{border-top-left-radius:4px!important}
.layout-mobile .message-row.group-single .bubble.outgoing,.layout-mobile .message-row.group-start .bubble.outgoing{border-top-right-radius:4px!important}
.layout-mobile .message-row.group-middle .bubble.incoming{border-bottom-left-radius:4px!important}
.layout-mobile .message-row.group-middle .bubble.outgoing{border-bottom-right-radius:4px!important}

.layout-mobile .image-bubble{width:min(268px,calc(100vw - 54px))!important;padding:2px 2px 17px!important;border-radius:14px!important}
.layout-mobile .image-media-wrap,.layout-mobile .image-bubble.is-collage .image-media-wrap{height:min(262px,calc(100vw - 60px))!important;border-radius:12px!important}
.layout-mobile .image-caption{padding:5px 7px 0!important;min-height:22px!important;font-size:13.9px!important;line-height:18.6px!important}
.layout-mobile .image-bubble-meta{right:6px!important;bottom:3px!important;font-size:9.4px!important;line-height:10.5px!important}
.layout-mobile .image-bubble:not(:has(.image-caption)) .image-media-wrap::after{height:42px!important;background:linear-gradient(to top,rgba(0,0,0,.40),rgba(0,0,0,.02))!important}

.layout-mobile .composer-wrap{left:4px!important;right:4px!important;bottom:calc(3px + env(safe-area-inset-bottom))!important;gap:4px!important}
.layout-mobile .composer{height:43px!important;min-height:43px!important;border-radius:22px!important;padding:0 7px 0 4px!important}
.layout-mobile .composer button{height:36px!important}
.layout-mobile .composer-emoji{width:33px!important}.layout-mobile .composer-emoji svg{width:21px!important;height:21px!important}
.layout-mobile .placeholder{font-size:14px!important;line-height:18px!important}
.layout-mobile .composer-attach{width:29px!important}.layout-mobile .composer-camera{width:30px!important}
.layout-mobile .composer-attach svg,.layout-mobile .composer-camera svg{width:20.5px!important;height:20.5px!important;stroke-width:1.75!important}
.layout-mobile .mic-button{width:43px!important;height:43px!important;min-width:43px!important;min-height:43px!important}
.layout-mobile .mic-button svg{width:20px!important;height:20px!important;stroke-width:1.85!important}

.layout-mobile .android-nav.gesture-nav{height:calc(20px + env(safe-area-inset-bottom))!important;min-height:20px!important}
.layout-mobile .gesture-pill{width:108px!important;height:3.5px!important;background:#11171a!important;opacity:.92}

.layout-mobile .mobile-tools{right:-8px!important;bottom:max(78px,calc(env(safe-area-inset-bottom) + 64px))!important}
.layout-mobile .mobile-tools:not(.open) .edit-fab{width:16px!important;height:42px!important;min-width:16px!important;border-radius:16px 0 0 16px!important;box-shadow:0 4px 12px rgba(0,0,0,.14)!important;opacity:.92}
.layout-mobile .mobile-tools:not(.open) .edit-fab svg{width:10px!important;height:10px!important;transform:translateX(-1px)!important}
.layout-mobile .mobile-tools.open{right:max(8px,env(safe-area-inset-right))!important}
.layout-mobile .mobile-tools.open .edit-fab{width:44px!important;height:44px!important}

@media(max-width:360px){
  .layout-mobile .status-bar::before{width:54px!important;height:14px!important}
  .layout-mobile .contact-avatar{width:34px!important;height:34px!important}
  .layout-mobile .header-actions{gap:8px!important}
  .layout-mobile .bubble{font-size:13.8px!important;line-height:18.8px!important}
  .layout-mobile .image-bubble{width:min(258px,calc(100vw - 40px))!important}
  .layout-mobile .image-media-wrap,.layout-mobile .image-bubble.is-collage .image-media-wrap{height:min(252px,calc(100vw - 48px))!important}
}

/* v16：效率工具、字体预设、表情与贴纸 */
[hidden]{display:none!important}
.font-android{font-family:Roboto,"Noto Sans CJK SC","Noto Sans SC","Noto Sans CJK TC","Noto Sans TC","PingFang SC","Microsoft YaHei",system-ui,sans-serif!important}
.font-iphone{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","PingFang TC","Helvetica Neue",sans-serif!important}
.font-web{font-family:"Segoe UI",Arial,"Microsoft YaHei","Noto Sans SC",sans-serif!important}
.layout-mobile .phone-frame.size-small .bubble{font-size:13.25px!important;line-height:18.4px!important}
.layout-mobile .phone-frame.size-large .bubble{font-size:15px!important;line-height:20.5px!important}
.layout-mobile .phone-frame.size-small .contact-info strong{font-size:14.4px!important}
.layout-mobile .phone-frame.size-large .contact-info strong{font-size:16px!important}
.layout-mobile .phone-frame.size-small .placeholder{font-size:13.4px!important}
.layout-mobile .phone-frame.size-large .placeholder{font-size:15px!important}
.desktop-app.size-small .bubble{font-size:13px!important;line-height:18px!important}
.desktop-app.size-large .bubble{font-size:15.2px!important;line-height:21px!important}

.sticker-message{position:relative;width:174px;min-height:80px;padding:1px 2px 19px;display:flex;align-items:flex-end}
.sticker-media{border:0;background:transparent;padding:0;margin:0;display:grid;place-items:center;max-width:164px;max-height:164px}
.sticker-media img{display:block;max-width:164px;max-height:164px;width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.12))}
.sticker-meta{position:absolute;right:2px;bottom:1px;display:flex;align-items:center;gap:1px;font-size:9.8px;line-height:11px;color:#667781;background:rgba(255,255,255,.8);border-radius:6px;padding:2px 4px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.message-row.outgoing .sticker-meta{background:rgba(217,253,211,.88)}
.layout-mobile .sticker-message{width:158px;padding-bottom:18px}
.layout-mobile .sticker-media,.layout-mobile .sticker-media img{max-width:150px;max-height:150px}
.phone-frame:not(.is-editing) .sticker-media{cursor:default}
.selected-message .bubble,.selected-message .sticker-message{outline:1.5px solid rgba(0,168,132,.24);outline-offset:2px}
.preview-mode .selected-message .bubble,.preview-mode .selected-message .sticker-message{outline:0}

.utility-mask{position:fixed;inset:0;z-index:190;background:rgba(11,20,26,.42);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(2px)}
.utility-panel{width:min(590px,100%);max-height:min(720px,88dvh);background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.28);display:flex;flex-direction:column}
.utility-panel>header{height:56px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #e9edef}
.utility-panel>header strong{font-size:17px;font-weight:600}
.utility-panel>header button{width:34px;height:34px;border:0;border-radius:50%;background:#f0f2f5;color:#54656f;font-size:24px;line-height:1}
.utility-panel-body{padding:16px;overflow:auto;overscroll-behavior:contain}
.panel-subtitle{font-size:12px;color:#667781;margin:4px 0 9px;font-weight:600}
.template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.template-grid button{border:1px solid #dde4e7;border-radius:12px;background:#fff;text-align:left;padding:12px;display:flex;flex-direction:column;gap:5px;color:#111b21;min-height:72px}
.template-grid button:hover{border-color:#00a884;background:#f4fbf9}
.template-grid b{font-size:13px}.template-grid span{font-size:12px;color:#667781;line-height:17px}
.panel-secondary{margin-top:12px;width:100%;border:1px dashed #9cacae;background:#f8fafb;color:#087b67;border-radius:11px;padding:11px;font-weight:600}
.emoji-search input{width:100%;height:40px;border:0;border-radius:20px;background:#f0f2f5;padding:0 15px;outline:none;color:#111b21;margin-bottom:13px}
.emoji-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin-bottom:14px}
.emoji-grid button{border:0;background:transparent;border-radius:8px;aspect-ratio:1;font-size:25px;display:grid;place-items:center;padding:0}
.emoji-grid button:hover{background:#e9edef}
.recent-emojis{padding-bottom:10px;border-bottom:1px solid #eef1f2}
.choice-row{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:18px}
.choice-row button{min-height:68px;border:1px solid #dde4e7;border-radius:12px;background:#fff;color:#111b21;padding:9px}
.choice-row button small{display:block;color:#667781;margin-top:4px;font-size:10px}
.choice-row.compact button{min-height:42px}
.choice-row button.active{border-color:#00a884;background:#eaf8f5;color:#007d69;box-shadow:inset 0 0 0 1px #00a884}
.panel-toggle{width:100%;border:1px solid #dce4e6;border-radius:14px;background:#fff;padding:13px;display:flex;align-items:center;justify-content:space-between;text-align:left;margin-bottom:16px}
.panel-toggle span{display:flex;flex-direction:column;gap:4px}.panel-toggle small{color:#667781}.panel-toggle i{font-style:normal;border-radius:15px;background:#dfe5e7;color:#54656f;padding:5px 10px;font-size:12px}
.panel-toggle.active{border-color:#00a884;background:#f0fbf8}.panel-toggle.active i{background:#00a884;color:#fff}
.layout-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.layout-actions button{border:1px solid #dce4e6;border-radius:11px;background:#fff;padding:11px;color:#233139}
.layout-actions button:hover{border-color:#00a884;background:#f0fbf8}
.panel-tip{font-size:11px;color:#667781;line-height:17px;margin:14px 2px 2px}

.tool-menu{max-height:min(72dvh,620px);overflow-y:auto;overscroll-behavior:contain;padding:4px}
.desktop-editor-rail{max-height:calc(100dvh - 32px);overflow-y:auto;scrollbar-width:none}
.desktop-editor-rail::-webkit-scrollbar,.tool-menu::-webkit-scrollbar{display:none}

@media(max-width:700px){
  .utility-mask{align-items:flex-end;padding:0}
  .utility-panel{width:100%;max-height:82dvh;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom)}
  .utility-panel>header{height:52px;padding:0 15px}
  .utility-panel-body{padding:13px 14px 18px}
  .template-grid{grid-template-columns:1fr}
  .template-grid button{min-height:62px;padding:10px 12px}
  .emoji-grid{grid-template-columns:repeat(8,1fr);gap:3px}
  .emoji-grid button{font-size:24px}
  .choice-row{gap:7px}.choice-row button{min-height:62px;font-size:12px}
  .layout-actions{grid-template-columns:1fr 1fr;gap:7px}.layout-actions button{font-size:12px;padding:10px 7px}
}


/* v17：AI脚本导入器 */
.ai-script-input{width:100%;min-height:210px;resize:vertical;border:1px solid #d5dfe2;border-radius:13px;padding:12px 13px;background:#f8fafb;color:#111b21;font:12px/18px ui-monospace,SFMono-Regular,Consolas,monospace;outline:none;white-space:pre;overflow:auto}
.ai-script-input:focus{border-color:#00a884;box-shadow:0 0 0 2px rgba(0,168,132,.12);background:#fff}
.import-top-actions{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:8px;margin:10px 0 13px}
.import-top-actions button,.import-confirm{border:1px solid #d6e0e3;border-radius:10px;background:#fff;color:#233139;padding:10px 8px;font-weight:600}
.import-top-actions button:hover{border-color:#00a884;background:#f1fbf8}
.import-top-actions .primary,.import-confirm{background:#00a884;border-color:#00a884;color:#fff}
.import-error{margin:10px 0;padding:10px 12px;border-radius:10px;background:#fff1f0;color:#b42318;font-size:12px;line-height:18px;border:1px solid #ffd3cf}
.import-summary{display:flex;justify-content:space-between;align-items:center;margin:13px 0 9px;padding:11px 12px;border-radius:12px;background:#eaf8f5;color:#075e54}
.import-summary div{display:flex;flex-direction:column;gap:2px}.import-summary b{font-size:14px}.import-summary span{font-size:11px;color:#54736d}.import-summary strong{font-size:13px}
.import-preview-list{display:flex;flex-direction:column;gap:7px;max-height:330px;overflow:auto;padding:1px 2px 4px}
.import-preview-item{border:1px solid #dde5e7;border-radius:12px;padding:8px;background:#fff;position:relative}
.import-preview-item.outgoing{margin-left:34px;background:#f0fff8;border-color:#cbe8de}.import-preview-item.incoming{margin-right:34px}
.import-preview-head{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.import-preview-head>button:first-child{border:0;border-radius:999px;padding:4px 8px;background:#e9edef;color:#47545a;font-size:11px;font-weight:600}
.import-preview-item.outgoing .import-preview-head>button:first-child{background:#d7f5e9;color:#007d69}
.import-preview-head span{font-size:10px;color:#667781;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.import-preview-head input{width:54px;height:27px;border:1px solid #d8e1e4;border-radius:7px;text-align:center;font-size:11px;color:#47545a;background:#fff}
.import-preview-head .import-delete{width:27px;height:27px;border:0;border-radius:50%;background:#f0f2f5;color:#78868c;font-size:17px;line-height:1}
.import-preview-item textarea{width:100%;resize:vertical;border:0;background:transparent;outline:none;color:#111b21;font-size:13px;line-height:18px;padding:2px 3px;min-height:34px}
.import-move{display:flex;justify-content:flex-end;gap:4px}.import-move button{width:28px;height:24px;border:1px solid #dde4e7;border-radius:6px;background:#fff;color:#667781}.import-move button:disabled{opacity:.3}
.import-choice{margin-bottom:12px!important}.import-choice.three{grid-template-columns:repeat(3,1fr)!important}.import-choice button{min-height:42px!important}
.import-confirm{width:100%;margin-top:12px;padding:12px;font-size:14px}
.import-tip{margin-top:0!important;margin-bottom:10px!important}
@media(max-width:600px){
  .ai-script-input{min-height:170px;font-size:11px;line-height:17px}
  .import-top-actions{grid-template-columns:1fr 1fr}.import-top-actions .primary{grid-column:1/-1}
  .import-preview-list{max-height:280px}
  .import-preview-item.outgoing{margin-left:20px}.import-preview-item.incoming{margin-right:20px}
  .import-choice.three{grid-template-columns:1fr!important}
}

/* v18：项目、版本、多选、素材库、拖动与导出检查 */
.message-row{position:relative}
.message-select-toggle,.drag-handle{position:absolute;z-index:12;border:0;display:grid;place-items:center;user-select:none;-webkit-user-select:none}
.message-select-toggle{width:24px;height:24px;border-radius:50%;top:50%;transform:translateY(-50%);background:#fff;color:#fff;box-shadow:0 1px 5px rgba(11,20,26,.22);border:2px solid #9aabad;font-size:13px;font-weight:700;opacity:0;pointer-events:none}
.message-row.incoming .message-select-toggle{right:3px}.message-row.outgoing .message-select-toggle{left:3px}
.message-row.multi-select-active .message-select-toggle{opacity:1;pointer-events:auto}
.message-row.multi-selected .message-select-toggle{background:#00a884;border-color:#00a884}
.message-row.multi-selected .bubble,.message-row.multi-selected .sticker-message{outline:2px solid rgba(0,168,132,.65);outline-offset:2px}
.drag-handle{width:22px;height:34px;top:50%;transform:translateY(-50%);border-radius:10px;background:rgba(255,255,255,.88);color:#78898f;font-size:13px;letter-spacing:-3px;opacity:0;pointer-events:none;cursor:grab;touch-action:none;box-shadow:0 1px 4px rgba(11,20,26,.12)}
.message-row.incoming .drag-handle{left:-1px}.message-row.outgoing .drag-handle{right:-1px}
.edit-mode .message-row:hover .drag-handle,.edit-mode .selected-message .drag-handle{opacity:.75;pointer-events:auto}
.multi-select-active .drag-handle{display:none}
.dragging-message{opacity:.42}.drag-over-message{filter:drop-shadow(0 4px 7px rgba(0,168,132,.35))}
.touch-dragging{overscroll-behavior:none}.touch-dragging *{cursor:grabbing!important}
.export-clean .message-select-toggle,.export-clean .drag-handle{display:none!important}

.batch-bar{position:fixed;z-index:175;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(920px,calc(100vw - 24px));min-height:58px;background:rgba(17,27,33,.97);color:#fff;border-radius:16px;display:flex;align-items:center;gap:12px;padding:8px 10px 8px 14px;box-shadow:0 14px 40px rgba(0,0,0,.32);backdrop-filter:blur(16px)}
.batch-summary{display:flex;align-items:baseline;gap:5px;min-width:80px}.batch-summary b{font-size:20px}.batch-summary span{font-size:11px;color:#c9d2d5}
.batch-actions{display:flex;gap:5px;overflow-x:auto;flex:1;scrollbar-width:none}.batch-actions::-webkit-scrollbar{display:none}
.batch-actions button,.batch-close{flex:none;border:0;border-radius:9px;background:#27363d;color:#eef3f4;min-height:38px;padding:0 11px;font-size:12px}.batch-actions button:hover{background:#35505a}.batch-actions .danger{background:#5d2729;color:#ffd9d9}
.batch-close{background:#00a884;color:#fff;font-weight:700;padding:0 15px}

.project-current{display:grid;grid-template-columns:1fr auto;gap:2px 12px;background:#eaf8f5;border:1px solid #cdece3;border-radius:14px;padding:13px 14px;margin-bottom:11px}.project-current span{font-size:10px;color:#5c7974}.project-current b{font-size:16px;color:#075e54}.project-current small{grid-column:2;grid-row:1/3;align-self:center;color:#54736d}
.project-top-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}.project-top-actions button,.asset-upload-button{min-height:42px;border:1px solid #d8e1e4;border-radius:10px;background:#fff;color:#233139;font-weight:600}.project-top-actions .primary,.asset-upload-button{background:#00a884;border-color:#00a884;color:#fff}
.project-list,.version-list{display:flex;flex-direction:column;gap:8px;margin-bottom:17px}.project-card{border:1px solid #dce4e6;border-radius:12px;padding:8px;background:#fff}.project-card.active{border-color:#00a884;background:#f1fbf8;box-shadow:inset 3px 0 #00a884}
.project-main{width:100%;border:0;background:transparent;text-align:left;display:flex;flex-direction:column;gap:3px;padding:3px 4px 8px;color:#111b21}.project-main b{font-size:14px}.project-main span{font-size:10px;color:#667781}
.project-actions{display:flex;gap:5px;flex-wrap:wrap;padding-top:7px;border-top:1px solid #edf0f1}.project-actions button{border:0;border-radius:7px;background:#eef3f4;color:#54656f;padding:6px 9px;font-size:10px}.project-actions .danger{color:#b42318;background:#fff0ef}
.version-title{display:flex;justify-content:space-between;align-items:center}.version-title button{border:0;border-radius:8px;background:#e8f7f3;color:#007d69;padding:6px 9px;font-size:10px}
.version-card{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf1f2;padding:7px 2px}.version-card div{display:flex;flex-direction:column;gap:2px}.version-card b{font-size:12px}.version-card span{font-size:10px;color:#78878c}.version-card button{border:1px solid #cfe4de;border-radius:8px;background:#fff;color:#007d69;padding:6px 10px;font-size:10px}
.empty-panel-state{padding:28px 15px;text-align:center;color:#86969d;background:#f7f9fa;border:1px dashed #ced8dc;border-radius:12px;font-size:12px;line-height:18px}

.asset-upload-button{width:100%;margin:0 0 12px}.asset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.asset-card{border:1px solid #dce4e6;border-radius:13px;overflow:hidden;background:#fff}.asset-thumb{height:132px;background:#eef2f3;display:grid;place-items:center}.asset-thumb img{width:100%;height:100%;object-fit:cover}.asset-meta{padding:8px 9px 5px;display:flex;flex-direction:column;gap:2px}.asset-meta b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.asset-meta span{font-size:9px;color:#78878c}.asset-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:6px}.asset-actions button{border:0;border-radius:7px;background:#edf4f3;color:#37625b;min-height:29px;font-size:9px}.asset-actions .danger{background:#fff0ef;color:#b42318}

.export-all-clear{padding:22px;border-radius:13px;background:#ecfaf6;color:#087b67;text-align:center;font-weight:700}.export-issue{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border-radius:11px;margin-bottom:7px;background:#fff8e7;border:1px solid #f2ddad}.export-issue.error{background:#fff1f0;border-color:#ffd1cd}.export-issue i{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#e5a900;color:#fff;font-style:normal;font-weight:700;flex:none}.export-issue.error i{background:#d92d20}.export-issue span{display:flex;flex-direction:column;gap:3px}.export-issue b{font-size:12px}.export-issue small{font-size:10px;line-height:15px;color:#667781}.export-check-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:8px;margin-top:14px}.export-check-actions button{min-height:42px;border:1px solid #d6e0e3;border-radius:10px;background:#fff;color:#233139;font-weight:600}.export-check-actions .primary{background:#00a884;border-color:#00a884;color:#fff}

@media(max-width:700px){
  .layout-mobile .edit-mode .message-row .drag-handle,.layout-mobile .edit-mode .selected-message .drag-handle{opacity:.34;pointer-events:auto}
  .layout-mobile .message-row.incoming .drag-handle{left:-4px}.layout-mobile .message-row.outgoing .drag-handle{right:-4px}
  .layout-mobile .message-select-toggle{width:22px;height:22px}
  .batch-bar{left:6px;right:6px;bottom:max(5px,env(safe-area-inset-bottom));width:auto;transform:none;border-radius:14px;padding:7px 8px;gap:7px}
  .batch-summary{min-width:50px}.batch-summary span{display:none}.batch-actions button{min-height:36px;padding:0 9px;font-size:11px}.batch-close{min-height:36px;padding:0 11px}
  .asset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.asset-thumb{height:112px}
  .project-actions button{padding:6px 8px}
}


/* v19：图片消息高度强制参与正常文档流，避免配文与下一条消息重叠 */
.message-row.image-message-row{
  position:relative!important;
  align-items:flex-start!important;
  height:auto!important;
  overflow:visible!important;
  isolation:isolate;
}
.message-row.image-message-row .image-bubble{
  display:flex!important;
  flex-direction:column!important;
  align-self:flex-start!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  contain:none!important;
}
.message-row.outgoing.image-message-row .image-bubble{margin-left:auto}
.message-row.incoming.image-message-row .image-bubble{margin-right:auto}
.message-row.image-message-row .image-media-wrap{
  display:block;
  flex:0 0 auto!important;
  width:100%;
}
.message-row.image-message-row .image-caption{
  position:relative!important;
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  overflow:visible!important;
  white-space:pre-wrap!important;
}
.message-row.image-message-row + .message-row{
  position:relative;
  z-index:1;
}


/* v20：图片消息使用纯文档流和预留比例，彻底避免加载前后重叠 */
.messages{
  align-items:stretch!important;
  scroll-padding-bottom:92px!important;
}
.message-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  contain:none!important;
}
.message-row.incoming>.bubble,
.message-row.incoming>.sticker-message{justify-self:start!important}
.message-row.outgoing>.bubble,
.message-row.outgoing>.sticker-message{justify-self:end!important}
.message-row.image-message-row .image-bubble{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-content:start!important;
  justify-self:inherit!important;
  width:min(268px,calc(100vw - 54px))!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  contain:none!important;
  margin:0!important;
}
.message-row.image-message-row .image-media-wrap,
.message-row.image-message-row .image-bubble.is-collage .image-media-wrap{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1 / 1!important;
  overflow:hidden!important;
  flex:none!important;
}
.message-row.image-message-row .message-image,
.message-row.image-message-row .image-grid{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
}
.message-row.image-message-row .image-caption{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
}
.message-row.image-message-row + .message-row{
  margin-top:2px!important;
}
.layout-mobile .messages{
  padding-bottom:96px!important;
}
.layout-mobile .message-row.image-message-row .image-bubble{
  width:min(268px,calc(100vw - 54px))!important;
}
.desktop-app .message-row.image-message-row .image-bubble{
  width:min(360px,55vw)!important;
}
.desktop-app .message-row.image-message-row .image-media-wrap,
.desktop-app .message-row.image-message-row .image-bubble.is-collage .image-media-wrap{
  height:auto!important;
  aspect-ratio:1 / 1!important;
}

/* 工具按钮属于手机预览容器，不再按浏览器窗口定位。 */
.phone-stage-shell>.mobile-tools{
  position:absolute!important;
  left:auto!important;
  right:0!important;
  bottom:clamp(54px,9%,78px)!important;
  max-height:calc(100% - 32px)!important;
  z-index:80!important;
}
.phone-stage-shell>.mobile-tools.open{
  right:6px!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools{
  position:absolute!important;
  right:0!important;
  bottom:max(70px,calc(env(safe-area-inset-bottom) + 58px))!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools.open{
  right:max(6px,env(safe-area-inset-right))!important;
}
.layout-desktop .phone-stage-shell>.mobile-tools{
  position:absolute!important;
  left:auto!important;
  right:0!important;
  bottom:clamp(46px,8%,68px)!important;
}
.layout-desktop .phone-stage-shell>.mobile-tools.open{
  left:auto!important;
  right:6px!important;
}

/* 不再用启动版本提示遮挡底部导航。 */
.toast:empty{display:none!important}


/* v21：拖动与选中控件只在明确模式中显示，避免左侧半透明雾层 */
.selected-message .bubble,
.selected-message .sticker-message{
  outline:0!important;
}
.preview-mode .selected-message .bubble,
.preview-mode .selected-message .sticker-message{
  outline:0!important;
}

/* 默认彻底隐藏排序手柄，包括鼠标悬停和普通选中状态。 */
.edit-mode .message-row:hover .drag-handle,
.edit-mode .selected-message .drag-handle,
.layout-mobile .edit-mode .message-row .drag-handle,
.layout-mobile .edit-mode .selected-message .drag-handle{
  opacity:0!important;
  pointer-events:none!important;
  visibility:hidden!important;
}

/* 仅进入“排序模式”后显示；改为清晰的小型深色手柄，不再使用大片白色半透明背景。 */
.sort-mode .message-row .drag-handle,
.layout-mobile .sort-mode .message-row .drag-handle{
  display:grid!important;
  visibility:visible!important;
  opacity:.82!important;
  pointer-events:auto!important;
  width:18px!important;
  height:30px!important;
  border-radius:9px!important;
  background:rgba(17,27,33,.86)!important;
  color:#fff!important;
  box-shadow:0 2px 7px rgba(0,0,0,.22)!important;
}
.sort-mode .message-row.incoming .drag-handle,
.layout-mobile .sort-mode .message-row.incoming .drag-handle{left:-2px!important}
.sort-mode .message-row.outgoing .drag-handle,
.layout-mobile .sort-mode .message-row.outgoing .drag-handle{right:-2px!important}
.sort-mode .message-row:hover .drag-handle{opacity:1!important}
.sort-mode .message-row .bubble,
.sort-mode .message-row .sticker-message{cursor:default!important}

.sort-mode-bar{
  position:fixed;
  z-index:178;
  left:50%;
  bottom:max(14px,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  min-width:290px;
  max-width:calc(100vw - 24px);
  min-height:52px;
  padding:7px 8px 7px 14px;
  border-radius:15px;
  background:rgba(17,27,33,.96);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  box-shadow:0 12px 32px rgba(0,0,0,.3);
  backdrop-filter:blur(14px);
}
.sort-mode-bar span{display:flex;flex-direction:column;gap:2px}
.sort-mode-bar b{font-size:13px}
.sort-mode-bar small{font-size:10px;color:#c6d0d3}
.sort-mode-bar button{border:0;border-radius:9px;min-width:62px;min-height:36px;background:#00a884;color:#fff;font-weight:700}

.export-clean .sort-mode-bar,
.preview-mode .sort-mode-bar{display:none!important}

@media(max-width:700px){
  .sort-mode-bar{left:7px;right:7px;bottom:max(5px,env(safe-area-inset-bottom));transform:none;min-width:0;max-width:none}
  .sort-mode .message-row.incoming .drag-handle,
  .layout-mobile .sort-mode .message-row.incoming .drag-handle{left:-1px!important}
  .sort-mode .message-row.outgoing .drag-handle,
  .layout-mobile .sort-mode .message-row.outgoing .drag-handle{right:-1px!important}
}


/* v22：底部输入框与发送键 */
.composer-text-input{
  flex:1;
  min-width:0;
  outline:0;
  color:#111b21;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  cursor:text;
}
.composer-text-input:empty::before{
  content:attr(data-placeholder);
  color:#667781;
  pointer-events:none;
}
.composer-action.is-send svg,
.desktop-composer-action.is-send svg{
  width:22px;
  height:22px;
  stroke-width:2;
}
.layout-mobile .composer-wrap{align-items:flex-end!important}
.layout-mobile .composer{
  height:auto!important;
  min-height:43px!important;
  max-height:112px!important;
  align-items:flex-end!important;
}
.layout-mobile .composer-text-input{
  min-height:20px;
  max-height:84px;
  overflow-y:auto;
  padding:11px 2px 10px;
  font-size:14px;
  line-height:20px;
  scrollbar-width:none;
}
.layout-mobile .composer-text-input::-webkit-scrollbar{display:none}
.layout-mobile .composer button{align-self:flex-end;margin-bottom:3px}
.layout-mobile .mic-button{align-self:flex-end}
.layout-mobile .composer-action.is-send{background:#00a884!important;color:#fff!important}
.desktop-input.composer-text-input{
  height:auto;
  min-height:40px;
  max-height:96px;
  overflow-y:auto;
  white-space:pre-wrap;
  padding-top:10px;
  padding-bottom:10px;
  line-height:20px;
}
.desktop-composer-wrap{align-items:flex-end}
.desktop-composer-action{
  border:0;
  background:transparent;
  color:#54656f;
  width:36px;
  height:40px;
  display:grid;
  place-items:center;
  flex:none;
}
.desktop-composer-action.is-send{color:#00a884}
.export-clean [data-composer-input]{pointer-events:none}

/* v23：消息归属明确切换 */
.sheet-side-choice{
  display:grid;
  grid-template-columns:minmax(90px,1fr) 88px 88px;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-top:1px solid #eef1f2;
  border-bottom:1px solid #eef1f2;
  background:#fff;
}
.sheet-side-choice span{font-size:13px;color:#54656f;font-weight:700}
.sheet-side-choice button{
  min-height:38px!important;
  border:1px solid #d8dee1!important;
  border-radius:10px!important;
  background:#f7f9fa!important;
  color:#33434b!important;
  font-weight:700!important;
}
.sheet-side-choice button.active{
  border-color:#00a884!important;
  background:#e7f8f2!important;
  color:#007d67!important;
  box-shadow:inset 0 0 0 1px rgba(0,168,132,.12);
}
.ownership-swap-all{
  width:100%;
  min-height:44px;
  border:1px solid #cfd8dc;
  border-radius:12px;
  background:#fff;
  color:#006b57;
  font-size:14px;
  font-weight:800;
  margin-bottom:12px;
}
.ownership-list{display:flex;flex-direction:column;gap:8px}
.ownership-item{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  padding:9px;
  border:1px solid #e3e8ea;
  border-radius:12px;
  background:#fff;
}
.ownership-item.outgoing{border-color:#cce9df;background:#f8fffc}
.ownership-index{
  width:27px;height:27px;border-radius:50%;display:grid;place-items:center;
  background:#eef2f3;color:#54656f;font-size:11px;font-weight:800;
}
.ownership-item.outgoing .ownership-index{background:#d9f4ea;color:#007d67}
.ownership-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.ownership-copy b{font-size:12px;color:#1f2c33}
.ownership-copy span{font-size:11px;color:#667781;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ownership-actions{display:flex;gap:5px}
.ownership-actions button{
  min-width:48px;min-height:34px;padding:0 9px;border:1px solid #d8dee1;border-radius:9px;
  background:#f7f9fa;color:#54656f;font-size:12px;font-weight:750;
}
.ownership-actions button.active{background:#00a884;border-color:#00a884;color:#fff}

@media(max-width:600px){
  .sheet-side-choice{grid-template-columns:1fr 72px 72px;padding:7px 8px}
  .ownership-item{grid-template-columns:25px minmax(0,1fr);gap:7px}
  .ownership-index{width:24px;height:24px}
  .ownership-actions{grid-column:2;justify-content:flex-end}
  .ownership-actions button{min-width:64px}
}


/* v24：消息归属最终定位规则。放在文件末尾，覆盖图片流布局中的 inherit。 */
.message-row[data-side="incoming"],
.message-row.incoming{
  justify-items:start!important;
  justify-content:start!important;
}
.message-row[data-side="outgoing"],
.message-row.outgoing{
  justify-items:end!important;
  justify-content:end!important;
}
.message-row[data-side="incoming"]>.bubble,
.message-row[data-side="incoming"]>.sticker-message,
.message-row.incoming>.bubble,
.message-row.incoming>.sticker-message{
  justify-self:start!important;
  margin-left:0!important;
  margin-right:auto!important;
}
.message-row[data-side="outgoing"]>.bubble,
.message-row[data-side="outgoing"]>.sticker-message,
.message-row.outgoing>.bubble,
.message-row.outgoing>.sticker-message{
  justify-self:end!important;
  margin-left:auto!important;
  margin-right:0!important;
}
.message-row[data-side="incoming"].image-message-row .image-bubble,
.message-row.incoming.image-message-row .image-bubble{
  justify-self:start!important;
  margin-left:0!important;
  margin-right:auto!important;
}
.message-row[data-side="outgoing"].image-message-row .image-bubble,
.message-row.outgoing.image-message-row .image-bubble{
  justify-self:end!important;
  margin-left:auto!important;
  margin-right:0!important;
}
.ownership-actions button{touch-action:manipulation}


/* v26：图片按原始宽高比显示、文字元信息稳定、引用回复消息 */
.font-android,
.font-android button,
.font-android input,
.font-android textarea,
.font-android [contenteditable="true"]{
  font-family:Roboto,"Noto Sans SC","Noto Sans TC","PingFang SC","PingFang TC","Microsoft YaHei",system-ui,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.font-android .bubble-text,
.font-android .image-caption,
.font-android .reply-quote{font-weight:400;letter-spacing:-.03px}
.font-android .bubble-meta,
.font-android .image-bubble-meta,
.font-android .sticker-meta{font-variant-numeric:tabular-nums;letter-spacing:-.18px!important}

/* 单图按自然比例显示，但限制极端长图/宽图，拼图继续保持方形。 */
.message-row.image-message-row .image-media-wrap.adaptive-single{
  aspect-ratio:var(--media-ratio,1)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
.message-row.image-message-row .image-media-wrap.adaptive-single .message-image{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-position:center!important;
}
.message-row.image-message-row .image-media-wrap.grid-wrap{
  aspect-ratio:1 / 1!important;
}
.layout-mobile .message-row.image-message-row .image-media-wrap.adaptive-single{
  max-height:min(390px,60dvh)!important;
}
.desktop-app .message-row.image-message-row .image-media-wrap.adaptive-single{
  max-height:min(500px,68vh)!important;
}

/* 时间和勾勾作为正文后的内联块，长文字时不会压住或漂移。 */
.text-bubble{display:flow-root!important}
.text-bubble .bubble-tail-space{display:none!important}
.text-bubble .bubble-text{white-space:pre-wrap;overflow-wrap:anywhere}
.text-bubble .bubble-meta{
  float:none!important;
  display:inline-flex!important;
  vertical-align:-1px!important;
  margin:0 0 0 6px!important;
  height:auto!important;
  min-height:10px;
  white-space:nowrap;
}
.layout-mobile .text-bubble .bubble-meta{margin-left:5px!important}

.reply-bubble{padding-top:4px!important;min-width:172px!important}
.reply-quote{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:1px;
  margin:0 0 5px;
  padding:6px 8px 6px 10px;
  border-radius:7px;
  background:rgba(17,27,33,.055);
  overflow:hidden;
}
.reply-quote::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:#00a884;
}
.reply-bubble.outgoing .reply-quote{background:rgba(0,128,105,.075)}
.reply-quote b{font-size:11.2px;line-height:14px;color:#008069;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-quote span{font-size:11.5px;line-height:15px;color:#667781;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.layout-mobile .reply-bubble{min-width:164px!important;max-width:86%!important}
.layout-mobile .reply-quote{padding:5px 7px 5px 9px;margin-bottom:4px}
.layout-mobile .reply-quote b{font-size:10.8px;line-height:13px}
.layout-mobile .reply-quote span{font-size:11px;line-height:14px}
.preview-mode .reply-quote [contenteditable],
.exporting .reply-quote [contenteditable]{outline:0!important}


/* v32：从 v26 稳定底座重构，只修截图中的明确问题 */
.layout-mobile .messages{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
.layout-mobile .messages::-webkit-scrollbar,
.layout-mobile .chat-area::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
  background:transparent!important;
}

/* 编辑入口完全不可见，只保留屏幕右边缘 8px 的透明触摸区。 */
.layout-mobile .phone-stage-shell>.mobile-tools,
.phone-stage-shell>.mobile-tools{
  position:absolute!important;
  left:auto!important;
  right:-20px!important;
  bottom:92px!important;
  width:28px!important;
  height:52px!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools:not(.open) .tool-menu,
.phone-stage-shell>.mobile-tools:not(.open) .tool-menu{display:none!important}
.layout-mobile .phone-stage-shell>.mobile-tools:not(.open) .edit-fab,
.phone-stage-shell>.mobile-tools:not(.open) .edit-fab{
  width:28px!important;
  min-width:28px!important;
  height:52px!important;
  min-height:52px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:0!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools:not(.open) .edit-fab::before,
.phone-stage-shell>.mobile-tools:not(.open) .edit-fab::before,
.layout-mobile .phone-stage-shell>.mobile-tools:not(.open) .edit-trigger-icon,
.phone-stage-shell>.mobile-tools:not(.open) .edit-trigger-icon{display:none!important}
.layout-mobile .phone-stage-shell>.mobile-tools.open,
.phone-stage-shell>.mobile-tools.open{
  right:7px!important;
  width:auto!important;
  height:auto!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools.open .edit-fab,
.phone-stage-shell>.mobile-tools.open .edit-fab{
  width:32px!important;
  min-width:32px!important;
  height:32px!important;
  min-height:32px!important;
  border-radius:50%!important;
  background:#00a884!important;
  color:#fff!important;
  opacity:1!important;
  box-shadow:0 4px 14px rgba(0,0,0,.2)!important;
}
.layout-mobile .phone-stage-shell>.mobile-tools.open .edit-trigger-icon,
.phone-stage-shell>.mobile-tools.open .edit-trigger-icon{display:grid!important}
.layout-mobile .phone-stage-shell>.mobile-tools.open .edit-trigger-icon svg,
.phone-stage-shell>.mobile-tools.open .edit-trigger-icon svg{width:15px!important;height:15px!important}

/* 输入内容和发送键同步，文字垂直居中。 */
.layout-mobile .composer-wrap{align-items:flex-end!important}
.layout-mobile .composer{
  height:auto!important;
  min-height:44px!important;
  max-height:112px!important;
  border-radius:23px!important;
  padding:0 7px 0 4px!important;
  align-items:flex-end!important;
}
.layout-mobile .composer-text-input{
  min-height:20px!important;
  max-height:84px!important;
  padding:11px 2px 9px!important;
  line-height:20px!important;
  font-size:14px!important;
  overflow-y:auto!important;
  white-space:pre-wrap!important;
}
.layout-mobile .composer-text-input::-webkit-scrollbar{display:none!important}
.layout-mobile .composer button{align-self:flex-end!important;margin-bottom:3px!important}
.layout-mobile .mic-button,
.layout-mobile .composer-action.is-send{
  align-self:flex-end!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
}
.layout-mobile .composer-action.is-send svg{
  width:19px!important;
  height:19px!important;
  fill:currentColor!important;
  stroke:none!important;
}

/* 图片消息边界和右下角信息。 */
.layout-mobile .image-bubble{
  padding:1px 1px 17px!important;
  border-radius:14px!important;
  box-shadow:0 1px .4px rgba(11,20,26,.09)!important;
}
.layout-mobile .image-bubble.outgoing{background:rgba(217,253,211,.86)!important}
.layout-mobile .image-bubble.incoming{background:#fff!important}
.layout-mobile .image-bubble-meta{
  right:8px!important;
  bottom:5px!important;
  font-size:9.4px!important;
  line-height:10px!important;
}
.layout-mobile .image-bubble:not(:has(.image-caption)) .image-bubble-meta{
  padding:2px 4px!important;
  background:rgba(17,27,33,.32)!important;
  border-radius:6px!important;
}
.layout-mobile .image-bubble:not(:has(.image-caption)) .image-media-wrap::after{
  height:38px!important;
  background:linear-gradient(to top,rgba(0,0,0,.33),rgba(0,0,0,.01))!important;
}

/* 顶部栏只做轻量校准，不再大改。 */
.layout-mobile .chat-header{height:55px!important;padding:0 4px 0 1px!important}
.layout-mobile .contact-avatar{width:35px!important;height:35px!important}
.layout-mobile .contact-info{margin-left:7px!important}
.layout-mobile .contact-info strong{font-size:15px!important;line-height:18px!important}
.layout-mobile .contact-info span{font-size:10.2px!important;line-height:13px!important}
.layout-mobile .header-actions{gap:10px!important}
.layout-mobile .header-actions svg{width:19px!important;height:19px!important;stroke-width:1.95!important}


/* 系统时间 */
.status-time.system-clock-active{cursor:default!important;outline:0!important}
.panel-toggle + .panel-toggle{margin-top:8px}


/* v41：图片三种保存模式 */
.image-source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0 16px}
.image-source-grid button{border:1px solid #d8e0e3;background:#fff;border-radius:12px;padding:14px 10px;text-align:left;color:#17242b;min-height:96px}
.image-source-grid button:hover{border-color:#00a884;background:#f5fffb}
.image-source-grid b{display:block;font-size:14px;margin-bottom:6px}
.image-source-grid span{display:block;font-size:11px;line-height:16px;color:#667781}
.remote-image-box{display:grid;gap:8px;padding:12px;border-radius:12px;background:#f7f9fa;border:1px solid #e2e7e9}
.remote-image-box label{font-size:12px;font-weight:650;color:#33454e}
.remote-image-box input{width:100%;box-sizing:border-box;border:1px solid #cfd8dc;border-radius:9px;padding:10px 11px;font-size:13px;outline:0}
.remote-image-box input:focus{border-color:#00a884;box-shadow:0 0 0 2px rgba(0,168,132,.11)}
.remote-image-box button{border:0;border-radius:9px;padding:10px 12px;background:#00a884;color:#fff;font-weight:650}
.image-storage-badge{position:absolute;left:7px;top:7px;z-index:5;padding:2px 6px;border-radius:8px;background:rgba(17,27,33,.7);color:#fff;font-size:9px;line-height:13px;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.image-storage-badge.mode-local{background:rgba(0,128,105,.82)}
.image-storage-badge.mode-remote{background:rgba(35,83,146,.82)}
.image-storage-badge.mode-temporary{background:rgba(156,94,0,.84)}
.preview-mode .image-storage-badge,.export-clean .image-storage-badge,.exporting .image-storage-badge{display:none!important}
@media(max-width:520px){.image-source-grid{grid-template-columns:1fr}.image-source-grid button{min-height:72px}}


/* v42：图片来源标签不进入聊天画面；三点菜单帮助中心 */
.image-storage-badge{display:none!important}
.phone-frame,.desktop-main-chat{position:relative!important}
.header-popover{
  position:absolute;
  z-index:40;
  top:calc(29px + 55px);
  right:7px;
  width:min(238px,calc(100% - 20px));
  padding:6px;
  border:1px solid rgba(17,27,33,.08);
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 28px rgba(11,20,26,.2);
}
.header-popover button{
  width:100%;border:0;background:transparent;color:#17242b;
  display:flex;align-items:center;gap:11px;padding:10px 9px;border-radius:8px;text-align:left;
}
.header-popover button:hover{background:#f2f5f6}
.header-popover svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none;color:#54656f}
.header-popover span{display:flex;flex-direction:column;gap:2px;min-width:0}
.header-popover b{font-size:13.5px;line-height:17px;font-weight:600}
.header-popover small{font-size:10.5px;line-height:14px;color:#667781}
.desktop-header-popover{top:52px;right:10px;width:250px}

.help-intro{display:flex;flex-direction:column;gap:5px;padding:14px;border-radius:12px;background:#e9f8f3;border:1px solid #cdeae0;margin-bottom:12px}
.help-intro b{font-size:16px;color:#006b59}.help-intro span{font-size:12px;line-height:18px;color:#48616b}
.help-section{padding:13px 0;border-bottom:1px solid #e6ebed}
.help-section:last-child{border-bottom:0}
.help-section h3{margin:0 0 6px;font-size:14px;color:#17242b}
.help-section p{margin:0;font-size:12px;line-height:19px;color:#54656f}
.help-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.help-actions button{border:1px solid #cdd9dd;background:#fff;color:#007d69;border-radius:8px;padding:7px 10px;font-size:11.5px;font-weight:600}
.help-actions button:hover{background:#f1fffa;border-color:#00a884}
.shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.shortcut-grid span{font-size:11px;line-height:17px;color:#54656f;padding:8px;border-radius:8px;background:#f5f7f8}
kbd{display:inline-block;min-width:17px;padding:1px 4px;border:1px solid #cdd6da;border-bottom-width:2px;border-radius:4px;background:#fff;color:#26373f;font:10px/15px ui-monospace,SFMono-Regular,Consolas,monospace;text-align:center}
@media(max-width:520px){
  .header-popover{top:calc(env(safe-area-inset-top) + 79px);right:6px;width:226px}
  .shortcut-grid{grid-template-columns:1fr}
}
