/**
 * Animated greeting cards, second part (greeting-anim-more.js and the tabs of greeting-anim.js): the tabs and the
 * workspace with its live preview, the envelope and its editor, the openings réaliste, sceau, magique, pop-up, coffre,
 * rideau and parchemin, the extra effects, the games, the media, reactions and the management box.
 */

/* ---------- Tabs and workspace ---------- */

#wrapper .rd-gca-off {
	display: none !important;
}

#wrapper .rd-gca-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	align-items: start;
	gap: 28px;
	max-width: 1240px;
	margin: 0 auto;
}

#wrapper .rd-gca-main {
	min-width: 0;
}

#wrapper .rd-gca-main > .rd-gc-box,
#wrapper .rd-gca-main > .rd-gca-section {
	max-width: none;
	margin-right: 0;
	margin-left: 0;
}

#wrapper .rd-gca-workspace > .rd-gca-live {
	position: sticky;
	top: 90px;
}

#wrapper .rd-gca-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 18px;
	padding: 8px;
	border-radius: 16px;
	background: var(--rd-surface, #FFF);
	box-shadow: 0 10px 30px -22px rgba(50, 1, 49, .5);
}

#wrapper .rd-gca-tab {
	padding: 8px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--rd-plum, #320131);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

#wrapper .rd-gca-tab[aria-selected="true"] {
	background: var(--rd-berry, #B31E6F);
	color: #FFF;
}

#wrapper .rd-gca-tab:focus-visible {
	outline: 2px solid var(--rd-berry, #B31E6F);
	outline-offset: 2px;
}

#wrapper .rd-gca-steps {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin: 22px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--rd-line, #E8DCE3);
}

#wrapper .rd-gca-steps .rd-btn:only-child {
	margin-left: auto;
}

#wrapper .rd-gca-section {
	margin-top: 0;
	margin-bottom: 22px;
}

#wrapper .rd-gca-draft {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 12px;
	background: #EAF6EE;
	color: #1E5A3E;
	font-size: 14px;
}

#wrapper .rd-gca-link {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

#wrapper .rd-gca-sr,
.rd-gca-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

#wrapper .rd-gca-pair.is-three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

#wrapper .rd-gca-legend {
	margin: 0 0 8px;
	color: var(--rd-plum, #320131);
	font-size: 15px;
	font-weight: 700;
}

@media (max-width: 1100px) {
	#wrapper .rd-gca-workspace {
		grid-template-columns: minmax(0, 1fr) 280px;
	}
}

@media (max-width: 900px) {
	#wrapper .rd-gca-workspace {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Phones: the live preview small and kept in view at the top while the tabs scroll */
	#wrapper .rd-gca-workspace > .rd-gca-live {
		top: 64px;
		z-index: 20;
		order: -1;
		padding: 8px;
		box-shadow: 0 10px 24px -18px rgba(50, 1, 49, .6);
	}

	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gca-live-label,
	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gca-live-letter {
		display: none;
	}

	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gca-live-stage {
		max-width: 260px;
		margin: 0 auto;
	}

	#wrapper .rd-gca-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	#wrapper .rd-gca-tab {
		flex: none;
	}

	#wrapper .rd-gca-pair.is-three {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Colour swatches ---------- */

#wrapper .rd-gca-colors .rd-gca-swatch {
	position: relative;
	display: inline-flex;
	margin: 0 6px 6px 0;
	cursor: pointer;
}

#wrapper .rd-gca-swatch input {
	position: absolute;
	opacity: 0;
}

#wrapper .rd-gca-swatch span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 2px solid #FFF;
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--rd-line, #E8DCE3);
	color: var(--rd-muted);
	font-size: 12px;
	font-weight: 700;
}

#wrapper .rd-gca-swatch.is-auto span {
	background: conic-gradient(#B31E6F, #F7B3CF, #C9A25E, #5B7FA6, #B31E6F);
	color: #FFF;
}

#wrapper .rd-gca-swatch:has(input:checked) span {
	box-shadow: 0 0 0 2px var(--rd-berry, #B31E6F);
}

#wrapper .rd-gca-swatch:has(input:focus-visible) span {
	outline: 2px solid var(--rd-berry, #B31E6F);
	outline-offset: 2px;
}

#wrapper .rd-gca-swatch[hidden] {
	display: none;
}

#wrapper .rd-gca-pill.is-stamp span {
	font-size: 18px;
}

/* ---------- The envelope ---------- */

.rd-gca-envl {
	--env-color: #F7E7EE;
	--env-lining: #B31E6F;
	--env-bg: transparent;
	--env-ink: #320131;
	position: relative;
	width: min(78vw, 360px);
	aspect-ratio: 3 / 2;
	margin: 0 auto 10px;
}

.rd-gca-envl.is-closed,
.rd-gca-envl.is-editor {
	padding: 0;
	border-radius: 16px;
	box-shadow: 0 0 0 18px var(--env-bg);
}

.rd-gca-envl.is-editor {
	width: 100%;
	max-width: 340px;
	margin: 18px auto 30px;
}

.rd-gca-envl > span {
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.rd-gca-envl-back {
	background: color-mix(in srgb, var(--env-color) 85%, #000);
}

/* The lining, seen when the flap opens: its colour and pattern */
.rd-gca-envl-lining,
.rd-gca-envl-flap-lining {
	background-color: var(--env-lining);
}

.rd-gca-envl.is-pattern-fleurs :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, .45) 0 3px, transparent 4px), radial-gradient(circle at 75% 70%, rgba(255, 255, 255, .3) 0 5px, transparent 6px);
	background-size: 26px 26px;
}

.rd-gca-envl.is-pattern-etoiles :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: conic-gradient(from 45deg at 50% 50%, rgba(255, 230, 150, .7) 0 25%, transparent 0 50%, rgba(255, 230, 150, .7) 0 75%, transparent 0);
	background-size: 14px 14px;
}

.rd-gca-envl.is-pattern-coeurs :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: radial-gradient(circle at 35% 40%, rgba(255, 255, 255, .5) 0 4px, transparent 5px), radial-gradient(circle at 65% 40%, rgba(255, 255, 255, .5) 0 4px, transparent 5px);
	background-size: 22px 22px;
}

.rd-gca-envl.is-pattern-pois :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 0 3px, transparent 4px);
	background-size: 16px 16px;
}

.rd-gca-envl.is-pattern-rayures :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 6px, transparent 6px 14px);
}

.rd-gca-envl.is-pattern-confettis :is(.rd-gca-envl-lining, .rd-gca-envl-flap-lining) {
	background-image: radial-gradient(circle at 20% 30%, #FFD166 0 2px, transparent 3px), radial-gradient(circle at 70% 20%, #7BC8A4 0 2px, transparent 3px), radial-gradient(circle at 50% 75%, #5B7FA6 0 2px, transparent 3px);
	background-size: 30px 30px;
}

.rd-gca-envl-lining {
	inset: 4% 4% 30% 4% !important;
}

.rd-gca-envl-card {
	inset: 10% 8% 8% 8% !important;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
	box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .6);
}

.rd-gca-envl.is-closed .rd-gca-envl-card,
.rd-gca-envl.is-editor .rd-gca-envl-card {
	background: linear-gradient(135deg, #FFFBF7, #F3E9E2);
}

.rd-gca-envl-front {
	z-index: 3;
	background: var(--env-color);
	clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
	box-shadow: 0 26px 44px -26px rgba(0, 0, 0, .7);
}

.rd-gca-envl-flap {
	z-index: 4;
	background: color-mix(in srgb, var(--env-color) 92%, #000);
	clip-path: polygon(0 0, 100% 0, 50% 58%);
	transform-origin: top center;
	backface-visibility: visible;
}

.rd-gca-envl-flap-lining {
	position: absolute;
	inset: 0;
	opacity: 0;
	clip-path: polygon(0 0, 100% 0, 50% 58%);
}

/* Closure on the flap's tip */
.rd-gca-envl-close {
	inset: auto !important;
	top: 46%;
	left: 50%;
	z-index: 5;
	width: 46px;
	height: 46px;
	transform: translate(-50%, -50%);
}

.rd-gca-envl.is-closure-sceau .rd-gca-envl-close,
.rd-gca-envl.is-closure-cachet .rd-gca-envl-close {
	border-radius: 50% !important;
	background: radial-gradient(circle at 35% 30%, #E25A8F, var(--env-lining) 60%, color-mix(in srgb, var(--env-lining) 70%, #000));
	box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 0 0 4px rgba(0, 0, 0, .12);
}

.rd-gca-envl.is-closure-cachet .rd-gca-envl-close {
	width: 34px;
	height: 34px;
	border-radius: 6px !important;
	background: #FFF;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.rd-gca-envl.is-closure-autocollant .rd-gca-envl-close::before {
	content: "❤";
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--env-lining);
	font-size: 34px;
}

.rd-gca-envl.is-closure-ruban .rd-gca-envl-close {
	top: 0;
	left: 46%;
	width: 8%;
	height: 100%;
	border-radius: 0 !important;
	background: var(--env-lining);
	transform: none;
}

.rd-gca-envl.is-closure-ruban .rd-gca-envl-close::after {
	content: "🎀";
	position: absolute;
	top: 46%;
	left: 50%;
	font-size: 34px;
	transform: translate(-50%, -50%);
}

.rd-gca-envl-stamp {
	inset: 6% 5% auto auto !important;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 50px;
	border: 3px dotted #FFF;
	border-radius: 3px !important;
	background: #FFF7EE;
	font-size: 24px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.rd-gca-envl-stamp[hidden] {
	display: none;
}

.rd-gca-envl-text {
	inset: auto 8% 12% 8% !important;
	z-index: 5;
	color: var(--env-ink);
	font-size: clamp(16px, 4.6vw, 26px);
	text-align: center;
	overflow-wrap: anywhere;
}

.is-font-elegante { font-family: "Didot", "Bodoni 72", "Playfair Display", Georgia, serif; font-style: italic; }
.is-font-manuscrite { font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive; }
.is-font-moderne { font-family: var(--rd-title-font), "Helvetica Neue", Arial, sans-serif; font-weight: 800; letter-spacing: .02em; }
.is-font-ronde { font-family: "Arial Rounded MT Bold", "Varela Round", "Nunito", sans-serif; }

#wrapper .rd-gca-env-editor {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

#wrapper .rd-gca-env-preview {
	position: sticky;
	top: 100px;
	padding: 20px 0;
	border-radius: 16px;
	background: var(--rd-cream, #FBF6F3);
}

#wrapper .rd-gca-section.is-unavailable .rd-gca-env-preview {
	opacity: .5;
}

@media (max-width: 1200px) {
	#wrapper .rd-gca-env-editor {
		grid-template-columns: minmax(0, 1fr);
	}

	#wrapper .rd-gca-env-preview {
		position: static;
	}
}

