/* ============================================================
   简历工坊（个人简历制作工具）
   配色：墨绿主色 + 深色导航 + 白色纸张
   ============================================================ */
:root{
  --green:#059669;--green2:#10b981;--teal:#0d9488;--ink:#101828;--muted:#5b6472;
  --line:#e5e7ef;--bg:#f4f6f5;--card:#fff;--dark:#0d1b17;
  --radius:16px;--shadow:0 10px 28px rgba(13,27,23,.07);
  --shadow-lg:0 22px 54px rgba(13,27,23,.14);
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg);color:var(--ink);line-height:1.7;font-size:15px;-webkit-font-smoothing:antialiased;
}
img,svg{vertical-align:middle}
ul,ol{list-style:none}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
.container{max-width:1240px;margin:0 auto;padding:0 20px}
.skip-link{position:absolute;left:-999px;top:0;z-index:99;background:var(--green);color:#fff;padding:8px 16px;border-radius:0 0 10px 0}
.skip-link:focus{left:0}

/* ---------- 顶栏 ---------- */
.rw-header{
  position:sticky;top:0;z-index:60;background:rgba(13,27,23,.96);
  color:#e8f5f0;box-shadow:0 6px 22px rgba(13,27,23,.2);backdrop-filter:blur(10px);
}
.rw-top{display:flex;align-items:center;gap:18px;min-height:58px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.rw-brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:18px;color:#fff;letter-spacing:.3px;white-space:nowrap}
.rw-brand-ico{color:#34d399;font-family:Consolas,Menlo,monospace}
.rw-brand em{font-style:normal;font-size:11px;font-weight:600;color:#8fb3a6;letter-spacing:1px;margin-left:2px}
.rw-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-wrap:wrap}
.rw-actions button,.rw-back{
  border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.05);color:#dff3ea;
  padding:7px 13px;border-radius:10px;font-size:13px;font-weight:600;transition:.2s;white-space:nowrap;
}
.rw-actions button:hover,.rw-back:hover{background:rgba(255,255,255,.14);color:#fff}
.rw-actions button.primary{background:linear-gradient(120deg,#059669,#10b981);border-color:transparent;color:#fff}
.rw-actions button.primary:hover{filter:brightness(1.08)}
.rw-actions button.print{background:linear-gradient(120deg,#0e7490,#0891b2);border-color:transparent;color:#fff}
.rw-actions button.print:hover{filter:brightness(1.08)}
.rw-tip-line{font-size:12.5px;color:#a9c6bb;padding-bottom:9px}
@media (max-width:760px){.rw-tip-line{display:none}}

/* ---------- 主体两栏 ---------- */
.rw-layout{display:grid;grid-template-columns:minmax(430px,1.05fr) minmax(420px,.95fr);gap:24px;align-items:start;padding-top:26px;padding-bottom:60px}
.rw-form{display:flex;flex-direction:column;gap:18px;min-width:0}
.fsec{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px 22px 22px;box-shadow:var(--shadow);
}
.fsec-title{display:flex;align-items:center;gap:9px;font-size:16.5px;letter-spacing:-.2px;margin-bottom:16px}
.fsec-title span{
  width:24px;height:24px;flex:none;border-radius:8px;background:#e7f7f0;color:var(--green);
  font-size:13px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;
}
.fsec-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px 16px}
.fld{display:flex;flex-direction:column;gap:6px;min-width:0}
.fld-wide{grid-column:1 / -1}
.fld label,.fld-label-inline{font-size:13px;font-weight:700;color:#34403b}
.req{color:#dc2626}
.fld input[type=text],.fld input[type=email],.fld select,.fld textarea,.rows input[type=text],.rows input[type=email],.rows textarea,.skill-add-row input{
  width:100%;border:1.5px solid #dde3e8;background:#fbfcfc;border-radius:10px;
  padding:9px 12px;font-size:14px;color:var(--ink);outline:none;transition:.2s;font-family:inherit;
}
.fld input:focus,.fld select:focus,.fld textarea:focus,.rows input:focus,.rows textarea:focus,.skill-add-row input:focus{
  border-color:#7fd6b4;background:#fff;box-shadow:0 0 0 3px rgba(5,150,105,.12);
}
.fld textarea,.rows textarea{resize:vertical;line-height:1.65}
.fld ::placeholder,.rows ::placeholder,.skill-add-row ::placeholder{color:#a4adb8}
.fsec-hint{font-size:12.3px;color:var(--muted);margin-top:10px;line-height:1.7}
.fsec-hint b{color:#3f4a44}
/* 照片 */
.fld-photo{grid-column:1 / -1;flex-direction:row;align-items:center;gap:12px;flex-wrap:wrap}
.photo-btn{
  display:inline-flex;align-items:center;gap:6px;border:1.5px dashed #b9d8ca;background:#f0faf5;
  color:var(--green);font-size:13px;font-weight:700;padding:8px 16px;border-radius:10px;cursor:pointer;transition:.2s;
}
.photo-btn:hover{background:#e2f5ec;border-style:solid}
.photo-preview{position:relative;display:inline-flex}
.photo-preview img{width:52px;height:52px;border-radius:12px;object-fit:cover;border:1px solid var(--line)}
.photo-preview button{
  position:absolute;top:-7px;right:-7px;width:20px;height:20px;border-radius:50%;border:0;
  background:#334155;color:#fff;font-size:10px;line-height:1;cursor:pointer;
}

/* 动态行（教育/工作/项目） */
.rows{display:flex;flex-direction:column;gap:12px}
.row{
  border:1px solid #e3e9e6;border-radius:13px;padding:14px 14px 12px;background:#fafcfb;
  position:relative;
}
.row-head{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.row-head b{font-size:13.5px;color:#33403a;flex:1}
.row-del{
  border:0;background:#fdeaea;color:#b42318;font-size:12.5px;font-weight:700;
  border-radius:8px;padding:4px 10px;transition:.2s;
}
.row-del:hover{background:#dc2626;color:#fff}
.row-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.row-grid .span2{grid-column:span 2}
.row-grid .span4{grid-column:1 / -1}
.row .mini{font-size:11.5px;font-weight:700;color:#6a7570;margin-bottom:4px;display:block}
.row-grid label{display:block}
.add-row{
  margin-top:12px;width:100%;border:1.5px dashed #bcd8cc;background:#f6fcfa;color:var(--green);
  border-radius:12px;padding:10px;font-size:13.5px;font-weight:700;transition:.2s;
}
.add-row:hover{background:#eaf8f1;border-style:solid}

/* 技能 */
.skill-add-row{display:flex;gap:8px}
.skill-add-row input{flex:1;min-width:0}
.skill-add-row button{
  flex:none;border:0;background:var(--green);color:#fff;border-radius:10px;padding:0 18px;font-size:14px;font-weight:700;
}
.skill-chips,.sug-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chip{
  display:inline-flex;align-items:center;gap:7px;background:#eef4f1;border:1px solid #dbe7e1;
  color:#2c3a34;font-size:13px;font-weight:600;border-radius:999px;padding:4px 12px;
}
.chip b{cursor:pointer;color:#8a9891;font-weight:800;padding:0 2px}
.chip b:hover{color:#dc2626}
.sug-box{margin-top:14px;background:#f2fbf7;border:1px dashed #b9e2d2;border-radius:12px;padding:12px 14px}
.sug-box>p{font-size:12.8px;color:#3d6b5a;font-weight:600;margin-bottom:8px}
.sug-chip{
  border:1px solid #b9e2d2;background:#fff;color:#0f766e;font-size:12.5px;font-weight:600;
  border-radius:999px;padding:3px 11px;transition:.15s;
}
.sug-chip:hover{background:var(--green);border-color:var(--green);color:#fff}
.sug-learn{display:inline-block;margin-top:10px;font-size:12.5px;font-weight:700;color:var(--green)}
.sug-learn:hover{text-decoration:underline}

.rw-save-note{font-size:12.3px;color:var(--muted);text-align:center}
#auto-save-tip{font-size:12px;color:var(--muted)}

/* ---------- 右栏：预览 ---------- */
.rw-panel{position:sticky;top:88px;display:flex;flex-direction:column;gap:16px;min-width:0}
.rw-preview-head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px}
.rw-preview-head h2{font-size:16px;letter-spacing:-.2px}
.paper-holder{background:#eef1ef;border:1px solid #dfe5e2;border-radius:18px;padding:22px 20px 26px;box-shadow:inset 0 2px 10px rgba(13,27,23,.05)}
.paper{
  background:#fff;border-radius:4px;min-height:760px;box-shadow:0 16px 40px rgba(13,27,23,.16);
  padding:34px 38px;color:#1f2937;position:relative;
}
.paper-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#9aa5a0;text-align:center;font-size:14px;line-height:1.9}
.pe-ico{font-size:42px;opacity:.8}

/* 简历成品样式（屏幕 + 打印共用） */
.rv{display:flex;flex-direction:column;gap:16px}
.rv-head{display:flex;gap:18px;align-items:flex-start;border-bottom:2.5px solid #0f766e;padding-bottom:13px}
.rv-head-main{flex:1;min-width:0}
.rv-photo{width:76px;height:76px;flex:none;border-radius:14px;object-fit:cover;border:1px solid #e0e7e3}
.rv-name{font-size:30px;font-weight:800;letter-spacing:1px;color:#0f172a;line-height:1.2}
.rv-title{display:inline-block;margin-top:6px;font-size:14px;font-weight:700;color:#fff;background:#0f766e;border-radius:6px;padding:2px 10px}
.rv-contacts{display:flex;flex-wrap:wrap;gap:5px 16px;margin-top:9px;font-size:12.5px;color:#4b5563}
.rv-intro{font-size:13px;color:#374151;background:#f4f9f7;border-left:3px solid #10b981;border-radius:0 8px 8px 0;padding:8px 12px;line-height:1.7}
.rv-sec h2{font-size:15.5px;color:#0f766e;letter-spacing:2px;display:flex;align-items:center;gap:8px;margin-bottom:9px}
.rv-sec h2::after{content:"";flex:1;height:1.5px;background:linear-gradient(90deg,#9fd8c4,transparent)}
.rv-sec{display:flex;flex-direction:column;gap:10px}
.rv-item{display:flex;flex-direction:column;gap:2px}
.rv-line1{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.rv-line1 b{font-size:14.5px;color:#111827}
.rv-line1 .rv-role{font-size:13px;color:#374151;font-weight:600}
.rv-line1 .rv-time{margin-left:auto;font-size:12px;color:#6b7280;white-space:nowrap}
.rv-line2{font-size:12.5px;color:#6b7280}
.rv-desc{font-size:13px;color:#374151;margin-top:3px;line-height:1.75;white-space:pre-line}
.rv-skill{display:flex;flex-wrap:wrap;gap:6px}
.rv-skill span{background:#e6f4ee;color:#155e4d;border:1px solid #cde9dc;font-size:12px;font-weight:600;border-radius:5px;padding:1px 9px}
.rv-text{font-size:13px;color:#374151;line-height:1.8;white-space:pre-line}
.rv-foot{margin-top:2px;border-top:1px dashed #d7e0dc;padding-top:6px;font-size:10.5px;color:#9aa5a0;text-align:center}

/* ---------- 技巧卡 ---------- */
.rw-tips{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}
.rw-tips h3{font-size:14.5px;margin-bottom:10px}
.rw-tips ul{display:flex;flex-direction:column;gap:8px}
.rw-tips li{font-size:12.8px;color:var(--muted);line-height:1.65;padding-left:14px;position:relative}
.rw-tips li::before{content:"▸";position:absolute;left:0;color:var(--green);font-weight:800}
.rw-tips li b{color:#33403a}
.rw-tips-note{margin-top:12px;font-size:12px;color:#7c8681;background:#f5f8f6;border-radius:9px;padding:8px 11px;line-height:1.7}

/* ---------- 页脚 ---------- */
.rw-footer{background:#0d1b17;color:#b9cfc6;margin-top:20px}
.rw-footer .container{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;padding-bottom:18px;flex-wrap:wrap;font-size:13px}
.rw-footer a{color:#7fe0b8;font-weight:600}
.rw-footer a:hover{text-decoration:underline}
.rw-footer p{font-size:12px;color:#7f9a90}

/* ---------- toast ---------- */
.rw-toast{
  position:fixed;left:50%;bottom:30px;transform:translate(-50%,20px);z-index:120;
  background:#0d1b17;color:#fff;font-size:14px;font-weight:600;padding:11px 22px;border-radius:999px;
  box-shadow:0 16px 40px rgba(13,27,23,.4);opacity:0;pointer-events:none;transition:.28s;max-width:88vw;text-align:center;
}
.rw-toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- 响应式 ---------- */
@media (max-width:1080px){
  .rw-layout{grid-template-columns:1fr}
  .rw-panel{position:static;order:-1}
}
@media (max-width:700px){
  .rw-top{gap:10px}
  .rw-back{display:none}
  .rw-actions button{padding:6px 10px;font-size:12px}
  .rw-brand{font-size:15.5px}
  .rw-brand em{display:none}
  .fsec-grid{grid-template-columns:1fr}
  .row-grid{grid-template-columns:1fr 1fr}
  .row-grid .span2,.row-grid .span4{grid-column:1 / -1}
  .paper{padding:22px 18px;min-height:600px}
  .rv-name{font-size:24px}
  .rv-contacts{gap:4px 10px}
  .rv-line1 .rv-time{margin-left:0}
  .paper-holder{padding:12px}
}

/* ---------- 打印：只输出简历 ---------- */
@page{size:A4;margin:11mm 10mm}
@media print{
  body{background:#fff}
  .rw-header,.rw-form,.rw-tips,.rw-footer,.skip-link{display:none!important}
  .container{padding:0;max-width:none}
  .rw-layout{display:block;padding:0}
  .rw-panel{position:static;display:block;padding:0;gap:0}
  .rw-preview-head{display:none}
  .paper-holder{background:none;border:0;border-radius:0;padding:0;box-shadow:none}
  .paper{
    box-shadow:none;border-radius:0;padding:0;min-height:0;width:auto;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
  .rv{font-size:12px}
}

/* 字标微调：去掉代码风格 </> */
.rw-brand-ico{
  font-family:inherit;letter-spacing:.05em;font-weight:800;font-size:12px;
  color:#e8d9bd;border:1.5px solid rgba(255,255,255,.55);border-radius:6px;
  padding:2px 7px;line-height:1.6;
}

/* 简历工坊 Logo 标识 */
.rw-brand .brand-logo{width:25px;height:25px;display:block;color:#f0e4cf}
.rw-brand:hover .brand-logo{color:#ffd9a8}

/* ---------- 联动主站引导条 ---------- */
.rw-flowline{display:flex;gap:10px 18px;flex-wrap:wrap;align-items:center;margin-top:10px;font-size:13px}
.rw-flowline a{color:#0f766e;border-bottom:1px dashed rgba(15,118,110,.4);padding-bottom:1px;text-decoration:none}
.rw-flowline a:hover{color:#0b5a54;border-bottom-style:solid}
.rwf-tag{font-size:11.5px;letter-spacing:.12em;color:#5b6b64;border:1px solid #d8e2dd;background:#fff;border-radius:999px;padding:2px 11px}
