:root{
  --bg0:#ffffff;
  --bg1:#f6f7fb;
  --card:#ffffff;
  /* Lighten stroke color for a softer, less boxy look */
  --stroke:#b5b5c2;
  --text:#111111;
  --muted:#555555;
  --accent:#1b66ff;
  --accent2:#6a4bff;
  --shadow: 0 10px 22px rgba(0,0,0,.06);
  --radius: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(27,102,255,.12), transparent 60%),
    radial-gradient(820px 620px at 100% 0%, rgba(106,75,255,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:4px; }

.container{ max-width:1120px; margin:0 auto; padding:18px; }

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.85);
  border-bottom:2px solid var(--stroke);
}
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand{ display:flex; align-items:center; gap:10px; color:var(--text); font-weight:900; letter-spacing:.2px; }
.brand-dot{ width:10px; height:10px; border:2px solid var(--stroke); border-radius:50%; }
.nav{ display:flex; gap:10px; flex-wrap:wrap; }
.nav a{
  color:var(--text);
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:12px;
  transition:all .15s ease;
}
.nav a:hover{ border-color:var(--stroke); box-shadow:0 8px 16px rgba(0,0,0,.06); }

/* Typography */
h1{ font-size:30px; margin:0; letter-spacing:-.2px; }
h2{ margin:0 0 10px; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }

.page-head{ display:flex; flex-direction:column; gap:6px; margin:18px 0; }

/* Cards / Panels */
.card, .panel, .tool-card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:12px;
  box-shadow: var(--shadow);
}
.card{ padding:14px; }
.panel{ padding:16px; }
.tool-card{ padding:16px; transition: transform .12s ease, box-shadow .12s ease; }
.tool-card:hover{ transform: translateY(-2px); box-shadow: 0 18px 34px rgba(0,0,0,.10); }

.grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }

.card-title{ font-weight:900; margin-bottom:8px; }
.card-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; align-items:center; }

/* Forms */
.form{ display:flex; flex-direction:column; gap:10px; }
.label{ font-weight:800; }
.input{
  width:100%;
  padding:10px 12px;
  border:2px solid var(--stroke);
  border-radius:14px;
  background:#fff;
  color:var(--text);
}
.input:focus{ outline:none; box-shadow: 0 0 0 3px rgba(27,102,255,.18); }

