/**
 * Veteran Medals & Ribbons Explorer — front-end styles.
 * Deliberately self-contained: no theme framework or external font required.
 */

.vmr-explorer {
	--vmr-accent: #8c1d2c;
	--vmr-navy: #11243b;
	--vmr-navy-2: #1b3658;
	--vmr-gold: #c99a3a;
	--vmr-ink: #17202b;
	--vmr-muted: #5d6877;
	--vmr-line: #d8dee7;
	--vmr-soft: #f4f6f9;
	--vmr-paper: #ffffff;
	--vmr-shadow-sm: 0 4px 16px rgba(17, 36, 59, 0.08);
	--vmr-shadow-md: 0 14px 40px rgba(17, 36, 59, 0.14);
	--vmr-shadow-lg: 0 28px 80px rgba(7, 18, 33, 0.28);
	--vmr-radius-sm: 8px;
	--vmr-radius: 14px;
	--vmr-radius-lg: 22px;
	position: relative;
	isolation: isolate;
	width: 100%;
	max-width: 1600px;
	margin: 0 auto 2rem;
	color: var(--vmr-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

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

.vmr-explorer [hidden] {
	display: none !important;
}

.vmr-explorer button,
.vmr-explorer input,
.vmr-explorer select {
	font: inherit;
}

.vmr-explorer button,
.vmr-explorer a {
	-webkit-tap-highlight-color: transparent;
}

.vmr-explorer button {
	cursor: pointer;
}

.vmr-explorer button:focus-visible,
.vmr-explorer a:focus-visible,
.vmr-explorer input:focus-visible,
.vmr-explorer select:focus-visible,
.vmr-explorer [tabindex]:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--vmr-accent) 72%, white);
	outline-offset: 3px;
}

.vmr-explorer svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.vmr-explorer .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

body.vmr-overlay-open {
	overflow: hidden;
}

.vmr-empty-catalog {
	padding: 1rem 1.25rem;
	border: 1px solid #d8dee7;
	border-radius: 10px;
	background: #fff;
}

/* Hero */
.vmr-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(1.25rem, 4vw, 4rem);
	align-items: end;
	overflow: hidden;
	min-height: 220px;
	padding: clamp(2rem, 5vw, 4.5rem);
	border-radius: var(--vmr-radius-lg) var(--vmr-radius-lg) 0 0;
	color: #fff;
	background:
		radial-gradient(circle at 87% 8%, rgba(255, 255, 255, 0.14), transparent 27%),
		linear-gradient(122deg, var(--vmr-navy) 0%, #1c3c63 58%, color-mix(in srgb, var(--vmr-accent) 74%, #361019) 100%);
}

.vmr-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.11;
	background-image:
		linear-gradient(30deg, transparent 12%, #fff 12.5%, #fff 13%, transparent 13.5%),
		linear-gradient(150deg, transparent 12%, #fff 12.5%, #fff 13%, transparent 13.5%);
	background-size: 44px 76px;
}

.vmr-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--vmr-gold), #f0d593 50%, var(--vmr-gold));
}

.vmr-hero__content,
.vmr-hero__stat {
	position: relative;
	z-index: 1;
}

