/* Buyer and Seller Portals (www/buyer/, www/seller/): Flip Ohio look, light and dark. The public deal page
   (www/deal.html) matches it. Theme: <html data-theme="light|dark"> when the user picks one (header switch,
   portal_theme.js), otherwise the browser's setting (prefers-color-scheme).
   The swipe stack's look is part of the theme: --stack-1 / --stack-2 the two cards behind the top one (a shade darker
   than --card on light, lighter on dark), --stack-rim the outline of every card (a faint light one on dark, where a
   shadow alone doesn't show on the black page), --stack-shadow the top card's shadow on them, --glow-soft the halo of
   the idle glow; --stack-peek and --stack-tilt how far the cards behind show below and how much they lean (the same in
   both themes). */
:root { --ink: #0b0b10; --muted: #6b6b76; --line: #ececf1; --card: #fff; --page: #f2f2f7; --close: #047857; --accent: #071320;
	--banner: #fff4ec; --banner-ink: #9a3412; color-scheme: light;
	--stack-1: #f4f4f7; --stack-2: #e9e9ee; --stack-rim: rgba(0, 0, 0, 0.06); --stack-shadow: rgba(0, 0, 0, 0.16);
	--glow: #fff; --glow-soft: rgba(37, 99, 235, 0.9); --stack-peek: 16px; --stack-tilt: 2deg; }
:root[data-theme="dark"] { --ink: #f5f5f7; --muted: #a1a1aa; --line: #2c2c2e; --card: #1c1c1e; --page: #000;
	--close: #34d399; --accent: #9db0c6; --banner: #3a1d0e; --banner-ink: #fdba74; color-scheme: dark;
	--stack-1: #3a3a3f; --stack-2: #4b4b52; --stack-rim: rgba(255, 255, 255, 0.12); --stack-shadow: rgba(0, 0, 0, 0.85);
	--glow-soft: rgba(255, 255, 255, 0.5); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) { --ink: #f5f5f7; --muted: #a1a1aa; --line: #2c2c2e; --card: #1c1c1e; --page: #000;
		--close: #34d399; --accent: #9db0c6; --banner: #3a1d0e; --banner-ink: #fdba74; color-scheme: dark;
		--stack-1: #3a3a3f; --stack-2: #4b4b52; --stack-rim: rgba(255, 255, 255, 0.12); --stack-shadow: rgba(0, 0, 0, 0.85);
		--glow-soft: rgba(255, 255, 255, 0.5); }
}
* { box-sizing: border-box; }
/* The page is never wider than the phone: anything that pokes past the right edge is clipped, so iOS has no extra
   width to zoom out to and the page doesn't slide sideways. */
html, body { overflow-x: clip; }
/* No double-tap zoom (a quick second tap on a button or card would zoom the page); pinch-to-zoom still works. */
html { touch-action: manipulation; }
body { margin: 0; background: var(--page); color: var(--ink);
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; }
.rf-wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
/* Header (templates/includes/buyer/header.html): the brand on the left and the account corner on the right on the first
   row, then the portal switch and the page links on rows of their own. */
.rf-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 16px; padding: 8px 4px 18px; }
.rf-top > .rf-switch, .rf-top > .rf-nav { grid-column: 1 / -1; justify-self: start; }
.rf-top > .rf-nav:not(:has(a)) { display: none; }
.rf-brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; }
.rf-brand img { width: 72px; height: 47px; }
.rf-brand small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.rf-brand span { line-height: 1.05; }
/* The Flip Ohio mark is black: white on the dark theme. */
:root[data-theme="dark"] .rf-brand img[src$=".svg"] { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rf-brand img[src$=".svg"] { filter: invert(1); } }
/* Phones: the brand gets the first row to itself, edge to edge. The words scale with the screen (vw) and the mark takes
   the rest of the width; the account corner (Log in or Log out beside the gear) moves to the second row, on the right of the portal switch. */
