/* ==========================================================================
   Poonawalla Fincorp Rewards
   Tokens follow design.md. Mobile-first: base styles target small screens,
   min-width queries layer up. Deliberately flat -- no drop shadows.

   One stylesheet for the whole site: the app pages (index, myvouchers) and the
   static error pages (403, 404, maintenance) both link this file. They were two
   files with two hand-maintained token namespaces (--pfc-* and --*), which had
   already drifted. The error pages opt out of the app chrome with
   `body.error-shell`; everything below that point is shared.
   ========================================================================== */

:root {
	/* colours */
	--pfc-primary: #034EA2;
	--pfc-primary-hover: #02428E;
	--pfc-primary-ink: #FFFFFF;
	--pfc-primary-tint: #F3F7FC;
	--pfc-primary-tint-2: #E8F0FB;
	--pfc-secondary: #FFFFFF;
	--pfc-tertiary: #E5E7EB;
	--pfc-neutral: #F5F9FF;
	--pfc-surface: #FFFFFF;
	--pfc-on-surface: #222222;
	--pfc-muted: #6B7280;
	--pfc-error: #D92D20;
	--pfc-error-tint: #FEF3F2;
	--pfc-success: #16A34A;
	--pfc-success-tint: #ECFDF3;
	--pfc-overlay: #0B1B3A99;

	/* shape */
	--pfc-r-sm: 4px;
	--pfc-r-md: 8px;
	--pfc-r-lg: 12px;
	--pfc-r-xl: 16px;
	--pfc-r-full: 9999px;

	/* spacing */
	--pfc-xs: 8px;
	--pfc-sm: 16px;
	--pfc-md: 24px;
	--pfc-lg: 34px;
	--pfc-xl: 100px;

	/* type */
	--pfc-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

	/* chrome heights, used to reserve space so fixed bars never cover content */
	--pfc-header-h: 70px;
	--pfc-tabbar-h: 70px;
	--pfc-tap: 44px;
}

/* ==========================================================================
   base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	overflow-x: clip;
}

html, body { height: 100%; }

body {
	font-family: var(--pfc-font);
	font-size: 14px;
	line-height: 20px;
	color: var(--pfc-on-surface);
	background-color: var(--pfc-secondary);
	-webkit-font-smoothing: antialiased;
	/* sticky footer: main grows, footer sits at the bottom on short pages */
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	overflow-x: clip;
	/* keep content clear of the fixed header and tab bar */
	padding-top: var(--pfc-header-h);
	padding-bottom: calc(var(--pfc-tabbar-h) + env(safe-area-inset-bottom, 0px));
}

main {
	flex: 1 0 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: clip;
}

img, svg {
	max-width: 100%;
}

.container, .container-fluid { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

/* single visible focus ring, keyboard only. No border-radius here on purpose:
   outline already follows each element's own radius, and a bare declaration
   would override the border-radius of whichever rule is the last to match. */
:focus-visible {
	outline: 2px solid var(--pfc-primary);
	outline-offset: 2px;
}

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

.skip-link {
	position: absolute;
	left: var(--pfc-xs);
	top: -60px;
	z-index: 1100;
	padding: 10px 16px;
	background: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	border-radius: var(--pfc-r-md);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: top .15s ease;
}
.skip-link:focus { top: var(--pfc-xs); }

/* remove the number input spinners, these are OTP / phone fields */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--pfc-neutral); }
::-webkit-scrollbar-thumb { background: var(--pfc-tertiary); border-radius: var(--pfc-r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--pfc-muted); }

/* ==========================================================================
   header
   ========================================================================== */

.navbar {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 1030;
	height: var(--pfc-header-h);
	display: flex;
	align-items: center;
	/* white canvas keeps the dark navy logo legible and matches the airy tone in design.md;
	   brand blue is reserved for links, CTAs and emphasis */
	background-color: var(--pfc-surface);
	border-bottom: 1px solid var(--pfc-tertiary);
}

.navcontainer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pfc-xs);
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 var(--pfc-sm);
}

/* the logo art is dark navy #28335D and needs a light surface: on the primary blue
   it drops to 1.5:1 and disappears, on white it reads at 12.2:1 */
.logo {
	display: block;	
	max-width: 150px;
	cursor: pointer;
}

.navbar-submenu { display: flex; align-items: center; gap: var(--pfc-sm); }

.nav-menu-dropdown { display: block; }
.nav-username-name { font-size: 13px; font-weight: 400; color: var(--pfc-muted); }
.nav-username-points {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--pfc-primary);	/* brand blue carries the emphasis, per design.md */
}
.nav-username-points .rupee { font-weight: 500; }

.nav-menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 6px 12px;
	color: var(--pfc-primary-ink);
	font-family: var(--pfc-font);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	background-color: var(--pfc-primary);
	border: 1px solid var(--pfc-primary);
	border-radius: var(--pfc-r-md);
}
.nav-menu-toggle:hover,
.nav-menu-toggle:focus-visible {
	color: var(--pfc-primary-ink);
	background-color: var(--pfc-primary-hover);
	border-color: var(--pfc-primary-hover);
}
/* light text on the dark theme fill */
.nav-menu-toggle .nav-username-name { color: rgba(255, 255, 255, .82); }
.nav-menu-toggle .nav-username-points { color: var(--pfc-primary-ink); }
.nav-menu-toggle::after { display: none; }
.nav-menu-toggle i { font-size: 11px; }

/* single header control: two-line account label + chevron */
.nav-toggle-text {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	line-height: 18px;
	text-align: right;
}

