*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #f97316; --orange2: #ea580c; --orange3: #fff7ed;
  --gold: #f59e0b; --green: #16a34a;
  --text: #111827; --text2: #6b7280; --text3: #9ca3af;
  --white: #fff; --bg: #f9fafb; --border: #e5e7eb;
}
body { background: var(--bg); font-family: 'DM Sans', sans-serif; color: var(--text); }

nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.logo { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; text-decoration: none; color: var(--text); }
.logo span { color: var(--orange); }
.btn-back { background: none; border: 1px solid var(--border); padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; color: var(--text2); cursor: pointer; font-family: 'DM Sans', sans-serif; }

.paywall { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(20px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.paywall.hidden { display: none; }
.paywall-card { background: #fff; border-radius: 24px; padding: 48px; max-width: 480px; text-align: center; }
.pw-icon { font-size: 3.5rem; margin-bottom: 20px; }
.pw-title { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px; }
.pw-price { font-family: 'Syne', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--orange); margin: 20px 0 8px; }
.pw-price span { font-size: 1rem; color: var(--text2); font-weight: 500; }
.pw-feats { list-style: none; margin: 28px 0; text-align: left; }
.pw-feats li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 0.92rem; color: var(--text2); }
.pw-feats li::before { content: '✅'; }
.btn-pay { width: 100%; background: linear-gradient(135deg, var(--orange), var(--orange2)); color: #fff; border: none; padding: 16px; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; box-shadow: 0 8px 24px rgba(249,115,22,0.3); }
.pw-note { font-size: 0.78rem; color: var(--text3); margin-top: 14px; }

.editor { display: grid; grid-template-columns: 380px 1fr; gap: 0; margin-top: 60px; height: calc(100vh - 60px); }

.form-side { background: #fff; border-right: 1px solid var(--border); overflow-y: auto; padding: 24px; }
.step-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--orange3); border: 1px solid rgba(249,115,22,0.2); padding: 4px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 700; color: var(--orange2); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 12px; }
.form-title { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; }

.templates { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.tpl { border: 2px solid var(--border); border-radius: 10px; padding: 8px; cursor: pointer; text-align: center; transition: all 0.2s; background: #fafafa; }
.tpl:hover { border-color: var(--orange); }
.tpl.active { border-color: var(--orange); background: var(--orange3); }
.tpl-preview { height: 85px; border-radius: 6px; margin-bottom: 6px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; border: 1px solid var(--border); }
.tpl-preview.t1 { background: linear-gradient(180deg,#fff 60%,#fff7ed); }
.tpl-preview.t2 { background: linear-gradient(90deg,#f97316 35%,#fff 35%); }
.tpl-preview.t3 { background: linear-gradient(180deg,#111827 25%,#fff 25%); color:#fff; }
.tpl-name { font-size: 0.68rem; font-weight: 600; color: var(--text2); }
.tpl.active .tpl-name { color: var(--orange2); }

.section-block { border-top: 1px solid var(--border); padding: 20px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; cursor: pointer; }
.section-title { font-family: 'Syne', sans-serif; font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-toggle { width: 24px; height: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.section-body { display: none; }
.section-block.open .section-body { display: block; }
.section-block.open .section-toggle { background: var(--orange3); border-color: var(--orange); color: var(--orange2); }

.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: 0.68rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.fg input, .fg textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 0.86rem; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s; -webkit-appearance: none; resize: none; }
.fg input:focus, .fg textarea:focus { border-color: var(--orange); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.photo-options { display: flex; gap: 6px; margin-bottom: 10px; }
.photo-opt { flex: 1; padding: 8px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.72rem; font-weight: 600; cursor: pointer; text-align: center; background: var(--bg); color: var(--text2); transition: all 0.15s; }
.photo-opt.active { border-color: var(--orange); color: var(--orange2); background: var(--orange3); }
.photo-shape-pick { display: none; gap: 6px; margin-bottom: 10px; }
.photo-shape-pick.show { display: flex; }
.photo-upload-zone { border: 2px dashed var(--border); border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; background: var(--bg); transition: all 0.2s; margin-bottom: 10px; }
.photo-upload-zone:hover { border-color: var(--orange); background: var(--orange3); }
.photo-upload-zone.hidden { display: none; }
.photo-upload-icon { font-size: 1.8rem; margin-bottom: 6px; }
.photo-upload-text { font-size: 0.78rem; color: var(--text2); }
.photo-preview-wrap { display: none; text-align: center; margin-bottom: 10px; }
.photo-preview-wrap.show { display: block; }
.photo-preview { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--orange); margin-bottom: 6px; }
.photo-preview.square { border-radius: 10px; }
.btn-remove-photo { background: none; border: none; color: #dc2626; font-size: 0.75rem; cursor: pointer; font-weight: 600; }

.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; position: relative; }
.item-card .btn-del { position: absolute; top: 8px; right: 8px; background: rgba(220,38,38,0.1); color: #dc2626; border: none; width: 24px; height: 24px; border-radius: 6px; font-size: 0.75rem; cursor: pointer; }
.btn-add { background: transparent; color: var(--orange); border: 1.5px dashed var(--orange); padding: 10px; border-radius: 9px; font-size: 0.82rem; font-weight: 600; cursor: pointer; width: 100%; font-family: 'DM Sans', sans-serif; transition: all 0.15s; margin-top: 8px; }
.btn-add:hover { background: var(--orange3); }

.actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 16px; margin: 20px -24px -24px; display: flex; gap: 8px; }
.btn-dl { flex: 1; background: linear-gradient(135deg, var(--orange), var(--orange2)); color: #fff; border: none; padding: 13px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; box-shadow: 0 4px 16px rgba(249,115,22,0.3); }

.preview-side { background: #e5e7eb; overflow-y: auto; padding: 40px; display: flex; justify-content: center; align-items: flex-start; }
.cv-paper { width: 100%; max-width: 720px; background: #fff; min-height: 1018px; aspect-ratio: 0.707; box-shadow: 0 12px 40px rgba(0,0,0,0.1); overflow: hidden; position: relative; }

/* T1 */
.cv.t1 { padding: 0; font-family: 'Inter', sans-serif; color: #111827; }
.cv.t1 .t1-header { display: flex; align-items: center; gap: 24px; padding: 40px 48px; background: #fff; border-bottom: 4px solid #f97316; }
.cv.t1 .t1-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #f97316; flex-shrink: 0; }
.cv.t1 .t1-photo.square { border-radius: 12px; }
.cv.t1 .t1-photo-placeholder { width: 100px; height: 100px; border-radius: 50%; background: #fff7ed; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; color: #f97316; font-family: 'Syne', sans-serif; border: 3px solid #f97316; }
.cv.t1 .t1-photo-placeholder.square { border-radius: 12px; }
.cv.t1 h1 { font-family: 'Syne', sans-serif; font-size: 2.4rem; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 4px; line-height: 1; }
.cv.t1 .t1-title { font-size: 1rem; color: #f97316; font-weight: 600; margin-bottom: 8px; }
.cv.t1 .t1-contacts { font-size: 0.78rem; color: #6b7280; display: flex; flex-wrap: wrap; gap: 12px; }
.cv.t1 .t1-body { padding: 32px 48px; }
.cv.t1 h2 { font-family: 'Syne', sans-serif; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 2px; color: #f97316; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; font-weight: 700; }
.cv.t1 .t1-section { margin-bottom: 28px; }
.cv.t1 .t1-summary { font-size: 0.88rem; color: #4b5563; line-height: 1.7; }
.cv.t1 .t1-item { margin-bottom: 16px; }
.cv.t1 .t1-item-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.cv.t1 .t1-item-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; }
.cv.t1 .t1-item-date { font-size: 0.78rem; color: #6b7280; font-weight: 500; }
.cv.t1 .t1-item-company { font-size: 0.82rem; color: #f97316; font-weight: 600; margin-bottom: 4px; }
.cv.t1 .t1-item-desc { font-size: 0.82rem; color: #4b5563; line-height: 1.65; }
.cv.t1 .t1-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.cv.t1 .t1-skill { background: #fff7ed; color: #ea580c; padding: 5px 12px; border-radius: 100px; font-size: 0.78rem; font-weight: 600; }
.cv.t1 .t1-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* T2 */
.cv.t2 { display: grid; grid-template-columns: 240px 1fr; height: 100%; font-family: 'Inter', sans-serif; color: #111827; }
.cv.t2 .t2-side { background: linear-gradient(180deg, #f97316, #ea580c); color: #fff; padding: 32px 24px; }
.cv.t2 .t2-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; margin: 0 auto 20px; display: block; }
.cv.t2 .t2-photo.square { border-radius: 14px; }
.cv.t2 .t2-photo-placeholder { width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; font-family: 'Syne', sans-serif; margin: 0 auto 20px; border: 4px solid #fff; color: #fff; }
.cv.t2 .t2-photo-placeholder.square { border-radius: 14px; }
.cv.t2 .t2-side h3 { font-family: 'Syne', sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1.5px solid rgba(255,255,255,0.3); font-weight: 700; }
.cv.t2 .t2-contact-item { font-size: 0.75rem; margin-bottom: 8px; line-height: 1.5; }
.cv.t2 .t2-skill-item { font-size: 0.78rem; margin-bottom: 7px; padding-left: 12px; position: relative; }
.cv.t2 .t2-skill-item::before { content: '▸'; position: absolute; left: 0; }
.cv.t2 .t2-main { padding: 40px 36px; background: #fff; overflow: hidden; }
.cv.t2 h1 { font-family: 'Syne', sans-serif; font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; line-height: 1; margin-bottom: 6px; }
.cv.t2 .t2-title { font-size: 1rem; color: #f97316; font-weight: 600; margin-bottom: 22px; }
.cv.t2 h2 { font-family: 'Syne', sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: #111827; margin: 20px 0 12px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cv.t2 h2::before { content: ''; width: 26px; height: 3px; background: #f97316; }
.cv.t2 .t2-summary { font-size: 0.85rem; color: #4b5563; line-height: 1.7; margin-bottom: 20px; }
.cv.t2 .t2-item { margin-bottom: 14px; padding-left: 14px; border-left: 2px solid #fff7ed; }
.cv.t2 .t2-item-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem; }
.cv.t2 .t2-item-company { font-size: 0.78rem; color: #f97316; font-weight: 600; }
.cv.t2 .t2-item-date { font-size: 0.72rem; color: #6b7280; margin-bottom: 4px; }
.cv.t2 .t2-item-desc { font-size: 0.78rem; color: #4b5563; line-height: 1.6; }

/* T3 */
.cv.t3 { font-family: 'Playfair Display', serif; color: #1f2937; }
.cv.t3 .t3-header { background: #111827; color: #fff; padding: 48px; text-align: center; position: relative; }
.cv.t3 .t3-header::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: #f59e0b; }
.cv.t3 .t3-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #f59e0b; margin: 0 auto 20px; display: block; }
.cv.t3 .t3-photo.square { border-radius: 12px; }
.cv.t3 .t3-photo-placeholder { width: 120px; height: 120px; border-radius: 50%; background: rgba(245,158,11,0.2); color: #f59e0b; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; font-weight: 700; margin: 0 auto 20px; border: 4px solid #f59e0b; }
.cv.t3 .t3-photo-placeholder.square { border-radius: 12px; }
.cv.t3 h1 { font-family: 'Playfair Display', serif; font-size: 2.6rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; text-transform: uppercase; }
.cv.t3 .t3-title { font-size: 0.88rem; color: #f59e0b; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 16px; font-family: 'Inter', sans-serif; }
.cv.t3 .t3-contacts { font-size: 0.75rem; color: #9ca3af; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-family: 'Inter', sans-serif; }
.cv.t3 .t3-body { padding: 36px 52px; font-family: 'Inter', sans-serif; }
.cv.t3 h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 800; color: #111827; margin: 26px 0 16px; text-align: center; position: relative; padding-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
.cv.t3 h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: #f59e0b; }
.cv.t3 .t3-summary { font-size: 0.88rem; color: #4b5563; line-height: 1.8; text-align: center; font-style: italic; max-width: 90%; margin: 0 auto; }
.cv.t3 .t3-item { margin-bottom: 18px; }
.cv.t3 .t3-item-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.cv.t3 .t3-item-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem; }
.cv.t3 .t3-item-date { font-size: 0.75rem; color: #6b7280; font-weight: 500; font-family: 'Inter', sans-serif; }
.cv.t3 .t3-item-company { font-size: 0.82rem; color: #f59e0b; font-weight: 600; margin-bottom: 4px; font-family: 'Inter', sans-serif; }
.cv.t3 .t3-item-desc { font-size: 0.8rem; color: #4b5563; line-height: 1.65; }
.cv.t3 .t3-skills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cv.t3 .t3-skill { background: #111827; color: #f59e0b; padding: 5px 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.cv.t3 .t3-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

@media(max-width:1100px) {
  .editor { grid-template-columns: 1fr; }
  .preview-side { display: none; }
  nav { padding: 0 16px; }
}