@media (max-width: 480px) {
	.rf-top > .rf-brand { grid-column: 1 / -1; gap: 4vw; font-size: 9vw; }
	.rf-brand img { flex: 1 1 0; min-width: 0; width: auto; height: auto; }
	.rf-brand small { font-size: 0.42em; }
	.rf-top > .rf-account { grid-row: 2; grid-column: 2; flex-direction: row; align-items: center; }
	/* Buyer | Seller (no "Portal") fits beside it; with Partner or Contractor too, the switch keeps a row of its own. */
	.rf-top > .rf-switch:not(:has(> a:nth-child(3))) { grid-row: 2; grid-column: 1; align-self: center; }
	.rf-switch .rf-sw-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.rf-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 15px; color: var(--muted); }
.rf-nav a { text-decoration: none; white-space: nowrap; } .rf-nav a.on { color: var(--ink); font-weight: 700; }
.rf-card { background: var(--card); border-radius: 22px; overflow: hidden; margin-bottom: 16px; }
.rf-inner { padding: 22px 24px; }
h1 { margin: 6px 0 4px; font-size: 32px; line-height: 1.1; font-weight: 900; letter-spacing: -0.03em; }
.rf-sub { color: var(--muted); }
.rf-deals { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 6px; }
.rf-deal { display: block; background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; }
.rf-deal img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
/* The Flip Ohio watermark on every property card's photo: the mark, white with a soft shadow so it reads on a bright
   sky or a dark room, in the photo's bottom-right corner (where listing photos carry theirs; the heart is top right,
   the swipe marks in the middle). Not on the no-photo placeholder, which is the logo already. */
.rf-photo { position: relative; display: flex; flex-direction: column; }
.rf-photo > img { flex: 1 0 auto; }
.rf-photo::after { content: ""; position: absolute; right: 12px; bottom: 10px; width: 52px; height: 34px; pointer-events: none; opacity: 0.85;
	background: url("/assets/erpnext_wholesaling/images/flip-ohio-mark-mono.svg") center / contain no-repeat;
	filter: invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
/* No photo yet: the Flip Ohio logo, muted (public/images/flip-ohio-placeholder-light.svg, black; -dark.svg, white, under the
   dark theme and Auto in dark mode) over a soft gradient made of theme tokens, so it follows light and dark. */
.rf-nophoto { background: url("/assets/erpnext_wholesaling/images/flip-ohio-placeholder-light.svg") center / auto 56% no-repeat, linear-gradient(135deg, var(--banner), var(--line)); }
:root[data-theme="dark"] .rf-nophoto { background-image: url("/assets/erpnext_wholesaling/images/flip-ohio-placeholder-dark.svg"), linear-gradient(135deg, var(--banner), var(--line)); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .rf-nophoto { background-image: url("/assets/erpnext_wholesaling/images/flip-ohio-placeholder-dark.svg"), linear-gradient(135deg, var(--banner), var(--line)); }
}
.rf-deal .rf-nophoto { display: block; width: 100%; aspect-ratio: 4 / 3; }
.rf-deal .rf-inner { padding: 14px 16px 16px; }
.rf-price { font-size: 24px; font-weight: 900; letter-spacing: -0.03em; color: var(--close); }
.rf-pill { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--page); font-size: 13px; font-weight: 700; }
.rf-pill:empty { display: none; } /* a property with no pill yet (buyer_portal.lead_label); an answer fills it in */
/* A Showcase property (Property Lead → showcase): the badge before the status pill, filled with the banner accent so it
   stands out; --banner-ink is dark orange in the light theme and light orange in the dark one, --card the contrast. */
.rf-showcase { margin-right: 6px; background: var(--banner-ink); color: var(--card); }
.rf-sample-title { margin: 22px 0 2px; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.rf-empty { text-align: center; color: var(--muted); padding: 40px 16px; }
label { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 14px; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); font: inherit; }
.rf-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; } .rf-check input { width: auto; margin-top: 4px; }
.rf-btn { display: inline-block; margin-top: 18px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--ink); color: var(--card);
	font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.rf-btn.rf-light { background: var(--page); color: var(--ink); }