/* ---------- Openings with the envelope ---------- */

.rd-gca-envl-stage {
	width: min(78vw, 440px);
	transform-style: preserve-3d;
}

/* Réaliste: it turns over, the flap opens on its lining, the card slides out */
.rd-gca-stage.is-playing .rd-gca-envl.is-realiste {
	animation: gca-envl-turn var(--gca-d) ease-in-out forwards;
}

.rd-gca-stage.is-playing :is(.rd-gca-envl.is-realiste, .rd-gca-envl.is-sceau, .rd-gca-envl.is-magique) .rd-gca-envl-flap {
	animation: gca-envl-flap var(--gca-d) ease-in-out forwards;
}

.rd-gca-stage.is-playing :is(.rd-gca-envl.is-realiste, .rd-gca-envl.is-sceau, .rd-gca-envl.is-magique) .rd-gca-envl-flap-lining {
	animation: gca-envl-lining var(--gca-d) steps(1) forwards;
}

.rd-gca-stage.is-playing :is(.rd-gca-envl.is-realiste, .rd-gca-envl.is-sceau, .rd-gca-envl.is-magique) .rd-gca-envl-card {
	animation: gca-envl-card var(--gca-d) cubic-bezier(.2, .8, .3, 1) forwards;
}

.rd-gca-stage.is-playing :is(.rd-gca-envl.is-realiste, .rd-gca-envl.is-magique) .rd-gca-envl-close {
	animation: gca-envl-close var(--gca-d) ease-in forwards;
}

@keyframes gca-envl-turn {
	0% { transform: rotateY(180deg) scale(.9); }
	22%, 100% { transform: rotateY(360deg) scale(1); }
}

@keyframes gca-envl-flap {
	0%, 30% { transform: rotateX(0); z-index: 4; }
	55% { transform: rotateX(180deg); z-index: 1; }
	100% { transform: rotateX(180deg); z-index: 1; }
}

@keyframes gca-envl-lining {
	0%, 42% { opacity: 0; }
	43%, 100% { opacity: 1; }
}

@keyframes gca-envl-card {
	0%, 55% { transform: translateY(0); z-index: 2; }
	80% { transform: translateY(-75%); z-index: 2; }
	81% { z-index: 6; }
	100% { transform: translateY(-15%) scale(1.45); z-index: 6; }
}

