/*
 * Flatfox Wohnungsfinder – deliberately plain base layout.
 * Font and base colours come from the theme; override the custom
 * properties below in the theme to adjust the colours.
 */
:root {
	--ffw-accent: #a65a3a;
	--ffw-accent-text: #fff;
	--ffw-text: inherit;
	--ffw-muted: rgba(0, 0, 0, 0.6);
	--ffw-border: rgba(0, 0, 0, 0.14);
	--ffw-surface: rgba(0, 0, 0, 0.04);
	--ffw-panel: #fff;
	--ffw-chip-active: #1c2229;
	--ffw-chip-active-text: #fff;
	--ffw-radius: 10px;
	--ffw-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.1);
	--ffw-available: #4f8a5b;
	--ffw-available-text: #2f6b3d;
	/* Status marks in lists: at least 3:1 against white (WCAG 1.4.11). */
	--ffw-available-mark: var(--ffw-available);
	--ffw-reserved-mark: #a8761a;
	--ffw-rented-mark: #8a857c;
	--ffw-reserved: #d9a441;
	--ffw-rented: #b9b4ab;
	--ffw-neutral: #e4e1da;

	/* 3D model; read by finder-model.js. */
	--ffw-model-background: #f6f5f1;
	--ffw-model-available: #6db98a;
	--ffw-model-reserved: #eab95a;
	--ffw-model-rented: #c3bfb6;
	--ffw-model-ghost: #f4f2ed;
	--ffw-model-building: #ebe8e1;
	--ffw-model-core: #d8d5ce;
	--ffw-model-base: #e2ded5;
	--ffw-model-edge: #4c4840;
	--ffw-model-selected: var(--ffw-accent);

	/* [ffw_app] */
	--ffw-panel-width: 28rem;
	--ffw-quick-width: 21.5rem;
	--ffw-app-min-height: 30rem;
}

/* ------------------------------------------------------------------ Shared */
.ffw-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.15em 0.65em;
	border-radius: 999px;
	background: var(--ffw-surface);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}
.ffw-visually-hidden,
.ffw-list.is-compact .ffw-pill__text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
/* Status marks differ in shape, not only in colour: filled, half, ring. */
.ffw-pill::before {
	content: "";
	flex: none;
	box-sizing: border-box;
	width: 0.7em;
	height: 0.7em;
	border: 2px solid var(--ffw-neutral);
	border-radius: 50%;
	background: var(--ffw-neutral);
}
.ffw-pill.ffw-status--available::before {
	border-color: var(--ffw-available-mark);
	background: var(--ffw-available-mark);
}
.ffw-pill.ffw-status--reserved::before {
	border-color: var(--ffw-reserved-mark);
	background: linear-gradient(90deg, var(--ffw-reserved-mark) 50%, transparent 50%);
}
.ffw-pill.ffw-status--rented::before {
	border-color: var(--ffw-rented-mark);
	background: transparent;
}
.ffw-button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.6rem 1.1rem;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.ffw-button--primary {
	background: var(--ffw-accent);
	border-color: var(--ffw-accent);
	color: var(--ffw-accent-text);
}
.ffw-button--inactive {
	border-color: var(--ffw-border);
	background: var(--ffw-surface);
	color: var(--ffw-muted);
	cursor: default;
}
.ffw-icon-button {
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: inherit;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}
.ffw-icon-button:hover {
	background: var(--ffw-surface);
}

.ffw-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.9rem;
	margin: 0.4rem 0 0;
}
.ffw-legend .ffw-pill {
	padding: 0;
	background: none;
	font-weight: normal;
	font-size: 0.8125rem;
	color: var(--ffw-muted);
}

/* ------------------------------------------------------------------ Filter */
.ffw-filter__body {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 2rem;
	align-items: flex-start;
}
.ffw-filter:empty {
	display: none;
}
.ffw-filter__body[hidden] {
	display: none;
}
.ffw-filter__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--ffw-border);
	border-radius: 999px;
	background: var(--ffw-panel);
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.ffw-filter__toggle::after {
	content: "▾";
	font-size: 0.8em;
}
.ffw-filter__toggle[aria-expanded="true"]::after {
	content: "▴";
}
.ffw-filter__badge {
	display: inline-grid;
	place-items: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--ffw-accent);
	color: var(--ffw-accent-text);
	font-size: 0.75rem;
}
.ffw-filter__badge[hidden] {
	display: none;
}
.ffw-field {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}
.ffw-field > legend,
.ffw-field > label,
.ffw-field__head label {
	display: block;
	padding: 0;
	margin-bottom: 0.4rem;
	font-weight: 600;
	font-size: 0.8125rem;
}
.ffw-field__head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.ffw-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}
.ffw-choice {
	position: relative;
	display: inline-flex;
}
.ffw-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
.ffw-choice label {
	min-width: 2.5rem;
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--ffw-border);
	border-radius: 999px;
	background: var(--ffw-panel);
	font-size: 0.875rem;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}