.dropdown-menu {
	padding: var(--pfc-xs) 0;
	margin: 0;
	top: calc(var(--pfc-header-h) - 6px) !important;
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}
.dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 40px;
	padding: 8px var(--pfc-sm);
	color: var(--pfc-on-surface);
	font-family: var(--pfc-font);
	font-size: 14px;
	font-weight: 500;
	text-align: left;
	text-decoration: none;
	background: none;
	border: 0;
	cursor: pointer;
}
.dropdown-item:hover,
.dropdown-item:focus {
	background-color: var(--pfc-primary-tint);
	color: var(--pfc-primary);
}
.dropdown-divider { border-color: var(--pfc-tertiary); margin: var(--pfc-xs) 0; }

#topBanner { display: none; }

/* ==========================================================================
   buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--pfc-tap);
	padding: 12px 24px;
	font-family: var(--pfc-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--pfc-r-md);
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary,
.card-button {
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	border: 1px solid var(--pfc-primary);
}
.btn-primary:hover,
.btn-primary:focus,
.card-button:hover,
.card-button:focus {
	background-color: var(--pfc-primary-hover);
	border-color: var(--pfc-primary-hover);
	color: var(--pfc-primary-ink);
}

.btn-secondary {
	background-color: transparent;
	color: var(--pfc-primary);
	border: 1px solid var(--pfc-primary);
}
.btn-secondary:hover,
.btn-secondary:focus {
	background-color: var(--pfc-primary-tint);
	color: var(--pfc-primary-hover);
}

.btn-lg { font-size: 16px; padding: 14px 32px; }

/* card action, full width bar reads better on small screens */
.card-button {
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.comingsoonbutton,
.comingsoonbutton:hover {
	background-color: var(--pfc-surface);
	color: var(--pfc-primary);
	border: 1px solid var(--pfc-primary);
	cursor: default;
}

/* ==========================================================================
   brand grid
   ========================================================================== */

#allrewards {
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	padding: var(--pfc-sm) var(--pfc-sm) var(--pfc-md);
	overflow-x: clip;
}
#allrewards .row { justify-content: center; }

/* page head: trust-first section title + count chip, per design.md */
.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--pfc-xs);
	margin-bottom: var(--pfc-sm);
	padding-top: 4px;
}
.page-title {
	margin: 0 0 2px;
	font-size: 20px;
	font-weight: 600;
	line-height: 26px;
	color: var(--pfc-on-surface);
}
.page-sub {
	margin: 0;
	font-size: 13px;
	line-height: 18px;
	color: var(--pfc-muted);
}
.count-chip {
	flex: 0 0 auto;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	white-space: nowrap;
	color: var(--pfc-primary);
	background-color: var(--pfc-primary-tint);
	border-radius: var(--pfc-r-full);
}

/* brand search: sticky toolbar under the fixed header. The bar itself spans the
   full content width (so no cards peek past it when stuck); only the input is
   capped on desktop. design.md input language, 16px type stops iOS zoom */
.brand-search {
	position: sticky;
	top: var(--pfc-header-h);
	z-index: 1020;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin: 0 0 12px;
	padding: 10px 0 12px;
	background-color: var(--pfc-secondary);
	border-bottom: 1px solid var(--pfc-tertiary);
}
/* stuck under the header, the field recentres; at the top it stays left */
.brand-search.is-stuck { justify-content: center; }
/* the capped field carries the icons, so they always track the input edge */
.brand-search-field {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 480px;
}
.brand-search-icon {
	position: absolute;
	left: var(--pfc-sm);
	top: 50%;
	transform: translateY(-50%);
	color: var(--pfc-primary);
	font-size: 15px;
	pointer-events: none;
}
.brand-search-input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 44px 12px 42px;
	font-family: var(--pfc-font);
	font-size: 16px;
	color: var(--pfc-on-surface);
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-primary-tint-2);
	border-radius: var(--pfc-r-md);
	outline: none;
}
/* hide the native search cancel so it never doubles up with our clear button */
.brand-search-input::-webkit-search-cancel-button { display: none; }
.brand-search-input:focus {
	background-color: var(--pfc-surface);
	border-color: var(--pfc-primary);
	box-shadow: 0 0 0 3px var(--pfc-primary-tint-2);
}
.brand-search-input::placeholder { color: var(--pfc-muted); }
.brand-search-clear {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--pfc-muted);
	background: none;
	border: 0;
	border-radius: var(--pfc-r-full);
	cursor: pointer;
}
.brand-search-clear:hover { color: var(--pfc-primary); background-color: var(--pfc-primary-tint); }
.brand-search-clear[hidden] { display: none; }
#noBrandsFound { margin-bottom: var(--pfc-sm); }
#noBrandsFound[hidden] { display: none; }

/* progressive grid loading: one quiet full-width control under the grid */
.brand-loadmore {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--pfc-xs);
	margin-top: var(--pfc-md);
}
.brand-loadmore[hidden] { display: none; }
.brand-loadmore-btn {
	width: 100%;
	max-width: 320px;
	min-height: var(--pfc-tap);
	padding: 13px var(--pfc-sm);
	font-size: 15px;
	font-weight: 600;
	color: var(--pfc-primary);
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-primary);
	border-radius: var(--pfc-r-md);
	cursor: pointer;
}
.brand-loadmore-btn:hover:not(:disabled) { color: var(--pfc-primary-hover); background-color: var(--pfc-primary-tint); }
.brand-loadmore-btn:disabled { color: var(--pfc-muted); border-color: var(--pfc-tertiary); cursor: progress; }
.brand-loadmore-error {
	margin: 0;
	font-size: 13px;
	line-height: 18px;
	color: var(--pfc-error);
	text-align: center;
}
.brand-loadmore-error[hidden] { display: none; }
.brand-noscript-note {
	margin: 0 0 var(--pfc-sm);
	padding: 10px var(--pfc-sm);
	font-size: 13px;
	line-height: 18px;
	color: var(--pfc-muted);
	text-align: center;
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}

