/* Bherria Match — visual language of bherria.eus (claves cards):
   white cards, thin pink border with a magenta top rule, Raleway light titles in magenta,
   slate-blue text and outlined uppercase buttons. Everything is scoped to .bm-root. */

.bm-root {
	--bm-magenta: #E5007E;
	--bm-magenta-dark: #A3005A;   /* magenta for small text on white (AA) */
	--bm-magenta-soft: #FDEEF5;
	--bm-pink-line: #F6CFE1;      /* card borders and dividers */
	--bm-navy: #33537E;
	--bm-ink: #2E4A70;            /* body text */
	--bm-muted: #566B8A;
	--bm-line: #D5DDE8;
	--bm-chip: #EDF1F7;
	--bm-bg: #FFFFFF;
	--bm-radius: 6px;
	font-family: Raleway, "Raleway", sans-serif;
	color: var(--bm-ink);
	background: var(--bm-bg);
	border: 1px solid var(--bm-pink-line);
	border-top: 4px solid var(--bm-magenta);
	border-radius: var(--bm-radius);
	box-shadow: 0 1px 4px rgba(51, 83, 126, .06);
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	min-height: 560px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	line-height: 1.5;
	overflow: hidden;
}
.bm-root *, .bm-root *::before, .bm-root *::after { box-sizing: border-box; }
.bm-root button, .bm-root input, .bm-root textarea { font-family: inherit; }
.bm-root p { margin: 0; }
.bm-root h1, .bm-root h2 { margin: 0; font-family: inherit; }
.bm-root img { max-width: 100%; }

.bm-screen { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 24px 20px; min-height: 0; }
.bm-spacer { flex: 1; }
.bm-stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Type ---------- */
.bm-kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bm-navy); }
.bm-kicker--magenta { color: var(--bm-magenta-dark); }
.bm-h1 {
	font-size: 28px; font-weight: 300; line-height: 1.25; color: var(--bm-magenta);
	padding-bottom: 10px; border-bottom: 1px solid var(--bm-pink-line);
}
.bm-legend, .bm-field label { font-size: 16px; font-weight: 600; color: var(--bm-navy); }
.bm-hint { font-weight: 400; color: var(--bm-muted); }
.bm-muted { color: var(--bm-muted); font-size: 15px; line-height: 1.55; }
.bm-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bm-navy); }
.bm-text { font-size: 17px; line-height: 1.5; color: var(--bm-ink); }
.bm-text--sm { font-size: 15px; }
.bm-text--sm .bm-label { font-size: 11px; }