.ffw-choice input:checked + label {
	background: var(--ffw-chip-active);
	border-color: var(--ffw-chip-active);
	color: var(--ffw-chip-active-text);
}
.ffw-choice input:focus-visible + label {
	outline: 2px solid var(--ffw-accent);
	outline-offset: 2px;
}
.ffw-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.ffw-switch input {
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: var(--ffw-available);
}
.ffw-field input[type="range"] {
	display: block;
	width: 13rem;
	max-width: 100%;
	margin: 0;
	accent-color: var(--ffw-accent);
}
.ffw-field output {
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}
.ffw-reset {
	align-self: flex-end;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}

/* -------------------------------------------------------------------- List */
.ffw-list {
	overflow-x: auto;
}
.ffw-table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}
.ffw-table th,
.ffw-table td {
	padding: 0.55rem 0.6rem;
	text-align: left;
	font-weight: normal;
	border-bottom: 1px solid var(--ffw-border);
	white-space: nowrap;
}
.ffw-table thead th {
	font-size: 0.8125rem;
	font-weight: 600;
}
.ffw-table tbody th {
	font-weight: 600;
}
.ffw-table .is-numeric {
	text-align: right;
}
.ffw-table th button {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
}
.ffw-table th[aria-sort="ascending"] button::after {
	content: " ↑";
}
.ffw-table th[aria-sort="descending"] button::after {
	content: " ↓";
}
.ffw-table__select {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.ffw-table tbody tr:not(.ffw-table__empty) {
	cursor: pointer;
}
.ffw-table tbody tr.is-active,
.ffw-table tbody tr:not(.ffw-table__empty):hover {
	background: var(--ffw-surface);
}
.ffw-table tbody tr.is-selected {
	background: color-mix(in srgb, var(--ffw-accent) 12%, transparent);
	box-shadow: inset 3px 0 0 var(--ffw-accent);
}
.ffw-table td[data-column="status"] .ffw-pill {
	padding: 0;
	background: none;
	font-weight: normal;
}
.ffw-status--rented td,
.ffw-status--rented th {
	color: var(--ffw-muted);
}
.ffw-table__empty td {
	white-space: normal;
}
.ffw-count {
	font-weight: 600;
}
.ffw-count__free {
	color: var(--ffw-available-text);
}

/* ------------------------------------------------------------- Quick view */
.ffw-quick {
	display: grid;
	font-size: 0.9375rem;
	line-height: 1.4;
	gap: 0.9rem;
	padding: 0.75rem 1.1rem 1.1rem;
	background: var(--ffw-panel);
	border-radius: var(--ffw-radius);
	box-shadow: var(--ffw-shadow);
}
.ffw-quick[hidden] {
	display: none;
}
.ffw-quick__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}
.ffw-quick__eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ffw-muted);
}
.ffw-quick__nav {
	display: flex;
	flex: none;
	margin-right: -0.4rem;
}
.ffw-quick__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}
.ffw-quick__title h2:focus {
	outline: none;
}
.ffw-quick__title h2 {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.2;
}
.ffw-quick__note {
	margin: 0;
	font-size: 0.875rem;
}
.ffw-quick__rent {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	padding: 0.7rem 0.85rem;
	border-radius: 8px;
	background: var(--ffw-surface);
	font-variant-numeric: tabular-nums;
}
.ffw-quick__rent strong {
	font-size: 1.3rem;
}
.ffw-quick__rent span {
	font-size: 0.8125rem;
	color: var(--ffw-muted);
}
.ffw-quick__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem 1rem;
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.ffw-quick__facts dt {
	font-size: 0.75rem;
	color: var(--ffw-muted);
}
.ffw-quick__facts dd {
	margin: 0;
	font-weight: 600;
}
.ffw-quick__actions {
	display: grid;
	gap: 0.5rem;
}

