/*
 * Additions for the Laravel build: the newsletter honeypot and status, and a few utilities.
 * The checkout page has its own stylesheet (checkout.css).
 * Colours and radii follow the design tokens in theme.css.
 */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Footer newsletter status */
.client-revision .footer-top .footer-signup-note.is-error { color: #ffd3c8; }

/* Thank-you / monthly-gift cards reuse the hero gift card */
.r-gift-card form { margin-top: 18px; }
.r-gift-card .r-card-facts { margin: 18px 0; }

/* Tighter vertical rhythm between page sections (top/bottom only; side padding unchanged).
 * Was: sections 42–82px, dark inline sections 40–60px, prayer bar 34px, section heads 30px below. */
.design-edition .r-section { padding-top: clamp(22px, 2.8vw, 38px); padding-bottom: clamp(22px, 2.8vw, 38px); }
.design-edition #page-content > .d-inline-section { padding-top: 32px; padding-bottom: 32px; }
.design-edition .r-prayer { padding-top: 20px; padding-bottom: 20px; }
.design-edition .r-section-head { margin-bottom: 18px; }
.design-edition #page-content > section.d-ways-to-give h2 { margin-bottom: 24px; }
.design-edition #page-content > section > p.d-reels-intro { margin-bottom: 24px; }

@media (max-width: 1000px) {
  .design-edition #page-content > .d-inline-section { padding-top: 28px; padding-bottom: 28px; }
}
@media (max-width: 700px) {
  .design-edition .r-section { padding-top: 24px; padding-bottom: 24px; }
  .design-edition #page-content > .d-inline-section { padding-top: 24px; padding-bottom: 24px; }
}

/* Footer credit: "Designed & Managed by" + logo pill */
.footer-credit { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mega-footer .footer-bottom a.footer-credit-badge,
.footer-credit-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); text-decoration: none; transition: background-color .2s ease; }
.footer-credit-badge img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.footer-credit-badge strong { color: #f5a524; font-weight: 700; letter-spacing: .01em; }
.mega-footer .footer-bottom a.footer-credit-badge:hover,
.footer-credit-badge:hover,
.footer-credit-badge:focus-visible { background: rgba(0, 0, 0, .42); }

/* Inner-page heroes: the page photo fills the whole hero behind a dark overlay (like the giving
 * heroes) instead of sitting in a framed box on the right. Text stays on the left.
 * The Imam page has no hero photo of its own: the community photo is its full-width backdrop. */
.design-edition .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain) {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.design-edition:not(.page-imam) .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain) .r-hero-media {
  position: absolute; inset: 0; z-index: -2;
  width: auto; height: 100%; min-height: 0;
  grid-column: auto; grid-row: auto; order: initial; align-self: auto;
  border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: none;
}
.design-edition:not(.page-imam) .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain) .r-hero-media img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  transform: none; transition: none;
}
.design-edition .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain)::after {
  background: linear-gradient(90deg, #0b3029f2 0%, #103a30d1 55%, #082d29a8 100%);
}
.design-edition.page-imam .r-hero:not(.r-hero-plain) {
  background: #123c2f url('/assets/client/community-gathering.jpg') center 40% / cover no-repeat;
}
@media (max-width: 700px) {
  .design-edition .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain) { min-height: 360px; justify-content: center; }
  .design-edition .r-hero:not(.r-home-hero):not(.r-donation-hero):not(.r-hero-plain)::after { background: linear-gradient(180deg, #0b3029e6, #103a30d9); }
}

/* Desktop heroes: fill the window to just above the fold (640–840px). No visible breadcrumb above
 * them, so they start right under the header and take that space too. */
@media (min-width: 1001px) {
  .design-edition .r-hero:not(.r-home-hero):not(.r-hero-plain),
  .design-edition .r-hero.r-home-hero:not(.r-hero-plain) { min-height: clamp(640px, calc(100vh - 192px), 840px); }
}

/* Footer legal line: Manrope turns "(c)" into ©; keep "501(c)(3)" as typed. */
.footer-bottom .footer-legal { font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0, "dlig" 0; }

/* One content width for the whole site: top bar, header, heroes, every section, fact bar and
 * footer share the same side spacing, so their content starts and ends on the same lines.
 * Equal on both sides; 7.5% of the window on desktop, 5% on tablets, 6% on phones. */
:root { --mdi-gutter: max(24px, 7.5vw); }
@media (max-width: 1000px) { :root { --mdi-gutter: 5vw; } }
@media (max-width: 700px)  { :root { --mdi-gutter: 6vw; } }

.client-revision .topbar,
.client-revision .header,
.design-edition .r-hero,
.design-edition .r-hero.r-donation-hero,
.design-edition .r-hero:not(.r-home-hero):not(.r-hero-plain),
.design-edition .r-prayer,
.design-edition .r-section,
.design-edition .r-form-section,
.design-edition #page-content > .d-inline-section,
.design-edition .r-fact-bar,
.client-revision .mega-footer {
  padding-left: var(--mdi-gutter) !important;
  padding-right: var(--mdi-gutter) !important;
}

/* Events page cards: picture on top, details below (3 across on desktop). */
.design-edition #page-content .r-event-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 32px 0 0; align-items: stretch; }
.design-edition #page-content .r-event-tile {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fffefa; color: #173c30;
  border: 1px solid #d5b77c; border-radius: 14px; box-shadow: 0 8px 30px #001b1812;
}
.r-event-media { position: relative; display: block; aspect-ratio: 949 / 678; background: #123c2f; overflow: hidden; text-decoration: none; }
.r-event-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* No picture (special events, programs without a banner): plain green panel with the date badge. */
.r-event-media:not(:has(img)) { display: grid; place-items: center; padding: 56px 28px 28px; background: radial-gradient(ellipse at 20% 10%, #2c5a47, transparent 60%), #123c2f; }
.r-event-badge { position: absolute; top: 16px; left: 16px; z-index: 1; padding: 8px 14px; background: #123c2f; color: #fff9ec; border-radius: 3px; font: 800 .74rem/1 Manrope, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.r-event-fallback { position: relative; color: #e8d3a0; font: 600 clamp(1.5rem, 2.2vw, 2rem)/1.15 Cormorant, Georgia, serif; text-align: center; }
.r-event-body { display: flex; flex-direction: column; flex: 1; padding: 26px 26px 28px; }
.design-edition #page-content .r-event-tile .eyebrow { color: #7a6a3c; margin: 0 0 6px; }
.design-edition #page-content .r-event-tile h3 { font-size: 1.8rem; line-height: 1.15; margin: 0 0 10px; }
.design-edition #page-content .r-event-tile h3 a { color: #173c30; text-decoration: none; }
.design-edition #page-content .r-event-tile h3 a:hover { text-decoration: underline; }
.design-edition #page-content .r-event-tile p { color: #3f5a4c; font-size: .98rem; line-height: 1.55; margin: 0 0 12px; }
.design-edition #page-content .r-event-tile .r-event-when { color: #173c30; font-weight: 700; font-size: .92rem; }
.design-edition #page-content .r-event-tile .r-note { color: #6b7d70; font-size: .82rem; }
.r-event-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; margin-top: auto; padding-top: 10px; }
.design-edition #page-content .r-event-tile .r-text-link { font-weight: 700; font-size: 1rem; color: #123c2f; }
.r-event-ics { font-size: .85rem; color: #3f5a4c; }
@media (max-width: 1100px) { .design-edition #page-content .r-event-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 700px)  { .design-edition #page-content .r-event-tiles { grid-template-columns: 1fr; } .r-event-body { padding: 22px 20px 24px; } }

/* Sticky header: same width as the normal header (and the page content), so its logo and menu
 * stay on the same lines when it sticks. Was a floating, inset, rounded bar. */
.design-edition .header.raised {
  top: 0; width: 100%; margin-inline: 0;
  border-width: 0 0 1px; border-radius: 0;
}

/* Home "Life at MDI": the calendar link under the cards gets some room. */
.design-edition .d-life .r-event-tiles + .r-text-link { display: inline-block; margin-top: 28px; }

/* Legal text pages: keep "501(c)(3)" as typed (the body font turns "(c)" into ©), and use lining
 * figures in numbered headings ("1.", "2." …) instead of the old-style ones. */
.r-prose { font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0, "dlig" 0; }
.r-prose h2 { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* Donation panel: "100% Secure" with a lock (home), and a slightly smaller panel everywhere
 * (home hero, giving pages, quick-gift card). Phones keep full-width panels and 44px touch targets. */
.d-gift-secure { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .92rem; color: #123c2f; }
.d-gift-secure svg { width: 17px; height: 17px; flex: none; }
@media (min-width: 761px) {
  .design-edition .r-hero-gift, .design-edition .d-hero-gift { width: 94%; justify-self: end; }
  .design-edition .r-hero-gift { padding: 26px; }
  .design-edition .d-hero-gift { padding: 22px; }
  .design-edition .r-hero-gift h2 { font-size: 1.75rem; }
  .design-edition .d-hero-gift h2 { font-size: 1.85rem; margin: 8px 0 16px; }
  .client-revision .r-hero-gift .mdi-gift-form, .client-revision .d-hero-gift .mdi-gift-form { gap: 12px; }
  .client-revision .mdi-gift-form .gift-frequency span { min-height: 34px; padding-block: 0; display: grid; place-items: center; }
  .client-revision .mdi-gift-form .gift-presets button { min-height: 41px; padding-block: 0; display: grid; place-items: center; }
  .client-revision .mdi-gift-form .gift-input input { min-height: 39px; }
  .client-revision .mdi-gift-form select { min-height: 38px; padding-block: 7px; }
  .client-revision .mdi-gift-form .gift-review { min-height: 41px; }
  .r-hero-gift .d-gift-links { margin-top: 16px; }
  .donate-popover { width: min(335px, calc(100vw - 28px)); padding: 16px; }
  .donate-popover h3 { font-size: 29px; }
}
@media (min-width: 761px) {
  /* Quick-gift card: the cause dropdown gets the wider column so its text is never cut off. */
  .donate-popover .gift-details { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .donate-popover .mdi-gift-form select { padding-inline: 10px; font-size: 13px; }
}

/* Events page, "Our weekly rhythm": the time is the first thing you see. Gold pill + clock, dark
 * text, so it reads on dark and light section backgrounds alike. */
.design-edition #page-content .r-weekly article { padding: 26px 0 24px; }
.design-edition #page-content .r-weekly h3 { margin: 0 0 14px; }
.design-edition #page-content .r-weekly .r-weekly-time {
  display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 9px;
  margin: 0 0 14px; padding: 9px 18px;
  background: #d5b77c; color: #173c30; border-radius: 999px;
  font-size: 1.02rem; font-weight: 800; letter-spacing: .01em; line-height: 1.3;
  box-shadow: 0 4px 14px #00000022;
}
.design-edition #page-content .r-weekly .r-weekly-time::before {
  content: ""; flex: none; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.design-edition #page-content .r-weekly article > span { display: block; font-size: .88rem; opacity: .92; }
@media (max-width: 700px) { .design-edition #page-content .r-weekly .r-weekly-time { font-size: .95rem; padding: 8px 15px; } }

/* Tall photos in the wide frames: show the top of the photo, so heads are never cut off. */
.design-edition .d-feature-art img[data-media-slot="teacher"],
.design-edition .d-feature-art img[data-media-slot="quiet-reflection"],
.design-edition .d-gallery img[data-media-slot="quiet-reflection"],
.design-edition .d-card-photo img[data-media-slot="teacher"],
.design-edition .d-card-photo img[data-media-slot="quiet-reflection"] { object-position: center top; }

/* Photo + caption blocks (program, community and giving pages): the caption is centred under the
 * photo, so the decorative gold frame line never runs through its first letters. */
.design-edition .d-feature-art figcaption { max-width: none; text-align: center; margin-inline: auto; padding-inline: 18px; }

/* One donation panel everywhere. The home hero panel and the giving-page panel share the same
 * look (translucent card, no inner box, same type sizes and spacing), and every gift form ends
 * with the same "100% Secure" + "Privacy policy" row. */
.design-edition .d-hero-gift {
  background: #fbfaf4ed; border: 1px solid #ffffff9c; border-radius: 24px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.client-revision .d-hero-gift .mdi-gift-form { background: transparent; padding: 0; gap: 12px; margin-top: 0; }
.design-edition .r-hero-gift h2, .design-edition .d-hero-gift h2 { font-size: 1.75rem; line-height: 1.15; margin: 10px 0 0; }
.design-edition .r-hero-gift .mdi-gift-form, .design-edition .d-hero-gift .mdi-gift-form { margin-top: 22px; }
.d-gift-links { display: flex; justify-content: flex-start; align-items: center; gap: 10px 20px; flex-wrap: wrap; margin-top: 16px; }
.donate-popover .d-gift-links { margin-top: 12px; }
.d-hero-gift .d-gift-links, .r-hero-gift .d-gift-links { margin-top: 16px; }
@media (min-width: 761px) {
  .design-edition .r-hero-gift, .design-edition .d-hero-gift { padding: 26px; }
}
@media (max-width: 760px) {
  .design-edition .r-hero-gift, .design-edition .d-hero-gift { padding: 22px; border-radius: 20px; }
}
@media (min-width: 761px) {
  /* Same width in the home hero and on the giving pages. */
  .design-edition .r-hero-gift, .design-edition .d-hero-gift { width: 100%; max-width: 450px; justify-self: end; }
}

/* Footer office hours: the times stand out a little (gold, bolder), with a thin gold rule. */
.client-revision .mega-footer .r-hours > div { padding: 4px 0 4px 14px; margin-bottom: 10px; border-left: 2px solid #d5b77c; }
.client-revision .mega-footer .r-hours dt { color: #d7e2d6; font-weight: 500; }
.client-revision .mega-footer .r-hours dd { margin-top: 2px; color: #ecd39b; font-weight: 700; font-size: 1.07em; letter-spacing: .01em; }

/* "100% Secure" a little smaller. */
.d-gift-secure { font-size: .82rem; gap: 6px; }
.d-gift-secure svg { width: 15px; height: 15px; }


/* About the Imam: executive leadership team cards (initials, role, name). */
.d-team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.design-edition #page-content .d-team-card {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px;
  background: #fffefa; color: #173c30; border: 1px solid #d5b77c; border-radius: 14px; box-shadow: 0 8px 30px #001b1812;
}
.d-team-mark { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #123c2f; color: #e8d3a0; font: 600 1.35rem/1 Cormorant, Georgia, serif; letter-spacing: .04em; }
.design-edition #page-content .d-team-card .eyebrow { color: #7a6a3c; margin: 0 0 4px; }
.design-edition #page-content .d-team-card h3 { margin: 0; font-size: 1.5rem; line-height: 1.15; color: #173c30; }
.design-edition #page-content .d-team-card p { margin: 8px 0 0; font-size: .92rem; color: #3f5a4c; }
@media (max-width: 1000px) { .d-team-grid { grid-template-columns: 1fr; } }


/* About MDI menu: two short items stack in one column, in a narrower panel under the menu bar's left edge. */
@media (min-width: 1151px) {
  .design-edition .r-nav-group .r-nav-panel#panel-about { left: var(--about-left, var(--mdi-gutter)); transform: none; width: 540px; grid-template-columns: 245px minmax(0, 1fr); }
  .design-edition #panel-about .d-mega-links { grid-template-columns: 1fr; }
}

/* Events page weekly list: the days, then the time in a pill below them. All pills the same width. */
.design-edition #page-content .r-weekly .r-weekly-days { margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
.design-edition #page-content .r-weekly .r-weekly-time { width: 14.5rem; max-width: 100%; justify-content: center; }

/* Contact form side text: the "Need help? Call …" line is larger and the number stands out. */
.design-edition #page-content .d-form-intro p.d-form-call { font-size: 1.2rem; font-weight: 600; line-height: 1.4; color: #fff9ec; }
.design-edition #page-content .d-form-intro p.d-form-call a { color: #e8d3a0; font-weight: 800; }

/* Footer: four sections (brand, Useful links, Build our future, Stay connected) spread across the
 * full content width, with a clear gap between them; same left and right edges as every other section. */
@media (min-width: 1201px) {
  .client-revision .mega-footer .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.25fr; gap: 64px; }
}
@media (min-width: 761px) and (max-width: 1200px) {
  .client-revision .mega-footer .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
}
/* "Need help? Call …" beside the contact form: larger, number highlighted (beats older small-text rules). */
.d-form-intro p.d-form-call { font-size: 1.2rem !important; font-weight: 600 !important; line-height: 1.4 !important; color: #fff9ec !important; }
.d-form-intro p.d-form-call a { color: #e8d3a0 !important; font-weight: 800 !important; }

/* Contact / application forms: the form card is slightly narrower (desktop), text column a bit wider. */
@media (min-width: 1001px) {
  .design-edition #page-content > .d-inline-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7%; }
}

/* Social icons: floating rail on the right (desktop/tablet); on phones they sit at the left of the top bar instead. */
.topbar-social { display: none; }
@media (max-width: 760px) {
  .topbar-social { display: flex; align-items: center; gap: 4px; }
  .topbar-social a { display: grid; place-items: center; width: 26px; height: 26px; color: #fff; border-radius: 50%; }
  .topbar-social a:hover, .topbar-social a:focus-visible { background: #ffffff26; }
  .topbar-social .social-icon { width: 16px; height: 16px; }
  .topbar .topbar-name { display: none; }
  .social-widget { display: none !important; }
}

/* Phones: the floating Donate pill becomes a full-width strip attached to the bottom of the screen.
 * Tapping it opens the same quick-gift card, just above the strip. */
@media (max-width: 760px) {
  :root { --donate-bar: calc(46px + env(safe-area-inset-bottom)); }
  body { padding-bottom: var(--donate-bar); }
  .donate-widget { left: 0; right: 0; bottom: 0; padding: 0; }
  .donate-widget .donate-float {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: var(--donate-bar); padding: 0 16px env(safe-area-inset-bottom);
    border-radius: 0; border: 0; border-top: 1px solid #b8963f; box-shadow: 0 -6px 22px #00000030;
    font-size: 1rem; font-weight: 800;
  }
  .donate-widget .donate-float > span { position: static; padding: 0; background: none; border: 0; color: inherit; font-size: 1rem; font-weight: 800; }
  .donate-widget .donate-popover { left: 14px; right: 14px; width: auto; bottom: calc(var(--donate-bar) + 10px); max-height: calc(100dvh - var(--donate-bar) - 90px); }
}
/* Phone Donate strip: attached to the very bottom edge (also under the home indicator on iPhones). */
@media (max-width: 760px) {
  .donate-widget { position: fixed; inset: auto 0 0 0; margin: 0; padding: 0; transform: none; }
  .donate-widget .donate-float { margin: 0; }
}

/* Eyebrow labels (the small spaced text above headings) are 2px larger site-wide: 11.04px → 13.04px. */
.client-revision .eyebrow { font-size: calc(.69rem + 2px); }

/* Program cards (photo on top, details below): original photo size; compact text section, desktop and phone. */
.design-edition .d-photo-cards .d-card-body { padding: 16px 18px 18px; }
.design-edition .d-photo-cards .r-card h3 { margin: 4px 0 4px; }
.design-edition .d-photo-cards .d-card-body p { margin: 0 0 6px; line-height: 1.5; }
.design-edition .d-photo-cards .r-card-facts { margin: 6px 0 2px; }
.design-edition .d-photo-cards .r-card-facts > div { padding: 6px 0; }
.design-edition .d-photo-cards .r-card .r-text-link { padding-top: 10px; }
/* Phones and tablets: every program card photo is the same height (tall portrait photos used to make
 * some cards much taller). Cropped toward the top so faces stay in view. */
@media (max-width: 1000px) {
  .design-edition .d-photo-cards .d-card-photo { height: 190px; overflow: hidden; }
  .design-edition .d-photo-cards .d-card-photo img { height: 100%; object-fit: cover; object-position: center 20%; }
}
/* Hero eyebrow (the small label above each page's main heading): 2px larger again, 15.04px. */
.client-revision .r-hero-copy .eyebrow { font-size: calc(.69rem + 4px); }

/* Body text a little heavier site-wide (Manrope 400 reads thin): regular text is now 500 (medium).
 * Headings, labels, buttons and anything already bold keep their own weights. */
body.client-revision { font-weight: 500; }

/* Gift amount buttons: with 5 or 6 preset amounts they all stay on ONE line, in every gift form
 * (home hero, giving pages, floating card, phone strip card). Text shrinks just enough to fit. */
.mdi-gift-form .gift-presets { container-type: inline-size; }
.mdi-gift-form .gift-presets:has(> button:nth-child(5)) {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px;
}
.mdi-gift-form .gift-presets:has(> button:nth-child(5)) > button {
  padding-inline: 0; white-space: nowrap; letter-spacing: -.01em;
  font-size: clamp(10.5px, 4.1cqw, 15px);
}
/* Phones: 5 or 6 gift amounts wrap into 3 per row (2 rows of 3), at full size. */
@media (max-width: 760px) {
  .mdi-gift-form .gift-presets:has(> button:nth-child(5)) {
    grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 8px;
  }
  .mdi-gift-form .gift-presets:has(> button:nth-child(5)) > button { font-size: 15px; letter-spacing: 0; }
}