@keyframes gca-envl-close {
	0%, 25% { opacity: 1; transform: translate(-50%, -50%); }
	35%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

/* Sceau: the seal waits for the recipient's click, then breaks in two */
.rd-gca-trigger {
	position: absolute;
	top: 46%;
	left: 50%;
	z-index: 8;
	width: 70px;
	height: 70px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	transform: translate(-50%, -50%);
	cursor: pointer;
}

.rd-gca-trigger:focus-visible {
	outline: 3px solid #FFF;
	outline-offset: 4px;
}

.rd-gca-seal-half {
	position: absolute;
	top: 0;
	width: 50%;
	height: 100%;
	background: radial-gradient(circle at 70% 30%, #E25A8F, #8E1350 70%);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
	transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .5s ease;
}

.rd-gca-seal-half.is-left {
	left: 0;
	border-radius: 35px 0 0 35px;
}

.rd-gca-seal-half.is-right {
	right: 0;
	border-radius: 0 35px 35px 0;
	background: radial-gradient(circle at 30% 30%, #E25A8F, #8E1350 70%);
}

.rd-gca-stage.is-waiting .rd-gca-trigger {
	animation: gca-pulse 1.4s ease-in-out infinite;
}

.rd-gca-stage.is-waiting .rd-gca-envl-close {
	opacity: 0;
}

.rd-gca-stage.is-playing .rd-gca-seal-half.is-left {
	opacity: 0;
	transform: translate(-30px, 40px) rotate(-35deg);
}

.rd-gca-stage.is-playing .rd-gca-seal-half.is-right {
	opacity: 0;
	transform: translate(30px, 40px) rotate(35deg);
}

.rd-gca-envl.is-sceau .rd-gca-envl-close {
	opacity: 0;
}

@keyframes gca-pulse {
	0%, 100% { transform: translate(-50%, -50%) scale(1); }
	50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Magique: the envelope glows, light comes out of it */
.rd-gca-stage.is-playing .rd-gca-envl.is-magique {
	animation: gca-glow var(--gca-d) ease-in-out forwards;
}

.rd-gca-magic {
	position: absolute;
	top: 30%;
	left: 50%;
	z-index: 7;
	pointer-events: none;
}

.rd-gca-magic i {
	position: absolute;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #FFF2B0;
	box-shadow: 0 0 12px 3px rgba(255, 220, 120, .9);
	opacity: 0;
}

.rd-gca-stage.is-playing .rd-gca-magic i {
	animation: gca-spark calc(var(--gca-d) * .6) ease-out forwards;
}

@keyframes gca-glow {
	0% { filter: drop-shadow(0 0 0 rgba(255, 220, 140, 0)); }
	30% { filter: drop-shadow(0 0 30px rgba(255, 220, 140, .95)); }
	100% { filter: drop-shadow(0 0 10px rgba(255, 220, 140, .4)); }
}

/* Pop-up: the card opens flat, its figures stand up in relief */
.rd-gca-pop {
	position: relative;
	width: min(76vw, 420px);
	height: 300px;
	perspective: 900px;
}

.rd-gca-pop-base,
.rd-gca-pop-back {
	position: absolute;
	right: 0;
	left: 0;
	height: 50%;
	border-radius: 10px;
	background: linear-gradient(#FFFBF7, #F3E9E2);
	box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
}

.rd-gca-pop-base {
	bottom: 0;
	transform: rotateX(60deg);
	transform-origin: top;
}

.rd-gca-pop-back {
	top: 0;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
	transform-origin: bottom;
	transform: rotateX(-90deg);
}

.rd-gca-pop-fig {
	position: absolute;
	bottom: 38%;
	left: 50%;
	font-size: 90px;
	line-height: 1;
	transform-origin: 50% 100%;
	transform: translateX(-50%) rotateX(-90deg);
	filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .3));
}

.rd-gca-pop-fig.is-left { left: 22%; font-size: 52px; }
.rd-gca-pop-fig.is-right { left: 78%; font-size: 52px; }

.rd-gca-stage.is-playing .rd-gca-pop-back { animation: gca-pop-back var(--gca-d) ease-out forwards; }
.rd-gca-stage.is-playing .rd-gca-pop-fig { animation: gca-pop-up var(--gca-d) cubic-bezier(.3, 1.5, .5, 1) forwards; }
.rd-gca-stage.is-playing .rd-gca-pop-fig.is-left { animation-delay: calc(var(--gca-d) * .12); }
.rd-gca-stage.is-playing .rd-gca-pop-fig.is-right { animation-delay: calc(var(--gca-d) * .2); }

@keyframes gca-pop-back {
	0%, 10% { transform: rotateX(-90deg); }
	55%, 100% { transform: rotateX(-8deg); }
}

@keyframes gca-pop-up {
	0%, 25% { transform: translateX(-50%) rotateX(-90deg) scale(.6); }
	70%, 100% { transform: translateX(-50%) rotateX(0) scale(1); }
}

/* Coffre: the lid lifts, gold light, the card rises */
.rd-gca-chest {
	position: relative;
	width: 240px;
	height: 230px;
}

.rd-gca-chest-box,
.rd-gca-chest-lid {
	position: absolute;
	left: 0;
	width: 100%;
	border: 6px solid #6B3E1E;
	background: repeating-linear-gradient(90deg, #8B5A2B 0 38px, #6B3E1E 38px 44px);
}

.rd-gca-chest-box {
	bottom: 0;
	height: 120px;
	border-radius: 8px;
	box-shadow: 0 26px 40px -24px rgba(0, 0, 0, .8);
}

.rd-gca-chest-lid {
	bottom: 114px;
	z-index: 3;
	height: 70px;
	border-radius: 60px 60px 6px 6px;
	transform-origin: 50% 100%;
}

.rd-gca-chest-lock {
	position: absolute;
	bottom: 98px;
	left: 50%;
	z-index: 4;
	width: 26px;
	height: 32px;
	border-radius: 4px;
	background: #E2B13C;
	transform: translateX(-50%);
}

.rd-gca-chest-light {
	position: absolute;
	bottom: 100px;
	left: 50%;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 215, 110, .9), transparent 62%);
	opacity: 0;
	transform: translate(-50%, 30%) scale(.3);
}

.rd-gca-chest-card {
	position: absolute;
	bottom: 60px;
	left: 50%;
	z-index: 2;
	width: 170px;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
	opacity: 0;
	transform: translateX(-50%);
}

.rd-gca-stage.is-playing .rd-gca-chest-lid { animation: gca-chest-lid var(--gca-d) ease-out forwards; }
.rd-gca-stage.is-playing .rd-gca-chest-lock { animation: gca-fade-out calc(var(--gca-d) * .3) ease forwards; }
.rd-gca-stage.is-playing .rd-gca-chest-light { animation: gca-gift-glow var(--gca-d) ease-out forwards; }
.rd-gca-stage.is-playing .rd-gca-chest-card { animation: gca-gift-card var(--gca-d) cubic-bezier(.2, .8, .3, 1) forwards; }

@keyframes gca-chest-lid {
	0%, 20% { transform: rotateX(0); }
	55%, 100% { transform: perspective(500px) rotateX(-110deg); }
}

@keyframes gca-fade-out {
	to { opacity: 0; }
}

/* Rideau: two curtains part on the card, under a spotlight */
.rd-gca-theatre {
	position: relative;
	width: min(80vw, 480px);
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 10px;
	background: #1A0710;
}

.rd-gca-theatre-card {
	position: absolute;
	inset: 12% 10%;
	border-radius: 6px;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
}

.rd-gca-theatre-spot {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(0, 0, 0, .65) 70%);
	opacity: 0;
}

.rd-gca-curtain {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	width: 52%;
	background: repeating-linear-gradient(90deg, #8E1328 0 18px, #B01C36 18px 30px, #7A0F22 30px 40px);
	box-shadow: inset 0 -30px 40px rgba(0, 0, 0, .4);
}

.rd-gca-curtain.is-left { left: 0; transform-origin: left top; }
.rd-gca-curtain.is-right { right: 0; transform-origin: right top; }

.rd-gca-theatre-top {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	height: 12%;
	background: repeating-linear-gradient(90deg, #6F0C1D 0 30px, #8E1328 30px 60px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, .5);
}

.rd-gca-stage.is-playing .rd-gca-curtain.is-left { animation: gca-curtain-l var(--gca-d) ease-in-out forwards; }
.rd-gca-stage.is-playing .rd-gca-curtain.is-right { animation: gca-curtain-r var(--gca-d) ease-in-out forwards; }
.rd-gca-stage.is-playing .rd-gca-theatre-spot { animation: gca-spot var(--gca-d) ease forwards; }

@keyframes gca-curtain-l {
	0%, 15% { transform: translateX(0) scaleX(1); }
	80%, 100% { transform: translateX(-70%) scaleX(.45); }
}

@keyframes gca-curtain-r {
	0%, 15% { transform: translateX(0) scaleX(1); }
	80%, 100% { transform: translateX(70%) scaleX(.45); }
}

@keyframes gca-spot {
	0%, 50% { opacity: 0; }
	100% { opacity: 1; }
}

/* Parchemin: the scroll unrolls downwards */
.rd-gca-scroll {
	position: relative;
	width: min(70vw, 360px);
}

.rd-gca-scroll-rod {
	position: relative;
	z-index: 2;
	display: block;
	height: 24px;
	margin: 0 -14px;
	border-radius: 12px;
	background: linear-gradient(#C08A4A, #7A4F22);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

.rd-gca-scroll-paper {
	display: block;
	height: 0;
	overflow: hidden;
	background: var(--gca-inner, none) center / cover, linear-gradient(#F5E6C8, #EAD5AA);
}

.rd-gca-scroll-img {
	display: block;
	height: 100%;
	margin: 16px;
	border-radius: 6px;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
}

.rd-gca-stage.is-playing .rd-gca-scroll-paper { animation: gca-unroll var(--gca-d) ease-out forwards; }

@keyframes gca-unroll {
	0%, 10% { height: 0; }
	100% { height: 260px; }
}

/* The 3D card's inside: the model's inner picture */
.rd-gca-book-inside {
	background: var(--gca-inner, none) center / cover, #FFFBF7 !important;
}

/* ---------- Extra effects ---------- */

.rd-gca-p.is-paillettes {
	width: var(--gca-s, 5px);
	height: var(--gca-s, 5px);
	border-radius: 1px;
	transform: rotate(45deg);
	box-shadow: 0 0 6px currentColor;
	animation-name: gca-twinkle;
	animation-iteration-count: 3;
}

.rd-gca-p.is-bulles {
	bottom: -15%;
	width: var(--gca-w, 26px);
	height: var(--gca-w, 26px);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .08) 45%, rgba(170, 220, 255, .2));
	animation-name: gca-rise;
	animation-timing-function: ease-in-out;
}

.rd-gca-p.is-petales {
	top: -8%;
	width: 12px;
	height: 16px;
	border-radius: 80% 0 80% 0;
	animation-name: gca-fall;
	animation-timing-function: ease-in-out;
}

.rd-gca-p.is-aurore {
	left: -50%;
	width: 200%;
	height: 45%;
	filter: blur(18px);
	opacity: 0;
	mix-blend-mode: screen;
	animation-name: gca-aurora;
	animation-timing-function: ease-in-out;
}

.rd-gca-p.is-rubans {
	top: -30%;
	width: 8px;
	height: 70px;
	border-radius: 4px;
	background: repeating-linear-gradient(170deg, var(--gca-c, #B31E6F) 0 10px, color-mix(in srgb, var(--gca-c, #B31E6F) 60%, #FFF) 10px 20px);
	transform-origin: 50% 0;
	animation-name: gca-streamer;
}

.rd-gca-p.is-fusee {
	left: -12%;
	font-size: 34px;
	animation-name: gca-rocket;
	animation-timing-function: ease-in;
}

.rd-gca-p.is-fusee.is-star {
	width: 120px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, transparent, #FFF);
	box-shadow: 0 0 10px #FFF;
}

@keyframes gca-aurora {
	0% { opacity: 0; transform: translateX(-10%) skewY(-6deg); }
	30% { opacity: .75; }
	70% { opacity: .6; }
	100% { opacity: 0; transform: translateX(10%) skewY(6deg); }
}

@keyframes gca-streamer {
	0% { opacity: 0; transform: translate(0, 0) rotate(0) scaleY(.3); }
	15% { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--gca-x, 0), calc(var(--gca-h, 400px) + 60px)) rotate(var(--gca-r, 20deg)) scaleY(1); }
}

@keyframes gca-rocket {
	0% { opacity: 0; transform: translate(0, 0) rotate(45deg); }
	10% { opacity: 1; }
	100% { opacity: 0; transform: translate(calc(var(--gca-wd, 640px) * 1.25), -60%) rotate(45deg); }
}

/* ---------- Games ---------- */

.rd-gca-game {
	max-width: 680px;
	margin: 18px auto;
	padding: 22px;
	border-radius: 18px;
	background: var(--rd-surface, #FFF);
	box-shadow: 0 10px 30px -22px rgba(50, 1, 49, .5);
	text-align: center;
}

.rd-gca-game-title {
	margin: 0 0 14px;
	color: var(--rd-plum, #320131);
	font-family: var(--rd-title-font);
	font-size: 20px;
	font-weight: 800;
}

.rd-gca-game-won {
	margin: 14px 0 0;
	color: var(--rd-berry, #B31E6F);
	font-size: 20px;
	font-weight: 800;
}

.rd-gca-game-skip {
	margin-top: 14px;
}

.rd-gca-scratch {
	position: relative;
	max-width: 560px;
	margin: 0 auto 12px;
	aspect-ratio: 560 / 220;
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(135deg, #FBE4EF, #FFFBF7);
}

.rd-gca-scratch-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 16px;
	color: var(--rd-berry, #B31E6F);
	font-family: var(--rd-title-font);
	font-size: clamp(20px, 4vw, 32px);
	font-weight: 800;
}

.rd-gca-scratch canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: crosshair;
	transition: opacity .6s ease;
}

.rd-gca-scratch canvas.is-gone {
	opacity: 0;
	pointer-events: none;
}

.rd-gca-balloons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	min-height: 150px;
}

.rd-gca-balloon {
	position: relative;
	width: 74px;
	height: 92px;
	border: 0;
	border-radius: 50% 50% 46% 46%;
	background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), transparent 30%), var(--gca-c, #B31E6F);
	color: var(--rd-plum, #320131);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	animation: gca-float 2.4s ease-in-out infinite;
}

.rd-gca-balloon::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	width: 1px;
	height: 26px;
	background: rgba(0, 0, 0, .3);
}

.rd-gca-balloon.is-popped {
	width: auto;
	height: auto;
	padding: 10px 14px;
	border-radius: 12px;
	background: #FFF7EE;
	box-shadow: 0 0 0 2px var(--gca-c, #B31E6F);
	animation: gca-pop .35s ease-out;
}

.rd-gca-balloon.is-popped::after {
	display: none;
}

@keyframes gca-pop {
	0% { transform: scale(1.4); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

.rd-gca-die {
	--gca-rx: 0deg;
	--gca-ry: 0deg;
	position: relative;
	width: 90px;
	height: 90px;
	margin: 10px auto 18px;
	transform-style: preserve-3d;
	transform: rotateX(-20deg) rotateY(30deg);
	transition: transform 1.4s cubic-bezier(.2, .8, .3, 1);
}

.rd-gca-die.is-rolling {
	transform: rotateX(var(--gca-rx)) rotateY(var(--gca-ry));
}

.rd-gca-die-face {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: #FFF;
	box-shadow: inset 0 0 0 2px var(--rd-line, #E8DCE3);
	color: var(--rd-berry, #B31E6F);
	font-size: 70px;
	line-height: 1;
}

.rd-gca-die-face.is-1 { transform: translateZ(45px); }
.rd-gca-die-face.is-2 { transform: rotateY(90deg) translateZ(45px); }
.rd-gca-die-face.is-3 { transform: rotateX(-90deg) translateZ(45px); }
.rd-gca-die-face.is-4 { transform: rotateX(90deg) translateZ(45px); }
.rd-gca-die-face.is-5 { transform: rotateY(-90deg) translateZ(45px); }
.rd-gca-die-face.is-6 { transform: rotateY(180deg) translateZ(45px); }

.rd-gca-die-result {
	min-height: 1.4em;
	margin: 12px 0 0;
	font-size: 18px;
	font-weight: 700;
}

.rd-gca-puzzle {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 3px;
	max-width: 420px;
	margin: 0 auto;
	aspect-ratio: 16 / 10;
}

.rd-gca-piece {
	border: 0;
	border-radius: 4px;
	background-color: var(--rd-pink, #FBE4EF);
	background-size: 300% 300%;
	color: var(--rd-berry, #B31E6F);
	font: inherit;
	font-size: 22px;
	font-weight: 800;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}

.rd-gca-piece.is-picked {
	box-shadow: 0 0 0 3px var(--rd-berry, #B31E6F);
	transform: scale(.94);
}

.rd-gca-puzzle.is-solved {
	gap: 0;
}

.rd-gca-hidden-gift {
	position: absolute;
	z-index: 5;
	padding: 0;
	border: 0;
	background: none;
	font-size: 22px;
	opacity: .55;
	cursor: pointer;
	filter: saturate(.6);
}

.rd-gca-hidden-gift.is-hint {
	animation: gca-pulse-plain 1.2s ease-in-out infinite;
	opacity: .9;
}

.rd-gca-hidden-gift.is-found {
	font-size: 48px;
	opacity: 1;
	filter: none;
	transition: font-size .4s ease;
}

@keyframes gca-pulse-plain {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.35); }
}

.rd-gca-quiz {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.rd-gca-quiz-q {
	flex-basis: 100%;
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
}

.rd-gca-quiz .rd-gca-chip,
.rd-gca-game .rd-gca-chip {
	padding: 9px 16px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 999px;
	background: var(--rd-surface, #FFF);
	color: var(--rd-plum, #320131);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.rd-gca-quiz .rd-gca-chip:disabled {
	opacity: .4;
}

.rd-gca-quiz-hint {
	min-height: 1.3em;
	margin: 10px 0 0;
	color: #B3261E;
}

.rd-gca-plant {
	position: relative;
	width: 160px;
	height: 220px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.rd-gca-plant-pot {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 80px;
	height: 56px;
	border-radius: 4px 4px 22px 22px;
	background: linear-gradient(#C8693B, #9C4A24);
	transform: translateX(-50%);
}

.rd-gca-plant-stem {
	position: absolute;
	bottom: 50px;
	left: 50%;
	width: 6px;
	height: 0;
	border-radius: 3px;
	background: #3E8E4E;
	transform: translateX(-50%);
	transition: height .5s ease;
}

.rd-gca-plant-leaf {
	position: absolute;
	bottom: 80px;
	width: 30px;
	height: 16px;
	border-radius: 0 100% 0 100%;
	background: #4FA463;
	transform: scale(0);
	transition: transform .4s cubic-bezier(.3, 1.6, .5, 1);
}

.rd-gca-plant-leaf.is-l { right: 50%; transform-origin: 100% 100%; }
.rd-gca-plant-leaf.is-r { left: 50%; border-radius: 100% 0 100% 0; transform-origin: 0 100%; }

.rd-gca-plant-bloom {
	position: absolute;
	bottom: 150px;
	left: 50%;
	font-size: 60px;
	transform: translateX(-50%) scale(0);
	transition: transform .6s cubic-bezier(.3, 1.6, .5, 1);
}

.rd-gca-plant.is-step-1 .rd-gca-plant-stem { height: 30px; }
.rd-gca-plant.is-step-2 .rd-gca-plant-stem { height: 60px; }
.rd-gca-plant.is-step-2 .rd-gca-plant-leaf.is-l,
.rd-gca-plant.is-step-3 .rd-gca-plant-leaf,
.rd-gca-plant.is-step-4 .rd-gca-plant-leaf,
.rd-gca-plant.is-step-5 .rd-gca-plant-leaf { transform: scale(1); }
.rd-gca-plant.is-step-3 .rd-gca-plant-stem { height: 80px; }
.rd-gca-plant.is-step-4 .rd-gca-plant-stem,
.rd-gca-plant.is-step-5 .rd-gca-plant-stem { height: 105px; }
.rd-gca-plant.is-step-4 .rd-gca-plant-bloom { transform: translateX(-50%) scale(.4); }
.rd-gca-plant.is-step-5 .rd-gca-plant-bloom { transform: translateX(-50%) scale(1); }

.rd-gca-catch {
	position: relative;
	height: 220px;
	overflow: hidden;
	border-radius: 14px;
	background: linear-gradient(#FBE4EF, #FFFBF7);
}

.rd-gca-catch-item {
	position: absolute;
	bottom: -40px;
	padding: 4px;
	border: 0;
	background: none;
	color: #E8457C;
	font-size: 32px;
	cursor: pointer;
	animation: gca-catch linear infinite;
}

.rd-gca-catch-item.is-caught {
	visibility: hidden;
}

.rd-gca-catch-count {
	margin: 0 0 8px;
	font-weight: 700;
}

@keyframes gca-catch {
	0% { transform: translateY(0) translateX(0); }
	50% { transform: translateY(-130px) translateX(20px); }
	100% { transform: translateY(-270px) translateX(-10px); }
}

/* ---------- Media, reactions, management ---------- */

.rd-gca-media-box {
	display: grid;
	gap: 14px;
	max-width: 680px;
	margin: 0 auto 22px;
}

.rd-gca-player {
	margin: 0;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--rd-surface, #FFF);
	box-shadow: 0 10px 30px -22px rgba(50, 1, 49, .5);
}

.rd-gca-player figcaption {
	margin-bottom: 8px;
	color: var(--rd-plum, #320131);
	font-weight: 700;
}

.rd-gca-player audio,
.rd-gca-player video {
	display: block;
	width: 100%;
	border-radius: 10px;
}

.rd-gca-react {
	max-width: 680px;
	margin: 0 auto 22px;
	padding: 16px 18px;
	border-radius: 16px;
	background: var(--rd-cream, #FBF6F3);
	text-align: center;
}

.rd-gca-react-title {
	margin: 0 0 8px;
	font-weight: 700;
}

.rd-gca-react-emojis {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 10px;
}

.rd-gca-react-emoji {
	width: 46px;
	height: 46px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 50%;
	background: #FFF;
	font-size: 22px;
	cursor: pointer;
}

.rd-gca-react-emoji[aria-pressed="true"] {
	box-shadow: 0 0 0 2px var(--rd-berry, #B31E6F);
}

.rd-gca-react-reply {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 10px;
	font: inherit;
}

.rd-gca-react-status {
	min-height: 1.2em;
	margin: 8px 0 0;
	color: #1E5A3E;
	font-weight: 600;
}

#wrapper .rd-gca-manage {
	margin-top: 24px;
}

#wrapper .rd-gca-reactions {
	margin: 0;
	padding: 0;
	list-style: none;
}

#wrapper .rd-gca-reactions li {
	padding: 8px 0;
	border-bottom: 1px solid var(--rd-line, #E8DCE3);
}

.rd-gca-reaction-emoji {
	font-size: 22px;
}

.rd-gca-volume {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 8px;
	font-size: 14px;
}

#wrapper .rd-gca-record {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
}

#wrapper .rd-gca-media-preview audio,
#wrapper .rd-gca-media-preview video {
	width: 100%;
	max-width: 420px;
	margin-top: 8px;
	border-radius: 10px;
}

/* ---------- Aperçu tab ---------- */

#wrapper .rd-gca-devices {
	display: flex;
	gap: 8px;
	margin: 0 0 14px;
}

#wrapper .rd-gca-inline-preview {
	min-height: 120px;
	margin: 0 auto 14px;
	border-radius: 18px;
	background: var(--rd-cream, #FBF6F3);
	transition: max-width .3s ease;
}

#wrapper .rd-gca-inline-preview.is-mobile {
	max-width: 390px;
	padding: 18px 10px;
	border: 10px solid #1F1F24;
	border-radius: 34px;
}

/* ---------- Icons of the new items ---------- */

#wrapper .rd-gca-icon.is-realiste::before { content: "✉"; }
#wrapper .rd-gca-icon.is-sceau::before { content: "◉"; }
#wrapper .rd-gca-icon.is-magique::before { content: "✨"; font-size: 12px; }
#wrapper .rd-gca-icon.is-popup::before { content: "🏰"; font-size: 12px; }
#wrapper .rd-gca-icon.is-coffre::before { content: "🧰"; font-size: 12px; }
#wrapper .rd-gca-icon.is-rideau::before { content: "🎭"; font-size: 12px; }
#wrapper .rd-gca-icon.is-parchemin::before { content: "📜"; font-size: 12px; }
#wrapper .rd-gca-icon.is-paillettes::before { content: "✧"; }
#wrapper .rd-gca-icon.is-bulles::before { content: "○"; }
#wrapper .rd-gca-icon.is-petales::before { content: "❀"; }
#wrapper .rd-gca-icon.is-aurore::before { content: "◠"; }
#wrapper .rd-gca-icon.is-rubans::before { content: "〰"; }
#wrapper .rd-gca-icon.is-fusee::before { content: "🚀"; font-size: 12px; }
#wrapper .rd-gca-icon.is-gratter::before { content: "▦"; }
#wrapper .rd-gca-icon.is-eclater::before { content: "🎈"; font-size: 12px; }
#wrapper .rd-gca-icon.is-de::before { content: "🎲"; font-size: 12px; }
#wrapper .rd-gca-icon.is-puzzle::before { content: "🧩"; font-size: 12px; }
#wrapper .rd-gca-icon.is-cache::before { content: "🔍"; font-size: 12px; }
#wrapper .rd-gca-icon.is-quiz::before { content: "?"; font-weight: 800; }
#wrapper .rd-gca-icon.is-fleur::before { content: "🌱"; font-size: 12px; }
#wrapper .rd-gca-icon.is-attraper::before { content: "♥"; }
.rd-gca-closed-icon.is-realiste::before,
.rd-gca-closed-icon.is-sceau::before,
.rd-gca-closed-icon.is-magique::before { content: "✉"; }
.rd-gca-closed-icon.is-popup::before { content: "🏰"; font-size: 46px; }
.rd-gca-closed-icon.is-coffre::before { content: "🧰"; font-size: 46px; }
.rd-gca-closed-icon.is-rideau::before { content: "🎭"; font-size: 46px; }
.rd-gca-closed-icon.is-parchemin::before { content: "📜"; font-size: 46px; }

/* Reduced motion: still, the message and media at once */
@media (prefers-reduced-motion: reduce) {
	.rd-gca-envl,
	.rd-gca-envl *,
	.rd-gca-balloon,
	.rd-gca-catch-item,
	.rd-gca-hidden-gift,
	.rd-gca-die {
		animation: none !important;
		transition: none !important;
	}

	.rd-gca-catch-item {
		position: static;
	}

	.rd-gca-catch {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		height: auto;
		padding: 16px;
	}
}

@media print {
	.rd-gca-tabs,
	.rd-gca-react,
	.rd-gca-game,
	.rd-gca-media-box {
		display: none !important;
	}
}

/* =====================================================================
 * Lighter page: smaller elements, advanced choices folded, the page's own
 * models and boxes tighter inside the workspace (their markup untouched)
 * ===================================================================== */

#wrapper .rd-gca-workspace .rd-gc-box {
	padding: 22px;
	border-radius: 16px;
}

#wrapper .rd-gca-workspace .rd-title {
	font-size: clamp(19px, 2vw, 23px);
}

#wrapper .rd-gca-workspace .rd-gc-models {
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
}

#wrapper .rd-gca-workspace .rd-gc-tile-name {
	font-size: 13px;
}

#wrapper .rd-gca-workspace .rd-gca-group legend,
#wrapper .rd-gca-workspace .rd-gca-legend {
	margin-bottom: 6px;
	font-size: 14px;
}

#wrapper .rd-gca-workspace .rd-gca-group .rd-gca-choice,
#wrapper .rd-gca-workspace .rd-gca-group.is-inline .rd-gca-pill {
	margin: 0 5px 5px 0;
	padding: 5px 11px 5px 6px;
	font-size: 13px;
}

#wrapper .rd-gca-workspace .rd-gca-group.is-inline .rd-gca-pill {
	padding-left: 11px;
}

#wrapper .rd-gca-workspace .rd-gca-icon {
	width: 22px;
	height: 22px;
	font-size: 12px;
}

#wrapper .rd-gca-workspace .rd-gca-grid {
	gap: 12px 22px;
	margin-bottom: 10px;
}

#wrapper .rd-gca-grid.is-compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 10px;
}

#wrapper .rd-gca-more {
	margin: 6px 0 12px;
	border-top: 1px solid var(--rd-line, #E8DCE3);
}

#wrapper .rd-gca-more > summary {
	padding: 10px 0 4px;
	color: var(--rd-berry, #B31E6F);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

#wrapper .rd-gca-workspace .rd-gc-field textarea,
#wrapper .rd-gca-workspace .rd-gc-field input[type="text"],
#wrapper .rd-gca-workspace .rd-gc-field input[type="email"],
#wrapper .rd-gca-workspace .rd-gc-field input[type="datetime-local"] {
	min-height: 42px;
	padding: 9px 12px;
	font-size: 15px;
}

#wrapper .rd-gca-workspace .rd-gca-swatch span {
	width: 24px;
	height: 24px;
}

#wrapper .rd-gca-text {
	padding: 12px 14px;
}

#wrapper .rd-gca-style {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 18px;
	margin-top: 6px;
}

#wrapper .rd-gca-toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0;
}

