.ff-entity {
	background: var(--color-bg);
	color: var(--color-text);
	min-height: 100vh;
	padding: 0 var(--ff-layout-page-gutter) 64px;
}

.ff-entity a {
	color: inherit;
	text-decoration: none;
}

.ff-entity a:hover,
.ff-entity a:focus-visible {
	color: var(--color-gold);
}

.ff-entity__inner {
	display: grid;
	gap: 16px;
	margin: 0 auto;
	max-width: var(--ff-layout-max-width);
	width: 100%;
}

.ff-entity .ff-page-title--entity {
	color: var(--color-text-muted);
	font-size: var(--ff-page-title-size);
	font-weight: 650;
	line-height: var(--ff-page-title-line-height);
	margin: 0;
	max-width: none;
	padding: 0;
}

.ff-entity .ff-page-title__subtitle {
	color: var(--color-text-muted);
	font-size: 13px;
	line-height: 1.65;
	margin: 0;
	max-width: 760px;
}

.ff-entity-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--ff-radius-card);
	box-sizing: border-box;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
	max-width: 100%;
	min-width: 0;
}

.ff-entity-hero {
	align-items: center;
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(112px, 154px) minmax(0, 1fr);
	padding: 18px;
}

.ff-entity--team .ff-entity-hero,
.ff-entity--league .ff-entity-hero,
.ff-entity--player .ff-entity-hero {
	grid-template-columns: minmax(0, 1fr);
}

.ff-entity-hero__content {
	display: grid;
	gap: 10px;
	min-width: 0;
}

.ff-entity-hero__actions {
	align-items: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 2px;
	min-width: 0;
}

.ff-entity-action-link {
	background: rgba(212, 175, 55, 0.08);
	border: 1px solid rgba(212, 175, 55, 0.24);
	border-radius: var(--ff-radius-control);
	color: var(--color-text);
	display: grid;
	gap: 2px;
	min-width: min(100%, 150px);
	padding: 9px 11px;
}

.ff-entity-action-link:hover,
.ff-entity-action-link:focus-visible {
	background: rgba(212, 175, 55, 0.14);
	border-color: rgba(212, 175, 55, 0.46);
	color: var(--color-text);
	outline: 2px solid rgba(212, 175, 55, 0.32);
	outline-offset: 2px;
}

.ff-entity-action-link span {
	font-size: 0.86rem;
	font-weight: 900;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-entity-action-link small {
	color: var(--color-text-muted);
	font-size: 0.74rem;
	font-weight: 800;
}

.ff-entity-eyebrow {
	color: var(--color-gold);
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0;
	margin: 0;
	text-transform: uppercase;
}

.ff-entity-hero h2,
.ff-entity-section__header h2 {
	color: var(--color-text);
	font-weight: 900;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0;
}

.ff-entity-hero h2 {
	font-size: clamp(1.35rem, 2.6vw, 2rem);
}

.ff-entity-hero p {
	color: var(--color-text-muted);
	line-height: 1.65;
	margin: 0;
}

.ff-entity-stat-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
	margin-top: 4px;
}

.ff-entity-stat {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--ff-radius-control);
	display: grid;
	gap: 4px;
	min-width: 0;
	padding: 10px 12px;
}

.ff-entity-stat span,
.ff-entity-meta-list span {
	color: var(--color-text-muted);
	font-size: 0.76rem;
	font-weight: 800;
}

.ff-entity-stat strong,
.ff-entity-meta-list strong {
	color: var(--color-text);
	font-size: 1rem;
	font-weight: 900;
	overflow-wrap: anywhere;
}

.ff-entity-layout {
	align-items: start;
	gap: 16px;
}

.ff-entity .ff-layout-shell {
	padding-inline: 0;
}

.ff-entity .ff-page-chrome__inner {
	padding-inline: 0;
}

.ff-entity-main,
.ff-entity-sidebar {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.ff-entity-section {
	min-width: 0;
	padding: 16px;
}

.ff-entity-section__header {
	border-bottom: 1px solid var(--color-border);
	display: grid;
	gap: 4px;
	margin-bottom: 14px;
	padding-bottom: 12px;
}

.ff-entity-section__header h2 {
	font-size: 1.05rem;
}

.ff-entity-section__header p {
	color: var(--color-text-muted);
	font-size: 0.84rem;
	line-height: 1.55;
	margin: 0;
}

.ff-entity-empty,
.ff-entity-note {
	background: rgba(255, 255, 255, 0.04);
	border: 1px dashed rgba(255, 255, 255, 0.14);
	border-radius: var(--ff-radius-control);
	color: var(--color-text-muted);
	line-height: 1.65;
	margin: 0;
	padding: 12px;
}

.ff-entity-note {
	margin-top: 12px;
}

.ff-entity-match-list {
	display: grid;
	gap: 6px;
}

.ff-entity-match-row {
	align-items: center;
	background: rgba(5, 9, 20, 0.74);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: var(--ff-radius-control);
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) 68px minmax(0, 1fr) minmax(88px, 112px);
	min-height: 44px;
	padding: 8px 10px;
}