.card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
	overflow: hidden;
	overflow-wrap: anywhere;
	transition: border-color .15s ease;
}
.card:hover { border-color: var(--pfc-primary); }

#allrewards .col { min-width: 0; }

.card-img-top {
	display: block;
	width: 100%;
	height: 112px;
	object-fit: contain;
	padding: 12px;
	background-color: var(--pfc-neutral);
	border-bottom: 1px solid var(--pfc-tertiary);
}

.card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 10px;
	padding: 12px;
	text-align: center;
}

.card-title {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 48px;
	padding: 4px 4px 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--pfc-on-surface);
	background-color: var(--pfc-surface);
}

.card-terms,
.card-steps,
.historydata { display: none; }

.nothing-redeemed {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--pfc-xs);
	width: 100%;
	padding: var(--pfc-xl) var(--pfc-sm);
	font-size: 16px;
	font-weight: 500;
	color: var(--pfc-muted);
	text-align: center;
}
.nothing-redeemed a {
	color: var(--pfc-primary);
	font-weight: 600;
	text-decoration: none;
}
.nothing-redeemed a:hover { text-decoration: underline; }

/* ==========================================================================
   history cards
   ========================================================================== */

/* history cards are mobile-first compact (2-up on phones): roomier values are
   restored in the >= 640px query below */
.history-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 8px 10px;
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	font-size: 12px;
	font-weight: 600;
	line-height: 17px;
}
.history-card-header-name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.history-card-header-pointsused { flex: 0 0 auto; white-space: nowrap; }

.history-card-body {
	display: flex;
	flex-direction: column;
	gap: var(--pfc-xs);
	padding: 10px;
}

.card-img-div {
	flex: 0 0 104px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 88px;
	padding: 8px;
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}
/* logo lockup: fixed-height band, image fills it via contain. The neutral
   panel lives on the wrapper, so the img's own card-img-top panel styles
   (padding, background, border) are neutralised to avoid doubling up. */
.history-card-img-top {
	width: auto;
	max-width: 100%;
	height: 56px;
	max-height: 56px;
	padding: 0;
	background: none;
	border: 0;
	object-fit: contain;
}
/* mobile ticket layout: thumb + meta side by side, action below.
   .history-card-main wraps presentation nodes only, the history-script.js
   contract (button + .historydata_* inside .history-card-body) is untouched */
.history-card-main {
	display: flex;
	align-items: stretch;
	gap: 10px;
	min-width: 0;
}
/* structured meta list: one label/value row each, no duplicated dates.
   The .historydata_* nodes stay hidden siblings for the history-script.js payload */
.history-meta { flex: 1 1 auto; align-self: center; min-width: 0; margin: 0; padding: 4px 0; }
.history-meta-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 2px var(--pfc-xs);
	padding: 6px 0;
	font-size: 12px;
	line-height: 17px;
}
.history-meta-row + .history-meta-row { border-top: 1px solid var(--pfc-tertiary); }
.history-meta-row dt { margin: 0; font-weight: 500; color: var(--pfc-muted); }
.history-meta-row dd {
	margin: 0 0 0 auto;
	font-weight: 600;
	color: var(--pfc-on-surface);
	text-align: right;
	overflow-wrap: anywhere;
}
.history-meta-value { font-size: 14px; color: var(--pfc-primary); }
.history-meta-expired { color: var(--pfc-error); }

.history-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px var(--pfc-xs);
	padding: 8px 10px;
	background-color: var(--pfc-neutral);
	border-top: 1px solid var(--pfc-tertiary);
	color: var(--pfc-muted);
	font-size: 11px;
	font-weight: 500;
	line-height: 16px;
}
.history-trxnid { min-width: 0; overflow-wrap: anywhere; }
/* narrower cards get a tighter button, but it keeps the full 44px tap target */
.history-card-body .card-button {
	padding: 10px 6px;
	font-size: 12px;
	min-height: var(--pfc-tap);
}
/* status pill, same calm tints as the login form feedback boxes */
.history-status {
	flex: 0 0 auto;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 600;
	line-height: 16px;
	white-space: nowrap;
	border: 1px solid transparent;
	border-radius: var(--pfc-r-full);
}
.history-status-active { color: var(--pfc-success); background-color: var(--pfc-success-tint); border-color: var(--pfc-success); }
.history-status-expired { color: var(--pfc-error); background-color: var(--pfc-error-tint); border-color: var(--pfc-error); }

/* single-column mobile list: a hairline plus air after each card so stacked
   vouchers read as separate entries. 2-up and wider grids use gutters alone,
   so this only applies below the sm breakpoint. */
@media only screen and (max-width: 575.98px) {
	.history-grid > .col:not(:last-child) {
		padding-bottom: 16px;
		border-bottom: 1px solid var(--pfc-tertiary);
	}
}

/* ==========================================================================
   tab bar
   ========================================================================== */