.vmr-eyebrow,
.vmr-hero .vmr-eyebrow {
	margin: 0 0 0.5rem;
	color: var(--vmr-accent);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.vmr-hero .vmr-eyebrow {
	color: #f0d593;
}

.vmr-hero h2 {
	max-width: 900px;
	margin: 0;
	color: #fff;
	font-size: clamp(2rem, 4.2vw, 4.5rem);
	font-weight: 750;
	letter-spacing: -0.04em;
	line-height: 0.98;
	text-wrap: balance;
}

.vmr-hero__intro {
	max-width: 840px;
	margin: 1.15rem 0 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(1rem, 1.5vw, 1.18rem);
	line-height: 1.65;
}

.vmr-hero__stat {
	display: grid;
	min-width: 150px;
	padding: 1.2rem 1.35rem;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: var(--vmr-radius);
	background: rgba(255, 255, 255, 0.09);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
}

.vmr-hero__stat strong {
	color: #fff;
	font-size: clamp(2rem, 3vw, 3.5rem);
	font-weight: 750;
	letter-spacing: -0.04em;
	line-height: 1;
}

.vmr-hero__stat span {
	margin-top: 0.35rem;
	color: rgba(255, 255, 255, 0.74);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Main shell and controls */
.vmr-shell {
	padding: clamp(1rem, 2.5vw, 2.5rem);
	border: 1px solid var(--vmr-line);
	border-top: 0;
	border-radius: 0 0 var(--vmr-radius-lg) var(--vmr-radius-lg);
	background: var(--vmr-soft);
}

.vmr-controls {
	display: grid;
	grid-template-columns: minmax(250px, 1fr) auto auto auto auto;
	gap: 0.75rem;
	align-items: end;
	padding: 1rem;
	border: 1px solid var(--vmr-line);
	border-radius: var(--vmr-radius);
	background: var(--vmr-paper);
	box-shadow: var(--vmr-shadow-sm);
}

.vmr-search {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
}

.vmr-search > svg {
	position: absolute;
	left: 0.9rem;
	z-index: 1;
	width: 1.2rem;
	height: 1.2rem;
	color: var(--vmr-muted);
	fill: none;
	pointer-events: none;
}

.vmr-search input {
	width: 100%;
	height: 46px;
	padding: 0 2.7rem 0 2.75rem;
	border: 1px solid var(--vmr-line);
	border-radius: 9px;
	color: var(--vmr-ink);
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(17, 36, 59, 0.04);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.vmr-search input::placeholder {
	color: #808a98;
}

.vmr-search input:focus {
	border-color: color-mix(in srgb, var(--vmr-accent) 55%, var(--vmr-line));
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--vmr-accent) 12%, transparent);
	outline: 0;
}

.vmr-search button {
	position: absolute;
	right: 0.55rem;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--vmr-muted);
	font-size: 1.35rem;
	line-height: 1;
	background: transparent;
}

.vmr-search button:hover {
	color: var(--vmr-ink);
	background: var(--vmr-soft);
}

.vmr-select-wrap {
	display: grid;
	gap: 0.24rem;
	min-width: 150px;
	margin: 0;
}

.vmr-select-wrap > span {
	color: var(--vmr-muted);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
}

.vmr-select-wrap select {
	height: 46px;
	max-width: 220px;
	padding: 0 2rem 0 0.8rem;
	border: 1px solid var(--vmr-line);
	border-radius: 9px;
	color: var(--vmr-ink);
	background-color: #fff;
}

.vmr-view-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	overflow: hidden;
	height: 46px;
	border: 1px solid var(--vmr-line);
	border-radius: 9px;
	background: #fff;
}

.vmr-view-toggle button {
	display: grid;
	place-items: center;
	width: 44px;
	padding: 0;
	border: 0;
	border-right: 1px solid var(--vmr-line);
	color: var(--vmr-muted);
	background: transparent;
}

.vmr-view-toggle button:last-child {
	border-right: 0;
}

.vmr-view-toggle button:hover,
.vmr-view-toggle button.is-active {
	color: #fff;
	background: var(--vmr-navy);
}

.vmr-view-toggle svg {
	width: 1.25rem;
	height: 1.25rem;
	stroke: none;
}