/* --------------------------------------------------------------- Isometry */
.ffw-isometry svg {
	display: block;
	width: 100%;
	height: auto;
}
/* Every apartment in the drawing, including those outside the scope of this page. */
.ffw-isometry [id^="unit-"],
.ffw-isometry [id^="unit-"] * {
	fill: var(--ffw-neutral);
	transition: fill 0.15s, opacity 0.15s;
}
.ffw-isometry .ffw-unit {
	cursor: pointer;
	outline: none;
}
.ffw-isometry .ffw-unit.ffw-status--available,
.ffw-isometry .ffw-unit.ffw-status--available * {
	fill: var(--ffw-available);
}
.ffw-isometry .ffw-unit.ffw-status--reserved,
.ffw-isometry .ffw-unit.ffw-status--reserved * {
	fill: var(--ffw-reserved);
}
.ffw-isometry .ffw-unit.ffw-status--rented,
.ffw-isometry .ffw-unit.ffw-status--rented * {
	fill: var(--ffw-rented);
}
.ffw-isometry .ffw-unit.is-filtered-out {
	opacity: 0.2;
}
.ffw-isometry .ffw-unit.is-active,
.ffw-isometry .ffw-unit.is-active *,
.ffw-isometry .ffw-unit:focus-visible,
.ffw-isometry .ffw-unit:focus-visible * {
	fill: var(--ffw-accent);
	opacity: 1;
}
.ffw-isometry__building {
	font-size: 11px;
	fill: currentColor;
}
.ffw-isometry__info {
	margin: 0.5rem 0 0;
	font-size: 0.875em;
	min-height: 1.4em;
}
.ffw-isometry__note {
	margin: 0.25rem 0 0;
	font-size: 0.75em;
	opacity: 0.6;
}

/* ------------------------------------------------------------------ Model */
.ffw-model {
	position: relative;
	min-height: 20rem;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ffw-model-background);
	font-size: 0.875rem;
}
.ffw-model--missing {
	display: grid;
	place-items: center;
	aspect-ratio: auto;
	min-height: 8rem;
	padding: 1rem;
}
.ffw-model__canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
	outline: none;
}
.ffw-model.is-hovering .ffw-model__canvas {
	cursor: pointer;
}
.ffw-model__labels {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}
.ffw-model__label {
	position: absolute;
	top: 0;
	left: 0;
	padding: 0.1rem 0.45rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	color: #1c2229;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	transition: opacity 0.2s;
}
.ffw-model__label[hidden] {
	display: none;
}
.ffw-model__label.is-dim {
	opacity: 0.55;
}
.ffw-model__tooltip {
	position: absolute;
	z-index: 3;
	display: grid;
	gap: 0.1rem;
	min-width: 11rem;
	padding: 0.6rem 0.75rem;
	transform: translate(14px, 14px);
	border-radius: 8px;
	background: var(--ffw-panel);
	box-shadow: var(--ffw-shadow);
	color: #1c2229;
	font-size: 0.8125rem;
	pointer-events: none;
	font-variant-numeric: tabular-nums;
}
.ffw-model__tooltip[hidden] {
	display: none;
}
.ffw-model__loader {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(18rem, 80%);
	transform: translate(-50%, -50%);
	color: var(--ffw-muted);
	text-align: center;
}
.ffw-model__loader[hidden] {
	display: none;
}
.ffw-model__bar {
	display: block;
	height: 3px;
	margin-top: 0.5rem;
	overflow: hidden;
	border-radius: 2px;
	background: var(--ffw-border);
}
.ffw-model__bar[hidden] {
	display: none;
}
.ffw-model__bar i {
	display: block;
	width: 0;
	height: 100%;
	background: var(--ffw-accent);
	transition: width 0.2s;
}
.ffw-model__legend {
	position: absolute;
	z-index: 2;
	bottom: 1rem;
	left: 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.9rem;
	padding: 0.45rem 0.75rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: var(--ffw-shadow);
	color: #1c2229;
	font-size: 0.8125rem;
}
.ffw-model__legend > [class^="ffw-status--"]::before {
	content: "";
	display: inline-block;
	width: 0.75rem;
	height: 0.75rem;
	margin-right: 0.4rem;
	border-radius: 3px;
	vertical-align: -0.1em;
	background: var(--ffw-neutral);
}
.ffw-model__legend .ffw-status--available::before {
	background: var(--ffw-model-available);
}
.ffw-model__legend .ffw-status--reserved::before {
	background: var(--ffw-model-reserved);
}
.ffw-model__legend .ffw-status--rented::before {
	background: var(--ffw-model-rented);
}
.ffw-model__hint {
	padding-left: 0.9rem;
	border-left: 1px solid var(--ffw-border);
	color: rgba(0, 0, 0, 0.55);
}
.ffw-model__tools {
	position: absolute;
	z-index: 2;
	right: 1rem;
	bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--ffw-border);
	box-shadow: var(--ffw-shadow);
}
.ffw-model__tools button {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	background: var(--ffw-panel);
	color: #1c2229;
	font-size: 1.1rem;
	cursor: pointer;
}
.ffw-model__tools button:hover {
	background: #f1f0ec;
}
.ffw-model__cut {
	position: absolute;
	z-index: 2;
	top: 1rem;
	left: 50%;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.4rem 0.35rem 0.9rem;
	transform: translateX(-50%);
	border-radius: 999px;
	background: #1c2229;
	color: #fff;
	box-shadow: var(--ffw-shadow);
	white-space: nowrap;
}
.ffw-model__cut:not(:has(button)) {
	padding-right: 0.9rem;
}
.ffw-model__cut[hidden] {
	display: none;
}
.ffw-model__cut button {
	padding: 0.2rem 0.7rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: inherit;
	font: inherit;
	cursor: pointer;
}