#bottomMenu {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 1030;
	display: flex;
	align-items: stretch;
	width: 100%;
	background-color: var(--pfc-surface);
	border-top: 1px solid var(--pfc-tertiary);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottomSubMenu {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: var(--pfc-tabbar-h);
	padding: 8px 4px;
	color: var(--pfc-muted);
	font-family: var(--pfc-font);
	font-size: 11px;
	font-weight: 500;
	line-height: 14px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	background: none;
	border: 0;
	border-right: 1px solid var(--pfc-tertiary);
}
.bottomSubMenu:last-child { border-right: 0; }
.bottomSubMenu i { font-size: 18px; }
.bottomSubMenu:hover,
.bottomSubMenu:focus-visible { color: var(--pfc-primary); }
.bottomSubMenu[aria-current="page"] { color: var(--pfc-primary); font-weight: 600; }

/* ==========================================================================
   footer
   ========================================================================== */

#footer {
	display: block;
	width: 100%;
	margin-top: auto;
	padding: var(--pfc-sm);
	padding-bottom: calc(var(--pfc-sm) + env(safe-area-inset-bottom, 0px));
	background-color: var(--pfc-neutral);
	border-top: 1px solid var(--pfc-tertiary);
	color: var(--pfc-muted);
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	overflow-wrap: anywhere;
}
#footer a { color: var(--pfc-primary); text-decoration: none; }
#footer a:hover { text-decoration: underline; }

/* ==========================================================================
   modals
   ========================================================================== */

/* ==========================================================================
   modals: mobile-first bottom sheets, centred 420px sheets on desktop.
   Tall sheets (brand / voucher) fill 100dvh; passbook, login and the small
   feedback sheets (process / error / contact) stay auto height.
   ========================================================================== */

.modal { overflow-x: clip; overscroll-behavior: contain; }

/* lock the page behind any open modal. Bootstrap sets body.modal-open, and
   common.js adds .pfc-locked on <html> while a modal is shown. The lock only
   toggles overflow (the body stays in normal flow) so the backdrop and the
   dimmed page behind the sheet keep painting exactly as before. */
body.modal-open { overflow: hidden !important; overscroll-behavior: none; }
html.pfc-locked,
html.pfc-locked > body { overflow: hidden !important; }

.modal-dialog {
	margin: 0;
	border: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* never let a leftover bootstrap fullscreen class blow out the viewport */
.modal .modal-fullscreen {
	width: 100% !important;
	max-width: 100% !important;
	min-height: 0 !important;
}

.modal-content {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 92vh;
	max-height: 92dvh;
	/* border: 1px solid var(--pfc-tertiary); */
	border-radius: var(--pfc-r-lg) var(--pfc-r-lg) 0 0;
	overflow: hidden;
}
.modal-open-bottom {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	min-height: 100%;
	margin: 0 auto;
}
/* contact us stays a small centred dialog on every screen (never 100dvh) */
#contactUsModal .modal-dialog {
	display: flex;
	align-items: center;
	min-height: 100%;
	padding: 16px;
}
#contactUsModal .modal-content {
	width: 100%;
	height: auto;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	border-radius: var(--pfc-r-lg);
}
/* .modal-body already pads 16px, and .content would add 16px more on each side.
   Inside a 420px dialog that is 32px the one long line on this page cannot
   spare, so the wrapper gives it back. */
#contactUsModal .content { padding: 0; }

.modal-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--pfc-xs);
	padding: var(--pfc-sm);
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	border-bottom: 0;
	text-align: center;
}
.modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
}
.modal-body {
	padding: var(--pfc-sm);
	background-color: var(--pfc-surface);
	overscroll-behavior: contain;
	overflow-y: auto;
	overflow-x: clip;
	-webkit-overflow-scrolling: touch;
	min-height: 0;
}
.modal-footer { border-top: 1px solid var(--pfc-tertiary); }

.btn-close-white { opacity: 1 !important; }

.box { color: var(--pfc-on-surface); text-align: center; }
.content { padding: var(--pfc-sm); text-align: center; }
.modalTitleHead { margin: 0 0 var(--pfc-xs); font-size: 18px; font-weight: 600; }

/* denomination / terms accordions */
.brandModal-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pfc-xs);
	margin: var(--pfc-sm) 0 var(--pfc-xs);
	padding: 12px var(--pfc-sm);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--pfc-primary);
	background-color: var(--pfc-primary-tint);
	border: 1px solid var(--pfc-primary-tint-2);
	border-radius: var(--pfc-r-md);
	cursor: pointer;
}
.brandModal-title i { margin-left: auto; }
.brandModal-title[aria-expanded="true"] i { transform: rotate(45deg); }

/* static section label: same rhythm as the accordions, but not interactive */
.brandModal-label {
	margin: var(--pfc-sm) 0 var(--pfc-xs);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--pfc-on-surface);
}

#brandModal-img-div,
#voucherDetailsModal-img-div { text-align: center; }
#brandModal-img,
#voucherDetailsModal-img {
	max-width: 100%;
	height: auto;
	max-height: 132px;
	padding: var(--pfc-xs);
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}

#brandModal-denominations-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--pfc-xs);
	text-align: center;
}