#wrapper .rd-gca-pill.is-toggle {
	position: relative;
	display: inline-flex;
	padding: 5px 11px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 999px;
	font-size: 13px;
	cursor: pointer;
}

#wrapper .rd-gca-pill.is-toggle input {
	position: absolute;
	opacity: 0;
}

#wrapper .rd-gca-pill.is-toggle:has(input:checked) {
	border-color: var(--rd-berry, #B31E6F);
	box-shadow: 0 0 0 1px var(--rd-berry, #B31E6F);
}

@media (max-width: 700px) {
	#wrapper .rd-gca-style,
	#wrapper .rd-gca-grid.is-compact {
		grid-template-columns: minmax(0, 1fr);
	}

	#wrapper .rd-gca-workspace .rd-gc-box {
		padding: 16px;
	}
}

/* ---------- Text on the picture: its look ---------- */

.rd-gca-facetext.is-bold { font-weight: 900 !important; }
.rd-gca-facetext:not(.is-bold) { font-weight: 600; }
.rd-gca-facetext.is-italic { font-style: italic; }
.rd-gca-facetext.is-align-left { text-align: left; }
.rd-gca-facetext.is-align-right { text-align: right; }
.rd-gca-facetext.is-flat { text-shadow: none !important; }
.rd-gca-facetext.is-font-moderne { font-family: var(--rd-title-font), "Helvetica Neue", Arial, sans-serif; }

