/* Cities of Darkness - Tender
   Aesthetic drawn from the in-fiction Tender app: pale smoke background,
   crimson blood accent, clean sans headlines, Tinder-style card. */

.tender-app {
	--tender-crimson: #eb1152;
	--tender-crimson-deep: #af1b61;
	--tender-ink: #1a1a1f;
	--tender-smoke: #eceaee;
	--tender-card-bg: #f7f6f8;
	position: relative;
	max-width: 720px;
	margin: 0 auto;
	font-family: "Helvetica Neue", Arial, sans-serif;
	color: var(--tender-ink);
}

/* ---- Logo header ---- */
.tender-header { text-align: center; padding: 8px 0 18px; }
.tender-logo { height: 40px; width: auto; max-width: 80%; }

/* ---- Swipe stage ---- */
/* The whole app sits on the drifting ink wash, not just the swipe view -
   fixed to the viewport so it fills the full browser window on desktop
   rather than being clipped to the app's own (narrower, centered) box. */
.tender-app::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image: url( '../img/smoke-bg.webp' );
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
}

.tender-swipe .tender-stage,
.tender-you .tender-stage,
.tender-matches .tender-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 8px 0;
}

/* Arrows live INSIDE the card, overlaid on its left/right edges. */
.tender-nav {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	z-index: 3;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.82);
	color: var(--tender-ink);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(30, 20, 40, 0.2);
	opacity: 0.9;
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.tender-nav-prev { left: 12px; }
.tender-nav-next { right: 12px; }
.tender-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.08); }
.tender-nav:focus-visible { outline: 2px solid var(--tender-crimson); outline-offset: 2px; }