.vmr-rack-toggle {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.65rem 0.9rem;
	border: 1px solid color-mix(in srgb, var(--vmr-accent) 46%, var(--vmr-line));
	border-radius: 9px;
	color: #fff;
	font-weight: 750;
	white-space: nowrap;
	background: var(--vmr-accent);
	box-shadow: 0 4px 10px color-mix(in srgb, var(--vmr-accent) 24%, transparent);
	transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.vmr-rack-toggle:hover {
	filter: brightness(0.94);
	transform: translateY(-1px);
	box-shadow: 0 7px 16px color-mix(in srgb, var(--vmr-accent) 30%, transparent);
}

.vmr-rack-toggle svg {
	width: 1.15rem;
	height: 1.15rem;
	stroke: none;
}

.vmr-rack-toggle mark {
	display: grid;
	place-items: center;
	min-width: 1.45rem;
	height: 1.45rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	color: var(--vmr-accent);
	font-size: 0.75rem;
	font-weight: 850;
	background: #fff;
}

.vmr-branch-tabs {
	display: flex;
	gap: 0.45rem;
	overflow-x: auto;
	margin: 1rem 0 0;
	padding: 0.15rem 0 0.6rem;
	scrollbar-width: thin;
}

.vmr-branch-tabs button {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0.48rem 0.75rem;
	border: 1px solid var(--vmr-line);
	border-radius: 999px;
	color: var(--vmr-navy);
	font-size: 0.83rem;
	font-weight: 750;
	white-space: nowrap;
	background: #fff;
	box-shadow: 0 2px 6px rgba(17, 36, 59, 0.04);
	transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.vmr-branch-tabs button:hover {
	border-color: color-mix(in srgb, var(--vmr-accent) 45%, var(--vmr-line));
	transform: translateY(-1px);
}

.vmr-branch-tabs button.is-active {
	border-color: var(--vmr-navy);
	color: #fff;
	background: var(--vmr-navy);
}

.vmr-branch-tabs button span {
	display: grid;
	place-items: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.26rem;
	border-radius: 999px;
	color: var(--vmr-muted);
	font-size: 0.68rem;
	font-weight: 850;
	background: var(--vmr-soft);
}

.vmr-branch-tabs button.is-active span {
	color: var(--vmr-navy);
	background: #fff;
}

.vmr-results-bar {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	min-height: 42px;
	margin-top: 0.25rem;
}

.vmr-results-bar p {
	margin: 0;
	color: var(--vmr-muted);
	font-size: 0.84rem;
	font-weight: 650;
}

.vmr-reset {
	padding: 0.25rem 0;
	border: 0;
	color: var(--vmr-accent);
	font-size: 0.82rem;
	font-weight: 750;
	background: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Award cards */
.vmr-grid {
	display: grid;
	grid-template-columns: repeat(var(--vmr-columns, 4), minmax(0, 1fr));
	gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.vmr-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 100%;
	overflow: hidden;
	border: 1px solid var(--vmr-line);
	border-radius: var(--vmr-radius);
	background: var(--vmr-paper);
	box-shadow: var(--vmr-shadow-sm);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.vmr-card:hover,
.vmr-card:focus-within {
	border-color: color-mix(in srgb, var(--vmr-accent) 34%, var(--vmr-line));
	box-shadow: var(--vmr-shadow-md);
	transform: translateY(-3px);
}

.vmr-card__main {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 0;
	border: 0;
	color: inherit;
	text-align: left;
	background: transparent;
}

.vmr-card__visual {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	align-items: center;
	min-height: 114px;
	padding: 1.55rem 1rem 1.2rem;
	border-bottom: 1px solid var(--vmr-line);
	background:
		radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.9), transparent 35%),
		linear-gradient(145deg, #edf1f6 0%, #f8f9fb 54%, #e8edf3 100%);
}

.vmr-card__visual::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.18;
	background-image: repeating-linear-gradient(135deg, transparent 0 15px, rgba(17, 36, 59, 0.08) 15px 16px);
}

.vmr-ribbon {
	position: relative;
	display: block;
	aspect-ratio: 18 / 5;
	isolation: isolate;
	overflow: hidden;
	border: 0;
	background: var(--vmr-ribbon, #e7ebf0);
	box-shadow: 0 4px 9px rgba(7, 18, 33, 0.22);
}

.vmr-ribbon::before {
	content: "";
	position: absolute;
	z-index: 2;
	inset: 0;
	pointer-events: none;
	opacity: 0.28;
	background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.34) 0 1px, rgba(0, 0, 0, 0.08) 1px 2px, transparent 2px 4px);
	mix-blend-mode: soft-light;
}

.vmr-ribbon::after {
	content: "";
	position: absolute;
	z-index: 3;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 32%, rgba(0, 0, 0, 0.13));
}

.vmr-ribbon::before,
.vmr-ribbon::after {
	display: none;
}

.vmr-ribbon--image {
	background: transparent;
}

.vmr-ribbon img {
	position: absolute;
	z-index: 2;
	display: block;
	inset: -1px;
	width: calc(100% + 2px) !important;
	height: calc(100% + 2px) !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: 0;
	object-fit: cover;
	background: transparent;
	box-shadow: none !important;
}

.vmr-ribbon--image.is-error img {
	display: none;
}

.vmr-ribbon__fallback {
	position: absolute;
	z-index: 1;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 0.25rem;
	color: #566170;
	font-size: 0.57rem;
	font-weight: 760;
	letter-spacing: 0.02em;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	background:
		repeating-linear-gradient(135deg, rgba(17, 36, 59, 0.035) 0 8px, rgba(17, 36, 59, 0.09) 8px 9px),
		#edf0f4;
}

.vmr-ribbon--custom {
	background: var(--vmr-ribbon);
}

