/* ==DKCSS-START== editor layout shared by the document tools */
.dk { --dk-ac: var(--brand); }
.dk-tabs { display: none; }
.dk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 20px; align-items: start; }
.dk-form { min-width: 0; }
.dk-view { position: sticky; top: 72px; max-height: calc(100vh - 84px); overflow: auto; background: #e8ebf2; border-radius: 16px; padding: 12px; min-width: 0; overscroll-behavior: contain; }
:root[data-theme="dark"] .dk-view { background: #0b0d13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dk-view { background: #0b0d13; } }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.dk-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.dk-tb-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-tb-label { font-weight: 700; font-size: 14px; margin-right: 2px; }
.dk-saved { font-size: 13px; color: var(--ok); margin-left: auto; }
.dk-sec { border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; background: var(--card); overflow: hidden; }
.dk-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-weight: 800; font-size: 16px; min-height: 50px; }
.dk-sec > summary::-webkit-details-marker { display: none; }
.dk-sec > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.dk-sec[open] > summary::after { transform: rotate(180deg); }
.dk-sec[open] > summary { border-bottom: 1px solid var(--line); background: var(--bg); }
.dk-sec-ic { width: 30px; height: 30px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 9px; font-size: 16px; flex: none; }
.dk-sec-b { padding: 6px 14px 14px; }
.dk-badge { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.dk-tip { font-size: 13.5px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0 4px; }
.dk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.dk-fields .full { grid-column: 1 / -1; }
.dk-fields .field { margin: 8px 0 0; min-width: 0; }
.dk-fields .field label { font-size: 13px; }
.dk-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin: 10px 0 0; cursor: pointer; min-height: 32px; }
.dk-card { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 12px; margin: 10px 0; background: var(--bg); }
.dk-card-h { display: flex; align-items: center; gap: 4px; padding-top: 6px; }
.dk-card-t { flex: 1; font-weight: 700; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-ib { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 9px; width: 36px; height: 36px; font-size: 15px; cursor: pointer; flex: none; }
.dk-ib:disabled { opacity: .35; cursor: default; }
.dk-ib.del { color: var(--bad); }
.dk-add { width: 100%; margin-top: 4px; }
.dk-photo { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dk-photo-img { width: 84px; height: 84px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 12px; color: var(--muted); }
.dk-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.dk-photo-b { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.dk-photo-b small { flex-basis: 100%; font-size: 12.5px; }
.dk-photo-b .dk-check { margin: 0; flex-basis: 100%; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.dk-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--brand-soft); color: var(--ink); border-radius: 99px; padding: 3px 4px 3px 12px; font-size: 14px; font-weight: 600; }
.dk-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; }
.dk-chip-in { display: flex; gap: 8px; }
.dk-chip-in input { flex: 1; min-width: 0; }
.dk-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dk-sugg button { font: inherit; font-size: 13px; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 5px 10px; cursor: pointer; }
.dk-arrange { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dk-arrange li { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.dk-arrange input[type=text] { flex: 1; min-width: 0; min-height: 36px; padding: 5px 9px; font-weight: 600; font-size: 14px; }
.dk-ar-ic { width: 22px; text-align: center; flex: none; }
.dk-show { display: flex; align-items: center; gap: 4px; font-size: 12.5px; flex: none; }
.dk-design { background: var(--card); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.dk-tpls { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.dk-tpls button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 11px; padding: 6px 6px 5px; cursor: pointer; font: inherit; font-size: 12.5px; }
.dk-tpls button.on { border-color: var(--dk-ac); box-shadow: 0 0 0 2px color-mix(in srgb, var(--dk-ac) 25%, transparent); }
.dk-tpls b { font-weight: 700; }
.th { position: relative; width: 54px; height: 70px; background: #fff; border: 1px solid #d9dce5; border-radius: 4px; overflow: hidden; display: block; }
.th i { position: absolute; display: block; background: #c9ced9; height: 3px; border-radius: 2px; }
.dk-design-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.dk-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.dk-swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.dk-color-custom { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--muted); cursor: pointer; font-size: 14px; }
.dk-color-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.dk-mini { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.dk-mini select { min-height: 34px; padding: 4px 8px; font-size: 14px; width: auto; }
.dk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.dk-pagecount { font-size: 13px; color: var(--muted); margin-left: auto; }
.dk-pages { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.dk-pages.zoomed { align-items: flex-start; overflow-x: auto; }
.pv-box { position: relative; flex: none; box-shadow: 0 2px 14px rgba(15, 20, 40, .18); background: #fff; overflow: hidden; }
.pv-box > .pg { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.pv-lab { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.dk-hint { font-size: 13.5px; color: var(--muted); background: var(--card); border-radius: 12px; padding: 10px 12px; margin-top: 12px; line-height: 1.5; }
.dk-measure { position: absolute; left: -12000px; top: 0; visibility: hidden; pointer-events: none; contain: layout style; }
#dk-print { display: none; }
.dk-modal { position: fixed; inset: 0; background: rgba(10, 12, 20, .6); z-index: 100; display: grid; place-items: center; padding: 16px; }
.dk-modal-card { background: var(--card); color: var(--ink); border-radius: 16px; padding: 16px; max-width: 360px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dk-modal-title { font-weight: 800; }
.dk-crop-cv { touch-action: none; cursor: grab; border-radius: 8px; background: #eee; max-width: 100%; }
.dk-zoom { display: flex; align-items: center; gap: 8px; width: 100%; }
@media (max-width: 900px) {
  .dk-tabs { display: flex; gap: 6px; position: sticky; top: 60px; z-index: 15; background: var(--card); padding: 8px 0; margin: -8px 0 10px; border-bottom: 1px solid var(--line); }
  .dk-tabs button { flex: 1; font: inherit; font-weight: 700; font-size: 15px; min-height: 44px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 11px; cursor: pointer; }
  .dk-tabs button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
  .dk-tabs .dk-tab-pdf { flex: .8; background: var(--ok); color: #fff; border-color: var(--ok); }
  .dk-grid { grid-template-columns: minmax(0, 1fr); }
  .dk-view { position: static; max-height: none; overflow: visible; margin: 0 -10px; padding: 10px; }
  .dk[data-view="edit"] .dk-view, .dk[data-view="preview"] .dk-form { display: none; }
}
@media (max-width: 420px) {
  .dk-sec-b { padding: 4px 10px 12px; }
  .dk-card { padding: 4px 9px 10px; }
  .dk-actions .btn.big { flex: 1; }
}
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#dk-print) { display: none !important; }
  #dk-print { display: block !important; }
  #dk-print .pg { break-after: page; page-break-after: always; transform: none !important; margin: 0 !important; box-shadow: none !important; }
  #dk-print .pg:last-child { break-after: auto; page-break-after: auto; }
}
/* ==DKCSS-END== */

/* symbol picker + extra rows */
.bd-syms { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.bd-syms button { font: inherit; font-size: 15px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 6px 13px; cursor: pointer; min-height: 40px; }
.bd-syms button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.bd-show { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.dk-sec > summary .bd-show + ::after { display: none; }
.bd-extra { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bd-xrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 36px; gap: 6px; align-items: center; }
.bd-extra > .btn { align-self: flex-start; }
.bd-ph { width: 84px; height: 112px; }

/* thumbnails */
.bth-royal { background: #fffaf0; box-shadow: inset 0 0 0 3px #fffaf0, inset 0 0 0 5px #7a1b1b; }
.bth-floral { background: #fff6f8; box-shadow: inset 0 0 0 3px #fff6f8, inset 0 0 0 5px #f5a3be; }
.bth-gold { box-shadow: inset 0 0 0 5px #c9a227; }
.bth-peacock { background: #f4fbf8; box-shadow: inset 0 0 0 3px #f4fbf8, inset 0 0 0 5px #0b5d57; }
.bth-simple { box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #93a5e6; }
.th[class*="bth-"] i:nth-child(1) { left: 30%; top: 10px; width: 40%; height: 5px; background: #8a6a14; }
.bth-royal i:nth-child(1) { background: #7a1b1b !important; }
.bth-floral i:nth-child(1) { background: #b0275a !important; }
.bth-peacock i:nth-child(1) { background: #0b5d57 !important; }
.bth-simple i:nth-child(1) { background: #1d4ed8 !important; }
.th[class*="bth-"] i:nth-child(2) { left: 18%; top: 24px; width: 40%; }
.th[class*="bth-"] i:nth-child(3) { left: 18%; top: 32px; width: 34%; }
.th[class*="bth-"] i:nth-child(4) { left: 64%; top: 22px; width: 18%; height: 18px; background: #d6dae3; }

/* ===== biodata page (always light paper) ===== */
.pg { position: relative; overflow: hidden; background: #fff; color: #2a2522; font-size: var(--fs); line-height: 1.45; text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; color-scheme: light; box-sizing: border-box; }
.pg *, .pg *::before, .pg *::after { box-sizing: border-box; }
.pg-in { position: relative; height: 100%; display: flex; flex-direction: column; }
.pg-cols { display: flex; flex: 1 1 0; min-height: 0; }
.pg-col { min-width: 0; flex: 1 1 0; min-height: 0; }
.bs { --p: #7a1b1b; --g: #c8962e; --bg: #fffaf0; --soft: #f6e7c8; background: var(--bg);
  font-family: Georgia, 'Noto Serif', 'Nirmala UI', 'Noto Sans Devanagari', 'Mangal', serif; }
.bs.lang-hi { font-family: 'Nirmala UI', 'Noto Sans Devanagari', 'Mangal', 'Noto Serif', Georgia, sans-serif; }
.bs h1, .bs h2, .bs p { margin: 0; }
.bs .pg-in { padding: 60px 70px 58px; }
.bs .b-frame { position: absolute; inset: 18px; border: 2px solid var(--p); pointer-events: none; }
.bs .b-frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--g); }
.bs .b-c { position: absolute; width: 34px; height: 34px; display: grid; place-items: center; font-style: normal; color: var(--g); font-size: 26px; line-height: 1; background: var(--bg); }
.bs .b-c.tl { left: -17px; top: -17px; } .bs .b-c.tr { right: -17px; top: -17px; } .bs .b-c.bl { left: -17px; bottom: -17px; } .bs .b-c.br { right: -17px; bottom: -17px; }
.bs .b-head { text-align: center; margin-bottom: 6px; }
.bs .b-sym { font-size: 3em; line-height: 1.1; color: var(--p); font-family: 'Nirmala UI', 'Noto Sans Devanagari', 'Segoe UI Symbol', 'Noto Sans Symbols', 'Noto Sans Symbols2', serif; }
.bs .b-heading { color: var(--p); font-size: 1.02em; letter-spacing: .04em; margin-top: 2px; font-weight: 600; }
.bs .b-title { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; font-size: 2em; font-weight: 700; color: var(--p); letter-spacing: .12em; text-transform: uppercase; }
.bs.lang-hi .b-title { letter-spacing: .02em; }
.bs .b-title::before, .bs .b-title::after { content: ""; height: 2px; flex: 0 1 90px; background: var(--g); }
.bs .b-h { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; font-size: 1.08em; font-weight: 700; color: var(--p); letter-spacing: .06em; text-transform: uppercase; }
.bs.lang-hi .b-h { letter-spacing: 0; }
.bs .b-h::before, .bs .b-h::after { content: ""; flex: 1; height: 1px; background: var(--g); }
.bs .b-h span { flex: none; padding: 2px 12px; background: var(--soft); border-radius: 99px; }
.bs .b-row { display: grid; grid-template-columns: 13em 14px 1fr; padding: .2em 0; }
.bs .b-l { font-weight: 600; color: #4a3f39; }
.bs .b-c2 { color: var(--g); font-weight: 700; }
.bs .b-v { color: #1f1a17; overflow-wrap: anywhere; }
.bs .b-personal { display: flex; gap: 22px; align-items: flex-start; }
.bs .b-rows { flex: 1; min-width: 0; }
.bs .has-photo .b-row { grid-template-columns: 13em 14px 1fr; }
.bs .b-photo { width: 150px; height: 200px; object-fit: cover; flex: none; border: 3px solid #fff; outline: 2px solid var(--g); box-shadow: 0 2px 8px rgba(0,0,0,.15); margin-top: 4px; }
.bs .b-p { text-align: center; font-style: italic; color: #3a312c; padding: 0 20px; }

/* Floral: rose, dotted frame */
.bt-floral { --p: #a8204f; --g: #e98aac; --bg: #fff6f8; --soft: #fde3ec; }
.bt-floral .b-frame { border: 5px dotted var(--g); border-radius: 22px; }
.bt-floral .b-frame::before { border-color: var(--p); border-radius: 16px; inset: 7px; }
.bt-floral .b-c { color: var(--p); font-size: 32px; background: var(--bg); border-radius: 50%; }
.bt-floral .b-photo { border-radius: 14px; outline-offset: 0; }

/* Gold frame: patterned border */
.bt-gold { --p: #6f5310; --g: #c9a227; --bg: #fffdf6; --soft: #f7edc8; }
.bt-gold .b-frame { inset: 16px; border: 8px solid #c9a227; }
.bt-gold .b-frame::after { content: ""; position: absolute; inset: -14px; border: 2px solid #8a6a14; }
.bt-gold .b-frame::before { inset: 4px; border: 2px solid var(--p); }
.bt-gold .b-frame2 { position: absolute; inset: 11px; border: 1px dashed var(--g); }
.bt-gold .pg-in { padding: 66px 76px 62px; }

/* Peacock: teal with gold, mandala corners */
.bt-peacock { --p: #0b5d57; --g: #c7962a; --bg: #f3faf7; --soft: #d9efe8; }
.bt-peacock .b-frame { border: 3px solid var(--p); border-radius: 4px; }
.bt-peacock .b-frame::before { border: 1px solid var(--g); inset: 6px; }
.bt-peacock .b-c { width: 72px; height: 72px; background: none; border-top: 0; border-left: 0; border-right: 2px solid var(--p); border-bottom: 2px solid var(--p); border-radius: 0 0 100% 0; font-size: 0; display: block; }
.bt-peacock .b-c::before { content: ""; position: absolute; left: 0; top: 0; width: 50px; height: 50px; border-right: 2px solid var(--g); border-bottom: 2px solid var(--g); border-radius: 0 0 100% 0; }
.bt-peacock .b-c::after { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--p); border-radius: 0 0 100% 0; }
.bt-peacock .b-c.tl { left: 0; top: 0; } .bt-peacock .b-c.tr { left: auto; right: 0; top: 0; transform: scaleX(-1); }
.bt-peacock .b-c.bl { left: 0; top: auto; bottom: 0; transform: scaleY(-1); } .bt-peacock .b-c.br { left: auto; top: auto; right: 0; bottom: 0; transform: scale(-1, -1); }
.bt-peacock .b-h span { background: var(--p); color: #fff; }

/* Simple: clean modern blue */
.bt-simple { --p: #1e3a8a; --g: #93a5e6; --bg: #ffffff; --soft: #eef2ff; font-family: 'Segoe UI', Roboto, 'Nirmala UI', 'Noto Sans Devanagari', Arial, sans-serif; }
.bt-simple .b-frame { border: 1px solid var(--g); inset: 20px; }
.bt-simple .b-frame::before { display: none; }
.bt-simple .b-title { letter-spacing: .06em; font-size: 1.8em; }
.bt-simple .b-title::before, .bt-simple .b-title::after { display: none; }
.bt-simple .b-h { justify-content: flex-start; border-bottom: 2px solid var(--p); padding-bottom: 3px; }
.bt-simple .b-h::before, .bt-simple .b-h::after { display: none; }
.bt-simple .b-h span { background: none; padding: 0; }
.bt-simple .b-photo { outline: 1px solid var(--g); border: 0; box-shadow: none; }
.bt-peacock .pg-in { padding: 60px 84px 74px; }