/* ---- Card ---- */
.tender-card {
	position: relative;
	width: min( 340px, calc( ( 100vh - 210px ) * 0.5625 ) );
	aspect-ratio: 9 / 16;
	height: auto;
	background: var(--tender-card-bg);
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(30, 20, 40, 0.18);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Square profile image, pinned to the top of the card. */
.tender-card-photo {
	position: absolute;
	top: 0; left: 0; right: 0;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-size: cover;
	background-position: center;
}
.tender-card-photo-empty { background: linear-gradient(160deg, #cfc9d6, #b7aec4); }

.tender-card-body {
	position: relative;
	z-index: 2;
	margin-top: auto;
	padding: 20px 20px 22px;
	background: linear-gradient(to top, var(--tender-card-bg) 80%, rgba(247,246,248,0.85) 92%, rgba(247,246,248,0) 100%);
}

/* Tagline: lighter weight, smaller than before, still prominent. */
.tender-card-headline {
	font-size: 19px;
	font-weight: 500;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin-bottom: 12px;
}

.tender-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tender-card-name { font-size: 15px; font-weight: 600; }

/* ---- Distance indicator ---- */
.tender-card-distance {
	display: flex; align-items: center; gap: 5px;
	margin-bottom: 8px; font-size: 12px; color: rgba(26, 26, 31, 0.6);
}
.tender-pin { color: var(--tender-crimson); flex: 0 0 auto; }

/* ---- Detail toggle link ---- */
.tender-detail-toggle {
	background: none; border: none; padding: 4px 0;
	color: var(--tender-crimson); font-size: 12px; font-weight: 600; cursor: pointer;
}
.tender-detail-toggle:hover { text-decoration: underline; }
.tender-detail-back { display: inline-block; margin-bottom: 10px; }

/* ---- Agree / disagree responses (on the detail page) ---- */
/* Wide, flat, and understated - light thin borders, minimal fill. */
.tender-card-responses { display: flex; gap: 12px; margin-top: 16px; margin-bottom: 26px; padding-right: 0; }
.tender-response {
	flex: 1;
	padding: 9px 6px;
	border: 1px solid rgba(26,26,31,0.12); border-radius: 4px;
	background: rgba(255,255,255,0.45);
	font-size: 12px; font-weight: 500; color: rgba(26,26,31,0.75);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tender-response-agree:hover { background: var(--tender-crimson); border-color: var(--tender-crimson); color: #fff; }
.tender-response-disagree:hover { background: var(--tender-ink); border-color: var(--tender-ink); color: #fff; }
.tender-response:focus-visible { outline: 2px solid var(--tender-crimson); outline-offset: 2px; }
.tender-response.is-selected { color: #fff; }
.tender-response-agree.is-selected { background: var(--tender-crimson); border-color: var(--tender-crimson); }
.tender-response-disagree.is-selected { background: var(--tender-ink); border-color: var(--tender-ink); }

/* ---- Detail view (bio + interests) ---- */
/* Same scroll-over-photo pattern as the Matches profile screen: the
   square photo (base .tender-card-photo, unmodified here) stays
   pinned at the top, and this scrolls over it with the fade
   traveling along with the content rather than sitting fixed on the
   container. */
.tender-card.is-detail .tender-card-body {
	position: absolute;
	inset: 0;
	margin-top: 0;
	padding: 0;
	overflow-y: auto;
	background: transparent;
}
.tender-card.is-detail .tender-nav { display: none; }
.tender-card.is-detail .tender-card-headline { margin-top: 0; }
.tender-card.is-detail .tender-card-fade {
	height: 300px;
	background: linear-gradient( to bottom,
		rgba(247, 246, 248, 0) 0%,
		var(--tender-card-bg, #f7f6f8) 100% );
}
.tender-card.is-detail .tender-card-content {
	background: var(--tender-card-bg, #f7f6f8);
	padding: 0 20px 84px; /* clear the heart */
}

.tender-card-detail { max-height: none; }
.tender-card-detail h4 {
	margin: 14px 0 4px; font-size: 12px; text-transform: uppercase;
	letter-spacing: 0.08em; color: rgba(26,26,31,0.6);
}
.tender-card-detail p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.tender-muted { color: rgba(26,26,31,0.45); }

.tender-interests { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tender-interest {
	font-size: 12px; padding: 4px 10px; border-radius: 999px;
	background: rgba(235,17,82,0.08); color: var(--tender-crimson-deep);
	border: 1px solid rgba(235,17,82,0.2);
}

/* ---- Heart / Like (commit) ---- */
.tender-like {
	position: absolute; right: 16px; bottom: 16px; z-index: 4;
	width: 54px; height: 54px;
	display: flex; align-items: center; justify-content: center;
	padding: 0; border: none; border-radius: 50%;
	background: var(--tender-crimson); color: #fff; cursor: pointer;
	box-shadow: 0 8px 20px rgba(235, 17, 82, 0.4);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tender-like svg { display: block; }
.tender-like:hover { transform: scale(1.08); box-shadow: 0 10px 26px rgba(235, 17, 82, 0.5); }
.tender-like:active { transform: scale(0.96); }
.tender-like:focus-visible { outline: 3px solid var(--tender-ink); outline-offset: 2px; }

/* ---- States ---- */
.tender-card-loading, .tender-card-empty {
	margin: auto; padding: 40px 24px; text-align: center;
	color: rgba(26,26,31,0.55); font-size: 14px;
}

.tender-result {
	text-align: center; min-height: 28px; margin-top: 16px;
	font-size: 15px; font-weight: 600;
}
.tender-result-match { color: var(--tender-crimson); }

/* ---- Profile & questionnaire (kept simple, shares palette) ---- */
.tender-app fieldset { border: none; margin: 0 0 1.4em; padding: 0; }
.tender-app legend { font-weight: 700; margin-bottom: 0.5em; }
.tender-app label { display: block; margin-bottom: 0.5em; }
.tender-app button[type="submit"] {
	padding: 10px 18px; border: none; border-radius: 4px;
	background: var(--tender-crimson); color: #fff; font-weight: 600; cursor: pointer;
}
.tender-match { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid rgba(26,26,31,0.08); padding: 12px 0; }
.tender-match img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }

/* ---- Mobile: the card fills the entire screen, Tinder-style ---- */
@media ( max-width: 600px ) {
	/* The swipe view takes over the viewport entirely. */
	.tender-app.tender-swipe,
	.tender-app.tender-you,
	.tender-app.tender-matches {
		max-width: none;
		margin: 0;
		padding: 0;
	}
	/* Logo header floats over the top of the photo instead of pushing
	   the card down the page. */
	.tender-swipe .tender-header,
	.tender-you .tender-header,
	.tender-matches .tender-header {
		position: fixed;
		top: 0; left: 0; right: 0;
		z-index: 6;
		padding: 10px 0 12px;
		background: linear-gradient(to bottom, rgba(247,246,248,0.9), rgba(247,246,248,0));
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}
	.tender-swipe .tender-logo,
	.tender-you .tender-logo,
	.tender-matches .tender-logo { height: 28px; }

	.tender-swipe .tender-stage,
	.tender-you .tender-stage,
	.tender-matches .tender-stage {
		position: fixed;
		inset: 0;
		min-height: 0;
		z-index: 5;
	}

	.tender-card {
		width: 100%;
		height: 100%;
		border-radius: 0;
		box-shadow: none;
	}

	/* Square photo spans the full width of the phone. */
	.tender-card-photo { aspect-ratio: 1 / 1; }

	/* Content sits above the home indicator / gesture bar. */
	.tender-card-body {
		padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}
	.tender-card.is-detail .tender-card-content {
		padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
	}

	.tender-like {
		right: 20px;
		bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	}

	.tender-nav { width: 44px; height: 44px; }

	/* Match/no-match message floats over the card. */
	.tender-swipe .tender-result {
		position: fixed;
		left: 0; right: 0;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		z-index: 7;
		margin: 0;
		pointer-events: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.tender-nav, .tender-response, .tender-like { transition: none; }
}

/* =========================================================================
   Match result - takes over the card itself (not an overlay)
   ========================================================================= */

/* Everything inside the match view uses border-box so padded elements
   can't overflow the fixed-width card. */
.tender-card.is-match,
.tender-card.is-match * { box-sizing: border-box; }

.tender-card.is-match { background: #f3f1f5; }
.tender-card.is-match .tender-nav,
.tender-card.is-match .tender-like { display: none; }

/* The plume fills the whole card, so it never ends on a hard line. */
.tender-match-plume {
	position: absolute;
	inset: 0;
	background-image: url( '../img/smoke-match.webp' );
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	pointer-events: none;
}

.tender-match-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	padding: 26px 22px 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	/* fades the ink out behind the lower content so type stays readable */
	background: linear-gradient( to bottom,
		rgba(243, 241, 245, 0) 42%,
		rgba(243, 241, 245, 0.82) 62%,
		#f3f1f5 78% );
}

.tender-match-title {
	margin: 0;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-shadow: 0 2px 16px rgba(30, 16, 48, 0.5);
}

.tender-match-portrait {
	position: relative;
	width: 132px;
	height: 132px;
	margin: 24px auto 0;
	flex: 0 0 auto;
}
.tender-match-photo {
	position: absolute;
	inset: 7px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	box-shadow: 0 10px 24px rgba(60, 45, 85, 0.3);
}
.tender-match-photo-empty { background: linear-gradient(160deg, #cfc9d6, #b7aec4); }
.tender-match-rings {
	position: absolute;
	inset: -5px;
	width: calc(100% + 10px);
	height: calc(100% + 10px);
	pointer-events: none;
}

.tender-match-name {
	margin: 14px 0 0;
	font-size: 19px;
	font-weight: 700;
}
.tender-match-age { font-weight: 400; color: #78708c; }

.tender-match-actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}
.tender-btn {
	display: block;
	width: 100%;
	padding: 14px 10px;
	border-radius: 26px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.12s ease, opacity 0.12s ease;
}
.tender-btn:active { transform: scale(0.98); }
.tender-btn[disabled] { opacity: 0.75; cursor: default; }
.tender-btn-primary {
	border: none;
	background: var(--tender-crimson, #eb1152);
	color: #fff;
	box-shadow: 0 8px 20px rgba(235, 17, 82, 0.3);
}
.tender-btn-ghost {
	border: 2px solid rgba(74, 60, 104, 0.5);
	background: transparent;
	color: #2b2142;
}
.tender-btn-danger {
	border: none;
	background: #c0392b;
	color: #fff;
	box-shadow: 0 8px 20px rgba(192, 57, 43, 0.3);
}

/* Mobile: the card is already full-screen, so just scale the contents up. */
@media ( max-width: 600px ) {
	.tender-match-inner { padding: 0 24px calc(28px + env(safe-area-inset-bottom, 0px)); }
	.tender-match-title { margin-top: 8vh; font-size: 30px; }
	.tender-match-portrait { width: 180px; height: 180px; margin-top: 6vh; }
	.tender-match-name { font-size: 23px; margin-top: 20px; }
	.tender-btn { padding: 17px 14px; font-size: 13px; }
}

@media ( prefers-reduced-motion: reduce ) {
	.tender-btn { transition: none; }
}

/* =========================================================================
   Combined [tender] view - tab bar
   ========================================================================= */
.tender-shell { max-width: 720px; margin: 0 auto; }

.tender-tabs {
	display: flex;
	gap: 4px;
	justify-content: center;
	margin: 0 auto 18px;
	border-bottom: 1px solid rgba(26, 26, 31, 0.1);
}
.tender-tab {
	appearance: none;
	border: none;
	background: none;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(26, 26, 31, 0.5);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s ease, border-color 0.15s ease;
	position: relative;
}
.tender-tab-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	margin-left: 5px;
	border-radius: 999px;
	background: var(--tender-crimson, #eb1152);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	vertical-align: 2px;
}
.tender-match-row-new {
	color: var(--tender-crimson, #eb1152);
	font-weight: 700;
}
.tender-tab:hover { color: var(--tender-ink, #1a1a1f); }
.tender-tab.is-active {
	color: var(--tender-crimson, #eb1152);
	border-bottom-color: var(--tender-crimson, #eb1152);
}
.tender-tab:focus-visible { outline: 2px solid var(--tender-crimson, #eb1152); outline-offset: 2px; }

/* iOS PWA install banner — fixed overlay, not in-flow */
.tender-ios-banner {
	position: fixed;
	top: 12px;
	left: 12px;
	width: calc(100vw - 24px);
	max-width: calc(100vw - 24px);
	z-index: 200;
	box-sizing: border-box;
	overflow: hidden;
	background: var(--tender-card-bg, #f7f6f8);
	border: 1px solid rgba(235, 17, 82, 0.25);
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 12px;
	color: rgba(26, 26, 31, 0.6);
	line-height: 1.5;
	box-shadow: 0 8px 24px rgba(30, 20, 40, 0.2);
}
.tender-ios-banner-text { flex: 1 1 auto; min-width: 0; }
.tender-ios-banner strong { color: var(--tender-ink, #1a1a1f); }

/* Landscape lock — covers the entire screen on mobile landscape.
   max-height: 500px ensures this only fires on phones in landscape,
   not on desktop monitors or tablets in landscape. */
@media (orientation: landscape) and (max-height: 500px) {
	.tender-landscape-block {
		display: flex !important;
	}
}
.tender-landscape-block {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: var(--tender-card-bg, #f7f6f8);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
	padding: 24px;
	font-size: 15px;
	color: var(--tender-ink, #1a1a1f);
}
.tender-landscape-block-icon {
	font-size: 48px;
	display: inline-block;
	transform: rotate(90deg);
}

.tender-ios-banner-close {
	flex-shrink: 0;
	width: 28px !important;
	min-width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: rgba(26, 26, 31, 0.1) !important;
	font-size: 14px !important;
	line-height: 28px !important;
	text-align: center;
	cursor: pointer;
	color: var(--tender-ink, #1a1a1f) !important;
}

/* Settings toggles section */
.tender-settings-toggles {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(26, 26, 31, 0.1);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Toggle switch — pill track with sliding circle thumb */
.tender-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}
.tender-toggle input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tender-toggle-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--tender-ink, #1a1a1f);
}
.tender-toggle-track {
	position: relative;
	display: block !important;
	width: 44px !important;
	height: 26px !important;
	min-width: 44px;
	flex-shrink: 0;
	border-radius: 13px !important;
	background: #ccc !important;
	transition: background 0.2s ease;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}
.tender-toggle-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50% !important;
	background: #fff !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block !important;
}
.tender-toggle-track.is-on {
	background: var(--tender-crimson, #eb1152) !important;
}
.tender-toggle-track.is-on .tender-toggle-thumb {
	transform: translateX(18px);
}
.tender-toggle input:disabled + .tender-toggle-track {
	opacity: 0.5;
}

.tender-panel { display: none; }
.tender-panel.is-active { display: block; }

/* On mobile the swipe card goes full-screen, so the tab bar floats above it */
@media ( max-width: 600px ) {
	.tender-shell .tender-tabs {
		position: fixed;
		bottom: 0; left: 0; right: 0;
		z-index: 10;
		margin: 0;
		background: rgba(247, 246, 248, 0.96);
		border-top: 1px solid rgba(26, 26, 31, 0.1);
		border-bottom: none;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.tender-shell .tender-tab { flex: 1; padding: 14px 8px; margin-bottom: 0; border-bottom: none; border-top: 2px solid transparent; }
	.tender-shell .tender-tab.is-active { border-top-color: var(--tender-crimson, #eb1152); border-bottom-color: transparent; }
	/* keep the Like button clear of the tab bar */
	.tender-shell .tender-like { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Profile: character picker + sheet portrait ---- */
.tender-character-picker { margin-bottom: 18px; }
.tender-character-picker label {
	display: flex; align-items: center; gap: 10px;
	font-size: 13px; font-weight: 600;
}
.tender-character-picker select {
	padding: 7px 10px; border: 1px solid rgba(26,26,31,0.2);
	border-radius: 4px; font-size: 13px; background: #fff;
}

.tender-profile-portrait {
	display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
	font-size: 12px; color: rgba(26,26,31,0.6);
}
.tender-profile-portrait img,
.tender-photo-placeholder {
	width: 72px; height: 72px; object-fit: cover; border-radius: 6px;
	box-shadow: 0 4px 14px rgba(30,20,40,0.18);
	flex-shrink: 0;
}
.tender-photo-placeholder {
	display: block;
	background: linear-gradient(160deg, #cfc9d6, #b7aec4);
}
.tender-photo-controls { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tender-btn-sm { padding: 8px 14px; font-size: 12px; }

/* ---- Photo crop modal ---- */
.tender-crop-overlay {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(20, 14, 26, 0.72);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.tender-crop-box {
	background: var(--tender-card-bg, #f7f6f8);
	border-radius: 14px;
	padding: 20px;
	width: min(320px, 100%);
	box-shadow: 0 24px 60px rgba(20, 14, 26, 0.4);
}
.tender-crop-title { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--tender-ink, #1a1a1f); }
.tender-crop-viewport {
	position: relative;
	width: 280px; height: 280px;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 10px;
	background: #000;
	touch-action: none;
	cursor: grab;
}
.tender-crop-viewport:active { cursor: grabbing; }
.tender-crop-img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.tender-crop-zoom { width: 100%; margin: 14px 0; }
.tender-crop-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* =========================================================================
   "You" tab - card flow (profile builder + one question per card)
   ========================================================================= */
.tender-you-card,
.tender-you-card * { box-sizing: border-box; }

.tender-you-card {
	background: var(--tender-card-bg, #f7f6f8);
	overflow-y: auto;
}
.tender-you-body {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 26px 22px 22px;
}

.tender-you-progress {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(26, 26, 31, 0.4);
}
.tender-you-title {
	margin: 0 0 18px;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.3;
}
.tender-you-name { margin: 0 0 18px; font-size: 17px; font-weight: 600; }
.tender-you-note { margin: 10px 0 0; font-size: 12px; color: var(--tender-crimson, #eb1152); }

.tender-field { display: block; margin-bottom: 16px; }
.tender-field > span {
	display: block; margin-bottom: 6px;
	font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
	text-transform: uppercase; color: rgba(26, 26, 31, 0.55);
}
.tender-field select,
.tender-field input[type="text"],
.tender-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(26, 26, 31, 0.18);
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	font-family: inherit;
}
.tender-field textarea { resize: vertical; }

/* answer options - tap one to advance */
.tender-you-options { display: flex; flex-direction: column; gap: 10px; }
.tender-option {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid rgba(26, 26, 31, 0.15);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.tender-option:hover { border-color: var(--tender-crimson, #eb1152); }
.tender-option:active { transform: scale(0.995); }
.tender-option.is-selected {
	border-color: var(--tender-crimson, #eb1152);
	background: rgba(235, 17, 82, 0.06);
}
.tender-option:focus-visible { outline: 2px solid var(--tender-crimson, #eb1152); outline-offset: 2px; }

.tender-you-actions {
	margin-top: auto;
	padding-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

@media ( max-width: 600px ) {
	.tender-you-body { padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px)); }
	.tender-you-title { font-size: 22px; }
}

/* =========================================================================
   Theme isolation
   -------------------------------------------------------------------------
   WordPress themes style bare <button>, <select> and <input> elements, often
   with high specificity or gradients, which bleeds into Tender's UI (blue
   fills, forced uppercase, washed-out label colours). Everything below is
   scoped to .tender-app and neutralises the properties themes most commonly
   set. `!important` is deliberate here: we can't out-specify an unknown
   theme, and these rules only ever touch Tender's own markup.
   ========================================================================= */
.tender-app button,
.tender-app select,
.tender-app input,
.tender-app textarea {
	-webkit-appearance: none;
	appearance: none;
	background-image: none !important;
	text-shadow: none !important;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	line-height: 1.35;
	min-height: 0;
	width: auto;
	max-width: none;
	margin: 0;
}

/* answer options in the You survey */
.tender-app .tender-option {
	background-color: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	border: 1px solid rgba(26, 26, 31, 0.15) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	text-align: left !important;
	padding: 14px 16px !important;
	width: 100% !important;
}
.tender-app .tender-option:hover,
.tender-app .tender-option:focus {
	border-color: var(--tender-crimson, #eb1152) !important;
	background-color: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
}
.tender-app .tender-option.is-selected {
	border-color: var(--tender-crimson, #eb1152) !important;
	background-color: rgba(235, 17, 82, 0.06) !important;
}

/* pill buttons - these ARE meant to be uppercase */
.tender-app .tender-btn {
	text-transform: uppercase !important;
	letter-spacing: 0.1em !important;
	width: 100% !important;
	border-radius: 26px !important;
}
.tender-app .tender-btn-primary,
.tender-app .tender-btn-primary:hover,
.tender-app .tender-btn-primary:focus {
	background-color: var(--tender-crimson, #eb1152) !important;
	color: #fff !important;
	border: none !important;
}
.tender-app .tender-btn-ghost,
.tender-app .tender-btn-ghost:hover,
.tender-app .tender-btn-ghost:focus {
	background-color: transparent !important;
	color: #2b2142 !important;
	border: 2px solid rgba(74, 60, 104, 0.5) !important;
}

/* card response buttons (agree / disagree) */
.tender-app .tender-response {
	background-color: rgba(255, 255, 255, 0.82) !important;
	color: rgba(26, 26, 31, 0.75) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	border-radius: 4px !important;
}
.tender-app .tender-response.is-selected {
	color: #fff !important;
}
.tender-app .tender-response-agree.is-selected {
	background-color: var(--tender-crimson, #eb1152) !important;
}
.tender-app .tender-response-disagree.is-selected {
	background-color: var(--tender-ink, #1a1a1f) !important;
}

/* nav arrows, heart, detail link and tabs
   NOTE: the blanket `width: auto` above would otherwise shrink these to the
   width of their glyph, turning the circles into tall ovals - so their size
   has to be restated explicitly here. */
.tender-app .tender-nav {
	background-color: rgba(255, 255, 255, 0.82) !important;
	color: var(--tender-ink, #1a1a1f) !important;
	border-radius: 50% !important;
	padding: 0 !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	flex: 0 0 auto !important;
	aspect-ratio: 1 / 1;
}
.tender-app .tender-like {
	background-color: var(--tender-crimson, #eb1152) !important;
	border-radius: 50% !important;
	padding: 0 !important;
	width: 54px !important;
	height: 54px !important;
	min-width: 54px !important;
	flex: 0 0 auto !important;
	aspect-ratio: 1 / 1;
}
@media ( max-width: 600px ) {
	.tender-app .tender-nav {
		width: 44px !important;
		height: 44px !important;
		min-width: 44px !important;
	}
}
.tender-app .tender-detail-toggle {
	background-color: transparent !important;
	color: var(--tender-crimson, #eb1152) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	padding: 4px 0 !important;
	width: auto !important;
	border: none !important;
}
.tender-shell .tender-tab {
	background-color: transparent !important;
	border-radius: 0 !important;
	width: auto !important;
	box-shadow: none !important;
}

/* form fields */
.tender-app .tender-field select,
.tender-app .tender-field input[type="text"],
.tender-app .tender-field textarea {
	background-color: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	width: 100% !important;
	border: 1px solid rgba(26, 26, 31, 0.18) !important;
	border-radius: 6px !important;
}

/* empty deck state */
.tender-card-empty p { margin: 0 0 8px; }
.tender-card-empty .tender-muted { font-size: 13px; margin-bottom: 20px; }
.tender-card-empty .tender-btn { max-width: 260px; margin: 0 auto; }

/* =========================================================================
   Mobile: keep card content clear of the fixed bottom tab bar
   -------------------------------------------------------------------------
   In the combined [tender] view the tabs are pinned to the bottom of the
   screen, so anything anchored to the bottom of a card (match actions, the
   survey's Back button, the empty-deck prompt) has to sit above them.
   ========================================================================= */
@media ( max-width: 600px ) {
	.tender-shell .tender-match-inner,
	.tender-shell .tender-you-body,
	.tender-shell .tender-card-body {
		padding-bottom: calc( 120px + env( safe-area-inset-bottom, 0px ) ) !important;
	}
	.tender-shell .tender-card-empty {
		padding-bottom: calc( 120px + env( safe-area-inset-bottom, 0px ) );
	}
}

/* Short phones (SE-sized): the match layout needs to be more compact or the
   actions get pushed off the bottom entirely. */
@media ( max-width: 600px ) and ( max-height: 740px ) {
	.tender-match-title { margin-top: 4vh; font-size: 25px; }
	.tender-match-portrait { width: 136px; height: 136px; margin-top: 3vh; }
	.tender-match-name { font-size: 20px; margin-top: 14px; }
	.tender-match-plume { height: 52%; }
	.tender-btn { padding: 14px 12px; }
}

/* =========================================================================
   Matches tab - list card, and a profile view inside the same card
   ========================================================================= */
.tender-matches-card,
.tender-matches-card * { box-sizing: border-box; }

.tender-matches-card { background: var(--tender-card-bg, #f7f6f8); overflow-y: auto; }
.tender-matches-body { padding: 26px 22px 22px; }

.tender-match-list { list-style: none; margin: 0; padding: 0; }
.tender-match-list li { margin: 0 0 10px; }

.tender-app .tender-match-row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100% !important;
	padding: 10px !important;
	border: 1px solid rgba(26, 26, 31, 0.12) !important;
	border-radius: 10px !important;
	background-color: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	transition: border-color 0.12s ease;
}
.tender-app .tender-match-row:hover { border-color: var(--tender-crimson, #eb1152) !important; }

.tender-match-thumb {
	width: 56px;
	height: 56px;
	min-width: 56px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	flex: 0 0 auto;
}
.tender-match-thumb-empty { background: linear-gradient(160deg, #cfc9d6, #b7aec4); }

/* ST mode: dual avatar — two overlapping circles showing both sides */
.tender-st-dual-avatar {
	position: relative;
	width: 70px;
	min-width: 70px;
	height: 44px;
	flex: 0 0 auto;
}
.tender-st-thumb {
	position: absolute;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	border: 2px solid var(--tender-card-bg, #f7f6f8);
}
.tender-st-thumb:first-child { left: 0; z-index: 1; }
.tender-st-thumb:last-child  { left: 26px; z-index: 2; }
.tender-st-thumb-empty { background: linear-gradient(160deg, #cfc9d6, #b7aec4); }

.tender-match-row-text { display: flex; flex-direction: column; gap: 2px; }
.tender-match-row-name { font-size: 16px; font-weight: 600; }
.tender-match-row-note {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tender-crimson, #eb1152);
}

/* profile view: reuses the swipe card look, minus arrows and heart */
.tender-matches-card.is-profile { overflow: hidden; }
/* The base .tender-card-photo (square, pinned to the top) is already
   correct as-is - .tender-card-body just needs to scroll over it. The
   fade lives inside the scrollable content (as a normal block, not a
   container background), so scrolling moves the fade together with
   the text above it - more photo shows as you scroll up, more gets
   covered as you scroll down. Once scrolled past the photo's own
   (square) height there's nothing behind it, which is fine - the
   content's own solid background matches the card background exactly. */
.tender-matches-card.is-profile .tender-card-body {
	position: absolute;
	inset: 0;
	margin-top: 0;
	padding: 0;
	overflow-y: auto;
	background: transparent;
}
.tender-matches-card.is-profile .tender-card-fade {
	height: 300px;
	background: linear-gradient( to bottom,
		rgba(247, 246, 248, 0) 0%,
		var(--tender-card-bg, #f7f6f8) 100% );
}
.tender-matches-card.is-profile .tender-card-content {
	background: var(--tender-card-bg, #f7f6f8);
	padding: 0 20px 20px;
}
.tender-matches-card.is-profile h4 {
	margin: 14px 0 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(26, 26, 31, 0.6);
}
.tender-matches-card.is-profile p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }

.tender-app .tender-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background-color: rgba(255, 255, 255, 0.9) !important;
	color: var(--tender-ink, #1a1a1f) !important;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(30, 20, 40, 0.2);
	aspect-ratio: 1 / 1;
}
.tender-app .tender-close:hover { background-color: #fff !important; }

@media ( max-width: 600px ) {
	.tender-shell .tender-matches-body { padding-bottom: calc( 120px + env( safe-area-inset-bottom, 0px ) ); }
	.tender-shell .tender-matches-card.is-profile .tender-card-content {
		padding-bottom: calc( 84px + env( safe-area-inset-bottom, 0px ) );
	}
}

/* empty deck offers two ways forward, so give them room */
.tender-card-empty .tender-btn + .tender-btn { margin-top: 10px; }

/* =========================================================================
   Chat messages inside match detail
   ========================================================================= */

/* Chat screen — full-card layout with topbar, messages, and input */
.tender-chat-screen {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}
.tender-chat-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(26, 26, 31, 0.08);
	flex-shrink: 0;
}
.tender-chat-back,
.tender-chat-menu {
	appearance: none;
	border: none !important;
	background: none !important;
	padding: 4px 8px !important;
	font-size: 20px;
	cursor: pointer;
	color: var(--tender-ink, #1a1a1f);
	min-width: 0 !important;
	line-height: 1;
}
.tender-chat-header {
	appearance: none;
	border: none !important;
	background: none !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	cursor: pointer;
	text-align: left;
}
.tender-chat-header-photo {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}
.tender-chat-header-photo-empty {
	background: linear-gradient(160deg, #cfc9d6, #b7aec4);
}
.tender-chat-header-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--tender-ink, #1a1a1f);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tender-chat-header-link {
	appearance: none;
	border: none !important;
	background: none !important;
	padding: 2px 0 !important;
	font-size: 14px;
	font-weight: 600;
	color: var(--tender-crimson, #eb1152) !important;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	text-decoration: underline;
	text-decoration-color: rgba(235, 17, 82, 0.3);
}
.tender-chat-header-sep {
	flex-shrink: 0;
	font-size: 13px;
	color: rgba(26, 26, 31, 0.4);
	padding: 0 2px;
}

.tender-chat-section { margin-top: 16px; }
.tender-chat-section h4 { margin: 0 0 8px; }

.tender-chat-messages {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 8px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tender-chat-bubble {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
	align-self: flex-start;
	background: rgba(26, 26, 31, 0.08);
	color: var(--tender-ink, #1a1a1f);
}
.tender-chat-bubble.is-own {
	align-self: flex-end;
	background: var(--tender-crimson, #eb1152);
	color: #fff;
}
.tender-chat-bubble p { margin: 0; }
.tender-chat-sender {
	display: block;
	font-size: 11px;
	font-weight: 600;
	margin-bottom: 2px;
	color: rgba(26, 26, 31, 0.5);
}
.tender-chat-time {
	display: block;
	font-size: 10px;
	margin-top: 4px;
	opacity: 0.5;
	text-align: right;
}
.tender-chat-bubble.is-own .tender-chat-time { color: rgba(255,255,255,0.7); }

.tender-chat-input {
	display: flex;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid rgba(26, 26, 31, 0.08);
	align-items: flex-end;
	flex-shrink: 0;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

/* On mobile the tab bar is fixed at the bottom — push the chat input above it */
@media (max-width: 600px) {
	.tender-shell .tender-chat-input {
		padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
	}
}
.tender-chat-input textarea {
	flex: 1 1 auto;
	min-width: 0;
	resize: none;
	padding: 10px 14px !important;
	border-radius: 20px !important;
	border: 1px solid rgba(26, 26, 31, 0.15) !important;
	font-size: 14px !important;
	font-family: inherit !important;
	line-height: 1.4 !important;
	background: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	min-height: 40px;
	max-height: 100px;
	width: auto !important;
}
.tender-chat-input textarea:focus {
	outline: none !important;
	border-color: var(--tender-crimson, #eb1152) !important;
}
.tender-chat-send.tender-chat-send {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	font-size: 0 !important;
	letter-spacing: 0 !important;
}
.tender-chat-send.tender-chat-send::after {
	content: '\25B6';
	font-size: 14px;
	color: #fff;
}

/* =========================================================================
   Login screen — uses standard .tender-card inside .tender-shell,
   so mobile full-viewport behavior is inherited automatically.
   ========================================================================= */
.tender-login-card { text-align: center; }
.tender-login-header { margin-bottom: 24px; text-align: center; }
.tender-login-icon {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	margin-bottom: 12px;
}
.tender-login-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--tender-ink, #1a1a1f);
	margin: 0 0 4px;
}
.tender-login-subtitle {
	font-size: 14px;
	color: rgba(26, 26, 31, 0.5);
	margin: 0;
}
.tender-login-form { text-align: left; }
.tender-login-form label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(26, 26, 31, 0.6);
	margin-bottom: 6px;
	margin-top: 14px;
}
.tender-login-form input[type="text"],
.tender-login-form input[type="password"] {
	display: block !important;
	width: 100% !important;
	padding: 12px 14px !important;
	border: 1px solid rgba(26, 26, 31, 0.15) !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	background: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	box-sizing: border-box !important;
}
.tender-login-form input[type="text"]:focus,
.tender-login-form input[type="password"]:focus {
	outline: none !important;
	border-color: var(--tender-crimson, #eb1152) !important;
}
.tender-login-form .login-remember {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 14px 0;
	font-size: 13px;
	color: rgba(26, 26, 31, 0.6);
}
.tender-login-form .login-remember label {
	display: inline;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
	font-size: 13px;
}
.tender-login-form input[type="submit"] {
	display: block !important;
	width: 100% !important;
	padding: 14px 10px !important;
	border: none !important;
	border-radius: 26px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	background: var(--tender-crimson, #eb1152) !important;
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(235, 17, 82, 0.3) !important;
	margin-top: 8px;
}
.tender-login-form input[type="submit"]:hover {
	opacity: 0.9;
}
.tender-login-register {
	margin: 18px 0 0;
	font-size: 13px;
	color: rgba(26, 26, 31, 0.5);
}
.tender-login-register a {
	color: var(--tender-crimson, #eb1152);
	text-decoration: none;
	font-weight: 600;
}

/* =========================================================================
   Sign up - billing screen and result
   ========================================================================= */
.tender-billing-card {
	margin: 16px 0;
	padding: 16px;
	border-radius: 10px;
	background: linear-gradient( 135deg, #2b2142, #4a3168 );
	color: #fff;
	box-shadow: 0 10px 26px rgba(43, 33, 66, 0.28);
}
.tender-billing-row { margin-bottom: 12px; }
.tender-billing-row:last-child { margin-bottom: 0; }
.tender-billing-row span {
	display: block;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.6;
	margin-bottom: 2px;
}
.tender-billing-row strong { font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.tender-billing-split { display: flex; gap: 24px; }

.tender-signup-result { text-align: center; align-items: center; }
.tender-signup-mark {
	width: 64px;
	height: 64px;
	margin: 10px auto 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	line-height: 1;
	color: #fff;
}
.is-approved .tender-signup-mark { background: #2e9e5b; }
.is-declined .tender-signup-mark { background: #b32d2e; }
.tender-signup-result .tender-you-title { margin-bottom: 8px; }
.tender-signup-result .tender-muted { max-width: 300px; margin: 0 auto; font-size: 13px; }
.tender-signup-result .tender-you-actions { width: 100%; }

.tender-app .tender-field input[type="date"] {
	background-color: #fff !important;
	color: var(--tender-ink, #1a1a1f) !important;
	width: 100% !important;
	border: 1px solid rgba(26, 26, 31, 0.18) !important;
	border-radius: 6px !important;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
}

/* =========================================================================
   Ad cards
   ========================================================================= */
.tender-card.is-ad { background: #11111a; }
.tender-card.is-ad .tender-like { display: none; }

.tender-ad-link { display: block; width: 100%; height: 100%; }
.tender-ad-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tender-ad-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	padding: 4px 9px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.55);
	color: rgba(255, 255, 255, 0.85);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tender-card.is-ad .tender-card-body {
	background: linear-gradient( to top, rgba(17, 17, 26, 0.92) 40%, rgba(17, 17, 26, 0) 100% );
	padding-bottom: 22px;
}
.tender-ad-label { margin: 0; color: #fff; font-size: 14px; font-weight: 600; }