.vmr-ribbon--unavailable,
.vmr-ribbon--image.is-error {
	border: 1px solid #929aa5;
	border-color: #929aa5;
	background: #edf0f4;
	box-shadow: 0 3px 8px rgba(17, 36, 59, 0.12);
}

.vmr-ribbon--card {
	width: min(100%, 176px);
	height: auto;
	margin: 0 auto;
	border-radius: 0;
}


.vmr-card__precedence {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	z-index: 4;
	display: inline-flex;
	gap: 0.24rem;
	align-items: baseline;
	padding: 0.28rem 0.45rem;
	border: 1px solid rgba(17, 36, 59, 0.14);
	border-radius: 999px;
	color: var(--vmr-navy);
	font-size: 0.72rem;
	font-weight: 850;
	line-height: 1;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 7px rgba(17, 36, 59, 0.08);
	backdrop-filter: blur(4px);
}

.vmr-card__precedence small {
	font-size: 0.55rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.vmr-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem 1rem 1.1rem;
}

.vmr-card__category {
	margin: 0 0 0.35rem;
	color: var(--vmr-accent);
	font-size: 0.66rem;
	font-weight: 850;
	letter-spacing: 0.09em;
	line-height: 1.25;
	text-transform: uppercase;
}

.vmr-card h3 {
	margin: 0;
	color: var(--vmr-navy);
	font-size: 1.02rem;
	font-weight: 760;
	letter-spacing: -0.015em;
	line-height: 1.3;
	text-wrap: balance;
}

.vmr-card__summary {
	display: -webkit-box;
	overflow: hidden;
	margin: 0.55rem 0 0;
	color: var(--vmr-muted);
	font-size: 0.82rem;
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.vmr-card__meta {
	display: flex;
	gap: 0.35rem 0.55rem;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 0.85rem;
	color: #6b7481;
	font-size: 0.68rem;
	font-weight: 700;
}

.vmr-card__meta span {
	display: inline-flex;
	align-items: center;
}

.vmr-card__meta span + span::before {
	content: "";
	width: 3px;
	height: 3px;
	margin-right: 0.55rem;
	border-radius: 50%;
	background: var(--vmr-gold);
}

.vmr-card__art-note {
	margin: 0.55rem 0 0;
	color: #7b6a4c;
	font-size: 0.64rem;
	font-style: italic;
}

.vmr-card__rack {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(17, 36, 59, 0.16);
	border-radius: 50%;
	color: var(--vmr-navy);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 3px 10px rgba(17, 36, 59, 0.11);
	transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.vmr-card__rack:hover {
	color: #fff;
	background: var(--vmr-accent);
	transform: scale(1.06);
}

.vmr-card__rack svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke-width: 2.3;
}

.vmr-card__rack.is-selected {
	color: #fff;
	background: var(--vmr-accent);
}

.vmr-card__rack.is-selected svg {
	transform: rotate(45deg);
}

/* List view */
.vmr-view-list .vmr-grid {
	grid-template-columns: 1fr;
	gap: 0.65rem;
}

.vmr-view-list .vmr-card {
	min-height: 132px;
}

.vmr-view-list .vmr-card__main {
	display: grid;
	grid-template-columns: minmax(210px, 28%) minmax(0, 1fr);
	width: 100%;
}

.vmr-view-list .vmr-card__visual {
	min-height: 132px;
	border-right: 1px solid var(--vmr-line);
	border-bottom: 0;
}

.vmr-view-list .vmr-card__body {
	padding: 1.15rem 3.25rem 1.15rem 1.3rem;
}

.vmr-view-list .vmr-card__summary {
	-webkit-line-clamp: 2;
}

.vmr-view-list .vmr-card h3 {
	font-size: 1.15rem;
}

/* No results and disclaimer */
.vmr-no-results {
	display: grid;
	place-items: center;
	min-height: 330px;
	padding: 2.5rem;
	border: 1px dashed #b9c2ce;
	border-radius: var(--vmr-radius);
	text-align: center;
	background: #fff;
}

.vmr-no-results > div {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	color: var(--vmr-gold);
	font-size: 1.6rem;
	background: #fff8e8;
}

.vmr-no-results h3 {
	margin: 1rem 0 0;
	color: var(--vmr-navy);
	font-size: 1.35rem;
}

.vmr-no-results p {
	max-width: 520px;
	margin: 0.35rem 0 1.2rem;
	color: var(--vmr-muted);
}

.vmr-disclaimer {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-top: 1.25rem;
	padding: 0.9rem 1rem;
	border: 1px solid #ded4b9;
	border-radius: 10px;
	color: #6e5a2e;
	background: #fffaf0;
}

.vmr-disclaimer svg {
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	fill: none;
}

.vmr-disclaimer p {
	margin: 0;
	font-size: 0.77rem;
	line-height: 1.5;
}

/* Buttons shared by overlays */
.vmr-button,
.vmr-explorer a.vmr-button {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.64rem 0.95rem;
	border: 1px solid var(--vmr-accent);
	border-radius: 8px;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 760;
	line-height: 1.2;
	background: var(--vmr-accent);
	box-shadow: none;
	text-decoration: none;
	transition: filter 150ms ease, transform 150ms ease, background 150ms ease, color 150ms ease;
}

.vmr-button:hover,
.vmr-explorer a.vmr-button:hover {
	color: #fff;
	filter: brightness(0.92);
	transform: translateY(-1px);
}

.vmr-button--secondary,
.vmr-explorer a.vmr-button--secondary {
	border-color: var(--vmr-navy);
	color: var(--vmr-navy);
	background: #fff;
}

.vmr-button--secondary:hover,
.vmr-explorer a.vmr-button--secondary:hover {
	color: #fff;
	background: var(--vmr-navy);
}

.vmr-button--ghost,
.vmr-explorer a.vmr-button--ghost {
	border-color: transparent;
	color: var(--vmr-muted);
	background: transparent;
}

.vmr-button--ghost:hover,
.vmr-explorer a.vmr-button--ghost:hover {
	color: var(--vmr-navy);
	background: var(--vmr-soft);
}

/* Description modal */
.vmr-modal {
	position: fixed;
	z-index: 100050;
	inset: 0;
	display: grid;
	place-items: center;
	padding: clamp(0.75rem, 3vw, 2rem);
}

.vmr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 16, 29, 0.78);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 190ms ease;
}