/* -------------------------------------------------------------------- App */
/*
 * [ffw_app] fills the window below the site header; finder.js measures the
 * offset (--ffw-app-offset). Hide the theme footer on this page, e.g.
 * body.ffw-app-page .site-footer { display: none; }
 */
.ffw-app {
	position: relative;
	box-sizing: border-box;
	max-width: none;
	font-size: 0.9375rem;
	line-height: 1.4;
	height: calc(100vh - var(--ffw-app-offset, 0px));
	height: calc(100svh - var(--ffw-app-offset, 0px));
	min-height: var(--ffw-app-min-height);
	overflow: hidden;
	background: var(--ffw-model-background);
}
.ffw-app *,
.ffw-app *::before,
.ffw-app *::after {
	box-sizing: border-box;
}
.ffw-app__stage {
	position: absolute;
	inset: 0;
}
.ffw-app__stage > .ffw-model {
	height: 100%;
	aspect-ratio: auto;
	min-height: 0;
}
.ffw-app__stage > .ffw-model .ffw-model__legend {
	left: calc(var(--ffw-panel-width) + 2rem);
}
.ffw-app__stage > .ffw-isometry {
	height: 100%;
	padding: 1rem 1rem 1rem calc(var(--ffw-panel-width) + 2rem);
	overflow: auto;
}
.ffw-app__panel {
	position: absolute;
	z-index: 10;
	top: 1rem;
	bottom: 1rem;
	left: 1rem;
	display: flex;
	flex-direction: column;
	width: var(--ffw-panel-width);
	max-width: calc(100% - 2rem);
	overflow: hidden;
	border-radius: var(--ffw-radius);
	background: var(--ffw-panel);
	box-shadow: var(--ffw-shadow);
}
.ffw-app__handle {
	display: none;
}
.ffw-app__head {
	padding: 1rem 1.1rem 0.5rem;
}
.ffw-app__title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.2;
}
.ffw-app__head .ffw-count {
	margin: 0.15rem 0 0;
	font-size: 0.875rem;
	font-weight: normal;
	color: var(--ffw-muted);
}
.ffw-app .ffw-filter {
	padding: 0.25rem 1.1rem 0.9rem;
	border-bottom: 1px solid var(--ffw-border);
}
.ffw-app .ffw-filter__body {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 1rem;
	margin-top: 0.9rem;
	max-height: 50vh;
	overflow-y: auto;
}
.ffw-app .ffw-field input[type="range"] {
	width: 100%;
}
.ffw-app .ffw-reset {
	align-self: flex-start;
}
.ffw-app .ffw-list {
	flex: 1;
	min-height: 0;
	overflow: auto;
	/* Only vertically: a list that also scrolls sideways must not swallow
	   the page scroll (contain on both axes blocks scroll chaining). */
	overscroll-behavior-y: contain;
}
.ffw-app .ffw-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--ffw-panel);
}
.ffw-app .ffw-table th:first-child,
.ffw-app .ffw-table td:first-child {
	padding-left: 1.1rem;
}
.ffw-app .ffw-table th:last-child,
.ffw-app .ffw-table td:last-child {
	padding-right: 1.1rem;
}
.ffw-app__quick {
	position: absolute;
	z-index: 12;
	top: 1rem;
	right: 1rem;
	width: var(--ffw-quick-width);
	max-height: calc(100% - 2rem);
	overflow-y: auto;
}