a.ff-entity-match-row:hover,
a.ff-entity-match-row:focus-visible {
	background: rgba(212, 175, 55, 0.1);
	border-color: rgba(212, 175, 55, 0.36);
	color: var(--color-text);
	outline: none;
}

.ff-entity-match-row__date,
.ff-entity-match-row__status,
.ff-entity-match-row__meta {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	font-weight: 800;
}

.ff-entity-match-row__team {
	font-size: 0.9rem;
	font-weight: 850;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-entity-match-row__team--home {
	text-align: right;
}

.ff-entity-match-row__team--away {
	text-align: left;
}

.ff-entity-match-row__score {
	color: var(--color-text);
	font-size: 0.98rem;
	font-weight: 950;
	text-align: center;
	white-space: nowrap;
}

.ff-entity-match-row__status {
	text-align: right;
}

.ff-entity-match-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	grid-column: 2 / -1;
}

.ff-entity-match-row__meta span {
	background: rgba(255, 255, 255, 0.06);
	border-radius: var(--ff-radius-pill);
	padding: 3px 7px;
}

.ff-entity-match-section--compact .ff-entity-match-row {
	grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
}

.ff-entity-match-section--compact .ff-entity-match-row__date,
.ff-entity-match-section--compact .ff-entity-match-row__status {
	grid-column: 1 / -1;
	text-align: left;
}

.ff-entity-match-section--date-groups {
	overflow: hidden;
	padding: 0;
}

.ff-entity-match-section--date-groups > .ff-entity-section__header {
	border-bottom: 1px solid var(--color-border);
	margin: 0;
	padding: 16px;
}

.ff-entity .ff-home-date-groups,
.ff-entity .ff-home-match-groups,
.ff-entity .ff-home-match-list__rows {
	display: grid;
	gap: 0;
}

.ff-entity .ff-home-date-group + .ff-home-date-group,
.ff-entity .ff-home-league-group + .ff-home-league-group {
	border-top: 1px solid var(--color-border);
}

.ff-entity-team-list,
.ff-entity-meta-list,
.ff-entity-event-list {
	display: grid;
	gap: 8px;
}

.ff-entity-team-item,
.ff-entity-meta-list > div,
.ff-entity-event {
	align-items: center;
	background: #0b111d;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: var(--ff-radius-control);
	display: grid;
	gap: 8px;
	padding: 9px 10px;
}

.ff-entity-team-item {
	grid-template-columns: 34px minmax(0, 1fr) auto;
}

.ff-entity-team-item strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-entity-team-item span {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	font-weight: 850;
}

.ff-entity-team-item__rank {
	align-items: center;
	background: rgba(212, 175, 55, 0.12);
	border-radius: var(--ff-radius-compact);
	color: var(--color-gold) !important;
	display: inline-flex;
	height: 28px;
	justify-content: center;
}

.ff-entity-event {
	grid-template-columns: 48px minmax(0, 1fr) minmax(96px, auto);
}

.ff-entity-event__minute {
	color: var(--color-gold);
	font-weight: 950;
}

