/**
 * Kartu QR Tamu (di-guest-qr widget) — the card's base look.
 *
 * Registered through Di_Elementor::WIDGET_ASSETS under the handle
 * `di-guest-card` and loaded only where the widget is used. The launcher pill
 * and its dialog are styled elsewhere (public/css/di-guest-qr.css).
 *
 * This file IS the look of a card nobody styled: the delivered design, layouts
 * V1 (photo) and V3 (no photo). The widget's style controls carry no defaults
 * (ADR 0013), so a template changes the look only by setting a control, and
 * the palette controls do it through the custom properties on the root.
 *
 * Rules that are not cosmetic:
 *
 * 1. Fluid, not the design's 720px artboard. The root is a size container and
 *    every size scales with `--di-u`, one hundredth of the card's width
 *    (`cqi`), clamped so a 350px phone card keeps the proportions with text a
 *    guest can still read. Browsers without container units fall back to
 *    `vw`, which on a phone, where the card spans the screen, is the same.
 * 2. The QR box stays large enough to scan at the door. It never drops under
 *    200px, and V1 stacks its two columns below 600px of card width rather
 *    than squeezing the QR next to the names.
 * 3. Type is declared, not inherited: the templates set display faces on
 *    body. Philosopher ships regular and italic only (ADR 0012), so no rule
 *    here asks it for bold and `font-synthesis: style` keeps a browser from
 *    faking one when a template's typography control does.
 * 4. The QR field is white whatever the card background is set to, because
 *    scanners fail on a tinted field far more often than on a small symbol.
 * 5. Selectors that touch <img> carry two classes: Elementor's own
 *    `.elementor img { height: auto }` would otherwise flatten the photo.
 * 6. No flex `gap`. Flex gap is Chrome 84 / iOS Safari 14.5, above the device
 *    floor these invitations are opened on (the same note heads
 *    di-invitation-widgets.css), and it degrades to zero there, which on a
 *    card shown at the door runs the guest's name into the label above it.
 *    Space between flex items is an adjacent-sibling margin. Grid gap is far
 *    older and stays on the two grid rules, each after `grid-gap` for the
 *    browsers that only know the prefixed name.
 * 7. A real card arrives with its Keterangan row and pax line hidden and
 *    empty; public/js/di-guest-qr.js fills and shows them (see the widget
 *    class). `[hidden]` must beat the flex display rules below, and V3 lays
 *    the name across both columns until the script adds
 *    `di-guest-card--labelled`.
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
	font-family: "Philosopher";
	src: url("../fonts/Philosopher-Regular-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
		U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Philosopher";
	src: url("../fonts/Philosopher-Regular-latin-ext.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
		U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
		U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Philosopher";
	src: url("../fonts/Philosopher-Italic-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
		U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Philosopher";
	src: url("../fonts/Philosopher-Italic-latin-ext.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
		U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
		U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("../fonts/PlusJakartaSans-Variable-latin.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
		U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("../fonts/PlusJakartaSans-Variable-latin-ext.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
		U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
		U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------- the wrapper */

/*
 * Elementor's wrapper around the widget takes the full width of its
 * container. A template section that centres its children (a flex column
 * with `align-items: center`, as ta01, ta02, ta04, ta06 and ta08 do) sizes
 * a child with no width of its own to its content, and the card's content is
 * fluid to the wrapper, so the wrapper came out 0px wide and the card
 * vanished. One class on purpose: Elementor writes a widget's own Width
 * control (`_element_width`, `_element_custom_width`) at
 * `.elementor-N .elementor-element.elementor-element-ID`, which beats it.
 */
.elementor-widget-di-guest-qr {
	width: 100%;
	max-width: 100%;
}

/* ------------------------------------------------------------------- root */