.brandModal-denominations-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--pfc-xs);
	width: 100%;
	min-height: var(--pfc-tap);
	margin: 0;
	padding: 10px var(--pfc-sm);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--pfc-primary);
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
	cursor: pointer;
	overflow-wrap: anywhere;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.brandModal-denominations-row:has(input:checked) {
	color: var(--pfc-primary-ink);
	background-color: var(--pfc-primary);
	border-color: var(--pfc-primary);
}
.brandModal-denominations-row:has(input:focus-visible) {
	outline: 2px solid var(--pfc-primary);
	outline-offset: 2px;
}
.brandModal-denominations-row input {
	accent-color: var(--pfc-primary);
	width: 18px;
	height: 18px;
	margin: 0;
	flex-shrink: 0;
}
.brandModal-denominations-row:has(input:checked) input { accent-color: var(--pfc-primary-ink); }
.brandModal-denominations-label { margin: 0; }

#brandModal-denominations-error {
	display: none;
	margin-top: var(--pfc-xs);
	padding: 10px var(--pfc-sm);
	font-size: 13px;
	text-align: center;
	border: 1px solid var(--pfc-error);
	border-radius: var(--pfc-r-md);
}
#brandModal-denominations-error.show { display: block; }

/* empty state: calm neutral panel per design.md, spans the full grid width */
.denom-empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--pfc-xs);
	padding: var(--pfc-md) var(--pfc-sm);
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
	color: var(--pfc-muted);
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}
.denom-empty i { font-size: 24px; color: var(--pfc-primary); }
.denom-empty p { margin: 0; }
.denom-empty strong { color: var(--pfc-on-surface); }

#brandModal-denominations-steps-div-details,
#brandModal-denominations-terms-div-details,
#voucherDetailsModal-terms-div-details,
#voucherDetailsModal-steps-div-details {
	display: none;
	font-size: 13px;
	line-height: 20px;
	color: var(--pfc-muted);
}
#brandModal-denominations-terms-div-details ul,
#voucherDetailsModal-terms-div-details ul,
#brandModal-denominations-steps-div-details ol,
#voucherDetailsModal-steps-div-details ol { margin: 0; padding-left: 20px; }
#brandModal-denominations-terms-div-details li,
#voucherDetailsModal-terms-div-details li,
#brandModal-denominations-steps-div-details li,
#voucherDetailsModal-steps-div-details li { margin-bottom: 6px; }
#brandModal-denominations-terms-div { margin-bottom: var(--pfc-sm); }

#brandModal-denominations-form {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
#brandModal .modal-body {
	flex: 1 1 auto;
	min-height: 0;
}

/* fixed redeem bar: outside the scrolling .modal-body, pinned to the
   sheet bottom on every screen */
#brandModal-redeem {
	flex: 0 0 auto;
	width: 100%;
	padding: 12px var(--pfc-sm) calc(12px + env(safe-area-inset-bottom, 0px));
	background-color: var(--pfc-surface);
	border-top: 1px solid var(--pfc-tertiary);
}
#brandModal-redeem-button {
	width: 100%;
	font-size: 16px;
	font-weight: 600;
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	border: 1px solid var(--pfc-primary);
	border-radius: var(--pfc-r-md);
	min-height: var(--pfc-tap);
}

/* voucher details: credential-first paint over the unchanged JS markup.
   require/script.js and require/history-script.js inject #voucherDetailsModal-img-div
   and the .voucherDetailsModal-voucher-details-* rows, so only paint changes here:
   classes, ids, hr separators and the click-to-copy handler all stay as-is. */
#voucherDetailsModal-rows-div {
	display: grid;
	gap: 12px;
	min-width: 0;
}
#voucherDetailsModal-img-div { margin-bottom: 4px; }
/* credential cards: coupon-dashed, centred, full tap height, copy icon
   affordance. user-select:all lets desktop users drag-copy in one gesture. */
.voucherDetailsModal-voucher-details-row { margin-bottom: 0; }
.voucherDetailsModal-voucher-details-title {
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--pfc-muted);
}
.voucherDetailsModal-voucher-details-value {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--pfc-tap);
	padding: 14px 48px 14px var(--pfc-sm);
	font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--pfc-primary);
	background-color: var(--pfc-primary-tint);
	border: 1px dashed var(--pfc-primary);
	border-radius: var(--pfc-r-md);
	text-align: center;
	cursor: pointer;
	overflow-wrap: anywhere;
	user-select: all;
}
/* font-awesome is already a hard dependency for the chevrons, so the copy
   glyph renders from the same family */
.voucherDetailsModal-voucher-details-value::after {
	content: "\f0c5";
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 15px;
	color: var(--pfc-primary);
}
/* the amount row is the last credential: solid card, brand type, no code font */
#voucherDetailsModal-voucher-details > .voucherDetailsModal-voucher-details-row:last-child .voucherDetailsModal-voucher-details-value {
	font-family: var(--pfc-font);
	font-size: 22px;
	line-height: 28px;
	letter-spacing: 0;
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
}
.voucherDetailsModal-voucher-copy-instruction {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	color: var(--pfc-muted);
	text-align: center;
}
/* redemption summary: neutral meta bar, wraps on narrow sheets */
.voucherDetailsModal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--pfc-xs);
	padding: 12px var(--pfc-sm);
	font-size: 13px;
	line-height: 18px;
	color: var(--pfc-muted);
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}
.voucherDetailsModal-expiry {
	display: inline-block;
	margin-top: 6px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 500;
	color: var(--pfc-muted);
	background-color: var(--pfc-neutral);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-full);
}
.text-copied {
	background-color: var(--pfc-success) !important;
	border-color: var(--pfc-success) !important;
	color: var(--pfc-primary-ink) !important;
}
/* swap the copy glyph for a tick while the COPIED! feedback shows */
.text-copied::after { content: "\f00c"; color: var(--pfc-primary-ink); }
#voucherDetailsModal-voucher-trxnid { display: none; }
.voucherDetailsModal-voucher-send-sms { text-align: center; }
#voucherDetailsModal-voucher-send-sms-button { width: 100%; }
#voucherDetailsModal-body hr { margin: 4px 0; border-color: var(--pfc-tertiary); }

