/* Gajst vrtiljak – everything is scoped under .gajst-vrt so the theme and the
   plugin cannot leak into each other. Animations touch transform/opacity only. */

.gajst-vrt {
	/* brand colours sampled from the artwork */
	--gv-navy: #0b1d41;
	--gv-orange: #f89743;
	--gv-red: #bf2429;
	--gv-yellow: #fedd00;
	--gv-blue: #2e3092;
	/* semantic tokens: inherit gajst.org's Twenty Twenty-Four palette/fonts, fall back to the same values */
	--gv-bg: var(--wp--preset--color--base, #f9f8f5);
	--gv-paper: #fff;
	--gv-text: var(--wp--preset--color--contrast, #000);
	--gv-text-muted: #4a4a4a;
	--gv-border: rgba(0, 0, 0, 0.14);
	--gv-accent: var(--wp--preset--color--contrast-2, #fe963e);
	--gv-accent-contrast: #000;
	--gv-accent-hover: #ffa65c;
	--gv-focus: var(--gv-navy);
	--gv-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.12);
	--gv-shadow-card-lift: 0 2px 4px rgba(0, 0, 0, 0.14), 0 14px 28px rgba(0, 0, 0, 0.22);
	--gv-shadow-stage: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
	--gv-shadow-panel: 0 2px 6px rgba(0, 0, 0, 0.1), 0 24px 60px rgba(0, 0, 0, 0.35);
	--gv-radius-card: 8.5% / 5.5%;
	--gv-radius-stage: 16px;
	--gv-ease: cubic-bezier(0.2, 0, 0, 1);
	--gv-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
	--gv-font-display: var(--wp--preset--font-family--heading, "Jost", "Instrument Sans", system-ui, sans-serif);
	--gv-font-body: var(--wp--preset--font-family--body, "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);

	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	font-family: var(--gv-font-body);
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--gv-text);
	text-align: start;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
/* By default the root is transparent: the white stage card sits straight on the
   page, like the existing artwork on gajst.org's light "vozovnica" pages.
   ozadje="svetlo" paints the site's light section colour for use on the black home page. */
.gajst-vrt--panel {
	padding: clamp(16px, 4vw, 48px) clamp(16px, 3vw, 32px);
	border-radius: 24px;
	background: var(--gv-bg);
}
.gajst-vrt *,
.gajst-vrt *::before,
.gajst-vrt *::after { box-sizing: border-box; }
.gajst-vrt img { display: block; max-width: 100%; height: auto; border: 0; }
.gajst-vrt ul, .gajst-vrt ol { list-style: none; margin: 0; padding: 0; }
.gajst-vrt p { margin: 0; }
.gajst-vrt h2, .gajst-vrt h3 { margin: 0; font-family: var(--gv-font-body); font-weight: 600; line-height: 1.15; color: var(--gv-text); letter-spacing: -0.01em; text-wrap: balance; }

/* Theme-proof button reset. */
.gajst-vrt button {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}
.gajst-vrt button:focus { outline: none; }
.gajst-vrt button:focus-visible,
.gajst-vrt [tabindex]:focus-visible {
	outline: 3px solid var(--gv-focus);
	outline-offset: 3px;
}
@media (forced-colors: active) {
	.gajst-vrt button:focus-visible { outline-color: Highlight; }
}

.gajst-vrt .gv-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.gajst-vrt__noscript li { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.gajst-vrt__noscript img { width: 60px; }

/* ---------- Wheel ---------- */

.gajst-vrt .gv-stage {
	/* Never taller than the viewport: width follows from the artwork's aspect ratio. */
	--gv-stage-pad: clamp(8px, 2vw, 24px);
	--gv-stage-reserve: 96px;
	width: min(100%, 880px, calc((100vh - var(--gv-stage-reserve)) * var(--gv-wheel-aspect, 0.7071) + 2 * var(--gv-stage-pad)));
	width: min(100%, 880px, calc((100dvh - var(--gv-stage-reserve)) * var(--gv-wheel-aspect, 0.7071) + 2 * var(--gv-stage-pad)));
	margin: 0 auto;
	padding: var(--gv-stage-pad);
	border-radius: var(--gv-radius-stage);
	background: var(--gv-paper);
	box-shadow: var(--gv-shadow-stage);
}
.gajst-vrt .gv-wheel {
	position: relative;
	width: 100%;
	margin: 0 auto;
	aspect-ratio: var(--gv-wheel-aspect, 0.7071);
	user-select: none;
	-webkit-user-select: none;
	contain: layout;
}
.gajst-vrt .gv-wheel__bg { position: absolute; inset: 0; pointer-events: none; }
.gajst-vrt .gv-wheel__bg img { width: 100%; height: 100%; object-fit: fill; }
.gajst-vrt .gv-slots { position: absolute; inset: 0; transform-origin: var(--gv-hub-x, 50%) var(--gv-hub-y, 42%); }

.gajst-vrt .gv-slot {
	position: absolute;
	/* left/top/width/height/--gv-angle come from slots.json via inline style */
	transform: rotate(var(--gv-angle, 0deg));
}
/* The gondola sways around a pivot above the card, like a hanging seat. */
.gajst-vrt .gv-slot__sway {
	position: absolute;
	inset: 0;
	transform-origin: 50% -40%;
}
@media (prefers-reduced-motion: no-preference) {
	.gajst-vrt .gv-wheel.is-idle .gv-slot__sway {
		animation: gv-sway 6.5s ease-in-out infinite;
		animation-delay: var(--gv-sway-delay, 0s);
	}
	.gajst-vrt .gv-wheel.is-idle .gv-slot:hover .gv-slot__sway,
	.gajst-vrt .gv-wheel.is-idle .gv-slot:focus-within .gv-slot__sway,
	.gajst-vrt .gv-wheel.is-idle.is-paused .gv-slot__sway { animation-play-state: paused; }
}
@keyframes gv-sway {
	0%, 100% { rotate: -1.1deg; }
	50% { rotate: 1.1deg; }
}

/* ---------- Card ---------- */

.gajst-vrt .gv-card {
	/*
	 * Laid out at its grown (hover) size and scaled down at rest. Browsers rasterise
	 * a card at its layout size, so growing it on hover only ever shows that raster
	 * at scale 1 or below and the drawing stays sharp (WebKit keeps the resting
	 * raster while a transform animates, which blurred the old scale-up).
	 * --gv-card-grow is read by the FLIP animation in the game script too.
	 */
	--gv-card-grow: 1.12;
	--gv-card-rest: calc(1 / var(--gv-card-grow));
	position: absolute;
	inset: calc(50% - 50% * var(--gv-card-grow));
	display: block;
	width: calc(100% * var(--gv-card-grow));
	height: calc(100% * var(--gv-card-grow));
	transform: scale(var(--gv-card-rest));
	border-radius: var(--gv-radius-card); /* percentages, so the radius follows the box through the resting scale */
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
	background: var(--gv-paper);
	box-shadow: var(--gv-shadow-card);
	transition-property: transform, box-shadow, opacity;
	transition-duration: 220ms;
	transition-timing-function: var(--gv-ease);
}
.gajst-vrt .gv-card picture, .gajst-vrt .gv-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gajst-vrt .gv-card::after {
	/* thin edge so a white card on the white wheel still reads as a card */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	pointer-events: none;
}
@media (hover: hover) {
	.gajst-vrt .gv-card:hover { transform: translateY(-3%) scale(1); box-shadow: var(--gv-shadow-card-lift); }
	/* The grown card overlaps its neighbours: bring its holder to the front. */
	.gajst-vrt .gv-slot:hover, .gajst-vrt .gv-deck__item:hover { z-index: 2; }
}
.gajst-vrt .gv-card:focus-visible { transform: translateY(-3%) scale(1); box-shadow: var(--gv-shadow-card-lift); }
.gajst-vrt .gv-slot:focus-within, .gajst-vrt .gv-deck__item:focus-within { z-index: 2; }
.gajst-vrt .gv-card:active { transform: scale(calc(var(--gv-card-rest) * 0.96)); transition-duration: 80ms; }
/* Touch: after the hold the card lifts to say "picked up"; it moves on the first drag. */
.gajst-vrt .gv-card.is-armed, .gajst-vrt .gv-card.is-armed:active { transform: translateY(-3%) scale(calc(var(--gv-card-rest) * 1.06)); box-shadow: var(--gv-shadow-card-lift); transition-duration: 120ms; }
.gajst-vrt .gv-card.is-dragging { opacity: 0.25; transform: scale(var(--gv-card-rest)); box-shadow: none; }
.gajst-vrt .gv-card.is-selected { outline: 2px solid var(--gv-orange); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
	.gajst-vrt .gv-card.is-selected { animation: gv-wiggle 1.2s ease-in-out infinite; }
}
@keyframes gv-wiggle {
	0%, 100% { rotate: 0deg; }
	30% { rotate: -1.3deg; }
	70% { rotate: 1.3deg; }
}

/* ---------- Modal ---------- */

.gajst-vrt.gajst-vrt--modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: 16px;
	padding-top: max(16px, env(safe-area-inset-top));
	padding-bottom: max(16px, env(safe-area-inset-bottom));
	overscroll-behavior: contain;
}
.gajst-vrt .gv-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}
@media (min-width: 720px) {
	.gajst-vrt .gv-modal__backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
}
.gajst-vrt .gv-modal__panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	width: min(100%, 960px);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	border-radius: 24px;
	background: var(--gv-bg);
	box-shadow: var(--gv-shadow-panel);
	will-change: transform;
}
.gajst-vrt .gv-modal__figure {
	position: relative;
	display: grid;
	place-items: center;
	padding: 24px;
	background: var(--gv-paper);
	min-height: 0;
	/* Single-finger moves here are ours (page / dismiss); pinch still zooms. */
	touch-action: pinch-zoom;
}
.gajst-vrt .gv-modal__figure .gv-modal__pic {
	position: relative;
	width: 100%;
	max-width: 420px;
	aspect-ratio: var(--gv-card-aspect, 0.6495);
	max-height: calc(100vh - 80px);
	max-height: calc(100dvh - 80px);
	border-radius: 16px;
	overflow: hidden;
	background: var(--gv-paper);
	box-shadow: var(--gv-shadow-card);
	transform-origin: 0 0;
}
.gajst-vrt .gv-modal__pic picture { position: absolute; inset: 0; display: block; }
.gajst-vrt .gv-modal__pic img { width: 100%; height: 100%; object-fit: cover; }
.gajst-vrt .gv-modal__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 48px 32px 32px;
	overflow: auto;
	overscroll-behavior: contain;
	min-height: 0;
}
.gajst-vrt .gv-modal__kicker { font-family: var(--gv-font-display); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gv-text-muted); }
.gajst-vrt .gv-modal__title { font-size: clamp(1.625rem, 2.8vw, 2.25rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0; }
.gajst-vrt .gv-modal__person { font-family: var(--gv-font-body); font-size: 1.125rem; font-weight: 600; color: var(--gv-blue); }
.gajst-vrt .gv-modal__desc { max-width: 58ch; color: var(--gv-text); text-wrap: pretty; }
.gajst-vrt .gv-modal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 8px; }
.gajst-vrt .gv-modal__close {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	z-index: 2;
}
.gajst-vrt .gv-modal__nav {
	position: absolute;
	top: 50%;
	translate: 0 -50%;
	z-index: 2;
}
.gajst-vrt .gv-modal__nav--prev { inset-inline-start: 8px; }
.gajst-vrt .gv-modal__nav--next { inset-inline-end: 8px; }
.gajst-vrt .gv-modal__nav svg { width: 22px; height: 22px; }
[dir="rtl"] .gajst-vrt .gv-modal__nav svg { transform: scaleX(-1); }
.gajst-vrt .gv-modal__count { font-variant-numeric: tabular-nums; }