/* Buttons */
.btn{
  appearance:none;
  border:2px solid var(--stroke);
  background:#fff;
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 22px rgba(0,0,0,.10); }
.btn:active{ transform: translateY(0px); box-shadow:none; }
.btn-primary{ background: linear-gradient(135deg, rgba(27,102,255,.18), rgba(106,75,255,.16)); }
.btn-primary:hover{ background: linear-gradient(135deg, rgba(27,102,255,.24), rgba(106,75,255,.22)); }
.btn-outline{ background:#fff; }
.btn-ghost{ background:transparent; }

.inline{ margin-top:10px; }
.stack{ display:flex; flex-direction:column; gap:10px; }

/* Tool layout */
.tool-header{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin:16px 0; }
.tool-title{ margin:0; }
.tool-sub{ margin:6px 0 0; color:var(--muted); }
.crumbs{ font-size:13px; color:var(--muted); }
.crumbs a{ color:var(--text); }

.tool-layout{ display:grid; grid-template-columns: 1.5fr .9fr; gap:14px; align-items:start; }
@media (max-width: 900px){ .tool-layout{ grid-template-columns: 1fr; } }

.panel-title{ margin:0 0 10px; font-size:16px; }
.mini-list{ display:flex; flex-direction:column; gap:8px; }
.mini-item{ padding:10px 12px; border:2px solid var(--stroke); border-radius:14px; color:var(--text); background:#fff; }
.mini-item:hover{ box-shadow:0 12px 22px rgba(0,0,0,.10); }

.steps{ margin:0; padding-left:18px; }

/* Dual-pane layouts for tools with side-by-side form and preview */
.dual-pane{
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  align-items:flex-start;
}
.dual-pane .form,
.dual-pane .browser-preview-panel{
  flex: 1 1 350px;
  min-width:300px;
}
/* Allow the preview pane to scroll separately from the page */
.browser-preview-panel{
  overflow-y:auto;
  max-height:80vh;
}

/* Resume template variations */
.resume-sheet.classic .resume-header{
  border-bottom:1px solid var(--stroke);
  margin-bottom:8px;
  padding-bottom:4px;
}
.resume-sheet.classic h2{
  font-size:22px;
}

.resume-sheet.modern{
  background:#f7f8fc;
  border:1px solid #e0e0f0;
}
.resume-sheet.modern .resume-header{
  background: var(--accent);
  color:#fff;
  padding:12px;
  border-radius:12px;
  margin-bottom:8px;
}
.resume-sheet.modern h2,
.resume-sheet.modern .resume-title,
.resume-sheet.modern .resume-contact{
  color:#fff;
}
.resume-sheet.modern .resume-section h3{
  color: var(--accent);
}

/* Flash toasts */
.flash{ display:flex; flex-direction:column; gap:10px; margin:12px 0; }
.toast{ display:flex; gap:10px; align-items:flex-start; padding:12px 12px; border:2px solid var(--stroke); border-radius:var(--radius); background:#fff; box-shadow: var(--shadow); }
.toast-dot{ width:10px; height:10px; border-radius:50%; background:var(--accent); margin-top:4px; }
.toast-error .toast-dot{ background:#ff4d4d; }
.toast-msg{ font-weight:600; }

/* Loader */
.loader{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; padding:18px; background: rgba(255,255,255,.65); backdrop-filter: blur(6px); z-index:9999; }
.loader[aria-hidden="false"]{ display:flex; }
.loader-card{ width:min(520px, 100%); border:2px solid var(--stroke); border-radius:var(--radius); background:#fff; box-shadow: 0 26px 55px rgba(0,0,0,.12); padding:16px; display:flex; gap:14px; align-items:center; }
.loader-spinner{ width:30px; height:30px; border-radius:50%; border:3px solid rgba(17,17,17,.18); border-top-color: var(--stroke); animation: spin 1s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }
.loader-title{ font-weight:900; }
.loader-sub{ color:var(--muted); font-size:13px; margin-top:2px; }
.loader-time{ color:var(--muted); font-size:12px; margin-top:4px; }
.loader-bar{ margin-top:10px; height:8px; width:100%; border:2px solid var(--stroke); border-radius:999px; overflow:hidden; background:#fff; }
.loader-bar span{ display:block; height:100%; width:40%; background: linear-gradient(90deg, rgba(27,102,255,.35), rgba(106,75,255,.35)); animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar{ 0%{ transform: translateX(-90%); } 50%{ transform: translateX(60%); } 100%{ transform: translateX(180%); } }

/* Editor */
.tabs{ display:flex; gap:10px; margin-bottom:12px; }
.tab-btn{ border:2px solid var(--stroke); border-radius:14px; padding:8px 12px; background:#fff; font-weight:900; cursor:pointer; }
.tab-btn.active{ background: rgba(27,102,255,.12); }
.tab-btn:disabled{ opacity:.5; cursor:not-allowed; }
.toolbar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px; border:2px solid var(--stroke); border-radius:var(--radius); background:#fff; }
.tbtn{ border:2px solid var(--stroke); border-radius:12px; padding:8px 10px; background:#fff; font-weight:800; cursor:pointer; }
.toolbar-sep{ width:1px; height:22px; background: rgba(17,17,17,.25); margin:0 6px; }
.toolbar-spacer{ flex:1; }

#editor-wrap{ position:relative; border:2px solid var(--stroke); border-radius:var(--radius); padding:14px; background:#fff; min-height:520px; }
#editor{ outline:none; }

.sig-box{ position:absolute; border:2px dashed var(--stroke); border-radius:12px; background: rgba(255,255,255,.65); padding:4px; }
.sig-box img{ width:100%; height:100%; object-fit:contain; display:block; }
.sig-handle{ position:absolute; right:-10px; bottom:-10px; width:18px; height:18px; border-radius:6px; border:2px solid var(--stroke); background:#fff; cursor:nwse-resize; }

.img-resize-handle{ position:absolute; width:14px; height:14px; border-radius:6px; border:2px solid var(--stroke); background:#fff; cursor:nwse-resize; }

.docx-preview{ border:2px solid var(--stroke); border-radius:var(--radius); padding:14px; background:#fff; overflow:auto; }

/* Footer */
.footer{ margin-top:26px; border-top:2px solid var(--stroke); background: rgba(255,255,255,.85); }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; }
.footer-note{ color:var(--muted); font-size:13px; }
.footer-meta{ color:var(--muted); font-size:13px; }

/* Home hero */
.hero{ display:grid; grid-template-columns: 1.2fr .8fr; gap:16px; align-items:start; margin-top:16px; }
@media (max-width: 900px){ .hero{ grid-template-columns:1fr; } }
.lead{ font-size:16px; color:var(--muted); margin:10px 0 0; }
.hero-cta{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.hero-badges{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.badge{ display:inline-flex; align-items:center; gap:8px; padding:8px 10px; border:2px solid var(--stroke); border-radius:999px; background:#fff; font-weight:800; font-size:12px; }

.preview-card{ padding:16px; }
.preview-top{ font-weight:900; margin-bottom:10px; }
.preview-list{ margin:0; padding-left:18px; }
.preview-list li{ margin:8px 0; }
.preview-list a{ color:var(--text); }

.section{ margin-top:18px; }
.section-head{ display:flex; flex-direction:column; gap:6px; margin:12px 0; }

.tool-meta{ display:flex; flex-direction:column; gap:6px; }
.tool-cat{ font-size:12px; color:var(--muted); font-weight:800; }
.tool-name{ font-size:16px; font-weight:900; color:var(--text); }
.tool-desc{ font-size:13px; color:var(--muted); }
.tool-go{ margin-top:10px; font-weight:900; color:var(--text); }

.info-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.info{ padding:16px; border:2px solid var(--stroke); border-radius:var(--radius); background:#fff; box-shadow: var(--shadow); }
.info-title{ font-weight:900; margin-bottom:6px; }
.info-text{ color:var(--muted); font-size:13px; }


.row{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (max-width: 760px){ .row{ grid-template-columns:1fr; } }

.browser-preview-panel{ margin-top:14px; }
.dual-pane .browser-preview-panel{ margin-top:0; }
.doc-sheet{ width:min(210mm, 100%); min-height:297mm; margin:0 auto; background:#fff; color:#111; border:1px solid #d8d8d8; box-shadow:0 12px 28px rgba(0,0,0,.08); padding:16mm 14mm; }
.letter-sheet{ line-height:1.55; font-size:14px; }
.letter-sheet .doc-topline{ font-weight:700; margin-bottom:10px; }
.letter-sheet .doc-date, .letter-sheet .doc-company, .letter-sheet .doc-role{ margin-bottom:10px; }
.letter-sheet .doc-body{ white-space:normal; margin:18px 0; }
.letter-sheet .doc-signoff{ margin-top:22px; }
.letter-sheet .doc-name{ font-weight:700; margin-top:6px; }

.resume-sheet{ font-size:13px; line-height:1.45; }
.resume-header{ display:flex; justify-content:space-between; gap:18px; border-bottom:2px solid #111; padding-bottom:10px; margin-bottom:14px; }
.resume-header h2{ font-size:28px; margin:0 0 4px; }
.resume-title{ font-size:16px; font-weight:700; }
.resume-contact{ max-width:40%; text-align:right; font-size:12px; color:#333; white-space:pre-wrap; }
.resume-section{ margin-bottom:14px; }
.resume-section h3{ font-size:13px; text-transform:uppercase; letter-spacing:.08em; margin:0 0 8px; }
.resume-section ul{ margin:0; padding-left:18px; }
.resume-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width: 760px){ .resume-header, .resume-grid-2{ display:block; } .resume-contact{ max-width:none; text-align:left; margin-top:10px; } }

.editor-stage-wrap{ overflow:auto; border:2px solid var(--stroke); border-radius:var(--radius); background:#eef1f7; padding:12px; }
.pdf-stage{ position:relative; margin:0 auto; background:#fff; box-shadow:0 12px 28px rgba(0,0,0,.12); }
#pdf-canvas{ display:block; width:100%; height:auto; }
.pdf-overlay-layer{ position:absolute; inset:0; }
.overlay-item{ position:absolute; z-index:2; }
.overlay-text{ position:absolute; z-index:2; min-width:120px; min-height:28px; padding:6px 8px; border:1px dashed #111; background:rgba(255,255,255,.92); color:#111; cursor:move; }
.overlay-image{ position:absolute; z-index:2; border:1px dashed #111; background:rgba(255,255,255,.95); cursor:move; }
.overlay-image img{ width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.item-resize-handle{ position:absolute; right:-9px; bottom:-9px; width:16px; height:16px; border:2px solid #111; border-radius:6px; background:#fff; cursor:nwse-resize; }

.error-box{margin:12px 0;padding:14px 16px;border:2px solid #111;border-radius:18px;background:#fff3f3;color:#111;box-shadow:var(--shadow);}
.error-box-title{font-weight:900;margin-bottom:6px;}
.error-box-msg{white-space:pre-wrap;font-size:14px;}


.tool-layout-full{grid-template-columns:1fr;}
.panel-flat{border:0;box-shadow:none;background:transparent;padding:0;}
.builder-shell{display:grid;grid-template-columns:minmax(320px,430px) minmax(360px,1fr);gap:28px;align-items:start;}
@media (max-width:980px){.builder-shell{grid-template-columns:1fr;}}
.builder-form-col,.builder-preview-col{min-width:0;}
.builder-preview-col{position:sticky;top:88px;}
@media (max-width:980px){.builder-preview-col{position:static;}}
.preview-header{font-size:14px;font-weight:700;color:var(--muted);margin-bottom:10px;}
.preview-scroll{max-height:calc(100vh - 150px);overflow:auto;padding-right:8px;}
@media (max-width:980px){.preview-scroll{max-height:none;overflow:visible;padding-right:0;}}
.builder-tip{margin:0 0 14px;}
.sticky-actions{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.94) 24%,rgba(255,255,255,1));padding-top:12px;}
.doc-sheet{width:210mm;max-width:100%;min-height:auto;margin:0 auto;background:#fff;color:#111;border:1px solid #e2e2ea;box-shadow:0 8px 20px rgba(0,0,0,.06);padding:16mm 14mm;}
.letter-sheet{line-height:1.62;font-size:14px;}
.letter-sheet .doc-topline{font-weight:600;margin-bottom:10px;}
.letter-sheet .doc-date,.letter-sheet .doc-company,.letter-sheet .doc-role{margin-bottom:10px;}
.letter-sheet .doc-body{margin:18px 0;}
.resume-sheet{font-size:13px;line-height:1.5;}
.resume-header{display:block;border-bottom:1px solid #d9d9e3;padding-bottom:10px;margin-bottom:14px;}
.resume-header-main{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;}
.resume-header h2{font-size:28px;margin:0 0 4px;}
.resume-title{font-size:16px;font-weight:600;}
.resume-contact{margin-top:10px;font-size:12px;color:#555;white-space:pre-wrap;}
.resume-photo{display:none;width:86px;height:86px;border-radius:50%;object-fit:cover;border:1px solid #ddd;}
.resume-section{margin-bottom:14px;}
.resume-section h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin:0 0 8px;color:#333;}
.resume-section ul{margin:0;padding-left:18px;}
.resume-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media (max-width:760px){.resume-grid-2{grid-template-columns:1fr;}}
.resume-sheet.classic .resume-header{border-bottom:1px solid #d9d9e3;}
.resume-sheet.modern{background:#fbfbfe;border-color:#e6e6f2;}
.resume-sheet.modern .resume-header{background:linear-gradient(135deg,#214fe0,#5e63ea);color:#fff;border:0;border-radius:10px;padding:14px 16px;margin:-4mm -2mm 14px;}
.resume-sheet.modern .resume-contact,.resume-sheet.modern .resume-title,.resume-sheet.modern h2{color:#fff;}
.resume-sheet.modern .resume-section h3{color:#214fe0;}
.resume-sheet.minimal{padding-top:12mm;padding-bottom:12mm;}
.resume-sheet.minimal .resume-header{border:0;padding-bottom:0;}
.resume-sheet.minimal .resume-section h3{letter-spacing:.02em;text-transform:none;font-size:13px;}


.tool-layout-full{grid-template-columns:1fr;}
.panel-flat{border:0;box-shadow:none;background:transparent;padding:0;}
.builder-shell{display:grid;grid-template-columns:minmax(320px,430px) minmax(360px,1fr);gap:28px;align-items:start;}
@media (max-width:980px){.builder-shell{grid-template-columns:1fr;}}
.builder-form-col,.builder-preview-col{min-width:0;}
.builder-preview-col{position:sticky;top:88px;}
@media (max-width:980px){.builder-preview-col{position:static;}}
.preview-toolbar{display:flex;align-items:center;gap:10px;justify-content:flex-end;margin-bottom:10px;}
.preview-header{margin-right:auto;font-size:14px;font-weight:700;color:var(--muted);}
.template-arrow{min-width:44px;}
.preview-scroll{max-height:calc(100vh - 150px);overflow:auto;padding-right:8px;}
@media (max-width:980px){.preview-scroll{max-height:none;overflow:visible;padding-right:0;}}
.builder-tip{margin:0 0 14px;}
.sticky-actions{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.94) 24%,rgba(255,255,255,1));padding-top:12px;}
.doc-sheet{width:210mm;max-width:100%;min-height:auto;margin:0 auto;background:#fff;color:#111;border:1px solid #e2e2ea;box-shadow:0 8px 20px rgba(0,0,0,.06);padding:10mm 8mm;}
.letter-name{font-size:18px;font-weight:700;margin-bottom:4px;}
.letter-from-block,.letter-to-block{white-space:pre-wrap;line-height:1.5;}
.letter-meta-row{margin:14px 0;}
.letter-company-role,.letter-subject{margin-top:12px;font-weight:600;}
.letter-subject{border-top:1px solid #eee;padding-top:10px;}
.letter-place{color:#666;}
.resume-sheet{font-size:13px;line-height:1.5;}
.resume-header{display:block;border-bottom:1px solid #d9d9e3;padding-bottom:10px;margin-bottom:14px;}
.resume-header-main{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;}
.resume-header h2{font-size:28px;margin:0 0 4px;}
.resume-title{font-size:16px;font-weight:600;}
.resume-contact{margin-top:10px;font-size:12px;color:#555;white-space:pre-wrap;}
.resume-photo{display:none;width:86px;height:86px;border-radius:50%;object-fit:cover;border:1px solid #ddd;}
.resume-section{margin-bottom:14px;}
.resume-section h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin:0 0 8px;color:#333;}
.resume-section ul{margin:0;padding-left:18px;}
.resume-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media (max-width:760px){.resume-grid-2{grid-template-columns:1fr;}}
.resume-sheet.classic .resume-header{border-bottom:1px solid #d9d9e3;}
.resume-sheet.modern{background:#fbfbfe;border-color:#e6e6f2;}
.resume-sheet.modern .resume-header{background:linear-gradient(135deg,#214fe0,#5e63ea);color:#fff;border:0;border-radius:10px;padding:14px 16px;margin:-4mm -2mm 14px;}
.resume-sheet.modern .resume-contact,.resume-sheet.modern .resume-title,.resume-sheet.modern h2{color:#fff;}
.resume-sheet.modern .resume-section h3{color:#214fe0;}
.resume-sheet.minimal{padding-top:12mm;padding-bottom:12mm;}
.resume-sheet.minimal .resume-header{border:0;padding-bottom:0;}
.resume-sheet.minimal .resume-section h3{letter-spacing:.02em;text-transform:none;font-size:13px;}
.resume-sheet.executive .resume-header{border-bottom:2px solid #222;}
.resume-sheet.executive .resume-title{letter-spacing:.08em;text-transform:uppercase;font-size:13px;}
.resume-sheet.executive .resume-section h3{border-bottom:1px solid #ddd;padding-bottom:4px;}
.resume-sheet.sidebar{display:grid;gap:16px;}
.resume-sheet.sidebar .resume-header{grid-column:1/-1;border-bottom:0;background:#f5f6fa;padding:12px;border-radius:10px;}
.resume-sheet.sidebar #section-profile,.resume-sheet.sidebar #section-skills,.resume-sheet.sidebar #section-education{grid-column:1;}
.resume-sheet.sidebar #section-experience,.resume-sheet.sidebar #section-projects{grid-column:2;}
.resume-sheet.sidebar #section-lower-grid{display:contents;}
.upload-screen{display:flex;align-items:center;justify-content:center;min-height:68vh;}
.upload-dropzone{width:min(860px,100%);min-height:320px;border:2px dashed #c8c8da;border-radius:18px;background:#fafafe;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;cursor:pointer;transition:.2s ease;}
.upload-dropzone.is-drag,.upload-dropzone:hover{border-color:#6a4bff;background:#f2f0ff;}
.upload-title{font-size:30px;font-weight:800;margin-bottom:8px;}
.upload-sub{margin-top:12px;color:#666;max-width:600px;}
.editor-page-card{overflow:visible;}
.editor-sticky-toolbar{position:sticky;top:76px;z-index:15;box-shadow:0 8px 18px rgba(0,0,0,.06);}
#editor-wrap{max-height:none;overflow:visible;}


.autosave-note{font-weight:700;margin-right:6px;}
.resume-sheet.minimal .resume-header-main{display:block;}
.resume-sheet.minimal .resume-contact{border-top:1px solid #ececf1;padding-top:8px;margin-top:12px;}
.resume-sheet.executive{border-top:5px solid #111;padding-top:12mm;}
.resume-sheet.executive .resume-header-main{align-items:flex-end;}
.resume-sheet.executive .resume-section h3{font-size:11px;letter-spacing:.16em;color:#111;}
.resume-sheet.sidebar{background:linear-gradient(90deg,#f4f6fb 0,#f4f6fb 28%,#fff 28%,#fff 100%);}
.resume-sheet.sidebar .resume-header{background:#e9edf7;}
@media (max-width:760px){
  .resume-sheet.sidebar{display:block;background:#fff;}
  .resume-sheet.sidebar #section-profile,.resume-sheet.sidebar #section-skills,.resume-sheet.sidebar #section-education,.resume-sheet.sidebar #section-experience,.resume-sheet.sidebar #section-projects{grid-column:auto;}
}


.section-builder-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;}
.section-builder-list{display:flex;flex-direction:column;gap:12px;}
.section-card{border:2px solid var(--stroke);border-radius:16px;padding:12px;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.05);}
.section-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.section-card-title{font-weight:800;}
.section-card-actions{display:flex;gap:8px;flex-wrap:wrap;}
.btn-small{padding:8px 10px;border-radius:12px;min-width:42px;}
.resume-columns{display:grid;grid-template-columns:minmax(0,32%) minmax(0,1fr);gap:18px;align-items:start;}
.resume-column{min-width:0;overflow-wrap:anywhere;word-break:break-word;}
.resume-sidebar-column{background:#f4f6fb;border-radius:10px;padding:12px;overflow:hidden;}
.resume-main-column{padding-top:2px;padding-left:2px;}
.resume-placeholder{min-height:12px;border:0;background:transparent;padding:0;}
.resume-sheet.sidebar .resume-columns{display:grid;grid-template-columns:minmax(0,25%) minmax(0,1fr);gap:18px;align-items:start;}
.resume-sheet.classic .resume-columns,.resume-sheet.modern .resume-columns,.resume-sheet.minimal .resume-columns,.resume-sheet.executive .resume-columns{display:block;}
.resume-sheet.classic .resume-sidebar-column,.resume-sheet.modern .resume-sidebar-column,.resume-sheet.minimal .resume-sidebar-column,.resume-sheet.executive .resume-sidebar-column{background:transparent;padding:0;border-radius:0;}
@media (max-width:760px){
  .section-builder-header{flex-direction:column;align-items:stretch;}
  .resume-columns,.resume-sheet.sidebar .resume-columns{grid-template-columns:1fr;}
}


.card-sheet{padding:12mm;background:#fff;}
.card-sheet-title{display:none;}
.card-preview-stage{min-height:250mm;border:0;border-radius:0;background:#fff;padding:0;display:grid;gap:10mm;justify-items:center;align-content:start;}
.card-preview-stage.stacked{grid-template-columns:1fr;}
.card-preview-stage.side-by-side{grid-template-columns:1fr 1fr;align-items:start;}
.card-preview-slot{width:100%;display:flex;flex-direction:column;align-items:center;gap:0;}
.card-preview-label{display:none;}
.card-preview-slot img{display:none;width:100%;max-width:160mm;border:1px solid #d8deea;border-radius:14px;object-fit:contain;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.07);}
.card-preview-stage.side-by-side .card-preview-slot img{max-width:84mm;}
.card-preview-empty{width:100%;max-width:160mm;min-height:90mm;border:0;border-radius:0;display:block;padding:0;background:#fff;}
.card-preview-stage.side-by-side .card-preview-empty{max-width:84mm;}
.card-preview-stage.scale-100 .card-preview-slot img,.card-preview-stage.scale-100 .card-preview-empty{max-width:190mm;}
.card-preview-stage.scale-80 .card-preview-slot img,.card-preview-stage.scale-80 .card-preview-empty{max-width:160mm;}
.card-preview-stage.scale-50 .card-preview-slot img,.card-preview-stage.scale-50 .card-preview-empty{max-width:105mm;}
.card-preview-stage.scale-20 .card-preview-slot img,.card-preview-stage.scale-20 .card-preview-empty{max-width:54mm;}
.card-preview-stage.side-by-side.scale-100 .card-preview-slot img,.card-preview-stage.side-by-side.scale-100 .card-preview-empty{max-width:90mm;}
.card-preview-stage.side-by-side.scale-80 .card-preview-slot img,.card-preview-stage.side-by-side.scale-80 .card-preview-empty{max-width:78mm;}
.card-preview-stage.side-by-side.scale-50 .card-preview-slot img,.card-preview-stage.side-by-side.scale-50 .card-preview-empty{max-width:58mm;}
.card-preview-stage.side-by-side.scale-20 .card-preview-slot img,.card-preview-stage.side-by-side.scale-20 .card-preview-empty{max-width:34mm;}
@media (max-width:760px){.card-preview-stage.side-by-side{grid-template-columns:1fr;}.card-preview-stage.side-by-side .card-preview-slot img,.card-preview-stage.side-by-side .card-preview-empty{max-width:160mm;}}


.hero-focused{align-items:center;}
.grid-main-tools{grid-template-columns:repeat(3,minmax(0,1fr));}
.tool-card-main{border-width:2px;box-shadow:0 12px 30px rgba(0,0,0,.06);}
.tool-card-beta .tool-cat{color:#7a52ff;}
.beta-note,.queue-badge,.beta-chip{display:inline-flex;align-items:center;gap:6px;background:#f3efff;color:#5b34d6;border:1px solid #d8cdfd;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;margin-top:10px;}
.beta-chip{margin-top:0;margin-left:8px;padding:3px 8px;}
.queue-shell{display:flex;justify-content:center;padding:30px 0 10px;}
.queue-card{width:min(720px,100%);background:#fff;border:1px solid var(--stroke);border-radius:24px;padding:28px;box-shadow:0 18px 48px rgba(0,0,0,.08);}
.queue-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0;}
.queue-metric{padding:16px;border:1px solid var(--stroke);border-radius:18px;background:#f9fbff;}
.queue-metric span{display:block;color:#667085;font-size:13px;margin-bottom:6px;}
.queue-metric strong{font-size:24px;}
.queue-progress{height:12px;background:#edf1f7;border-radius:999px;overflow:hidden;margin:8px 0 16px;}
.queue-progress span{display:block;height:100%;width:20%;background:linear-gradient(90deg,#7a52ff,#4ea1ff);}
.queue-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
@media (max-width:900px){.grid-main-tools{grid-template-columns:1fr;}}

.resume-sheet.sidebar .resume-section ul{padding-left:16px;margin-left:0;}
.resume-sheet.sidebar .resume-sidebar-column .resume-section,.resume-sheet.sidebar .resume-main-column .resume-section{max-width:100%;overflow:hidden;}
.resume-sheet.sidebar .resume-sidebar-column{box-sizing:border-box;}
.resume-sheet.sidebar .resume-main-column{box-sizing:border-box;}

.resume-sheet.sidebar .resume-columns{grid-template-columns:minmax(0mm,25%) minmax(0,1fr);align-items:start;}
.resume-sheet.sidebar .resume-main-column{width:100%;max-width:none;padding-left:8px;}
.resume-sheet.sidebar .resume-sidebar-column{width:100%;}
.resume-sheet.sidebar .resume-main-column .resume-section,.resume-sheet.sidebar .resume-main-column ul,.resume-sheet.sidebar .resume-main-column li,.resume-sheet.sidebar .resume-main-column p{max-width:none;width:100%;}
.text-overlay-box{position:absolute;min-width:120px;min-height:32px;padding:8px 10px;border:1px dashed #9aa6c1;border-radius:10px;background:rgba(255,255,255,.96);box-shadow:0 8px 20px rgba(0,0,0,.06);cursor:move;z-index:4;}
.text-overlay-box.active{border-color:#1b66ff;box-shadow:0 0 0 3px rgba(27,102,255,.12);}