.rf-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.rf-msg { margin-top: 12px; font-weight: 700; }
.rf-big { font-size: 34px; margin: 12px 0 4px; }
.rf-answer { margin: 16px 0; padding: 14px 16px; border-radius: 14px; background: var(--page); }
.rf-answer .rf-btn { margin: 10px 8px 0 0; }
.rf-photos { display: grid; gap: 8px; margin: 16px 0; }
.rf-photos img { width: 100%; border-radius: 14px; display: block; background: var(--line); }
.rf-photos .rf-nophoto { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; }
@media (min-width: 640px) { .rf-photos { grid-template-columns: 1fr 1fr; } .rf-photos img:first-child { grid-column: 1 / -1; } .rf-photos .rf-nophoto { aspect-ratio: 16 / 9; background-size: auto 66%; } }
/* Photo carousel (templates/includes/buyer/carousel.html, public/js/portal_carousel.js): one photo fills the frame
   and the rest swipe in (scroll-snap). The counter, arrows and dots sit on the photo in translucent black with white
   glyphs, so they read on any picture in light and dark; the arrows and dots show once the script has run. */
.rf-carousel { position: relative; margin: 16px 0; }
.rf-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--line); }
.rf-slides::-webkit-scrollbar { display: none; }
.rf-slides:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rf-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.rf-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rf-counter, .rf-prev, .rf-next, .rf-dots { position: absolute; background: rgba(0, 0, 0, 0.6); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rf-counter { top: 12px; right: 12px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.rf-prev, .rf-next { top: 50%; display: none; place-items: center; width: 40px; height: 40px; margin-top: -20px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: opacity 0.2s, background-color 0.2s; }
.rf-prev { left: 12px; }
.rf-next { right: 12px; }
.rf-ready .rf-prev, .rf-ready .rf-next { display: grid; }
.rf-prev:hover, .rf-next:hover { background: rgba(0, 0, 0, 0.78); }
.rf-prev:disabled, .rf-next:disabled { opacity: 0; pointer-events: none; }
.rf-prev svg, .rf-next svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rf-prev:focus-visible, .rf-next:focus-visible, .rf-dots button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.rf-dots { bottom: 12px; left: 50%; display: none; gap: 2px; padding: 3px 5px; border-radius: 999px; transform: translateX(-50%); }
.rf-ready .rf-dots { display: flex; }
.rf-dots button { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.rf-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); transition: width 0.2s, height 0.2s, background-color 0.2s; }
.rf-dots button[aria-current="true"]::before { width: 8px; height: 8px; background: #fff; }
@media (min-width: 640px) { .rf-slides { aspect-ratio: 16 / 9; } }
@media (prefers-reduced-motion: reduce) { .rf-prev, .rf-next, .rf-dots button::before { transition: none; } }
.rf-facts { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.rf-facts td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rf-facts td:first-child { color: var(--muted); } .rf-facts td:last-child { text-align: right; font-weight: 700; }
.rf-desc { white-space: pre-line; }
.rf-banner { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--banner); color: var(--banner-ink); font-weight: 600; }
select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink); font: inherit; }
.rf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rf-btn:disabled { opacity: 0.5; }
/* Buyer Portal / Seller Portal switch in the header (signed in): the current side is aria-current. */
.rf-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); }
.rf-switch a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 800;
	text-decoration: none; white-space: nowrap; }
.rf-switch a[aria-current="page"] { background: var(--ink); color: var(--card); }
.rf-switch a:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* The switch and the header's other rows never make the page wider than the phone: a switch with more sides than fit
   scrolls sideways inside itself (no scrollbar), not the page; it is positioned so the hidden word "Portal" (.rf-sw-word,
   absolutely positioned) stays inside it instead of being placed against the page. */
