/* Layout and navigation */
:root{--blue:#285fa3;--ink:#27313d;--muted:#727982;--line:#e0e3e6;--bg:#f7f8f9;--accent:var(--blue);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);font-size:14px;line-height:1.65}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;border:1px solid #d7dce1;background:white;color:var(--ink);border-radius:4px;padding:9px 16px;font-weight:500;transition:background .15s}
button:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,a:focus-visible{outline:3px solid #a9c6ff;outline-offset:3px}
button:hover{background:#f0f3f6}
button.primary,.button.primary{background:var(--blue);border-color:var(--blue);color:white}
button.primary:hover{background:#1e4f8a}
.button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d7dce1;border-radius:4px;padding:9px 17px;font-weight:500;background:white}
.button.small,button.small{padding:6px 12px;font-size:12px}
.ghost{background:transparent}
.danger{color:#b02b3c}
.site-header{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:60px;padding:0 max(calc((100vw - 1190px)/2),28px)}
.brand{display:flex;align-items:center;gap:10px;white-space:nowrap;font-weight:650;font-size:17px;line-height:1.3}
.brand small{display:block;color:var(--muted);font-weight:400;font-size:11px;margin-top:4px}
.brand-mark{display:grid;place-items:center;background:var(--blue);color:white;font-size:23px;border-radius:4px;width:37px;height:41px;font-family:"Songti SC",serif}
.site-header nav{display:flex;gap:32px;align-items:center;height:100%}
.site-header nav a{height:100%;display:flex;align-items:center;gap:7px;color:#646e7b;position:relative}
.site-header nav a.active{color:var(--blue)}
.site-header nav a.active:after{position:absolute;content:"";bottom:0;height:2px;background:var(--blue);left:0;right:0}
.count{padding:0 5px;border-radius:3px;background:#eff1f3;font-size:10px}
.header-note{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
main{min-height:calc(100vh - 152px);max-width:1254px;margin:auto;padding:34px 32px 44px}
.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.library-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}
.library-heading h1{font-size:25px;font-weight:600;margin:0 0 6px}
.library-heading p{font-size:13px;color:var(--muted);margin:0}
.library-heading .actions button{font-size:12px}
.library-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px;padding-bottom:15px;border-bottom:1px solid var(--line)}
.search{width:225px;flex-shrink:0}
.search input{padding:8px 12px;width:100%;border-radius:4px;border:1px solid #d7dce1;background:white;color:var(--ink);font-size:12px}
.filters{display:flex;gap:7px;overflow-x:auto}
.filters button{border:0;background:transparent;color:#646e7b;padding:7px 13px;white-space:nowrap;font-size:13px}
.filters button.active{background:#e8eef5;color:#244f82;font-weight:600}
.template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 22px}
.template-card{min-width:0;border:1px solid var(--line);border-radius:5px;overflow:hidden;background:white}
.template-card:hover{border-color:#a8b4c2}
.template-cover{height:308px;padding:18px 18px 0;overflow:hidden;background:#eef0f2;border-bottom:1px solid var(--line)}
.template-info{padding:14px}
.template-info h3{font-size:14px;font-weight:600;margin:0}
.template-info p{color:var(--muted);font-size:11px;margin:4px 0 12px;min-height:18px}
.template-info button{width:100%;padding:6px;color:#285785;background:#fff;border-color:#d0d9e2;font-size:12px}
.template-info button:hover{background:#edf2f7}
.library-note{font-size:11px;color:var(--muted);margin:23px 0 0}
.site-footer{border-top:1px solid var(--line);min-height:76px;display:flex;gap:20px;align-items:center;justify-content:space-between;margin:0 max(calc((100vw - 1190px)/2),28px);font-size:11px;color:#7a838f}
.site-footer div{display:flex;gap:24px}
.empty{grid-column:1/-1;text-align:center;background:white;border:1px dashed #d7dfeb;border-radius:5px;padding:58px 20px}
.empty h2{font-size:20px}
.empty p{color:var(--muted);max-width:420px;margin:8px auto 22px}

/* Editing, storage and document views */
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}
.page-heading h1{font-size:27px;margin:0;letter-spacing:-.5px}
.page-heading p{margin:5px 0 0;font-size:12px;color:var(--muted)}
.draft-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.draft-card{border:1px solid var(--line);background:white;border-radius:6px;padding:23px;min-width:0}
.draft-icon{width:42px;height:47px;background:#eff4ff;border-radius:8px;border-top:3px solid var(--accent);display:grid;place-items:center;color:var(--accent);font-size:19px;margin-bottom:16px}
.draft-card h2{font-size:16px;margin:5px 0;overflow-wrap:anywhere}
.draft-card p{font-size:12px;color:var(--muted);margin:5px 0}
.draft-card .actions{margin-top:18px}
.draft-card .actions button{padding:6px 10px;font-size:12px}
.draft-card .secondary-actions{border-top:1px solid var(--line);margin-top:17px;padding-top:11px;display:flex;gap:15px}
.text-button{border:none;background:none;padding:0;font-size:11px;color:var(--muted)}
.text-button.danger{color:#b84a56}
.editor-top{display:flex;align-items:center;gap:15px;margin-bottom:20px}
.editor-top .actions{margin-left:auto}
.back-button{border:0;background:transparent;padding:3px;font-size:22px;color:var(--muted)}
.editor-heading{min-width:0}
.editor-heading h1{font-size:20px;margin:0;overflow-wrap:anywhere}
.editor-heading p{font-size:11px;color:var(--muted);margin:3px 0 0}
.editor-layout{display:grid;grid-template-columns:minmax(320px,.92fr) minmax(0,1.08fr);gap:25px;align-items:start}
.editor-form{background:white;border:1px solid var(--line);border-radius:6px;padding:24px;min-width:0}
.form-section{border-bottom:1px solid var(--line);padding-bottom:24px;margin-bottom:24px}
.form-section:last-child{border:0;margin:0;padding-bottom:0}
.form-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:15px}
.form-section-heading h2{font-size:15px;margin:0}
.form-section-heading span{color:#91a0b6;font-size:11px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:13px 15px}
.field{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.field.wide{grid-column:1/-1}
.field>span{color:#64748b}
.field input,.field textarea,.field select,.color-select{width:100%;border:1px solid #dfe5ee;border-radius:7px;background:#fff;padding:9px 11px;color:var(--ink);min-width:0;outline:none}
.field textarea{resize:vertical;min-height:90px;line-height:1.8}
.field input:focus,.field textarea:focus,.field select:focus{border-color:#78a0f2;box-shadow:0 0 0 3px #2463eb0b}
.field .hint{color:#8a97a9;font-size:10px}
.repeat-card{padding:16px;background:#f8fafe;border:1px solid #e8edf5;border-radius:9px;margin:12px 0}
.repeat-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:12px}
.repeat-empty{color:#8e9aad;font-size:12px;padding:9px 0}
.skill-row{display:flex;gap:8px;align-items:center;margin:8px 0}
.skill-row .field{flex:1}
.preview-panel{position:sticky;top:20px;min-width:0}
.preview-toolbar{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;margin-bottom:12px}
.preview-stage{background:#e9edf5;border:1px solid #e0e6ef;padding:22px;border-radius:6px;overflow:hidden}
.resume-paper{background:white;min-height:680px;padding:40px 34px 50px;border-radius:2px;box-shadow:0 6px 20px #1c325b0a;font-size:11px;line-height:1.8;color:#35445a;overflow-wrap:anywhere}
.paper-header{padding-bottom:21px;border-bottom:2px solid var(--accent);margin-bottom:25px}
.paper-eyebrow{font-size:9px;letter-spacing:3px;color:var(--accent)}
.paper-header h1{font-size:28px;letter-spacing:2px;margin:5px 0;color:#243246;line-height:1.5}
.paper-position{font-size:13px;color:var(--accent);font-weight:600}
.paper-contact{font-size:9px;margin-top:9px;color:#66788f;line-height:1.9}
.paper-section{margin:22px 0}
.paper-section h2{font-size:12px;color:var(--accent);margin:0 0 12px;border-bottom:1px solid #e4e9f0;padding-bottom:6px;letter-spacing:1px}
.paper-section p{white-space:pre-wrap;margin:7px 0}
.paper-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.paper-row h3{font-size:11px;margin:0;color:#29374c}
.paper-row span{font-size:9px;color:#8794a6;white-space:nowrap}
.paper-item{margin-bottom:14px;break-inside:avoid}
.paper-item strong{font-size:10px;color:#67738a;font-weight:500}
.paper-skills{display:flex;gap:7px;flex-wrap:wrap}
.paper-skill{background:#f3f5f9;padding:3px 10px;border-radius:3px;font-size:10px}
.paper-placeholder{margin-top:60px;color:#a0aabb;text-align:center}
.layout-center .paper-header{text-align:center}
.layout-accent{border-top:8px solid var(--accent)}
.layout-accent .paper-section h2{border-bottom:none;border-left:3px solid var(--accent);padding:0 0 0 8px}
.layout-minimal .paper-header{border-width:1px}
.layout-minimal .paper-section h2{border-bottom:0;font-size:13px}
.layout-academic .paper-header{text-align:center;border-bottom:1px solid var(--accent)}
.layout-academic{font-family:Georgia,"Songti SC",serif}
.progress-track{height:4px;background:#dae2ef;border-radius:4px;overflow:hidden;margin-top:10px}
.progress-track span{height:100%;display:block;background:var(--blue);transition:width .2s}
.preview-tip{font-size:11px;color:#8390a5;text-align:center;margin:12px 0}
.standalone-preview{max-width:820px;margin:auto}
.standalone-preview .resume-paper{min-height:1050px;font-size:14px;padding:58px 65px}
.standalone-preview .paper-header h1{font-size:36px}
.standalone-preview .paper-position{font-size:17px}
.standalone-preview .paper-contact{font-size:12px}
.standalone-preview .paper-section h2{font-size:16px}
.standalone-preview .paper-row h3{font-size:14px}
.standalone-preview .paper-row span,.standalone-preview .paper-item strong,.standalone-preview .paper-skill{font-size:12px}
.export-panel{padding:22px;background:white;border:1px solid var(--line);border-radius:6px;margin-bottom:23px}
.export-panel h2{font-size:16px;margin:0 0 12px}
.export-panel p{color:var(--muted);font-size:11px;margin:12px 0 0}
.export-text{width:100%;min-height:200px;border:1px solid var(--line);border-radius:8px;padding:15px;color:var(--ink);margin-top:12px;resize:vertical;background:#f9fbff}
.prose{max-width:850px;margin:0 auto;border:1px solid var(--line);border-radius:6px;padding:38px 44px;background:white}
.prose h1{font-size:26px;margin-top:0}
.prose h2{font-size:16px;margin-top:28px}
.prose p,.prose li{color:#66778f;font-size:13px;line-height:2}
.prose .callout{background:#f1f6ff;padding:16px;border-radius:8px;color:#45628b}
.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#223451;color:white;padding:13px 24px;border-radius:10px;box-shadow:0 8px 30px #18263f30;z-index:100;font-size:13px;max-width:calc(100vw - 30px);text-align:center}
.toast.error{background:#983d49}
.boot{text-align:center;padding:70px}
.mobile-preview{display:none}
.storage-warning{padding:14px 18px;border:1px solid #f1cd9e;background:#fff8ed;border-radius:9px;color:#8a5824;margin-bottom:20px;font-size:12px}

/* Thumbnails use the same document renderer as the editor. */
.template-cover .resume-paper{min-height:315px;padding:17px 16px 24px;font-size:6.4px;line-height:1.65;box-shadow:0 1px 6px #26344212;border-radius:0}
.template-cover .paper-header{padding-bottom:10px;margin-bottom:12px;border-bottom-width:1px}
.template-cover .paper-eyebrow{font-size:5.5px;letter-spacing:2px}
.template-cover .paper-header h1{font-size:18px;margin:2px 0;letter-spacing:1px}
.template-cover .paper-position{font-size:8px}
.template-cover .paper-contact{font-size:5.5px;margin-top:5px}
.template-cover .paper-section{margin:12px 0}
.template-cover .paper-section h2{font-size:7px;margin-bottom:6px;padding-bottom:3px;letter-spacing:.5px}
.template-cover .paper-section p{margin:4px 0}
.template-cover .paper-row{gap:4px}
.template-cover .paper-row h3{font-size:6.5px}
.template-cover .paper-row span{font-size:5.5px}
.template-cover .paper-item{margin-bottom:8px}
.template-cover .paper-item strong{font-size:6px}
.template-cover .paper-skills{gap:3px}
.template-cover .paper-skill{font-size:6px;padding:1px 4px}
.template-cover .layout-accent{border-top-width:4px}
.template-cover .layout-accent .paper-section h2{border-left-width:2px;padding:0 0 0 5px}
.template-cover .layout-minimal .paper-section h2{font-size:8px}

@media(max-width:1050px){
.site-header{gap:35px}
.header-note{display:none}
.template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.editor-layout{grid-template-columns:minmax(290px,.95fr) minmax(0,1fr);gap:15px}
.resume-paper{padding:28px 22px}
.preview-stage{padding:14px}
.draft-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
.site-header{height:104px;padding:15px 18px 0;flex-wrap:wrap;gap:8px 0;align-content:space-between}
.brand{font-size:16px}
.brand-mark{width:29px;height:33px;font-size:20px}
.brand small{display:none}
.site-header nav{height:41px;width:100%;gap:28px;font-size:12px}
.site-header nav a{height:41px}
.site-header .count{font-size:9px}
main{padding:23px 16px 32px;min-height:calc(100vh - 190px)}
.library-heading{display:block;margin-bottom:20px}
.library-heading h1{font-size:22px}
.library-heading p{font-size:12px;line-height:1.8}
.library-heading .actions{margin-top:14px;gap:9px}
.library-heading .actions button{padding:7px 13px}
.library-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:13px;padding-bottom:14px;margin-bottom:17px}
.filters{gap:1px;order:2}
.filters button{padding:6px 10px;font-size:12px}
.search{width:100%}
.search input{font-size:16px;padding:7px 10px}
.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}
.template-cover{height:230px;padding:11px 9px 0}
.template-cover .resume-paper{padding:12px 10px 18px;min-height:270px;font-size:5.5px}
.template-cover .paper-header{margin-bottom:9px;padding-bottom:7px}
.template-cover .paper-header h1{font-size:15px}
.template-cover .paper-position{font-size:7px}
.template-cover .paper-contact{font-size:4.5px}
.template-cover .paper-section{margin:9px 0}
.template-cover .paper-section h2{font-size:6.5px}
.template-cover .paper-row{display:block}
.template-cover .paper-row h3{font-size:6px}
.template-cover .paper-row span{font-size:5px}
.template-cover .paper-item strong,.template-cover .paper-skill{font-size:5px}
.template-info{padding:11px}
.template-info h3{font-size:13px}
.template-info p{min-height:32px;font-size:10px;line-height:1.6;margin:5px 0 10px}
.template-info button{font-size:11px}
.library-note{font-size:10px;line-height:1.8;margin-top:18px}
.site-footer{margin:0 16px;padding:18px 0;min-height:85px;display:block;text-align:center;font-size:10px}
.site-footer div{justify-content:center;margin-top:6px;gap:20px}
.page-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:20px;gap:13px}
.page-heading h1{font-size:23px}
.draft-list{grid-template-columns:1fr}
.draft-card{padding:20px}
.editor-top{flex-wrap:wrap;gap:10px}
.editor-top .actions{width:100%;margin:0;gap:8px}
.editor-top .actions button,.editor-top .actions .button{font-size:12px;padding:8px 13px}
.editor-heading h1{font-size:18px}
.editor-layout{display:block}
.editor-form{padding:20px 17px}
.fields{gap:12px}
.field{font-size:11px}
.field input,.field select,.field textarea{font-size:16px;padding:9px 10px}
.repeat-card{padding:13px}
.preview-panel{display:none;position:static;margin-top:20px}
.mobile-preview{display:inline-block}
.show-live-preview .preview-panel{display:block}
.show-live-preview .editor-form{display:none}
.preview-stage{padding:13px}
.resume-paper{font-size:10px;padding:29px 23px;min-height:550px}
.paper-header h1{font-size:26px}
.paper-row{flex-wrap:wrap;gap:1px}
.paper-row h3{font-size:11px}
.paper-row span{font-size:8px}
.standalone-preview .resume-paper{padding:30px 25px;min-height:650px;font-size:11px}
.standalone-preview .paper-header h1{font-size:27px}
.standalone-preview .paper-position{font-size:14px}
.standalone-preview .paper-contact{font-size:10px}
.standalone-preview .paper-section h2{font-size:13px}
.standalone-preview .paper-row h3{font-size:11px}
.standalone-preview .paper-row span,.standalone-preview .paper-item strong,.standalone-preview .paper-skill{font-size:10px}
.export-panel{padding:18px}
.export-panel .actions button{font-size:11px;padding:8px 10px}
.prose{padding:25px 22px}
.prose h1{font-size:22px}
.prose p,.prose li{font-size:12px}
.prose ol{padding-left:18px}
.toast{bottom:18px;font-size:12px}
.color-select{font-size:16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media print{@page{size:A4;margin:14mm 15mm}body,main{background:white;padding:0;margin:0;max-width:none}
.site-header,.site-footer,.page-heading,.export-panel,.toast,.preview-tip,.storage-warning{display:none!important}
.standalone-preview{max-width:none}
.standalone-preview .resume-paper{box-shadow:none;min-height:0;padding:0;border:0;font-size:10pt}
.standalone-preview .paper-header h1{font-size:26pt}
.standalone-preview .paper-position{font-size:13pt}
.standalone-preview .paper-contact{font-size:9pt}
.standalone-preview .paper-section h2{font-size:12pt;break-after:avoid}
.paper-item{break-inside:avoid}
.resume-paper{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