/* ---------- More openings ---------- */

.rd-gca-shutters,
.rd-gca-origami,
.rd-gca-portal {
	position: relative;
	width: min(80vw, 460px);
	aspect-ratio: 16 / 10;
	perspective: 1000px;
}

.rd-gca-shutters-card,
.rd-gca-origami-card,
.rd-gca-portal-card,
.rd-gca-bigballoon-card {
	position: absolute;
	inset: 0;
	border-radius: 10px;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
}

.rd-gca-shutter {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	background: repeating-linear-gradient(0deg, #F3E9E2 0 14px, #E2D2C6 14px 16px);
	box-shadow: inset 0 0 20px rgba(0, 0, 0, .15);
}

.rd-gca-shutter.is-left { left: 0; border-radius: 10px 0 0 10px; transform-origin: left center; }
.rd-gca-shutter.is-right { right: 0; border-radius: 0 10px 10px 0; transform-origin: right center; }

.rd-gca-stage.is-playing .rd-gca-shutter.is-left { animation: gca-shutter-l var(--gca-d) cubic-bezier(.5, 0, .3, 1) forwards; }
.rd-gca-stage.is-playing .rd-gca-shutter.is-right { animation: gca-shutter-r var(--gca-d) cubic-bezier(.5, 0, .3, 1) forwards; }

@keyframes gca-shutter-l {
	0%, 15% { transform: rotateY(0); }
	100% { transform: rotateY(-105deg); }
}

@keyframes gca-shutter-r {
	0%, 15% { transform: rotateY(0); }
	100% { transform: rotateY(105deg); }
}

.rd-gca-polaroid {
	position: relative;
	width: min(64vw, 300px);
	padding: 14px 14px 56px;
	border-radius: 4px;
	background: #FFF;
	box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .8);
	transform: rotate(-4deg);
}

