/* peitu 三栏工作台 · 左:输入与设置  中:结果画廊  右:常用操作
   只做布局与视觉,不改任何功能钩子。依赖 theme-v2.css 的变量。 */

body main.w-full{max-width:1840px!important;padding:16px 24px 28px!important}

/* ---------- 顶部引擎条:更紧凑 ---------- */
body main.w-full > .panel:first-child{padding:10px 16px!important;margin-bottom:12px!important;border-radius:14px!important}
body main.w-full > .mb-5{margin-bottom:12px!important}
body #brandContextPreview{border-radius:14px!important}

/* ---------- 三栏骨架 ---------- */
body #ptGrid{display:grid!important;grid-template-columns:minmax(340px,380px) minmax(0,1fr) 308px;gap:18px!important;align-items:start}
body #ptGrid > *{grid-column:auto!important;min-width:0}
body #ptGrid > :nth-child(1){position:sticky;top:12px;max-height:calc(100vh - 24px)!important;padding-right:4px}
body #ptGrid > :nth-child(3){position:sticky;top:12px;max-height:calc(100vh - 24px);overflow-y:auto}
@media (max-width:1380px){
  body #ptGrid{grid-template-columns:minmax(330px,370px) minmax(0,1fr)}
  body #ptGrid > :nth-child(3){grid-column:1 / -1!important;position:static;max-height:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
}
@media (max-width:1000px){
  body #ptGrid{grid-template-columns:1fr}
  body #ptGrid > :nth-child(1){position:static;max-height:none!important}
}

