/* CV Studio 4.2 Template Engine */

/* Developer */
.v4-resume-paper.template-developer{grid-template-columns:var(--cv-sidebar-width,258px) 1fr;background:#f7fafc}
.v4-resume-paper.template-developer .cv-sidebar{background:linear-gradient(180deg,var(--cv-sidebar),#08131d);padding:28px 25px}
.v4-resume-paper.template-developer .cv-photo{border-radius:18px;border-color:rgba(34,199,216,.75);box-shadow:0 0 0 5px rgba(34,199,216,.12)}
.v4-resume-paper.template-developer .cv-header-block h1{font-size:29px;letter-spacing:-.45px}
.v4-resume-paper.template-developer .cv-header-block h2{color:var(--cv-accent);font-size:13px;font-weight:750}
.v4-resume-paper.template-developer .cv-sidebar-title{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.7px}
.v4-resume-paper.template-developer .cv-sidebar-title .cv-title-icon{background:rgba(34,199,216,.13);color:var(--cv-accent)}
.v4-resume-paper.template-developer .cv-main{background:#f7fafc}
.v4-resume-paper.template-developer .cv-main-title{border-bottom:0;padding-bottom:7px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.2px}
.v4-resume-paper.template-developer .cv-main-title:after{content:"";height:2px;flex:1;background:linear-gradient(90deg,var(--cv-accent),transparent);margin-left:8px}
[dir="rtl"] .v4-resume-paper.template-developer .cv-main-title:after{margin-left:0;margin-right:8px;background:linear-gradient(270deg,var(--cv-accent),transparent)}
.v4-resume-paper.template-developer .cv-project-card{background:#fff;border-color:#d9e5ea;border-radius:6px;box-shadow:0 5px 14px rgba(15,35,48,.05)}
.v4-resume-paper.template-developer .cv-timeline-marker i{border-radius:2px;transform:rotate(45deg)}
.v4-resume-paper.template-developer .cv-stat-icon{border-radius:4px;background:color-mix(in srgb,var(--cv-accent) 13%,#fff)}

/* Minimal */
.v4-resume-paper.template-minimal{grid-template-columns:var(--cv-sidebar-width,226px) 1fr;color:#26333c}
.v4-resume-paper.template-minimal .cv-sidebar{background:var(--cv-sidebar);color:#26333c;border-right:1px solid #dfe5e8;padding:38px 25px}
[dir="rtl"] .v4-resume-paper.template-minimal .cv-sidebar{border-right:0;border-left:1px solid #dfe5e8}
.v4-resume-paper.template-minimal .cv-photo{width:112px;height:112px;border:0;border-radius:4px;box-shadow:none}
.v4-resume-paper.template-minimal .cv-header-block h1{color:#1f2a31;font-weight:650;font-size:29px;letter-spacing:-.35px}
.v4-resume-paper.template-minimal .cv-header-block h2{color:var(--cv-accent);font-size:12px;font-weight:550}
.v4-resume-paper.template-minimal .cv-sidebar-title{color:#26333c;font-size:10.5px;letter-spacing:1.3px}
.v4-resume-paper.template-minimal .cv-sidebar-title .cv-title-icon{display:none}
.v4-resume-paper.template-minimal .cv-contact-list li,.v4-resume-paper.template-minimal .cv-progress-head,.v4-resume-paper.template-minimal .cv-sidebar-plain-list li{color:#52626d}
.v4-resume-paper.template-minimal .cv-contact-list i{background:#fff;color:var(--cv-accent);border:1px solid #d9e2e7}
.v4-resume-paper.template-minimal .cv-progress-track{background:#dce4e8}
.v4-resume-paper.template-minimal .cv-tag{background:#fff;color:#52626d;border-color:#d9e2e7}
.v4-resume-paper.template-minimal .cv-sidebar-plain-list li{border-color:#dce3e7}
.v4-resume-paper.template-minimal .cv-main-title{font-weight:650;letter-spacing:1.2px;font-size:11.5px;border-bottom:0;text-transform:uppercase;color:#26333c}
.v4-resume-paper.template-minimal .cv-title-icon{display:none}
.v4-resume-paper.template-minimal .cv-main-title:after{content:"";height:1px;flex:1;background:#dce3e7;margin-left:10px}
[dir="rtl"] .v4-resume-paper.template-minimal .cv-main-title:after{margin-left:0;margin-right:10px}
.v4-resume-paper.template-minimal .cv-project-card{border-radius:0;border-width:0 0 1px;padding:10px 0;background:transparent}
.v4-resume-paper.template-minimal .cv-main-tags span{border-radius:2px;background:#f4f7f8;color:#40535f;border-color:#dfe7ea}

/* Corporate */
.v4-resume-paper.template-corporate{grid-template-columns:var(--cv-sidebar-width,236px) 1fr;background:#fff}
.v4-resume-paper.template-corporate .cv-sidebar{background:var(--cv-sidebar);color:#183344;border-top:12px solid var(--cv-accent);padding:31px 24px}
.v4-resume-paper.template-corporate .cv-photo{border-radius:3px;border:0;width:116px;height:132px;box-shadow:0 7px 18px rgba(31,92,116,.12)}
.v4-resume-paper.template-corporate .cv-header-block h1{font-family:Georgia,serif;color:#17384a;font-size:28px;letter-spacing:0}
.v4-resume-paper.template-corporate .cv-header-block h2{color:var(--cv-accent);font-size:11.5px;text-transform:uppercase;letter-spacing:.8px}
.v4-resume-paper.template-corporate .cv-sidebar-title{color:#17384a;font-size:10.5px;border-bottom:1px solid #cad8de;padding-bottom:7px}
.v4-resume-paper.template-corporate .cv-sidebar-title .cv-title-icon{display:none}
.v4-resume-paper.template-corporate .cv-contact-list li,.v4-resume-paper.template-corporate .cv-progress-head,.v4-resume-paper.template-corporate .cv-sidebar-plain-list li{color:#385563}
.v4-resume-paper.template-corporate .cv-contact-list i{background:#fff;color:var(--cv-accent)}
.v4-resume-paper.template-corporate .cv-progress-track{background:#cbd9de}
.v4-resume-paper.template-corporate .cv-tag{background:rgba(255,255,255,.75);color:#294b5b;border-color:#cbd9de}
.v4-resume-paper.template-corporate .cv-sidebar-plain-list li{border-color:#cbd9de}
.v4-resume-paper.template-corporate .cv-main-title{font-family:Georgia,serif;font-size:14px;text-transform:none;letter-spacing:0;color:#17384a;border-bottom:2px solid var(--cv-accent)}
.v4-resume-paper.template-corporate .cv-title-icon{display:none}
.v4-resume-paper.template-corporate .cv-timeline-item{grid-template-columns:84px 10px 1fr}
.v4-resume-paper.template-corporate .cv-project-card{border-radius:2px;border-color:#d7e0e5;background:#f8fafb}

/* Creative */
.v4-resume-paper.template-creative{grid-template-columns:var(--cv-sidebar-width,272px) 1fr;background:#fffdfb}
.v4-resume-paper.template-creative .cv-sidebar{background:linear-gradient(165deg,var(--cv-sidebar) 0 65%,color-mix(in srgb,var(--cv-accent) 78%,#fff) 65% 100%);padding:30px 27px;position:relative}
.v4-resume-paper.template-creative .cv-sidebar:after{content:"";position:absolute;right:-22px;top:145px;width:44px;height:110px;border-radius:24px;background:var(--cv-accent);opacity:.95}
[dir="rtl"] .v4-resume-paper.template-creative .cv-sidebar:after{right:auto;left:-22px}
.v4-resume-paper.template-creative .cv-photo{width:130px;height:150px;border-radius:70px 70px 18px 18px;border:4px solid rgba(255,255,255,.9)}
.v4-resume-paper.template-creative .cv-header-block h1{font-size:32px;line-height:1.02}
.v4-resume-paper.template-creative .cv-header-block h2{color:#ffc0b7;font-size:13px}
.v4-resume-paper.template-creative .cv-sidebar-title{font-size:11px;letter-spacing:1px}
.v4-resume-paper.template-creative .cv-main{background:#fffdfb}
.v4-resume-paper.template-creative .cv-main-title{border:0;font-size:14px;text-transform:none;letter-spacing:0;color:#2f2940}
.v4-resume-paper.template-creative .cv-main-title .cv-title-icon{border-radius:50%;background:var(--cv-accent);color:#fff}
.v4-resume-paper.template-creative .cv-project-grid{gap:12px}
.v4-resume-paper.template-creative .cv-project-card{border:0;border-radius:14px;background:linear-gradient(145deg,#fff,#f8f2ed);box-shadow:0 8px 20px rgba(42,36,64,.08);padding:14px}
.v4-resume-paper.template-creative .cv-timeline-marker i{width:9px;height:9px;box-shadow:0 0 0 4px color-mix(in srgb,var(--cv-accent) 18%,transparent)}
.v4-resume-paper.template-creative .cv-stat{border-right:0}
.v4-resume-paper.template-creative .cv-stats{border:0;background:#f7f0ec;border-radius:12px;padding:13px}

/* Student */
.v4-resume-paper.template-student{grid-template-columns:var(--cv-sidebar-width,230px) 1fr;background:#fff}
.v4-resume-paper.template-student .cv-sidebar{background:var(--cv-sidebar);color:#29234a;padding:31px 24px;border-top:9px solid var(--cv-accent)}
.v4-resume-paper.template-student .cv-photo{width:105px;height:105px;border:5px solid #fff;box-shadow:0 5px 14px rgba(93,79,181,.14)}
.v4-resume-paper.template-student .cv-header-block h1{color:#29234a;font-size:28px}
.v4-resume-paper.template-student .cv-header-block h2{color:var(--cv-accent);font-size:12px}
.v4-resume-paper.template-student .cv-sidebar-title{color:#29234a;font-size:10.8px}
.v4-resume-paper.template-student .cv-sidebar-title .cv-title-icon{background:#fff;color:var(--cv-accent)}
.v4-resume-paper.template-student .cv-contact-list li,.v4-resume-paper.template-student .cv-progress-head,.v4-resume-paper.template-student .cv-sidebar-plain-list li{color:#554e73}
.v4-resume-paper.template-student .cv-contact-list i{background:#fff;color:var(--cv-accent)}
.v4-resume-paper.template-student .cv-progress-track{background:#d9d4ed}
.v4-resume-paper.template-student .cv-tag{background:#fff;color:#514976;border-color:#d9d4ed}
.v4-resume-paper.template-student .cv-sidebar-plain-list li{border-color:#d9d4ed}
.v4-resume-paper.template-student .cv-main-title{color:#29234a;border-bottom:2px solid #e8e5f5}
.v4-resume-paper.template-student .cv-project-card{border-radius:12px;border-color:#e4e0f2;background:#fbfaff}
.v4-resume-paper.template-student .cv-timeline-marker i{background:var(--cv-accent)}

/* Template gallery — CV Studio 4.4.1 clear preview workspace */
.v4-template-modal-card{
  width:min(1480px,98vw);
  height:min(920px,96dvh);
  padding:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  background:#f5f7fa;
}
.v4-template-modal-head{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 24px;background:#fff;border-bottom:1px solid var(--v4-border)}
.v4-template-modal-head small{font-size:13px;font-weight:800;letter-spacing:1.2px;color:var(--v4-primary)}
.v4-template-modal-head h2{font-size:25px;margin:3px 0 0;color:var(--v4-text)}
.v4-template-modal-head p{font-size:14px;color:var(--v4-muted);margin:5px 0 0}
.v4-template-engine-body{display:grid;grid-template-columns:minmax(430px,41%) minmax(0,59%);min-height:0}
.v4-template-browser{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-height:0;padding:18px 20px;background:#f7f9fb;border-right:1px solid var(--v4-border)}
[dir="rtl"] .v4-template-browser{border-right:0;border-left:1px solid var(--v4-border)}
.v4-template-search{position:relative}
.v4-template-search input{width:100%;height:47px;border:1px solid #cbd6e3;border-radius:11px;background:#fff;padding:0 15px;font-size:15px;color:var(--v4-text);outline:0}
.v4-template-search input:focus{border-color:#82a9ef;box-shadow:0 0 0 4px rgba(37,99,235,.09)}
.v4-template-categories{display:flex;gap:8px;overflow:auto;padding:12px 0 11px;scrollbar-width:none}
.v4-template-categories::-webkit-scrollbar{display:none}
.v4-template-categories button{height:37px;border:1px solid var(--v4-border);border-radius:999px;background:#fff;padding:0 14px;font-size:13px;font-weight:750;color:#596a7d;white-space:nowrap;cursor:pointer}
.v4-template-categories button.active{background:var(--v4-primary);border-color:var(--v4-primary);color:#fff}
.v4-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;overflow-y:auto;padding:2px 6px 28px 0;align-content:start;overscroll-behavior:contain}
[dir="rtl"] .v4-template-grid{padding:2px 0 28px 6px}
.v4-template-card{border:1px solid #d7e0ea;border-radius:14px;background:#fff;padding:12px;text-align:left;cursor:pointer;transition:.18s;position:relative}
[dir="rtl"] .v4-template-card{text-align:right}
.v4-template-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(26,48,75,.1);border-color:#a9bee3}
.v4-template-card.active{border:2px solid var(--v4-primary);padding:11px;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.v4-template-card-preview{height:180px;border-radius:9px;background:var(--preview-paper,#fff);overflow:hidden;position:relative;border:1px solid #edf0f4;display:grid;grid-template-columns:31% 1fr}
.v4-template-card-preview.top{display:block}
.v4-template-card-preview .mini-side{background:var(--preview-side);padding:14px 9px}
.v4-template-card-preview .mini-main{padding:15px 12px;background:var(--preview-paper,#fff)}
.v4-template-card-preview.top .mini-side{height:48px;padding:9px 15px;display:flex;gap:10px;align-items:center}
.v4-template-card-preview.top .mini-main{height:132px}
.v4-template-card-preview .mini-photo{width:29px;height:29px;border-radius:50%;background:rgba(255,255,255,.68);margin:0 auto 10px}
.v4-template-card-preview.top .mini-photo{margin:0;width:25px;height:25px}
.v4-template-card-preview .mini-line{height:4px;border-radius:99px;background:#d8e0e8;margin:0 0 7px}
.v4-template-card-preview .mini-side .mini-line{background:rgba(255,255,255,.55)}
.v4-template-card-preview.light-side .mini-side .mini-line{background:#b9c7d0}
.v4-template-card-preview .mini-line.accent{background:var(--preview-accent);width:54%}
.v4-template-card-preview .mini-line.short{width:58%}.v4-template-card-preview .mini-line.tiny{width:38%}
.v4-template-card-preview .mini-block{margin-bottom:13px}
.v4-template-card-preview .mini-title{height:5px;background:var(--preview-accent);width:42%;border-radius:99px;margin-bottom:9px}
.v4-template-card-preview .mini-columns{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.v4-template-card-meta{padding:12px 3px 2px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.v4-template-card-meta strong{display:block;font-size:16px;color:var(--v4-text)}
.v4-template-card-meta span{display:block;font-size:12.5px;color:var(--v4-muted);margin-top:4px}
.v4-template-card-meta em{font-style:normal;font-size:11px;font-weight:800;padding:4px 7px;border-radius:999px;background:#eaf7ef;color:#18834b;white-space:nowrap}
.v4-template-card-meta em.visual{background:#fff0ed;color:#c34d3c}

/* Preview and actions sit side-by-side so the A4 preview keeps the full modal height. */
.v4-template-detail{min-width:0;min-height:0;background:#fff;display:grid;grid-template-columns:minmax(380px,1fr) minmax(260px,290px)}
.v4-template-live-preview{min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);background:radial-gradient(circle at 30% 15%,#fff 0,#edf2f7 68%);border-right:1px solid var(--v4-border)}
[dir="rtl"] .v4-template-live-preview{border-right:0;border-left:1px solid var(--v4-border)}
.v4-template-preview-toolbar{height:54px;padding:8px 12px 8px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--v4-border);backdrop-filter:blur(10px)}
[dir="rtl"] .v4-template-preview-toolbar{padding:8px 16px 8px 12px}
.v4-template-preview-label{min-width:0}
.v4-template-preview-label strong{display:block;font-size:14px;line-height:1.2;color:var(--v4-text)}
.v4-template-preview-label span{display:block;margin-top:3px;font-size:11px;color:var(--v4-muted);white-space:nowrap}
.v4-template-preview-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.v4-template-preview-controls button,.v4-template-preview-controls output{height:34px;border:1px solid #cbd7e4;background:#fff;border-radius:8px;color:#40536a;font-size:12px;font-weight:750;display:grid;place-items:center;white-space:nowrap}
.v4-template-preview-controls button{min-width:34px;padding:0 9px;cursor:pointer}
.v4-template-preview-controls button:hover{border-color:#8ba9d8;color:var(--v4-primary);background:#f7faff}
.v4-template-preview-controls output{min-width:68px;padding:0 8px;background:#f7f9fc}
.v4-template-preview-viewport{min-width:0;min-height:0;overflow:auto;padding:20px;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;display:flex;align-items:flex-start;justify-content:center}
.v4-template-live-preview-inner{width:360px;height:509px;flex:0 0 auto;overflow:hidden;box-shadow:0 20px 46px rgba(20,39,60,.22);background:#fff;position:relative;transition:width .16s ease,height .16s ease,box-shadow .16s ease}
.v4-template-live-preview-inner .v4-resume-paper{position:absolute;top:0;left:0;transform:scale(var(--template-preview-scale,.4534));transform-origin:top left;box-shadow:none;pointer-events:none;transition:transform .16s ease}
[dir="rtl"] .v4-template-live-preview-inner .v4-resume-paper{left:auto;right:0;transform-origin:top right}
.v4-template-detail-footer{min-width:0;overflow-y:auto;padding:19px 18px;background:#fff;overscroll-behavior:contain}
.v4-template-detail-title{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:start;gap:12px;position:relative;padding-right:0}
[dir="rtl"] .v4-template-detail-title{padding-left:0}
.v4-template-detail-title>span{grid-column:1/-1;justify-self:start;margin-top:2px}
.v4-template-detail-title h3{font-size:22px;margin:0;color:var(--v4-text);line-height:1.18}
.v4-template-detail-title p{font-size:13.5px;color:var(--v4-muted);line-height:1.52;margin:6px 0 0;max-width:100%}
.v4-template-badge{font-size:12px;font-weight:800;border-radius:999px;padding:7px 10px;background:#eaf7ef;color:#18834b;white-space:nowrap}
.v4-template-badge.visual{background:#fff0ed;color:#c34d3c}
.v4-template-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.v4-template-tags span{font-size:11.5px;color:#52647a;border:1px solid #dce4ed;border-radius:999px;padding:5px 8px;background:#f9fbfc}
.v4-icon-pack-preview{display:grid;gap:6px;margin-top:11px}
.v4-icon-pack-preview span{min-height:31px;padding:6px 8px;border:1px solid #e0e7ef;border-radius:8px;background:#fafbfd;display:flex;align-items:center;gap:6px;font-size:11.5px;color:#52647a}
.v4-template-apply-options{display:grid;grid-template-columns:1fr;gap:8px;margin-top:14px}
.v4-template-apply-options button{min-height:42px;border-radius:9px;border:1px solid #cbd7e4;background:#fff;color:#42546a;padding:8px 10px;font-size:13px;line-height:1.25;font-weight:750;cursor:pointer}
.v4-template-apply-options button.primary{background:var(--v4-primary);border-color:var(--v4-primary);color:#fff;order:-1;min-height:47px}
.v4-template-apply-options button:hover{border-color:#8daee5}
.v4-current-template-pill{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:750;color:#2d5d9f;background:#eaf2ff;border-radius:999px;padding:6px 9px}
.v4-current-template-pill:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--v4-primary)}
.v4-template-strip button{position:relative}
.v4-template-strip button.current:after{content:"✓";position:absolute;top:5px;right:5px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--v4-primary);color:#fff;font-size:11px;font-weight:900}

/* Expanded preview hides the catalogue and uses the whole modal as an A4 inspection area. */
.v4-template-modal-card.preview-expanded .v4-template-engine-body{grid-template-columns:1fr}
.v4-template-modal-card.preview-expanded .v4-template-browser{display:none}
.v4-template-modal-card.preview-expanded .v4-template-detail{grid-template-columns:minmax(0,1fr) minmax(270px,300px)}
.v4-template-modal-card.preview-expanded .v4-template-preview-viewport{padding:24px 30px}
.v4-template-modal-card.preview-expanded .v4-template-live-preview-inner{box-shadow:0 24px 60px rgba(20,39,60,.25)}

@media(max-width:1180px){
  .v4-template-modal-card{width:98vw;height:96dvh}
  .v4-template-engine-body{grid-template-columns:minmax(360px,40%) minmax(0,60%)}
  .v4-template-detail{grid-template-columns:minmax(300px,1fr) minmax(255px,285px)}
  .v4-template-preview-label span{display:none}
  .v4-template-preview-controls output{display:none}
}
@media(max-width:900px){
  .v4-template-modal-card{width:100vw;height:100dvh;max-height:none;border-radius:0;display:grid;grid-template-rows:auto minmax(0,1fr)}
  .v4-template-modal-head{padding:14px 16px}
  .v4-template-modal-head h2{font-size:21px}.v4-template-modal-head p{display:none}
  .v4-template-engine-body{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(330px,48%) minmax(0,52%);overflow:hidden}
  .v4-template-browser{border:0;border-bottom:1px solid var(--v4-border);padding:14px 15px}
  [dir="rtl"] .v4-template-browser{border-left:0;border-bottom:1px solid var(--v4-border)}
  .v4-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .v4-template-card-preview{height:150px}
  .v4-template-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);min-height:0}
  .v4-template-live-preview{display:grid}
  .v4-template-preview-toolbar{height:48px;padding:6px 9px}
  .v4-template-preview-controls button{height:32px;min-width:32px;padding:0 7px}
  .v4-template-detail-footer{padding:14px}
  .v4-template-detail-title p,.v4-template-tags,.v4-icon-pack-preview{display:none}
  .v4-template-apply-options{margin-top:10px}
  .v4-template-apply-options button{min-height:38px;font-size:12px}
  .v4-template-modal-card.preview-expanded .v4-template-engine-body{display:grid;grid-template-rows:1fr}
  .v4-template-modal-card.preview-expanded .v4-template-detail{grid-template-columns:minmax(0,1fr) minmax(240px,285px)}
}
@media(max-width:620px){
  .v4-template-engine-body{display:block;overflow-y:auto}
  .v4-template-browser{min-height:520px;overflow:visible}
  .v4-template-grid{grid-template-columns:1fr;overflow:visible}
  .v4-template-card-preview{height:205px}
  .v4-template-detail{display:block}
  .v4-template-live-preview{height:68dvh;border:0;border-top:1px solid var(--v4-border);border-bottom:1px solid var(--v4-border)}
  [dir="rtl"] .v4-template-live-preview{border-left:0}
  .v4-template-detail-footer{overflow:visible}
  .v4-template-preview-label{display:none}
  .v4-template-preview-controls{width:100%;justify-content:center}
  .v4-template-preview-controls output{display:grid}
  .v4-template-modal-card.preview-expanded .v4-template-browser,.v4-template-modal-card.preview-expanded .v4-template-detail-footer{display:none}
  .v4-template-modal-card.preview-expanded .v4-template-engine-body{height:100%;overflow:hidden}
  .v4-template-modal-card.preview-expanded .v4-template-detail{display:block;height:100%}
  .v4-template-modal-card.preview-expanded .v4-template-live-preview{height:100%;border:0}
}

/* Compact template previews in the left panel */
.v4-template-strip .v4-template-card-preview{height:78px;border:2px solid transparent;border-radius:7px;box-shadow:0 4px 10px rgba(0,0,0,.15);grid-template-columns:31% 1% 68%;pointer-events:none}
.v4-template-strip button.active .v4-template-card-preview{border-color:#4f8eff;box-shadow:0 0 0 2px rgba(79,142,255,.26)}
.v4-template-strip .v4-template-card-preview .mini-side{padding:7px 4px;grid-column:1}
.v4-template-strip .v4-template-card-preview .mini-main{padding:7px 5px;grid-column:3}
.v4-template-strip .v4-template-card-preview.layout-top{display:grid;grid-template-columns:1fr;grid-template-rows:23px 1fr}
.v4-template-strip .v4-template-card-preview.layout-top .mini-side{height:auto;padding:4px 7px;grid-column:1;display:flex}
.v4-template-strip .v4-template-card-preview.layout-top .mini-main{height:auto;padding:6px 7px;grid-column:1}
.v4-template-strip .v4-template-card-preview .mini-photo{width:13px;height:13px;margin:0 auto 5px}
.v4-template-strip .v4-template-card-preview.layout-top .mini-photo{width:11px;height:11px;margin:0 4px 0 0}
.v4-template-strip .v4-template-card-preview .mini-line{height:2px;margin-bottom:3px}
.v4-template-strip .v4-template-card-preview .mini-title{height:2px;margin-bottom:4px}
.v4-template-strip .v4-template-card-preview .mini-block{margin-bottom:5px}
.v4-resume-paper.template-executive .cv-sidebar-section.skills,.v4-resume-paper.template-executive .cv-sidebar-section.languages{display:block}
.v4-resume-paper.template-executive .cv-sidebar-content{grid-template-columns:1.35fr 1fr 1fr}
.v4-resume-paper.template-executive .cv-progress-item{margin-bottom:7px}
.v4-resume-paper.template-executive .cv-progress-head{font-size:8.5px;margin-bottom:3px}
.v4-resume-paper.template-executive .cv-progress-track{height:3px}
/* Keep the default Modern starter comfortably within one A4 page. */
.v4-resume-paper.template-modern .cv-header-block{margin-bottom:20px}
.v4-resume-paper.template-modern .cv-photo{width:112px;height:112px;margin-bottom:13px}
.v4-resume-paper.template-modern .cv-sidebar-section{margin-top:19px}
.v4-resume-paper.template-modern .cv-progress-item{margin-bottom:10px}
.v4-resume-paper.template-modern .cv-contact-list{gap:8px}
.v4-resume-paper.template-modern .cv-photo{width:108px;height:108px}
.v4-resume-paper.template-modern .cv-sidebar-section{margin-top:18px}

/* Corporate keeps a dense information rail while remaining print-friendly. */
.v4-resume-paper.template-corporate .cv-sidebar{padding:23px 20px}
.v4-resume-paper.template-corporate .cv-header-block{margin-bottom:14px}
.v4-resume-paper.template-corporate .cv-photo{width:86px;height:100px;margin-bottom:10px}
.v4-resume-paper.template-corporate .cv-header-block h1{font-size:24px}
.v4-resume-paper.template-corporate .cv-header-block h2{font-size:10px;margin-top:5px}
.v4-resume-paper.template-corporate .cv-sidebar-section{margin-top:12px}
.v4-resume-paper.template-corporate .cv-sidebar-title{margin-bottom:8px;padding-bottom:5px;font-size:9.5px}
.v4-resume-paper.template-corporate .cv-contact-list{gap:5px}
.v4-resume-paper.template-corporate .cv-contact-list li{font-size:8.5px;grid-template-columns:17px 1fr;gap:6px}
.v4-resume-paper.template-corporate .cv-contact-list i{width:16px;height:16px;font-size:7px}
.v4-resume-paper.template-corporate .cv-progress-item{margin-bottom:6px}
.v4-resume-paper.template-corporate .cv-progress-head{font-size:8.4px;margin-bottom:3px}
.v4-resume-paper.template-corporate .cv-progress-track{height:3px}
.v4-resume-paper.template-corporate .cv-tag-list{gap:4px}
.v4-resume-paper.template-corporate .cv-tag{font-size:7.8px;padding:3px 5px}
.v4-resume-paper.template-corporate .cv-sidebar-plain-list{gap:4px}
.v4-resume-paper.template-corporate .cv-sidebar-plain-list li{font-size:8.2px;padding-bottom:4px}
.v4-resume-paper.template-corporate .cv-timeline.compact .cv-timeline-item{grid-template-columns:78px 1fr}
.v4-resume-paper.template-corporate .cv-timeline.compact .cv-timeline-content{min-width:0}

/* CV Studio 4.4 — professional SVG icon library */
.cv-svg-icon{display:block;max-width:100%;max-height:100%;overflow:visible}
.cv-svg-icon .icon-duotone{fill:currentColor;stroke:none;opacity:.1}
.icon-pack-phosphor .cv-title-icon,.icon-pack-phosphor .cv-stat-icon{border-radius:9px}
.icon-pack-phosphor .cv-svg-icon{stroke-width:1.75}
.icon-pack-solid .cv-svg-icon{stroke-width:2.35}
.icon-pack-solid .cv-title-icon{border-radius:4px}
.cv-title-icon .cv-svg-icon{width:13px;height:13px}
.cv-contact-list i .cv-svg-icon{width:11px;height:11px}
.cv-stat-icon .cv-svg-icon{width:13px;height:13px}

/* Swiss Grid — disciplined single-column editorial layout */
.v4-resume-paper.template-swiss{display:block;padding:47px 52px;background:#fff;color:#111827}
.v4-resume-paper.template-swiss .cv-sidebar{min-height:auto;padding:0 0 20px;background:#fff;color:#111827;border-bottom:5px solid var(--cv-accent);display:grid;grid-template-columns:1.25fr .75fr;gap:30px}
.v4-resume-paper.template-swiss .cv-header-block{text-align:left;margin:0;display:grid;grid-template-columns:78px 1fr;align-items:center;gap:18px}
.v4-resume-paper.template-swiss .cv-photo{width:72px;height:72px;margin:0;border-radius:0;border:0;box-shadow:none;filter:grayscale(1)}
.v4-resume-paper.template-swiss .cv-header-block h1{font-size:37px;line-height:.96;color:#111827;font-weight:850;letter-spacing:-1.7px;text-transform:uppercase}
.v4-resume-paper.template-swiss .cv-header-block h2{font-size:11px;color:var(--cv-accent);letter-spacing:1.7px;text-transform:uppercase;margin-top:8px}
.v4-resume-paper.template-swiss .cv-sidebar-content{display:flex;align-items:flex-end;justify-content:flex-end}
.v4-resume-paper.template-swiss .cv-sidebar-section{margin:0}.v4-resume-paper.template-swiss .cv-sidebar-section:not(.contact){display:none}
.v4-resume-paper.template-swiss .cv-sidebar-title{display:none}
.v4-resume-paper.template-swiss .cv-contact-list{display:grid;grid-template-columns:1fr 1fr;gap:5px 16px}
.v4-resume-paper.template-swiss .cv-contact-list li{color:#4b5563;font-size:8.8px;grid-template-columns:15px 1fr;gap:5px}
.v4-resume-paper.template-swiss .cv-contact-list i{background:transparent;color:var(--cv-accent);width:14px;height:14px}
.v4-resume-paper.template-swiss .cv-main{padding:25px 0 0;background:#fff;columns:2;column-gap:35px}
.v4-resume-paper.template-swiss .cv-main>*{break-inside:avoid-column}
.v4-resume-paper.template-swiss .cv-profile-block{column-span:all;margin-bottom:24px;display:grid;grid-template-columns:145px 1fr;gap:25px}
.v4-resume-paper.template-swiss .cv-profile-block .cv-main-title{margin:0}
.v4-resume-paper.template-swiss .cv-main-title{font-size:10px;letter-spacing:1.5px;border:0;border-top:2px solid #111827;padding:7px 0 0;text-transform:uppercase}
.v4-resume-paper.template-swiss .cv-title-icon{display:none}
.v4-resume-paper.template-swiss .cv-main-section{margin-top:22px}
.v4-resume-paper.template-swiss .cv-stats{display:none}
.v4-resume-paper.template-swiss .cv-timeline.compact .cv-timeline-item{grid-template-columns:72px 1fr}

/* Nordic — slim information rail with soft Scandinavian contrast */
.v4-resume-paper.template-nordic{grid-template-columns:var(--cv-sidebar-width,205px) 1fr;background:#fff}
.v4-resume-paper.template-nordic .cv-sidebar{background:var(--cv-sidebar);color:#24433f;padding:35px 22px;border-right:1px solid #d3e0dd}
[dir="rtl"] .v4-resume-paper.template-nordic .cv-sidebar{border-right:0;border-left:1px solid #d3e0dd}
.v4-resume-paper.template-nordic .cv-photo{width:96px;height:112px;border-radius:48px 48px 8px 8px;border:0;box-shadow:none}
.v4-resume-paper.template-nordic .cv-header-block h1{color:#193b37;font-size:26px;font-weight:680;letter-spacing:-.5px}
.v4-resume-paper.template-nordic .cv-header-block h2{color:var(--cv-accent);font-size:11px;font-weight:650}
.v4-resume-paper.template-nordic .cv-sidebar-title{color:#24433f;font-size:10px;letter-spacing:.9px}
.v4-resume-paper.template-nordic .cv-sidebar-title .cv-title-icon{background:#fff;color:var(--cv-accent);box-shadow:0 1px 4px rgba(45,106,101,.12)}
.v4-resume-paper.template-nordic .cv-contact-list li,.v4-resume-paper.template-nordic .cv-progress-head,.v4-resume-paper.template-nordic .cv-sidebar-plain-list li{color:#496a66}
.v4-resume-paper.template-nordic .cv-contact-list i{background:rgba(255,255,255,.85);color:var(--cv-accent)}
.v4-resume-paper.template-nordic .cv-progress-track{background:#cfdedb}.v4-resume-paper.template-nordic .cv-tag{background:rgba(255,255,255,.75);border-color:#d5e2df;color:#315550}
.v4-resume-paper.template-nordic .cv-main{padding:43px 43px 32px}
.v4-resume-paper.template-nordic .cv-main-title{font-size:11.5px;color:#193b37;border:0;letter-spacing:.7px}
.v4-resume-paper.template-nordic .cv-main-title:after{content:"";height:1px;flex:1;background:#d7e2df;margin-left:11px}
[dir="rtl"] .v4-resume-paper.template-nordic .cv-main-title:after{margin-left:0;margin-right:11px}
.v4-resume-paper.template-nordic .cv-project-card{background:#f5f8f7;border-color:#dfe9e6;border-radius:4px}
.v4-resume-paper.template-nordic .cv-timeline-marker i{background:transparent;border:2px solid var(--cv-accent)}

/* Product Lead — full-width identity band and metric-led content */
.v4-resume-paper.template-product{display:block;background:#fff}
.v4-resume-paper.template-product .cv-sidebar{min-height:auto;background:linear-gradient(120deg,var(--cv-sidebar),#262044);padding:27px 38px 25px;display:grid;grid-template-columns:1.2fr .8fr;gap:25px}
.v4-resume-paper.template-product .cv-header-block{display:grid;grid-template-columns:76px 1fr;gap:15px;align-items:center;text-align:left;margin:0}
.v4-resume-paper.template-product .cv-photo{width:72px;height:72px;margin:0;border-radius:16px;border:2px solid rgba(255,255,255,.25)}
.v4-resume-paper.template-product .cv-header-block h1{font-size:28px}.v4-resume-paper.template-product .cv-header-block h2{font-size:12px;color:#bfb8ff}
.v4-resume-paper.template-product .cv-sidebar-content{display:flex;align-items:center;justify-content:flex-end}
.v4-resume-paper.template-product .cv-sidebar-section{margin:0}.v4-resume-paper.template-product .cv-sidebar-section:not(.contact):not(.languages){display:none}
.v4-resume-paper.template-product .cv-sidebar-title{display:none}
.v4-resume-paper.template-product .cv-contact-list{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}
.v4-resume-paper.template-product .cv-contact-list li{font-size:8.6px}
.v4-resume-paper.template-product .cv-main{padding:30px 39px}
.v4-resume-paper.template-product .cv-main-title{border:0;font-size:12px;text-transform:none;letter-spacing:0;color:#211e35}
.v4-resume-paper.template-product .cv-main-title .cv-title-icon{background:color-mix(in srgb,var(--cv-accent) 13%,#fff);border-radius:9px}
.v4-resume-paper.template-product .cv-stats{border:0;background:#f5f3ff;border-radius:14px;padding:14px;margin:17px 0 22px}
.v4-resume-paper.template-product .cv-stat{border-color:#ddd8ff}
.v4-resume-paper.template-product .cv-project-card,.v4-resume-paper.template-product .cv-achievement-grid article{border-radius:12px;border-color:#e2defb;background:#faf9ff}

/* Architect — material, measured and portfolio-first */
.v4-resume-paper.template-architect{grid-template-columns:var(--cv-sidebar-width,258px) 1fr;background:#fbfaf7}
.v4-resume-paper.template-architect .cv-sidebar{background:var(--cv-sidebar);padding:31px 27px;position:relative}
.v4-resume-paper.template-architect .cv-sidebar:before{content:"";position:absolute;inset:14px;border:1px solid rgba(255,255,255,.16);pointer-events:none}
.v4-resume-paper.template-architect .cv-photo{width:126px;height:145px;border-radius:0;border:0;box-shadow:9px 9px 0 var(--cv-accent);margin-bottom:22px}
.v4-resume-paper.template-architect .cv-header-block h1{font-family:Georgia,serif;font-size:29px;font-weight:500;letter-spacing:.1px}
.v4-resume-paper.template-architect .cv-header-block h2{color:#d8a987;font-size:11px;letter-spacing:1.1px;text-transform:uppercase}
.v4-resume-paper.template-architect .cv-sidebar-title{font-family:Georgia,serif;font-size:11px;text-transform:none;letter-spacing:0}
.v4-resume-paper.template-architect .cv-sidebar-title .cv-title-icon{border-radius:0;background:transparent;border:1px solid rgba(255,255,255,.25);color:#d8a987}
.v4-resume-paper.template-architect .cv-main{background:#fbfaf7;padding:39px 38px}
.v4-resume-paper.template-architect .cv-main-title{font-family:Georgia,serif;font-size:14px;text-transform:none;letter-spacing:0;border-color:#d7c8bb;color:#2f2c28}
.v4-resume-paper.template-architect .cv-title-icon{border-radius:0;background:transparent;border:1px solid #d8c3b2;color:var(--cv-accent)}
.v4-resume-paper.template-architect .cv-project-card{background:transparent;border-radius:0;border-color:#d8cec5;padding:13px}
.v4-resume-paper.template-architect .cv-project-card:nth-child(odd){border-left:4px solid var(--cv-accent)}

/* Finance — premium top band and conservative information architecture */
.v4-resume-paper.template-finance{display:block;background:#fff}
.v4-resume-paper.template-finance .cv-sidebar{min-height:auto;background:var(--cv-sidebar);padding:24px 40px;border-bottom:5px solid var(--cv-accent);display:grid;grid-template-columns:1fr 1fr;gap:30px}
.v4-resume-paper.template-finance .cv-header-block{text-align:left;margin:0;display:grid;grid-template-columns:68px 1fr;align-items:center;gap:15px}
.v4-resume-paper.template-finance .cv-photo{width:64px;height:64px;border-radius:3px;margin:0;border:1px solid rgba(255,255,255,.25)}
.v4-resume-paper.template-finance .cv-header-block h1{font-family:Georgia,serif;font-size:28px;font-weight:500;letter-spacing:.3px}
.v4-resume-paper.template-finance .cv-header-block h2{color:#d7bb7d;font-size:10.5px;text-transform:uppercase;letter-spacing:1px}
.v4-resume-paper.template-finance .cv-sidebar-content{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:center}
.v4-resume-paper.template-finance .cv-sidebar-section{margin:0}.v4-resume-paper.template-finance .cv-sidebar-section:not(.contact):not(.skills):not(.languages){display:none}
.v4-resume-paper.template-finance .cv-sidebar-title{display:none}
.v4-resume-paper.template-finance .cv-contact-list{display:grid;grid-template-columns:1fr 1fr;gap:5px 13px}
.v4-resume-paper.template-finance .cv-contact-list li{font-size:8.4px}
.v4-resume-paper.template-finance .cv-progress-item{margin-bottom:5px}.v4-resume-paper.template-finance .cv-progress-head{font-size:8px}.v4-resume-paper.template-finance .cv-progress-track{height:3px}
.v4-resume-paper.template-finance .cv-main{padding:31px 42px}
.v4-resume-paper.template-finance .cv-main-title{font-family:Georgia,serif;font-size:13.5px;text-transform:none;letter-spacing:0;border-bottom:1px solid #b9a277;color:#10243b}
.v4-resume-paper.template-finance .cv-title-icon{display:none}
.v4-resume-paper.template-finance .cv-timeline.compact .cv-timeline-item{grid-template-columns:82px 1fr}
.v4-resume-paper.template-finance .cv-project-card{border-radius:2px;background:#faf9f6;border-color:#e3ded3}

/* Healthcare — reassuring clinical clarity */
.v4-resume-paper.template-healthcare{grid-template-columns:var(--cv-sidebar-width,236px) 1fr;background:#fff}
.v4-resume-paper.template-healthcare .cv-sidebar{background:var(--cv-sidebar);color:#163d40;padding:30px 23px;border-top:11px solid var(--cv-accent)}
.v4-resume-paper.template-healthcare .cv-photo{width:108px;height:108px;border-radius:50%;border:5px solid #fff;box-shadow:0 6px 18px rgba(22,139,141,.12)}
.v4-resume-paper.template-healthcare .cv-header-block h1{color:#153f41;font-size:27px}.v4-resume-paper.template-healthcare .cv-header-block h2{color:var(--cv-accent);font-size:11.5px}
.v4-resume-paper.template-healthcare .cv-sidebar-title{color:#153f41}.v4-resume-paper.template-healthcare .cv-sidebar-title .cv-title-icon{background:#fff;color:var(--cv-accent);border-radius:50%}
.v4-resume-paper.template-healthcare .cv-contact-list li,.v4-resume-paper.template-healthcare .cv-progress-head,.v4-resume-paper.template-healthcare .cv-sidebar-plain-list li{color:#426b6d}
.v4-resume-paper.template-healthcare .cv-contact-list i{background:#fff;color:var(--cv-accent)}
.v4-resume-paper.template-healthcare .cv-progress-track{background:#cce3e3}.v4-resume-paper.template-healthcare .cv-tag{background:#fff;color:#326164;border-color:#cfe4e4}
.v4-resume-paper.template-healthcare .cv-main{padding:37px}
.v4-resume-paper.template-healthcare .cv-main-title{color:#153f41;border-bottom:2px solid #dceeee}
.v4-resume-paper.template-healthcare .cv-title-icon{border-radius:50%;background:#e5f5f5;color:var(--cv-accent)}
.v4-resume-paper.template-healthcare .cv-timeline-marker i{background:#fff;border:2px solid var(--cv-accent)}

/* Design Studio — expressive blocks with polished icon containers */
.v4-resume-paper.template-studio{grid-template-columns:var(--cv-sidebar-width,275px) 1fr;background:#fffafc}
.v4-resume-paper.template-studio .cv-sidebar{background:var(--cv-sidebar);padding:30px 28px;position:relative;overflow:hidden}
.v4-resume-paper.template-studio .cv-sidebar:before{content:"";position:absolute;width:190px;height:190px;border-radius:50%;background:var(--cv-accent);opacity:.18;left:-80px;bottom:-50px}
.v4-resume-paper.template-studio .cv-photo{width:138px;height:138px;border-radius:28px 60px 28px 60px;border:3px solid rgba(255,255,255,.85);transform:rotate(-2deg)}
.v4-resume-paper.template-studio .cv-header-block h1{font-size:34px;line-height:1;letter-spacing:-1.2px}.v4-resume-paper.template-studio .cv-header-block h2{color:#ff9aaf;font-size:12px}
.v4-resume-paper.template-studio .cv-sidebar-title .cv-title-icon{background:var(--cv-accent);color:#fff;border-radius:10px}
.v4-resume-paper.template-studio .cv-main{background:#fffafc;padding:39px}
.v4-resume-paper.template-studio .cv-main-title{border:0;font-size:15px;text-transform:none;letter-spacing:-.2px;color:#261c27}
.v4-resume-paper.template-studio .cv-main-title .cv-title-icon{background:var(--cv-accent);color:#fff;border-radius:10px;transform:rotate(-4deg)}
.v4-resume-paper.template-studio .cv-project-card,.v4-resume-paper.template-studio .cv-achievement-grid article{border:0;border-radius:16px;background:#fff;box-shadow:0 7px 20px rgba(38,28,39,.08);padding:14px}
.v4-resume-paper.template-studio .cv-stats{border:0;background:#fff;border-radius:14px;box-shadow:0 7px 20px rgba(38,28,39,.06);padding:13px}

/* Classic Serif — timeless single-column document */
.v4-resume-paper.template-classic{display:block;padding:45px 55px;background:#fffefd;color:#282321}
.v4-resume-paper.template-classic .cv-sidebar{min-height:auto;background:#fffefd;color:#282321;padding:0 0 18px;border-bottom:1px solid #7e6c65;display:block}
.v4-resume-paper.template-classic .cv-header-block{text-align:center;margin:0}
.v4-resume-paper.template-classic .cv-photo{display:none}
.v4-resume-paper.template-classic .cv-header-block h1{font-family:Georgia,serif;color:#282321;font-size:36px;font-weight:500;letter-spacing:1px}
.v4-resume-paper.template-classic .cv-header-block h2{font-family:Georgia,serif;color:var(--cv-accent);font-size:12px;font-weight:400;letter-spacing:1.5px;text-transform:uppercase}
.v4-resume-paper.template-classic .cv-sidebar-content{display:block;margin-top:13px}
.v4-resume-paper.template-classic .cv-sidebar-section{margin:0}.v4-resume-paper.template-classic .cv-sidebar-section:not(.contact){display:none}
.v4-resume-paper.template-classic .cv-sidebar-title{display:none}
.v4-resume-paper.template-classic .cv-contact-list{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 18px}
.v4-resume-paper.template-classic .cv-contact-list li{display:flex;align-items:center;color:#645954;font-size:8.8px;gap:5px}
.v4-resume-paper.template-classic .cv-contact-list i{background:transparent;color:var(--cv-accent);width:13px;height:13px}
.v4-resume-paper.template-classic .cv-main{padding:23px 0 0;background:#fffefd}
.v4-resume-paper.template-classic .cv-main-title{font-family:Georgia,serif;font-size:13.5px;text-transform:none;letter-spacing:.4px;color:#3b302c;border-bottom:1px solid #c9bcb5;justify-content:center}
.v4-resume-paper.template-classic .cv-title-icon{display:none}
.v4-resume-paper.template-classic .cv-profile-block p{text-align:justify;color:#554a45}
.v4-resume-paper.template-classic .cv-timeline.compact .cv-timeline-item{grid-template-columns:92px 1fr}
.v4-resume-paper.template-classic .cv-project-card{border-radius:0;background:transparent;border-color:#d8ccc6}

/* Template browser upgrades */
.v4-template-card{position:relative}
.v4-template-card-icon{position:absolute;top:13px;left:13px;width:32px;height:32px;border-radius:10px;background:rgba(255,255,255,.92);box-shadow:0 5px 15px rgba(15,23,42,.12);display:grid;place-items:center;color:var(--preview-accent);z-index:3}
.v4-template-card-icon .cv-svg-icon{width:17px;height:17px}
.v4-template-card-preview.layout-single{grid-template-columns:1fr}
.v4-template-card-preview.layout-single .mini-side{grid-column:1;min-height:61px;display:flex;align-items:center;gap:8px;padding:13px 16px;border-bottom:4px solid var(--preview-accent)}
.v4-template-card-preview.layout-single .mini-photo{margin:0;width:34px;height:34px}
.v4-template-card-preview.layout-single .mini-main{grid-column:1;padding:15px 18px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.v4-template-card-preview.layout-single .mini-block:first-child{grid-column:1/-1}
.v4-template-card-preview.layout-rail{grid-template-columns:25% 1% 74%}
.v4-template-card-preview.layout-top{grid-template-columns:1fr;grid-template-rows:68px 1fr}
.v4-template-card-preview.layout-top .mini-side{grid-column:1;display:flex;align-items:center;gap:9px;padding:12px 18px}
.v4-template-card-preview.layout-top .mini-photo{margin:0;width:35px;height:35px}
.v4-template-card-preview.layout-top .mini-main{grid-column:1;padding:15px 18px;display:grid;grid-template-columns:1fr 1fr;gap:9px}
.v4-template-card-preview.layout-top .mini-block:first-child{grid-column:1/-1}
.v4-template-card-preview.template-studio-preview .mini-side{background:linear-gradient(160deg,var(--preview-side),color-mix(in srgb,var(--preview-accent) 35%,var(--preview-side)))}
.v4-template-card-preview.template-architect-preview{background:#fbfaf7}
.v4-template-card-preview.template-healthcare-preview .mini-side{border-top:5px solid var(--preview-accent)}
.v4-template-card-preview.template-finance-preview .mini-side{border-bottom:5px solid var(--preview-accent)}
.v4-template-card-meta>span:first-child{min-width:0}
.v4-template-card-meta strong{display:flex;align-items:center;gap:7px}
.v4-template-detail-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--v4-primary-soft);color:var(--v4-primary);flex:0 0 auto}
.v4-template-detail-icon .cv-svg-icon{width:20px;height:20px}
.v4-icon-pack-preview{display:flex;gap:7px;margin-top:12px}
.v4-icon-pack-preview span{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#52647a;border:1px solid #dce4ed;border-radius:8px;padding:6px 8px;background:#fff}
.v4-icon-pack-preview .cv-svg-icon{width:14px;height:14px;color:var(--v4-primary)}

.v4-template-detail-title>div:nth-child(2){flex:1;min-width:0}
.v4-template-strip .v4-template-card-preview.layout-single{grid-template-columns:1fr;grid-template-rows:22px 1fr}
.v4-template-strip .v4-template-card-preview.layout-single .mini-side{grid-column:1;padding:4px 7px;min-height:0;border-bottom:2px solid var(--preview-accent)}
.v4-template-strip .v4-template-card-preview.layout-single .mini-main{grid-column:1;padding:6px 7px;display:block}
.v4-template-strip .v4-template-card-preview.layout-single .mini-photo{width:11px;height:11px;margin:0 4px 0 0}

/* 4.4.1 final preview overrides (placed after template-specific rules). */
.v4-template-preview-viewport{display:block}
.v4-template-live-preview-inner{margin:0 auto}
.v4-template-detail-footer .v4-icon-pack-preview{display:grid;grid-template-columns:1fr;gap:6px;margin-top:11px}
.v4-template-detail-footer .v4-icon-pack-preview span{display:flex;width:100%;min-width:0;margin:0;white-space:normal}
@media(max-width:900px){
  .v4-template-detail-footer .v4-icon-pack-preview{display:none}
}
@media(max-width:1350px){
  .v4-template-preview-label{display:none}
  .v4-template-preview-controls{width:100%;justify-content:center}
}
