/* RMS — application club et direct. Tokens et mesures repris du handoff. */

:root {
	--bg: #0A0B09;
	--card: #131511;
	--card-2: #1B1E18;
	--neutral: #1E201C;
	--neutral-2: #262A21;
	--lime: #B6F23A;
	--lime-hover: #C8FF55;
	--on-lime: #0E1406;
	--text: #F3F5EE;
	--text-2: #C9CFC1;
	--text-3: #A2A99B;
	--feed-text: #E6EADF;
	--red: #F0524A;
	--error: #FF8A83;
	--yellow: #F2D14B;
	--opponent-bg: #F1F3EC;
	--opponent-ink: #1D2B14;
	--line-1: rgba(255, 255, 255, 0.07);
	--line-2: rgba(255, 255, 255, 0.1);
	--line-3: rgba(255, 255, 255, 0.14);
	--r-pill: 999px;
	--r-xl: 30px;
	--r-lg: 26px;
	--r-md: 20px;
	--r-sm: 16px;
	--r-xs: 13px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Several components below set an explicit `display`, which would otherwise
   win over the user-agent rule for [hidden] and leave them on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Outfit', system-ui, -apple-system, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Halo derrière le haut de page. */
body::before {
	content: '';
	position: fixed;
	inset: 0 0 auto;
	height: 620px;
	background: radial-gradient(120% 100% at 50% 0%, #1F3011 0%, rgba(31, 48, 17, 0) 70%);
	pointer-events: none;
	z-index: 0;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* Le point de rupture suit la largeur du conteneur, pas celle de l'écran. */
.rms-root {
	position: relative;
	z-index: 1;
	container-type: inline-size;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
}

.rms-wrap {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding-inline: clamp(16px, 4cqw, 40px);
}

.rms-main { flex: 1; padding-bottom: 120px; }

@container (min-width: 760px) {
	.rms-main { padding-bottom: 60px; }
}

.rms-muted { color: var(--text-3); }
.rms-lime { color: var(--lime); }

.rms-sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */

.rms-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 18px clamp(16px, 4cqw, 40px);
}

.rms-head__brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.rms-head__logo {
	width: 54px;
	height: 54px;
	flex: none;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--lime);
	display: grid;
	place-items: center;
	overflow: hidden;
	padding: 4px;
}

.rms-head__logo img { width: 100%; height: 100%; object-fit: contain; }

.rms-head__hello { display: block; font-size: 14px; font-weight: 300; color: var(--lime); }
.rms-head__name { display: block; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.rms-head__nav { display: none; }

@container (min-width: 760px) {
	.rms-head__nav {
		display: flex;
		gap: 4px;
		padding: 6px;
		border-radius: var(--r-pill);
		background: var(--card);
		border: 1px solid var(--line-1);
	}
}

.rms-navpill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 22px;
	border-radius: var(--r-pill);
	font-size: 15px;
	font-weight: 500;
	color: var(--text-2);
	transition: background 0.15s ease, color 0.15s ease;
}

.rms-navpill:hover { color: var(--text); }
.rms-navpill.is-on { background: var(--lime); color: var(--on-lime); font-weight: 600; }

.rms-livedot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--red);
	animation: rms-pulse 1.8s ease-in-out infinite;
}

@keyframes rms-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.rms-head__right { display: flex; align-items: center; gap: 10px; }

.rms-iconbtn {
	position: relative;
	width: 52px;
	height: 52px;
	flex: none;
	border: 1px solid var(--line-3);
	border-radius: 50%;
	background: transparent;
	display: grid;
	place-items: center;
	color: var(--text);
}

.rms-iconbtn__dot {
	position: absolute;
	top: 12px;
	right: 13px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--red);
	border: 2px solid var(--bg);
}