/* ---------- 面板统一语言 ---------- */
body #ptGrid .panel,body .pt-card{background:#fff;border:1px solid var(--line)!important;border-radius:18px!important;box-shadow:none!important}
body #ptGrid > :nth-child(1) .panel{padding:16px 16px!important;border-left-width:1px!important}
body #ptGrid > :nth-child(1) .panel[style*="border:2px"]{border:1.5px solid #2fbf90!important;background:linear-gradient(180deg,#fff,#f5fbf8)}
body .pill.active,body .mode-btn.active,body .count-btn.active,body .quality-pill.active{
  background:linear-gradient(135deg,#12281f,#1f7d5d)!important;color:#eaf5ef!important;border-color:transparent!important}
body .btn-primary{background:linear-gradient(135deg,#12281f,#1f7d5d)!important;border-radius:14px!important;box-shadow:0 12px 26px -12px rgba(18,40,31,.65)!important}
body .btn-primary:hover{filter:brightness(1.08)}
body #generateBtn .font-display{font-style:normal!important;font-weight:800;letter-spacing:.02em}

/* ---------- 画廊 ---------- */
body #ptGrid > :nth-child(2) > .panel{padding:18px!important;min-height:calc(100vh - 210px)}
body #resultArea{min-height:420px}
body #resultArea.grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))!important;gap:16px!important}
body #resultArea.grid .image-card{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff;transition:box-shadow .2s,transform .2s}
body #resultArea.grid .image-card:hover{box-shadow:0 18px 36px -18px rgba(11,20,16,.35);transform:translateY(-2px)}
body #progressBar{position:sticky;top:0;z-index:5;background:#fff;padding:6px 0}
body .image-overlay{flex-wrap:wrap;gap:6px}
body .pt-vbtn{padding:6px 12px;border-radius:8px;font-size:12px;font-weight:600;background:#1f7d5d;color:#fff;display:inline-flex;align-items:center;gap:4px;border:0;cursor:pointer}
body .pt-vbtn:hover{background:#17634a}

/* ---------- 左栏:导入工具条 ---------- */
.pt-imp{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pt-imp button{font-size:11px;font-weight:600;padding:6px 10px;border-radius:9px;border:1px solid var(--line);background:#f5f8f5;color:#1c4a39;cursor:pointer;transition:all .15s}
.pt-imp button:hover{border-color:#2fbf90;background:#e8f6ef}
.pt-url{display:none;gap:6px;margin-top:8px}
.pt-url.on{display:flex}
.pt-url input{flex:1;min-width:0;border:1px solid var(--line);border-radius:9px;padding:7px 10px;font-size:12px}
.pt-url button{font-size:12px;font-weight:700;padding:0 14px;border-radius:9px;background:#12281f;color:#eaf5ef;border:0;cursor:pointer}
.pt-seg{margin-top:8px;font-size:11px;line-height:1.6;color:#1c4a39;background:#eef6f1;border:1px dashed #9fc2b0;border-radius:10px;padding:7px 10px;display:none}
.pt-seg.on{display:block}
.pt-seg b{color:#17634a}
.pt-seg a{color:#1c9a73;font-weight:700;cursor:pointer;text-decoration:underline;margin-left:6px}

/* ---------- 右栏 ---------- */
.pt-card{padding:14px 14px 15px}
.pt-card + .pt-card{margin-top:12px}
body #ptGrid > :nth-child(3) .pt-card + .pt-card{margin-top:0}
@media (min-width:1381px){body #ptGrid > :nth-child(3) .pt-card + .pt-card{margin-top:12px}}
.pt-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.pt-h b{font-family:'Noto Serif SC',serif;font-size:14px;font-weight:900;color:#12281f}
.pt-h i{font-style:normal;font-family:'JetBrains Mono',monospace;font-size:9px;letter-spacing:.14em;color:#2a9a74;text-transform:uppercase}
.pt-qa{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.pt-b{font-size:12px;font-weight:700;padding:9px 8px;border-radius:11px;border:1px solid var(--line);background:#f5f8f5;color:#1c4a39;cursor:pointer;transition:all .15s;text-align:center;line-height:1.25}
.pt-b:hover{border-color:#2fbf90;background:#e8f6ef;transform:translateY(-1px)}
.pt-b.pri{grid-column:1 / -1;background:linear-gradient(135deg,#12281f,#1f7d5d);color:#eaf5ef;border-color:transparent;padding:11px}
.pt-b.pri:hover{filter:brightness(1.1)}
.pt-b.amb{background:#fdf3dc;border-color:#f2bd5b;color:#7a5410}
.pt-b[disabled]{opacity:.5;pointer-events:none}
.pt-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#1c4a39;margin-top:9px}
.pt-row label{font-size:11px;color:#62736a;white-space:nowrap}
.pt-row select,.pt-row input[type=text],.pt-row input[type=number]{border:1px solid var(--line);border-radius:8px;padding:5px 8px;font-size:12px;background:#fff;min-width:0;max-width:150px}
.pt-row input[type=range]{width:120px;accent-color:#1c9a73}
.pt-sw{position:relative;width:34px;height:20px;flex:none}
.pt-sw input{opacity:0;width:100%;height:100%;position:absolute;inset:0;margin:0;cursor:pointer;z-index:2}
.pt-sw span{position:absolute;inset:0;background:#cfd9d2;border-radius:99px;transition:.2s}
.pt-sw span::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s}
.pt-sw input:checked + span{background:#1c9a73}
.pt-sw input:checked + span::after{left:16px}
.pt-lock{font-size:11px;line-height:1.55;color:#1c4a39;background:#f5f8f5;border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin-bottom:8px;word-break:break-all}
.pt-lock.on{background:#fdf3dc;border-color:#f2bd5b;color:#6b4a0e}
.pt-pv{margin-top:10px;border:1px dashed #9fc2b0;border-radius:10px;background:repeating-conic-gradient(#f0f4f1 0 25%,#fff 0 50%) 0 0/14px 14px;min-height:70px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pt-pv img{max-width:100%;max-height:150px;display:block}
.pt-pv span{font-size:11px;color:#62736a;padding:14px}
.pt-th{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.pt-th img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;border:1px solid var(--line);cursor:pointer}
.pt-note{font-size:10.5px;color:#62736a;margin-top:8px;line-height:1.5}

/* ---------- 提示词方案编辑条 ---------- */
#ptPlanBar{padding:10px 20px;border-bottom:1px solid #dce4de;background:#f5f8f5;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#ptPlanBar input{border:1px solid #dce4de;border-radius:8px;padding:6px 9px;font-size:12px;min-width:0;flex:1 1 150px;background:#fff}
#ptPlanBar button{font-size:12px;font-weight:700;padding:6px 12px;border-radius:8px;border:1px solid #dce4de;background:#fff;color:#1c4a39;cursor:pointer}
#ptPlanBar button:hover{border-color:#2fbf90;background:#e8f6ef}
#ptPlanBar .add{background:#12281f;color:#eaf5ef;border-color:transparent}
.prompt-card{position:relative}
.prompt-card.pt-over{outline:2px dashed #2fbf90;outline-offset:3px}
.pt-ctl{position:absolute;right:10px;top:10px;display:flex;gap:4px;align-items:center}
.pt-ctl button,.pt-ctl .hd{width:28px;height:28px;border-radius:8px;border:1px solid #dce4de;background:#fff;color:#1c4a39;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.pt-ctl .hd{cursor:grab;color:#62736a}
.pt-ctl button:hover{border-color:#2fbf90;background:#e8f6ef}
.pt-ctl .del:hover{border-color:#e0766a;background:#fdeceb;color:#b3392d}

/* ---------- 多版本对比弹窗 ---------- */
.pt-cmp{position:fixed;inset:0;z-index:90;background:rgba(9,17,13,.62);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:18px}
.pt-cmp > div{background:#fff;border-radius:20px;max-width:1100px;width:100%;max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.pt-cmp header{padding:14px 18px;border-bottom:1px solid #dce4de;display:flex;align-items:center;justify-content:space-between;gap:10px}
.pt-cmp header b{font-family:'Noto Serif SC',serif;font-weight:900;color:#12281f}
.pt-cmp .bd{padding:16px 18px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.pt-cmp .tile{border:2px solid #dce4de;border-radius:14px;overflow:hidden;background:#f5f8f5}
.pt-cmp .tile.cur{border-color:#1c9a73}
.pt-cmp .tile img{width:100%;display:block}
.pt-cmp .tile .ft{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;font-size:12px;color:#1c4a39;background:#fff}
.pt-cmp .tile .ft button,.pt-cmp header button{font-size:12px;font-weight:700;padding:6px 12px;border-radius:8px;border:1px solid #dce4de;background:#fff;color:#1c4a39;cursor:pointer}
.pt-cmp .tile .ft button.use{background:#12281f;color:#eaf5ef;border-color:transparent}
.pt-cmp .ld{aspect-ratio:16/10;display:flex;align-items:center;justify-content:center;font-size:12px;color:#62736a}

/* 头部与主体同宽 */
body .pv-hd-in{max-width:1840px!important;padding-left:20px!important;padding-right:20px!important}

/* 页脚与主体同宽 */
body .sf-wrap,body .sf-bottom{max-width:1840px!important}
