/* Give page: unified giving panel (header, photo stage with a swipeable gift card, amount tiles, Tithe.ly form).
   Enqueued only where the .afc-gift block renders (functions.php). give-swipe.js drives --r (0..1, reveal
   progress) and --sw (light sweep strength) on the stage; every moving part is a transform or opacity. */

.afc-gift { --afc-gift-line: #ebe4dc; --afc-gift-ease: cubic-bezier(.22, .8, .24, 1); }

/* ---------- panel */
.afc-gift .afc-gift-panel {
	background: #fff; border: 1px solid rgba(var(--afc-ink-rgb), 0.08); border-radius: 20px; overflow: clip;
	box-shadow: 0 1px 2px rgba(var(--afc-ink-rgb), 0.04), 0 14px 28px -16px rgba(var(--afc-ink-rgb), 0.16), 0 48px 96px -48px rgba(var(--afc-ink-rgb), 0.38);
}
.afc-gift .afc-gift-panel > * { margin-block: 0 !important; }

/* ---------- header */
.afc-gift .afc-gift-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; padding: 1.5rem 1.5rem 1.25rem; }
.afc-gift .afc-gift-head > * { margin: 0 !important; }
.afc-gift .afc-gift-title { grid-column: 1; font-size: 1.5rem !important; line-height: 1.2; letter-spacing: -0.01em; }
.afc-gift .afc-gift-sub { grid-column: 1; margin-top: .35rem !important; font-size: .9rem; line-height: 1.5; }
.afc-gift .afc-gift-secure {
	grid-column: 2; grid-row: 1; align-self: start; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
	padding: .3rem .7rem .3rem .55rem; border-radius: 999px; background: #f5f1eb; color: var(--wp--preset--color--ink-soft);
	font-size: .72rem; letter-spacing: .04em; line-height: 1.4;
}
.afc-gift .afc-gift-secure::before {
	content: ""; width: .8rem; height: .8rem; flex: none;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23768e76' stroke-width='1.6' stroke-linecap='round'><rect x='3' y='7' width='10' height='7' rx='1.8'/><path d='M5.5 7V5a2.5 2.5 0 0 1 5 0v2'/></svg>") center / contain no-repeat;
}