.rms-ghostbtn {
	display: none;
	align-items: center;
	gap: 9px;
	height: 52px;
	padding: 0 22px;
	border: 1.5px solid var(--lime);
	border-radius: var(--r-pill);
	color: var(--lime);
	font-size: 15px;
	font-weight: 500;
}

@container (min-width: 760px) { .rms-ghostbtn { display: inline-flex; } }

/* --------------------------------------------------------------- tab bar */

.rms-tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 50;
	display: flex;
	justify-content: center;
	pointer-events: none;
}

@container (min-width: 760px) { .rms-tabbar { display: none; } }

.rms-tabbar__pill {
	display: flex;
	gap: 10px;
	padding: 8px;
	border-radius: var(--r-pill);
	background: rgba(22, 24, 20, 0.86);
	backdrop-filter: blur(14px);
	border: 1px solid var(--line-1);
	pointer-events: auto;
}

.rms-tab {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--neutral);
	display: grid;
	place-items: center;
	color: var(--text-2);
}

.rms-tab.is-on { background: var(--lime); color: var(--on-lime); }

/* ------------------------------------------------------------- primitives */

.rms-section-title {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0;
}

.rms-page-title {
	font-size: clamp(30px, 4cqw, 44px);
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 0 0 6px;
}

.rms-rowhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 34px 0 16px;
}

.rms-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--text-2);
}

.rms-link:hover { color: var(--lime); }

.rms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--lime);
	color: var(--on-lime);
	font-size: 16px;
	font-weight: 600;
	transition: background 0.15s ease;
}

.rms-btn:hover { background: var(--lime-hover); }
.rms-btn[disabled] { background: var(--neutral); color: var(--text-3); cursor: not-allowed; }
.rms-btn--lg { height: 56px; font-size: 17px; }
.rms-btn--block { width: 100%; }

.rms-btn--outline {
	background: transparent;
	border: 1.5px solid var(--lime);
	color: var(--lime);
}

.rms-btn--outline:hover { background: rgba(182, 242, 58, 0.08); }

.rms-btn--quiet {
	background: var(--neutral);
	color: var(--text);
}

.rms-btn--quiet:hover { background: var(--neutral-2); }
.rms-btn--danger { background: var(--red); color: #fff; }

.rms-chiprow {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.rms-chiprow::-webkit-scrollbar { display: none; }

.rms-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 58px;
	padding: 0 24px;
	flex: none;
	border: 1.5px solid var(--line-1);
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--text-2);
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
}

.rms-chip.is-on {
	border-color: var(--lime);
	background: rgba(182, 242, 58, 0.08);
	color: var(--text);
}

.rms-chip__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3A3F34;
	flex: none;
}

.rms-chip.is-on .rms-chip__dot { background: var(--lime); }
.rms-chip.is-live .rms-chip__dot { background: var(--red); }

.rms-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 28px;
	padding: 0 14px;
	border-radius: var(--r-pill);
	background: var(--neutral);
	color: var(--text-2);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.rms-status--live { background: var(--lime); color: var(--on-lime); font-weight: 600; }

/* ---------------------------------------------------------------- crests */

.rms-crest {
	border-radius: 50%;
	display: grid;
	place-items: center;
	overflow: hidden;
	flex: none;
}

.rms-crest--club { background: #fff; padding: 8px; }
.rms-crest--club img { width: 100%; height: 100%; object-fit: contain; }

.rms-crest--opponent {
	background: var(--opponent-bg);
	color: var(--opponent-ink);
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* --------------------------------------------------------- match hero card */

.rms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
	gap: 32px;
}

.rms-hero {
	position: relative;
	border-radius: var(--r-xl);
	border: 1px solid var(--line-1);
	background: linear-gradient(160deg, #181B14 0%, #0F110D 100%);
	padding: clamp(20px, 3cqw, 28px);
	overflow: hidden;
}

.rms-hero::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -160px;
	width: 420px;
	height: 300px;
	transform: translateX(-50%);
	background: radial-gradient(50% 50% at 50% 50%, rgba(182, 242, 58, 0.18), transparent 70%);
	pointer-events: none;
}

.rms-hero > * { position: relative; z-index: 1; }

.rms-hero__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	font-size: 15px;
	color: var(--text-3);
}