/*
 * The card's edge. Without one the card melted into its section: the cream
 * body into a cream or white section, the dark bands into a dark one. It is
 * two layers, because no single color stands out on both kinds of section:
 *
 *   1. a 2px border in the accent (the gilt edge of a printed card, the same
 *      gold as V3's band line, its rule and the kicker), which carries a
 *      dark section, and
 *   2. a 1px ring in the card's dark color right outside it, which carries a
 *      light section, where the accent is too pale,
 *
 * then a soft shadow that lifts the card off a light section. WCAG 2
 * non-text contrast of the base colors, the stronger layer in brackets:
 *
 *   section #52250D  accent 6.12:1 [ring 1.25:1]
 *   section #141414  accent 8.75:1 [ring 1.14:1]
 *   section #F6E7D7  ring 13.29:1  [accent 1.74:1]
 *   section #FFFFFF  ring 16.11:1  [accent 2.11:1]
 *
 * Each clears the 3:1 a visible boundary needs. On a photo, whichever layer
 * the photo is not close to shows, and the two never fail together by much.
 *
 * Also tried: a light inner ring with the dark ring outside. It passes the
 * same four sections, but its white edge follows no template's palette and
 * reads as a photo print's margin, where the accent reads as part of the
 * card. Both layers follow the template: `accent_color` sets
 * --di-card-accent, `head_background_color` sets --di-card-dark.
 *
 * A template still replaces it: the widget's Border control writes the
 * border, and its Box Shadow control the ring and the shadow, each at
 * {{WRAPPER}} .di-guest-card, four classes against this rule's one.
 */
