 :root{
      --bg: #f6f7fb;
      --card: rgba(255,255,255,.85);
      --ink:#0f172a;
      --muted:#64748b;
      --line: rgba(2,6,23,.08);
      --primary:#2563eb;
      --ring: rgba(37,99,235,.22);
      --shadow: 0 18px 55px rgba(2,6,23,.10);
      --shadow2: 0 12px 30px rgba(2,6,23,.08);
      --radius: 18px;
    }
    body{
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background:
        radial-gradient(900px 520px at 10% 0%, rgba(37,99,235,.10), transparent 60%),
        radial-gradient(900px 520px at 90% 10%, rgba(236,72,153,.08), transparent 55%),
        radial-gradient(800px 520px at 50% 95%, rgba(34,197,94,.08), transparent 60%),
        var(--bg);
      color: var(--ink);
    }

    /* 2 column layout 70/30 */
    .app-grid{ display:flex; gap:18px; align-items:flex-start; }
    .left70{ flex:0 0 70%; max-width:70%; }
    .right30{ flex:0 0 30%; max-width:30%; }
    @media (max-width: 991.98px){
      .app-grid{ flex-direction:column; }
      .left70,.right30{ flex:0 0 100%; max-width:100%; }
    }

    .soft-card{
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: var(--card);
      box-shadow: var(--shadow);
      overflow: hidden;
      backdrop-filter: blur(10px);
    }

    .app-hero{
      padding: 18px 18px 14px;
      background:
        radial-gradient(900px 220px at 20% 0%, rgba(37,99,235,.18), transparent 58%),
        radial-gradient(700px 250px at 80% 20%, rgba(236,72,153,.14), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.75));
      border-bottom: 1px solid var(--line);
    }
    .maker-title{ font-weight:900; letter-spacing:-.4px; margin:0; line-height:1.15; }
    .subtle{ color: var(--muted); font-size:13px; margin-top:6px; }

    .lang-btns .btn{ margin: 4px 6px 0 0; border-radius: 999px; font-weight: 800; }
    .small-help{ font-size:12px; opacity:.78; }

    .section-wrap{
      margin: 14px 16px 0;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: rgba(255,255,255,.82);
      box-shadow: var(--shadow2);
      overflow: hidden;
    }
    .section-head{
      padding: 12px 14px;
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      border-bottom: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(248,250,252,.95), rgba(255,255,255,.85));
    }
    .section-head .ttl{
      font-weight: 900;
      margin:0;
      font-size: 14px;
      display:flex;
      align-items:center;
      gap:10px;
    }
    .section-head .ttl i{
      width: 28px; height: 28px;
      border-radius: 10px;
      display:flex; align-items:center; justify-content:center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.8);
      box-shadow: 0 10px 25px rgba(2,6,23,.06);
      color: rgba(15,23,42,.75);
      font-size: 13px;
    }
    .section-body{ padding: 14px; }

    .field-card{
      border-radius: 16px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.92);
      box-shadow: 0 10px 25px rgba(2,6,23,.05);
      padding: 10px;
      transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease, filter .12s ease;
      height: 100%;
    }
    .field-card:hover{ transform: translateY(-1px); box-shadow: 0 16px 38px rgba(2,6,23,.08); }
    .field-card.field-off{ opacity:.5; filter: grayscale(.35); transform:none !important; }

    .labelRow{
      display:flex; align-items:center; justify-content:space-between;
      gap: 10px;
      margin-bottom: 8px;
    }
    .labelRow label{
      margin:0;
      font-weight: 900;
      font-size: 13px;
      color: rgba(15,23,42,.88);
      letter-spacing: -.1px;
    }

    .toggle{ display:flex; align-items:center; gap:8px; user-select:none; white-space:nowrap; color: rgba(15,23,42,.72); font-size: 12px; }
    .switch{
      position:relative;
      width: 44px; height: 24px;
      border-radius: 999px;
      background: rgba(100,116,139,.24);
      border: 1px solid rgba(2,6,23,.10);
      box-shadow: inset 0 2px 10px rgba(2,6,23,.12);
      cursor:pointer;
      transition: background .15s ease;
      flex: 0 0 auto;
    }
    .switch::after{
      content:"";
      position:absolute; top: 2px; left: 2px;
      width: 20px; height: 20px;
      border-radius: 999px;
      background: #fff;
      box-shadow: 0 8px 18px rgba(2,6,23,.18);
      transition: transform .15s ease;
    }
    input.toggleCB{ display:none; }
    input.toggleCB:checked + .switch{ background: rgba(37,99,235,.75); }
    input.toggleCB:checked + .switch::after{ transform: translateX(20px); }

    .form-control, .custom-select{
      border-radius: 14px !important;
      border: 1px solid rgba(2,6,23,.14) !important;
      box-shadow: 0 10px 25px rgba(2,6,23,.05);
      padding-top: .72rem;
      padding-bottom: .72rem;
      padding-left: 12px;
      background: rgba(255,255,255,.98);
    }
    textarea.form-control{ resize: vertical; min-height: 90px; }
    .form-control:focus, .custom-select:focus{
      box-shadow: 0 0 0 4px var(--ring) !important;
      border-color: rgba(37,99,235,.55) !important;
    }
    .hint-under{ font-size: 11px; color: rgba(100,116,139,.95); margin-top: 6px; }

    .form-row{ margin-left:-8px; margin-right:-8px; }
    .form-row > .form-group{ padding-left:8px; padding-right:8px; }

    /* ======= CAROUSELS (Desktop 3 cards, Tablet 2, Mobile 1) ======= */
    .tpl-slider-wrap{
      position:relative;
      border-radius: 16px;
      background: rgba(255,255,255,.82);
      border: 1px solid var(--line);
      padding: 10px 10px 6px;
      overflow:hidden;
      box-shadow: 0 14px 35px rgba(2,6,23,.06);
    }
    .tpl-fade-left, .tpl-fade-right{
      position:absolute; top:0; bottom:0; width:34px; pointer-events:none; z-index:2;
    }
    .tpl-fade-left{ left:0; background: linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,0)); }
    .tpl-fade-right{ right:0; background: linear-gradient(270deg, rgba(255,255,255,.92), rgba(255,255,255,0)); }

    .tpl-scroller{
      display:grid;
      grid-auto-flow:column;
      gap:16px;
      overflow-x:auto;
      overflow-y:hidden;
      padding: 10px 56px 14px;
      scroll-snap-type:x mandatory;
      scroll-behavior:smooth;
      -webkit-overflow-scrolling: touch;
      grid-auto-columns: calc(33.333% - 10.666px);
    }
    @media (max-width: 991.98px){
      .tpl-scroller{ grid-auto-columns: calc(50% - 8px); }
    }
    @media (max-width: 575.98px){
      .tpl-scroller{ grid-auto-columns: 100%; padding: 10px 44px 14px; gap:14px; }
      .tpl-fade-left, .tpl-fade-right{ width:26px; }
    }

    .tpl-scroller::-webkit-scrollbar{ height:8px; }
    .tpl-scroller::-webkit-scrollbar-track{ background: rgba(2,6,23,.05); border-radius:99px; }
    .tpl-scroller::-webkit-scrollbar-thumb{ background: rgba(2,6,23,.22); border-radius:99px; }

    .tpl-card{
      scroll-snap-align:start;
      cursor:pointer;
      border:1px solid var(--line);
      border-radius: 16px;
      padding:10px;
      background: rgba(255,255,255,.95);
      transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
      box-shadow: 0 12px 28px rgba(2,6,23,.06);
      height:100%;
    }
    .tpl-card:hover{ transform: translateY(-3px); box-shadow: 0 18px 44px rgba(2,6,23,.10); }
    .tpl-card.active{
      border-color: rgba(37,99,235,.55);
      box-shadow: 0 18px 46px rgba(37,99,235,.16);
      outline: 3px solid rgba(37,99,235,.16);
    }
    .tpl-thumb{
      height:350px;
      border-radius: 14px;
      display:flex; align-items:center; justify-content:center;
      font-weight:800; color:#4b5563;
      text-align:center;
      border:1px solid rgba(2,6,23,.07);
      overflow:hidden;
      background: #f8fafc;
    }
    .tpl-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
    .tpl-thumb.text{
      background: radial-gradient(circle at top left, #eef2ff, #ffffff);
      padding:10px;
      font-size:14px;
      line-height:1.15;
    }
    .tpl-meta{ margin-top:8px; }
    .tpl-name{ font-weight:900; font-size:14px; }
    .tpl-desc{ font-size:12px; color: rgba(100,116,139,.95); }

    .tpl-nav{
      position:absolute;
      top:50%;
      transform: translateY(-50%);
      z-index:3;
      width:36px; height:36px;
      border-radius:999px;
      border:1px solid var(--line);
      background: rgba(255,255,255,.94);
      box-shadow: 0 12px 28px rgba(2,6,23,.12);
      display:flex; align-items:center; justify-content:center;
      cursor:pointer; user-select:none;
    }
    .tpl-nav:hover{ background:#fff; }
    .tpl-nav.prev{ left:10px; }
    .tpl-nav.next{ right:10px; }
    .tpl-nav i{ font-size:14px; opacity:.85; }

    .tpl-hint{
      display:flex; align-items:center; justify-content:space-between;
      margin-top:8px;
      font-size:12px;
      color: rgba(100,116,139,.95);
    }
    .tpl-hint .kbd{
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      border: 1px solid rgba(2,6,23,.14);
      padding: 2px 6px;
      border-radius: 8px;
      background: rgba(255,255,255,.8);
    }

    /* Religious symbol thumb via background-image */
    .sym-thumb{
      height:130px;
      border-radius: 14px;
      border:1px solid rgba(2,6,23,.07);
      background-color:#fff;
      background-repeat:no-repeat;
      background-position:center;
      background-size: contain;
    }
    .sym-thumb.none{
      background: radial-gradient(circle at top left, #eef2ff, #ffffff);
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:900;
      color:#6b7280;
      font-size: 16px;
    }

    .mini-actions{ margin: 12px 16px 0; }
    .mini-actions .btn{ border-radius: 14px; font-weight: 800; margin-right:8px; margin-top:6px; }

    .actions-footer{
      padding: 14px 16px 16px;
      display:flex;
      flex-wrap:wrap;
      gap:10px;
      align-items:center;
      justify-content:center;
    }
    .btn-primary.btn-lg, .btn-outline-secondary.btn-lg{
      border-radius: 16px;
      padding: 12px 18px;
      font-weight: 900;
      min-width: 210px;
      position: relative;
    }
    .btn-primary.btn-lg{ box-shadow: 0 16px 40px rgba(37,99,235,.25); }
    .btn-loading{ pointer-events:none; opacity:.9; }
    .btn-spinner{
      display:inline-block;
      width: 18px; height: 18px;
      border-radius: 999px;
      border: 2px solid rgba(255,255,255,.45);
      border-top-color: rgba(255,255,255,1);
      animation: spin .9s linear infinite;
      vertical-align: -3px;
      margin-right: 10px;
    }
    @keyframes spin{ to{ transform: rotate(360deg); } }

    /* PDF Render */
    #pdfRenderWrap{
      position: fixed;
      left: -99999px;
      top: 0;
      width: 794px;
      height: 1123px;
      overflow: hidden;
      background: #fff;
      box-sizing: border-box;
      font-family: Arial, sans-serif;
    }

    /* Script fonts for PDF + preview */
    .hiFont { font-family: "Noto Sans Devanagari","Mangal","Nirmala UI",Arial,sans-serif; }
    .guFont { font-family: "Noto Sans Gujarati","Shruti","Nirmala UI",Arial,sans-serif; }
    .paFont { font-family: "Noto Sans Gurmukhi","Raavi","Nirmala UI",Arial,sans-serif; }
    .orFont { font-family: "Noto Sans Oriya","Kalinga","Nirmala UI",Arial,sans-serif; }

    /* PDF styles */
    .pdf-title { text-align:center; font-weight:800; font-size:20px; margin:2px 0 8px; }
    .pdf-symbol-wrap{ display:flex; justify-content:center; align-items:center; margin-top:2px; margin-bottom:6px; }
    .pdf-symbol{ width: 56px; height: 56px; object-fit: contain; display:block; }

    .two-col { display:flex; gap:18px; }
    .col { flex:1; }
    .secTitle { font-weight:800; font-size:14px; border-bottom:1px solid #333; padding-bottom:5px; margin:10px 0 8px; }
    .kvRow { display:flex; margin:5px 0; font-size:13px; line-height:1.25; }
    .kvKey { width:42%; font-weight:700; }
    .kvVal { width:58%; white-space:pre-wrap; }

    .headerRow { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:8px; }
    .nameBig { font-size:20px; font-weight:800; margin-bottom:4px; }
    .miniLine { font-size:12px; opacity:.85; }

    .photoBox{
      width:130px; height:150px; border:1px solid #111;
      display:flex; align-items:center; justify-content:center;
      overflow:hidden; background:#fff;
      flex: 0 0 auto;
      border-radius:10px;
    }
    .photoBox img { width:100%; height:100%; object-fit:cover; display:block; }

    .kundliBox{ border:1px solid #111; padding:10px; border-radius:10px; background:#fff; }

    .borderBg{
      width: 794px;
      height: 1123px;
      background-repeat: no-repeat;
      background-position: center;
      background-size: 100% 100%;
      box-sizing: border-box;
    }
    .borderContent{ box-sizing:border-box; height:1123px; }

    @media (max-width: 767.98px) {
      .container{ padding-left:12px; padding-right:12px; }
      .mini-actions .btn, .lang-btns .btn{ width:100%; margin-right:0 !important; }
      .section-wrap{ margin-left: 10px; margin-right: 10px; }
      .app-hero{ padding-left: 14px; padding-right: 14px; }
    }

    /* Preview Modal */
    .preview-modal{
      position: fixed;
      inset: 0;
      background: rgba(2,6,23,.60);
      display:none;
      align-items:center;
      justify-content:center;
      z-index: 9999;
      padding: 14px;
    }
    .preview-modal.show{ display:flex; }
    .preview-panel{
      width: min(980px, 100%);
      max-height: 92vh;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,.16);
      background: rgba(255,255,255,.92);
      box-shadow: 0 30px 90px rgba(2,6,23,.35);
      overflow:hidden;
      display:flex;
      flex-direction:column;
      backdrop-filter: blur(10px);
    }
    .preview-head{
      padding: 10px 12px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      border-bottom: 1px solid rgba(2,6,23,.10);
      background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
    }
    .preview-head .title{
      font-weight: 900;
      margin:0;
      font-size: 14px;
      display:flex; align-items:center; gap:8px;
    }
    .preview-head .title i{ opacity:.75; }
    .preview-actions{ display:flex; gap:8px; align-items:center; }
    .preview-actions .btn{ border-radius: 14px; font-weight: 900; }
    .preview-body{
      padding: 10px;
      overflow:auto;
      background: radial-gradient(800px 300px at 10% 0%, rgba(37,99,235,.08), transparent 55%),
                  radial-gradient(800px 300px at 90% 10%, rgba(236,72,153,.06), transparent 55%),
                  #f1f5f9;
    }
    .preview-canvas{
      margin: 0 auto;
      width: min(860px, 100%);
      background:#fff;
      border-radius: 14px;
      border: 1px solid rgba(2,6,23,.10);
      box-shadow: 0 18px 60px rgba(2,6,23,.16);
      overflow:hidden;
      position: relative;
    }
    .preview-canvas img{ width:100%; height:auto; display:block; }

    /* =========================
       DOWNLOAD MODAL (RAZORPAY)
    ========================= */
    .pay-modal{
      position: fixed;
      inset: 0;
      background: rgba(2,6,23,.65);
      display:none;
      align-items:center;
      justify-content:center;
      z-index: 10000;
      padding: 14px;
    }
    .pay-modal.show{ display:flex; }
    .pay-panel{
      width: min(560px, 100%);
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,.16);
      background: rgba(255,255,255,.95);
      box-shadow: 0 30px 90px rgba(2,6,23,.35);
      overflow:hidden;
      backdrop-filter: blur(10px);
      max-height: 92vh;
    }
    .pay-head{
      padding: 12px 14px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      border-bottom: 1px solid rgba(2,6,23,.10);
      background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
    }
    .pay-head .title{
      margin:0;
      font-size: 15px;
      font-weight: 900;
      display:flex;
      align-items:center;
      gap:8px;
    }
    .pay-body{
      padding: 14px;
      overflow:auto;
      max-height: calc(92vh - 54px);
    }

    .mode-wrap{
      border: 1px solid rgba(2,6,23,.10);
      border-radius: 16px;
      background: rgba(248,250,252,.85);
      padding: 10px;
      box-shadow: 0 12px 28px rgba(2,6,23,.06);
    }
    .mode-title{
      font-weight: 900;
      font-size: 13px;
      margin: 0 0 8px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
    }
    .price-pill{
      font-weight: 900;
      font-size: 12px;
      padding: 4px 10px;
      border-radius: 999px;
      border: 1px solid rgba(2,6,23,.10);
      background: rgba(255,255,255,.9);
      box-shadow: 0 10px 22px rgba(2,6,23,.06);
      white-space: nowrap;
    }
    .mode-buttons{
      display:flex;
      gap:10px;
      flex-wrap:wrap;
    }
    .mode-btn{
      flex:1;
      min-width: 230px;
      border-radius: 14px;
      border: 1px solid rgba(2,6,23,.12);
      background: rgba(255,255,255,.92);
      padding: 10px 12px;
      cursor:pointer;
      transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
      box-shadow: 0 10px 22px rgba(2,6,23,.06);
    }
    .mode-btn:hover{ transform: translateY(-1px); box-shadow: 0 16px 34px rgba(2,6,23,.10); }
    .mode-btn.active{
      border-color: rgba(37,99,235,.55);
      outline: 3px solid rgba(37,99,235,.14);
      box-shadow: 0 18px 46px rgba(37,99,235,.14);
    }
    .mode-btn .h{
      font-weight: 900;
      font-size: 13px;
      margin-bottom: 2px;
      display:flex;
      align-items:center;
      gap:8px;
    }
    .mode-btn .d{
      font-size: 12px;
      color: rgba(100,116,139,.95);
      line-height: 1.35;
    }

    .pay-note{
      margin-top: 10px;
      font-size: 12px;
      color: rgba(100,116,139,.95);
      line-height: 1.35;
    }
    .pay-actions{
      display:flex;
      gap:10px;
      margin-top: 12px;
    }
    .pay-actions .btn{
      border-radius: 14px;
      font-weight: 900;
      flex: 1;
    }
    .err{
      display:none;
      margin-top:8px;
      font-size: 12px;
      color: #b91c1c;
      font-weight: 700;
    }
    .biodata-example-wrap{
  width: 100%;
  margin: 18px 0 22px;
}

.biodata-example-wrap h3{
  margin-bottom: 12px;
}

.biodata-example-table{
  width: 100%;
  margin: 0;
  background: #fff;
}

.biodata-example-table th,
.biodata-example-table td{
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 15px;
  line-height: 1.6;
}

.biodata-example-table th{
  width: 38%;
  font-weight: 600;
  background: #f8f8f8;
}

@media (max-width: 767.98px){
  .biodata-example-wrap{
    margin: 16px 0 20px;
  }

  .biodata-example-wrap h3{
    margin-bottom: 10px;
    font-size: 20px;
  }

  .biodata-example-table th,
  .biodata-example-table td{
    padding: 10px 12px;
    font-size: 14px;
  }

  .biodata-example-table th{
    width: 42%;
  }
}

    .hide{ display:none !important; }