/* ---------- stage */
.afc-gift .afc-gift-stage {
	--r: 0; --sw: 0;
	position: relative; margin: 0 1.5rem !important; aspect-ratio: 2 / 1; border-radius: 14px; overflow: hidden; isolation: isolate;
	background: #1d1612; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.afc-gift .afc-gift-stage > * { margin: 0 !important; }
.afc-gift .afc-gift-photo { position: absolute; inset: 0; }
.afc-gift .afc-gift-photo img, .afc-gift-reveal-in img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.afc-gift.is-ready .afc-gift-photo img { filter: saturate(.12) brightness(.5) contrast(1.06); transform: scale(1.03); }
.afc-gift-reveal { position: absolute; inset: 0; overflow: hidden; transform: translate3d(calc((var(--r) - 1) * 100%), 0, 0); will-change: transform; }
.afc-gift-reveal-in { position: absolute; inset: 0; transform: translate3d(calc((1 - var(--r)) * 100%), 0, 0); will-change: transform; }
.afc-gift-reveal-in img { filter: saturate(1.06) contrast(1.03); transform: scale(1.03); transition: transform 1.6s var(--afc-gift-ease); }
.afc-gift-stage.is-done .afc-gift-reveal-in img { transform: scale(1); }
.afc-gift-reveal-in::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 186, 112, .16), rgba(255, 186, 112, 0) 55%); mix-blend-mode: soft-light; }
.afc-gift-sweep {
	position: absolute; top: 0; bottom: 0; left: 0; width: 34%; pointer-events: none; mix-blend-mode: screen; opacity: var(--sw);
	background: linear-gradient(90deg, rgba(255, 190, 120, 0) 0%, rgba(255, 190, 120, .22) 55%, rgba(255, 224, 180, .6) 86%, rgba(255, 246, 228, .9) 92%, rgba(255, 220, 170, 0) 100%);
	transform: translate3d(calc((var(--r) / .34 - 1) * 100%), 0, 0); will-change: transform, opacity;
}
.afc-gift-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(18, 12, 9, .55) 0%, rgba(18, 12, 9, 0) 38%, rgba(18, 12, 9, 0) 52%, rgba(18, 12, 9, .5) 100%); }
.afc-gift-hint {
	position: absolute; top: 1.15rem; left: 1.25rem; max-width: 62%; margin: 0;
	color: rgba(250, 245, 237, .92); font-size: .95rem; line-height: 1.45; text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
	opacity: calc(1 - var(--r) * 3); transition: opacity .2s;
}
.afc-gift-hint-amt { font-weight: 600; }
.afc-gift-figure {
	position: absolute; top: 1.1rem; left: 1.25rem; display: flex; flex-direction: column; gap: .2rem; color: #fff;
	opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity .35s ease, transform .5s var(--afc-gift-ease); text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.afc-gift-stage.is-done .afc-gift-figure { opacity: 1; transform: none; }
.afc-gift-figure-label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .82); }
.afc-gift-figure-amt { font-family: var(--wp--preset--font-family--serif); font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.afc-gift:not(.is-ready) .afc-gift-reader, .afc-gift:not(.is-ready) .afc-gift-hint { display: none; }

/* ---------- reader + card (sizes in em so the whole unit scales on phones) */
.afc-gift-reader { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; height: 2.5em; font-size: 17px; }
.afc-gift-groove {
	position: absolute; left: .5em; right: .5em; bottom: 2.2em; height: .5em; border-radius: .25em; background: #0b0806;
	box-shadow: inset 0 2px 3px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .1);
}
.afc-gift-card {
	position: absolute; left: 0; bottom: .45em; z-index: 1; width: 14.5em; height: 9.14em; margin: 0; padding: 0; border: 0; border-radius: .8em;
	background: none; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
	transform-origin: 50% 100%; will-change: transform;
}
.afc-gift-card:focus-visible { outline: 2px solid #f3c48f; outline-offset: 4px; }
.afc-gift.is-dragging .afc-gift-card { cursor: grabbing; }
.afc-gift-card-face {
	position: absolute; inset: 0; border-radius: inherit; overflow: hidden; color: rgba(250, 245, 237, .92); text-align: left;
	background:
		radial-gradient(120% 120% at 12% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 46%),
		linear-gradient(135deg, #8a4b34 0%, #5a3122 34%, #2e1c15 70%, #1b120e 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .3), 0 1.4em 2.2em -1em rgba(0, 0, 0, .75);
	transition: box-shadow .25s;
}
.afc-gift.is-dragging .afc-gift-card-face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 3px 6px rgba(0, 0, 0, .3), 0 2em 2.8em -1em rgba(0, 0, 0, .8); }
.afc-gift-card-face::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(118deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 4px); }
.afc-gift-card-face::after {
	content: ""; position: absolute; top: -40%; bottom: -40%; left: -60%; width: 70%;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .2) 46%, rgba(255, 255, 255, .05) 56%, rgba(255, 255, 255, 0) 80%);
	transform: translate3d(calc(var(--r) * 260%), 0, 0) rotate(8deg);
}
.afc-gift-card-brand { position: absolute; top: 1em; left: 1.1em; font-size: .62em; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; }
.afc-gift-card-chip {
	position: absolute; top: 2.85em; left: 1.15em; width: 2.3em; height: 1.75em; border-radius: .32em;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 35' fill='none' stroke='rgba(110,78,30,.55)' stroke-width='1.1'><path d='M0 12h14M0 23h14M32 12h14M32 23h14M14 0v35M32 0v35M14 17.5h18'/><rect x='14' y='7' width='18' height='21' rx='4'/></svg>") center / 100% 100% no-repeat,
		linear-gradient(135deg, #f4e6bb 0%, #d6b46c 38%, #f7ebc8 55%, #b98f48 100%);
	box-shadow: inset 0 0 0 1px rgba(110, 78, 30, .35), 0 1px 1px rgba(0, 0, 0, .25);
}
.afc-gift-card-nfc {
	position: absolute; top: 3.05em; left: 4em; width: 1.1em; height: 1.35em; opacity: .7;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22' fill='none' stroke='%23faf5ed' stroke-width='1.6' stroke-linecap='round'><path d='M3 7.5a5 5 0 0 1 0 7'/><path d='M7 5a9 9 0 0 1 0 12'/><path d='M11 2.5a13 13 0 0 1 0 17'/></svg>") center / contain no-repeat;
}
.afc-gift-card-label { position: absolute; top: 5.4em; right: 1.15em; font-size: .56em; letter-spacing: .24em; text-transform: uppercase; color: rgba(250, 245, 237, .62); }
.afc-gift-card-amt { position: absolute; top: 2.6em; right: .75em; font-family: var(--wp--preset--font-family--serif); font-size: 1.6em; line-height: 1; font-variant-numeric: tabular-nums; }
.afc-gift-lip {
	position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; border-radius: .75em;
	background: linear-gradient(180deg, #3b332d 0%, #221c18 42%, #15110e 100%); border: 1px solid rgba(0, 0, 0, .55);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .6), 0 .75em 1.5em -.6em rgba(0, 0, 0, .7);
}
.afc-gift-lip span { font-size: .6em; letter-spacing: .32em; text-transform: uppercase; color: rgba(250, 245, 237, .5); padding-left: .32em; }
.afc-gift-lip span::after { content: "  →"; letter-spacing: 0; white-space: pre; }
.afc-gift-lip::after {
	content: ""; position: absolute; right: 1em; top: 50%; width: .4em; height: .4em; margin-top: -.2em; border-radius: 50%;
	background: #4a413a; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6); transition: background-color .3s, box-shadow .3s;
}
.afc-gift-stage.is-done .afc-gift-lip::after { background: #f2b877; box-shadow: 0 0 .5em rgba(242, 184, 119, .9), 0 0 1.4em rgba(242, 184, 119, .5); }
@media (prefers-reduced-motion: no-preference) {
	.afc-gift-lip span { background: linear-gradient(90deg, rgba(250,245,237,.35) 0%, rgba(250,245,237,.9) 50%, rgba(250,245,237,.35) 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: afc-gift-shimmer 3s linear infinite; }
}
@keyframes afc-gift-shimmer { to { background-position: -200% 0; } }

/* ---------- amount tiles */
.afc-gift .afc-gift-pick { padding: 1.25rem 1.5rem 0; }
.afc-gift .afc-gift-pick > * { margin-block: 0; }
.afc-gift .afc-gift-pick-label { color: var(--wp--preset--color--ink); font-weight: 600; }
.afc-gift .wp-block-buttons.afc-gift-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.45fr); gap: .625rem; margin-top: .75rem; }
.afc-gift .afc-gift-amounts > .wp-block-button { width: auto; margin: 0; }
.afc-gift .afc-gift-amounts .wp-block-button__link {
	position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 3.5rem; padding: 0 .75rem;
	background: #fff; color: var(--wp--preset--color--ink); border: 1px solid #e2dbd2; border-radius: 12px;
	font-family: var(--wp--preset--font-family--serif); font-size: 1.3rem; letter-spacing: 0; text-transform: none; line-height: 1; white-space: nowrap;
	transition: border-color .18s, box-shadow .18s, background-color .18s, transform .12s; -webkit-tap-highlight-color: transparent;
}
.afc-gift .afc-gift-other .wp-block-button__link { font-family: var(--wp--preset--font-family--sans); font-size: .9rem; }
.afc-gift .afc-gift-amounts .wp-block-button__link:hover { border-color: rgba(var(--afc-ink-rgb), .38); background: #fffdfa; }
.afc-gift .afc-gift-amounts .wp-block-button__link:active { transform: scale(.97); }
.afc-gift .afc-gift-amounts .wp-block-button__link:focus-visible { outline: 2px solid var(--wp--preset--color--clay); outline-offset: 2px; }
.afc-gift .afc-gift-amounts .is-selected .wp-block-button__link {
	border-color: var(--wp--preset--color--ink); background: #fffcf7;
	box-shadow: 0 0 0 1px var(--wp--preset--color--ink), 0 8px 18px -10px rgba(var(--afc-ink-rgb), .45);
}
.afc-gift .afc-gift-amounts .is-selected .wp-block-button__link::after {
	content: ""; position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px #fff;
	background: var(--wp--preset--color--ink) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 10.4l2.6 2.6L14.2 7.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 100% no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
	.afc-gift .afc-gift-amounts .is-selected .wp-block-button__link::after { animation: afc-gift-pop .38s cubic-bezier(.3, 1.6, .5, 1) both; }
}
@keyframes afc-gift-pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- confirmation (aria-live) */
.afc-gift .afc-gift-status { display: flex; align-items: center; gap: .5rem; min-height: 1.5rem; margin: .9rem 0 1.25rem; font-size: .875rem; color: var(--wp--preset--color--ink-soft); scroll-margin-top: 1rem; }
.afc-gift .afc-gift-status strong { color: var(--wp--preset--color--ink); font-weight: 600; }
.afc-gift .afc-gift-status a { color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 3px; }
.afc-gift-tick {
	width: 1.1rem; height: 1.1rem; border-radius: 50%; flex: none;
	background: var(--wp--preset--color--sage) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 10.4l2.6 2.6L14.2 7.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 100% no-repeat;
}

/* ---------- the Tithe.ly form, continuous with the panel */
.afc-gift .afc-give-frame { position: relative; border: 0; border-top: 1px solid var(--afc-gift-line); border-radius: 0; box-shadow: none; background: #fff; }
/* Tithe.ly's own top bar (org name, language, menu: a fixed 75px + 1px rule at every width) repeats the panel
   header, so it is tucked under the panel's edge; the form starts with the amount. Delete this margin to show it. */
.afc-gift .afc-give-frame { overflow: hidden; background: rgb(249, 249, 251); }
.afc-gift .afc-give-iframe { margin-top: -76px; transition: opacity .28s ease; }
.afc-gift .afc-give-frame.is-loading .afc-give-iframe { opacity: .35; }
.afc-give-frame.is-loading::before {
	content: ""; position: absolute; z-index: 1; top: 0; left: 0; height: 2px; width: 35%;
	background: var(--wp--preset--color--clay); animation: afc-gift-load 1.1s ease-in-out infinite;
}
@keyframes afc-gift-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) {
	.afc-give-frame.is-loading::before { animation: none; width: 100%; opacity: .6; }
	.afc-gift .afc-give-iframe, .afc-gift-figure, .afc-gift-reveal-in img { transition: none; }
}
#give-secure-form { scroll-margin-top: 1rem; }

/* ---------- phones */
@media (max-width: 600px) {
	.afc-gift .afc-gift-panel { border-radius: 16px; }
	.afc-gift .afc-gift-head { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 1.1rem 1rem; }
	.afc-gift .afc-gift-secure { grid-column: 1; grid-row: 3; justify-self: start; margin-top: .7rem !important; }
	.afc-gift .afc-gift-title { font-size: 1.25rem !important; }
	.afc-gift .afc-gift-sub { font-size: .85rem; }
	.afc-gift .afc-gift-stage { margin: 0 1.1rem !important; aspect-ratio: 4 / 3; border-radius: 12px; }
	.afc-gift-reader { left: .75rem; right: .75rem; bottom: .75rem; font-size: 9.5px; }
	.afc-gift-hint { top: .9rem; left: 1rem; max-width: 80%; font-size: .85rem; }
	.afc-gift-figure { top: .9rem; left: 1rem; }
	.afc-gift-figure-amt { font-size: 2.25rem; }
	.afc-gift .afc-gift-pick { padding: 1.1rem 1.1rem 0; }
	.afc-gift .wp-block-buttons.afc-gift-amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
	.afc-gift .afc-gift-amounts > .afc-gift-other { grid-column: 1 / -1; }
	.afc-gift .afc-gift-amounts .wp-block-button__link { height: 3.25rem; font-size: 1.15rem; padding: 0 .25rem; }
	.afc-gift .afc-gift-other .wp-block-button__link { height: 2.85rem; }
}

/* ---------- editor: show the finished state */
.editor-styles-wrapper .afc-gift-stage { --r: 1 !important; }
.editor-styles-wrapper .afc-gift-stage .afc-gift-figure { opacity: 1; transform: none; }

/* ---------- thank-you page (/give/thank-you/): the card plays once, no amount */
.afc-gift--thanks .afc-gift-card { cursor: default; touch-action: auto; }
.afc-gift--thanks .afc-gift-card-amt { font-size: 1.3em; top: 3em; }
.afc-gift--thanks .afc-gift-card-label { letter-spacing: .18em; }
.afc-gift--thanks .afc-gift-figure-amt { font-size: 2.5rem; }
.afc-gift--thanks .afc-gift-stage { margin-bottom: 0 !important; }
.afc-gift--thanks .afc-gift-panel > .afc-thanks-help { margin: 0 !important; padding: 1.1rem 1.5rem 1.35rem; }
.afc-gift--thanks .afc-thanks-help a { color: var(--wp--preset--color--ink); text-underline-offset: 3px; }
.afc-thanks-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.afc-thanks-steps > * { margin: 0 !important; }
.afc-thanks-step {
	position: relative; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.35rem; border-radius: 16px; background: #fff;
	border: 1px solid rgba(var(--afc-ink-rgb), .08); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.afc-thanks-step:hover, .afc-thanks-step:focus-within { border-color: rgba(var(--afc-ink-rgb), .22); box-shadow: 0 16px 32px -22px rgba(var(--afc-ink-rgb), .45); }
.afc-thanks-step > * { margin: 0 !important; }
.afc-thanks-step-title { font-size: clamp(1.25rem, 1.6vw, 1.45rem) !important; line-height: 1.2; }
.afc-thanks-step-text { margin-top: .6rem !important; line-height: 1.55; flex: 1; }
.afc-thanks-step-cta { margin-top: 1.1rem !important; }
.afc-thanks-step-cta .wp-block-button__link::before { content: ""; position: absolute; inset: 0; border-radius: 16px; } /* whole card clickable */
.afc-thanks-step-cta .wp-block-button__link:focus-visible { outline: none; }
.afc-thanks-step:has(.wp-block-button__link:focus-visible) { outline: 2px solid var(--wp--preset--color--clay); outline-offset: 3px; }
@media (max-width: 1000px) { .afc-thanks-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
	.afc-thanks-steps { grid-template-columns: 1fr; gap: .875rem; }
	.afc-thanks-step { padding: 1.25rem 1.25rem 1.15rem; }
	.afc-gift--thanks .afc-gift-panel > .afc-thanks-help { padding: 1rem 1.1rem 1.2rem; }
	.afc-gift--thanks .afc-gift-figure-amt { font-size: 2rem; }
}

/* Pinned gift summary + Edit dialog (side panel on desktop, bottom sheet on phones) */
.afc-giftbar{position:sticky;top:var(--wp-admin--admin-bar--height,0px);z-index:5;display:flex;align-items:center;gap:16px;padding:12px 24px;background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid #EFE8DE;border-bottom:1px solid #EFE8DE;font-family:Inter,system-ui,sans-serif}
.afc-giftbar-sum{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.afc-giftbar-k{font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#4C453E}
.afc-giftbar-line{font-size:15px;color:#211912;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.afc-giftbar-line strong{font-weight:600}
.afc-giftbar-to{color:#4C453E}
.afc-giftbar-mo{font-size:12.5px;color:#4C453E}
.afc-giftbar-mo b{color:#211912}
.afc-giftbar-edit{flex:none;background:none;border:0;padding:10px 4px;min-height:44px;font:600 14px Inter,system-ui,sans-serif;color:#211912;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.afc-giftbar-edit:hover{color:#4C453E}
.afc-giftbar-edit:focus-visible,.afc-giftdlg button:focus-visible,.afc-giftdlg select:focus-visible,.afc-giftdlg input:focus-visible{outline:2px solid #211912;outline-offset:2px}

.afc-giftdlg{padding:0;border:0;margin:0 0 0 auto;height:100dvh;max-height:100dvh;width:min(440px,100vw);max-width:100vw;background:#fff;color:#211912;box-shadow:-24px 0 48px -24px rgba(33,25,18,.35);font-family:Inter,system-ui,sans-serif}
.afc-giftdlg::backdrop{background:rgba(33,25,18,.45)}
.afc-giftdlg[open]{animation:afc-gd-in .22s ease-out}
@keyframes afc-gd-in{from{transform:translateX(24px);opacity:0}}
.afc-giftdlg-inner{display:flex;flex-direction:column;height:100%}
.afc-giftdlg-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #EFE8DE}
.afc-giftdlg-head h2{margin:0;font-size:18px;font-weight:600;font-family:inherit;letter-spacing:0}
.afc-giftdlg-x{width:40px;height:40px;border:0;border-radius:50%;background:transparent;font-size:26px;line-height:1;color:#4C453E;cursor:pointer}
.afc-giftdlg-x:hover{background:#F5F1EB}
.afc-giftdlg-body{flex:1;overflow:auto;padding:20px 24px}
.afc-giftdlg-label{display:block;margin:0 0 8px;padding:0;font-size:13px;font-weight:600;color:#211912}
.afc-giftdlg-select{position:relative;margin-bottom:24px}
.afc-giftdlg-select::after{content:"";position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:2px solid #4C453E;border-bottom:2px solid #4C453E;transform:translateY(-70%) rotate(45deg);pointer-events:none}
.afc-giftdlg select{width:100%;height:48px;padding:0 40px 0 14px;border:1px solid #D9D2C7;border-radius:8px;background:#fff;font:15px Inter,system-ui,sans-serif;color:#211912;-webkit-appearance:none;appearance:none}
.afc-giftdlg-set{border:0;margin:0;padding:0;min-width:0}
.afc-giftdlg-opts{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.afc-giftdlg-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.afc-giftdlg-choice{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:10px 14px;border:1px solid #D9D2C7;border-radius:8px;cursor:pointer;font-size:15px;transition:border-color .15s,background .15s}
.afc-giftdlg-grid .afc-giftdlg-choice{justify-content:center;padding:10px 6px;font-weight:500}
.afc-giftdlg-choice input{position:absolute;opacity:0;pointer-events:none}
.afc-giftdlg-choice-s{color:#4C453E;font-size:14px;white-space:nowrap}
.afc-giftdlg-choice:hover{border-color:#8A8178}
.afc-giftdlg-choice:has(input:checked){border-color:#211912;box-shadow:inset 0 0 0 1px #211912;background:#FAF7F2}
.afc-giftdlg-choice:has(input:focus-visible){outline:2px solid #211912;outline-offset:2px}
.afc-giftdlg-other{display:block;margin-top:16px}
.afc-giftdlg-other>span:first-child{display:block;margin-bottom:8px;font-size:13px;font-weight:600}
.afc-giftdlg-money{display:flex;align-items:center;height:48px;padding:0 14px;border:1px solid #D9D2C7;border-radius:8px;color:#4C453E}
.afc-giftdlg-money:focus-within{border-color:#211912;box-shadow:inset 0 0 0 1px #211912}
.afc-giftdlg-money input{flex:1;border:0;outline:0;margin-left:6px;font:15px Inter,system-ui,sans-serif;color:#211912;background:transparent;-moz-appearance:textfield}
.afc-giftdlg-money input::-webkit-inner-spin-button{-webkit-appearance:none}
.afc-giftdlg-note{margin:20px 0 0;padding:12px 14px;border-radius:8px;background:#F5F1EB;font-size:14px;line-height:1.5;color:#211912}
.afc-giftdlg-foot{display:flex;gap:12px;padding:16px 24px calc(16px + env(safe-area-inset-bottom));border-top:1px solid #EFE8DE}
.afc-giftdlg-foot button{height:48px;border-radius:8px;font:600 15px Inter,system-ui,sans-serif;cursor:pointer}
.afc-giftdlg-cancel{flex:none;padding:0 20px;background:#fff;border:1px solid #D9D2C7;color:#211912}
.afc-giftdlg-save{flex:1;border:0;background:#211912;color:#fff}
.afc-giftdlg-save:hover{background:#3a2f26}
@media (max-width:600px){
 .afc-giftbar{padding:10px 16px}.afc-giftbar-line{white-space:normal}
 .afc-giftdlg{margin:auto 0 0;width:100vw;height:auto;max-height:88dvh;border-radius:16px 16px 0 0;box-shadow:0 -16px 40px -16px rgba(33,25,18,.35)}
 .afc-giftdlg[open]{animation-name:afc-gd-up}
 .afc-giftdlg-inner{max-height:88dvh}
 .afc-giftdlg-head{padding:16px 20px}.afc-giftdlg-body{padding:16px 20px}.afc-giftdlg-foot{padding-left:20px;padding-right:20px}
 .afc-giftdlg-grid{grid-template-columns:repeat(2,1fr)}
}
@keyframes afc-gd-up{from{transform:translateY(32px);opacity:0}}
@media (prefers-reduced-motion:reduce){.afc-giftdlg[open]{animation:none}}