.rf-top > * { min-width: 0; }
.rf-top > .rf-switch { position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.rf-top > .rf-switch::-webkit-scrollbar { display: none; }
.rf-switch a { flex: none; }
/* With three or four sides (a partner's or a contractor's login) the switch is wider than a phone, so there each side
   drops the word "Portal" on screen (Buyer | Seller | Contractor); screen readers still hear it. */
@media (max-width: 480px) {
	.rf-switch:has(> a:nth-child(3)) .rf-sw-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	/* Deal Desk | Ask Flip | Buyer | Seller fits a 375 px phone. */
	.rf-switch a { padding: 6px 11px; }
}
/* Theme switch in the header: Automatic / Light / Dark. */
/* The account corner, top right: Log in (solid, a visitor's one action) or Log out, and under it the settings gear, a
   disclosure button (aria-expanded) for the panel under it with the theme switch, Automatic / Light / Dark
   (public/js/portal_theme.js opens and closes it: the gear, Esc or a tap outside). 44 px gear, 40 px theme buttons. */
.rf-account { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rf-auth { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card);
	color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.rf-auth.rf-login { background: var(--ink); color: var(--card); }
.rf-gear { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
	background: var(--card); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rf-gear svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rf-gear[aria-expanded="true"] { background: var(--ink); color: var(--card); }
.rf-auth:focus-visible, .rf-gear:focus-visible, .rf-theme button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rf-settings { position: absolute; top: 100%; right: 0; z-index: 70; margin-top: 8px; padding: 14px; width: max-content;
	max-width: calc(100vw - 32px); border-radius: 18px; background: var(--card); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), inset 0 0 0 1px var(--line); }
.rf-settings[hidden] { display: none; }
.rf-settings-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.rf-theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--page); }
.rf-theme button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted);
	font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rf-theme button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
/* Team preview (/buyer/preview): banner and picker. */
.rf-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 10px 14px;
	border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.rf-preview a, .rf-preview button { color: #fff; font: inherit; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.rf-pick { display: grid; gap: 8px; margin-top: 12px; }
.rf-pick button { display: block; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
	background: var(--page); color: var(--ink); font: inherit; cursor: pointer; }
.rf-pick button.on { border-color: var(--accent); }
.rf-pick button span { display: block; color: var(--muted); font-size: 14px; }
/* Flip's video (templates/includes/buyer/video.html): a card that opens; the portrait video stays phone-sized. */
.rf-video summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; font-weight: 800; cursor: pointer; list-style: none; }
.rf-video summary::-webkit-details-marker { display: none; }
.rf-video summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 4px auto;
	border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rf-video[open] summary::after { margin-bottom: -4px; transform: rotate(-135deg); }
.rf-video summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 22px; }
.rf-video summary small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.rf-video svg { flex: none; width: 36px; height: 36px; } .rf-video circle { fill: var(--ink); } .rf-video path { fill: var(--card); }
.rf-video video { display: block; width: min(100% - 32px, 360px, max(45vh, 220px)); aspect-ratio: 9 / 16; margin: 0 auto 20px;
	border-radius: 14px; background: var(--line); }
/* Seller forms (templates/includes/seller/property_fields.html): short fields side by side on wider screens, one
   column on phones. Photo upload on a property (www/seller/property.html): the file input matches the other inputs. */