.di-guest-card {
	--di-card-bg: #FBF8F5;
	--di-card-dark: #26201A;
	--di-card-band-ink: #EAE6E3;
	--di-card-accent: #DBAA6A;
	--di-card-accent-ink: #8A5A16;
	--di-card-ink: #2A2520;
	--di-card-muted: #6F655D;
	--di-u: 1vw;

	container-type: inline-size;
	container-name: di-guest-card;
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	overflow: hidden;
	isolation: isolate;
	background: var(--di-card-bg);
	border: 2px solid var(--di-card-accent);
	box-shadow: 0 0 0 1px var(--di-card-dark), 0 12px 28px -12px rgba(20, 14, 8, 0.45);
	color: var(--di-card-ink);
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	font-synthesis: style;
	-webkit-font-smoothing: antialiased;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

@supports (width: 1cqi) {

	.di-guest-card {
		--di-u: 1cqi;
	}
}

.di-guest-card *,
.di-guest-card *::before,
.di-guest-card *::after {
	box-sizing: border-box;
}

/* A row the browser has not filled stays hidden whatever display it has. */
.di-guest-card [hidden] {
	display: none !important;
}

/* The pill moves focus here (tabindex="-1"); the scroll is the feedback. */
.di-guest-card:focus {
	outline: none;
}

/* ------------------------------------------------------------ shared parts */

.di-guest-card__head {
	position: relative;
	flex: 0 0 auto;
	overflow: hidden;
	background: var(--di-card-dark);
	color: var(--di-card-band-ink);
}

.di-guest-card .di-guest-card__photo {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: center;
}

.di-guest-card__scrim {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	pointer-events: none;
}

.di-guest-card__top,
.di-guest-card__headline {
	position: relative;
	z-index: 3;
}

.di-guest-card .di-guest-card__logo {
	display: block;
	height: auto;
	max-width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	/* The shipped wordmark is the gold one; the design wants it white. */
	filter: brightness(0) invert(1);
}

.di-guest-card__hashtag {
	font-family: "Philosopher", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.di-guest-card__headline {
	display: flex;
	flex-direction: column;
}

.di-guest-card__kicker {
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.di-guest-card__names {
	font-family: "Philosopher", Georgia, serif;
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.005em;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.di-guest-card__meta {
	display: flex;
	flex-direction: column;
	font-weight: 500;
}

.di-guest-card__qr {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	max-width: 100%;
	/*
	 * No padding: the symbol carries its own four-module quiet zone (the
	 * encoder's margin, shared with the dialog), which is about the design's
	 * 16px at full size. Padding on top of it only shrinks the modules.
	 */
	padding: 0;
	background: #ffffff;
	border: 1.5px solid rgba(42, 37, 32, 0.9);
	border-color: color-mix(in srgb, var(--di-card-ink) 90%, transparent);
	border-radius: 4px;
}

.di-guest-card__qr svg {
	display: block;
	width: 100%;
	height: 100%;
	shape-rendering: crispEdges;
}

.di-guest-card__fields,
.di-guest-card__field {
	min-width: 0;
}

.di-guest-card__field {
	display: flex;
	flex-direction: column;
}

.di-guest-card__label {
	font-weight: 500;
	line-height: 1.3;
	color: var(--di-card-muted);
}

.di-guest-card__value {
	font-family: "Philosopher", Georgia, serif;
	font-weight: 400;
	line-height: 1.15;
	color: var(--di-card-ink);
	overflow-wrap: anywhere;
	word-break: break-word;
}

.di-guest-card__pax {
	font-weight: 700;
	line-height: 1.3;
}

.di-guest-card__pax b {
	font-weight: 700;
	color: var(--di-card-accent-ink);
}

.di-guest-card__note {
	margin: 0;
	font-family: "Philosopher", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	color: var(--di-card-muted);
}

.di-guest-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	background: var(--di-card-dark);
	color: var(--di-card-band-ink);
}

.di-guest-card .di-guest-card__foot > * + * {
	margin-left: 14px;
}

.di-guest-card__url {
	font-weight: 600;
	font-size: clamp(10px, calc(1.94 * var(--di-u)), 14px);
	letter-spacing: 0.04em;
	opacity: 0.8;
}

/* ---------------------------------------------------------- V1, with photo */

.di-guest-card--v1 .di-guest-card__head {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: clamp(220px, calc(61.11 * var(--di-u)), 440px);
	padding: clamp(16px, calc(4.17 * var(--di-u)), 30px) clamp(16px, calc(6.67 * var(--di-u)), 48px) clamp(18px, calc(6.11 * var(--di-u)), 44px);
}

.di-guest-card--v1 .di-guest-card__pattern {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	height: 34%;
	opacity: 0.4;
	background-image: url("../brand/di-flower-tile.svg");
	background-repeat: repeat;
	background-size: clamp(34px, calc(9.44 * var(--di-u)), 68px) clamp(34px, calc(9.44 * var(--di-u)), 68px);
	-webkit-mask-image: linear-gradient(to top, #000 60%, transparent 100%);
	mask-image: linear-gradient(to top, #000 60%, transparent 100%);
	mix-blend-mode: screen;
	pointer-events: none;
}

.di-guest-card--v1 .di-guest-card__scrim {
	background: linear-gradient(to bottom, rgba(38, 32, 26, 0.55) 0%, rgba(38, 32, 26, 0.1) 30%, rgba(38, 32, 26, 0.72) 62%, rgba(38, 32, 26, 0.96) 100%);
	background: linear-gradient(to bottom, color-mix(in srgb, var(--di-card-dark) 55%, transparent) 0%, color-mix(in srgb, var(--di-card-dark) 10%, transparent) 30%, color-mix(in srgb, var(--di-card-dark) 72%, transparent) 62%, color-mix(in srgb, var(--di-card-dark) 96%, transparent) 100%);
}

.di-guest-card--v1 .di-guest-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* The head's space above the headline. A margin on the headline would
	   fight its own `margin-top: auto`, which keeps it at the bottom when
	   the top row is switched off. */
	margin-bottom: clamp(16px, calc(4 * var(--di-u)), 32px);
}

.di-guest-card--v1 .di-guest-card__top > * + * {
	margin-left: 16px;
}

.di-guest-card--v1 .di-guest-card__logo {
	width: clamp(72px, calc(20.83 * var(--di-u)), 150px);
}

.di-guest-card--v1 .di-guest-card__hashtag {
	font-size: clamp(10px, calc(1.81 * var(--di-u)), 13px);
	text-align: right;
}

.di-guest-card--v1 .di-guest-card__headline {
	margin-top: auto;
}

.di-guest-card--v1 .di-guest-card__headline > * + * {
	margin-top: clamp(6px, calc(1.94 * var(--di-u)), 14px);
}

.di-guest-card--v1 .di-guest-card__kicker {
	font-size: clamp(10px, calc(2.36 * var(--di-u)), 17px);
	color: var(--di-card-band-ink);
}

.di-guest-card--v1 .di-guest-card__names {
	font-size: clamp(26px, calc(7.22 * var(--di-u)), 52px);
}

.di-guest-card--v1 .di-guest-card__meta {
	font-size: clamp(12px, calc(2.78 * var(--di-u)), 20px);
	line-height: 1.35;
	opacity: 0.92;
}

.di-guest-card--v1 .di-guest-card__meta > * + * {
	margin-top: 4px;
}

.di-guest-card--v1 .di-guest-card__body {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	grid-gap: clamp(20px, calc(5 * var(--di-u)), 36px);
	gap: clamp(20px, calc(5 * var(--di-u)), 36px);
	padding: clamp(24px, calc(7.22 * var(--di-u)), 52px) clamp(16px, calc(6.67 * var(--di-u)), 48px) clamp(20px, calc(5.56 * var(--di-u)), 40px);
}

.di-guest-card--v1 .di-guest-card__qr {
	width: clamp(200px, calc(37.22 * var(--di-u)), 268px);
	height: clamp(200px, calc(37.22 * var(--di-u)), 268px);
}

.di-guest-card--v1 .di-guest-card__fields {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.di-guest-card--v1 .di-guest-card__fields > * + * {
	margin-top: clamp(14px, calc(3.61 * var(--di-u)), 26px);
}

/* In V1 the pax line reads as part of the Keterangan row above it. With no
   label shown it keeps the full row spacing, as its own row. */
.di-guest-card--v1 .di-guest-card__field--info:not([hidden]) + .di-guest-card__pax {
	margin-top: 6px;
}

.di-guest-card--v1 .di-guest-card__field > * + * {
	margin-top: 6px;
}

.di-guest-card--v1 .di-guest-card__label {
	font-size: clamp(12px, calc(2.78 * var(--di-u)), 20px);
}

.di-guest-card--v1 .di-guest-card__value {
	font-size: clamp(20px, calc(4.17 * var(--di-u)), 30px);
}

.di-guest-card--v1 .di-guest-card__pax {
	font-size: clamp(14px, calc(3.33 * var(--di-u)), 24px);
}

.di-guest-card--v1 .di-guest-card__note {
	padding: 0 clamp(16px, calc(6.67 * var(--di-u)), 48px) clamp(22px, calc(6.11 * var(--di-u)), 44px);
	font-size: clamp(13px, calc(2.78 * var(--di-u)), 20px);
}

.di-guest-card--v1 .di-guest-card__foot {
	padding: clamp(14px, calc(3.61 * var(--di-u)), 26px) clamp(16px, calc(6.67 * var(--di-u)), 48px);
}

.di-guest-card--v1 .di-guest-card__foot .di-guest-card__logo {
	width: clamp(80px, calc(21.94 * var(--di-u)), 158px);
}

/*
 * V1 on a narrow card: one column, QR on top at scanning size. The same
 * rules twice, once for container queries and once, by viewport, for the
 * browsers without them (a phone card spans the screen, so the two agree).
 */
@container di-guest-card (max-width: 599px) {

	.di-guest-card--v1 .di-guest-card__body {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}

	.di-guest-card--v1 .di-guest-card__qr {
		width: clamp(200px, calc(72 * var(--di-u)), 268px);
		height: clamp(200px, calc(72 * var(--di-u)), 268px);
	}

	.di-guest-card--v1 .di-guest-card__fields {
		width: 100%;
		align-items: center;
	}
}

@supports not (container-type: inline-size) {

	@media (max-width: 599px) {

		.di-guest-card--v1 .di-guest-card__body {
			grid-template-columns: minmax(0, 1fr);
			justify-items: center;
			text-align: center;
		}

		.di-guest-card--v1 .di-guest-card__qr {
			width: clamp(200px, calc(72 * var(--di-u)), 268px);
			height: clamp(200px, calc(72 * var(--di-u)), 268px);
		}

		.di-guest-card--v1 .di-guest-card__fields {
			width: 100%;
			align-items: center;
		}
	}
}

/* ----------------------------------------------------------- V3, no photo */

.di-guest-card--v3 .di-guest-card__head {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(104px, calc(29.17 * var(--di-u)), 210px);
	padding: 16px;
}

.di-guest-card--v3 .di-guest-card__head--bare {
	min-height: clamp(24px, calc(6.67 * var(--di-u)), 48px);
}

.di-guest-card--v3 .di-guest-card__head::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	height: 3px;
	background: linear-gradient(to right, transparent, var(--di-card-accent) 22%, var(--di-card-accent) 78%, transparent);
}

.di-guest-card--v3 .di-guest-card__scrim {
	background: radial-gradient(120% 100% at 50% 0%, rgba(219, 170, 106, 0.16) 0%, rgba(38, 32, 26, 0) 62%);
	background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--di-card-accent) 16%, transparent) 0%, transparent 62%);
}

.di-guest-card--v3 .di-guest-card__top {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.di-guest-card--v3 .di-guest-card__top > * + * {
	margin-top: clamp(8px, calc(1.94 * var(--di-u)), 14px);
}

.di-guest-card--v3 .di-guest-card__logo {
	width: clamp(80px, calc(23.33 * var(--di-u)), 168px);
}

.di-guest-card--v3 .di-guest-card__hashtag {
	font-size: clamp(10px, calc(1.81 * var(--di-u)), 13px);
	color: var(--di-card-accent);
}

.di-guest-card--v3 .di-guest-card__headline {
	align-items: center;
	padding: clamp(24px, calc(6.11 * var(--di-u)), 44px) clamp(16px, calc(6.67 * var(--di-u)), 48px) 0;
	text-align: center;
}

.di-guest-card--v3 .di-guest-card__headline > * + * {
	margin-top: clamp(6px, calc(1.67 * var(--di-u)), 12px);
}

.di-guest-card--v3 .di-guest-card__kicker {
	font-size: clamp(10px, calc(2.22 * var(--di-u)), 16px);
	color: var(--di-card-accent-ink);
}

.di-guest-card--v3 .di-guest-card__names {
	font-size: clamp(26px, calc(6.94 * var(--di-u)), 50px);
	color: var(--di-card-ink);
}

.di-guest-card--v3 .di-guest-card__meta {
	font-size: clamp(12px, calc(2.64 * var(--di-u)), 19px);
	line-height: 1.4;
	color: var(--di-card-muted);
}

.di-guest-card--v3 .di-guest-card__meta > * + * {
	margin-top: 3px;
}

.di-guest-card--v3 .di-guest-card__rule {
	width: clamp(64px, calc(16.67 * var(--di-u)), 120px);
	height: 1.5px;
	margin: 8px 0 0;
	background: var(--di-card-accent);
}

/* The design's 8px under the meta, on top of the headline's row spacing. */
.di-guest-card--v3 .di-guest-card__headline > * + .di-guest-card__rule {
	margin-top: calc(clamp(6px, calc(1.67 * var(--di-u)), 12px) + 8px);
}

.di-guest-card--v3 .di-guest-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: clamp(20px, calc(4.72 * var(--di-u)), 34px) clamp(16px, calc(6.67 * var(--di-u)), 48px) clamp(20px, calc(4.17 * var(--di-u)), 30px);
}

.di-guest-card--v3 .di-guest-card__body > * + * {
	margin-top: clamp(18px, calc(4.17 * var(--di-u)), 30px);
}

.di-guest-card--v3 .di-guest-card__qr {
	width: clamp(200px, calc(72 * var(--di-u)), 258px);
	height: clamp(200px, calc(72 * var(--di-u)), 258px);
}

.di-guest-card--v3 .di-guest-card__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-gap: clamp(14px, calc(3.06 * var(--di-u)), 22px) clamp(16px, calc(5.56 * var(--di-u)), 40px);
	gap: clamp(14px, calc(3.06 * var(--di-u)), 22px) clamp(16px, calc(5.56 * var(--di-u)), 40px);
	width: 100%;
	text-align: center;
}

