/* ============================================================
 * contract-builder.css — 旅行社通知文件生成插件（Vue 3 版）独立样式
 * 由 view_marketing_presale.htm 内联样式独立而来
 * 注意：本文件将被页面外链引用（<link>），不能出现裸 </style>
 * 版式定位：旅行社向渠道/客户发送的公文式通知（涨价/优惠告警/赠送截止）
 * ============================================================ */
[v-cloak]{display:none !important;}

/* ===== 整体布局：左右双栏，两栏各自独立滚动 ===== */
html,body{height:100%;}
body{margin:0;}
#ct-app{display:flex;flex-direction:column;height:100vh;min-height:0;background:#f0f2f5;}
.ct-layout{flex:1 1 auto;min-height:0;display:flex;gap:0;}
.ct-left{width:384px;flex:none;border-right:1px solid #eee;padding:14px 18px 26px;
  overflow-y:auto;background:#fff;overscroll-behavior:contain;}
.ct-right{flex:1;min-width:0;padding:26px 36px 60px;overflow-y:auto;background:#f0f2f5;overscroll-behavior:contain;}

/* 细滚动条（桌面端更精致） */
.ct-left::-webkit-scrollbar,.ct-right::-webkit-scrollbar{width:10px;height:10px;}
.ct-left::-webkit-scrollbar-thumb,.ct-right::-webkit-scrollbar-thumb{background:#cfd4da;border-radius:6px;border:2px solid transparent;background-clip:content-box;}
.ct-left::-webkit-scrollbar-track,.ct-right::-webkit-scrollbar-track{background:transparent;}

.ct-field{margin-bottom:13px;}
.ct-field label{display:block;font-size:12px;color:#666;margin-bottom:4px;}
.ct-field input,.ct-field select,.ct-field textarea{
  width:100%;box-sizing:border-box;border:1px solid #ddd;border-radius:6px;
  padding:7px 9px;font-size:13px;font-family:inherit;
}
.ct-field textarea{resize:vertical;min-height:60px;}
/* 日期/时间原生控件（date / time / datetime-local）：点击输入框任意位置即可弹出面板（配合 JS showPicker()），
   此处统一视觉：与普通输入框等高的触发外观 + 悬停/聚焦反馈 + 放大展开图标，桌面与移动端均为系统原生选择器 */
.ct-left input[type="date"],
.ct-left input[type="time"],
.ct-left input[type="datetime-local"]{
  cursor:pointer;color:#333;min-height:34px;
}
.ct-left input[type="date"]:hover,
.ct-left input[type="time"]:hover,
.ct-left input[type="datetime-local"]:hover{
  border-color:#c8161d;background:#fffbfb;
}
.ct-left input[type="date"]:focus,
.ct-left input[type="time"]:focus,
.ct-left input[type="datetime-local"]:focus{
  outline:none;border-color:#c8161d;box-shadow:0 0 0 2px rgba(200,22,29,.12);
}
/* Chromium 系：日历/时钟展开图标放大 + 悬停反馈，示意“点击即可弹” */
.ct-left input[type="date"]::-webkit-calendar-picker-indicator,
.ct-left input[type="time"]::-webkit-calendar-picker-indicator,
.ct-left input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  cursor:pointer;opacity:.55;width:20px;height:20px;padding:4px;border-radius:6px;
}
.ct-left input[type="date"]::-webkit-calendar-picker-indicator:hover,
.ct-left input[type="time"]::-webkit-calendar-picker-indicator:hover,
.ct-left input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover{
  opacity:1;background:rgba(200,22,29,.12);
}
/* Firefox：高度对齐 */
@-moz-document url-prefix(){
  .ct-left input[type="date"],.ct-left input[type="datetime-local"]{min-height:34px;}
}
.ct-field-row{display:flex;gap:10px;}
.ct-field-row .ct-field{flex:1;}
/* 文号行：输入框 + 「＋公司名 / ＋年份」快捷按钮（引导使用 {short}/{year}，避免手打公司名） */
.ct-field-row.ct-doc-no-row{align-items:center;}
.ct-field-row.ct-doc-no-row input{width:auto;flex:1;min-width:0;}
.ct-mini{flex:none;box-sizing:border-box;border:1px solid #c8161d;background:#fff;color:#c8161d;
  border-radius:6px;padding:7px 10px;font-size:12px;cursor:pointer;white-space:nowrap;}
.ct-mini:hover{background:#c8161d;color:#fff;}
/* 文号写死公司名时的提示行（一键改为 {short} 模板） */
.ct-fix-tip{margin-top:6px;font-size:11.5px;color:#b45309;line-height:1.6;}
.ct-fix-tip a{color:#c8161d;text-decoration:underline;}
/* 范围滑块统一外观（大小/倾斜/排版微调共用；#ct-app 全局生效，保证弹窗内滑块同款样式） */
#ct-app input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:4px;margin:6px 0;
  background:#e4e7ec;border:none;border-radius:2px;outline:none;cursor:pointer;padding:0;box-sizing:border-box;}
#ct-app input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:13px;height:13px;
  border-radius:50%;background:#c8161d;border:1px solid #fff;box-shadow:0 0 2px rgba(0,0,0,.3);cursor:pointer;}
#ct-app input[type=range]::-moz-range-thumb{width:13px;height:13px;border-radius:50%;background:#c8161d;
  border:1px solid #fff;box-shadow:0 0 2px rgba(0,0,0,.3);cursor:pointer;}
.ct-sec-title{font-size:13px;font-weight:700;color:#333;margin:16px 0 8px;padding-left:8px;border-left:3px solid #c8161d;}
.ct-sec-sub{display:block;margin:4px 0 0;font-size:11px;font-weight:400;color:#b3a598;line-height:1.5;}

/* ===== 通知类型选择：标题下快捷搜索框 + 默认展示 5 条、超出自动内部滚动 + 热门标签 ===== */
.tpl-search{display:flex;align-items:center;gap:6px;height:34px;margin-bottom:8px;padding:0 9px;
  border:1px solid #e3e3e3;background:#fafafa;border-radius:8px;transition:border-color .15s,box-shadow .15s,background .15s;}
.tpl-search:focus-within{border-color:#c8161d;background:#fff;box-shadow:0 0 0 2px rgba(200,22,29,.10);}
.tpl-search .ts-ic{font-size:12px;line-height:1;opacity:.6;flex:none;}
.tpl-search input{flex:1 1 auto;min-width:0;height:auto;border:none;background:transparent;outline:none;
  font-size:13px;color:#333;padding:0 4px;box-sizing:border-box;}
.tpl-search input::placeholder{color:#c0b8ae;}
.tpl-search .ts-clear{flex:none;cursor:pointer;font-size:12px;color:#b8b8b8;padding:2px 4px;line-height:1;}
.tpl-search .ts-clear:hover{color:#c8161d;}
.tpl-scroll{display:flex;flex-direction:column;gap:8px;}
.tpl-scroll.over{max-height:317px;overflow-y:auto;padding-right:5px;overscroll-behavior:contain;scrollbar-width:thin;}
.tpl-scroll.over::-webkit-scrollbar{width:6px;}
.tpl-scroll.over::-webkit-scrollbar-thumb{background:#e0b7a9;border-radius:4px;}
.tpl-scroll.over::-webkit-scrollbar-track{background:transparent;}
.tpl-empty{padding:18px 6px;text-align:center;font-size:12px;color:#b3a89c;}
.tpl-item{border:1px solid #e5e5e5;border-radius:8px;padding:9px 12px;cursor:pointer;transition:.15s;
  box-sizing:border-box;overflow:hidden;flex:none;}
.tpl-item:hover{border-color:#c8161d;box-shadow:0 1px 6px rgba(200,22,29,.06);}
.tpl-item.active{border-color:#c8161d;background:#fff7ef;}
.tpl-line{display:flex;align-items:center;gap:8px;min-width:0;}
.tpl-line .nm{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;color:#333;}
.tpl-item.active .nm{color:#c8161d;}
.tpl-d{font-size:12px;color:#888;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tag-hot{flex:none;height:17px;line-height:15px;padding:0 7px;border-radius:9px;font-size:10px;font-weight:700;white-space:nowrap;box-sizing:border-box;}
.tag-hot.lv1{background:linear-gradient(90deg,#ffe0c2,#ffcf9e);color:#b93806;border:1px solid #efae6d;}
.tag-hot.lv2,.tag-hot.lv3{background:#fff3ef;color:#e05b3c;border:1px solid #f3c7b8;}

/* ===== 印章面板（圆形公章） ===== */
.seal-panel{border:1px solid #e5e5e5;border-radius:8px;padding:12px;margin-top:14px;background:#fafbff;}
.seal-panel h4{font-size:13px;margin:0 0 10px;color:#333;}
.seal-type-tag{display:inline-block;padding:4px 10px;border:1px solid #c8161d;border-radius:6px;font-size:12px;color:#c8161d;background:#fff7ef;margin-bottom:10px;}
.seal-color{display:flex;gap:6px;align-items:center;margin-bottom:8px;}
.seal-color .sw{width:22px;height:22px;border-radius:50%;cursor:pointer;border:2px solid #fff;box-shadow:0 0 0 1px #ddd;}
.seal-color .sw.active{box-shadow:0 0 0 2px #333;}
.seal-list{margin-top:10px;max-height:160px;overflow:auto;}
.seal-list-item{display:flex;align-items:center;justify-content:space-between;padding:5px 8px;border-bottom:1px solid #eee;font-size:12px;cursor:pointer;border-radius:6px;}
.seal-list-item:hover{background:#f5f6fa;}
.seal-list-item.active{background:#fff7ef;}
.seal-list-item .nm{display:flex;align-items:center;gap:8px;}
.seal-list-item .nm .ic{width:22px;height:22px;border:2px solid #c8161d;border-radius:50%;box-sizing:border-box;}
.seal-list-item .del{color:#999;cursor:pointer;}
.seal-list-item .del:hover{color:#c8161d;}
.seal-tip{font-size:11px;color:#999;margin-top:6px;line-height:1.5;}

/* ===== 章体主文字自定义下拉（2026-09-10）
   —— 替代原生 datalist：原生下拉在输入框有值时会按输入内容过滤、导致“选项没全部出来”，
      且自带不可样式化的原生小箭头（与右侧自绘 ▼ 叠加就出现“多一个下三角”）；
      现改为完全自绘下拉：点输入框或右侧箭头即列出后台「章体主文字选项清单」全部选项，
      可点选 / 键盘上下+回车，也可直接输入自定义文字。 ===== */
.bk-title-drop{position:relative;}
.bk-title-drop__field{position:relative;}
.bk-title-drop__input{
  width:100%;box-sizing:border-box;height:34px;padding:0 34px 0 10px;
  border:1px solid #ddd;border-radius:6px;font-size:13px;font-family:inherit;color:#333;
  background:#fff;outline:none;transition:border-color .15s,box-shadow .15s;
}
.bk-title-drop__input:hover{border-color:#c8161d;background:#fffbfb;}
.bk-title-drop__input:focus{border-color:#c8161d;box-shadow:0 0 0 2px rgba(200,22,29,.12);}
.bk-title-drop__arrow{
  position:absolute;right:4px;top:50%;margin:-12px 0 0;width:24px;height:24px;
  border:none;background:transparent;padding:0;cursor:pointer;color:#9aa0a8;
  display:flex;align-items:center;justify-content:center;border-radius:6px;
  transition:transform .2s,color .15s,background .15s;-webkit-tap-highlight-color:transparent;
}
.bk-title-drop__arrow:hover{color:#c8161d;background:rgba(200,22,29,.08);}
.bk-title-drop__arrow.on{color:#c8161d;transform:rotate(180deg);}
.bk-title-drop__arrow svg{display:block;}
.bk-title-drop__menu{
  position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:120;
  background:#fff;border:1px solid #e7e7e7;border-radius:8px;
  box-shadow:0 10px 26px rgba(31,41,55,.16);
  overflow:hidden;animation:bkTitleDropIn .14s ease-out;
}
@keyframes bkTitleDropIn{from{opacity:0;transform:translateY(-5px);}to{opacity:1;transform:none;}}
.bk-title-drop__scroller{max-height:236px;overflow-y:auto;overscroll-behavior:contain;padding:5px;}
.bk-title-drop__scroller::-webkit-scrollbar{width:8px;}
.bk-title-drop__scroller::-webkit-scrollbar-thumb{background:#d5d9de;border-radius:4px;}
.bk-title-drop__item{
  display:flex;align-items:center;gap:4px;padding:7px 8px;font-size:13px;color:#374151;
  border-radius:6px;cursor:pointer;line-height:1.5;
}
.bk-title-drop__item:hover,.bk-title-drop__item.cur{background:#fff1e6;}
.bk-title-drop__item.on{background:#fff1e6;color:#c8161d;font-weight:600;}
.bk-title-drop__tick{flex:none;width:15px;color:#c8161d;font-weight:700;}
.bk-title-drop__txt{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bk-title-drop__empty{padding:13px 10px;font-size:12px;color:#9aa0a8;text-align:center;}
.bk-hint{margin-top:6px;font-size:12px;color:#8b98a9;line-height:1.5;}

/* ===== 盖章公司自绘下拉（观感与「章体主文字」下拉完全一致；底部固定「收录公司」开通入口） ===== */
.org-pick{position:relative;}
.org-pick .bk-title-drop__field{position:relative;}
.org-pick__input{caret-color:transparent;cursor:pointer;}
.org-pick__input.empty{color:#a8a099;font-weight:400;}
.org-pick .bk-title-drop__arrow{color:#9aa0a8;}
.org-pick .bk-title-drop__menu{display:block;z-index:130;}
.org-pick .bk-title-drop__scroller{max-height:236px;}
.org-pick__entry{position:relative;padding:9px 12px;margin:2px 5px 5px;border-top:1px dashed #ecdcc9;
  font-size:13px;color:#c8161d;font-weight:600;cursor:pointer;border-radius:0 0 6px 6px;
  background:#fffaf4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.org-pick__entry:hover{background:#fff1e6;color:#8f0d14;}

/* ===== 印章排版微调面板（滑块实时驱动右侧公章预览） ===== */
.seal-layout-box{margin-top:12px;padding:10px 10px 2px;background:#fff;border:1px solid #efe3d8;border-radius:8px;}
.seal-layout-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;}
.seal-layout-hd b{font-size:12px;color:#8a4b12;}
.seal-layout-hd .rst{font-size:11px;color:#c8161d;border:1px solid #c8161d;background:#fff;border-radius:6px;padding:2px 10px;cursor:pointer;}
.seal-layout-hd .rst:hover{background:#c8161d;color:#fff;}
.seal-layout-box .ct-field{margin-bottom:8px;}
.seal-layout-box .ct-field label i{font-style:normal;color:#b6a99b;font-size:11px;margin-left:4px;}
.seal-layout-box .rg{display:flex;align-items:center;gap:8px;}
.seal-layout-box .rg input[type=range]{flex:1;min-width:0;}
.seal-layout-box .rg .val{min-width:38px;text-align:right;font-size:12px;font-weight:700;color:#c8161d;}
.seal-layout-box .cb-row{display:flex;align-items:flex-start;gap:6px;margin:2px 0 4px;}
.seal-layout-box .cb-row input[type=checkbox]{width:auto;flex:none;height:auto;margin:2px 0 0;padding:0;border:none;border-radius:0;accent-color:#c8161d;}
.seal-layout-box .cb-row label{display:block;margin:0;font-size:11px;line-height:1.5;color:#9a8c7d;cursor:pointer;}

/* ===== 通知纸张 ===== */
.paper-wrap{background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.12);max-width:760px;margin:0 auto;
  padding:52px 58px 64px;font-family:"Songti SC","SimSun",serif;color:#1a1a1a;position:relative;}
.paper-wrap h1.ct-title{text-align:center;font-size:23px;font-weight:700;letter-spacing:1px;margin:0 0 14px;}
.ct-meta{text-align:right;font-size:13px;color:#555;margin:-6px 0 18px;}
.ct-salute{font-size:15px;font-weight:600;margin:0 0 6px;line-height:1.9;}
.ct-para{font-size:15px;line-height:2.05;margin:0 0 10px;text-align:justify;text-indent:2em;}
.ct-extra{margin:14px 0 0;font-size:14px;line-height:1.9;text-indent:2em;color:#333;}
.ct-extra .x{font-weight:700;}

/* ===== 通知页头（标题区）：标题与正文分离；页头风格 = 后台类型库 head_style，预留多风格可继续扩展 =====
   间距规范（三段，解决“标题 / 文号编号行 / 红线 / 正文”挤在一起的问题）：
     标题 ↔ 文号编号行：.ct-title margin-bottom（默认 14px）
     文号编号行 ↔ 红线：各风格的 padding-bottom（默认 18~26px）
     红线 ↔ 正文：各风格的 margin-bottom（默认 26px）
   「文号」默认取自所选通知类型后台设置（可前台临时改）；文号居中、编号居右；二者皆空整行隐藏 */
.ct-hd{position:relative;margin:0 0 26px;}
.ct-hd .ct-title{margin:0 0 14px;transition:all .2s;}
/* 文号(居中) + 编号(居右)：标题下方同一信息行，13px 深灰，超长省略；居中不用 transform 以便 html2canvas/Word 保真 */
/* 文号(居中) + 编号(居右)：三格表格布局（左占位格 / 文号居中 / 编号居右）
   用 table 而非 absolute：浏览器、Word(.doc) 导出、html2canvas 截图表现一致，不再出现编号掉位 */
.ct-hd .ct-meta{display:table;width:100%;table-layout:fixed;min-height:15px;line-height:15px;font-size:13px;color:#555;margin:0;}
.ct-meta-pad{display:table-cell;width:26%;}
.ct-hd .ct-doc-no{display:table-cell;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ct-hd .ct-sn-no{display:table-cell;width:26%;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* style1 · 经典公文：居中标题 + 底部红色双头线（保持原版公文观感） */
.ct-hd-style1{text-align:center;padding-bottom:18px;border-bottom:2px solid #c8161d;margin-bottom:26px;}
.ct-hd-style1 .ct-title{text-align:center;}
.ct-hd-style1 .ct-meta{text-align:center;color:#555;}
/* style2 · 左栏简约：标题左对齐，左侧红色竖条，底部淡线 */
.ct-hd-style2{border-left:4px solid #c8161d;padding:2px 0 14px 16px;border-bottom:1px solid #ececec;margin-bottom:24px;}
.ct-hd-style2 .ct-title{text-align:left;}
.ct-hd-style2 .ct-meta{text-align:center;color:#555;}
/* style3 · 红带徽章卡：浅红底 + 顶部粗红条，标题深红 */
.ct-hd-style3{background:#fdf4f4;border-top:3px solid #c8161d;border-bottom:1px solid #f2dcdc;padding:18px 20px 20px;text-align:center;margin-bottom:26px;}
.ct-hd-style3 .ct-title{text-align:center;color:#a30d12;}
.ct-hd-style3 .ct-meta{text-align:center;color:#7a6a6a;}
/* style4 · 红头单实线：居中标题 + 编号，下方一条红色实线（最通用的红头文件版式） */
.ct-hd-style4{text-align:center;padding-bottom:20px;border-bottom:1.5px solid #c8161d;margin-bottom:26px;}
.ct-hd-style4 .ct-title{text-align:center;}
.ct-hd-style4 .ct-meta{text-align:center;color:#555;}
/* style5 · 红头双实线（文武线）：上细下粗两条红线 */
.ct-hd-style5{position:relative;text-align:center;padding-bottom:22px;border-bottom:3px solid #c8161d;margin-bottom:26px;}
.ct-hd-style5::after{content:"";position:absolute;left:0;right:0;bottom:9px;height:1px;background:#c8161d;}
.ct-hd-style5 .ct-title{text-align:center;}
.ct-hd-style5 .ct-meta{text-align:center;color:#555;}
/* style6 · 单实线嵌五角星：红线正中嵌红色五角星（机关公文常见版式） */
.ct-hd-style6{position:relative;text-align:center;padding-bottom:26px;margin-bottom:26px;}
.ct-hd-style6::before{content:"";position:absolute;left:0;right:0;bottom:8px;height:2px;background:#c8161d;}
.ct-hd-style6::after{content:"★";position:absolute;left:50%;bottom:-1px;transform:translateX(-50%);
  background:#fff;padding:0 12px;color:#c8161d;font-size:19px;line-height:1;}
.ct-hd-style6 .ct-title{text-align:center;}
.ct-hd-style6 .ct-meta{text-align:center;color:#555;}

/* ===== 通知主体（后台富文本正文，兼容 UEditor 输出的 p/table/img 等标签排版） ===== */
.ct-body{font-size:15px;line-height:2.05;color:#1a1a1a;text-align:justify;}
.ct-body p{margin:0 0 10px;line-height:2.05;}
.ct-body img{max-width:100%;height:auto;}
.ct-body ul,.ct-body ol{padding-left:2em;margin:0 0 10px;}
.ct-body li{margin:2px 0;}
.ct-body table{max-width:100%;border-collapse:collapse;margin:0 0 10px;}
.ct-body th,.ct-body td{border:1px solid #d8d8d8;padding:5px 9px;font-size:14px;text-align:left;}
.ct-body h1,.ct-body h2,.ct-body h3,.ct-body h4,.ct-body h5{font-weight:700;margin:14px 0 8px;line-height:1.6;}

/* 落款区：签发人（手写体）→ 发布单位 → 日期，右对齐单栏 */
.ct-foot{margin-top:54px;text-align:right;}
.ct-foot p{font-size:14px;line-height:2.1;margin:0;}
.ct-foot .ct-foot-org{font-size:16px;font-weight:700;letter-spacing:1px;}
.ct-foot .ct-foot-date{color:#444;}
.ct-foot-sign{padding-right:26px;}
/* 手写签名字体：优先「Zhi Mang Xing」（开源行书体，由页面 <head> 中 @font-face 定义，
   字体文件位于 skin/assets/fonts/zhi-mang-xing.woff2，绝对地址引入可被导出样式收集）；
   其后为系统行楷/楷体回退，保证任何环境都能以手写风格呈现 */
.handwrite{font-family:"Zhi Mang Xing","STXingkai","华文行楷","KaiTi","楷体","DFKai-SB","TW-Kai","AR PL UKai CN",cursive;
  font-size:36px;font-weight:700;letter-spacing:3px;line-height:1.4;}

/* ===== 印章叠加层 =====
 * 真实印章盖在纸面文字上时是「半透明墨色」：下方文字能透过印泥隐约显现。
 * 透明通道用 .seal-node 内联 opacity(0.82) 实现（HTML → 内联样式对 Word/PNG/JPG/PDF 导出均保留），
 * 因此这里不再用 CSS 强设不透明 opacity；is-active 选中仅加虚线框，不再把印章变全不透明。
 */
.seal-layer{position:absolute;inset:0;pointer-events:none;z-index:5;}
.seal-node{position:absolute;pointer-events:auto;cursor:move;filter:url(#sealInk) url(#sealEdge) drop-shadow(0.6px 1px 0.4px rgba(0,0,0,.18));will-change:transform;touch-action:none;-webkit-user-select:none;user-select:none;}
.seal-node.is-dragging{opacity:.92;cursor:grabbing;transition:none;}
.seal-node.is-active{outline:2px dashed #2b7cff;outline-offset:3px;}
.seal-node > span{display:block;width:100%;height:100%;}
.seal-node svg{display:block;width:100%;height:100%;}
.seal-del{position:absolute;top:-10px;right:-10px;width:20px;height:20px;border-radius:50%;background:#c8161d;color:#fff;border:none;cursor:pointer;font-size:12px;line-height:1;padding:0;}

/* ===== 预览水印（仅实时预览可见，防截图冒用；导出/打印自动去除） ===== */
.wm-layer{position:absolute;top:0;left:0;right:0;bottom:0;z-index:6;overflow:hidden;pointer-events:none;}
.wm-layer svg{display:block;width:100%;height:100%;}
@media print{.wm-layer{display:none!important;}}

/* ===== 打印（导出 PDF）：只输出纸张本体 =====
   隐藏顶部声明条 / 左侧填写面板 / 导出栏 / 提示条 / 收费弹窗 / 公章删除按钮，
   并把纸张还原为整页流式（去掉阴影与最大宽度），页边距交由浏览器打印设置接管。 */
@media print{
  html,body{height:auto;background:#fff;}
  #ct-app{display:block;height:auto;background:#fff;}
  .ct-layout{display:block;}
  .ct-warn,.export-bar,.live-stats,.ct-left,.toast,.dp-mask,.seal-del{display:none!important;}
  .ct-right{padding:0;background:#fff;overflow:visible;}
  .paper-wrap{box-shadow:none;max-width:none;margin:0;padding:0;}
}

/* ===== 顶部免责声明条 ===== */
.ct-warn{display:flex;gap:9px;align-items:flex-start;padding:9px 30px;background:#fff8e1;border-bottom:1px solid #f0d98c;color:#8a6d1a;font-size:13px;line-height:1.75;flex:none;}
.ct-warn b{color:#a36a00;}
.ct-warn p{margin:0;}
@media (max-width:768px){.ct-warn{padding:9px 12px;font-size:12px;line-height:1.7;}}

/* ===== 导出栏 ===== */
.export-bar{display:flex;gap:10px;padding:12px 30px;background:#fff;border-bottom:1px solid #eee;align-items:center;flex:none;}
.export-bar .spacer{flex:1;}
.btn{display:inline-flex;align-items:center;background:#c8161d;color:#fff;border:none;
  padding:8px 16px;border-radius:6px;cursor:pointer;font-size:13px;transition:all .18s;white-space:nowrap;}
.btn:hover{opacity:.9;}
/* 公章排版微调（低调辅助按钮，置于导出按钮前） */
.btn.lay-btn{background:#fff;color:#a04a12;border:1px solid #e0b384;}
.btn.lay-btn:hover{opacity:1;border-color:#c8161d;color:#c8161d;background:#fff7ef;box-shadow:0 0 0 3px rgba(200,22,29,.08);}
/* 导出 JPG：高亮主操作（红色渐变 + 光扫动画 + 投影浮起） */
.btn.export-main{position:relative;overflow:hidden;font-weight:700;padding:9px 22px;border-radius:8px;
  background:linear-gradient(135deg,#f03535 0%,#c8161d 52%,#a60f18 100%);border:1px solid #ab0f18;
  box-shadow:0 5px 16px rgba(200,22,29,.32);}
.btn.export-main:hover{opacity:1;transform:translateY(-1px);box-shadow:0 8px 22px rgba(200,22,29,.42);}
.btn.export-main:active{transform:none;box-shadow:0 3px 8px rgba(200,22,29,.3);}
.btn.export-main::after{content:"";position:absolute;top:0;left:-70%;width:45%;height:100%;
  background:linear-gradient(100deg,rgba(255,255,255,0),rgba(255,255,255,.42),rgba(255,255,255,0));
  transform:skewX(-20deg);animation:expShine 3.4s ease-in-out infinite;pointer-events:none;}
@keyframes expShine{0%{left:-70%;}55%,100%{left:150%;}}
.export-sep{width:1px;height:22px;background:#e5e5e5;margin:0 2px;}
.export-options{font-size:12px;color:#666;}

/* ===== 导出按钮价格标签 ===== */
.btn .amt{margin-left:7px;padding:1px 8px;border-radius:999px;font-size:11.5px;font-style:normal;background:rgba(255,255,255,.24);}
.btn.export-main .amt{background:#fff;color:#c8161d;font-weight:700;}
.btn.lay-btn .amt{background:#fdf0e3;color:#b25a1c;}

/* ===== 顶栏「实时人气」演示数据（虚拟，未接后端统计；接入后替换 JS _bootUsage 数据源即可） ===== */
.live-stats{display:flex;align-items:center;gap:22px;flex-wrap:wrap;padding:6px 30px;flex:none;
  background:linear-gradient(90deg,#fff9f4,#fffdfb);border-bottom:1px solid #ffe7d4;font-size:12px;color:#8a6a4c;}
.live-stats .ls{display:inline-flex;align-items:center;gap:5px;line-height:1;white-space:nowrap;}
.live-stats .ls i{font-style:normal;}
.live-stats .ls b{color:#c8161d;font-size:14px;font-weight:800;font-family:Georgia,Times,serif;}
.live-stats .ls .dot{width:7px;height:7px;border-radius:50%;background:#22c55e;animation:lsPulse 1.8s ease-in-out infinite;}
@keyframes lsPulse{0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.5);}70%{box-shadow:0 0 0 6px rgba(34,197,94,0);}}

/* ===== Toast ===== */
.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#333;color:#fff;padding:9px 18px;border-radius:6px;font-size:13px;z-index:999;opacity:0;transition:.2s;pointer-events:none;}
.toast.show{opacity:1;}

/* ===== 导出收费弹窗（doc_pay.php 按次计费） ===== */
.dp-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;}
.dp-modal{width:420px;max-width:100%;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.18);font-size:14px;}
.dp-hd{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#1f2d3d;color:#fff;font-weight:700;}
.dp-x{cursor:pointer;opacity:.8;padding:2px 6px;}
.dp-x:hover{opacity:1;}
.dp-body{padding:20px 22px 6px;}
.dp-price{text-align:center;margin:2px 0 6px;}
.dp-price b{font-size:30px;color:#c8161d;font-family:Georgia,serif;}
.dp-price span{color:#999;font-size:13px;}
.dp-tip{color:#444;line-height:1.9;margin:6px 0 16px;text-align:center;}
.dp-tip b{color:#1f2d3d;}
.dp-balance{text-align:center;color:#666;margin:2px 0 14px;}
.dp-balance b{color:#1f2d3d;font-size:15px;}
.dp-btn{width:100%;padding:11px;font-size:14px;border-radius:8px;background:#1677ff;}
.dp-btn:disabled{opacity:.6;cursor:not-allowed;}
.dp-poll{margin:12px 0 4px;color:#888;font-size:12.5px;line-height:1.7;text-align:center;}
.dp-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#f7f8fa;border-top:1px solid #eee;font-size:12px;}
.dp-note{color:#999;line-height:1.7;}
.dp-cancel{color:#c8161d;cursor:pointer;white-space:nowrap;font-weight:600;}
.dp-cancel:hover{text-decoration:underline;}

/* ===== 公章排版微调弹窗（导出栏「📐 排版微调」唤起，滑块实时驱动右侧选中公章） ===== */
.dp-modal.lay-modal{width:580px;max-width:100%;}
.dp-modal.lay-modal .dp-hd{background:linear-gradient(90deg,#c8161d,#9c0f16);}
.lay-tip{padding:8px 18px;background:#fff7ef;border-bottom:1px solid #ffe6cf;font-size:12px;color:#a0713f;line-height:1.7;}
.lay-tip b{color:#c8161d;}
.lay-body{padding:14px 20px 4px;max-height:min(62vh,560px);overflow-y:auto;overscroll-behavior:contain;}
.lay-body::-webkit-scrollbar{width:8px;}
.lay-body::-webkit-scrollbar-thumb{background:#e2c5b6;border-radius:4px;}
.lay-modal .seal-layout-hd{display:flex;align-items:center;justify-content:space-between;margin:2px 0 8px;}
.lay-modal .seal-layout-hd b{font-size:13px;color:#8a4b12;}
.lay-modal .seal-layout-hd .rst{font-size:11.5px;color:#c8161d;border:1px solid #c8161d;background:#fff;border-radius:6px;padding:3px 12px;cursor:pointer;}
.lay-modal .seal-layout-hd .rst:hover{background:#c8161d;color:#fff;}
.lay-modal .ct-field{margin-bottom:11px;}
.lay-modal .ct-field label{display:block;font-size:12px;color:#555;margin-bottom:2px;}
.lay-modal .ct-field label i{font-style:normal;color:#b6a99b;font-size:11px;margin-left:4px;}
.lay-modal .rg{display:flex;align-items:center;gap:8px;}
.lay-modal .rg input[type=range]{flex:1 1 auto;min-width:0;}
.lay-modal .rg .val{flex:none;min-width:42px;text-align:right;font-size:12px;font-weight:700;color:#c8161d;}
.lay-modal .cb-row{display:flex;align-items:flex-start;gap:6px;margin:0 0 2px;}
.lay-modal .cb-row input[type=checkbox]{width:auto;flex:none;height:auto;margin:2px 0 0;padding:0;border:none;border-radius:0;accent-color:#c8161d;box-shadow:none;}
.lay-modal .cb-row label{display:block;margin:0;font-size:11px;line-height:1.55;color:#9a8c7d;cursor:pointer;}
.lay-empty{padding:30px 16px;text-align:center;font-size:13px;color:#ad9f8f;line-height:1.9;}
.lay-foot{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:11px 18px;background:#fbf7f2;border-top:1px solid #f1e7dc;}
.lay-done{background:#c8161d;color:#fff;border:none;border-radius:6px;padding:8px 28px;font-size:13px;cursor:pointer;transition:.15s;}
.lay-done:hover{background:#a60f18;}

/* 支付方式列表 */
.dp-methods{display:flex;flex-direction:column;gap:10px;margin:14px 0 18px;}
.dp-method{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1.5px solid #e5e7eb;border-radius:8px;cursor:pointer;background:#fff;transition:.15s;}
.dp-method:hover{border-color:#1677ff;}
.dp-method.active{border-color:#1677ff;background:#f0f7ff;}
.dp-method.disabled{opacity:.55;cursor:not-allowed;background:#f9fafb;}
.dp-method input{width:16px;height:16px;accent-color:#1677ff;flex-shrink:0;}
.dp-m-title{font-weight:700;color:#1f2d3d;flex-shrink:0;}
.dp-m-hint{font-size:12px;color:#888;line-height:1.4;}

/* 微信二维码 */
.dp-qr{text-align:center;margin:10px 0 6px;}
.dp-qr img{width:180px;height:180px;border:1px solid #eee;border-radius:6px;}
.dp-wx-tip{color:#888;font-size:12px;line-height:1.7;text-align:center;margin:8px 0 4px;}

/* ===== 窄屏适配（回退整页滚动，左栏不再固定高度） ===== */
@media (max-width:980px){
  #ct-app{height:auto;min-height:100vh;}
  .ct-layout{flex-direction:column;min-height:0;}
  .ct-left{width:auto;flex:none;border-right:none;border-bottom:1px solid #eee;overflow:visible;}
  .ct-right{padding:18px 12px 40px;overflow:visible;}
  .paper-wrap{padding:28px 18px 44px;}
  .export-bar{flex-wrap:wrap;padding:10px 12px;}
  .export-bar .btn{flex:1 1 auto;text-align:center;justify-content:center;}
  .live-stats{padding:7px 12px;gap:12px;justify-content:space-between;}
  .dp-modal.lay-modal{width:100%;}
}