/* ------------------------------------------------------------------ Phone */
@media (max-width: 860px) {
	.ffw-model__hint {
		display: none;
	}
	.ffw-model__tooltip {
		display: none;
	}
	.ffw-model__label {
		font-size: 0.6875rem;
	}
	.ffw-app__stage > .ffw-model .ffw-model__legend {
		top: 0.75rem;
		bottom: auto;
		left: 0.75rem;
		padding: 0.35rem 0.6rem;
		font-size: 0.75rem;
	}
	.ffw-app__stage > .ffw-model .ffw-model__tools {
		top: 0.75rem;
		right: 0.75rem;
		bottom: auto;
	}
	.ffw-app__stage > .ffw-model .ffw-model__tools button {
		width: 2.25rem;
		height: 2.25rem;
	}
	.ffw-app__stage > .ffw-model .ffw-model__cut {
		top: 3.25rem;
	}
	.ffw-app__stage > .ffw-isometry {
		padding: 1rem;
	}
	.ffw-app__panel {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		max-width: none;
		height: var(--ffw-sheet-height, 52%);
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.14);
		transition: height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
	}
	.ffw-app__panel.is-dragging {
		transition: none;
	}
	.ffw-app__handle {
		display: block;
		flex: none;
		height: 1.4rem;
		padding: 0;
		border: 0;
		background: none;
		touch-action: none;
		cursor: grab;
	}
	.ffw-app__handle::before {
		content: "";
		display: block;
		width: 2.5rem;
		height: 4px;
		margin: 0 auto;
		border-radius: 2px;
		background: var(--ffw-border);
	}
	.ffw-app__head {
		padding: 0 1rem 0.5rem;
		touch-action: none;
	}
	.ffw-app__title {
		font-size: 1.15rem;
	}
	.ffw-app .ffw-filter {
		padding-inline: 1rem;
	}
	.ffw-app .ffw-filter__body {
		max-height: none;
	}
	.ffw-app .ffw-table th:first-child,
	.ffw-app .ffw-table td:first-child {
		padding-left: 1rem;
	}
	.ffw-app .ffw-table th:last-child,
	.ffw-app .ffw-table td:last-child {
		padding-right: 1rem;
	}
	.ffw-app__quick {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		max-height: 72%;
		border-radius: 16px 16px 0 0;
		padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
	}
	.ffw-app__quick .ffw-quick__facts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.ffw-app__quick .ffw-quick__actions {
		grid-template-columns: 1fr 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffw-app__panel,
	.ffw-model__label,
	.ffw-model__bar i {
		transition: none;
	}
}

