/* ============================================================
   电子签名生成器 · 专属样式（signature-generator.css）
   ============================================================ */

@font-face{
    font-family:'SigKai';
    src:url('../fonts/LXGWWenKai-Regular.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigXingkai';
    src:url('../fonts/Xingkai-Regular.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigLishu';
    src:url('../fonts/LishuMaobi.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigLianbi';
    src:url('../fonts/HongLeiXingShu.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigZhuo';
    src:url('../fonts/HongLeiZhuoShu.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigBanshu';
    src:url('../fonts/HongLeiBanShu.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigQianming';
    src:url('../fonts/FlowSignature.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigJifeng';
    src:url('../fonts/SwiftScript.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
    font-family:'SigYuanqu';
    src:url('../fonts/RoundPlayful.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;
}

:root{
    --paper:#EDEBE3;
    --paper-card:#F7F5EF;
    --text:#2A2822;
    --text-muted:#8B8672;
    --brass:#A9884F;
}

body{
    background:var(--paper);
    color:var(--text);
    font-family:"PingFang SC","Microsoft YaHei","STHeiti","SimHei",sans-serif;
    min-height:100vh;
}

.hero{padding:32px 28px 18px;max-width:1200px;margin:0 auto;}
.hero .eyebrow{
    font-family:"Consolas","Menlo","Courier New",monospace;font-size:12px;color:var(--brass);
    letter-spacing:0.12em;text-transform:uppercase;margin-bottom:10px;
}
.hero h1{font-weight:700;font-size:clamp(24px,4vw,34px);margin:0 0 8px;letter-spacing:0.02em;}
.hero p{color:var(--text-muted);max-width:680px;line-height:1.7;margin:0;font-size:14px;}
.disclaimer{max-width:1200px;margin:0 auto 8px;padding:0 28px;}
.disclaimer .box{
    background:#FBEFE7;color:#8A4A1E;
    border:1px solid #E7C7A8;border-radius:6px;padding:11px 16px;font-size:12.5px;line-height:1.6;
}
main{
    max-width:1200px;margin:0 auto;padding:22px 28px 60px;
    display:grid;grid-template-columns:400px 1fr;gap:22px;align-items:start;
}
@media (max-width: 900px){ main{grid-template-columns:1fr;} }

.panel{background:var(--paper-card);border:1px solid var(--line);border-radius:8px;overflow:hidden;}
.panel-header{
    padding:13px 18px;border-bottom:1px solid var(--line);
    font-weight:600;font-size:14.5px;
    display:flex;justify-content:space-between;align-items:center;
}
.panel-header button{
    font-family:"Consolas","Menlo","Courier New",monospace;font-size:11px;
    background:none;border:1px solid var(--line);border-radius:4px;
    padding:4px 9px;cursor:pointer;color:var(--text-muted);
}
.panel-header button:hover{color:var(--brass);border-color:var(--brass);}

details.section{border-bottom:1px solid var(--line);}
details.section:last-child{border-bottom:none;}
details.section summary{
    list-style:none;cursor:pointer;padding:12px 18px;
    font-size:13px;font-weight:700;color:var(--text);
    display:flex;align-items:center;gap:8px;
    background:#F1EEE5;
}
details.section summary::-webkit-details-marker{display:none;}
details.section summary .tag{
    font-family:"Consolas","Menlo","Courier New",monospace;font-size:10.5px;color:var(--brass);
    border:1px solid var(--brass);border-radius:3px;padding:1px 5px;
}
details.section summary::after{
    content:"展开";margin-left:auto;font-size:11px;color:var(--text-muted);font-weight:400;
}
details.section[open] summary::after{content:"收起";}
details.section .inner{padding:6px 18px 14px;}

.field{padding:10px 0;border-bottom:1px dashed var(--line);}
.field:last-child{border-bottom:none;}
.field label{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;margin-bottom:7px;color:var(--text);}
.field .hint{font-size:11px;color:var(--text-muted);margin-top:5px;line-height:1.5;}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;}

input[type=text], select{
    width:100%;padding:8px 9px;border:1px solid var(--line);border-radius:5px;
    background:#fff;font-family:"PingFang SC","Microsoft YaHei","STHeiti","SimHei",sans-serif;font-size:13.5px;color:var(--text);
}
input[type=text]:focus, select:focus{
    outline:none;border-color:var(--brass);box-shadow:0 0 0 3px rgba(169,136,79,0.15);
}
.seg{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden;}
.seg button{
    flex:1;padding:8px 6px;background:#fff;border:none;border-right:1px solid var(--line);
    font-family:"PingFang SC","Microsoft YaHei","STHeiti","SimHei",sans-serif;font-size:12.5px;cursor:pointer;color:var(--text-muted);
}
.seg button:last-child{border-right:none;}
.seg button.active{background:var(--brass);color:#fff;}
.swatches{display:flex;gap:8px;align-items:center;}
.swatch{width:24px;height:24px;border-radius:50%;cursor:pointer;border:2px solid transparent;}
.swatch.active{border-color:var(--text);}
input[type=color]{width:30px;height:30px;border:1px solid var(--line);border-radius:50%;padding:0;background:none;cursor:pointer;}
input[type=range]{width:100%;accent-color:var(--brass);}
.rangeval{font-family:"Consolas","Menlo","Courier New",monospace;font-size:11px;color:var(--text-muted);margin-left:auto;}
.checkrow{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-muted);line-height:1.5;}
.checkrow input{margin-top:3px;}
.filebtn{
    display:inline-block;font-size:12.5px;padding:8px 12px;border:1px solid var(--line);
    border-radius:5px;background:#fff;
}
.filebtn:hover{border-color:var(--brass);color:var(--brass);}

.preview-panel{display:flex;flex-direction:column;align-items:center;padding:30px 20px;gap:20px;position:sticky;top:78px;}
.stage{
    width:100%;
    position:relative;
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 1px, transparent 1px, transparent 24px),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 1px, transparent 1px, transparent 24px);
    background-color:#FCFBF7;
    border:1px solid var(--line);border-radius:6px;
    box-shadow:0 12px 30px -14px rgba(30,25,15,0.35), inset 0 0 0 1px rgba(255,255,255,0.4);
    display:flex;align-items:center;justify-content:center;padding:18px;
}
canvas{display:block;width:100%;height:auto;touch-action:none;}
.actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;}
.actions-secondary{
    width:100%;
    justify-content:space-between;
    align-items:center;
}
.btn{
    font-family:"PingFang SC","Microsoft YaHei","STHeiti","SimHei",sans-serif;font-size:13.5px;font-weight:500;
    padding:10px 18px;border-radius:6px;cursor:pointer;border:1px solid transparent;
    display:inline-flex;align-items:center;gap:6px;
}
.btn-primary{background:var(--ink,#1C1C1A);color:#fff;}
.btn-primary:hover{background:#000;}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--line);}
.btn-ghost:hover{border-color:var(--brass);color:var(--brass);}
.btn-ghostpy{background:transparent;color:var(--line);border-color:var(--line);}
.meta-note{font-size:11.5px;color:var(--text-muted);text-align:center;max-width:420px;line-height:1.6;}

/* ---------- 字体加载提示（与印章生成器一致）---------- */
.loadingChip{
    position:absolute;top:10px;left:50%;transform:translateX(-50%);
    display:inline-flex;align-items:center;gap:6px;z-index:3;
    font-family:"PingFang SC","Microsoft YaHei","STHeiti","SimHei",sans-serif;
    font-size:11.5px;color:var(--text-muted);
    background:#fff;border:1px solid var(--line);border-radius:16px;
    padding:5px 12px;box-shadow:0 4px 12px -6px rgba(0,0,0,0.25);
}
.loadingDot{
    width:7px;height:7px;border-radius:50%;background:var(--brass);flex:none;
    animation:loadingPulse 1s ease-in-out infinite;
}
@keyframes loadingPulse{
    0%,100%{opacity:0.35;transform:scale(0.8);}
    50%{opacity:1;transform:scale(1.15);}
}

/* ---------- 下载行旁边的去水印按钮（与印章生成器一致）---------- */
.watermarkChip{
    font-family:inherit;font-size:11.5px;line-height:1;
    padding:8px 12px;border-radius:16px;border:1px solid var(--line);
    background:#F5F0E4;color:var(--text);cursor:pointer;
    white-space:nowrap;
}
.watermarkChip:hover{border-color:var(--brass);color:var(--brass);}
.watermarkChip.donated{
    color:#3F7D4C;border-color:#bfe3c8;background:#EEF7F0;cursor:default;
}

@keyframes flashPulse{
    0%{box-shadow:0 0 0 0 rgba(169,136,79,0.32);}
    70%{box-shadow:0 0 0 9px rgba(169,136,79,0);}
    100%{box-shadow:0 0 0 0 rgba(169,136,79,0);}
}
.flash-highlight{animation:flashPulse 1.1s ease-out 2;border-radius:6px;}
details.section.flash-highlight summary{background:#FBEFE7;transition:background 0.4s ease;}

.tool-footer-note{max-width:1200px;margin:0 auto;padding:0 28px 40px;font-size:12px;color:var(--text-muted);line-height:1.7;}
.tool-footer-note .box{border-top:1px solid var(--line);padding-top:16px;}