/* ========== 仿真截图生成器 · 工具壳 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e6e8eb;
  --text: #1d2129;
  --muted: #86909c;
  --brand: #07c160;
  --brand-d: #06ad56;
  --accent: #1677ff;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
.app-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.brand { font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 6px 14px; border-radius: 18px; font-size: 13px; cursor: pointer;
  transition: .15s; font-family: inherit;
}
.tab:hover { border-color: var(--brand); color: var(--brand-d); }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.export-btn {
  border: none; background: var(--brand); color: #fff; font-weight: 600;
  padding: 9px 20px; border-radius: 8px; font-size: 14px; cursor: pointer;
  font-family: inherit; flex: 0 0 auto;
}
.export-btn:hover { background: var(--brand-d); }
.export-btn:disabled { opacity: .6; cursor: default; }

.layout { flex: 1; display: flex; min-height: 0; }
.editor {
  width: 340px; flex: 0 0 340px; background: var(--panel);
  border-right: 1px solid var(--line); overflow-y: auto; padding: 14px;
}
.editor-head { font-size: 13px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px;
}
.finput {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--text);
  background: #fafbfc; resize: vertical; line-height: 1.5;
}
.finput:focus { outline: none; border-color: var(--brand); background: #fff; }
textarea.finput { min-height: 76px; }
/* 动作按钮（换一批头像）：矮一行，不抢输入框的视觉重量 */
.field .fbtn {
  width: 100%; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff;
  color: var(--text); font: inherit; font-size: 12.5px; padding: 7px 10px;
  cursor: pointer; transition: .15s ease;
}
.field .fbtn:hover { border-color: var(--brand); color: var(--brand-d, #b45309); background: #fffbf2; }
.field .fbtn:active { transform: scale(.99); }

.preview-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.preview {
  flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center;
  padding: 28px; background:
    linear-gradient(45deg, #eceef1 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(-45deg, #eceef1 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(45deg, transparent 75%, #eceef1 75%) -10px 0/20px 20px,
    linear-gradient(-45deg, transparent 75%, #eceef1 75%) -10px 0/20px 20px,
    #f4f5f7;
}
#shot { display: inline-block; line-height: 0; }
.hint {
  flex: 0 0 auto; padding: 10px 18px; background: #fff; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.6;
}
.render-err { color: #f53f3f; padding: 20px; font-size: 13px; }

/* ========== 共享：iOS 状态栏 ========== */
.sim-statusbar {
  height: 44px; display: flex; justify-content: space-between; align-items: center;
  padding: 0 26px; font-size: 15px; font-weight: 600; color: #000;
}
.sim-sb-right { display: flex; align-items: center; gap: 6px; }
.sim-signal { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.sim-signal i { width: 3px; background: #000; border-radius: 1px; }
.sim-signal i:nth-child(1) { height: 4px; } .sim-signal i:nth-child(2) { height: 6px; }
.sim-signal i:nth-child(3) { height: 8px; } .sim-signal i:nth-child(4) { height: 11px; }
.sim-battery { width: 25px; height: 12px; border: 1.4px solid #000; border-radius: 3px; position: relative; padding: 1.5px; }
.sim-battery::after { content: ""; position: absolute; right: -3.5px; top: 3px; width: 2px; height: 5px; background: #000; border-radius: 1px; }
.sim-battery i { display: block; height: 100%; width: 78%; background: #000; border-radius: 1px; }

/* ========== 预设：法院短信 ========== */
.sms-phone { width: 390px; background: #fff; position: relative; overflow: hidden; padding-bottom: 18px; }
.sms-nav { height: 44px; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid #f0f0f0; }
.sms-back { position: absolute; left: 14px; font-size: 28px; color: #007aff; font-weight: 300; line-height: 1; }
.sms-title { font-size: 17px; font-weight: 600; }
.sms-more { position: absolute; right: 18px; font-size: 22px; color: #007aff; letter-spacing: 1px; }
.sms-screen { padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.sms-day { text-align: center; }
.sms-day span { background: #e9e9eb; color: #8a8a8e; font-size: 11px; padding: 3px 8px; border-radius: 8px; }
.sms-bubble {
  background: #e9e9eb; color: #000; padding: 11px 14px; border-radius: 18px;
  border-top-left-radius: 5px; font-size: 16px; line-height: 1.7; max-width: 92%; align-self: flex-start;
  overflow: hidden; word-break: break-all;
}
.sms-ln { margin: 2px 0; }
.sms-redact { display: inline-block; background: #1c1c1e; height: 15px; border-radius: 2px; vertical-align: middle; }
.sms-sign { font-size: 11px; color: #c4c4c8; align-self: center; margin-top: 2px; }
.sms-home { width: 130px; height: 5px; background: #000; border-radius: 3px; margin: 14px auto 0; }

/* ========== 预设：闲鱼 ========== */
.xy-phone { width: 390px; background: #fff; }
.xy-top { background: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f0f0; }
.xy-logo { font-size: 22px; font-weight: 800; color: #ff5000; font-style: italic; }
.xy-search { flex: 1; background: #f5f5f5; border-radius: 18px; padding: 8px 14px; color: #999; font-size: 13px; }
.xy-card { margin: 12px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.xy-thumb { height: 200px; background: linear-gradient(135deg, #ffd9b3, #ffb877); }
.xy-vtag { display: inline-block; background: #fff3e9; color: #ff5000; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 4px; margin-top: 8px; }
.xy-body { padding: 12px 14px; }
.xy-title { font-size: 15px; line-height: 1.4; color: #222; font-weight: 500; }
.xy-price { margin-top: 10px; color: #ff5000; font-size: 22px; font-weight: 800; line-height: 1.2; }
.xy-price small { font-size: 13px; font-weight: 600; }
.xy-orig { color: #bbb; font-size: 12px; text-decoration: line-through; margin-left: 8px; }
.xy-meta { margin-top: 12px; font-size: 12px; color: #999; }
.xy-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f5f5f5; }
.xy-seller { display: flex; align-items: center; gap: 8px; }
.xy-av { width: 26px; height: 26px; border-radius: 50%; background: #ff5000; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.xy-nm { font-size: 12px; color: #666; }
.xy-want { background: #ff5000; color: #fff; font-size: 14px; font-weight: 600; padding: 7px 22px; border-radius: 20px; }

/* ========== 预设：小红书 ========== */
.xhs-wrap { width: 420px; background: #f2f2f2; padding: 14px; }
.xhs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.xhs-logo { color: #ff2442; font-size: 18px; font-weight: 800; }
.xhs-count { background: #ffe5ea; color: #ff2442; font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.xhs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xhs-pc { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.xhs-h { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.xhs-av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; }
.xhs-un { font-size: 11px; color: #999; }
.xhs-t { font-size: 14px; font-weight: 700; color: #222; line-height: 1.4; margin-bottom: 6px; }
.xhs-d { font-size: 12px; color: #666; line-height: 1.5; }
.xhs-m { margin-top: 8px; font-size: 11px; color: #bbb; }
.xhs-c1 .xhs-av { background: #ff7a45; } .xhs-c2 .xhs-av { background: #36cfc9; }
.xhs-c3 .xhs-av { background: #9254de; } .xhs-c4 .xhs-av { background: #ff2442; }
.xhs-foot { text-align: center; color: #aaa; font-size: 11px; margin-top: 14px; }

/* ========== 预设：微信群 ========== */
.wx-composite { display: flex; gap: 12px; align-items: flex-start; }
.wx-qr-page, .wx-info-page {
  width: 390px; background: #fff; border: 1px solid #ededed; border-radius: 0;
  overflow: hidden; flex: 0 0 auto; min-height: 844px;
}
.wx-nav { height: 44px; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid #f0f0f0; }
.wx-back { position: absolute; left: 14px; font-size: 26px; color: #181818; font-weight: 300; line-height: 1; }
.wx-nav-title { font-size: 17px; font-weight: 600; }
.wx-nav-more { position: absolute; right: 16px; font-size: 20px; color: #181818; }
/* 我的二维码 */
.wx-qr-page { padding: 0 0 22px; }
.wx-qr-avatar {
  width: 64px; height: 64px; margin: 26px auto 10px; border-radius: 12px;
  background: #f2f2f2; display: flex; align-items: center; justify-content: center;
  font-size: 34px; overflow: hidden;
}
.wx-qr-name { text-align: center; font-size: 16px; font-weight: 600; color: #181818; }
.wx-qr-box { width: 200px; margin: 18px auto; }
.wx-qr-box svg { display: block; width: 200px; height: 200px; }
.wx-qr-tip { text-align: center; font-size: 13px; color: #999; }
/* 聊天信息 */
.wx-mem-section { padding: 14px 12px 6px; border-bottom: 8px solid #f5f5f5; }
.wx-mem-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 4px; }
.wx-mem { display: flex; flex-direction: column; align-items: center; }
.wx-mem-avwrap { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wx-mem-av {
  width: 52px; height: 52px; border-radius: 8px; color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center; background: #c8c8c8;
}
.wx-mem-emoji { background: #f2f2f2; font-size: 28px; }
.wx-add { background: #f2f2f2; color: #999; font-size: 28px; font-weight: 300; }
.wx-mem-nm { font-size: 11px; color: #555; font-weight: 500; margin-top: 5px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.wx-mem-more { font-size: 13px; color: #576b95; text-align: center; margin-top: 10px; }
.wx-list { padding: 4px 0; }
.wx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border-bottom: 1px solid #f2f2f2; font-size: 15px; color: #181818;
}
.wx-row-l { color: #181818; }
.wx-row-r { display: flex; align-items: center; gap: 6px; color: #b2b2b2; font-size: 14px; }
.wx-sub { color: #888; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-chev { color: #c8c8c8; font-size: 18px; }
.wx-qr-mini svg { display: block; width: 40px; height: 40px; }

/* ========== 微信头像（统一：真人照片 / emoji / 默认灰人形） ========== */
.wx-av { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f2f2f2; flex: 0 0 auto; }
.wx-av-emoji { background: #f2f2f2; font-size: 26px; line-height: 1; }
.wx-av-def { background: #f2f2f2; }
.wx-av-def svg { display: block; width: 100%; height: 100%; }
.wx-av-add { background: #f2f2f2; color: #07c160; font-size: 30px; font-weight: 300; border-radius: 8px; }
/* 群成员网格里的头像沿用方形圆角 */
.wx-mem .wx-av { border-radius: 8px; }
.wx-mem .wx-av-add { border-radius: 8px; }

/* ========== 微信状态栏补丁（4G / 电池%） ========== */
.wx-sb .sim-sb-right { gap: 5px; }
.wx-sb-net { font-size: 12px; font-weight: 700; color: #000; letter-spacing: .5px; }
.wx-bat { display: inline-flex; align-items: center; gap: 2px; }
.wx-bat i { display: block; width: 22px; height: 11px; border: 1.4px solid #000; border-radius: 3px; padding: 1.5px; position: relative; }
.wx-bat i::after { content: ""; position: absolute; right: -3.5px; top: 3px; width: 2px; height: 5px; background: #000; border-radius: 1px; }
.wx-bat b { font-size: 11px; font-weight: 700; color: #000; }
.wx-bat i::before { content: ""; display: block; height: 100%; background: #000; border-radius: 1px; }

/* ========== 预设：微信聊天（单聊 / 群聊） ========== */
.wx-chat { width: 390px; background: #ededed; overflow: hidden; flex: 0 0 auto; }
.wx-chat .sim-statusbar { background: #ededed; }
.wx-chat .wx-nav { background: #ededed; border-bottom: 1px solid #d8d8d8; }
.wx-nav-sub { font-size: 11px; color: #888; font-weight: 400; margin-left: 6px; }
.wx-chat-body { background: #ededed; padding: 10px 10px 16px; min-height: 560px; }
.wx-divider { text-align: center; font-size: 12px; color: #9aa0a6; margin: 10px 0; }
.wx-msg { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; }
.wx-msg-sent { flex-direction: row; justify-content: flex-end; }
.wx-msg-recv { flex-direction: row; justify-content: flex-start; }
.wx-bub { position: relative; max-width: 240px; padding: 9px 12px; font-size: 16px; line-height: 1.45;
  border-radius: 5px; word-break: break-word; white-space: pre-wrap; }
.wx-bub-recv { background: #fff; color: #181818; }
.wx-bub-sent { background: #95EC69; color: #181818; }
/* 气泡小三角（贴真实微信：接收在左、发送在右） */
.wx-tail { position: absolute; top: 13px; width: 0; height: 0; border: 6px solid transparent; }
.wx-tail-recv { left: -11px; border-right-color: #fff; }
.wx-tail-sent { right: -11px; border-left-color: #95EC69; }
/* 底部输入栏 */
.wx-inputbar { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 8px;
  background: #f7f7f7; border-top: 1px solid #d8d8d8; }
.wx-ib-ic { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.wx-ib-voice, .wx-ib-emoji { background: #fff; border: 1px solid #e3e3e3; }
.wx-ib-plus { background: #fff; border: 1px solid #e3e3e3; border-radius: 7px; }
.wx-ib-input { position: relative; flex: 1; height: 36px; background: #fff; border-radius: 6px;
  display: flex; align-items: center; padding: 0 30px 0 10px; }
.wx-ib-ph { color: #b6bcc2; font-size: 14px; }
.wx-ib-input svg { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