.rd-gca-polaroid-photo,
.rd-gca-polaroid-veil {
	display: block;
	aspect-ratio: 1;
	background: var(--gca-img, none) center / cover no-repeat, var(--gca-bg, #320131);
}

.rd-gca-polaroid-veil {
	position: absolute;
	inset: 14px 14px 56px;
	background: #E9E4DA;
}

.rd-gca-polaroid-caption {
	position: absolute;
	right: 0;
	bottom: 14px;
	left: 0;
	color: var(--rd-berry, #B31E6F);
	font-family: "Segoe Script", "Bradley Hand", cursive;
	font-size: 22px;
	text-align: center;
	opacity: 0;
}

.rd-gca-stage.is-playing .rd-gca-polaroid { animation: gca-polaroid-in var(--gca-d) ease-out forwards; }
.rd-gca-stage.is-playing .rd-gca-polaroid-veil { animation: gca-develop var(--gca-d) ease-in forwards; }
.rd-gca-stage.is-playing .rd-gca-polaroid-caption { animation: gca-caption var(--gca-d) ease forwards; }

@keyframes gca-polaroid-in {
	0% { transform: translateY(40%) rotate(8deg); opacity: 0; }
	25% { transform: translateY(0) rotate(-4deg); opacity: 1; }
	100% { transform: rotate(-2deg) scale(1.05); }
}

@keyframes gca-develop {
	0%, 25% { opacity: 1; filter: none; }
	100% { opacity: 0; }
}

@keyframes gca-caption {
	0%, 70% { opacity: 0; }
	100% { opacity: 1; }
}

.rd-gca-fold {
	position: absolute;
	background: linear-gradient(135deg, #FFFBF7, #EDE2D8);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
	backface-visibility: hidden;
}

.rd-gca-fold.is-top { top: 0; right: 0; left: 0; height: 50%; transform-origin: top; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.rd-gca-fold.is-bottom { bottom: 0; right: 0; left: 0; height: 50%; transform-origin: bottom; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.rd-gca-fold.is-left { top: 0; bottom: 0; left: 0; width: 50%; transform-origin: left; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.rd-gca-fold.is-right { top: 0; bottom: 0; right: 0; width: 50%; transform-origin: right; clip-path: polygon(100% 0, 100% 100%, 0 50%); }

.rd-gca-stage.is-playing .rd-gca-fold.is-left { animation: gca-fold-l var(--gca-d) ease-in-out forwards; }
.rd-gca-stage.is-playing .rd-gca-fold.is-right { animation: gca-fold-r var(--gca-d) ease-in-out forwards; }
.rd-gca-stage.is-playing .rd-gca-fold.is-top { animation: gca-fold-t var(--gca-d) ease-in-out forwards; }
.rd-gca-stage.is-playing .rd-gca-fold.is-bottom { animation: gca-fold-b var(--gca-d) ease-in-out forwards; }

@keyframes gca-fold-l { 0%, 10% { transform: rotateY(0); } 40%, 100% { transform: rotateY(-180deg); } }
@keyframes gca-fold-r { 0%, 20% { transform: rotateY(0); } 50%, 100% { transform: rotateY(180deg); } }
@keyframes gca-fold-t { 0%, 45% { transform: rotateX(0); } 75%, 100% { transform: rotateX(180deg); } }
@keyframes gca-fold-b { 0%, 55% { transform: rotateX(0); } 85%, 100% { transform: rotateX(-180deg); } }

.rd-gca-bigballoon {
	position: relative;
	width: min(70vw, 380px);
	aspect-ratio: 16 / 10;
}

.rd-gca-bigballoon-card {
	opacity: 0;
	transform: scale(.7);
}

.rd-gca-bigballoon-body {
	position: absolute;
	top: -10%;
	left: 50%;
	width: 180px;
	height: 220px;
	border-radius: 50% 50% 46% 46%;
	background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), transparent 30%), var(--rd-berry, #B31E6F);
	transform: translateX(-50%);
}

.rd-gca-bigballoon-string {
	position: absolute;
	top: calc(-10% + 220px);
	left: 50%;
	width: 2px;
	height: 90px;
	background: rgba(255, 255, 255, .6);
}

.rd-gca-bigballoon-bits {
	position: absolute;
	top: 30%;
	left: 50%;
}

.rd-gca-bigballoon-bits i {
	position: absolute;
	width: 12px;
	height: 8px;
	border-radius: 3px;
	background: var(--rd-berry, #B31E6F);
	opacity: 0;
}

.rd-gca-stage.is-playing .rd-gca-bigballoon-body { animation: gca-balloon-pop var(--gca-d) ease-in forwards; }
.rd-gca-stage.is-playing .rd-gca-bigballoon-string { animation: gca-fade-out calc(var(--gca-d) * .5) ease calc(var(--gca-d) * .5) forwards; }
.rd-gca-stage.is-playing .rd-gca-bigballoon-bits i { animation: gca-bits calc(var(--gca-d) * .5) ease-out calc(var(--gca-d) * .5) forwards; }
.rd-gca-stage.is-playing .rd-gca-bigballoon-card { animation: gca-balloon-card var(--gca-d) ease-out forwards; }

@keyframes gca-balloon-pop {
	0% { transform: translateX(-50%) translateY(30px) scale(.9); }
	45% { transform: translateX(-50%) translateY(0) scale(1.15); }
	50% { transform: translateX(-50%) scale(1.25); opacity: 1; }
	52%, 100% { transform: translateX(-50%) scale(1.6); opacity: 0; }
}

@keyframes gca-bits {
	0% { opacity: 1; transform: translate(0, 0) rotate(0); }
	100% { opacity: 0; transform: translate(var(--gca-x), var(--gca-y)) rotate(200deg); }
}

@keyframes gca-balloon-card {
	0%, 50% { opacity: 0; transform: scale(.7); }
	75%, 100% { opacity: 1; transform: scale(1); }
}

.rd-gca-portal-card {
	clip-path: circle(0% at 50% 50%);
}

.rd-gca-portal-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 230, 160, .9);
	border-radius: 50%;
	box-shadow: 0 0 30px 10px rgba(255, 210, 120, .6), inset 0 0 20px rgba(255, 210, 120, .6);
	transform: translate(-50%, -50%);
}

.rd-gca-stage.is-playing .rd-gca-portal-ring { animation: gca-ring var(--gca-d) ease-out forwards; }
.rd-gca-stage.is-playing .rd-gca-portal-ring.is-2 { animation-delay: calc(var(--gca-d) * .15); }
.rd-gca-stage.is-playing .rd-gca-portal-card { animation: gca-iris var(--gca-d) cubic-bezier(.6, 0, .3, 1) forwards; }

@keyframes gca-ring {
	0% { width: 20px; height: 20px; opacity: 1; transform: translate(-50%, -50%) rotate(0); }
	100% { width: 520px; height: 520px; opacity: 0; transform: translate(-50%, -50%) rotate(180deg); }
}

@keyframes gca-iris {
	0%, 20% { clip-path: circle(0% at 50% 50%); }
	100% { clip-path: circle(75% at 50% 50%); }
}

#wrapper .rd-gca-icon.is-volets::before { content: "▥"; }
#wrapper .rd-gca-icon.is-polaroid::before { content: "📷"; font-size: 12px; }
#wrapper .rd-gca-icon.is-origami::before { content: "✉"; }
#wrapper .rd-gca-icon.is-ballon::before { content: "🎈"; font-size: 12px; }
#wrapper .rd-gca-icon.is-portail::before { content: "◎"; }
#wrapper .rd-gca-icon.is-lucioles::before { content: "✺"; }
#wrapper .rd-gca-icon.is-lanternes::before { content: "🏮"; font-size: 12px; }
#wrapper .rd-gca-icon.is-bokeh::before { content: "◍"; }
#wrapper .rd-gca-icon.is-arcenciel::before { content: "🌈"; font-size: 12px; }
#wrapper .rd-gca-icon.is-feuilles::before { content: "🍁"; font-size: 12px; }
#wrapper .rd-gca-icon.is-battement::before { content: "❤"; }
#wrapper .rd-gca-icon.is-parallaxe::before { content: "◈"; }
#wrapper .rd-gca-icon.is-trainee::before { content: "☄"; }
.rd-gca-closed-icon.is-volets::before { content: "▥"; }
.rd-gca-closed-icon.is-polaroid::before { content: "📷"; font-size: 46px; }
.rd-gca-closed-icon.is-origami::before { content: "✉"; }
.rd-gca-closed-icon.is-ballon::before { content: "🎈"; font-size: 46px; }
.rd-gca-closed-icon.is-portail::before { content: "◎"; }

/* ---------- More effects ---------- */

.rd-gca-p.is-lucioles {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	box-shadow: 0 0 12px 4px currentColor;
	color: #FFF2A8;
	animation-name: gca-firefly;
	animation-timing-function: ease-in-out;
	animation-iteration-count: 2;
	animation-direction: alternate;
}

@keyframes gca-firefly {
	0% { opacity: 0; transform: translate(0, 0); }
	30% { opacity: 1; }
	70% { opacity: .4; }
	100% { opacity: 1; transform: translate(var(--gca-x, 0), var(--gca-y, 0)); }
}

.rd-gca-p.is-lanternes {
	bottom: -18%;
	width: var(--gca-w, 22px);
	height: calc(var(--gca-w, 22px) * 1.3);
	border-radius: 30% 30% 45% 45%;
	background: radial-gradient(circle at 50% 70%, #FFE7A0, #F28C28 70%);
	box-shadow: 0 0 22px 6px rgba(255, 170, 60, .55);
	animation-name: gca-rise;
	animation-timing-function: ease-out;
}

.rd-gca-p.is-bokeh {
	width: var(--gca-w, 50px);
	height: var(--gca-w, 50px);
	border-radius: 50%;
	filter: blur(2px);
	mix-blend-mode: screen;
	animation-name: gca-bokeh;
	animation-timing-function: ease-in-out;
}

@keyframes gca-bokeh {
	0%, 100% { opacity: 0; transform: scale(.6); }
	50% { opacity: 1; transform: scale(1); }
}

.rd-gca-p.is-arcenciel {
	top: 10%;
	left: 10%;
	width: 80%;
	height: 150%;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 100%, transparent 52%, #FF6B6B 52% 55%, #FFB86B 55% 58%, #FFE66B 58% 61%, #7BE07B 61% 64%, #6BB8FF 64% 67%, #A78BFA 67% 70%, transparent 70%);
	opacity: 0;
	mix-blend-mode: screen;
	animation-name: gca-rainbow;
	animation-timing-function: ease-in-out;
}

@keyframes gca-rainbow {
	0% { opacity: 0; clip-path: inset(0 100% 0 0); }
	40% { opacity: .85; clip-path: inset(0 0 0 0); }
	80% { opacity: .7; }
	100% { opacity: 0; }
}

.rd-gca-p.is-feuilles {
	top: -8%;
	animation-name: gca-fall;
	animation-timing-function: ease-in-out;
}

.rd-gca-p.is-battement {
	top: 50%;
	left: 50%;
	font-size: clamp(60px, 18vw, 150px);
	opacity: .85;
	text-shadow: 0 0 30px rgba(232, 69, 124, .6);
	transform: translate(-50%, -50%);
	animation-name: gca-beat;
	animation-iteration-count: 4;
}

@keyframes gca-beat {
	0%, 100% { transform: translate(-50%, -50%) scale(.85); opacity: .5; }
	30% { transform: translate(-50%, -50%) scale(1.1); opacity: .9; }
	45% { transform: translate(-50%, -50%) scale(.95); }
	60% { transform: translate(-50%, -50%) scale(1.05); opacity: .8; }
}

/* Immersive: the card in relief, a light on it follows the finger; a trail of stars */
.rd-gca-tilt {
	transform: perspective(900px) rotateX(var(--gca-tx, 0)) rotateY(var(--gca-ty, 0));
	transition: transform .15s ease-out;
}

.rd-gca-tilt::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 4;
	border-radius: inherit;
	background: radial-gradient(circle at var(--gca-gx, 50%) var(--gca-gy, 50%), rgba(255, 255, 255, .28), transparent 50%);
	pointer-events: none;
}

.rd-gca-trail {
	position: absolute;
	z-index: 6;
	font-size: 14px;
	pointer-events: none;
	transform: translate(-50%, -50%);
	animation: gca-trail .9s ease-out forwards;
}

@keyframes gca-trail {
	0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(calc(-50% + var(--gca-x, 0)), 20px) scale(.3); }
}

/* ---------- Voice library ---------- */

#wrapper .rd-gca-voice-search {
	width: 100%;
	min-height: 40px;
	margin: 0 0 8px;
	padding: 8px 12px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 10px;
	font: inherit;
}

#wrapper .rd-gca-voice-results {
	max-height: 260px;
	margin: 0 0 8px;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

#wrapper .rd-gca-voice-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 10px;
}

#wrapper .rd-gca-voice-item.is-chosen {
	background: var(--rd-pink, #FBE4EF);
}

#wrapper .rd-gca-voice-play {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: var(--rd-berry, #B31E6F);
	color: #FFF;
	font-size: 12px;
	cursor: pointer;
}

#wrapper .rd-gca-voice-name {
	flex: 1;
	font-size: 14px;
}

#wrapper .rd-gca-voice-empty {
	padding: 8px;
	color: var(--rd-muted);
	font-size: 14px;
}

/* ---------- Signature pad (signing page) ---------- */

#wrapper .rd-gca-signpad canvas {
	display: block;
	width: 100%;
	max-width: 600px;
	height: auto;
	aspect-ratio: 600 / 180;
	margin-bottom: 6px;
	border: 1px dashed var(--rd-line, #E8DCE3);
	border-radius: 12px;
	background: #FFF;
	touch-action: none;
	cursor: crosshair;
}

/* ---------- The book of messages ---------- */

.rd-gca-book {
	max-width: 760px;
	margin: 26px auto;
	text-align: center;
}