/* Until a label is shown beside it, the guest's name is the only field:
   centre it across both columns. The Keterangan row is in the markup but
   hidden, so this cannot key off the row's absence. */
.di-guest-card--v3:not(.di-guest-card--labelled) .di-guest-card__fields > .di-guest-card__field:first-child {
	grid-column: 1 / -1;
}

/*
 * A phone-width V3 card gives each column about 140px, which breaks a long
 * guest name ("Bapak H. Muhammad Rizky Pratama") over three lines: one
 * column instead. Container query first, viewport for the browsers without.
 */
@container di-guest-card (max-width: 419px) {

	.di-guest-card--v3 .di-guest-card__fields {
		grid-template-columns: minmax(0, 1fr);
	}
}

@supports not (container-type: inline-size) {

	@media (max-width: 419px) {

		.di-guest-card--v3 .di-guest-card__fields {
			grid-template-columns: minmax(0, 1fr);
		}
	}
}

.di-guest-card--v3 .di-guest-card__field > * + * {
	margin-top: 5px;
}

.di-guest-card--v3 .di-guest-card__label {
	font-size: clamp(11px, calc(2.36 * var(--di-u)), 17px);
}

.di-guest-card--v3 .di-guest-card__value {
	font-size: clamp(18px, calc(3.75 * var(--di-u)), 27px);
}