.rms-hero__comp {
	text-align: center;
	font-size: 19px;
	font-weight: 600;
	margin: 6px 0 0;
}

.rms-hero__badge { display: flex; justify-content: center; margin-top: 10px; }

.rms-hero__duel {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: clamp(8px, 2cqw, 20px);
	margin-top: 22px;
}

.rms-hero__side { text-align: center; min-width: 0; }
.rms-hero__team { overflow-wrap: anywhere; }

.rms-hero__side .rms-crest {
	width: clamp(76px, 9cqw, 104px);
	height: clamp(76px, 9cqw, 104px);
	margin: 0 auto;
	font-size: clamp(24px, 3cqw, 30px);
}

.rms-hero__team {
	margin: 14px 0 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-2);
	line-height: 1.3;
}

.rms-hero__score {
	text-align: center;
	font-size: clamp(44px, 5cqw, 60px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.rms-hero__minute {
	display: block;
	margin-top: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--lime);
}

.rms-hero__sub { display: block; margin-top: 10px; font-size: 14px; color: var(--text-3); }
.rms-hero__cta { display: flex; justify-content: center; margin-top: 22px; }

/* Compact upcoming card. */
/* These cards are links, so they need an explicit box. */
.rms-mini {
	display: block;
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 18px;
}

.rms-mini + .rms-mini { margin-top: 14px; }

.rms-mini__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: var(--text-3);
}

.rms-mini__comp { text-align: center; font-size: 16px; font-weight: 600; margin: 8px 0 0; }

.rms-mini__duel {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}

.rms-mini__duel > * { min-width: 0; }

.rms-mini__duel .rms-crest { width: 62px; height: 62px; margin: 0 auto; font-size: 19px; }
.rms-mini__time { text-align: center; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.rms-mini__where { display: block; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.rms-mini__name {
	margin: 10px 0 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-2);
	overflow-wrap: anywhere;
	line-height: 1.3;
}

/* ------------------------------------------------------- latest moments */

.rms-moments {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 16px;
}

.rms-moment {
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 16px 18px;
}

.rms-moment__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rms-moment__body { margin: 12px 0 0; font-size: 15px; color: var(--feed-text); line-height: 1.45; }

.rms-minute {
	display: inline-grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: var(--r-pill);
	background: var(--neutral);
	font-size: 13px;
	font-weight: 600;
	color: var(--text-2);
}

.rms-minute--goal { background: var(--lime); color: var(--on-lime); }

.rms-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 12px;
	border-radius: var(--r-pill);
	background: var(--neutral-2);
	font-size: 12px;
	font-weight: 600;
	color: var(--text-2);
}

.rms-tag svg,
.rms-tag__icon { display: block; flex: none; }

.rms-tag--goal { background: var(--lime); color: var(--on-lime); }
.rms-tag--yellow { background: var(--yellow); color: #3A2E00; }
.rms-tag--red { background: var(--red); color: #fff; }
.rms-tag--sub { background: #2B3A52; color: #DCE6F5; }

.rms-when { margin-left: auto; font-size: 13px; color: var(--text-3); white-space: nowrap; }

/* ----------------------------------------------------------- player card */

.rms-player { border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line-1); overflow: hidden; }

.rms-player__visual {
	position: relative;
	height: clamp(300px, 34cqw, 440px);
	background: radial-gradient(70% 70% at 50% 40%, #253719 0%, #0F120C 100%);
	display: grid;
	place-items: center;
	overflow: hidden;
}

/* Taken out of the flow: a tall cut-out would otherwise stretch the frame
   and spill over the strip underneath. */
.rms-player__visual img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
}

.rms-player__ghost {
	position: absolute;
	font-size: clamp(90px, 14cqw, 150px);
	font-weight: 800;
	letter-spacing: -0.04em;
	color: rgba(182, 242, 58, 0.07);
	pointer-events: none;
}

.rms-player__empty { position: relative; text-align: center; color: var(--text-3); font-size: 14px; }

.rms-player__strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--line-1);
}