.rd-gca-bookspread {
	position: relative;
	min-height: 300px;
	perspective: 1600px;
	touch-action: pan-y;
}

.rd-gca-bookpage {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	min-height: 300px;
	border-radius: 6px 14px 14px 6px;
	background: linear-gradient(90deg, #EFE6DC 0, #FFFBF6 4%, #FFFBF6 49.6%, #E9DED2 50%, #FFFBF6 50.4%, #FFFBF6 96%, #EFE6DC 100%);
	box-shadow: 0 24px 50px -30px rgba(50, 1, 49, .7);
	transform-origin: left center;
}

.rd-gca-bookpage.is-cover {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .15), transparent 40%), var(--rd-plum, #320131);
	color: #FFF;
}

.rd-gca-bookcover-title {
	margin: 0;
	font-family: var(--rd-title-font);
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 800;
}

.rd-gca-bookcover-for {
	margin: 8px 0 0;
	color: #F7B3CF;
	font-size: 18px;
}

.rd-gca-bookmsg {
	margin: 0;
	padding: 28px 30px;
	text-align: left;
}

.rd-gca-bookmsg blockquote {
	margin: 0 0 12px;
	color: var(--rd-plum, #320131);
	font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
	font-size: 18px;
	line-height: 1.55;
}

.rd-gca-bookmsg figcaption {
	color: var(--rd-berry, #B31E6F);
	font-weight: 700;
}

.rd-gca-bookmsg-sign {
	display: block;
	max-width: 160px;
	margin-top: 6px;
}

.rd-gca-bookpage.is-turn-next { animation: gca-turn-next .6s ease-out; }
.rd-gca-bookpage.is-turn-prev { animation: gca-turn-prev .6s ease-out; }

@keyframes gca-turn-next {
	0% { transform: rotateY(-70deg); opacity: .3; }
	100% { transform: rotateY(0); opacity: 1; }
}

@keyframes gca-turn-prev {
	0% { transform: rotateY(70deg); opacity: .3; }
	100% { transform: rotateY(0); opacity: 1; }
}

.rd-gca-booknav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 14px 0 6px;
}

.rd-gca-bookcount {
	min-width: 110px;
	color: var(--rd-muted);
	font-size: 14px;
}

@media (max-width: 640px) {
	.rd-gca-bookpage {
		grid-template-columns: minmax(0, 1fr);
		background: #FFFBF6;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rd-gca-bookpage,
	.rd-gca-tilt,
	.rd-gca-trail {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}

/* Shorter text areas where a line or two is expected; the style toggles as small pills */
#wrapper .rd-gca-workspace .rd-gca-text textarea,
#wrapper .rd-gca-workspace [data-gca-game-text] textarea {
	min-height: 64px;
	height: 64px;
}

#wrapper .rd-gca-toggles {
	align-items: flex-start;
	align-self: end;
}

#wrapper .rd-gca-workspace .rd-gca-pill.is-toggle {
	display: inline-flex;
	align-items: center;
	height: auto;
	margin: 0;
	line-height: 1.2;
}

#wrapper .rd-gca-book {
	max-width: 820px;
}

.rd-gca-booknav .rd-btn:disabled {
	opacity: .35;
	cursor: default;
}

/* The book takes the width it is given (the page centres its column) */
.rd-gca-book {
	width: 100%;
	align-self: stretch;
}

/* Phones: the live preview as a small floating thumbnail in a corner, the page free under it */
@media (max-width: 900px) {
	#wrapper .rd-gca-workspace > .rd-gca-live {
		position: fixed;
		top: auto;
		right: 12px;
		bottom: 96px;
		z-index: 60;
		order: 0;
		width: 132px;
		padding: 5px;
		border-radius: 14px;
		background: var(--rd-surface, #FFF);
		box-shadow: 0 12px 30px -10px rgba(50, 1, 49, .55);
	}

	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gca-live-stage {
		max-width: none;
		border-radius: 10px;
	}

	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gc-face {
		border-radius: 10px;
	}

	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gc-face-title {
		font-size: 10px;
	}
}

/* ---------- Text on the picture: nine places, free place, background ---------- */

.rd-gca-facetext.is-haut-gauche,
.rd-gca-facetext.is-haut-droite { top: 8%; }
.rd-gca-facetext.is-bas-gauche,
.rd-gca-facetext.is-bas-droite { bottom: 9%; }
.rd-gca-facetext.is-centre-gauche,
.rd-gca-facetext.is-centre-droite { top: 50%; transform: translateY(-50%); }
.rd-gca-facetext:is(.is-haut-gauche, .is-centre-gauche, .is-bas-gauche) { right: 40%; text-align: left; }
.rd-gca-facetext:is(.is-haut-droite, .is-centre-droite, .is-bas-droite) { left: 40%; text-align: right; }

.rd-gca-facetext.is-libre {
	right: auto;
	bottom: auto;
	width: max-content;
	max-width: 88%;
	transform: translate(-50%, -50%);
}

/* The faces of the creation form: the own text can be grabbed and moved */
#wrapper .rd-gca-workspace .rd-gca-facetext {
	pointer-events: auto;
	cursor: grab;
	touch-action: none;
}

#wrapper .rd-gca-workspace .rd-gca-facetext:active {
	cursor: grabbing;
	outline: 1px dashed rgba(255, 255, 255, .8);
	outline-offset: 4px;
}

.rd-gca-facetext.has-back {
	text-shadow: none;
}

.rd-gca-facetext.is-back-etiquette {
	justify-self: center;
	width: max-content;
	max-width: 88%;
	margin: 0 auto;
	padding: .25em .7em;
	border-radius: .6em;
	background: color-mix(in srgb, var(--gca-tbg, #000) 78%, transparent);
}

.rd-gca-facetext.is-back-etiquette:is(.is-haut, .is-centre, .is-bas) {
	left: 50%;
	right: auto;
}

.rd-gca-facetext.is-back-etiquette.is-haut,
.rd-gca-facetext.is-back-etiquette.is-bas { transform: translateX(-50%); }
.rd-gca-facetext.is-back-etiquette.is-centre { transform: translate(-50%, -50%); }

.rd-gca-facetext.is-back-bandeau {
	right: 0;
	left: 0;
	padding: .35em 6%;
	background: color-mix(in srgb, var(--gca-tbg, #000) 72%, transparent);
}

.rd-gca-facetext.is-back-degrade {
	right: 0;
	left: 0;
	padding: 1.4em 6% .5em;
	background: linear-gradient(to top, color-mix(in srgb, var(--gca-tbg, #000) 85%, transparent), transparent);
}

.rd-gca-facetext.is-back-degrade:is(.is-haut, .is-haut-gauche, .is-haut-droite) {
	padding: .5em 6% 1.4em;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--gca-tbg, #000) 85%, transparent), transparent);
}

.rd-gca-facetext.is-back-flou {
	width: max-content;
	max-width: 88%;
	padding: .3em .8em;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: .6em;
	background: color-mix(in srgb, var(--gca-tbg, #FFF) 30%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.rd-gca-facetext.is-back-flou:is(.is-haut, .is-centre, .is-bas) {
	left: 50%;
	right: auto;
}

.rd-gca-facetext.is-back-flou.is-haut,
.rd-gca-facetext.is-back-flou.is-bas { transform: translateX(-50%); }
.rd-gca-facetext.is-back-flou.is-centre { transform: translate(-50%, -50%); }

/* The grid of the nine places */
#wrapper .rd-gca-positions {
	min-width: 0;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
}

#wrapper .rd-gca-posgrid {
	display: inline-grid;
	grid-template-columns: repeat(3, 26px);
	gap: 4px;
	padding: 5px;
	border-radius: 10px;
	background: var(--rd-surface, #FFF);
	box-shadow: 0 0 0 1px var(--rd-line, #E8DCE3);
	vertical-align: middle;
}

#wrapper .rd-gca-poscell {
	position: relative;
	display: block;
	width: 26px;
	height: 18px;
	margin: 0;
	cursor: pointer;
}

#wrapper .rd-gca-poscell input {
	position: absolute;
	opacity: 0;
}

#wrapper .rd-gca-poscell span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 4px;
	background: var(--rd-pink, #FBE4EF);
}

#wrapper .rd-gca-poscell:has(input:checked) span {
	background: var(--rd-berry, #B31E6F);
}

#wrapper .rd-gca-poscell:has(input:focus-visible) span {
	outline: 2px solid var(--rd-berry, #B31E6F);
	outline-offset: 2px;
}

#wrapper .rd-gca-positions .rd-gca-pill.is-free {
	position: relative;
	display: inline-flex;
	margin: 0 0 0 10px;
	padding: 5px 11px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 999px;
	font-size: 13px;
	vertical-align: middle;
	cursor: pointer;
}

#wrapper .rd-gca-positions .rd-gca-pill.is-free input {
	position: absolute;
	opacity: 0;
}

#wrapper .rd-gca-positions .rd-gca-pill.is-free:has(input:checked) {
	border-color: var(--rd-berry, #B31E6F);
	box-shadow: 0 0 0 1px var(--rd-berry, #B31E6F);
}

#wrapper .rd-gca-positions .rd-gc-help {
	margin: 6px 0 0;
	font-size: 12px;
}

/* ---------- Folded sections (« Personnalisez votre carte », the card's animations) ---------- */

#wrapper .rd-gca-fold-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
}

#wrapper .rd-gca-fold-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	padding: 6px 12px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 999px;
	background: var(--rd-surface, #FFF);
	color: var(--rd-berry, #B31E6F);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

#wrapper .rd-gca-fold-arrow {
	transition: transform .2s ease;
}

#wrapper .rd-gca-fold-toggle[aria-expanded="true"] .rd-gca-fold-arrow {
	transform: rotate(180deg);
}

/* Folded: only the heading shows */
#wrapper .rd-gca-folded > :not(h2):not(.rd-gca-steps) {
	display: none !important;
}

#wrapper .rd-gca-folded > h2 {
	margin-bottom: 0;
}

/* One preview only: the live one on the right (the page's own, inside « Personnalisez votre carte », kept but unseen) */
#wrapper .rd-gca-workspace .rd-gc-custom .rd-gc-preview-col {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

#wrapper .rd-gca-workspace .rd-gc-custom .rd-gc-custom-grid {
	grid-template-columns: minmax(0, 1fr);
}

/* ---------- « Charger les réglages de ce modèle ? » ---------- */

.rd-gca-confirm-box {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(30, 6, 30, .55);
}

.rd-gca-confirm-inner {
	max-width: 420px;
	padding: 24px;
	border-radius: 18px;
	background: var(--rd-surface, #FFF);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
	color: var(--rd-plum, #320131);
	font-size: 16px;
	text-align: center;
}

.rd-gca-confirm-inner .rd-gca-actions {
	justify-content: center;
	margin-top: 16px;
}

/* ---------- Team: save as the model's preset ---------- */

#wrapper .rd-gca-preset-save {
	display: grid;
	gap: 6px;
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px dashed var(--rd-line, #E8DCE3);
}

#wrapper .rd-gca-preset-save[hidden] {
	display: none;
}

#wrapper .rd-gca-preset-status {
	color: #1E5A3E;
	font-size: 12px;
}

@media (max-width: 900px) {
	#wrapper .rd-gca-workspace > .rd-gca-live .rd-gca-preset-save {
		display: none;
	}
}

