/* Instant Cards editor (/cards/). Page shell comes from /site.css (m-* classes). */
.cd-hero .cd-fan { position: relative; height: 430px; }
.cd-fan .card { position: absolute; top: 20px; width: 220px; box-shadow: 0 22px 50px rgba(0,0,0,.35); }
.cd-fan .card:nth-child(1) { left: 6%; transform: rotate(-8deg); }
.cd-fan .card:nth-child(2) { left: 50%; margin-left: -110px; top: 0; z-index: 2; }
.cd-fan .card:nth-child(3) { right: 6%; transform: rotate(8deg); }
.cd-go { display: inline-flex; align-items: center; justify-content: center; background: var(--gold-lt); color: var(--deep); font: 600 16px Jost, sans-serif; padding: 14px 26px; border-radius: 999px; text-decoration: none; }
.cd-filter { display: flex; gap: 8px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.picker { display: flex; justify-content: safe center; gap: 16px; overflow-x: auto; padding: 18px 2px 10px; scroll-snap-type: x mandatory; }
.pick { flex: none; width: 128px; cursor: pointer; text-align: center; font-size: 14px; scroll-snap-align: start; }
.pick .th { width: 128px; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 6px 16px rgba(58,20,24,.14); position: relative; }
.pick .th em { position: absolute; top: 6px; right: 6px; z-index: 3; font: 600 10px Jost; letter-spacing: .08em; background: var(--maroon); color: #fff7ea; padding: 3px 7px; border-radius: 999px; font-style: normal; }
.pick.on .th { outline-color: var(--maroon); }
.pick b { display: block; margin-top: 8px; font-weight: 600; } .pick i { color: #6b4a4e; font-style: normal; font-size: 12.5px; }
.cd-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; margin-top: 26px; }
.cd-form { background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 0 0 1px #f0dcc4; }
.cd-form h3 { font: 600 22px 'Playfair Display', serif; color: var(--ink); }
.cd-form .m-k { margin: 20px 0 2px; }
.cd-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cd-form label { display: block; font-size: 12.5px; color: #6b4a4e; margin: 10px 0 4px; }
.cd-form input, .cd-form textarea { width: 100%; font: 15px Jost, sans-serif; padding: 10px 12px; border: 1px solid #ecd9bd; border-radius: 10px; background: var(--cream); color: var(--ink); }
.cd-form input:focus, .cd-form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.cd-chk { display: flex !important; gap: 8px; align-items: center; font-size: 14px !important; color: var(--ink) !important; margin-top: 14px !important; } .cd-chk input { width: auto; }
.cd-ev { border: 1px dashed #ecd9bd; border-radius: 12px; padding: 4px 12px 12px; margin-top: 10px; position: relative; }
.cd-ev .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #6b4a4e; cursor: pointer; font: 500 13px Jost; }
.cd-add { margin-top: 10px; background: none; border: 1px solid var(--maroon); color: var(--maroon); border-radius: 999px; padding: 8px 16px; font: 500 14px Jost; cursor: pointer; }
.cd-pay { margin-top: 24px; border-top: 1px dashed #ecd9bd; padding-top: 20px; }
.cd-pay .amt { font: 600 38px 'Playfair Display', serif; color: var(--maroon); line-height: 1; }
.cd-pay .amt span { font: 400 14px Jost; color: #6b4a4e; margin-left: 8px; }
.cd-pay ol { margin: 12px 0 16px 18px; color: #6b4a4e; font-size: 14.5px; }
.cd-btns { display: flex; gap: 10px; flex-wrap: wrap; } .cd-btns > * { flex: 1 1 170px; }
.cd-upi { display: inline-flex; align-items: center; justify-content: center; background: var(--maroon); color: #fff7ea; font: 600 16px Jost; padding: 14px 26px; border-radius: 999px; text-decoration: none; }
.cd-qr { display: none; margin-top: 16px; align-items: center; gap: 14px; font-size: 13.5px; color: #6b4a4e; }
@media (hover: hover) and (pointer: fine) { .cd-qr { display: flex; } }
.cd-qr #qr { background: #fff; padding: 8px; border-radius: 8px; box-shadow: 0 0 0 1px #f0dcc4; }
.cd-prev { position: static; } /* desktop: all pages stacked; they scroll with the page (inner scroll box did not work for the owner, 15 Nov) */
.cd-prev .card { width: 380px; }
#more .card { margin-top: 14px; }
@media (min-width: 881px) { .cd-pages { display: none !important; } }
@media (max-width: 880px) { #more { display: none; } }
.cd-pages { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.cd-pages button { border: 1px solid var(--maroon); background: none; color: var(--maroon); border-radius: 999px; padding: 6px 14px; font: 500 13px Jost; cursor: pointer; }
.cd-pages button.on { background: var(--maroon); color: #fff7ea; }
.cd-prev p { font-size: 13px; color: #6b4a4e; text-align: center; margin-top: 10px; }
.cd-owner { display: none; background: #fff6d8; border-radius: 16px; padding: 18px 20px; margin-top: 22px; box-shadow: 0 0 0 1px var(--gold); }
.cd-owner textarea { width: 100%; margin: 8px 0 10px; font: 13.5px Jost; padding: 10px; border-radius: 10px; border: 1px solid #ecd9bd; }
#print { display: none; }

/* the card itself: text sized in cqw so it scales to any width */
.card { position: relative; width: 400px; aspect-ratio: 9/16; overflow: hidden; border-radius: 6px; box-shadow: 0 18px 50px rgba(58,20,24,.22); background: #fbf3e8; container-type: inline-size; }
.card .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .layer { position: absolute; }
.card .txt { position: absolute; text-align: center; color: var(--c, #6e0f1f); }
.t-small { font: 500 calc(2.6cqw * var(--s, 1))/1.5 Jost, sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.t-small.t-in { letter-spacing: 0; font-size: calc(3.4cqw * var(--s, 1)); } /* Indic scripts: spacing breaks conjuncts */
.t-names { font: 500 italic calc(10cqw * var(--s, 1))/1.05 'Cormorant Garamond', serif; margin: calc(2cqw * var(--s, 1)) 0; }
.t-amp { font: italic calc(6.5cqw * var(--s, 1)) 'Playfair Display', serif; color: var(--gold); display: block; }
.t-date { font: 600 calc(3.6cqw * var(--s, 1)) 'Cormorant Garamond', serif; letter-spacing: .1em; text-transform: uppercase; margin-top: calc(2.5cqw * var(--s, 1)); }
.t-body { font: 500 calc(3.4cqw * var(--s, 1))/1.45 'Cormorant Garamond', serif; text-wrap: balance; }
.t-head { font: 500 italic calc(7.5cqw * var(--s, 1))/1.1 'Cormorant Garamond', serif; margin-bottom: calc(2cqw * var(--s, 1)); }
.t-ev { margin-top: calc(3.2cqw * var(--s, 1)); } .t-ev b { display: block; font: 600 calc(4.4cqw * var(--s, 1)) 'Cormorant Garamond', serif; letter-spacing: .08em; text-transform: uppercase; }
.card .ganesh { width: calc(11cqw * var(--s, 1)); margin: 0 auto calc(1.5cqw * var(--s, 1)); display: block; filter: sepia(1) saturate(2.5) brightness(.62); }
.card .ganesh.light { filter: sepia(1) saturate(1.4) brightness(1.9); }
.rule { width: calc(15cqw * var(--s, 1)); height: 1px; background: var(--gold); margin: calc(2.5cqw * var(--s, 1)) auto; }
.wm { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; overflow: hidden; z-index: 5; }
.wm span { transform: rotate(-35deg); white-space: nowrap; font: 500 3.4cqw Jost, sans-serif; letter-spacing: .25em; color: rgba(255,255,255,.4); text-shadow: 0 0 2px rgba(0,0,0,.12); line-height: 9; text-align: center; }

@media (max-width: 880px) {
  .cd-hero .cd-fan { height: 330px; } .cd-fan .card { width: 160px; } .cd-fan .card:nth-child(2) { margin-left: -80px; }
  .cd-grid { grid-template-columns: 1fr; } .cd-prev { position: static; order: -1; } .cd-prev .card { width: min(100%, 360px); margin: 0 auto; }
}
@page { size: 108mm 192mm; margin: 0; }
@media print {
  body > *:not(#print) { display: none !important; }
  #print { display: block !important; }
  #print .card { width: 108mm !important; border-radius: 0; box-shadow: none; break-after: page; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

.cd-chk[hidden] { display: none !important; }

/* mobile fix (15 Nov): grid cells could not shrink below the date picker's built-in width, so Date overlapped Time on phones */
.cd-2 > div { min-width: 0; }
.cd-form input, .cd-form textarea { min-width: 0; max-width: 100%; font-size: 16px; } /* 16px also stops iPhone zooming in on tap */
.cd-form input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-height: 44px; text-align: left; }
.cd-form input[type=date]::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 380px) { .cd-2 { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 560px) { .cd-ev .cd-2 { grid-template-columns: 1fr; gap: 0; } .cd-form input { padding: 10px 10px; } }