.rms-player__label { font-size: 12px; color: var(--text-3); }
.rms-player__team { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.rms-player__num {
	width: 64px;
	height: 64px;
	border-radius: var(--r-md);
	background: #1E2317;
	color: var(--lime);
	display: grid;
	place-items: center;
	font-size: 26px;
	font-weight: 700;
}

.rms-player__badge { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 5px; }
.rms-player__badge img { width: 100%; height: 100%; object-fit: contain; }

.rms-player__id { text-align: center; padding: 22px 18px 10px; }
.rms-player__name { margin: 0; font-size: clamp(26px, 3cqw, 32px); font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }
.rms-player__pos { margin: 4px 0 0; font-size: 15px; color: var(--text-3); }

.rms-player__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 12px 18px 20px;
}

.rms-stat { border-radius: var(--r-md); background: #1B1E18; padding: 14px 16px; }
.rms-stat__label { font-size: 14px; color: var(--text-3); }
.rms-stat__value { font-size: 26px; font-weight: 600; margin-top: 4px; }
.rms-stat--lime { background: var(--lime); color: var(--on-lime); position: relative; overflow: hidden; }
.rms-stat--lime .rms-stat__label { color: rgba(14, 20, 6, 0.7); }
.rms-stat__spark { position: absolute; right: 12px; bottom: 10px; opacity: 0.55; }

/* --------------------------------------------------------------- partners */

.rms-partners {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.rms-partner {
	display: block;
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 14px;
	transition: border-color 0.15s ease;
}

.rms-partner:hover { border-color: rgba(182, 242, 58, 0.5); }

.rms-partner__logo {
	height: clamp(120px, 14cqw, 170px);
	border-radius: 18px;
	background: #fff;
	display: grid;
	place-items: center;
	padding: 16px;
	overflow: hidden;
}

.rms-partner__logo img { max-height: 100%; width: auto; object-fit: contain; }
.rms-partner__name { display: block; margin: 8px 0 2px; font-size: 17px; font-weight: 500; }

/* The agency's own tile, closing the partners grid across both columns. */
.rms-partner--upartner {
	grid-column: 1 / -1;
	border-color: rgba(182, 242, 58, 0.22);
	background: linear-gradient(135deg, rgba(182, 242, 58, 0.06), transparent 60%), var(--card);
}

.rms-partner__cover {
	display: block;
	border-radius: 18px;
	overflow: hidden;
	background: #05060A;
}

.rms-partner__cover img { width: 100%; height: auto; }

.rms-partner__pitch {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.rms-partner__text {
	display: block;
	margin-top: 4px;
	font-size: 15px;
	color: var(--text-2);
	max-width: 46ch;
}

.rms-upartner__label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--lime);
}



/* ------------------------------------------------------------- calendar */

.rms-daygroup { margin-top: 30px; }
.rms-daygroup__title { font-size: 17px; color: var(--text-2); margin: 0 0 14px; font-weight: 500; }

.rms-cal {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
	gap: 16px;
}

.rms-calcard {
	display: block;
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 18px;
	transition: border-color 0.15s ease;
}

.rms-calcard:hover { border-color: var(--line-3); }

.rms-calcard__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: var(--text-3);
	margin-bottom: 16px;
}

.rms-calcard__row { display: flex; align-items: center; gap: 12px; }
.rms-calcard__row .rms-crest { width: 42px; height: 42px; font-size: 14px; }
.rms-calcard__name { flex: 1; font-size: 15px; font-weight: 500; min-width: 0; }
.rms-calcard__name--right { text-align: right; }
.rms-calcard__mid { font-size: 22px; font-weight: 500; white-space: nowrap; }