.rf-grid { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .rf-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
.rf-upload { margin: 8px 0 16px; }
input[type="file"] { padding: 10px; cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 18px; border: 0; border-radius: 999px;
	background: var(--ink); color: var(--card); font: inherit; font-weight: 800; cursor: pointer; }
input[type="file"]:disabled { opacity: 0.5; cursor: progress; }
/* Liked list (public/js/portal_like.js): a card on My deals sits in a .rf-deal-wrap that swipes sideways (vertical
   scrolling stays the browser's: touch-action) with a heart over the photo, translucent black like the carousel's
   controls and red when liked; the deal and property pages swipe their card and have a ♥ Like button. The mark (♥
   right, ✕ left) fades in with the drag; the card springs back. The All | Liked switch is a pill group; the toast sits
   bottom-centre. */
.rf-deal-wrap { position: relative; display: flex; flex-direction: column; touch-action: pan-y; touch-action: pan-y pinch-zoom; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.rf-deal-wrap > .rf-deal { flex: 1; } .rf-deal-wrap[hidden] { display: none; }
.rf-card[data-rf-item] { position: relative; }
/* pan-y on the card's own parts, not the card: an ancestor's touch-action also binds the photo carousel inside it. */
.rf-card[data-rf-item] > .rf-inner > :not(.rf-carousel) { touch-action: pan-y; touch-action: pan-y pinch-zoom; }
[data-rf-item] { transition: transform 0.25s ease; }
[data-rf-item].rf-dragging { transition: none; -webkit-user-select: none; user-select: none; }
.rf-heart { position: absolute; top: 16px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform 0.15s; }
.rf-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.rf-heart[aria-pressed="true"] svg { fill: #e11d48; stroke: #e11d48; }
.rf-heart:active { transform: scale(0.9); }
.rf-heart:focus-visible, .rf-views button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rf-like[aria-pressed="true"] { color: #e11d48; }
.rf-liked-pill { color: #e11d48; }
.rf-mark { position: absolute; top: 34%; left: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
	background: #e11d48; color: #fff; font-size: 36px; line-height: 1; opacity: 0; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.rf-mark.rf-left { background: var(--ink); color: var(--card); }
.rf-hint { margin-top: -6px; font-size: 14px; }
.rf-views { display: inline-flex; gap: 2px; margin: 4px 0 10px; padding: 3px; border-radius: 999px; background: var(--card); }
.rf-views button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 800; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.rf-views button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.rf-liked-count, .rf-passed-count { font-variant-numeric: tabular-nums; opacity: 0.8; }
.rf-liked-empty, .rf-passed-empty { margin-top: 6px; }
.rf-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px;
	background: var(--ink); color: var(--card); font-size: 15px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none;
	transform: translate(-50%, 12px); transition: opacity 0.2s, transform 0.2s; }
.rf-toast.rf-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { [data-rf-item], .rf-heart, .rf-toast { transition: none; } }
/* The taste (templates/includes/buyer/stack.html, public/js/portal_stack.js): every property as a stack of cards, one
   at a time, for people who aren't buyers while the portal is closed. The cards share one grid cell, so the stack is
   as tall as its tallest card; the top one (data-pos 0) sits over the next two, which peek out below it, smaller
   (data-pos 1 and 2). The top card drags sideways (vertical scrolling stays the browser's: touch-action), shows the
   Liked list's mark (♥ right, ✕ left: .rf-mark above), springs back, or flies off (rf-fly). The ♥ Like button is the
   heart's red with white text (4.5:1). Without the script (no rf-ready) the first card shows and the rest are links
   under it (.rf-stack-more). The sign-up page's "You liked" card (.rf-liked-card) is a small card of the same
   property. 28px under the stack so the next card on the page clears the buttons (none in the embed: the frame ends there). */
.rf-stack { max-width: 420px; margin: 10px auto 28px; border-radius: 22px; }
.rf-stack[data-embed] { margin-bottom: 0; }
.rf-stack:focus { outline: none; }
.rf-stack:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.rf-stack [hidden] { display: none !important; }
.rf-stack-cards { position: relative; display: grid; }
.rf-ready .rf-stack-cards { padding-bottom: calc(2 * var(--stack-peek) + 2px); }
.rf-stack-card { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--card);
	box-shadow: 0 0 0 1px var(--stack-rim), 0 10px 22px var(--stack-shadow); transform-origin: 50% 100%; transition: transform 0.25s ease, background-color 0.25s ease;
	touch-action: pan-y; touch-action: pan-y pinch-zoom; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Every card is as tall as the tallest one (one grid cell): the photo takes the extra height (cropped to fit, never
   shorter than 4:3), so a card with fewer details has no empty band under them. */
.rf-stack-card > .rf-deal { flex: 1; display: flex; flex-direction: column; }
.rf-stack-card .rf-deal > :is(.rf-photo, .rf-nophoto) { flex: 1 0 auto; min-height: 0; }
/* A Showcase property: an outline in the Showcase pill's colour round the top card. */
.rf-stack-showcase[data-pos="0"] { box-shadow: 0 0 0 2px var(--banner-ink), 0 10px 22px var(--stack-shadow); }
.rf-stack-card img { -webkit-user-drag: none; }
.rf-stack-card[data-pos="0"] { z-index: 3; }
/* The two behind are tilted a little, one each way, so the stack reads as a pile of cards, and are a shade darker
   (light) or lighter (dark) than the top one, blank (their content fades in as they come up), with a shadow from the
   card above: on the dark theme a shadow alone doesn't show on the black page, so the cards there also get a faint
   light rim. Colours, peek and tilt: the --stack-* theme tokens at the top.
   They follow the drag: --drag on the deck (portal_stack.js; 0 at rest, 1 once the top card is past the threshold or
   flying off) takes each one to the place of the card in front of it, so the next card is in place when the top one
   goes; the next card's photo and details are in full once the drag is a quarter of the way (--drag 0.25), so what is
   under the top card shows as it moves aside. rf-pulling (a finger or pointer on the card) turns their transition off
   so they keep up. */
.rf-stack-cards { --drag: 0; }
.rf-stack-card[data-pos="1"] { z-index: 2; pointer-events: none;
	transform: translateY(calc(var(--stack-peek) * (1 - var(--drag)))) rotate(calc(-1 * var(--stack-tilt) * (1 - var(--drag)))) scale(calc(0.95 + 0.05 * var(--drag)));
	background: color-mix(in srgb, var(--card) calc(var(--drag) * 100%), var(--stack-1)); }
.rf-stack-card[data-pos="2"] { z-index: 1; pointer-events: none;
	transform: translateY(calc(var(--stack-peek) * (2 - var(--drag)))) rotate(calc(var(--stack-tilt) * (1.25 - 2.25 * var(--drag)))) scale(calc(0.9 + 0.05 * var(--drag)));
	background: color-mix(in srgb, var(--stack-1) calc(var(--drag) * 100%), var(--stack-2)); }
.rf-stack-card > :is(.rf-deal, .rf-inner) { transition: opacity 0.25s ease; }
.rf-stack-card[data-pos="1"] > :is(.rf-deal, .rf-inner) { opacity: calc(var(--drag) * 4); }
.rf-stack-card[data-pos="2"] > :is(.rf-deal, .rf-inner) { opacity: 0; }
.rf-pulling > .rf-stack-card:is([data-pos="1"], [data-pos="2"]), .rf-pulling > .rf-stack-card > :is(.rf-deal, .rf-inner) { transition: none; }
.rf-stack-card.rf-dragging { transition: none; }
.rf-stack-card.rf-fly { transition: transform 0.28s ease-in, opacity 0.28s ease-in; opacity: 0; }
.rf-stack-end { overflow: hidden; }
.rf-stack-end .rf-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.rf-stack-end .rf-btn { margin-top: 10px; min-width: 160px; }
.rf-stack-done { margin: 0 0 6px; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
/* Under the stack: a round ✕ (Next) and a round red ♥ (Like), 64 px, each with its word under it, and the counter
   between them. The red with white is the heart's (4.5:1). */
.rf-stack-actions { display: flex; justify-content: center; align-items: flex-start; gap: 20px; margin-top: 8px; }
.rf-stack-count { flex: 0 0 88px; margin: 0; padding-top: 22px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rf-stack-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink);
	font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rf-stack-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--card);
	box-shadow: 0 0 0 1px var(--stack-rim), 0 6px 16px var(--stack-shadow); transition: transform 0.15s ease; }
.rf-stack-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rf-stack-like .rf-stack-icon { background: #e11d48; color: #fff; }
.rf-stack-like .rf-stack-icon svg { fill: currentColor; stroke: none; width: 30px; height: 30px; }
.rf-stack-btn:active .rf-stack-icon { transform: scale(0.92); }
.rf-stack-btn:focus-visible { outline: none; }
.rf-stack-btn:focus-visible .rf-stack-icon, .rf-stack-end .rf-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rf-ready .rf-stack-more { display: none; }
.rf-stack-more ul { margin: 4px 0 0; padding-left: 20px; }
.rf-stack-more li { margin: 4px 0; }
.rf-liked-title { margin: 0 0 10px; font-size: 18px; font-weight: 900; color: #e11d48; }
.rf-liked-card { display: flex; gap: 14px; align-items: center; }
.rf-liked-card img, .rf-liked-card .rf-nophoto { flex: none; width: 104px; aspect-ratio: 4 / 3; border-radius: 12px; object-fit: cover; background-size: auto 56%; }
.rf-liked-card .rf-price { font-size: 20px; }
@media (prefers-reduced-motion: reduce) { .rf-stack-card, .rf-stack-card.rf-fly, .rf-stack-card > :is(.rf-deal, .rf-inner), .rf-stack-icon { transition: none; } }
/* The idle glow (public/js/portal_stack.js: rf-idle on the stack after a few seconds with no touch, pointer or key on
   it): a light that travels round the top card's rounded edge, one lap every 5 s. Each card holds a .rf-glow (added by
   the script): a ring (b: the card's outer 2 px, cut out with a mask) over a big conic gradient, bright at its head
   and fading behind (i, twice the card's size; the ring clips it, since the mask alone hides it but still leaves it
   wider than the page), that only turns (a transform: the browser rotates a layer, nothing is laid out or repainted).
   The soft light around the band is the wrapper's drop-shadows: a filter there, because the ring's own mask would cut
   it off. It fades in, goes at once on any activity (no transition back) and never shows on a card being dragged or
   flying off; rf-offscreen pauses it. White in both themes; on the light theme the soft part is a pale blue, so it
   shows on a white page. Under reduced motion nothing turns: a still light on the top edge. The embed's glow=0
   (data-glow="0") adds no .rf-glow. */
.rf-glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
	filter: drop-shadow(0 0 3px var(--glow)) drop-shadow(0 0 10px var(--glow-soft)); }
.rf-glow b { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; padding: 2px;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.rf-glow i { position: absolute; inset: -50%;
	background: conic-gradient(transparent 0turn 0.68turn, rgba(255, 255, 255, 0.25) 0.84turn, var(--glow) 0.96turn, transparent 1turn); }
.rf-idle .rf-stack-card[data-pos="0"]:not(.rf-dragging):not(.rf-fly) .rf-glow { opacity: 1; transition: opacity 0.8s ease; }
.rf-idle .rf-stack-card[data-pos="0"] .rf-glow i { animation: rf-glow-lap 5s linear infinite; }
.rf-idle.rf-offscreen .rf-stack-card[data-pos="0"] .rf-glow i { animation-play-state: paused; }
@keyframes rf-glow-lap { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
	.rf-glow i { display: none; }
	.rf-glow b { background: radial-gradient(60% 40px at 50% 0, var(--glow), transparent); }
}
/* Join on a card in the website's frame when the browser would open the sign-up neither in the page nor in a new tab
   (portal_stack.js, offerJoin): over the photo, like the ♥ / ✕ mark. */
.rf-stack-join { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 1;
	background: #e11d48; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.rf-stack-join:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* The website embed (www/buyer/embed.html, /buyer/embed in an iframe on flipohio.com): the stack alone on a
   transparent page, so it sits on the website's background. The root keeps color-scheme normal in the dark theme
   too: a browser paints a frame whose colour scheme differs from the iframe element's (normal on most sites) with an
   opaque white or black backdrop instead of letting the site show through. The dark colours still apply (tokens).
   Room round the stack for the glow and the shadows; nothing scrolls sideways while a card flies off. */
:root.rf-embed-page { color-scheme: normal !important; }
.rf-embed-page, .rf-embed-page body { background: transparent; overflow-x: hidden; }
.rf-embed { padding: 14px 16px 6px; }
.rf-embed .rf-stack { margin-top: 0; }
.rf-embed .rf-sample-title { margin-top: 0; }
.rf-embed > .rf-card { max-width: 420px; margin: 0 auto; }
/* The floating bar at the bottom (templates/includes/buyer/dock.html, public/js/portal_dock.js): Buy · Sell · Search ·
   Liked on every Buyer and Seller Portal page, a glass pill of the ink colour (like the buttons and the toast) centred
   above the phone's home indicator, white glyphs, the current one in a lighter disc (Liked's heart red). The page gets
   room under it (body.rf-dock-on) and the toast moves above it. The search field is a card above the bar
   (.rf-dock-search, shown while Search is on; body.rf-dock-search-on makes room for it too and lifts the toast over
   it); the count or "No properties match" sits under the input. The safe-area inset is added to each distance, so
   the bar sits above an iPhone's home indicator once the viewport is set to viewport-fit=cover. A card the search leaves out gets rf-nomatch on its grid cell, which the
   grid hides, independently of the All | Liked | Passed view's hidden. */
:root { --dock: rgba(11, 11, 16, 0.8); --dock-on: rgba(255, 255, 255, 0.2); }
:root[data-theme="dark"] { --dock: rgba(44, 44, 46, 0.72); --dock-on: rgba(255, 255, 255, 0.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dock: rgba(44, 44, 46, 0.72); --dock-on: rgba(255, 255, 255, 0.18); } }
.rf-dock { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 2px; margin: 0;
	padding: 6px; border-radius: 999px; transform: translateX(-50%); background: var(--dock); color: #fff;
	-webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.rf-dock a, .rf-dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 66px; height: 56px;
	padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.01em;
	text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s, transform 0.15s; }
.rf-dock svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rf-dock [aria-current="true"], .rf-dock [aria-expanded="true"] { background: var(--dock-on); }
.rf-dock [data-dock="liked"][aria-current="true"] svg { fill: #e11d48; stroke: #e11d48; }
.rf-dock a:active, .rf-dock button:active { transform: scale(0.92); }
.rf-dock a:focus-visible, .rf-dock button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
body.rf-dock-on { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
body.rf-dock-on .rf-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
body.rf-dock-search-on { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
body.rf-dock-search-on .rf-toast { bottom: calc(196px + env(safe-area-inset-bottom)); }
.rf-dock-search { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60; width: min(100% - 32px, 440px); margin: 0;
	padding: 8px; border-radius: 22px; transform: translateX(-50%); background: var(--card);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), inset 0 0 0 1px var(--line); }
.rf-dock-search[hidden] { display: none; }
.rf-dock-search input { border-radius: 14px; font-size: 16px; }
.rf-dock-search input:focus-visible { outline: 3px solid var(--accent); outline-offset: -1px; }
.rf-dock-search output { display: block; padding: 6px 8px 2px; color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rf-dock-search output:empty { display: none; }
.rf-deals > .rf-nomatch { display: none !important; }
@media (prefers-reduced-motion: reduce) { .rf-dock a, .rf-dock button { transition: none; } }