/* ------------------------------------------------------------------ Detail */
.ffw-detail {
	display: grid;
	gap: 1.5rem;
	container-type: inline-size;
}
.ffw-detail__back {
	margin: 0;
	font-size: 0.9375rem;
}
.ffw-detail__header {
	display: grid;
	gap: 0.35rem;
}
.ffw-detail__title {
	margin: 0;
}
.ffw-detail__meta {
	margin: 0;
	color: var(--ffw-muted);
}
.ffw-detail__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
	gap: 2rem;
	align-items: start;
}
.ffw-detail__main {
	display: grid;
	gap: 1.5rem;
	min-width: 0;
}
.ffw-detail__aside {
	position: sticky;
	top: 1.5rem;
	min-width: 0;
}
.ffw-detail__section {
	padding: 1.25rem;
	border: 1px solid var(--ffw-border);
	border-radius: var(--ffw-radius);
}
.ffw-detail__section > h2 {
	margin: 0 0 1rem;
	font-size: 1.15rem;
}
.ffw-detail__section > p {
	margin: 0 0 0.75rem;
}
.ffw-detail__note {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: var(--ffw-surface);
	font-weight: 600;
}
.ffw-detail__plan {
	margin: 0;
	padding: 1rem;
	border: 1px solid var(--ffw-border);
	border-radius: var(--ffw-radius);
}
.ffw-detail__plan img {
	display: block;
	width: 100%;
	height: auto;
}
.ffw-detail__visuals {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: 0.5rem;
}
.ffw-detail__visuals img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}
.ffw-detail__facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 0 2rem;
	margin: 0;
}
.ffw-detail__facts > div,
.ffw-detail__rent > div,
.ffw-detail__terms > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem 0;
	border-top: 1px solid var(--ffw-border);
}
.ffw-detail__facts dt,
.ffw-detail__rent dt,
.ffw-detail__terms dt {
	color: var(--ffw-muted);
}
.ffw-detail__facts dd,
.ffw-detail__rent dd,
.ffw-detail__terms dd {
	min-width: 0;
	overflow-wrap: anywhere;
	margin: 0;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.ffw-detail__notes,
.ffw-detail__description {
	margin-top: 1rem;
}
.ffw-detail__documents {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ffw-detail__documents li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem 0;
	border-top: 1px solid var(--ffw-border);
}
.ffw-detail__conditions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1rem 2rem;
	margin: 1rem 0;
}
.ffw-detail__condition p {
	margin: 0;
}
.ffw-detail__condition-label {
	font-size: 0.875rem;
	color: var(--ffw-muted);
}
.ffw-detail__condition-value {
	font-size: 1.2rem;
	font-weight: 700;
}
.ffw-detail__condition-note {
	margin-top: 0.25rem !important;
	font-size: 0.875rem;
}
.ffw-detail__more {
	margin: 0 !important;
	font-weight: 600;
}
.ffw-detail__summary {
	display: grid;
	gap: 1rem;
	padding: 1.25rem;
	border: 1px solid var(--ffw-border);
	border-radius: var(--ffw-radius);
	background: var(--ffw-panel);
}
.ffw-detail__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}
.ffw-detail__owner {
	padding: 0.15em 0.65em;
	border-radius: 6px;
	background: var(--ffw-surface);
	font-size: 0.8125rem;
	font-weight: 600;
}
.ffw-detail__logo {
	width: auto;
	max-width: 7rem;
	height: 2rem;
	object-fit: contain;
}
.ffw-detail__rent,
.ffw-detail__terms {
	margin: 0;
}
.ffw-detail__rent > div:last-child {
	border-top-color: currentColor;
	font-weight: 700;
}
.ffw-detail__rent > div:last-child dt {
	color: inherit;
}
.ffw-detail__apply-note,
.ffw-detail__disclaimer {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ffw-muted);
}
.ffw-detail__summary .ffw-button {
	width: 100%;
	margin: 0;
}
.ffw-locator {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	background: var(--ffw-model-background);
	overflow: hidden;
}
.ffw-locator img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* One column when the page's content column is narrow (not the window). */
@container (max-width: 760px) {
	.ffw-detail__layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.ffw-detail__aside {
		position: static;
		order: -1;
	}
}

/* Compact list ([ffw_app]): tighter cells, status as a dot. */
.ffw-list.is-compact .ffw-table th,
.ffw-list.is-compact .ffw-table td {
	padding: 0.5rem 0.4rem;
}
.ffw-list.is-compact td[data-column="status"] .ffw-pill::before {
	width: 0.75rem;
	height: 0.75rem;
}

.ffw-app .ffw-list.is-compact .ffw-table th:first-child,
.ffw-app .ffw-list.is-compact .ffw-table td:first-child {
	padding-left: 1.1rem;
}
.ffw-app .ffw-list.is-compact .ffw-table th:last-child,
.ffw-app .ffw-list.is-compact .ffw-table td:last-child {
	padding-right: 1.1rem;
}
.ffw-table__select:focus:not(:focus-visible) {
	outline: none;
}

/* Phone: fewer list columns. */
@media (max-width: 860px) {
	.ffw-app .ffw-table [data-column="area"],
	.ffw-app .ffw-table [data-column="floor"],
	.ffw-app .ffw-table [data-column="building"],
	.ffw-app .ffw-table [data-column="type"] {
		display: none;
	}
}

/*
 * Without JavaScript: a plain page that scrolls. The model needs the script,
 * the server-rendered list and the links to the apartment pages work.
 */
@media (scripting: none) {
	.ffw-app {
		height: auto;
		min-height: 0;
		overflow: visible;
	}
	.ffw-app__stage,
	.ffw-app__panel,
	.ffw-app__quick {
		position: static;
		width: auto;
		max-width: none;
		height: auto;
		box-shadow: none;
	}
	.ffw-app__stage > .ffw-model {
		height: auto;
		min-height: 0;
		padding: 1rem;
	}
	.ffw-app__handle {
		display: none;
	}
	.ffw-app .ffw-list {
		overflow: auto;
		overscroll-behavior: auto;
	}
}

/* In [ffw_app] the model legend only holds the hint, which phones do not show. */
@media (max-width: 860px) {
	.ffw-app .ffw-model__legend {
		display: none;
	}
}
.ffw-model__hint:first-child {
	padding-left: 0;
	border-left: 0;
}