.vmr-modal__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(260px, 36%) minmax(0, 1fr);
	width: min(980px, 100%);
	max-height: min(820px, calc(100vh - 2rem));
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--vmr-radius-lg);
	background: #fff;
	box-shadow: var(--vmr-shadow-lg);
	opacity: 0;
	transform: translateY(14px) scale(0.985);
	transition: opacity 190ms ease, transform 190ms ease;
}

.vmr-modal.is-open .vmr-modal__backdrop,
.vmr-modal.is-open .vmr-modal__dialog {
	opacity: 1;
}

.vmr-modal.is-open .vmr-modal__dialog {
	transform: translateY(0) scale(1);
}

.vmr-modal__close {
	position: absolute;
	top: 0.8rem;
	right: 0.8rem;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--vmr-line);
	border-radius: 50%;
	color: var(--vmr-navy);
	font-size: 1.5rem;
	line-height: 1;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 3px 10px rgba(17, 36, 59, 0.12);
}

.vmr-modal__close:hover {
	color: #fff;
	background: var(--vmr-accent);
}

.vmr-modal__visuals {
	position: relative;
	display: grid;
	place-items: center;
	align-content: center;
	gap: 0;
	min-height: 360px;
	overflow: hidden;
	padding: 3rem 2rem;
	background:
		radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.16), transparent 28%),
		linear-gradient(155deg, var(--vmr-navy), #264b76 64%, #102238);
}

.vmr-modal__visuals::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.15;
	background-image:
		linear-gradient(30deg, transparent 12%, #fff 12.5%, #fff 13%, transparent 13.5%),
		linear-gradient(150deg, transparent 12%, #fff 12.5%, #fff 13%, transparent 13.5%);
	background-size: 52px 90px;
}

.vmr-modal__visuals > div {
	position: relative;
	z-index: 1;
	width: 100%;
}

.vmr-ribbon--modal {
	width: min(100%, 286px);
	height: auto;
	margin: 0 auto;
	border-radius: 0;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.36);
}


.vmr-modal__content {
	overflow-y: auto;
	padding: clamp(2rem, 4vw, 3.5rem);
	scrollbar-width: thin;
}

.vmr-modal__eyebrow {
	margin: 0 3rem 0.4rem 0;
	color: var(--vmr-accent);
	font-size: 0.7rem;
	font-weight: 850;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-transform: uppercase;
}