.di-guest-card--v3 .di-guest-card__pax {
	grid-column: 1 / -1;
	padding-top: clamp(8px, calc(1.67 * var(--di-u)), 12px);
	border-top: 1px solid rgba(42, 37, 32, 0.12);
	border-top-color: color-mix(in srgb, var(--di-card-ink) 12%, transparent);
	font-size: clamp(13px, calc(3.06 * var(--di-u)), 22px);
}

.di-guest-card--v3 .di-guest-card__note {
	padding: 0 clamp(16px, calc(8.33 * var(--di-u)), 60px) clamp(22px, calc(5.28 * var(--di-u)), 38px);
	font-size: clamp(13px, calc(2.64 * var(--di-u)), 19px);
}

.di-guest-card--v3 .di-guest-card__foot {
	padding: clamp(14px, calc(3.33 * var(--di-u)), 24px) clamp(16px, calc(6.67 * var(--di-u)), 48px);
}

.di-guest-card--v3 .di-guest-card__foot .di-guest-card__logo {
	width: clamp(80px, calc(20.83 * var(--di-u)), 150px);
}

/* ------------------------------------------------------- narrow cards */

/*
 * Every QR size above sets width and height to the same clamp, and the box
 * also has `max-width: 100%`. On a card narrower than the 200px floor plus
 * the body padding (a template section with wide side padding on a 320px
 * phone leaves about 230px), max-width shrinks the width alone: the frame
 * came out 196 by 200 around a symbol that stays square inside it. Where
 * aspect-ratio exists the height follows the width instead. Last in the file
 * on purpose, so it wins over the layout and container rules above at the
 * same two classes. Older browsers keep the fixed height.
 */
@supports (aspect-ratio: 1 / 1) {
	.di-guest-card .di-guest-card__qr {
		height: auto;
		aspect-ratio: 1 / 1;
	}
}