@media (max-width: 719px) {
	.gajst-vrt.gajst-vrt--modal { padding: 0; align-items: end; }
	.gajst-vrt .gv-modal__panel {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
		width: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		border-radius: 24px 24px 0 0;
	}
	/* Phone sheet: the picture takes at most 40 % of the screen so the title, text
	   and the primary action fit below it; the actions stick to the sheet's bottom edge. */
	.gajst-vrt .gv-modal__figure { padding: 28px 16px 10px; }
	.gajst-vrt .gv-modal__figure .gv-modal__pic { width: min(100%, calc(40vh * var(--gv-card-aspect, 0.6495))); width: min(100%, calc(40dvh * var(--gv-card-aspect, 0.6495))); max-width: none; }
	.gajst-vrt .gv-modal__figure::before {
		/* drag handle */
		content: "";
		position: absolute;
		top: 10px;
		left: 50%;
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: var(--gv-border);
		translate: -50% 0;
	}
	.gajst-vrt .gv-modal__body { gap: 10px; padding: 14px 20px max(16px, env(safe-area-inset-bottom)); }
	.gajst-vrt .gv-modal__title { font-size: 1.5rem; }
	.gajst-vrt .gv-modal__actions { position: sticky; bottom: calc(-1 * max(16px, env(safe-area-inset-bottom))); margin-top: auto; margin-bottom: calc(-1 * max(16px, env(safe-area-inset-bottom))); padding: 12px 0 max(16px, env(safe-area-inset-bottom)); background: var(--gv-bg); }
	/* Prev/next sit beside the picture, never over the text. */
	.gajst-vrt .gv-modal__nav { top: calc(28px + 20vh); top: calc(28px + 20dvh); }
}