.vmr-modal__content h2 {
	margin: 0 2.7rem 0 0;
	color: var(--vmr-navy);
	font-size: clamp(1.75rem, 3vw, 2.8rem);
	font-weight: 760;
	letter-spacing: -0.035em;
	line-height: 1.08;
	text-wrap: balance;
}

.vmr-modal__chips {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	margin: 1rem 0 0;
}

.vmr-modal__chips span {
	padding: 0.34rem 0.55rem;
	border: 1px solid var(--vmr-line);
	border-radius: 999px;
	color: var(--vmr-navy);
	font-size: 0.68rem;
	font-weight: 750;
	line-height: 1.15;
	background: var(--vmr-soft);
}

.vmr-modal__description {
	margin-top: 1.4rem;
	color: #333f4d;
	font-size: 0.96rem;
	line-height: 1.72;
}

.vmr-modal__description p {
	margin: 0 0 0.9rem;
}

.vmr-modal__description p:last-child {
	margin-bottom: 0;
}

.vmr-modal__description a {
	color: var(--vmr-accent);
	font-weight: 700;
}

.vmr-modal__details {
	display: grid;
	gap: 0;
	margin: 1.45rem 0 0;
	border-top: 1px solid var(--vmr-line);
}

.vmr-modal__details > div {
	display: grid;
	grid-template-columns: minmax(110px, 31%) minmax(0, 1fr);
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--vmr-line);
}

.vmr-modal__details dt,
.vmr-modal__details dd {
	margin: 0;
}

.vmr-modal__details dt {
	color: var(--vmr-muted);
	font-size: 0.71rem;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.vmr-modal__details dd {
	color: var(--vmr-ink);
	font-size: 0.85rem;
	line-height: 1.5;
}

.vmr-modal__art-note {
	margin: 0.9rem 0 0;
	color: #826d42;
	font-size: 0.74rem;
	font-style: italic;
}

.vmr-modal__actions {
	display: flex;
	gap: 0.55rem;
	flex-wrap: wrap;
	margin-top: 1.3rem;
}

/* Ribbon rack drawer */
.vmr-rack {
	position: fixed;
	z-index: 100040;
	inset: 0;
	display: flex;
	justify-content: flex-end;
}

.vmr-rack__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 16, 29, 0.66);
	opacity: 0;
	backdrop-filter: blur(4px);
	transition: opacity 200ms ease;
}

.vmr-rack__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(520px, 100%);
	height: 100%;
	overflow-y: auto;
	border-left: 1px solid rgba(255, 255, 255, 0.16);
	background: #fff;
	box-shadow: -24px 0 70px rgba(7, 16, 29, 0.3);
	transform: translateX(102%);
	transition: transform 220ms ease;
}

.vmr-rack.is-open .vmr-rack__backdrop {
	opacity: 1;
}

.vmr-rack.is-open .vmr-rack__panel {
	transform: translateX(0);
}

.vmr-rack__header {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
	padding: 1.45rem 1.5rem 1.2rem;
	color: #fff;
	background:
		radial-gradient(circle at 85% 0, rgba(255, 255, 255, 0.13), transparent 34%),
		linear-gradient(135deg, var(--vmr-navy), #254873);
}

.vmr-rack__header .vmr-eyebrow {
	color: #f0d593;
}

.vmr-rack__header h2 {
	margin: 0;
	color: #fff;
	font-size: 1.8rem;
	font-weight: 760;
	letter-spacing: -0.035em;
	line-height: 1.1;
}

.vmr-rack__header p:last-child {
	margin: 0.3rem 0 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.78rem;
}

.vmr-rack__close {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 50%;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	background: rgba(255, 255, 255, 0.08);
}

.vmr-rack__close:hover {
	background: var(--vmr-accent);
}

.vmr-rack__notice {
	padding: 0.8rem 1.5rem;
	border-bottom: 1px solid #ded4b9;
	color: #6f5b2d;
	font-size: 0.73rem;
	line-height: 1.48;
	background: #fffaf0;
}

.vmr-rack__canvas {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 280px;
	padding: 2rem 1.5rem;
	border-bottom: 1px solid var(--vmr-line);
	background:
		radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.12), transparent 32%),
		linear-gradient(150deg, #1a2f49, #0b1828);
}

.vmr-rack__canvas::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.12;
	background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.15) 18px 19px);
}

.vmr-rack__empty {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	max-width: 320px;
	color: rgba(255, 255, 255, 0.7);
	text-align: center;
}