/* ---------- « Pour qui est la carte ? », first ---------- */

#wrapper .rd-gca-recipient {
	display: grid;
	gap: 8px;
}

#wrapper .rd-gca-recipient .rd-title {
	margin: 0;
}

#wrapper .rd-gca-recipient input {
	max-width: 420px;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 12px;
	background: var(--rd-surface, #FFF);
	color: var(--rd-plum, #320131);
	font: inherit;
	font-size: 18px;
}

#wrapper .rd-gca-recipient input:focus {
	border-color: var(--rd-berry, #B31E6F);
	outline: 2px solid color-mix(in srgb, var(--rd-berry, #B31E6F) 20%, transparent);
}

#wrapper .rd-gca-recipient .rd-gc-help {
	margin: 0;
}

/* The page's own fields that ours replace (first name typed above, one text on the card, one image field): kept, unseen */
#wrapper .rd-gca-workspace .rd-gca-mirrored,
#wrapper .rd-gca-workspace .rd-gc-custom [data-field="titre"],
#wrapper .rd-gca-workspace .rd-gc-custom .rd-gc-photo {
	display: none !important;
}

/* « Suivant » under the models */
#wrapper .rd-gca-steps-carte {
	clear: both;
}

/* ---------- Image drop zone ---------- */

#wrapper .rd-gca-drop {
	position: relative;
	border: 2px dashed var(--rd-line, #E8DCE3);
	border-radius: 16px;
	background: var(--rd-cream, #FBF6F3);
	transition: border-color .2s ease, background .2s ease;
}

#wrapper .rd-gca-drop.is-over {
	border-color: var(--rd-berry, #B31E6F);
	background: var(--rd-pink, #FBE4EF);
}

#wrapper .rd-gca-drop-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 22px 16px;
	text-align: center;
}

#wrapper .rd-gca-drop-empty[hidden],
#wrapper .rd-gca-drop-full[hidden] {
	display: none;
}

#wrapper .rd-gca-drop-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--rd-surface, #FFF);
	color: var(--rd-berry, #B31E6F);
	box-shadow: 0 6px 16px -10px rgba(50, 1, 49, .5);
}

#wrapper .rd-gca-drop label.rd-btn {
	display: inline-flex;
	margin: 0;
	color: #FFF;
	cursor: pointer;
}

#wrapper .rd-gca-drop label.rd-btn.is-outline {
	color: var(--rd-plum, #320131);
}

#wrapper .rd-gca-drop .rd-gc-help {
	margin: 0;
	font-size: 13px;
}

#wrapper .rd-gca-drop-full {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 12px;
}

#wrapper .rd-gca-drop-full img {
	width: 96px;
	aspect-ratio: 16 / 10;
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 6px 16px -10px rgba(50, 1, 49, .6);
}

#wrapper .rd-gca-drop-name {
	flex: 1;
	min-width: 120px;
	overflow: hidden;
	color: var(--rd-plum, #320131);
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#wrapper .rd-gca-drop:has(input:focus-visible) {
	outline: 2px solid var(--rd-berry, #B31E6F);
	outline-offset: 3px;
}

/* The closure on the flap's tip: its own place (the « inset: auto » above wins over top/left otherwise) */
.rd-gca-envl > .rd-gca-envl-close {
	top: 46% !important;
	right: auto !important;
	bottom: auto !important;
	left: 50% !important;
}

.rd-gca-envl.is-closure-ruban > .rd-gca-envl-close {
	top: 0 !important;
	bottom: 0 !important;
	left: 46% !important;
	height: auto;
}

/* ---------- Envelope editor: closed and open, the opening played in the same frame ---------- */

#wrapper .rd-gca-env-side {
	position: sticky;
	top: 100px;
}

#wrapper .rd-gca-env-side[hidden],
#wrapper .rd-gca-env-fields[hidden] {
	display: none;
}

#wrapper .rd-gca-env-preview {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	min-height: 220px;
	padding: 54px 14px 14px;
	overflow: hidden;
}

#wrapper .rd-gca-env-view {
	margin: 0;
	text-align: center;
}

#wrapper .rd-gca-env-view figcaption {
	margin-top: 4px;
	color: var(--rd-muted);
	font-size: 12px;
	font-weight: 600;
}

#wrapper .rd-gca-env-view .rd-gca-envl {
	width: 100%;
	margin: 0 auto;
	box-shadow: none;
}

#wrapper .rd-gca-env-play {
	margin: 10px 0 0;
	text-align: center;
}

/* Open: the flap up, its lining and pattern seen, the card peeking out; no closure */
.rd-gca-envl.is-editor-open {
	perspective: 600px;
}

.rd-gca-envl.is-editor-open .rd-gca-envl-flap {
	z-index: 1;
	transform: rotateX(180deg);
}

.rd-gca-envl.is-editor-open .rd-gca-envl-flap-lining {
	opacity: 1;
}

.rd-gca-envl.is-editor-open .rd-gca-envl-card {
	z-index: 2;
	transform: translateY(-38%);
}

.rd-gca-envl.is-editor-open .rd-gca-envl-close,
.rd-gca-envl.is-editor-open .rd-gca-envl-text,
.rd-gca-envl.is-editor-open .rd-gca-envl-stamp {
	display: none;
}

.rd-gca-envl.is-editor .rd-gca-envl-card {
	background: linear-gradient(135deg, #FFFBF7, #F3E9E2);
}

/* The opening playing in the editor's frame */
#wrapper .rd-gca-env-preview .rd-gca-stage.is-inline {
	z-index: 5;
	border-radius: 14px;
}

#wrapper .rd-gca-env-preview .rd-gca-stage .rd-gca-scene {
	transform: scale(.6);
}

#wrapper .rd-gca-env-preview .rd-gca-stage .rd-gca-skip {
	display: none;
}

/* ---------- Image chooser, as a list's cover ---------- */

#wrapper .rd-gca-drop {
	border: 0;
	background: none;
}

#wrapper .rd-gca-drop-frame {
	position: relative;
	aspect-ratio: 16 / 7;
	overflow: hidden;
	border: 1px solid var(--rd-line, #E8DCE3);
	border-radius: 14px;
	background: center / cover no-repeat, var(--rd-cream, #FBF6F3);
}

#wrapper .rd-gca-drop-frame.is-empty {
	background-image: radial-gradient(circle at 20% 30%, rgba(179, 30, 111, .12) 0 18px, transparent 19px), radial-gradient(circle at 70% 60%, rgba(179, 30, 111, .1) 0 26px, transparent 27px), linear-gradient(135deg, #FBE4EF, #FFFBF7) !important;
}

#wrapper .rd-gca-drop.is-over .rd-gca-drop-frame {
	border-color: var(--rd-berry, #B31E6F);
	box-shadow: 0 0 0 2px var(--rd-berry, #B31E6F);
}

#wrapper .rd-gca-drop-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgba(50, 1, 49, .75);
	color: #FFF;
	font-size: 11px;
	font-weight: 700;
}

#wrapper .rd-gca-drop-btn {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 12px;
	border-radius: 8px;
	background: #FFF;
	box-shadow: 0 6px 16px -8px rgba(50, 1, 49, .45);
	color: var(--rd-plum, #320131);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

#wrapper .rd-gca-drop .rd-gc-help {
	margin: 6px 0 0;
	font-size: 12px;
}

#wrapper .rd-gca-drop:has(input:focus-visible) .rd-gca-drop-btn {
	outline: 2px solid var(--rd-berry, #B31E6F);
	outline-offset: 2px;
}

/* ---------- Music in the live preview ---------- */

#wrapper .rd-gca-live-music {
	margin: 10px 0 0;
	text-align: center;
}

/* Sizes in proportion to the envelope (small views of the editor as on the full stage) */
.rd-gca-envl {
	container-type: inline-size;
}

.rd-gca-envl > .rd-gca-envl-close {
	width: 14cqw;
	height: 14cqw;
	min-width: 22px;
	min-height: 22px;
}

.rd-gca-envl.is-closure-cachet > .rd-gca-envl-close {
	width: 10cqw;
	height: 10cqw;
}

.rd-gca-envl.is-closure-autocollant .rd-gca-envl-close::before,
.rd-gca-envl.is-closure-ruban .rd-gca-envl-close::after {
	font-size: 10cqw;
}

.rd-gca-envl.is-closure-ruban > .rd-gca-envl-close {
	width: 6cqw;
	min-width: 6px;
	height: auto;
}

.rd-gca-envl-text {
	bottom: 9% !important;
	font-size: clamp(11px, 7cqw, 30px);
	line-height: 1.1;
}

/* The flap told apart from the front, whatever the colour */
.rd-gca-envl-flap {
	background: linear-gradient(to bottom, color-mix(in srgb, var(--env-color) 82%, #FFF), color-mix(in srgb, var(--env-color) 88%, #000)) !important;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18));
}
