/* ============================================
   CV Builder Stylesheet
   ============================================ */

.builder-page { padding-top: 6rem; min-height: 100vh; }

.builder-header { padding: 2rem 0 2.5rem; text-align: center; }
.builder-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; margin: .8rem 0; }
.builder-title span { display: inline; }
.builder-header > .container > p { color: var(--text-muted); max-width: 640px; margin: 0 auto 2rem; }

.builder-toolbar {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem;
  padding: 1.4rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}

/* Template picker */
.template-picker { display: flex; gap: .6rem; flex-wrap: wrap; }
.tpl-btn {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .5rem; border-radius: 12px;
  background: transparent; border: 2px solid transparent;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  transition: all var(--transition);
}
.tpl-btn:hover { color: var(--text); }
.tpl-btn.active { color: var(--text); border-color: var(--primary); background: var(--surface-2); }
.tpl-preview {
  width: 56px; height: 76px; border-radius: 6px;
  background: #fff; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.tpl-modern::before { content:''; position: absolute; top: 0; left: 0; bottom: 0; width: 35%; background: linear-gradient(180deg,#6366f1,#06b6d4);}
.tpl-modern::after { content:''; position: absolute; top: 10px; left: 45%; right: 8px; height: 8px; background: #cbd5e1; border-radius: 2px; box-shadow: 0 14px #e2e8f0, 0 28px #e2e8f0, 0 42px #e2e8f0;}
.tpl-classic::before { content:''; position: absolute; top: 0; left: 0; right: 0; height: 25%; background: #1e293b;}
.tpl-classic::after { content:''; position: absolute; top: 35%; left: 8px; right: 8px; height: 4px; background: #cbd5e1; border-radius:2px; box-shadow: 0 10px #e2e8f0, 0 20px #e2e8f0, 0 30px #e2e8f0;}
.tpl-minimal::before { content:''; position: absolute; top: 8px; left: 8px; right: 8px; height: 12px; background: #0f172a; border-radius: 2px;}
.tpl-minimal::after { content:''; position: absolute; top: 30px; left: 8px; right: 8px; height: 3px; background: #e2e8f0; box-shadow: 0 10px #e2e8f0, 0 20px #e2e8f0, 0 30px #e2e8f0, 0 40px #e2e8f0;}
.tpl-elegant::before { content:''; position: absolute; top: 10px; left: 8px; right: 8px; height: 14px; background: #7c2d12; border-radius:2px;}
.tpl-elegant::after { content:''; position: absolute; top: 35px; left: 8px; right: 8px; bottom: 10px; background: repeating-linear-gradient(180deg, #f8fafc 0 4px, #e2e8f0 4px 6px);}
.tpl-creative::before { content:''; position: absolute; inset: 0; background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 60%, #06b6d4 100%);}
.tpl-creative::after { content:''; position: absolute; top: 40%; left: 8px; right: 8px; height: 4px; background: rgba(255,255,255,.5); border-radius:2px; box-shadow: 0 10px rgba(255,255,255,.5), 0 20px rgba(255,255,255,.5);}

/* Color picker */
.color-picker { display: flex; gap: .5rem; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); border: 2px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }

.font-picker select {
  padding: .55rem .85rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-weight: 600; cursor: pointer;
}

/* ====== Main grid ====== */
.builder-grid {
  display: grid; grid-template-columns: 420px 1fr; gap: 2rem;
  margin: 2rem auto 4rem; align-items: start;
}

/* ====== Form ====== */
.builder-form {
  position: sticky; top: 6rem;
  max-height: calc(100vh - 7rem); overflow-y: auto;
  padding: 1.5rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.builder-form::-webkit-scrollbar { width: 6px; }
.builder-form::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

.form-actions-top { display: flex; gap: .6rem; margin-bottom: 1rem; }
.form-actions-top .btn { padding: .55rem .9rem; font-size: .85rem; flex: 1; justify-content: center; }

.form-section {
  margin-bottom: 1rem; border-radius: var(--radius-md);
  background: var(--bg-2); border: 1px solid var(--border);
  overflow: hidden;
}
.form-section[open] { border-color: var(--primary); }
.form-section summary {
  cursor: pointer; padding: 1rem 1.2rem;
  font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; gap: .6rem;
  list-style: none;
}
.form-section summary::-webkit-details-marker { display: none; }
.form-section summary::after {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  margin-left: auto; font-size: .8rem; color: var(--text-muted);
  transition: transform var(--transition);
}
.form-section[open] summary::after { transform: rotate(180deg); }
.form-section summary i { color: var(--primary); }

.form-content { padding: 0 1.2rem 1.2rem; display: grid; gap: .8rem; }
.form-content label { display: grid; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.form-content input, .form-content textarea, .form-content select {
  padding: .65rem .8rem; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: .92rem;
  transition: all var(--transition);
}
.form-content input:focus, .form-content textarea:focus, .form-content select:focus {
  outline: 0; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

/* Photo upload */
.form-photo { display: flex; justify-content: center; }
.photo-upload { cursor: pointer; }
.photo-preview {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--bg); border: 2px dashed var(--border);
  display: grid; place-items: center; gap: .35rem;
  font-size: .75rem; color: var(--text-muted);
  background-size: cover; background-position: center;
  transition: all var(--transition);
}
.photo-preview:hover { border-color: var(--primary); }
.photo-preview i { font-size: 1.4rem; color: var(--primary); }
.photo-preview.has-image i, .photo-preview.has-image span { display: none; }

/* Repeaters */
.repeater { display: grid; gap: 1rem; }
.repeater-item {
  padding: 1rem; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  position: relative; display: grid; gap: .7rem;
}
.repeater-item .remove {
  position: absolute; top: .5rem; right: .5rem;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); display: grid; place-items: center;
  color: #ef4444; font-size: .8rem; transition: all var(--transition);
}
.repeater-item .remove:hover { background: #ef4444; color: white; }

.btn-add {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem; border-radius: 10px;
  background: transparent; border: 2px dashed var(--border);
  color: var(--text-muted); font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.btn-add:hover { border-color: var(--primary); color: var(--primary); }

.builder-actions {
  display: flex; flex-direction: column; gap: .7rem;
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.builder-actions .btn { justify-content: center; }

/* Skill bar level */
.skill-level { display: flex; align-items: center; gap: .5rem; }
.skill-level input[type="range"] { flex: 1; }

/* ====== Preview ====== */
.builder-preview-wrap { position: relative; }
.zoom-controls {
  display: flex; align-items: center; gap: .8rem; justify-content: flex-end;
  margin-bottom: 1rem;
}
.zoom-controls button {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: all var(--transition);
}
.zoom-controls button:hover { background: var(--surface-2); }
#zoomLabel { font-weight: 700; font-size: .9rem; min-width: 50px; text-align: center; }

.preview-scroll {
  overflow: auto; padding: 2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 6rem);
  display: flex; justify-content: center;
}
.preview-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.preview-scroll::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* CV Paper - A4 */
.cv-paper {
  --cv-color: #6366f1;
  width: 794px;     /* A4 width @ 96dpi */
  min-height: 1123px; /* A4 height */
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);
  transform-origin: top center;
  transition: transform var(--transition);
  border-radius: 4px;
  position: relative;
}

/* ========== TEMPLATE: MODERN ========== */
.cv-paper[data-template="modern"] {
  display: grid; grid-template-columns: 38% 62%;
  font-size: 13px; line-height: 1.55;
}
.cv-paper[data-template="modern"] .cv-side {
  background: linear-gradient(180deg, var(--cv-color), color-mix(in srgb, var(--cv-color) 75%, #000 25%));
  color: #fff; padding: 36px 28px;
}
.cv-paper[data-template="modern"] .cv-photo {
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  border: 4px solid rgba(255,255,255,.25); margin: 0 auto 24px;
  background: rgba(255,255,255,.15); display: grid; place-items: center;
}
.cv-paper[data-template="modern"] .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-paper[data-template="modern"] .cv-photo .ph-fallback { color: rgba(255,255,255,.6); font-size: 2.4rem; }
.cv-paper[data-template="modern"] .cv-side h2 {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 2px solid rgba(255,255,255,.3);
}
.cv-paper[data-template="modern"] .cv-side .contact-row {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 12px;
}
.cv-paper[data-template="modern"] .cv-side .contact-row i { width: 16px; color: rgba(255,255,255,.85); margin-top: 3px; }
.cv-paper[data-template="modern"] .cv-side ul { display: grid; gap: 6px; }
.cv-paper[data-template="modern"] .cv-side .skill-row {
  display: flex; flex-direction: column; gap: 4px;
}
.cv-paper[data-template="modern"] .cv-side .skill-row .skill-bar-bg {
  width: 100%; height: 5px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden;
}
.cv-paper[data-template="modern"] .cv-side .skill-row .skill-bar-fg {
  height: 100%; background: #fff; border-radius: 99px;
}
.cv-paper[data-template="modern"] .cv-main {
  padding: 36px 32px; background: #fff;
}
.cv-paper[data-template="modern"] .cv-name {
  font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 4px;
  color: #0f172a;
}
.cv-paper[data-template="modern"] .cv-title-tag {
  font-size: 14px; font-weight: 600; color: var(--cv-color);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px;
}
.cv-paper[data-template="modern"] .cv-main h2 {
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cv-color); margin: 22px 0 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--cv-color);
}
.cv-paper[data-template="modern"] .cv-item { margin-bottom: 16px; padding-left: 14px; border-left: 2px solid #e2e8f0; }
.cv-paper[data-template="modern"] .cv-item-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cv-paper[data-template="modern"] .cv-item-head h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
.cv-paper[data-template="modern"] .cv-item-head .when { font-size: 12px; color: #64748b; font-weight: 600; }
.cv-paper[data-template="modern"] .cv-item h4 { font-size: 13px; font-weight: 600; color: var(--cv-color); margin: 2px 0 6px; }
.cv-paper[data-template="modern"] .cv-item p, .cv-paper[data-template="modern"] .cv-item ul { font-size: 12.5px; color: #334155; }
.cv-paper[data-template="modern"] .cv-item ul { margin-top: 4px; padding-left: 14px; list-style: disc; }
.cv-paper[data-template="modern"] .cv-item li { margin-bottom: 3px; }

/* ========== TEMPLATE: CLASSIC ========== */
.cv-paper[data-template="classic"] {
  display: block; padding: 50px 56px;
  font-size: 13px; line-height: 1.6; color: #1f2937;
}
.cv-paper[data-template="classic"] .cv-header {
  text-align: center; padding-bottom: 18px; border-bottom: 3px double var(--cv-color);
  margin-bottom: 22px;
}
.cv-paper[data-template="classic"] .cv-header .cv-photo {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 12px; overflow: hidden;
  border: 3px solid var(--cv-color);
}
.cv-paper[data-template="classic"] .cv-header .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-paper[data-template="classic"] .cv-name {
  font-size: 32px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #0f172a; margin-bottom: 2px;
}
.cv-paper[data-template="classic"] .cv-title-tag {
  font-size: 14px; color: var(--cv-color); font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 12px;
}
.cv-paper[data-template="classic"] .cv-contact-line {
  font-size: 12px; color: #475569; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
}
.cv-paper[data-template="classic"] .cv-contact-line span { display: inline-flex; align-items: center; gap: 5px; }
.cv-paper[data-template="classic"] h2 {
  font-size: 14px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--cv-color); margin: 18px 0 10px;
  padding-bottom: 4px; border-bottom: 1px solid var(--cv-color);
}
.cv-paper[data-template="classic"] .cv-item { margin-bottom: 14px; }
.cv-paper[data-template="classic"] .cv-item-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cv-paper[data-template="classic"] .cv-item-head h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
.cv-paper[data-template="classic"] .cv-item-head .when { font-size: 12px; color: #64748b; font-weight: 600; font-style: italic; }
.cv-paper[data-template="classic"] .cv-item h4 { font-size: 13px; font-weight: 600; color: var(--cv-color); margin: 2px 0 5px; }
.cv-paper[data-template="classic"] .cv-item ul { padding-left: 16px; list-style: disc; }
.cv-paper[data-template="classic"] .cv-item li { margin-bottom: 3px; font-size: 12.5px; }
.cv-paper[data-template="classic"] .skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 12.5px; }
.cv-paper[data-template="classic"] .lang-grid { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 12.5px; }

/* ========== TEMPLATE: MINIMAL ========== */
.cv-paper[data-template="minimal"] {
  padding: 50px 60px; font-size: 12.5px; line-height: 1.65; color: #0f172a;
  font-weight: 400;
}
.cv-paper[data-template="minimal"] .cv-header { display: flex; gap: 24px; align-items: center; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid #e2e8f0; }
.cv-paper[data-template="minimal"] .cv-photo { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.cv-paper[data-template="minimal"] .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-paper[data-template="minimal"] .cv-name { font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.cv-paper[data-template="minimal"] .cv-title-tag { font-size: 13px; color: #64748b; margin: 6px 0 8px; font-weight: 500; }
.cv-paper[data-template="minimal"] .cv-contact-line { font-size: 11.5px; color: #475569; display: flex; flex-wrap: wrap; gap: 3px 16px; }
.cv-paper[data-template="minimal"] h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #94a3b8; margin: 24px 0 12px;
}
.cv-paper[data-template="minimal"] .cv-item { display: grid; grid-template-columns: 130px 1fr; gap: 18px; margin-bottom: 14px; }
.cv-paper[data-template="minimal"] .cv-item .when { font-size: 11.5px; color: #94a3b8; font-weight: 500; padding-top: 2px; }
.cv-paper[data-template="minimal"] .cv-item h3 { font-size: 13.5px; font-weight: 600; color: #0f172a; }
.cv-paper[data-template="minimal"] .cv-item h4 { font-size: 12.5px; color: var(--cv-color); margin: 2px 0 5px; font-weight: 500; }
.cv-paper[data-template="minimal"] .cv-item ul { padding-left: 14px; list-style: disc; }
.cv-paper[data-template="minimal"] .cv-item li { margin-bottom: 2px; color: #475569; }
.cv-paper[data-template="minimal"] .skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 12px; }

/* ========== TEMPLATE: ELEGANT (serif) ========== */
.cv-paper[data-template="elegant"] {
  padding: 56px 60px; font-family: 'Lora', serif; font-size: 12.5px; line-height: 1.65; color: #1f2937;
  background: linear-gradient(180deg, #fdfbf7, #ffffff);
}
.cv-paper[data-template="elegant"] .cv-header { text-align: center; margin-bottom: 28px; }
.cv-paper[data-template="elegant"] .cv-photo { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; border: 1px solid var(--cv-color); }
.cv-paper[data-template="elegant"] .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-paper[data-template="elegant"] .cv-name { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: #0f172a; line-height: 1; }
.cv-paper[data-template="elegant"] .cv-title-tag { font-style: italic; color: var(--cv-color); margin: 6px 0; font-size: 14px; }
.cv-paper[data-template="elegant"] .cv-divider { width: 60px; height: 2px; background: var(--cv-color); margin: 14px auto; }
.cv-paper[data-template="elegant"] .cv-contact-line { font-size: 12px; color: #475569; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.cv-paper[data-template="elegant"] h2 {
  font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700;
  color: #0f172a; margin: 22px 0 10px; text-align: center;
  position: relative; padding-bottom: 6px;
}
.cv-paper[data-template="elegant"] h2::after {
  content: ''; display: block; width: 30px; height: 1px; background: var(--cv-color);
  margin: 6px auto 0;
}
.cv-paper[data-template="elegant"] .cv-item { margin-bottom: 14px; text-align: center; }
.cv-paper[data-template="elegant"] .cv-item h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
.cv-paper[data-template="elegant"] .cv-item h4 { font-size: 13px; color: var(--cv-color); font-style: italic; margin: 2px 0 4px; }
.cv-paper[data-template="elegant"] .cv-item .when { font-size: 11.5px; color: #94a3b8; margin-bottom: 6px; }
.cv-paper[data-template="elegant"] .cv-item ul { display: inline-block; text-align: left; padding-left: 16px; list-style: disc; }
.cv-paper[data-template="elegant"] .cv-item li { margin-bottom: 3px; }

/* ========== TEMPLATE: CREATIVE ========== */
.cv-paper[data-template="creative"] {
  padding: 0; font-size: 13px; line-height: 1.55; color: #1e293b;
}
.cv-paper[data-template="creative"] .cv-hero {
  padding: 40px 50px; color: #fff;
  background: linear-gradient(135deg, var(--cv-color), color-mix(in srgb, var(--cv-color) 50%, #000 50%));
  display: grid; grid-template-columns: 130px 1fr; gap: 28px; align-items: center;
}
.cv-paper[data-template="creative"] .cv-photo { width: 130px; height: 130px; border-radius: 22px; overflow: hidden; border: 4px solid rgba(255,255,255,.3); }
.cv-paper[data-template="creative"] .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-paper[data-template="creative"] .cv-name { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.cv-paper[data-template="creative"] .cv-title-tag { margin: 6px 0 10px; opacity: .9; font-size: 14px; font-weight: 500; }
.cv-paper[data-template="creative"] .cv-contact-line { font-size: 11.5px; opacity: .9; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cv-paper[data-template="creative"] .cv-body { padding: 30px 50px; }
.cv-paper[data-template="creative"] h2 {
  font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cv-color); margin: 22px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.cv-paper[data-template="creative"] h2::before { content: ''; width: 18px; height: 3px; background: var(--cv-color); }
.cv-paper[data-template="creative"] .cv-item { margin-bottom: 16px; padding: 14px 18px; border-radius: 12px; background: #f8fafc; }
.cv-paper[data-template="creative"] .cv-item-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.cv-paper[data-template="creative"] .cv-item-head h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
.cv-paper[data-template="creative"] .cv-item-head .when {
  font-size: 11px; color: #fff; background: var(--cv-color); padding: 3px 10px; border-radius: 99px; font-weight: 600;
}
.cv-paper[data-template="creative"] .cv-item h4 { font-size: 13px; color: var(--cv-color); margin: 2px 0 6px; font-weight: 600; }
.cv-paper[data-template="creative"] .cv-item ul { padding-left: 16px; list-style: disc; }
.cv-paper[data-template="creative"] .cv-item li { margin-bottom: 3px; color: #334155; font-size: 12.5px; }
.cv-paper[data-template="creative"] .skill-row { margin-bottom: 8px; }
.cv-paper[data-template="creative"] .skill-row .label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.cv-paper[data-template="creative"] .skill-row .skill-bar-bg { width: 100%; height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.cv-paper[data-template="creative"] .skill-row .skill-bar-fg { height: 100%; background: var(--cv-color); border-radius: 99px; }

/* ====== Print ====== */
@media print {
  body * { visibility: hidden !important; }
  .cv-paper, .cv-paper * { visibility: visible !important; }
  .cv-paper { position: absolute; top: 0; left: 0; box-shadow: none; transform: none !important; }
  @page { size: A4; margin: 0; }
}

/* ====== Responsive ====== */
@media (max-width: 1100px) {
  .builder-grid { grid-template-columns: 1fr; }
  .builder-form { position: static; max-height: none; }
}
@media (max-width: 768px) {
  .builder-toolbar { flex-direction: column; gap: 1rem; }
  .preview-scroll { padding: 1rem; }
  .cv-paper { transform: scale(.6); transform-origin: top center; margin: 0 -180px; }
}
