/* Gift certificate pages */
.gift-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gift-plans button { text-align: left; font: inherit; cursor: pointer; border-width: 2px; }
.gift-plans button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(166, 61, 42, .15); }
.gift-plans b { font-family: Fraunces, serif; font-size: 22px; display: block; }
.gift-plans .p { font-family: Fraunces, serif; font-size: 30px; font-weight: 700; }
.gift-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
@media (max-width: 820px) { .gift-grid, .gift-plans { grid-template-columns: minmax(0, 1fr); } }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.seg input { width: auto; margin: 0; }

/* ---------- The certificate (preview, thank-you page and print are the same element) ---------- */
.cert { --red: #A63D2A; --ink: #2B2118; --cream: #FFFCF4; --rule: #9FB7CF; --gold: #C9A97A;
  font-family: Atkinson Hyperlegible, system-ui, sans-serif; color: var(--ink); }
.cert .eyebrow { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 15px; letter-spacing: .28em; text-transform: uppercase; color: var(--red); }
.cert .eyebrow.sm { font-size: 12px; }
.cert .to { font-family: Caveat, cursive; font-weight: 600; font-size: 64px; line-height: 1; margin: 4px 0 2px; overflow-wrap: anywhere; }
.cert .to.s { font-size: 50px; } .cert .to.xs { font-size: 40px; }
.cert .memory { font-family: Fraunces, Georgia, serif; font-style: italic; font-size: 17px; color: #3F5248; margin: 2px 0 4px; }
.cert .what { margin: 6px 0 0; max-width: 560px; font-size: 17px; line-height: 1.45; }
.cert blockquote { font-family: Caveat, cursive; font-size: 30px; line-height: 1.2; margin: 14px 0 4px; max-width: 600px; overflow-wrap: anywhere; }
.cert blockquote.s { font-size: 24px; } .cert blockquote.xs { font-size: 19px; }
.cert .from { font-family: Fraunces, Georgia, serif; font-size: 16px; margin-top: 4px; }
.cert .from span { font-family: Caveat, cursive; font-size: 30px; }
.cert .codebox { display: flex; gap: 18px; align-items: center; justify-content: center; }
.cert .code .label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #5C4B3D; margin-bottom: 4px; }
.cert code { display: inline-block; font-family: "Courier New", ui-monospace, monospace; font-size: 30px; font-weight: 700; letter-spacing: .08em;
  padding: 8px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; color: #000; }
.cert .qr svg { width: 112px; height: 112px; display: block; }
.cert .qr-empty { width: 112px; height: 112px; border: 2px dashed #CBBFAE; border-radius: 6px; }
.cert .how { font-size: 14px; color: #4A3B30; margin: 8px 0 0; }
.cert .site { font-size: 12px; letter-spacing: .12em; color: #5C4B3D; }
/* The red ribbon banner across the top, like a label on the recipe box */
.cert .cert-banner { position: relative; background: var(--red); color: #fff; text-align: center; padding: 10px 24px; margin: 0 auto; width: max-content; max-width: 90%;
  font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 24px; letter-spacing: .04em; }
.cert .cert-banner::before, .cert .cert-banner::after { content: ""; position: absolute; top: 8px; border: 22px solid #84301F; z-index: -1; }
.cert .cert-banner::before { left: -30px; border-left-color: transparent; } .cert .cert-banner::after { right: -30px; border-right-color: transparent; }
.cert .cert-banner span { position: relative; }
.cert-orn { display: flex; align-items: center; gap: 10px; color: var(--gold); margin: 6px 0; } .cert-orn i { width: 60px; height: 1px; background: var(--gold); } .cert-orn b { font-weight: 400; }

/* Full page: letter landscape. An index card: a red top rule and faint blue lines behind the note. */
.cert.full { position: relative; isolation: isolate; background: var(--cream); border: 2px solid var(--gold); border-radius: 6px; padding: 34px 54px 22px;
  aspect-ratio: 11 / 8.5; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  box-shadow: 0 18px 40px rgba(60, 40, 20, .12); overflow: hidden;
  background-image: linear-gradient(var(--red), var(--red)), repeating-linear-gradient(to bottom, transparent 0 33px, rgba(159, 183, 207, .45) 33px 34px);
  background-size: 100% 2px, 100% 100%; background-position: 0 104px, 0 104px; background-repeat: no-repeat, no-repeat; }
.cert.full::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201, 169, 122, .7); border-radius: 3px; pointer-events: none; }
.cert.full .cert-body { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.cert.full .cert-foot { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.cert-fit { width: 100%; } .cert-fit > .cert { width: 1000px; }

/* Folded card: two letter-landscape sheets (outside, inside), each split into two 5.5 × 8.5 panels. */
.cert.fold { display: grid; gap: 18px; }
.cert.fold .sheet { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 11 / 8.5; background: #fff; border: 1px solid #DDD3C3; box-shadow: 0 10px 26px rgba(60, 40, 20, .10); position: relative; }
.cert.fold .sheet::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed #C8C0B4; } /* fold guide */
.cert.fold .panel { position: relative; isolation: isolate; padding: 7% 8%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.cert.fold .front { background: var(--cream); justify-content: flex-start; padding-top: 10%; }
.cert.fold .front::after { content: ""; position: absolute; inset: 12px; border: 1px solid var(--gold); pointer-events: none; }
.cert.fold .front .cert-banner { font-size: 20px; }
.cert.fold .front-body { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; width: 100%; }
.cert.fold .card-lines { width: 78%; height: 1.6in; margin-top: 22px; border: 1px solid #D9CDB8; border-top: 3px solid var(--red); background-color: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0 23px, rgba(120, 150, 180, .55) 23px 24px); background-position: 0 6px;
  box-shadow: 3px 4px 0 rgba(201, 169, 122, .35); transform: rotate(-1.5deg); }
.cert.fold .back-mark { margin-top: auto; color: #5C4B3D; } .cert.fold .back { justify-content: flex-end; }
.cert.fold .brand-sm { font-family: Fraunces, Georgia, serif; font-weight: 700; color: var(--red); font-size: 16px; }
.cert.fold .back-mark p { font-size: 12px; margin: 4px 0; }
.cert.fold .note-body, .cert.fold .gift-body { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cert.fold .gift-body .codebox { flex-direction: column; gap: 10px; margin-top: 8px; }
.cert.fold .gift-body code { font-size: 24px; }
.cert.fold .to { font-size: 52px; } .cert.fold .to.s { font-size: 42px; } .cert.fold .to.xs { font-size: 34px; }
.cert.fold blockquote { font-size: 28px; } .cert.fold blockquote.s { font-size: 22px; } .cert.fold blockquote.xs { font-size: 18px; }
.fold-tip { max-width: 640px; margin: 10px auto 0; }

/* Quieter sympathy design: soft gray-green, no red banner, no festive ornament */
.cert.v-sympathy { --red: #5E7468; --gold: #A9B5AC; --cream: #FAFBF8; }
.cert.v-sympathy .cert-banner { background: transparent; color: #3F5248; border-top: 1px solid #A9B5AC; border-bottom: 1px solid #A9B5AC; font-weight: 600; }
.cert.v-sympathy .cert-banner::before, .cert.v-sympathy .cert-banner::after { display: none; }
.cert.v-sympathy .cert-orn b { display: none; }
.cert.v-wedding { --red: #B0707A; --gold: #D8C3A5; --cream: #FFFDFA; }
.cert.v-mothers_day { --red: #B5536C; --gold: #D9B3A0; }

.cert-actions { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.cert-actions .fmt { gap: 6px; }
.cert-actions .fmt button[aria-pressed="true"] { background: var(--ink, #2B2118); color: #fff; border-color: var(--ink, #2B2118); }

@media print {
  header.top, .cert-actions, .no-print { display: none !important; }
  html, body { background: #fff !important; } main.wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .cert { -webkit-print-color-adjust: exact; print-color-adjust: exact; zoom: 1 !important; }
  .cert-fit > .cert { width: auto; }
  body[data-format="full"] .cert.full { box-shadow: none; width: 10.2in; height: 7.7in; aspect-ratio: auto; margin: .4in auto 0; break-inside: avoid; }
  .cert.fold { display: block; }
  .cert.fold .sheet { width: 11in; height: 8.5in; aspect-ratio: auto; border: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .cert.fold .sheet:last-child { break-after: auto; page-break-after: auto; }
  .cert.fold .sheet::after { border-left-color: #DDD; }
}
@page { size: letter landscape; margin: 0; }