.ff-entity-event__body {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.ff-entity-event__body span,
.ff-entity-event__date {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-player-appearance-table-wrap,
.ff-player-career-table-wrap {
	background: #050914;
	border: 1px solid var(--color-border);
	border-radius: var(--ff-radius-control);
	max-width: 100%;
	overflow-x: auto;
}

.ff-player-appearance-table,
.ff-player-career-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
}

.ff-player-appearance-table {
	min-width: 900px;
}

.ff-player-career-table {
	min-width: 820px;
}

.ff-player-appearance-table th,
.ff-player-appearance-table td,
.ff-player-career-table th,
.ff-player-career-table td {
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	padding: 9px 10px;
	vertical-align: middle;
}

.ff-player-appearance-table th,
.ff-player-career-table th {
	background: rgba(255, 255, 255, 0.03);
	color: var(--color-text-muted);
	font-size: 0.72rem;
	font-weight: 900;
	text-align: left;
	white-space: nowrap;
}

.ff-player-appearance-table tbody tr:hover,
.ff-player-career-table tbody tr:hover {
	background: rgba(212, 175, 55, 0.06);
}

.ff-player-appearance-table tbody tr:last-child td,
.ff-player-career-table tbody tr:last-child td,
.ff-player-career-table tbody tr:last-child th {
	border-bottom: 0;
}

.ff-player-appearance-table__date,
.ff-player-appearance-table__score,
.ff-player-appearance-table__num,
.ff-player-career-table__season,
.ff-player-career-table__num {
	color: var(--color-text);
	font-size: 0.82rem;
	font-weight: 900;
	text-align: center;
	white-space: nowrap;
}

.ff-player-appearance-table__match {
	min-width: 190px;
}

.ff-player-appearance-table__match a,
.ff-player-appearance-table__match > span {
	color: var(--color-text);
	font-size: 0.84rem;
	font-weight: 900;
}

.ff-player-appearance-table__match a {
	display: grid;
	gap: 2px;
}

.ff-player-appearance-table__match a:hover,
.ff-player-appearance-table__match a:focus-visible {
	color: var(--color-gold);
	outline: none;
}

.ff-player-appearance-table__match small {
	color: var(--color-text-muted);
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.ff-player-appearance-league {
	background: rgba(255, 255, 255, 0.06);
	border-radius: var(--ff-radius-pill);
	color: var(--color-text);
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 950;
	justify-content: center;
	min-width: 36px;
	padding: 3px 7px;
	white-space: nowrap;
}

.ff-player-result-badge {
	align-items: center;
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--ff-radius-compact);
	color: var(--color-text-muted);
	display: inline-flex;
	font-size: 0.78rem;
	font-weight: 950;
	justify-content: center;
	min-width: 28px;
	padding: 4px 7px;
	white-space: nowrap;
}

.ff-player-result-badge--win {
	background: rgba(34, 197, 94, 0.18);
	color: #4ade80;
}

.ff-player-result-badge--draw {
	background: rgba(212, 175, 55, 0.16);
	color: var(--color-gold);
}

.ff-player-result-badge--loss {
	background: rgba(239, 68, 68, 0.18);
	color: #f87171;
}

.ff-player-appearance-table__memo {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	font-weight: 800;
	min-width: 96px;
}

.ff-player-career-table__team,
.ff-player-career-table__competition {
	color: var(--color-text);
	font-size: 0.84rem;
	font-weight: 900;
	min-width: 160px;
}

.ff-player-career-table__team a,
.ff-player-career-table__competition a {
	color: var(--color-text);
}

.ff-player-career-table__team a:hover,
.ff-player-career-table__team a:focus-visible,
.ff-player-career-table__competition a:hover,
.ff-player-career-table__competition a:focus-visible {
	color: var(--color-gold);
	outline: none;
}

.ff-player-career-table tfoot th,
.ff-player-career-table tfoot td {
	background: rgba(255, 255, 255, 0.05);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--color-text);
	font-weight: 950;
}

.ff-player-appearance-note {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	font-weight: 800;
	margin: 10px 0 0;
	text-align: center;
}

.ff-entity .ff-league-nav--entity {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

.ff-entity-left-nav .ff-league-nav--entity {
	background: #050914;
	border: 1px solid var(--color-border);
	border-radius: var(--ff-radius-control);
	box-shadow: none;
	padding: 14px;
}

@media (max-width: 900px) {
	.ff-entity-layout {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 768px) {
	.ff-entity .ff-page-chrome .ff-page-title__subtitle {
		line-height: var(--ff-page-title-line-height);
		max-width: none;
	}
}

@media (max-width: 639px) {
	.ff-entity {
		padding: 0 var(--ff-layout-page-gutter-sm) 48px;
	}

	.ff-entity .ff-page-title--entity {
		font-size: var(--ff-page-title-size);
		margin-top: 0;
	}

	.ff-entity-hero {
		gap: 12px;
		grid-template-columns: 1fr;
		padding: 14px;
	}

	.ff-entity-hero__actions {
		display: grid;
	}

	.ff-entity-action-link {
		min-width: 0;
	}

	.ff-entity-action-link span {
		line-height: 1.35;
		overflow: visible;
		overflow-wrap: anywhere;
		text-overflow: clip;
		white-space: normal;
	}

	.ff-entity-section {
		padding: 14px;
	}

	.ff-entity-match-section--date-groups {
		padding: 0;
	}

	.ff-entity-match-section--date-groups > .ff-entity-section__header {
		padding: 14px;
	}

	.ff-entity-match-row,
	.ff-entity-match-section--compact .ff-entity-match-row {
		grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
		padding: 9px;
	}

	.ff-entity-match-row__date,
	.ff-entity-match-row__status,
	.ff-entity-match-section--compact .ff-entity-match-row__date,
	.ff-entity-match-section--compact .ff-entity-match-row__status {
		grid-column: 1 / -1;
		text-align: left;
	}

	.ff-entity-match-row__team {
		white-space: normal;
	}

	.ff-entity-match-row__team--home {
		text-align: right;
	}

	.ff-entity-match-row__meta {
		grid-column: 1 / -1;
	}

	.ff-player-appearance-table-wrap,
	.ff-player-career-table-wrap {
		margin-inline: -2px;
	}

	.ff-player-appearance-table {
		min-width: 760px;
	}

	.ff-player-career-table {
		min-width: 720px;
	}

	.ff-player-appearance-table th,
	.ff-player-appearance-table td,
	.ff-player-career-table th,
	.ff-player-career-table td {
		padding: 8px;
	}

	.ff-player-appearance-table__match {
		min-width: 160px;
	}

	.ff-entity-event {
		grid-template-columns: 42px minmax(0, 1fr);
	}

	.ff-entity-event__date {
		grid-column: 2;
	}

}
