/* Preview page + biodata template styles */
.preview-wrap{max-width:1200px;margin:0 auto;padding:30px 24px 80px;display:grid;grid-template-columns:300px 1fr;gap:30px}
@media (max-width:980px){.preview-wrap{grid-template-columns:1fr}}

.preview-side{position:sticky;top:90px;align-self:start;display:flex;flex-direction:column;gap:14px}
@media (max-width:980px){.preview-side{position:static}}
.side-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:22px}
.side-card h4{font-size:14px;text-transform:uppercase;letter-spacing:.15em;color:var(--gold);font-family:var(--font-body);margin-bottom:14px}
.side-card .row{display:flex;justify-content:space-between;font-size:13px;padding:6px 0;border-bottom:1px dashed var(--border)}
.side-card .row:last-child{border:none}
.side-card .row span{color:var(--muted)}
.side-card .row strong{color:var(--ink);font-weight:500;text-align:right;max-width:60%}
.side-actions{display:flex;flex-direction:column;gap:10px}

.preview-stage{
  background:#fff;border:1px solid var(--border);border-radius:18px;
  padding:30px;display:flex;justify-content:center;
  min-height:600px;box-shadow:var(--shadow-sm);
}

/* ============ Biodata Templates (A4 proportions) ============ */
.bio{
  width:100%;max-width:640px;
  background:#fffdf7;color:#1a1a1a;padding:5px;
  font-family:'Cormorant Garamond',Georgia,serif;font-size:14px;line-height:1.55;
  position:relative;overflow:hidden;
}
.bio h1{font-family:'Cormorant Garamond',serif;font-size:30px;color:#7a1f2b;text-align:center;margin-bottom:4px;font-weight:600}
.bio .om{text-align:center;color:#c9a24a;font-size:26px;margin-bottom:6px;font-family:serif}
.bio .blessing{text-align:center;font-size:11px;letter-spacing:.3em;color:#888;text-transform:uppercase;margin-bottom:16px}
.bio .photo{
  width:130px;height:160px;background:linear-gradient(135deg,#f5d8a8,#e0b878);
  margin:14px auto;border:2px solid #c9a24a;display:grid;place-items:center;color:#7a1f2b;
  font-family:serif;font-size:42px;overflow:hidden;
}
.bio .photo img{width:100%;height:100%;object-fit:cover}
.bio section{margin-top:18px}
.bio h2{
  font-family:'Cormorant Garamond',serif;font-size:17px;color:#7a1f2b;
  border-bottom:1.5px solid #c9a24a;padding-bottom:4px;margin-bottom:10px;
  letter-spacing:.05em;text-transform:uppercase;font-weight:600;
}
.bio dl{display:grid;grid-template-columns:140px 1fr;gap:6px 12px;font-size:13.5px}
.bio dt{color:#7a1f2b;font-weight:600}
.bio dd{color:#222}
.bio .contact-foot{text-align:center;margin-top:22px;font-size:12px;color:#666;border-top:1px dashed #c9a24a;padding-top:12px}

/* Decorative variants */
.bio.t1{} /* classic, gold border via outline */
.bio.t1{border: 1px solid #c9a24a;}

.bio.t2{background:linear-gradient(180deg,#fffdf7,#fbf0d8);border-top:8px solid #7a1f2b;border-bottom:8px solid #7a1f2b}

.bio.t3::before{content:"";position:absolute;inset:14px;border:1px solid #c9a24a;pointer-events:none}
.bio.t3{padding:50px}

.bio.t4{background:#fff;border-left:10px solid #c9a24a}
.bio.t4 h1{text-align:left;border-bottom:2px solid #7a1f2b;padding-bottom:6px}
.bio.t4 .om,.bio.t4 .blessing{text-align:left}
.bio.t4 .photo{margin:14px 0}

.bio.t5{background:#7a1f2b;color:#fbf0d8}
.bio.t5 h1,.bio.t5 h2,.bio.t5 dt{color:#e6c97a}
.bio.t5 dd{color:#fbf0d8}
.bio.t5 h2{border-color:#e6c97a}
.bio.t5 .om{color:#e6c97a}
.bio.t5 .blessing{color:#d8c294}
.bio.t5 .contact-foot{color:#e6c97a;border-color:#c9a24a}

.bio.t6{background:linear-gradient(135deg,#fef4dc,#fbe7c1)}
.bio.t6::after{content:"❀";position:absolute;top:20px;right:24px;color:#c9a24a;font-size:42px;opacity:.4}
.bio.t6::before{content:"❀";position:absolute;bottom:20px;left:24px;color:#c9a24a;font-size:42px;opacity:.4}

.bio.t7{background:#fffdf7;border:3px solid #7a1f2b;border-radius:0}
.bio.t7 h1{background:#7a1f2b;color:#e6c97a;padding:10px;margin:-48px -44px 16px;text-align:center}

.bio.t8{padding-top:120px}
.bio.t8::before{content:"";position:absolute;top:0;left:0;right:0;height:100px;background:linear-gradient(135deg,#7a1f2b,#a02b3b)}
.bio.t8 h1{position:absolute;top:30px;left:0;right:0;color:#e6c97a;margin:0}
.bio.t8 .om{position:absolute;top:10px;left:0;right:0;color:#e6c97a}

.bio.t9{background:#fbf3e2;border:1px dashed #7a1f2b;padding:40px}
.bio.t9 h1{font-style:italic}

.bio.t10{background:#fffdf7}
.bio.t10 h1{font-size:34px;letter-spacing:.05em}
.bio.t10::before{content:"";position:absolute;top:30px;left:30px;right:30px;height:1px;background:#c9a24a}
.bio.t10::after{content:"";position:absolute;bottom:30px;left:30px;right:30px;height:1px;background:#c9a24a}

.bio.t11{background:linear-gradient(180deg,#fff,#fbf0d8)}
.bio.t11 .photo{border-radius:50%;width:140px;height:140px}

.bio.t12{background:#fffdf7;border:6px solid #7a1f2b;outline:2px solid #c9a24a;outline-offset:-12px;padding:42px}

.bio.t13{background:#2d0810;color:#f1e6d0}
.bio.t13 h1,.bio.t13 h2,.bio.t13 dt{color:#e6c97a}
.bio.t13 dd,.bio.t13 .blessing,.bio.t13 .contact-foot{color:#d8c294}
.bio.t13 h2{border-color:#7a1f2b}
.bio.t13 .om{color:#e6c97a}

.bio.t14{background:#fffdf7;padding:40px}
.bio.t14 dl{grid-template-columns:130px 1fr;border-left:2px solid #c9a24a;padding-left:14px}

.bio.t15{background:#fffdf7}
.bio.t15 h2{background:#7a1f2b;color:#e6c97a;padding:6px 12px;border:none;border-radius:4px}

.bio.t16{background:#fefcf5}
.bio.t16 .photo{transform:rotate(-3deg);box-shadow:0 8px 20px rgba(0,0,0,.15)}
.bio.t16 h1{transform:rotate(-1deg)}

.bio.t17{background:#fffdf7;border-radius:20px;border:2px solid #c9a24a}

.bio.t18{background:repeating-linear-gradient(45deg,#fffdf7 0,#fffdf7 20px,#fdf6e3 20px,#fdf6e3 22px)}

.bio.t19{background:#fffdf7}
.bio.t19 h1::before,.bio.t19 h1::after{content:"❖";color:#c9a24a;margin:0 12px;font-size:18px}

.bio.t20{background:linear-gradient(180deg,#fef4dc 0,#fffdf7 30%);border-top:14px solid #c9a24a}

.bio.t21{background:#fffdf7;padding:50px 40px}
.bio.t21 h2{font-size:14px;letter-spacing:.2em;border-bottom:none;border-top:1px solid #c9a24a;padding-top:6px}

.bio.t22{background:#fffdf7;border:1px solid #c9a24a}
.bio.t22::before,.bio.t22::after{content:"";position:absolute;width:60px;height:60px;border:3px solid #7a1f2b}
.bio.t22::before{top:10px;left:10px;border-right:none;border-bottom:none}
.bio.t22::after{bottom:10px;right:10px;border-left:none;border-top:none}

.bio.t23{background:#0c1f1a;color:#e8d9b8}
.bio.t23 h1,.bio.t23 h2,.bio.t23 dt{color:#d4b265}
.bio.t23 dd,.bio.t23 .blessing,.bio.t23 .contact-foot{color:#c8b890}
.bio.t23 h2{border-color:#d4b265}
.bio.t23 .om{color:#d4b265}

.bio.t24{background:#fffdf7}
.bio.t24 h1{
  background:linear-gradient(135deg,#7a1f2b,#c9a24a);
  -webkit-background-clip:text;background-clip:text;color:transparent;font-size:36px;
}
.bio.t24 h2{border-bottom-style:double;border-bottom-width:3px}

.bio:hover {
   color:var(--gold-light);border-color:var(--primary); transform: scale(1.06);
}

/* Print */
@media print{
  .site-header,.site-footer,.preview-side,.preview-actions-mobile{display:none !important}
  body{background:#fff}
  .preview-wrap{display:block;padding:0}
  .preview-stage{border:none;padding:0;min-height:auto;box-shadow:none}
  .bio{max-width:none;width:100%;page-break-inside:avoid}
  @page{size:A4;margin:10mm}
}
