/*
 * Gadget2Get House: the game on the "house" page (templates/house.php).
 * Plain CSS, after the theme's stylesheet; its colours where the theme has them.
 */

/* ---------------------------------------------------------------- */
/* The game: a sidebar (intro, filters, products, summary) beside the */
/* house, filling the screen under the theme's sticky header; on      */
/* narrow screens the house on top and the products in a row under it.*/
/* ---------------------------------------------------------------- */

.g2g-house {
	--g2g-brand: var(--color-brand-500, #fb7701);
	--g2g-brand-dark: var(--color-brand-600, #e66b00);
	--g2g-brand-soft: var(--color-brand-100, #ffe3cc);
	--g2g-ink: var(--color-slate-900, #0f172a);
	--g2g-text: var(--color-slate-600, #475569);
	--g2g-muted: var(--color-slate-400, #94a3b8);
	--g2g-line: var(--color-slate-200, #e2e8f0);
	--g2g-soft: var(--color-slate-50, #f8fafc);
	--g2g-ok: var(--color-green-600, #16a34a);
	--g2g-header: 4rem;
	position: relative;
	display: grid;
	grid-template-columns: 23rem minmax(0, 1fr);
	grid-template-rows: auto auto auto minmax(0, 1fr) auto;
	grid-template-areas:
		"intro stage"
		"filters stage"
		"sets stage"
		"products stage"
		"summary stage";
	height: calc(100vh - var(--g2g-header));
	min-height: 34rem;
	color: var(--g2g-text);
}
@supports (height: 100dvh) {
	.g2g-house {
		height: calc(100dvh - var(--g2g-header));
	}
}
/* What house.js hides stays hidden, whatever its display. */
.g2g-house [hidden] {
	display: none !important;
}
/* The sidebar's panel, behind its parts. */
.g2g-house::before {
	content: "";
	grid-column: 1;
	grid-row: 1 / -1;
	background: #fff;
	border-inline-end: 1px solid var(--g2g-line);
}

.g2g-house-intro {
	grid-area: intro;
	padding: 1.25rem 1.25rem 0.75rem;
}
.g2g-house-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	margin: 0 0 0.375rem;
	color: var(--g2g-brand-dark);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.g2g-house-eyebrow .g2g-house-icon {
	width: 1rem;
	height: 1rem;
}
.g2g-house-title {
	margin: 0;
	color: var(--g2g-ink);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
}
.g2g-house-lead {
	margin: 0.375rem 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
}

/* ---------------------------------------------------------------- */
/* Filters                                                           */
/* ---------------------------------------------------------------- */

.g2g-house-filters {
	grid-area: filters;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	padding: 0 1.25rem 0.75rem;
}
.g2g-house-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}
.g2g-house-field-label {
	color: var(--g2g-muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.g2g-house-select,
.g2g-house-input {
	width: 100%;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--g2g-line);
	border-radius: 0.625rem;
	background-color: #fff;
	color: var(--g2g-ink);
	font: inherit;
	font-size: 0.875rem;
}
.g2g-house-select {
	appearance: none;
	padding-inline-end: 2rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 0.625rem center;
	background-repeat: no-repeat;
	background-size: 1rem;
	text-overflow: ellipsis;
}
[dir="rtl"] .g2g-house-select {
	background-position: left 0.625rem center;
}
.g2g-house-select:focus,
.g2g-house-input:focus {
	border-color: var(--g2g-brand);
	outline: 0;
	box-shadow: 0 0 0 3px var(--g2g-brand-soft);
}
.g2g-house-search {
	position: relative;
	grid-column: 1 / -1;
}
.g2g-house-search .g2g-house-icon {
	position: absolute;
	top: 50%;
	inset-inline-start: 0.75rem;
	width: 1rem;
	height: 1rem;
	color: var(--g2g-muted);
	transform: translateY(-50%);
	pointer-events: none;
}
.g2g-house-search .g2g-house-input {
	padding-inline-start: 2.25rem;
}

/* ---------------------------------------------------------------- */
/* Products                                                          */
/* ---------------------------------------------------------------- */

.g2g-house-products {
	grid-area: products;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0;
	padding: 0.25rem 0.75rem 0.75rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	scrollbar-width: thin;
}
.g2g-house-none {
	grid-area: products;
	align-self: start;
	margin: 1rem 1.25rem;
	color: var(--g2g-muted);
	font-size: 0.875rem;
	text-align: center;
}

/* The chosen room's set: its picture beside its name, how far along the room is, and its page. */
.g2g-house-sets {
	grid-area: sets;
	padding: 0 1.25rem 0.75rem;
}
.g2g-house-set {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--g2g-line);
	border-radius: 0.875rem;
	background: var(--g2g-soft);
}
.g2g-house-set-picture {
	width: 100%;
	height: 100%;
	min-height: 5.625rem;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.g2g-house-set-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.125rem;
	min-width: 0;
	padding: 0.5rem 0.75rem;
}
.g2g-house-set-meta {
	margin: 0;
	overflow: hidden;
	color: var(--g2g-brand-dark);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}
.g2g-house-set-name {
	margin: 0;
	overflow: hidden;
	color: var(--g2g-ink);
	font-size: 0.9375rem;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.g2g-house-set-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	margin: 0;
	color: var(--g2g-ink);
	font-size: 0.8125rem;
	font-weight: 700;
}
.g2g-house-set-progress {
	padding: 0 0.45em;
	border-radius: 9999px;
	background: var(--color-slate-200, #e2e8f0);
	color: var(--color-slate-700, #334155);
	font-variant-numeric: tabular-nums;
}
.g2g-house-set.is-complete .g2g-house-set-progress {
	background: var(--g2g-ok);
	color: #fff;
}
.g2g-house-set-link {
	align-self: flex-start;
	color: var(--g2g-brand-dark);
	font-size: 0.8125rem;
	font-weight: 700;
}
.g2g-house-set-link:hover {
	text-decoration: underline;
}
.g2g-house-product {
	position: relative;
	flex: none;
}
.g2g-house-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.5rem;
	padding-inline-end: 2.75rem;
	border: 1px solid var(--g2g-line);
	border-radius: 0.875rem;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	transition:
		border-color 0.15s,
		box-shadow 0.15s,
		background-color 0.15s,
		opacity 0.15s;
}
.g2g-house-card:hover:not(:disabled) {
	border-color: var(--color-brand-300, #ffac66);
	box-shadow: 0 4px 14px rgb(15 23 42 / 0.08);
}
.g2g-house-card:focus-visible {
	outline: 2px solid var(--g2g-brand);
	outline-offset: 2px;
}
.g2g-house-card:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
.g2g-house-card-image {
	flex: none;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 0.625rem;
	background: var(--g2g-soft);
	object-fit: cover;
	pointer-events: none;
}
.g2g-house-card-text {
	display: flex;
	flex-direction: column;
	gap: 0.0625rem;
	min-width: 0;
}
.g2g-house-card-meta {
	overflow: hidden;
	color: var(--g2g-muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}
.g2g-house-card-name {
	display: -webkit-box;
	overflow: hidden;
	color: var(--g2g-ink);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.g2g-house-card-price {
	color: var(--g2g-ink);
	font-size: 0.8125rem;
	font-weight: 700;
}
.g2g-house-card-from {
	margin-inline-end: 0.25rem;
	color: var(--g2g-muted);
	font-size: 0.6875rem;
	font-weight: 500;
}
.g2g-house-card-sold {
	color: var(--color-red-600, #dc2626);
	font-weight: 600;
}
/* In the house: a tick on its picture. */
.g2g-house-card-check {
	position: absolute;
	top: 0.25rem;
	inset-inline-start: 3.125rem;
	display: none;
	place-items: center;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #fff;
	border-radius: 9999px;
	background: var(--g2g-ok);
	color: #fff;
}
.g2g-house-card-check .g2g-house-icon {
	width: 0.75rem;
	height: 0.75rem;
	stroke-width: 3;
}
.g2g-house-product.is-placed .g2g-house-card {
	border-color: rgb(22 163 74 / 0.35);
	background: #f6fdf8;
}
.g2g-house-product.is-placed .g2g-house-card-check {
	display: grid;
}
.g2g-house-product.is-picked .g2g-house-card {
	border-color: var(--g2g-brand);
	box-shadow: 0 0 0 3px var(--g2g-brand-soft);
}
.g2g-house-product.is-dragged .g2g-house-card {
	opacity: 0.4;
}
.g2g-house-card-link {
	position: absolute;
	top: 50%;
	inset-inline-end: 0.5rem;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	color: var(--g2g-muted);
	transform: translateY(-50%);
	transition:
		background-color 0.15s,
		color 0.15s;
}
.g2g-house-card-link:hover {
	background: var(--g2g-soft);
	color: var(--g2g-brand-dark);
}
.g2g-house-card-link .g2g-house-icon {
	width: 1rem;
	height: 1rem;
}

/* ---------------------------------------------------------------- */
/* Summary: what's in the house, its total, and the wishcart         */
/* ---------------------------------------------------------------- */

.g2g-house-summary {
	grid-area: summary;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.625rem 1rem;
	padding: 0.875rem 1.25rem 1rem;
	border-top: 1px solid var(--g2g-line);
	background: #fff;
}
.g2g-house-summary-head {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.35;
}
.g2g-house-summary-title {
	color: var(--g2g-ink);
	font-size: 0.9375rem;
	font-weight: 800;
}
.g2g-house-summary-total {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	margin: 0;
	font-size: 0.75rem;
}
.g2g-house-summary-total strong {
	color: var(--g2g-ink);
	font-size: 1.25rem;
	font-weight: 800;
	white-space: nowrap;
}
.g2g-house-summary-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 0.5rem;
}
.g2g-house-button {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.75rem;
	padding: 0 1rem;
	border-radius: 0.75rem;
	background: var(--g2g-brand-dark);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	transition:
		background-color 0.15s,
		opacity 0.15s;
}
.g2g-house-button:hover:not(:disabled) {
	background: var(--color-brand-700, #bf5800);
}
.g2g-house-button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}
.g2g-house-button:focus-visible {
	outline: 2px solid var(--g2g-brand);
	outline-offset: 2px;
}
.g2g-house-button.is-quiet {
	flex: none;
	background: var(--color-slate-100, #f1f5f9);
	color: var(--color-slate-700, #334155);
}
.g2g-house-button.is-quiet:hover:not(:disabled) {
	background: var(--g2g-line);
}
.g2g-house-button .g2g-house-icon {
	width: 1.125rem;
	height: 1.125rem;
}

/* ---------------------------------------------------------------- */
/* The house                                                         */
/* ---------------------------------------------------------------- */

.g2g-house-stage {
	grid-area: stage;
	position: relative;
	overflow: hidden;
	background: linear-gradient(to bottom, #a9daff, #d9efff 55%, #eef8ff);
}
/* The house sits on the bottom, across the middle, and is scrolled around zoomed in. The ground carries on
   under it across the stage: grass and earth from the bottom of what scrolls, as high as the scenery's
   (house.js sets them, at any zoom). Pinching zooms the house, not the page; one finger still scrolls. */
.g2g-house-scroller {
	position: absolute;
	inset: 0;
	display: grid;
	overflow: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	touch-action: pan-x pan-y;
	background: linear-gradient(to top, #6f4a31 0, #9a6b47 var(--g2g-earth, 0px), #7cc35a var(--g2g-earth, 0px) var(--g2g-grass, 0px), transparent var(--g2g-grass, 0px)) local;
}
.g2g-house-scroller::-webkit-scrollbar {
	display: none;
}
.g2g-house-stage.is-pannable .g2g-house-scroller {
	cursor: grab;
}
.g2g-house-stage.is-panning .g2g-house-scroller {
	cursor: grabbing;
	user-select: none;
}
.g2g-house-stage.is-panning .g2g-house-room {
	pointer-events: none;
}
.g2g-house-scene {
	position: relative;
	width: 100%;
	margin: auto auto 0;
	aspect-ratio: 1410 / 970;
}
.g2g-house-scenery {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.g2g-house-rooms {
	margin: 0;
	padding: 0;
	list-style: none;
}
.g2g-house-slot {
	position: absolute;
}

/* A room: empty, its walls and floor (outdoors, sky and grass), with a dashed ring where each of its set's
   parts goes. Sizes inside are in cqw, of the room's width. */
.g2g-house-room {
	--g2g-wall: #f3ece2;
	position: absolute;
	inset: 0;
	overflow: hidden;
	container-type: inline-size;
	background:
		linear-gradient(to bottom, rgb(15 23 42 / 0.16), transparent 14%),
		linear-gradient(to top, #c99d6f 0 3%, #d9b48c 3% 17%, rgb(15 23 42 / 0.08) 17% 18%, transparent 18%),
		var(--g2g-wall);
	transition:
		box-shadow 0.2s,
		opacity 0.2s,
		filter 0.2s;
}
.g2g-house-room.is-outdoor {
	background:
		linear-gradient(to top, #6fb84f 0 4%, #8fd06a 4% 20%, transparent 20%),
		linear-gradient(to bottom, #bfe4ff, #e8f6ff);
}
/* A window on the back wall. */
.g2g-house-room:not(.is-outdoor)::before {
	content: "";
	position: absolute;
	top: 18%;
	left: 37%;
	width: 26%;
	height: 32%;
	border: 2.2cqw solid #fff;
	border-radius: 1.5cqw;
	background: linear-gradient(160deg, #d6efff, #b9e1ff);
	box-shadow: 0 1cqw 2cqw rgb(15 23 42 / 0.08);
}
.g2g-house-room.is-unused {
	opacity: 0.7;
}
/* The room as its set furnishes it: soft at first, filling with colour as its parts go in (house.js sets
   --g2g-progress, from 0 to 1 when the room is complete). */
.g2g-house-room.has-picture {
	background: #f4f1ec;
}
.g2g-house-room.has-picture::before {
	display: none;
}
.g2g-house-picture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: calc(0.62 + 0.38 * var(--g2g-progress, 0));
	filter: saturate(calc(0.35 + 0.65 * var(--g2g-progress, 0)));
	transition:
		opacity 0.6s ease,
		filter 0.6s ease;
}
.g2g-house-spot {
	position: absolute;
	z-index: 1;
	width: min(17cqw, 3rem);
	aspect-ratio: 1;
	border: max(1.5px, 0.9cqw) dashed rgb(255 255 255 / 0.95);
	border-radius: 9999px;
	background: rgb(255 255 255 / 0.2);
	box-shadow:
		0 0 0 1px rgb(15 23 42 / 0.25),
		inset 0 0 0 1px rgb(15 23 42 / 0.2);
	transform: translate(-50%, -50%);
	pointer-events: none;
	transition:
		border-color 0.2s,
		background-color 0.2s;
}
.g2g-house-room.is-complete .g2g-house-spot {
	display: none;
}
/* Where the product held goes. */
.g2g-house-spot.is-wanted {
	border-style: solid;
	border-color: var(--g2g-brand);
	background: rgb(251 119 1 / 0.16);
	animation: g2g-house-wanted 1.2s ease-in-out infinite;
}
.g2g-house-spot.is-wanted::after {
	content: attr(data-house-name);
	position: absolute;
	top: calc(100% + 0.35em);
	left: 50%;
	padding: 0.15em 0.6em;
	border-radius: 9999px;
	background: var(--g2g-brand-dark);
	color: #fff;
	font-size: clamp(8px, 6cqw, 11px);
	font-weight: 700;
	white-space: nowrap;
	transform: translateX(-50%);
}
/* The whole room, as a button: choosing it, or putting the product held in it. Over the picture, it carries
   the ceiling's shadow and the room's outlines. */
.g2g-house-target {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: linear-gradient(to bottom, rgb(15 23 42 / 0.22), transparent 14%);
	cursor: pointer;
	transition: box-shadow 0.2s;
}
.g2g-house-target:focus-visible {
	outline: 3px solid var(--g2g-brand);
	outline-offset: -3px;
}
.g2g-house-room:hover .g2g-house-target {
	box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.9);
}
.g2g-house-room.is-chosen .g2g-house-target {
	box-shadow: inset 0 0 0 3px var(--g2g-brand-dark);
}
/* Holding a product: its rooms stand out, the others fade. */
.g2g-house.is-holding .g2g-house-room:not(.is-target) {
	opacity: 0.45;
	filter: saturate(0.4);
}
.g2g-house-room.is-target .g2g-house-target {
	box-shadow: inset 0 0 0 3px var(--g2g-brand);
}
.g2g-house-room.is-over .g2g-house-target {
	box-shadow:
		inset 0 0 0 4px var(--g2g-brand),
		inset 0 0 0 2cqw rgb(251 119 1 / 0.18);
}
.g2g-house-room.is-wrong {
	animation: g2g-house-shake 0.4s ease;
}
.g2g-house-room.is-celebrating::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	background: radial-gradient(circle at 50% 60%, rgb(255 255 255 / 0.95), rgb(255 233 166 / 0.6) 35%, transparent 70%);
	pointer-events: none;
	animation: g2g-house-flash 1s ease-out forwards;
}

/* A product in a room: its picture where its part goes; the cross takes it out. Dragged, it moves (out of the
   house, it's taken out). */
.g2g-house-placed {
	position: absolute;
	z-index: 3;
	width: min(17cqw, 3rem);
	aspect-ratio: 1;
	padding: max(2px, 0.9cqw);
	border-radius: 9999px;
	background: #fff;
	box-shadow: 0 1cqw 3cqw rgb(15 23 42 / 0.35);
	transform: translate(-50%, -50%);
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}
.g2g-house-placed img {
	width: 100%;
	height: 100%;
	border-radius: 9999px;
	object-fit: cover;
	pointer-events: none;
}
.g2g-house-placed.is-new {
	animation: g2g-house-pop 0.45s cubic-bezier(0.3, 1.5, 0.6, 1);
}
.g2g-house-placed.is-dragged {
	opacity: 0.35;
}
.g2g-house-room.is-complete .g2g-house-placed {
	width: min(12cqw, 2.25rem);
}
.g2g-house-placed-remove {
	position: absolute;
	top: -18%;
	inset-inline-end: -18%;
	display: grid;
	place-items: center;
	width: 50%;
	min-width: 16px;
	aspect-ratio: 1;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 9999px;
	background: var(--g2g-ink);
	color: #fff;
	opacity: 0;
	transform: scale(0.6);
	transition:
		opacity 0.15s,
		transform 0.15s;
}
.g2g-house-placed-remove .g2g-house-icon {
	width: 70%;
	height: 70%;
	stroke-width: 3;
}
.g2g-house-placed:hover .g2g-house-placed-remove,
.g2g-house-placed:focus-within .g2g-house-placed-remove,
.g2g-house-room.is-chosen .g2g-house-placed-remove {
	opacity: 1;
	transform: none;
}
@media (hover: none) {
	.g2g-house-placed-remove {
		opacity: 1;
		transform: none;
	}
}
.g2g-house-label {
	position: absolute;
	top: 4cqw;
	inset-inline-start: 4cqw;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	max-width: calc(100% - 8cqw);
	padding: 0.3em 0.75em;
	border-radius: 9999px;
	background: rgb(15 23 42 / 0.78);
	color: #fff;
	font-size: clamp(8px, 6.5cqw, 13px);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
}
.g2g-house-label-name {
	overflow: hidden;
	text-overflow: ellipsis;
}
.g2g-house-progress {
	flex: none;
	padding: 0.05em 0.45em;
	border-radius: 9999px;
	background: rgb(255 255 255 / 0.2);
	font-variant-numeric: tabular-nums;
}
.g2g-house-room.is-complete .g2g-house-label {
	background: var(--g2g-ok);
}
/* Too small a room (the whole house on a phone) for its name: it shows again zoomed in. */
@container (max-width: 72px) {
	.g2g-house-label {
		display: none;
	}
}

/* What a finger or the mouse is dragging. */
.g2g-house-ghost {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 90;
	width: 4rem;
	height: 4rem;
	padding: 4px;
	border-radius: 9999px;
	background: #fff;
	box-shadow:
		0 0 0 3px var(--color-brand-500, #fb7701),
		0 12px 30px rgb(15 23 42 / 0.35);
	pointer-events: none;
	will-change: transform;
}
.g2g-house-ghost img {
	width: 100%;
	height: 100%;
	border-radius: 9999px;
	object-fit: cover;
}
.g2g-house-ghost.is-flying {
	transition:
		transform 0.3s cubic-bezier(0.3, 0.7, 0.2, 1),
		opacity 0.3s;
}

/* Zoom buttons, the hint at the bottom, and messages at the top. */
.g2g-house-zoom {
	position: absolute;
	top: 0.75rem;
	inset-inline-end: 0.75rem;
	z-index: 10;
	display: flex;
	overflow: hidden;
	border-radius: 0.75rem;
	background: rgb(255 255 255 / 0.92);
	box-shadow: 0 6px 20px rgb(2 6 23 / 0.18);
	backdrop-filter: blur(6px);
}
.g2g-house-zoom-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--color-slate-700, #334155);
	transition:
		background-color 0.15s,
		color 0.15s;
}
.g2g-house-zoom-button + .g2g-house-zoom-button {
	border-inline-start: 1px solid var(--g2g-line);
}
.g2g-house-zoom-button:hover:not(:disabled) {
	background: var(--color-brand-50, #fff3e8);
	color: var(--g2g-brand-dark);
}
.g2g-house-zoom-button:disabled {
	color: var(--color-slate-300, #cbd5e1);
	cursor: default;
}
.g2g-house-zoom-button:focus-visible {
	outline: 2px solid var(--g2g-brand);
	outline-offset: -2px;
}
.g2g-house-zoom-button .g2g-house-icon {
	width: 1.25rem;
	height: 1.25rem;
}
.g2g-house-hint {
	position: absolute;
	bottom: 0.75rem;
	inset-inline-start: 0.75rem;
	z-index: 10;
	max-width: calc(100% - 1.5rem);
	margin: 0;
	padding: 0.35rem 0.75rem;
	border-radius: 9999px;
	background: rgb(255 255 255 / 0.85);
	color: var(--g2g-text);
	font-size: 0.75rem;
	font-weight: 600;
	pointer-events: none;
	backdrop-filter: blur(6px);
}
.g2g-house-hint-coarse {
	display: none;
}
@media (pointer: coarse) {
	.g2g-house-hint-fine {
		display: none;
	}
	.g2g-house-hint-coarse {
		display: inline;
	}
}
.g2g-house-toast {
	position: absolute;
	top: 0.75rem;
	left: 50%;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: max-content;
	max-width: calc(100% - 9rem);
	padding: 0.625rem 0.875rem;
	border-radius: 0.875rem;
	background: var(--g2g-ink);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	box-shadow: 0 12px 30px rgb(15 23 42 / 0.3);
	transform: translateX(-50%);
	animation: g2g-house-toast 0.3s ease;
}
.g2g-house-toast a,
.g2g-house-toast button {
	flex: none;
	padding: 0.3rem 0.75rem;
	border-radius: 0.5rem;
	background: var(--g2g-brand-dark);
	color: #fff;
	font-weight: 700;
}
.g2g-house-toast a:hover,
.g2g-house-toast button:hover {
	background: var(--color-brand-700, #bf5800);
}

/* The theme's help buttons go to the other side, off the sidebar. */
.g2g-house-page div.fixed:has(> [data-open-dialog="g2g-help"]) {
	inset-inline-start: auto;
	inset-inline-end: 0;
}
.g2g-house-page div.fixed:has(> [data-open-dialog="g2g-help"]) > button {
	border-radius: 0.5rem 0 0 0.5rem;
}
[dir="rtl"] .g2g-house-page div.fixed:has(> [data-open-dialog="g2g-help"]) > button {
	border-radius: 0 0.5rem 0.5rem 0;
}

@keyframes g2g-house-pop {
	from {
		transform: translate(-50%, -50%) scale(0.2);
	}
}
@keyframes g2g-house-wanted {
	50% {
		transform: translate(-50%, -50%) scale(1.12);
	}
}
@keyframes g2g-house-shake {
	20%,
	60% {
		transform: translateX(-3px);
	}
	40%,
	80% {
		transform: translateX(3px);
	}
}
@keyframes g2g-house-flash {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}
@keyframes g2g-house-toast {
	from {
		opacity: 0;
		transform: translate(-50%, -0.5rem);
	}
}

/* ---------------------------------------------------------------- */
/* Narrow screens: still the whole screen under the header, the      */
/* house taking what the rest leaves: under it the filters, a row of  */
/* products (dragged up into the house) and a one-line summary.       */
/* ---------------------------------------------------------------- */

@media (max-width: 1023.98px) {
	.g2g-house {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(12rem, 1fr) auto auto auto;
		grid-template-areas:
			"intro"
			"stage"
			"filters"
			"products"
			"summary";
		min-height: 30rem;
	}
	.g2g-house::before {
		display: none;
	}
	.g2g-house-intro {
		padding: 0.625rem 1rem;
		text-align: center;
	}
	.g2g-house-eyebrow,
	.g2g-house-lead {
		display: none;
	}
	.g2g-house-title {
		font-size: 1.125rem;
	}
	.g2g-house-filters {
		gap: 0.375rem;
		padding: 0.5rem 0.75rem 0;
	}
	/* The selects' first choices ("All rooms", "All categories") say what they are. */
	.g2g-house-field-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.g2g-house-select,
	.g2g-house-input {
		height: 2.375rem;
	}
	.g2g-house-products {
		flex-direction: row;
		gap: 0.5rem;
		padding: 0.5rem 0.75rem;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x proximity;
	}
	.g2g-house-product {
		flex: 0 0 min(14.5rem, 72vw);
		scroll-snap-align: start;
	}
	.g2g-house-card {
		gap: 0.5rem;
		padding: 0.375rem;
		padding-inline-end: 2.25rem;
	}
	.g2g-house-card-image {
		width: 3rem;
		height: 3rem;
	}
	.g2g-house-card-check {
		inset-inline-start: 2.6rem;
	}
	.g2g-house-card-name {
		-webkit-line-clamp: 1;
	}
	.g2g-house-summary {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		padding: 0.5rem 0.75rem;
		box-shadow: 0 -6px 20px rgb(15 23 42 / 0.08);
	}
	.g2g-house-summary-head {
		flex: 1;
		font-size: 0.75rem;
	}
	.g2g-house-summary-head > :last-child {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.g2g-house-summary-title {
		font-size: 0.875rem;
	}
	.g2g-house-summary-total > span {
		display: none;
	}
	.g2g-house-summary-total strong {
		font-size: 1rem;
	}
	.g2g-house-summary-actions {
		flex: none;
		gap: 0.375rem;
	}
	.g2g-house-button {
		height: 2.5rem;
		padding: 0 0.75rem;
		font-size: 0.875rem;
	}
	/* The house shows the rooms' pictures; no room for the set's card here. */
	.g2g-house-sets {
		display: none;
	}
	/* The theme's help buttons would lie over the house here. */
	.g2g-house-page div.fixed:has(> [data-open-dialog="g2g-help"]) {
		display: none;
	}
}
@media (max-width: 639.98px) {
	.g2g-house {
		/* The theme's header has its search under it here. */
		--g2g-header: 6.5rem;
	}
	/* The wishcart button's heart alone (it is still named, for screen readers). */
	.g2g-house-button:not(.is-quiet) > span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.g2g-house-placed.is-new,
	.g2g-house-spot.is-wanted,
	.g2g-house-room.is-wrong,
	.g2g-house-room.is-celebrating::after,
	.g2g-house-toast {
		animation: none;
	}
	.g2g-house-ghost.is-flying,
	.g2g-house-room,
	.g2g-house-card {
		transition: none;
	}
}