/* ----------------------------------------------------------------- live */

.rms-live-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 28px;
	align-items: start;
}

@container (min-width: 900px) {
	.rms-live-col { position: sticky; top: 20px; }
}

.rms-live-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.rms-live-bar__title { font-size: 16px; color: var(--text-2); }

.rms-sponsorblock {
	margin-top: 20px;
	padding: 18px;
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
}

.rms-sponsorblock__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.rms-sponsorblock__title { font-size: 15px; color: var(--text-2); max-width: 60%; }

.rms-sponsorblock__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 16px;
}

.rms-sponsorblock__item {
	height: 56px;
	border-radius: var(--r-xs);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	overflow: hidden;
}

.rms-sponsorblock__item img { max-height: 100%; width: auto; object-fit: contain; }

/* The agency's slot sits in the row like any other partner tile. */
.rms-sponsorblock__item--upartner img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }

.rms-sponsorblock__item--text {
	background: var(--neutral);
	color: var(--text-2);
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	padding: 4px;
	line-height: 1.2;
}

/* Feed */

.rms-feedhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.rms-feedhead__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.rms-soundbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--text-3);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

.rms-soundbtn:hover { border-color: var(--line-3); color: var(--text-2); }
.rms-soundbtn.is-on { border-color: var(--lime); color: var(--lime); }
.rms-soundbtn svg { display: block; }

.rms-feed { display: flex; flex-direction: column; gap: 16px; }

.rms-post { display: grid; grid-template-columns: 56px 1fr; gap: 12px; }

.rms-post__rail { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rms-post__rail::after { content: ''; flex: 1; width: 1px; background: var(--line-1); }
.rms-post:last-child .rms-post__rail::after { display: none; }

.rms-post__card {
	border-radius: 24px;
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 16px 18px;
}

.rms-post__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rms-post__body { margin: 12px 0 0; font-size: 17px; line-height: 1.45; color: var(--feed-text); }

.rms-post__media { margin-top: 14px; border-radius: 18px; overflow: hidden; background: #000; }
.rms-post__media img, .rms-post__media video { width: 100%; display: block; }
.rms-post__media audio { width: 100%; display: block; }
.rms-post__media--audio { background: transparent; }

.rms-empty {
	padding: 46px 20px;
	text-align: center;
	color: var(--text-3);
	border: 1px dashed var(--line-2);
	border-radius: var(--r-lg);
}

/* -------------------------------------------------------------- partner */

.rms-form { border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line-1); padding: clamp(20px, 3cqw, 28px); }

.rms-field { margin-bottom: 16px; }
.rms-field__label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }

.rms-input {
	width: 100%;
	height: 56px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	background: var(--card-2);
	font-size: 16px;
}

textarea.rms-input { height: auto; min-height: 120px; padding: 16px 18px; resize: vertical; line-height: 1.5; }
.rms-input::placeholder { color: var(--text-3); }
.rms-input:focus { outline: none; border-color: var(--lime); }
.rms-input--error { border-color: var(--error); }

.rms-error { margin: 8px 0 0; font-size: 14px; color: var(--error); }

.rms-seg {
	display: inline-flex;
	padding: 5px;
	border-radius: var(--r-pill);
	background: var(--card-2);
	gap: 4px;
	flex-wrap: wrap;
}

.rms-seg__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--text-2);
	font-size: 15px;
	font-weight: 500;
}

.rms-seg__item.is-on { background: var(--lime); color: var(--on-lime); font-weight: 600; }

.rms-success { text-align: center; padding: 40px 20px; }

.rms-success__check {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--lime);
	color: var(--on-lime);
	display: grid;
	place-items: center;
}

/* ---------------------------------------------------------------- login */