/* ---------- Buttons ---------- */

.gajst-vrt .gv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 12px 28px;
	border-radius: 100px;
	font-family: var(--gv-font-display);
	font-weight: 500;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	line-height: 1.2;
	white-space: nowrap;
	transition-property: transform, background-color, box-shadow, color, opacity;
	transition-duration: 160ms;
	transition-timing-function: var(--gv-ease);
}
.gajst-vrt .gv-btn:active { transform: scale(0.96); }
.gajst-vrt .gv-btn--primary { background: var(--gv-accent); color: var(--gv-accent-contrast); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(254, 150, 62, 0.3); }
@media (hover: hover) { .gajst-vrt .gv-btn--primary:hover { background: var(--gv-accent-hover); } }
.gajst-vrt .gv-btn--secondary { background: transparent; color: var(--gv-text); box-shadow: inset 0 0 0 1.5px currentColor; }
@media (hover: hover) { .gajst-vrt .gv-btn--secondary:hover { background: rgba(0, 0, 0, 0.06); } }
.gajst-vrt .gv-btn--danger { color: var(--gv-red); }
.gajst-vrt .gv-btn--icon {
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	border-radius: 50%;
	background: var(--gv-paper);
	color: var(--gv-text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.18);
}
@media (hover: hover) { .gajst-vrt .gv-btn--icon:hover { background: var(--gv-accent); } }
.gajst-vrt .gv-btn--icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.gajst-vrt .gv-btn[aria-disabled="true"], .gajst-vrt .gv-btn:disabled { opacity: 0.5; cursor: default; }
.gajst-vrt .gv-btn .gv-spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gv-rotate 0.8s linear infinite; }
@keyframes gv-rotate { to { transform: rotate(360deg); } }