.vmr-rack__empty svg {
	width: 3rem;
	height: 3rem;
	margin-bottom: 0.75rem;
	fill: currentColor;
	stroke: none;
	opacity: 0.7;
}

.vmr-rack__empty p {
	margin: 0;
	font-size: 0.88rem;
}

.vmr-rack__rows {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
}

.vmr-rack__row {
	display: flex;
	gap: 4px;
	justify-content: center;
}

.vmr-rack__row button {
	position: relative;
	padding: 0;
	border: 0;
	background: transparent;
}

.vmr-ribbon--rack {
	width: 110px;
	height: auto;
	border-radius: 0;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


.vmr-ribbon--rack .vmr-ribbon__fallback {
	padding: 0.1rem;
	font-size: 0.43rem;
	letter-spacing: 0;
}

.vmr-rack__row button:hover .vmr-ribbon--rack,
.vmr-rack__row button:focus-visible .vmr-ribbon--rack {
	filter: brightness(1.12);
}

.vmr-rack__selected {
	display: grid;
	padding: 0 1.5rem;
}

.vmr-rack__selected-item {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.8rem 0;
	border-bottom: 1px solid var(--vmr-line);
}

.vmr-rack__selected-item > div {
	display: grid;
	min-width: 0;
}

.vmr-rack__selected-item strong {
	color: var(--vmr-navy);
	font-size: 0.83rem;
	line-height: 1.25;
}

.vmr-rack__selected-item small {
	margin-top: 0.2rem;
	color: var(--vmr-muted);
	font-size: 0.68rem;
}

.vmr-rack__selected-item button {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--vmr-line);
	border-radius: 50%;
	color: var(--vmr-muted);
	font-size: 1.2rem;
	background: #fff;
}

.vmr-rack__selected-item button:hover {
	border-color: var(--vmr-accent);
	color: #fff;
	background: var(--vmr-accent);
}

.vmr-rack__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	gap: 0.55rem;
	flex-wrap: wrap;
	margin-top: auto;
	padding: 1rem 1.5rem;
	border-top: 1px solid var(--vmr-line);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 -8px 24px rgba(17, 36, 59, 0.06);
	backdrop-filter: blur(8px);
}

/* Toast */
.vmr-toast {
	position: fixed;
	z-index: 100100;
	left: 50%;
	bottom: 1.5rem;
	max-width: min(420px, calc(100vw - 2rem));
	padding: 0.75rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	text-align: center;
	background: #102238;
	box-shadow: 0 12px 30px rgba(7, 16, 29, 0.26);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 15px);
	transition: opacity 180ms ease, transform 180ms ease;
}

.vmr-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Responsive behavior */
@media (max-width: 1280px) {
	.vmr-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.vmr-controls {
		grid-template-columns: minmax(220px, 1fr) auto auto auto;
	}

	.vmr-rack-toggle {
		grid-column: -2 / -1;
	}
}

@media (max-width: 980px) {
	.vmr-hero {
		grid-template-columns: 1fr;
		align-items: start;
	}

	.vmr-hero__stat {
		grid-template-columns: auto 1fr;
		gap: 0.6rem;
		align-items: end;
		justify-self: start;
	}

	.vmr-hero__stat span {
		margin: 0 0 0.2rem;
	}

	.vmr-controls {
		grid-template-columns: minmax(0, 1fr) minmax(145px, 0.55fr) auto;
	}

	.vmr-select-wrap:nth-of-type(2) {
		grid-column: 1 / 2;
	}

	.vmr-rack-toggle {
		grid-column: auto;
	}

	.vmr-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vmr-modal__dialog {
		grid-template-columns: 250px minmax(0, 1fr);
	}

	.vmr-modal__visuals {
		min-height: 330px;
		padding-inline: 1.25rem;
	}

	.vmr-ribbon--modal {
		width: min(100%, 250px);
		height: auto;
	}
}