/* process / error */
#processModal .modal-body { padding: var(--pfc-lg) var(--pfc-sm); }
.denominationSpinner { margin: var(--pfc-sm); color: var(--pfc-primary); font-size: 40px; }
#errorModal .modal-body { padding: var(--pfc-lg) var(--pfc-sm); }
#errorModal-text { margin: 0 0 var(--pfc-md); font-size: 15px; color: var(--pfc-on-surface); }
#warningButton {
	width: 100%;
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
	border: 1px solid var(--pfc-primary);
	border-radius: var(--pfc-r-md);
	font-weight: 600;
	min-height: var(--pfc-tap);
}
#warningModal .modal-body { padding: var(--pfc-sm); }

/* The address is a single 45-character token with no break opportunity a reader
   would want, so this is the one place the type gives way to fit. clamp() holds
   it on one line from a 320px phone through the 420px dialog, where the fixed
   14px wrapped it at every width including 1280px. break-word, not anywhere:
   it only breaks when the string genuinely cannot fit, so the fallback stays
   dormant while the clamp holds, instead of splitting the domain at random. */
.supportMailID {
	color: var(--pfc-primary);
	text-decoration: none;
	font-size: clamp(10px, 3vw, 13px);
	overflow-wrap: break-word;
	/* inline-flex so min-height produces a real 44px target; the row measured
	   16px before. Deliberately no horizontal padding -- at a 320px viewport
	   there are only 4px of slack, and any side padding re-wraps the address. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--pfc-tap);
}
.supportMailID:hover { text-decoration: underline; }

/* ==========================================================================
   passbook
   ========================================================================== */

/* ledger entries: description + date left, signed amount right.
   Success green marks credits, brand blue marks redemptions. */
#passbookModal-body {
	display: flex;
	flex-direction: column;
	gap: var(--pfc-xs);
}
.passbookdata {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px var(--pfc-sm);
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
}
.pb-credit { border-left: 3px solid var(--pfc-success); }
.pb-debit { border-left: 3px solid var(--pfc-primary); }
.passbook-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.passbook-desc {
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--pfc-on-surface);
	overflow-wrap: anywhere;
}
.passbook-date {
	font-size: 12px;
	line-height: 16px;
	color: var(--pfc-muted);
}
.passbook-amt {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	white-space: nowrap;
}
.pb-credit .passbook-amt { color: var(--pfc-success); }
.pb-debit .passbook-amt { color: var(--pfc-primary); }
/* loading placeholder (set by common.js before the AJAX returns) and the
   zero-transaction case: both calm neutral, same language as .denom-empty */
.passbook-loading,
#passbookModal-body:empty::after {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--pfc-xs);
	padding: var(--pfc-md) var(--pfc-sm);
	font-size: 14px;
	line-height: 20px;
	color: var(--pfc-muted);
	text-align: center;
}
.passbook-loading i { font-size: 28px; color: var(--pfc-primary); }
#passbookModal-body:empty::after {
	content: 'No transactions yet. Your reward credits and redemptions will appear here.';
}

/* ==========================================================================
   leaderboard
   ========================================================================== */

#leaderboardModal-body { padding: 0; font-weight: 500; }

.leaderboard-topthree {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: var(--pfc-xs);
	margin: 0;
	padding: var(--pfc-md) var(--pfc-sm);
	background-color: var(--pfc-primary);
	color: var(--pfc-primary-ink);
}
.leaderboard-topthree-row {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: var(--pfc-sm) 6px;
	font-size: 12px;
	line-height: 16px;
	text-align: center;
	overflow-wrap: anywhere;
}
.leaderboard-topthree-row i { font-size: 24px; }
.leaderboard-topthree-row:first-child { order: 2; }
.leaderboard-topthree-row:nth-child(2) { order: 1; }
.leaderboard-topthree-row:last-child { order: 3; }
/* winner sits proud, built with spacing rather than a transform so it cannot overlap */
.leaderboard-topthree-topuser {
	padding-top: var(--pfc-xs);
	font-weight: 600;
}
.leaderboard-topthree-topuser i { font-size: 30px; }

.leaderboard-others-div { padding: 0 var(--pfc-sm) var(--pfc-sm); }
.leaderboard-others-div-row {
	display: flex;
	align-items: center;
	gap: var(--pfc-xs);
	width: 100%;
	padding: 12px var(--pfc-sm);
	font-size: 14px;
	border-bottom: 1px solid var(--pfc-tertiary);
}
.leaderboard-others-div-row:last-child { border-bottom: 0; }
.leaderboard-others-div-row-col-number { flex: 0 0 34px; color: var(--pfc-muted); }
.leaderboard-others-div-row-col-name { flex: 1 1 auto; overflow-wrap: anywhere; }
.leaderboard-others-div-row-col-amount { flex: 0 0 auto; font-weight: 600; color: var(--pfc-primary); }

.myrank {
	background-color: var(--pfc-primary-tint);
	border-radius: var(--pfc-r-md);
	color: var(--pfc-primary);
	font-weight: 600;
}
.myrank .leaderboard-others-div-row-col-amount { color: var(--pfc-primary); }

/* ==========================================================================
   login modal
   ========================================================================== */