.rms-login { display: grid; place-items: center; padding: 40px 0 80px; }
.rms-login__card { width: 100%; max-width: 460px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line-1); padding: clamp(22px, 3cqw, 30px); }
.rms-login__kicker { font-size: 14px; color: var(--lime); }
.rms-login__title { margin: 8px 0 8px; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.rms-login__text { margin: 0 0 22px; color: var(--text-2); font-size: 16px; }

/* ----------------------------------------------------------- admin lists */

.rms-adminbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 26px; }

.rms-matchcard {
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: 20px;
	margin-bottom: 16px;
}

.rms-matchcard__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rms-matchcard__team { font-size: 16px; font-weight: 600; }
.rms-matchcard__comp { font-size: 15px; color: var(--text-3); }
.rms-matchcard__title { margin: 12px 0 6px; font-size: 19px; font-weight: 500; }
.rms-matchcard__meta { margin: 0 0 16px; font-size: 15px; color: var(--text-3); }
.rms-matchcard__actions { display: flex; gap: 10px; }
.rms-matchcard__actions .rms-btn { flex: 1; }

.rms-iconbtn--sm {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--line-2);
	background: transparent;
	display: grid;
	place-items: center;
	color: var(--text-2);
	flex: none;
}

.rms-iconbtn--sm:hover { color: var(--red); border-color: var(--red); }
.rms-iconbtn--confirm { border-color: var(--red); color: var(--red); width: auto; padding: 0 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; }

/* --------------------------------------------------------------- console */

.rms-console-score {
	border-radius: var(--r-xl);
	background: var(--card);
	border: 1px solid var(--line-1);
	padding: clamp(18px, 3cqw, 24px);
	margin-bottom: 18px;
}

.rms-console-score__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.rms-console-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.rms-console-duel__name { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; text-align: center; color: var(--text-2); line-height: 1.3; }
.rms-console-duel__score { font-size: clamp(38px, 6cqw, 52px); font-weight: 500; letter-spacing: -0.02em; text-align: center; white-space: nowrap; }
.rms-console-duel__minute { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--lime); }

.rms-goalrow { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }

/* Typed before tapping "+ But"; empty means the generic announcement. */
.rms-scorer { margin-top: 14px; }
.rms-scorer .rms-input { height: 50px; text-align: center; }

.rms-goalbtn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--lime);
	color: var(--on-lime);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.1;
}

.rms-goalbtn:hover { background: var(--lime-hover); }

.rms-minusbtn {
	width: 44px;
	height: 44px;
	flex: none;
	border: 1px solid var(--line-2);
	border-radius: 50%;
	background: transparent;
	color: var(--text-2);
	display: grid;
	place-items: center;
}

.rms-chrono {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--line-1);
}

.rms-chrono__main {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.rms-chrono__label { font-size: 15px; color: var(--text-3); }
.rms-chrono__time { font-size: 30px; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.rms-chrono__min { margin-left: 10px; font-size: 18px; font-weight: 600; color: var(--lime); }
.rms-chrono__hint { margin: 8px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.4; }
.rms-chrono__fix { display: flex; gap: 10px; margin-top: 12px; }

.rms-chrono__fix button {
	flex: 1;
	height: 46px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--text-2);
	font-size: 15px;
	font-weight: 500;
}

.rms-chrono__fix button:hover { border-color: var(--lime); color: var(--lime); }
.rms-chrono__fix button[disabled] { opacity: 0.4; cursor: not-allowed; }

.rms-publish { border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line-1); padding: clamp(18px, 3cqw, 24px); margin-bottom: 18px; }
.rms-publish__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rms-publish__title { font-size: 20px; font-weight: 600; margin: 0; }

.rms-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.rms-tagbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--text-2);
	font-size: 15px;
}

.rms-tagbtn.is-on { border-color: var(--lime); background: rgba(182, 242, 58, 0.1); color: var(--text); }