@media (max-width: 720px) {
	.vmr-explorer {
		font-size: 15px;
	}

	.vmr-hero {
		min-height: 0;
		padding: 2rem 1.25rem;
		border-radius: var(--vmr-radius) var(--vmr-radius) 0 0;
	}

	.vmr-hero h2 {
		font-size: clamp(2rem, 10vw, 3.25rem);
	}

	.vmr-shell {
		padding: 0.75rem;
		border-radius: 0 0 var(--vmr-radius) var(--vmr-radius);
	}

	.vmr-controls {
		grid-template-columns: 1fr 1fr;
		padding: 0.75rem;
	}

	.vmr-search {
		grid-column: 1 / -1;
	}

	.vmr-select-wrap,
	.vmr-select-wrap:nth-of-type(2) {
		grid-column: auto;
		min-width: 0;
	}

	.vmr-select-wrap select {
		width: 100%;
		max-width: none;
	}

	.vmr-view-toggle {
		justify-self: start;
	}

	.vmr-rack-toggle {
		justify-self: stretch;
	}

	.vmr-grid {
		grid-template-columns: 1fr;
	}

	.vmr-card__visual {
		min-height: 106px;
	}

	.vmr-view-list .vmr-card__main {
		display: flex;
	}

	.vmr-view-list .vmr-card__visual {
		min-height: 106px;
		border-right: 0;
		border-bottom: 1px solid var(--vmr-line);
	}

	.vmr-view-list .vmr-card__body {
		padding: 1rem;
	}

	.vmr-modal {
		place-items: stretch;
		padding: 0;
	}

	.vmr-modal__dialog {
		grid-template-columns: 1fr;
		width: 100%;
		height: 100%;
		max-height: none;
		border: 0;
		border-radius: 0;
	}

	.vmr-modal__visuals {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		align-items: center;
		min-height: 155px;
		padding: 2rem 4rem 2rem 1.25rem;
	}

	.vmr-ribbon--modal {
		width: min(100%, 230px);
		height: auto;
	}


	.vmr-modal__content {
		padding: 1.4rem 1.25rem 2rem;
	}

	.vmr-modal__content h2 {
		font-size: 1.8rem;
	}

	.vmr-modal__details > div {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}

	.vmr-rack__panel {
		width: 100%;
	}
}

@media (max-width: 430px) {
	.vmr-controls {
		grid-template-columns: 1fr;
	}

	.vmr-search,
	.vmr-select-wrap,
	.vmr-select-wrap:nth-of-type(2),
	.vmr-rack-toggle {
		grid-column: 1;
	}

	.vmr-view-toggle {
		justify-self: start;
	}

	.vmr-rack-toggle {
		justify-self: stretch;
	}

	.vmr-card__visual {
		grid-template-columns: minmax(0, 1fr);
	}

	.vmr-ribbon--rack {
		width: 96px;
	}

	.vmr-rack__canvas {
		padding-inline: 0.75rem;
	}

	.vmr-rack__actions .vmr-button {
		flex: 1 1 auto;
	}
}

/* Print only the personal rack when requested. */
@media print {
	body.vmr-overlay-open {
		overflow: visible !important;
	}

	.vmr-explorer.vmr-print-rack > :not(.vmr-rack),
	.vmr-explorer.vmr-print-rack .vmr-rack__backdrop,
	.vmr-explorer.vmr-print-rack .vmr-rack__close,
	.vmr-explorer.vmr-print-rack .vmr-rack__actions,
	.vmr-explorer.vmr-print-rack .vmr-rack__selected {
		display: none !important;
	}

	.vmr-explorer.vmr-print-rack .vmr-rack,
	.vmr-explorer.vmr-print-rack .vmr-rack__panel {
		position: static !important;
		display: block !important;
		width: 100% !important;
		height: auto !important;
		overflow: visible !important;
		border: 0 !important;
		box-shadow: none !important;
		transform: none !important;
	}

	.vmr-explorer.vmr-print-rack .vmr-rack__header {
		color: #000 !important;
		background: #fff !important;
	}

	.vmr-explorer.vmr-print-rack .vmr-rack__header h2,
	.vmr-explorer.vmr-print-rack .vmr-rack__header p,
	.vmr-explorer.vmr-print-rack .vmr-rack__header .vmr-eyebrow {
		color: #000 !important;
	}

	.vmr-explorer.vmr-print-rack .vmr-rack__canvas {
		min-height: 0;
		border: 2px solid #000;
		background: #fff !important;
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}

	.vmr-explorer.vmr-print-rack .vmr-ribbon {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}

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

@media (forced-colors: active) {
	.vmr-ribbon {
		border: 2px solid CanvasText;
	}

	.vmr-card,
	.vmr-controls,
	.vmr-modal__dialog,
	.vmr-rack__panel {
		border: 1px solid CanvasText;
	}
}