/* ---------- List view (carousel, narrow screens) ---------- */

.gajst-vrt .gv-list { display: none; margin: 24px auto 0; max-width: 560px; }
.gajst-vrt .gv-list__title { font-size: 1.0625rem; margin-bottom: 8px; }
.gajst-vrt .gv-list li + li { border-top: 1px solid var(--gv-border); }
.gajst-vrt .gv-list button { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; }
.gajst-vrt .gv-list img { width: 36px; border-radius: 4px; box-shadow: var(--gv-shadow-card); }
.gajst-vrt .gv-list strong { font-weight: 600; }
.gajst-vrt .gv-list span { color: var(--gv-text-muted); font-size: 0.875rem; }
@media (max-width: 480px) { .gajst-vrt .gv-list.is-enabled { display: block; } }

/* ---------- Game ---------- */

/* One column, like the client's layout: the wheel big and centred on white, the
   deck in rows below it, the actions and the explanation under the deck. */
.gajst-vrt--game { background: var(--gv-paper); padding: clamp(8px, 2vw, 24px) 0 clamp(24px, 4vw, 48px); }
.gajst-vrt--game.gajst-vrt--panel { background: var(--gv-bg); padding: clamp(16px, 4vw, 48px) clamp(16px, 3vw, 32px); }
.gajst-vrt .gv-game { display: flex; flex-direction: column; gap: clamp(16px, 3vw, 32px); }
.gajst-vrt .gv-game .gv-stage {
	--gv-stage-pad: 0px;
	--gv-stage-reserve: 72px;
	width: min(100%, 620px, calc((100vh - var(--gv-stage-reserve)) * var(--gv-wheel-aspect, 0.7071)));
	width: min(100%, 620px, calc((100dvh - var(--gv-stage-reserve)) * var(--gv-wheel-aspect, 0.7071)));
	/* The same reserve is kept above the wheel when the game scrolls it into view: room for a sticky site header. */
	scroll-margin-top: var(--gv-stage-reserve);
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}
.gajst-vrt .gv-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; width: min(100%, 1120px); margin: 0 auto; padding: 0 16px; }
.gajst-vrt .gv-deck__title { font-size: 1.125rem; font-weight: 700; }
.gajst-vrt .gv-side .gv-hint { text-align: start; }
.gajst-vrt .gv-legal { max-width: 72ch; color: var(--gv-text-muted); font-size: 0.9375rem; line-height: 1.55; }
.gajst-vrt .gv-legal p { margin: 0 0 0.75em; }
.gajst-vrt .gv-legal a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
@media (min-width: 641px) {
	.gajst-vrt .gv-side .gv-toolbar { position: static; justify-content: flex-start; padding: 4px 0; border-radius: 0; background: transparent; box-shadow: none; }
}
.gajst-vrt .gv-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 16px;
	position: sticky;
	bottom: 0;
	z-index: 5;
	padding: 12px 16px;
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 -2px 16px rgba(0, 0, 0, 0.08);
}
.gajst-vrt .gv-counter {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-family: var(--gv-font-display);
	font-weight: 600;
	font-size: 1.5rem;
	font-variant-numeric: tabular-nums;
	color: var(--gv-text);
	margin-inline-end: auto;
}
.gajst-vrt .gv-counter small { font-size: 0.8125rem; font-weight: 600; color: var(--gv-text-muted); font-family: var(--gv-font-body); }
.gajst-vrt .gv-hint {
	min-height: 1.5em;
	text-align: center;
	color: var(--gv-text-muted);
	font-size: 0.9375rem;
	text-wrap: balance;
}
.gajst-vrt .gv-hint.is-active { color: var(--gv-text); font-weight: 600; }
.gajst-vrt .gv-hint button { margin-inline-start: 8px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: from-font; color: var(--gv-blue); font-weight: 600; }
.gajst-vrt .gv-status--ok { color: #1f6b3a; font-weight: 600; }
.gajst-vrt .gv-status--err { color: var(--gv-red); font-weight: 600; }

/* Empty slot = drop target. Transparent on the artwork's own white card outline. */
.gajst-vrt .gv-slot__empty {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: var(--gv-radius-card);
	transition-property: box-shadow, background-color, transform;
	transition-duration: 160ms;
	transition-timing-function: var(--gv-ease);
}
.gajst-vrt .gv-game.is-targeting .gv-slot__empty { box-shadow: inset 0 0 0 1.5px var(--gv-orange); background: rgba(248, 151, 67, 0.06); }
@media (hover: hover) { .gajst-vrt .gv-slot__empty:hover { background: rgba(0, 0, 0, 0.05); } }
.gajst-vrt .gv-slot.is-over .gv-slot__empty,
.gajst-vrt .gv-slot.is-over .gv-card { transform: scale(calc(var(--gv-card-rest) * 1.05)); box-shadow: 0 0 0 2px var(--gv-orange), var(--gv-shadow-card-lift); }
.gajst-vrt .gv-slot.is-pending .gv-slot__empty { box-shadow: inset 0 0 0 2px var(--gv-orange); background: rgba(248, 151, 67, 0.1); }
@media (prefers-reduced-motion: no-preference) {
	.gajst-vrt .gv-slot.is-pending .gv-slot__empty { animation: gv-wiggle 1.2s ease-in-out infinite; }
}

/* Deck */
.gajst-vrt .gv-deck { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.gajst-vrt .gv-deck .gv-hint { margin-bottom: 6px; }
.gajst-vrt .gv-deck__title { font-size: 1.25rem; }
.gajst-vrt .gv-deck__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 12px 10px;
	padding: 4px 0;
}
/* Wide screens: three rows of nine, so a card stays about 115 px wide and readable. */
@media (min-width: 1040px) {
	.gajst-vrt .gv-deck__list { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 14px 10px; }
}
/* On the white page the cards' own white ground is invisible: they read as cut-out drawings. */
.gajst-vrt .gv-card--deck { --gv-card-grow: 1.25; background: transparent; box-shadow: none; border-radius: 8px; /* 6px once scaled to rest */ }
.gajst-vrt .gv-card--deck::after { display: none; }
@media (hover: hover) { .gajst-vrt .gv-card--deck:hover { box-shadow: none; } }
.gajst-vrt .gv-card--deck:focus-visible { box-shadow: none; outline: 2px solid var(--gv-orange); outline-offset: 2px; }
.gajst-vrt .gv-card--deck.is-armed, .gajst-vrt .gv-card--deck.is-armed:active { box-shadow: none; }
.gajst-vrt .gv-deck__item { position: relative; aspect-ratio: var(--gv-card-aspect, 0.6495); }
.gajst-vrt .gv-deck__item.is-ghost { visibility: hidden; }
.gajst-vrt .gv-deck__empty { padding: 24px; text-align: center; color: var(--gv-text-muted); border: 1.5px dashed var(--gv-border); border-radius: 16px; }
.gajst-vrt .gv-card--deck { touch-action: pan-x pan-y pinch-zoom; }
@media (max-width: 640px) {
	.gajst-vrt .gv-deck__list {
		display: grid;
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-template-rows: repeat(2, 1fr);
		grid-auto-columns: 112px;
		gap: 12px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		/* 112px columns on a 390px screen: three cards fit and the fourth peeks past the edge, which says "scrolls" */
		padding: 6px 16px 10px;
		margin: 0 -16px;
	}
	.gajst-vrt .gv-toolbar { flex-wrap: nowrap; justify-content: flex-end; border-radius: 20px 20px 0 0; margin: 0 -16px; gap: 8px; padding: 10px 12px; }
	.gajst-vrt .gv-toolbar .gv-btn { min-height: 42px; padding: 9px 14px; font-size: 0.875rem; }
	.gajst-vrt .gv-counter { flex-direction: column; align-items: flex-start; gap: 0; font-size: 1.25rem; line-height: 1.1; margin-inline-end: auto; }
	.gajst-vrt .gv-counter small { font-size: 0.6875rem; }
}

/* Drag ghost */
.gajst-vrt .gv-ghost {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	pointer-events: none;
	border-radius: var(--gv-radius-card);
	overflow: hidden;
	background: #fff;
	box-shadow: var(--gv-shadow-card-lift);
	will-change: transform;
}
.gajst-vrt .gv-ghost img { width: 100%; height: 100%; object-fit: cover; }
.gajst-vrt.is-dragging-any { cursor: grabbing; }
.gajst-vrt.is-dragging-any * { cursor: grabbing !important; }

/* Completion: the game script rides every card once around the drawn gondolas (celebrate()). */
@media (prefers-reduced-motion: reduce) {
	.gajst-vrt .gv-card, .gajst-vrt .gv-btn, .gajst-vrt .gv-slot__empty { transition-duration: 0ms; }
}