.rms-drop {
	margin-top: 14px;
	border: 1.5px dashed rgba(182, 242, 58, 0.5);
	border-radius: var(--r-md);
	background: rgba(182, 242, 58, 0.04);
	padding: 26px 18px;
	text-align: center;
	color: var(--text-2);
	font-size: 15px;
	cursor: pointer;
}

.rms-drop.is-over { background: rgba(182, 242, 58, 0.12); }
.rms-drop__preview { margin-top: 14px; border-radius: 14px; overflow: hidden; }
.rms-drop__preview img, .rms-drop__preview video { width: 100%; display: block; }

.rms-inline-note {
	flex: 1 1 100%;
	margin: 0 0 4px;
	padding: 12px 16px;
	border: 1px solid var(--line-2);
	border-left: 3px solid var(--yellow);
	border-radius: var(--r-sm);
	color: var(--text-2);
	font-size: 14px;
	line-height: 1.45;
}

.rms-rec { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.rms-rec__timer {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 44px;
	padding: 0 18px;
	border-radius: var(--r-pill);
	background: rgba(240, 82, 74, 0.12);
	color: var(--red);
	font-size: 16px;
	font-weight: 600;
}

.rms-rec__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rms-pulse 1.4s ease-in-out infinite; }

.rms-published { border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line-1); padding: clamp(18px, 3cqw, 24px); }
.rms-published__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.rms-plist { display: flex; flex-direction: column; gap: 12px; }

.rms-pitem { border-radius: var(--r-md); background: var(--card-2); padding: 14px 16px; }
.rms-pitem__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rms-pitem__body { margin: 10px 0 0; font-size: 15px; color: var(--feed-text); }
.rms-pitem.is-pending { opacity: 0.5; }

.rms-del {
	margin-left: auto;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--text-3);
	display: grid;
	place-items: center;
	flex: none;
}

.rms-del:hover { color: var(--red); }

/* ---------------------------------------------------------------- footer */

.rms-foot { border-top: 1px solid var(--line-1); margin-top: 60px; }
.rms-foot > * { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 4cqw, 40px); }
.rms-foot__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 28px; }
.rms-foot__club { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.rms-foot__logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 4px; flex: none; }
.rms-foot__logo img { width: 100%; height: 100%; object-fit: contain; }
.rms-foot__links { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; margin: 0; padding: 0; font-size: 15px; color: var(--text-2); }
.rms-foot__links a:hover { color: var(--lime); }

.rms-foot__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	padding-block: 22px 34px;
	border-top: 1px solid var(--line-1);
	font-size: 14px;
	color: var(--text-3);
}

/* The floating tab bar hovers over the end of the page, so the last line of
   the footer needs room to clear it. */
@container (max-width: 759px) {
	.rms-foot__bottom { padding-bottom: 124px; }
}

.rms-foot__bottom p { margin: 0; }

.rms-poweredby {
	display: inline-flex;
	/* Flex swallows the whitespace around <strong>, so restore it as a gap. */
	gap: 0.3em;
	align-items: center;
	height: 42px;
	padding: 0 20px;
	border-radius: var(--r-pill);
	background: var(--lime);
	color: var(--on-lime);
	font-size: 14px;
	font-weight: 500;
}

/* ----------------------------------------------------------------- toast */

.rms-toast {
	position: fixed;
	top: 18px;
	left: 50%;
	transform: translate(-50%, -160%);
	z-index: 90;
	max-width: calc(100% - 32px);
	padding: 13px 22px;
	border-radius: var(--r-pill);
	background: var(--lime);
	color: var(--on-lime);
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	transition: transform 0.25s ease;
}

.rms-toast.is-on { transform: translate(-50%, 0); }
.rms-toast--bad { background: var(--error); }

@keyframes rms-goalpulse {
	0% { transform: scale(1); }
	28% { transform: scale(1.14); }
	100% { transform: scale(1); }
}

.rms-goalpulse {
	animation: rms-goalpulse 0.85s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}