#loginModal .modal-content { border: none; }
.userModalBody { padding: 0; background-color: var(--pfc-surface); }
.userModalcontent { padding: 0; text-align: center; }

/* neutral tint, not the brand blue: the navy logo needs a light backdrop here too */
.imgDiv {
	padding: var(--pfc-md) var(--pfc-sm);
	background-color: var(--pfc-neutral);
	border-bottom: 1px solid var(--pfc-tertiary);
	text-align: center;
}
.userModalimg {
	display: block;
	width: auto;
	height: 38px;
	max-width: 148px;
	margin: 0 auto;
}

#loginModal .outerDiv { padding: var(--pfc-md) var(--pfc-sm); background-color: var(--pfc-surface); }

.loginModalInnerTitle {
	margin: 0 0 var(--pfc-sm);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: .04em;
	color: var(--pfc-on-surface);
}

.form-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--pfc-muted);
}

.inputStyle {
	display: block;
	width: 100%;
	min-height: var(--pfc-tap);
	margin: 0 0 var(--pfc-sm);
	padding: 12px var(--pfc-sm);
	font-family: var(--pfc-font);
	font-size: 16px; /* 16px stops iOS zooming on focus */
	color: var(--pfc-on-surface);
	text-align: center;
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
	outline: none;
}
.inputStyle:focus { border-color: var(--pfc-primary); }
.inputStyle::placeholder { color: var(--pfc-muted); }

.loginModalHint {
	margin: 0 0 var(--pfc-sm);
	font-size: 13px;
	line-height: 18px;
	color: var(--pfc-muted);
}

/* access keys are read off a card or a mail, so keep the groups legible and aligned */
.inputStyle-accesskey {
	font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.accessKeyFormatExample {
	margin: -4px 0 var(--pfc-sm);
	font-size: 12px;
	line-height: 16px;
	color: var(--pfc-muted);
	text-align: center;
}

.modalButton {
	display: block;
	width: 100%;
	min-height: var(--pfc-tap);
	margin: var(--pfc-xs) 0 0;
	padding: 13px var(--pfc-sm);
	font-family: var(--pfc-font);
	font-size: 16px;
	font-weight: 600;
	color: var(--pfc-primary-ink);
	background-color: var(--pfc-primary);
	border: 1px solid var(--pfc-primary);
	border-radius: var(--pfc-r-md);
	cursor: pointer;
}
.modalButton:hover:not(:disabled) { background-color: var(--pfc-primary-hover); border-color: var(--pfc-primary-hover); }
.modalButton:disabled { opacity: .7; cursor: progress; }

#errorBox,
#successBox {
	display: none;
	margin-top: var(--pfc-sm);
	padding: 10px var(--pfc-sm);
	font-size: 13px;
	line-height: 18px;
	text-align: center;
	border-radius: var(--pfc-r-md);
}
#errorBox { color: var(--pfc-error); background-color: var(--pfc-error-tint); border: 1px solid var(--pfc-error); }
#successBox { color: var(--pfc-success); background-color: var(--pfc-success-tint); border: 1px solid var(--pfc-success); }

/* ==========================================================================
   locked (signed out) state
   ========================================================================== */

body.is-locked nav,
body.is-locked #allrewards,
body.is-locked #bottomMenu { filter: blur(1.5px); }
body.is-locked #allrewards,
body.is-locked #bottomMenu { pointer-events: none; user-select: none; }

/* ==========================================================================
   landscape notice
   ========================================================================== */

#landscapeError {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--pfc-xs);
	padding: var(--pfc-md);
	text-align: center;
	background-color: var(--pfc-neutral);
}
#landscapeError h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--pfc-primary); }
#landscapeError h4 { margin: 0; font-size: 14px; font-weight: 400; color: var(--pfc-muted); }
.landscapeImage { max-width: 96px; height: auto; margin-bottom: var(--pfc-xs); }

/* ==========================================================================
   >= 640px
   ========================================================================== */