/* ---------- Buttons (outlined, uppercase, like "Accede a toda la información") ---------- */
.bm-btn {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	width: 100%; min-height: 46px; padding: 8px 18px; cursor: pointer; text-decoration: none;
	border: 1px solid var(--bm-magenta); border-radius: 2px; background: #fff; color: var(--bm-magenta-dark);
	font-size: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bm-btn:hover { background: var(--bm-magenta); color: #fff; }
.bm-btn[disabled] { opacity: .6; cursor: wait; }
.bm-btn--magenta { background: var(--bm-magenta); color: #fff; }
.bm-btn--magenta:hover { background: var(--bm-magenta-dark); border-color: var(--bm-magenta-dark); }
.bm-btn--navy { background: var(--bm-navy); border-color: var(--bm-navy); color: #fff; }
.bm-btn--navy:hover { background: #24406A; border-color: #24406A; }
.bm-btn--outline { background: #fff; color: var(--bm-magenta-dark); }
.bm-btn--white { background: #fff; border-color: #fff; color: var(--bm-magenta-dark); }
.bm-btn--white:hover { background: var(--bm-magenta-soft); color: var(--bm-magenta-dark); }
.bm-btn--ghost { background: transparent; border-color: #fff; color: #fff; }
.bm-btn--ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.bm-btn--link, .bm-btn--danger {
	border-color: transparent; background: transparent; min-height: 44px;
	text-transform: none; letter-spacing: 0; font-size: 15px; text-decoration: underline;
}
.bm-btn--link { color: var(--bm-navy); }
.bm-btn--danger { color: #B42318; }
.bm-btn--link:hover, .bm-btn--danger:hover { background: transparent; color: var(--bm-magenta-dark); }
.bm-match .bm-btn--link { color: #fff; }
.bm-btn--sm { min-height: 40px; font-size: 13px; padding: 6px 14px; }
.bm-btn:focus-visible, .bm-round:focus-visible, .bm-fbtn:focus-visible, .bm-fpill:focus-visible, .bm-tab:focus-visible,
.bm-chip input:focus-visible + span, .bm-file:focus-within { outline: 3px solid var(--bm-magenta); outline-offset: 2px; }

/* ---------- Login ---------- */
.bm-login { gap: 18px; padding: 32px 22px 28px; }
.bm-title-light { font-size: 44px; font-weight: 300; line-height: 1.05; color: var(--bm-magenta); }
.bm-title-bold { font-size: 44px; font-weight: 700; line-height: 1.05; color: var(--bm-navy); }
.bm-title-bold span { color: var(--bm-navy); }
.bm-lead { font-size: 20px; font-weight: 400; line-height: 1.45; color: var(--bm-ink); }
.bm-small { font-size: 16px; line-height: 1.5; color: var(--bm-muted); }
.bm-proof { font-size: 15px; line-height: 1.5; color: var(--bm-navy); padding: 10px 14px; background: var(--bm-magenta-soft); border-radius: 2px; }
.bm-proof:empty { display: none; }
.bm-proof strong { font-weight: 800; color: var(--bm-magenta-dark); }
.bm-login label { font-size: 15px; font-weight: 600; color: var(--bm-navy); }
.bm-login input[type=email] {
	width: 100%; height: 50px; border-radius: 2px; border: 1px solid var(--bm-line);
	padding: 0 14px; font-size: 16px; color: var(--bm-ink); background: #fff;
}
.bm-login input[type=email]:focus { outline: none; border-color: var(--bm-magenta); box-shadow: 0 0 0 3px var(--bm-magenta-soft); }
.bm-note { font-size: 13px; color: var(--bm-muted); text-align: center; }
.bm-sent { background: var(--bm-magenta-soft); border-left: 3px solid var(--bm-magenta); padding: 14px 16px; font-size: 16px; line-height: 1.5; color: var(--bm-ink); }
.bm-login .bm-btn--ghost { border-color: var(--bm-magenta); color: var(--bm-magenta-dark); }

/* ---------- Forms ---------- */
.bm-stack--form { gap: 18px; }
.bm-field { display: flex; flex-direction: column; gap: 6px; }
.bm-field input, .bm-field textarea, .bm-addarea input {
	width: 100%; border-radius: 2px; border: 1px solid var(--bm-line); background: #fff;
	padding: 11px 14px; font-size: 16px; color: var(--bm-ink);
}
.bm-field textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.bm-field input:focus, .bm-field textarea:focus, .bm-addarea input:focus {
	outline: none; border-color: var(--bm-magenta); box-shadow: 0 0 0 3px var(--bm-magenta-soft);
}
fieldset.bm-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-chip { position: relative; }
.bm-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bm-chip span {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; cursor: pointer;
	border: 1px solid var(--bm-line); border-radius: 19px; background: #fff;
	color: var(--bm-navy); font-size: 14px; font-weight: 500;
}
.bm-chip span:hover { border-color: var(--bm-magenta); }
.bm-chip input:checked + span { background: var(--bm-magenta); border-color: var(--bm-magenta); color: #fff; font-weight: 700; }
.bm-chips--attr .bm-chip input:checked + span { background: var(--bm-navy); border-color: var(--bm-navy); }
.bm-addarea { display: flex; gap: 8px; }
.bm-addarea input { flex: 1; min-width: 0; border-style: dashed; border-color: var(--bm-magenta); }
.bm-addarea .bm-btn { width: auto; flex-shrink: 0; }
.bm-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--bm-muted); }
.bm-consent input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--bm-magenta); }
.bm-consent a { color: var(--bm-navy); }
.bm-error { background: #FDECEC; border-left: 3px solid #B42318; color: #8A1C1C; padding: 10px 12px; font-size: 14px; font-weight: 600; }

/* Photo */
.bm-photo { display: flex; gap: 16px; align-items: center; }
.bm-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bm-photo-actions .bm-btn { width: auto; }
.bm-photo-actions .bm-hint { font-size: 13px; }
.bm-file { position: relative; cursor: pointer; }

/* ---------- Avatars ---------- */
.bm-avatar {
	width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
	background: var(--bm-navy); color: #fff; font-size: 22px; font-weight: 600;
}
.bm-avatar--img { display: block; object-fit: cover; background: var(--bm-chip); }
.bm-avatar--sm { width: 52px; height: 52px; font-size: 18px; }
.bm-avatar--lg { width: 88px; height: 88px; font-size: 30px; }

/* ---------- Discover ---------- */
.bm-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bm-brand { font-size: 24px; font-weight: 300; color: var(--bm-magenta); }
.bm-brand span { font-weight: 700; color: var(--bm-navy); }
.bm-count { font-size: 14px; font-weight: 600; color: var(--bm-muted); white-space: nowrap; }

.bm-deck { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.bm-card {
	position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; min-height: 420px;
	background: #fff; border: 1px solid var(--bm-pink-line); border-top: 4px solid var(--bm-magenta); border-radius: var(--bm-radius);
	box-shadow: 0 6px 22px rgba(51, 83, 126, .12);
	touch-action: pan-y; user-select: none; overflow: hidden; transition: transform .25s ease, opacity .25s ease;
}
.bm-card.is-dragging { transition: none; cursor: grabbing; }
.bm-card--back { position: absolute; inset: 0; z-index: 0; min-height: 0; transform: scale(.95) translateY(12px); opacity: .55; pointer-events: none; box-shadow: none; }
.bm-person { display: flex; gap: 14px; align-items: center; }
.bm-name { font-size: 24px; font-weight: 300; line-height: 1.2; color: var(--bm-magenta); }
.bm-role { font-size: 15px; font-weight: 500; color: var(--bm-ink); line-height: 1.35; }
.bm-place { font-size: 13px; font-weight: 600; color: var(--bm-muted); }
.bm-badge {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 2px;
	background: var(--bm-navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.bm-affinity { padding-bottom: 12px; border-bottom: 1px solid var(--bm-pink-line); color: var(--bm-magenta-dark); font-size: 14px; font-weight: 700; }
.bm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-tag { padding: 5px 11px; border-radius: 14px; background: var(--bm-chip); color: var(--bm-navy); font-size: 13px; font-weight: 600; }
.bm-tag--area { background: #fff; color: var(--bm-magenta-dark); border: 1px solid var(--bm-magenta); }
.bm-stamp {
	position: absolute; top: 24px; padding: 4px 12px; border: 3px solid; border-radius: 4px; background: #fff;
	font-size: 18px; font-weight: 800; text-transform: uppercase; opacity: 0; transform: rotate(-10deg); z-index: 2;
}
.bm-stamp--like { right: 18px; color: var(--bm-magenta-dark); }
.bm-stamp--pass { left: 18px; color: var(--bm-navy); transform: rotate(10deg); }
.bm-actions { display: flex; justify-content: center; gap: 56px; padding-top: 2px; }
.bm-action { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--bm-muted); }
.bm-action--like { color: var(--bm-magenta-dark); font-weight: 700; }
.bm-round {
	width: 66px; height: 66px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--bm-line); background: #fff; box-shadow: 0 2px 8px rgba(51, 83, 126, .1);
}
.bm-round:hover { border-color: var(--bm-navy); }
.bm-round--like { border: none; background: var(--bm-magenta); box-shadow: 0 6px 16px rgba(229, 0, 126, .3); }
.bm-round--like:hover { background: var(--bm-magenta-dark); }
.bm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px 8px; }
.bm-empty .bm-h1 { font-size: 24px; border-bottom: 0; padding-bottom: 0; }
.bm-empty p { color: var(--bm-muted); font-size: 16px; line-height: 1.55; max-width: 460px; }
.bm-empty .bm-stack { width: 100%; max-width: 360px; }

/* ---------- Match ---------- */
.bm-match { background: var(--bm-magenta); color: #fff; text-align: center; align-items: center; justify-content: center; gap: 20px; padding: 36px 24px; }
.bm-match .bm-kicker { color: #fff; }
.bm-match .bm-big { font-size: 42px; font-weight: 300; line-height: 1.1; }
.bm-pair { display: flex; }
.bm-pair .bm-avatar { width: 96px; height: 96px; font-size: 30px; border: 4px solid #fff; }
.bm-pair .bm-avatar + .bm-avatar { margin-left: -18px; background: #fff; color: var(--bm-navy); }
.bm-match p { font-size: 18px; line-height: 1.5; max-width: 480px; }
.bm-match .bm-meet { font-size: 16px; font-weight: 600; background: rgba(255, 255, 255, .16); border-radius: 2px; padding: 12px 14px; }
.bm-match .bm-stack { width: 100%; max-width: 380px; }

/* ---------- Matches list ---------- */
.bm-scroll { overflow-y: auto; }
.bm-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.bm-item {
	display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
	background: #fff; border: 1px solid var(--bm-pink-line); border-top: 4px solid var(--bm-magenta); border-radius: var(--bm-radius);
}
.bm-item .bm-name { font-size: 20px; }
.bm-row { display: flex; gap: 8px; margin-top: auto; }
.bm-row > * { flex: 1; }
.bm-invite { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--bm-pink-line); border-radius: var(--bm-radius); }

/* ---------- Tabs ---------- */
.bm-tabs { flex-shrink: 0; display: flex; justify-content: space-around; align-items: stretch; background: #fff; border-top: 1px solid var(--bm-pink-line); }
.bm-tab {
	flex: 1; min-height: 64px; border: 0; border-top: 3px solid transparent; background: transparent; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	color: var(--bm-muted); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.bm-tab[aria-current="page"] { color: var(--bm-magenta-dark); border-top-color: var(--bm-magenta); }

.bm-loading { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--bm-muted); font-weight: 600; padding: 40px; }
.bm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Toast (outside .bm-root) ---------- */
.bm-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 99999;
	max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 2px; border-left: 4px solid #E5007E;
	background: #1F2D44; color: #fff; font-family: Raleway, sans-serif; font-size: 15px; font-weight: 600;
	opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.bm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ================= Responsive ================= */

/* Phones: fill the width, keep the app at screen height */
@media (max-width: 599px) {
	.bm-root { min-height: 85svh; border-left: 0; border-right: 0; border-radius: 0; box-shadow: none; }
	.bm-title-light, .bm-title-bold { font-size: 40px; }
}

/* Very small phones */
@media (max-width: 360px) {
	.bm-screen { padding: 20px 14px; }
	.bm-actions { gap: 36px; }
	.bm-addarea { flex-direction: column; }
	.bm-addarea .bm-btn { width: 100%; }
}

/* Tablets and up */
@media (min-width: 600px) {
	.bm-screen { padding: 32px; gap: 24px; }
	.bm-login, .bm-profile > *, .bm-empty { max-width: 640px; width: 100%; margin-left: auto; margin-right: auto; }
	.bm-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
	.bm-btn:not(.bm-btn--sm) { width: auto; min-width: 220px; align-self: flex-start; }
	.bm-stack .bm-btn, .bm-row .bm-btn, .bm-addarea .bm-btn { align-self: stretch; }
	.bm-stack--form > button[type="submit"] { align-self: flex-start; }
	.bm-match .bm-stack .bm-btn { width: 100%; }
}

/* Desktop: tabs move to the top, profile fields in two columns, bigger card */
@media (min-width: 900px) {
	.bm-root { min-height: 640px; }
	.bm-tabs { order: -1; border-top: 0; border-bottom: 1px solid var(--bm-pink-line); justify-content: center; gap: 8px; }
	.bm-tab { flex: 0 0 auto; flex-direction: row; gap: 8px; min-height: 56px; padding: 0 22px; border-top: 0; border-bottom: 3px solid transparent; font-size: 13px; }
	.bm-tab[aria-current="page"] { border-bottom-color: var(--bm-magenta); }
	.bm-profile > * { max-width: 820px; }
	.bm-login { max-width: 720px; }
	.bm-stack--form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
	.bm-stack--form > * { grid-column: 1 / -1; }
	.bm-stack--form > .bm-field:has(> input) { grid-column: auto; }
	.bm-stack--form > .bm-field:has(#bm-name) { grid-column: 1 / -1; }
	.bm-text { font-size: 18px; }
	.bm-name { font-size: 28px; }
	.bm-match .bm-big { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
	.bm-card, .bm-btn, .bm-toast { transition: none; }
}

/* Shared interests (match screen and matches list) */
.bm-common { display: flex; flex-direction: column; gap: 8px; }
.bm-common--dark { align-items: center; width: 100%; max-width: 480px; }
.bm-common--dark .bm-label { color: #fff; }
.bm-common--dark .bm-tags { justify-content: center; }
.bm-common--dark .bm-tag { background: #fff; color: var(--bm-navy); }
.bm-common--dark .bm-tag--area { background: transparent; color: #fff; border-color: #fff; }
.bm-common-none { font-size: 14px; color: var(--bm-muted); font-style: italic; }
.bm-match .bm-common-none { color: #fff; font-size: 15px; }

/* ---------- Private conversation ---------- */
.bm-chat { gap: 12px; }
.bm-chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--bm-pink-line); }
.bm-back {
	width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
	display: flex; align-items: center; justify-content: center; color: var(--bm-navy);
}
.bm-back:hover { background: var(--bm-chip); }
.bm-back:focus-visible { outline: 3px solid var(--bm-magenta); outline-offset: 2px; }
.bm-chat-who { min-width: 0; }
.bm-chat-who .bm-name { font-size: 20px; }
.bm-chat-who .bm-role { font-size: 13px; }
.bm-chat-privacy { font-size: 12px; color: var(--bm-muted); }
.bm-msgs {
	flex: 1; min-height: 260px; max-height: 58vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
	padding: 12px; background: #FBFCFE; border: 1px solid var(--bm-line); border-radius: var(--bm-radius);
}
.bm-msg { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; }
.bm-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.bm-msg-body {
	padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--bm-line);
	color: var(--bm-ink); font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.bm-msg.is-mine .bm-msg-body { background: var(--bm-magenta); border-color: var(--bm-magenta); color: #fff; border-radius: 14px 14px 4px 14px; }
.bm-msg-time { font-size: 11px; color: var(--bm-muted); padding: 0 4px; }
.bm-chat-empty { margin: auto 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bm-chat-empty p { font-size: 14px; color: var(--bm-muted); }
.bm-starter {
	text-align: left; cursor: pointer; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--bm-magenta);
	background: var(--bm-magenta-soft); color: var(--bm-magenta-dark); font-size: 15px; line-height: 1.45;
}
.bm-starter:focus-visible { outline: 3px solid var(--bm-magenta); outline-offset: 2px; }
.bm-compose { display: flex; gap: 8px; align-items: flex-end; }
.bm-compose textarea {
	flex: 1; min-width: 0; min-height: 46px; max-height: 160px; resize: none; padding: 11px 14px; font-size: 16px; line-height: 1.4;
	border: 1px solid var(--bm-line); border-radius: 2px; color: var(--bm-ink); background: #fff;
}
.bm-compose textarea:focus { outline: none; border-color: var(--bm-magenta); box-shadow: 0 0 0 3px var(--bm-magenta-soft); }
.bm-compose .bm-btn { width: auto; min-width: 0; min-height: 46px; flex-shrink: 0; align-self: flex-end; }
.bm-dot {
	display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
	border-radius: 10px; background: var(--bm-magenta); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0;
}
.bm-btn--magenta .bm-dot { background: #fff; color: var(--bm-magenta-dark); }
.bm-preview { font-size: 14px; color: var(--bm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-preview.is-unread { color: var(--bm-ink); font-weight: 700; }
@media (min-width: 900px) {
	.bm-chat { max-width: 760px; width: 100%; margin: 0 auto; }
	.bm-msgs { max-height: 460px; }
}

/* ---------- Card: areas + the 10 Bherria attributes ---------- */
.bm-card .bm-label { margin-bottom: 6px; }
.bm-attrs { display: flex; flex-wrap: wrap; gap: 5px; }
.bm-attr {
	display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px;
	border: 1px solid var(--bm-line); color: #8193AB; font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap;
}
.bm-attr.is-on { background: var(--bm-navy); border-color: var(--bm-navy); color: #fff; font-weight: 700; }
.bm-attr svg { width: 11px; height: 11px; }
.bm-restart {
	font-size: 14px; color: var(--bm-navy); background: var(--bm-chip); border-left: 3px solid var(--bm-navy);
	padding: 8px 12px; max-width: 560px; width: 100%; margin: 0 auto;
}

@media (max-width: 599px) {
	.bm-card { padding: 18px 16px; gap: 12px; min-height: 0; }
	.bm-card .bm-avatar { width: 56px; height: 56px; font-size: 20px; }
	.bm-name { font-size: 22px; }
	.bm-text { font-size: 16px; }
	.bm-tag { font-size: 12px; padding: 4px 10px; }
	.bm-tags { gap: 5px; }
	.bm-actions { padding-bottom: env(safe-area-inset-bottom, 0); }
	.bm-round { width: 60px; height: 60px; }
}

/* ---------- Compact filter: one line + unfolding panel ---------- */
.bm-fbar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bm-fbtn {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; cursor: pointer;
	border: 1px solid var(--bm-line); border-radius: 18px; background: #fff; color: var(--bm-navy);
	font-family: inherit; font-size: 13px; font-weight: 700;
}
.bm-fbtn.is-active, .bm-fbtn[aria-expanded="true"] { border-color: var(--bm-magenta); color: var(--bm-magenta-dark); }
.bm-factive {
	flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
	-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.bm-factive::-webkit-scrollbar { display: none; }
.bm-fnone { font-size: 13px; color: var(--bm-muted); white-space: nowrap; padding-left: 2px; }
.bm-fpill {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 11px; cursor: pointer; white-space: nowrap;
	border: 1px solid var(--bm-line); border-radius: 16px; background: #fff; color: var(--bm-navy);
	font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.2;
}
.bm-fpill--area.is-on { background: var(--bm-magenta); border-color: var(--bm-magenta); color: #fff; font-weight: 700; }
.bm-fpill--tag.is-on { background: var(--bm-navy); border-color: var(--bm-navy); color: #fff; font-weight: 700; }
.bm-fpanel {
	display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-top: -6px;
	border: 1px solid var(--bm-pink-line); border-radius: var(--bm-radius); background: #FFFBFD;
}
.bm-fpills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.bm-fpanel .bm-fpill { white-space: normal; text-align: left; }
.bm-fpanel .bm-row { margin-top: 2px; }
.bm-badge--match { background: var(--bm-magenta); }
.bm-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* =====================================================================
   Refined look (v1.7): simpler and calmer.
   No frames or coloured bars, fewer lines, sentence-case buttons,
   one accent colour, more white space. Overrides the rules above.
   ===================================================================== */
.bm-root {
	border: 0; border-radius: 0; box-shadow: none; background: transparent; max-width: 760px; min-height: 0;
	--bm-soft: #F5F7FA;
}
.bm-screen { gap: 22px; padding: 8px 0 24px; }
@media (min-width: 600px) { .bm-screen { padding: 12px 0 32px; } }

/* Type: lighter, quieter */
.bm-kicker, .bm-label, .bm-badge, .bm-tab, .bm-btn { text-transform: none; letter-spacing: 0; }
.bm-label { font-size: 13px; font-weight: 600; color: var(--bm-muted); }
.bm-h1 { border-bottom: 0; padding-bottom: 0; font-size: 26px; }
.bm-brand { font-size: 20px; }
.bm-count { font-weight: 500; font-size: 13px; }

/* Buttons: rounded, sentence case, one filled style */
.bm-btn { border-radius: 999px; font-size: 15px; font-weight: 600; min-height: 48px; }
.bm-btn--sm { min-height: 40px; font-size: 14px; }
.bm-btn--outline { border-color: var(--bm-line); color: var(--bm-navy); }
.bm-btn--outline:hover { border-color: var(--bm-navy); background: var(--bm-soft); color: var(--bm-navy); }
.bm-btn--navy { background: var(--bm-navy); }

/* Inputs */
.bm-field input, .bm-field textarea, .bm-addarea input, .bm-login input[type=email], .bm-compose textarea {
	border-radius: 12px; border-color: var(--bm-line); background: #fff;
}
.bm-chip span, .bm-fpill, .bm-fbtn { border-radius: 999px; }

/* Login */
.bm-login { padding: 8px 0 24px; gap: 16px; }
.bm-title-light, .bm-title-bold { font-size: 38px; }
.bm-lead { font-size: 19px; }
.bm-proof { background: transparent; padding: 0; color: var(--bm-muted); }
.bm-proof strong { color: var(--bm-navy); }
.bm-sent { border-left: 0; border-radius: 12px; background: var(--bm-soft); }

/* Card: white, soft shadow, no bars or dividers */
.bm-card {
	border: 0; border-radius: 20px; box-shadow: 0 10px 30px rgba(31, 45, 68, .08), 0 1px 3px rgba(31, 45, 68, .06);
	padding: 24px 22px; gap: 16px;
}
.bm-card--back { box-shadow: none; background: var(--bm-soft); }
.bm-name { font-weight: 400; color: var(--bm-ink); }
.bm-role { color: var(--bm-muted); font-weight: 400; }
.bm-badge { background: var(--bm-soft); color: var(--bm-navy); border-radius: 999px; font-size: 12px; font-weight: 600; padding: 4px 10px; }
.bm-badge--match { background: var(--bm-magenta-soft); color: var(--bm-magenta-dark); }
.bm-affinity { border-bottom: 0; padding-bottom: 0; font-size: 14px; font-weight: 600; }
.bm-card .bm-label { margin-bottom: 4px; }
.bm-tag { background: var(--bm-soft); border-radius: 999px; font-weight: 500; }
.bm-tag--area { background: var(--bm-magenta-soft); border: 0; color: var(--bm-magenta-dark); }
.bm-attrs { gap: 4px 10px; }
.bm-attr { border: 0; padding: 0; color: #A3B0C2; font-size: 13px; }
.bm-attr.is-on { background: transparent; color: var(--bm-navy); font-weight: 600; }
.bm-attr.is-on svg { color: var(--bm-magenta); }
.bm-stamp { border-width: 2px; border-radius: 999px; font-size: 15px; padding: 4px 14px; }

/* Like / pass */
.bm-actions { gap: 48px; }
.bm-round { border: 0; box-shadow: 0 4px 14px rgba(31, 45, 68, .1); }
.bm-round--like { box-shadow: 0 6px 18px rgba(229, 0, 126, .28); }
.bm-action { font-weight: 500; }

/* Filter line */
.bm-fbtn { border-color: var(--bm-line); }
.bm-fpanel { border: 0; border-radius: 16px; background: var(--bm-soft); margin-top: -8px; }
.bm-fpill { border-color: transparent; background: #fff; }

/* Empty state, notices */
.bm-empty .bm-h1 { font-size: 22px; color: var(--bm-ink); }
.bm-restart { border-left: 0; border-radius: 12px; background: var(--bm-soft); color: var(--bm-muted); }
.bm-error { border-left: 0; border-radius: 12px; }

/* Matches, invite, chat */
.bm-item, .bm-invite { border: 0; border-radius: 18px; box-shadow: 0 6px 20px rgba(31, 45, 68, .07); }
.bm-chat-head { border-bottom: 0; padding-bottom: 0; }
.bm-msgs { border: 0; border-radius: 18px; background: var(--bm-soft); }
.bm-msg-body { border: 0; box-shadow: 0 1px 2px rgba(31, 45, 68, .06); }

/* Match screen: calmer magenta */
.bm-match { border-radius: 24px; margin: 8px 0; padding: 40px 24px; }
.bm-match .bm-big { font-size: 36px; }
.bm-match .bm-meet { border-radius: 12px; font-weight: 500; }

/* Tabs: thin, sentence case */
.bm-tabs { border-top: 1px solid #EEF1F5; }
.bm-tab { font-size: 12px; font-weight: 600; border-top-width: 2px; }
@media (min-width: 900px) {
	.bm-tabs { border-bottom: 1px solid #EEF1F5; }
	.bm-tab { border-bottom-width: 2px; font-size: 14px; }
}

/* Phones: let the app breathe edge to edge */
@media (max-width: 599px) {
	.bm-root { min-height: 0; }
	.bm-card { padding: 20px 18px; border-radius: 18px; }
	.bm-title-light, .bm-title-bold { font-size: 34px; }
}

/* The toast */
.bm-toast { border-left: 0; border-radius: 999px; padding: 12px 20px; }

/* Sign-in code */
.bm-code {
	width: 100%; height: 56px; border: 1px solid var(--bm-line); border-radius: 12px; background: #fff;
	text-align: center; font-family: inherit; font-size: 26px; font-weight: 600; letter-spacing: .4em; color: var(--bm-navy);
}
.bm-code:focus { outline: none; border-color: var(--bm-magenta); box-shadow: 0 0 0 3px var(--bm-magenta-soft); }
.bm-login label[for="bm-code"] { font-size: 15px; font-weight: 600; color: var(--bm-navy); }

/* Welcome screen figures, with icons */
.bm-proof { padding: 0; background: transparent; }
.bm-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.bm-stat { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--bm-muted); font-size: 15px; line-height: 1.3; }
.bm-stat-icon {
	flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	background: var(--bm-magenta-soft); color: var(--bm-magenta);
}
.bm-stat strong { color: var(--bm-navy); font-size: 18px; font-weight: 700; }
@media (max-width: 599px) {
	.bm-stats { flex-direction: column; gap: 10px; }
}