@media only screen and (min-width: 640px) {
	.logo { max-width: 168px; }

	/* the tab bar is hidden here, the header account menu covers its actions */
	#bottomMenu { display: none; }
	body { padding-bottom: 0; }

	.nav-username-points { font-size: 17px; }

	#allrewards { padding: var(--pfc-md) var(--pfc-sm) var(--pfc-lg); }

	.card-img-top { height: 124px; }
	.card-title { font-size: 16px; line-height: 22px; }
	.card-button { font-size: 15px; }

	.modal-dialog { margin: 0 auto; }

	/* desktop: every sheet is centred and capped at 420px */
	.modal-dialog,
	#loginModal .modal-dialog,
	#brandModal .modal-dialog,
	#voucherDetailsModal .modal-dialog,
	#passbookModal .modal-dialog,
	#processModal .modal-dialog,
	#errorModal .modal-dialog,
	#contactUsModal .modal-dialog {
		width: calc(100% - 32px);
		max-width: 420px;
	}
	.modal-backdrop { opacity: .85 !important; }

	/* tall sheets: flush full-height column, no top/bottom gap.
	   Passbook is deliberately not tall: it sizes to its entries (compact for
	   one, scrolling capped list for many). Small sheets keep centred rules. */
	#brandModal .modal-open-bottom,
	#voucherDetailsModal .modal-open-bottom {
		align-items: stretch;
		min-height: 100vh;
		min-height: 100dvh;
		padding: 0;
	}
	#brandModal .modal-open-bottom .modal-content,
	#voucherDetailsModal .modal-open-bottom .modal-content { border: none; border-bottom-left-radius: var(--pfc-r-md); border-bottom-right-radius: var(--pfc-r-md);}
	#loginModal .modal-open-bottom,
	#passbookModal .modal-open-bottom,
	#processModal .modal-open-bottom,
	#errorModal .modal-open-bottom {
		align-items: center;
		min-height: 100vh;
		min-height: 100dvh;
		padding: 16px 0;
	}
	#loginModal .modal-open-bottom .modal-content,
	#passbookModal .modal-open-bottom .modal-content,
	#processModal .modal-open-bottom .modal-content,
	#errorModal .modal-open-bottom .modal-content { border-radius: var(--pfc-r-lg); }

	/* tall sheets fill the viewport height */
	#brandModal .modal-content,
	#voucherDetailsModal .modal-content {
		height: 100vh;
		height: 100dvh;
		max-height: 100vh;
		max-height: 100dvh;
	}

	/* auto sheets stay compact and centred; the capped max-height plus the
	   scrolling .modal-body covers the many-entries case */
	#loginModal .modal-dialog,
	#passbookModal .modal-dialog,
	#processModal .modal-dialog,
	#errorModal .modal-dialog,
	#contactUsModal .modal-dialog {
		display: flex;
		align-items: center;
		min-height: 100vh;
		min-height: 100dvh;
	}
	#loginModal .modal-content,
	#passbookModal .modal-content,
	#processModal .modal-content,
	#errorModal .modal-content,
	#contactUsModal .modal-content {
		width: 100%;
		height: auto;
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}

	.history-card-header { gap: var(--pfc-xs); padding: 10px var(--pfc-sm); font-size: 13px; line-height: 18px; }
	.history-card-body { align-items: stretch; padding: var(--pfc-sm); }
	.history-card-main { display: block; }
	.card-img-div { min-height: 120px; padding: 12px; border: 0; border-bottom: 1px solid var(--pfc-tertiary); border-radius: 0; }
	.history-card-img-top { height: 96px; max-height: 96px; }
	.history-meta-row { gap: 4px var(--pfc-xs); padding: 8px 0; font-size: 13px; line-height: 18px; }
	.history-meta-value { font-size: 16px; }
	.history-card-body .card-button { padding: 12px 16px; font-size: 14px; }
	.history-card-footer { gap: var(--pfc-xs); padding: 10px var(--pfc-sm); font-size: 13px; }

	/* modal stays 2-up: the sheet is only 420px wide, 3-up would cramp tap targets */
	#brandModal-denominations-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.page-title { font-size: 24px; line-height: 30px; }
}

/* ==========================================================================
   >= 992px
   ========================================================================== */

@media only screen and (min-width: 992px) {
	:root { --pfc-header-h: 68px; }

	#allrewards { padding: var(--pfc-lg) var(--pfc-sm) var(--pfc-xl); }
	.card-img-top { height: 140px; }
	.nothing-redeemed { padding: var(--pfc-xl) var(--pfc-sm); font-size: 18px; }
}

/* ==========================================================================
   error pages (403.html, 404.html, maintenance.html)

   Static pages, no PHP, so they must render when the app is down. They link this
   same file, which is fine: it sits in require/ next to them and is a static
   asset like any other. body.error-shell opts out of the app chrome that the
   base rules above assume -- the fixed-header and tab-bar gutters, the white
   canvas and the smaller 14px body type -- and replaces it with the error
   page's own frame.
   ========================================================================== */

body.error-shell {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 24px;
	background-color: var(--pfc-neutral);
}

/* Page frame. The vertical rhythm steps from spacing.lg to spacing.xl at the
   tablet breakpoint. Both are on the design.md scale; no clamp(), because an
   off-scale intermediate value is not permitted. */
.error-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: var(--pfc-lg) var(--pfc-sm);
}

.error-card {
	width: 100%;
	max-width: 520px;
	padding: var(--pfc-md);
	background-color: var(--pfc-surface);
	border: 1px solid var(--pfc-tertiary);
	border-radius: var(--pfc-r-md);
	text-align: center;
}

/* Distinct from the favicon. height with width:auto preserves the SVG's own
   aspect ratio so the logo cannot be distorted. */
.error-brand {
	display: block;
	height: 32px;
	width: auto;
	margin: 0 auto var(--pfc-md);
}

.error-code {
	margin: 0 0 var(--pfc-xs);
	color: var(--pfc-primary);
	font-size: 38px;
	font-weight: 500;
	line-height: 46px;
	letter-spacing: -1px;
}

.error-title {
	margin: 0 0 var(--pfc-sm);
	color: var(--pfc-on-surface);
	font-size: 28px;
	font-weight: 500;
	line-height: 34px;
}

.error-text {
	margin: 0 0 var(--pfc-md);
	color: var(--pfc-muted);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

.error-note {
	margin: var(--pfc-md) 0 0;
	color: var(--pfc-muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

.error-actions {
	display: flex;
	flex-direction: column;
	gap: var(--pfc-xs);
	align-items: stretch;
}

@media (min-width: 480px) {
	.error-actions {
		flex-direction: row;
		justify-content: center;
	}
}

/* The error page's two links are the only interactive targets on the page, so
   they get the 48px metrics rather than forking a second .btn definition that
   would drift from the app's. Colour, hover and the focus ring all come from
   the shared .btn / .btn-primary / .btn-secondary rules and the global
   :focus-visible -- so there is deliberately no focus or reduced-motion block
   here. */
.error-actions .btn {
	min-height: 48px;
	padding: 15px 32px;
	font-size: 18px;
	line-height: 22px;
}
