/*
 * T7 Blood Bowl – front-end styles.
 *
 * Uses the site's own stylesheet: colours, borders and surfaces come from its variables
 * (--color-accent, --color-surface, --color-border, --theme-text …), buttons use its
 * .btn / .btn-primary / .btn-outline / .btn-sm classes and labels use .form-label / .check-label.
 * The fallbacks after each variable only kick in if the site stylesheet isn't loaded.
 *
 * Light/dark mode follows the site-wide switch (data-tk7-theme on <html>, set by [tk7_tema], see site-header.php).
 * Light is the default. styles.css has the light palette for the whole site; the block below
 * repeats it for Blood Bowl content so these pages stay light even without the updated styles.css.
 * Dark mode uses the site's normal (dark) palette.
 */

/* ---------- Light mode: overrides the site's palette on Blood Bowl pages ---------- */
html[data-tk7-theme="light"] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive),
html[data-tk7-theme="light"] body .t7bb.t7bb {
	--color-black: #eceef2;
	--color-secondary: #e2e6ec;
	--color-field: #f4f5f8;
	--color-input: #f7f8fa;
	--color-surface: #f7f8fa;
	--color-surface-hover: #e9ecf1;
	--color-border: #d3d8e0;
	--color-border-hover: #a9b2c0;
	--color-muted: #5a6375;
	--color-placeholder: #858e9f;
	--color-heading: #1c2332;
	--theme-text: #333b4a;
	--theme-heading: #1c2332;
	--t7bb-ok: var(--tk7-status-ok, #1f7a45);
	--t7bb-warn: var(--tk7-status-warn, #a4500d);
	--t7bb-bad: var(--tk7-status-bad, #c0352b);
	--t7bb-shadow: 0 6px 24px rgba(20, 25, 40, 0.14);
	color: var(--theme-text);
}
html[data-tk7-theme="light"] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive) {
	background-color: var(--color-black);
}
html[data-tk7-theme="light"] body .t7bb.t7bb :is(h1, h2, h3, h4, h5, h6, strong, dd) { color: var(--theme-heading); }
/* Light fields: forced, because the site's dark field style is written to win over everything else. */
html[data-tk7-theme="light"] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive, .t7bb) :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], input[type="url"], input[type="tel"], select, textarea) {
	color: #333b4a !important;
	background-color: #f7f8fa !important; /* a literal so an old cached copy of the stylesheet can't change it */
	border-color: #d3d8e0 !important;
	color-scheme: light;
}
html[data-tk7-theme="light"] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive, .t7bb) :is(input, select, textarea):focus {
	border-color: var(--color-accent, #FA4616) !important;
}
html[data-tk7-theme="light"] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive, .t7bb) select option { background: #f7f8fa; color: #333b4a; }
html[data-tk7-theme="light"] body .t7bb.t7bb :is(input, textarea)::placeholder { color: var(--color-placeholder); }
html[data-tk7-theme="light"] body .t7bb.t7bb .btn:is(.btn-outline, .btn-ghost) {
	--btn-fg: var(--theme-text);
	--btn-fg-hover: var(--theme-heading);
	--btn-fill: color-mix(in srgb, #1c2332 7%, transparent);
	--btn-bd-hover: var(--color-border-hover);
}
html[data-tk7-theme="light"] body .t7bb.t7bb .btn.t7bb-btn-danger { --btn-fg: var(--t7bb-bad); --btn-fg-hover: var(--t7bb-bad); --btn-bd: var(--t7bb-bad); --btn-bd-hover: var(--t7bb-bad); }

.t7bb {
	--t7bb-accent: var(--color-accent, #FA4616);
	--t7bb-line: var(--color-border, rgba(127, 127, 127, 0.28));
	--t7bb-soft: color-mix(in srgb, var(--theme-text, #888) 7%, transparent);
	--t7bb-surface: var(--color-surface, transparent);
	--t7bb-muted: var(--color-muted, inherit);
	--t7bb-ok: var(--tk7-status-ok, #2fb36d);
	--t7bb-warn: var(--tk7-status-warn, #ec8b2c);
	--t7bb-bad: var(--tk7-status-bad, #e04e4e);
	--t7bb-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
	--t7bb-radius: var(--border-radius-sm, 8px);
	--t7bb-card-radius: 12px;
	--t7bb-team: var(--t7bb-accent);
	font-variant-numeric: tabular-nums;
}
.t7bb *, .t7bb *::before, .t7bb *::after { box-sizing: border-box; }
.t7bb-narrow { max-width: 30rem; margin-inline: auto; }
:where(.t7bb) :where(h2, h3) { margin: 1.75rem 0 0.6rem; }

/* ---------- Navigation ---------- */
.t7bb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding-bottom: 0.5rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-nav-brand { font-size: 0.72em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t7bb-accent); padding: 0.2rem 0.55rem; border: 1px solid currentColor; border-radius: 999px; }
/* Text links: the heading colour, underlined on hover. The accent is kept for buttons, tabs and markers. */
.t7bb a:not(.btn):not(.t7bb-tab) { color: var(--theme-heading, inherit); text-decoration: none; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
/* Names and titles (teams, leagues, players, coaches, matches) are plain links: no underline, they just fade on hover. */
.t7bb a:not(.btn):not(.t7bb-tab) { transition: opacity 0.15s ease; }
body .t7bb a:not(.btn):not(.t7bb-tab):hover { color: var(--theme-heading, inherit); text-decoration: none; opacity: 0.75; }
/* Only links inside running text (descriptions, help text) are underlined, so they can be told apart from the text around them. */
.t7bb :is(.t7bb-desc, .t7bb-help, .t7bb-small) a:not(.btn), .t7bb p:not(.t7bb-sub):not(.t7bb-report-links):not(.t7bb-back) > a:not(.btn):not([class]) { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.t7bb :is(.t7bb-desc, .t7bb-help, .t7bb-small) a:not(.btn):hover, .t7bb p:not(.t7bb-sub):not(.t7bb-report-links):not(.t7bb-back) > a:not(.btn):not([class]):hover { text-decoration: underline; text-decoration-color: currentColor; opacity: 1; }
.t7bb .t7bb-nav a { color: inherit; text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.t7bb .t7bb-nav a[aria-current="page"] { border-bottom-color: var(--t7bb-accent); font-weight: 600; }

/* ---------- Text helpers ---------- */
.t7bb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin: 0.15rem 0 0.4rem; }
.t7bb-muted { color: var(--t7bb-muted); }
.t7bb-small { font-size: 0.875em; }
.t7bb-count { font-size: 0.8em; font-weight: 400; opacity: 0.65; margin-left: 0.4rem; }
.t7bb-back { margin: 0 0 0.5rem; font-size: 0.9em; }
.t7bb-back a { text-decoration: none; }
.t7bb-warn { color: var(--t7bb-bad); font-weight: 600; }
.t7bb-note { padding: 0.6rem 0.9rem; border-left: 3px solid var(--t7bb-accent); background: var(--t7bb-soft); margin: 0.75rem 0; font-size: 0.95em; }
.t7bb-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.t7bb-section-head h2, .t7bb-section-head h3 { margin: 0; }

/* ---------- Team header ---------- */
.t7bb-head { border-left: 6px solid var(--t7bb-team); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0.25rem 0 0.75rem; }
.t7bb-head-logo { display: flex; align-items: center; gap: 1rem; }
.t7bb-head-text { min-width: 0; flex: 1; }
.t7bb-head .t7bb-title { margin: 0; line-height: 1.15; }

/* Key numbers on one line */
.t7bb-statbar { display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; margin: 0.35rem 0 0; }
.t7bb-statbar div { display: flex; align-items: baseline; gap: 0.4rem; }
.t7bb-statbar dt { font-size: 0.82em; opacity: 0.7; margin: 0; }
.t7bb-statbar dd { margin: 0; font-weight: 700; }
.t7bb-statbar .t7bb-over dd { color: var(--t7bb-bad); }

/* Facts grid (league and player pages) */
/* Facts: always the full width of the content, in small text. */
.t7bb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem var(--grid-gap, 1.25rem); width: 100%; margin: 0.75rem 0; font-size: 0.9rem; line-height: 1.4; }
.t7bb-facts div { border-top: 1px solid var(--t7bb-line); padding-top: 0.4rem; min-width: 0; }
.t7bb-facts dt { font-size: 0.8rem; color: var(--t7bb-muted); margin: 0; }
.t7bb-facts dd { margin: 0.1rem 0 0; font-weight: 600; font-size: 0.95rem; }
.t7bb-desc { max-width: none; font-size: var(--font-body, 1rem); }
.t7bb-desc > :last-child { margin-bottom: 0; }
/* League page: logo on top, the league name under it */
.t7bb-league-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; width: 100%; margin: 0 0 0.75rem; }
.t7bb .t7bb-logo-league { width: clamp(96px, 6rem + 4vw, 160px); height: clamp(96px, 6rem + 4vw, 160px); object-fit: contain; object-position: left center; }
.t7bb .t7bb-league-title { margin: 0; }
/* The plugin shows the league name itself (under the logo), so the theme's / Elementor's own page title is hidden */
body:has(:is(.t7bb-league-title, .t7bb-coach-title, .t7bb-story-heading)) :is(.page-header > .entry-title, .entry-header > .entry-title, .elementor-widget-theme-post-title) { display: none !important; }
body:has(:is(.t7bb-league-title, .t7bb-coach-title, .t7bb-story-heading)) .page-header:not(:has(> :not(.entry-title))) { display: none !important; }
@media (max-width: 640px) { .t7bb .t7bb-logo-league { width: 96px; height: 96px; } }
/* League list: one card per league, the logo contained in the same square */
.t7bb .t7bb-league-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0.75rem; }
.t7bb .t7bb-league-grid > li { margin: 0; padding: 0; border: 0; min-width: 0; }
.t7bb .t7bb-league-card-link { display: flex; align-items: flex-start; gap: 1rem; height: 100%; box-sizing: border-box; padding: 1rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius, 8px); background: var(--t7bb-surface, transparent); color: inherit; text-decoration: none !important; transition: border-color 0.15s ease, background-color 0.15s ease; }
.t7bb .t7bb-league-card-link:hover, .t7bb .t7bb-league-card-link:focus-visible { border-color: var(--color-border-hover, var(--t7bb-line)); background: var(--color-surface-hover, var(--t7bb-surface)); }
.t7bb .t7bb-league-logo { display: flex; flex: none; align-items: center; justify-content: center; width: 64px; height: 64px; padding: 6px; box-sizing: border-box; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius, 8px); background: var(--color-black, transparent); line-height: 0; overflow: hidden; }
.t7bb .t7bb-league-logo img { display: block; width: 100% !important; height: 100% !important; max-width: none; margin: 0; object-fit: contain; border-radius: 0; }
.t7bb .t7bb-league-logo-tom { color: var(--t7bb-muted); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.t7bb .t7bb-league-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.t7bb .t7bb-league-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.t7bb .t7bb-league-card .t7bb-league-name { font-family: var(--t7bb-heading-font); font-size: 1.15em; font-weight: 700; line-height: 1.25; color: var(--color-heading, inherit); overflow-wrap: break-word; min-width: 0; }
.t7bb .t7bb-league-top .t7bb-badge { flex: none; margin-top: 0.1em; }
.t7bb .t7bb-league-card .t7bb-league-meta { opacity: 1; flex: none; color: var(--t7bb-muted); font-size: 0.9em; }
.t7bb .t7bb-league-excerpt { margin-top: 0.25rem; font-size: 0.9em; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 479px) {
	.t7bb .t7bb-league-card-link { gap: 0.75rem; padding: 0.85rem; }
	.t7bb .t7bb-league-logo { width: 52px; height: 52px; padding: 5px; }
	.t7bb .t7bb-league-top { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}

/* ---------- Logos ---------- */
.t7bb-logo { display: block; object-fit: contain; border-radius: var(--t7bb-radius); flex: none; }
.t7bb-logo-lg { width: 84px; height: 84px; }
.t7bb-logo-md { width: 40px; height: 40px; }
.t7bb-logo-sm { width: 64px; height: 64px; margin-bottom: 0.5rem; }
.t7bb-logo-xs { display: inline-block; width: 1.4em; height: 1.4em; margin-right: 0.4em; vertical-align: -0.35em; }
.t7bb-logo-ph { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.1em; }
.t7bb-team-row { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 600; }
.t7bb-team-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; white-space: nowrap; }
/* Logo or colour square in front of a team name: always the same size */
.t7bb .t7bb-mark { display: inline-block; flex: none; width: 1.4rem; height: 1.4rem; border-radius: 4px; overflow: hidden; line-height: 0; }
.t7bb .t7bb-mark-logo img { display: block; width: 100% !important; height: 100% !important; max-width: none; margin: 0; object-fit: contain; border-radius: 0; }
.t7bb .t7bb-mark-tom { border: 1px dashed var(--t7bb-line); }
.t7bb-team-with-coach > .t7bb-team-link + .t7bb-coach { padding-left: 1.9rem; }
/* Team with its coach underneath (tables, fixtures, match pages) */
.t7bb-team-with-coach { display: inline-flex; flex-direction: column; gap: 0.05rem; line-height: 1.25; vertical-align: middle; }
.t7bb-coach { display: block; color: var(--t7bb-muted); font-size: 0.8rem; font-weight: 400; white-space: nowrap; }
:is(h2, h3, h4) .t7bb-coach { display: inline; margin-left: 0.35em; font-size: 0.75em; }
.t7bb-scoreline .t7bb-team-with-coach { text-align: left; }
.t7bb-swatch { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 2px; margin-right: 0.4em; vertical-align: 0.02em; }

/* ---------- Rerolls and staff: price list with steppers ---------- */
.t7bb-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.6rem; margin: 0.75rem 0 0.5rem; }
.t7bb-staff-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: var(--t7bb-surface); }
.t7bb-staff-name { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.t7bb-staff-name strong { font-weight: 600; color: var(--theme-heading, inherit); }
.t7bb-staff-name small { font-size: 0.8em; color: var(--t7bb-muted); }
.t7bb-staff-off { opacity: 0.55; }
.t7bb-staff-changed { border-color: var(--t7bb-accent); box-shadow: inset 3px 0 0 var(--t7bb-accent); }
.t7bb-stepper { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); overflow: hidden; }
.t7bb-staff-count { min-width: 2.4rem; padding: 0 0.4rem; text-align: center; font-weight: 700; font-size: 1.05em; }
.t7bb-stepper:not(:has(button)) { border-color: transparent; }
.t7bb .t7bb-step {
	width: 2rem; height: 2rem; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--t7bb-soft); color: inherit; font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; box-shadow: none;
	transition: background-color 0.15s, color 0.15s;
}
.t7bb .t7bb-step:hover, .t7bb .t7bb-step:focus-visible { background: var(--t7bb-accent); color: var(--color-on-accent, #111); }
.t7bb .t7bb-step:disabled { opacity: 0.35; cursor: not-allowed; background: var(--t7bb-soft); color: inherit; }
.t7bb-staff-help { margin: 0 0 0.75rem; }
.t7bb .t7bb-mini {
	width: 1.6rem; height: 1.6rem; min-height: 0; padding: 0; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--t7bb-line); border-radius: 50%; background: transparent; color: inherit;
	font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: none; text-transform: none;
}
.t7bb .t7bb-mini:hover, .t7bb .t7bb-mini:focus-visible { background: var(--t7bb-accent); border-color: var(--t7bb-accent); color: var(--color-on-accent, #111); }

/* ---------- Buttons: the site's .btn classes do the styling ---------- */
.t7bb-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.t7bb-toolbar { margin: 0.6rem 0 1rem; }
.t7bb .t7bb-btn { white-space: nowrap; text-decoration: none; }
.t7bb .btn.t7bb-btn-danger { --btn-fg: var(--t7bb-bad); --btn-bd: var(--t7bb-bad); --btn-fg-hover: var(--t7bb-bad); --btn-bd-hover: var(--t7bb-bad); }
:where(.t7bb) :where(.btn:not(.btn-outline):not(.btn-ghost)) { background: var(--t7bb-accent); color: var(--color-on-accent, #111); border: 1px solid var(--t7bb-accent); border-radius: var(--t7bb-radius); padding: 0.5rem 1rem; font-weight: 600; cursor: pointer; }
:where(.t7bb) :where(.btn.btn-outline, .btn.btn-ghost) { background: transparent; color: inherit; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); padding: 0.5rem 1rem; cursor: pointer; }
.t7bb :focus-visible { outline: 2px solid var(--t7bb-accent); outline-offset: 2px; }
.t7bb-inline-form { display: inline; margin: 0; }
.t7bb-hidden-form { display: none; }
.t7bb-row-actions { white-space: nowrap; }
/* Buttons in table rows and lists: all the same height, text centred vertically */
.t7bb .t7bb-row-btns { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.5rem; }
.t7bb .t7bb-row-btns > *, .t7bb .t7bb-row-btns .t7bb-inline-form { margin: 0; }
.t7bb :is(.t7bb-row-btns, .t7bb-table td, .t7bb-list li) .t7bb-inline-form { display: inline-flex; vertical-align: middle; }
body .t7bb :is(.t7bb-row-btns, .t7bb-table td, .t7bb-list li) :is(.btn, button.t7bb-btn, a.t7bb-btn):not(.t7bb-mini) { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: var(--btn-height-sm, 34px); min-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; line-height: 1; vertical-align: middle; }
.t7bb .t7bb-row-btns .t7bb-badge { align-self: center; }

/* ---------- Cards and notices ---------- */
.t7bb-card { border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-card-radius); background: var(--t7bb-surface); padding: 0.9rem 1.1rem; margin: 1rem 0; }
.t7bb-card > :first-child { margin-top: 0; }
.t7bb-card > :last-child { margin-bottom: 0; }
.t7bb-card summary { cursor: pointer; font-weight: 600; }
.t7bb-card[open] summary { margin-bottom: 0.75rem; }
.t7bb-empty { background: var(--t7bb-soft); border-style: dashed; }
.t7bb-danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--t7bb-line); }
.t7bb-notice { padding: 0.65rem 0.9rem; border-radius: var(--t7bb-radius); margin: 0 0 1rem; border: 1px solid var(--t7bb-line); border-left: 4px solid; background: var(--t7bb-surface); }
.t7bb-notice-success { border-color: var(--t7bb-ok); }
.t7bb-notice-error { border-color: var(--t7bb-bad); }
.t7bb-notice-info { border-color: var(--color-border-hover, var(--t7bb-line)); }

/* ---------- Badges ---------- */
.t7bb-badge { display: inline-block; padding: 0 0.5rem; border-radius: 999px; font-size: 0.75em; font-weight: 600; line-height: 1.6; border: 1px solid currentColor; white-space: nowrap; }
/* Status colours (same green / yellow / red as the rest of the site): green = open or OK, yellow = waiting, red = problem. */
/* Written with extra weight so an older copy of this file (cached by LiteSpeed UCSS, say) can't win. */
body .t7bb-badge:is(.t7bb-badge-active, .t7bb-badge-confirmed, .t7bb-badge-registration, .t7bb-badge-approved, .t7bb-badge-ok) { color: var(--tk7-status-ok, var(--t7bb-ok)); }
body .t7bb-badge:is(.t7bb-badge-pending, .t7bb-badge-reported, .t7bb-badge-applied, .t7bb-badge-warn) { color: var(--tk7-status-warn, var(--t7bb-warn)); }
body .t7bb-badge:is(.t7bb-badge-disputed, .t7bb-badge-dead) { color: var(--tk7-status-bad, var(--t7bb-bad)); }
.t7bb-badge-retired, .t7bb-badge-finished, .t7bb-badge-scheduled, .t7bb-badge-deleted { opacity: 0.7; }

/* ---------- Tables ---------- */
.t7bb-table-wrap { overflow-x: auto; margin: 0.4rem 0 1.25rem; -webkit-overflow-scrolling: touch; }
.t7bb .t7bb-table { width: 100%; border-collapse: collapse; font-size: 0.93em; margin: 0; border: 0; }
.t7bb .t7bb-table th, .t7bb .t7bb-table td { padding: 0.45rem 0.55rem; border: 0; border-bottom: 1px solid var(--t7bb-line); text-align: left; vertical-align: middle; background: none; }
.t7bb .t7bb-table thead th { font-size: 0.8em; font-weight: 600; opacity: 0.75; border-bottom-width: 2px; white-space: nowrap; }
.t7bb .t7bb-table tbody tr:hover > td { background: var(--t7bb-soft); }
.t7bb-table abbr { text-decoration: none; cursor: help; }
.t7bb .t7bb-c, .t7bb .t7bb-table :is(th, td).t7bb-c { text-align: center; }
.t7bb .t7bb-r, .t7bb .t7bb-table :is(th, td).t7bb-r { text-align: right; }
/* Match list: both team columns equally wide, the result centred between them */
.t7bb .t7bb-matches :is(th, td).t7bb-m-team { width: 30%; text-align: left; }
.t7bb .t7bb-matches :is(th, td).t7bb-m-score { width: 5.5rem; padding-inline: 0.75rem; text-align: center; }
.t7bb-skills { min-width: 11rem; font-size: 0.88em; }
.t7bb-score { font-weight: 700; white-space: nowrap; }
.t7bb-pts { font-weight: 700; }
.t7bb-standings tbody tr:first-child td { font-weight: 600; }
.t7bb-match-scheduled .t7bb-score { opacity: 0.5; }
.t7bb-dim td { opacity: 0.55; }

/* Team sheet with 16 slots */
.t7bb .t7bb-roster-edit td { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.t7bb-roster-edit .t7bb-slot { font-weight: 700; width: 2.2rem; }
.t7bb-roster-edit .t7bb-notes { white-space: nowrap; }
.t7bb-roster-edit .t7bb-notes a { text-decoration: none; }
.t7bb-drag-col { width: 1.8rem; padding-right: 0 !important; }
.t7bb .t7bb-handle {
	width: 1.6rem; height: 1.8rem; padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; color: inherit;
	font-size: 1.1rem; line-height: 1; cursor: grab; touch-action: none; opacity: 0.5; box-shadow: none; min-height: 0;
}
.t7bb .t7bb-handle:hover, .t7bb .t7bb-handle:focus-visible { opacity: 1; background: var(--t7bb-soft); color: inherit; }
.t7bb-dragging > td { background: var(--t7bb-soft) !important; opacity: 0.7; }
.t7bb-dragging .t7bb-handle { cursor: grabbing; }
.t7bb-drop > td { box-shadow: inset 0 2px 0 var(--t7bb-accent), inset 0 -2px 0 var(--t7bb-accent); }
.t7bb-saving { opacity: 0.6; pointer-events: none; }
.t7bb-empty-slot .t7bb-slot { opacity: 0.45; }
.t7bb .t7bb-empty-slot input[type="text"], .t7bb .t7bb-empty-slot select {
	width: 100%; min-width: 8rem; height: auto; min-height: 0; padding: 0.3rem 0.45rem; margin: 0;
	font: inherit; font-size: 0.95em; line-height: 1.3; border-radius: 4px;
}
.t7bb .t7bb-empty-slot select { min-width: 11rem; }
/* Name field and position dropdown in empty slots: same height */
.t7bb .t7bb-roster .t7bb-empty-slot input[type="text"].t7bb-new-name,
.t7bb .t7bb-roster .t7bb-empty-slot select.t7bb-slot-select { box-sizing: border-box; height: 2.25rem !important; min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; line-height: normal; }

/* ---------- Forms: Elementor's kit styles the fields; these are fallbacks ---------- */
.t7bb-form { margin: 1rem 0; }
.t7bb-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 1rem; }
.t7bb-grid > .t7bb-field { grid-column: span 12; }
.t7bb-grid > .t7bb-w-half { grid-column: span 6; }
.t7bb-grid > .t7bb-w-third { grid-column: span 4; }
.t7bb-grid > .t7bb-w-two-thirds { grid-column: span 8; }
.t7bb-grid > .t7bb-w-quarter { grid-column: span 3; }
.t7bb-field { margin: 0 0 0.9rem; }
.t7bb-field > label { display: block; font-weight: 600; font-size: 0.92em; margin-bottom: 0.3rem; }
:where(.t7bb) :where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea) {
	width: 100%; max-width: 100%; padding: 0.5rem 0.65rem; font: inherit; color: inherit;
	border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: transparent;
}
.t7bb-field input[type="color"] { width: 3.5rem; height: 2.4rem; padding: 0.15rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: transparent; cursor: pointer; }
.t7bb-field input[type="file"] { display: block; max-width: 100%; font: inherit; }
.t7bb-field :disabled { opacity: 0.6; cursor: not-allowed; }
.t7bb-help { display: block; margin-top: 0.3rem; opacity: 0.7; font-size: 0.85em; }
.t7bb-check > label, label.t7bb-check { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 400; cursor: pointer; }
.t7bb-grid > .t7bb-check { align-self: end; padding-bottom: 0.6rem; }
.t7bb-fieldset { border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); padding: 0.75rem 1rem 0; margin: 0 0 1rem; }
.t7bb-fieldset legend { font-weight: 600; padding: 0 0.35rem; }
.t7bb-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.4rem 1rem; margin-bottom: 0.5rem; }
.t7bb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.t7bb-logo-preview { margin-bottom: 0.4rem; }

/* ---------- Match report ---------- */
.t7bb-report-team { margin: 1rem 0 0.5rem; }
.t7bb-report-team .t7bb-table-wrap { margin-bottom: 0.5rem; }
.t7bb .t7bb-report-table th, .t7bb .t7bb-report-table td { padding: 0.2rem 0.3rem; }
.t7bb .t7bb-report-table select { width: auto; max-width: 11rem; min-height: 0; height: auto; padding: 0.2rem 0.3rem; font-size: 0.9em; }
.t7bb input.t7bb-tiny { width: 3.1rem !important; min-width: 0 !important; min-height: 0 !important; height: 1.9rem !important; padding: 0.2rem 0.15rem !important; text-align: center; flex: none; }
.t7bb-report-name { white-space: nowrap; }
.t7bb-report-name small { font-size: 0.8em; }
.t7bb-report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1.25rem; margin-bottom: 0.4rem; }
.t7bb-report-head h3 { margin: 0 0 0.4rem; }
.t7bb-report-fields { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.t7bb-report-fields .t7bb-field { margin: 0; }
.t7bb-report-fields .t7bb-field > label { font-size: 0.78em; margin-bottom: 0.15rem; }
.t7bb .t7bb-report-fields select, .t7bb .t7bb-report-fields input { width: auto; min-width: 7rem; max-width: 14rem; padding: 0.3rem 0.45rem; min-height: 0; height: auto; }
.t7bb .t7bb-report-fields input[type="number"] { min-width: 0; width: 5.5rem; }
.t7bb-report .t7bb-score-live { position: sticky; top: 0; z-index: 2; }
.t7bb-report-links { text-align: center; margin: 0.3rem 0 0.75rem; }
.t7bb-report-help { margin: 0.25rem 0 0.9rem; }
.t7bb-report-help summary { cursor: pointer; color: var(--t7bb-muted); }
.t7bb-report-help p { margin: 0.4rem 0 0; }
.t7bb-report-table input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--t7bb-accent); }
.t7bb-summary { margin: 1rem 0 1.5rem; }
.t7bb-scoreline { font-size: 1.3em; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0 0 0.25rem; }
.t7bb-scoreline strong { font-size: 1.4em; }
.t7bb-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2rem; }
.t7bb-two-col h4 { margin: 1rem 0 0.2rem; }
.t7bb-events { list-style: none; padding: 0; margin: 0.5rem 0; }
.t7bb-events li { padding: 0.25rem 0; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-ev { display: inline-block; min-width: 9rem; font-size: 0.88em; opacity: 0.75; }

/* ---------- Players and advancements ---------- */
.t7bb-statline { display: inline-grid; grid-template-columns: repeat(5, 3.4rem); border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); margin: 0.4rem 0 0.9rem; overflow: hidden; }
.t7bb-statline div { text-align: center; padding: 0.3rem 0; }
.t7bb-statline div + div { border-left: 1px solid var(--t7bb-line); }
.t7bb-statline span { display: block; font-size: 0.75em; opacity: 0.7; }
.t7bb-statline strong { font-size: 1.2em; }
.t7bb-adv-option h3 { margin-top: 0; }
.t7bb-adv-off { opacity: 0.6; }
.t7bb-pending { border-color: var(--t7bb-accent); border-width: 2px; }
.t7bb-choice { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.t7bb-advs { margin: 0.5rem 0; padding-left: 1.4rem; }

/* ---------- Lists ---------- */
.t7bb-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.t7bb-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-league-name { font-family: var(--t7bb-heading-font); font-size: 1.2em; font-weight: 700; text-decoration: none; }
.t7bb-league-meta { opacity: 0.7; flex: 1; }
.t7bb-leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 2rem; }
.t7bb-leaders-col h3 { margin-top: 0.5rem; }
.t7bb-leader { padding-left: 1.4rem; margin: 0; }
.t7bb-leader li { padding: 0.3rem 0; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-leader li > span { display: inline-flex; flex-direction: column; vertical-align: top; }
.t7bb-leader li > strong { float: right; font-size: 1.1em; }
.t7bb-log { list-style: none; padding: 0; margin: 0.5rem 0 0; font-size: 0.92em; }
.t7bb-log li { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-log time { opacity: 0.65; }

/* ---------- Profile ---------- */
.t7bb-profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.t7bb-profile-head img { border-radius: 50%; }
.t7bb-profile-head h2 { margin: 0; }
.t7bb-profile-head p { margin: 0.2rem 0 0; }
.t7bb-profile-head .t7bb-actions { margin-left: auto; }

@media (max-width: 640px) {
	.t7bb-grid > .t7bb-w-half, .t7bb-grid > .t7bb-w-third, .t7bb-grid > .t7bb-w-two-thirds { grid-column: span 12; }
	.t7bb-grid > .t7bb-w-quarter { grid-column: span 6; }
	.t7bb .t7bb-btn { white-space: normal; }
	.t7bb-row-actions { white-space: normal; }
	.t7bb .t7bb-row-btns { flex-wrap: wrap; }
	.t7bb-head-logo { align-items: flex-start; }
	.t7bb-logo-lg { width: 60px; height: 60px; }
	.t7bb-log li { grid-template-columns: 1fr; gap: 0.1rem; }
	.t7bb-statbar { gap: 0.1rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.t7bb * { transition: none !important; }
}

/* ---------- Skill tooltips ---------- */
.t7bb-skill { border-bottom: 1px dotted currentColor; cursor: help; }
.t7bb-skill-added { color: var(--t7bb-added, #5fb3ff); font-weight: 600; }
html[data-tk7-theme="light"] .t7bb-skill-added { --t7bb-added: #1a5fb4; }
.t7bb-skill-legend { margin: -0.75rem 0 1rem; }
.t7bb-skill:focus-visible { outline-offset: 1px; }
.t7bb-tip {
	position: fixed; z-index: 100000; display: none; max-width: min(22rem, calc(100vw - 16px));
	padding: 0.6rem 0.75rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius);
	background: var(--t7bb-surface, #fff); color: var(--theme-text, inherit); box-shadow: var(--t7bb-shadow);
	font-size: 0.85rem; line-height: 1.45; pointer-events: none;
}
html[data-tk7-theme="light"] body .t7bb-tip.t7bb-tip { background: #fff; }
.t7bb-tip strong { display: block; margin-bottom: 0.15rem; color: var(--theme-heading, inherit); }
.t7bb-skill-desc { margin: -0.4rem 0 0.9rem; min-height: 1em; color: var(--t7bb-muted); }
.t7bb-choice-desc { margin: -0.3rem 0 0.4rem 1.6rem; }

/* ---------- 0.6: segments ---------- */
.t7bb-seg + .t7bb-seg { margin-top: 0.5rem; }
.t7bb-hide-heading > :is(h2, h3):first-of-type, .t7bb-hide-heading .t7bb-section-head:first-child :is(h2, h3) { display: none; }

/* ---------- 0.6: avatars ---------- */
.t7bb-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover; overflow: hidden; color: #fff; font-weight: 700; line-height: 1; }
.t7bb-avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.t7bb-avatar-lg { width: 96px; height: 96px; font-size: 1.8rem; }
.t7bb-player-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.t7bb-player-head { display: flex; align-items: center; gap: 1.1rem; margin: 0.25rem 0 0.75rem; }
.t7bb-player-head .t7bb-title { margin: 0; }
.t7bb-player-head .t7bb-statline { margin-bottom: 0; }

/* ---------- 0.6: team editor ---------- */
.t7bb-roster-edit .t7bb-removed > td { opacity: 0.45; text-decoration: line-through; }
.t7bb-roster-edit .t7bb-removed .t7bb-row-remove { opacity: 1; text-decoration: none; }
.t7bb-roster-edit input[aria-invalid="true"] { border-color: var(--t7bb-bad) !important; }
.t7bb-field-error { display: block; color: var(--t7bb-bad); font-size: 0.78rem; line-height: 1.3; }
.t7bb-field-error:empty { display: none; }
.t7bb-chip-changed { border-color: var(--t7bb-accent); }
.t7bb .t7bb-mini:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; color: inherit; border-color: var(--t7bb-line); }
.t7bb-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; padding: 0.6rem var(--padding-horizontal, 1rem) calc(0.6rem + env(safe-area-inset-bottom, 0px)); background: var(--color-surface, #fff); border-top: 2px solid var(--t7bb-accent); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18); }
.t7bb-savebar[hidden] { display: none; }
.t7bb-savebar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; max-width: 1200px; margin: 0 auto; }
.t7bb-savebar-text { flex: 1 1 auto; }
.t7bb-savebar-error { flex: 1 1 100%; order: 3; color: var(--t7bb-bad); font-size: 0.88rem; }
.t7bb-savebar-error:empty { display: none; }
body.t7bb-has-savebar { padding-bottom: 5rem; }

/* ---------- 0.6: W / D / L ---------- */
.t7bb-wdl { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--t7bb-line); font-weight: 700; font-size: 0.85em; line-height: 1; vertical-align: middle; white-space: nowrap; }
.t7bb-wdl > span { display: inline-flex; align-items: baseline; gap: 0.2em; padding: 0.25em 0.5em; }
.t7bb-wdl small { font-size: 0.72em; font-weight: 600; opacity: 0.8; }
.t7bb-wdl-w { background: color-mix(in srgb, var(--t7bb-ok) 18%, transparent); color: var(--t7bb-ok); }
.t7bb-wdl-d { background: var(--t7bb-soft); }
.t7bb-wdl-l { background: color-mix(in srgb, var(--t7bb-bad) 16%, transparent); color: var(--t7bb-bad); }
.t7bb-wdl > span + span { border-left: 1px solid var(--t7bb-line); }
.t7bb-result { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 4px; font-weight: 700; font-size: 0.8em; }
.t7bb-result-w { background: var(--t7bb-ok); color: #fff; }
.t7bb-result-d { background: var(--t7bb-soft); border: 1px solid var(--t7bb-line); }
.t7bb-result-l { background: var(--t7bb-bad); color: #fff; }

/* ---------- 0.6: match report ---------- */
.t7bb-score-live { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1.25rem; padding: 0.75rem; margin: 0.5rem 0 0.25rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-card-radius); background: var(--t7bb-surface); font-size: 1.1em; }
.t7bb-score-live strong { font-size: 1.8em; font-variant-numeric: tabular-nums; }
.t7bb-winnings-custom[hidden] { display: none; }

@media (max-width: 640px) {
	.t7bb-avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
	.t7bb-player-head { align-items: flex-start; }
}

/* ---------- 0.8: profile tabs ---------- */
.t7bb-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-tabs a { padding: 0.55rem 1rem; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--t7bb-muted); text-decoration: none; font-weight: 600; }
.t7bb-tabs a:hover { color: var(--theme-heading, inherit); }
.t7bb-tabs a[aria-current="page"] { color: var(--theme-heading, inherit); border-bottom-color: var(--t7bb-accent); }
.t7bb-profile .t7bb-list li { gap: 0.5rem 1rem; }
.t7bb-profile .t7bb-sub { margin-bottom: 0.75rem; }

/* ---------- 0.8: deleted teams ---------- */
.t7bb-team-deleted { color: var(--t7bb-muted); }
.t7bb-team-deleted small { font-weight: 400; }

/* ---------- 0.8: before the match ---------- */
.t7bb .t7bb-pregame-sum th[scope="row"] { font-weight: 600; font-size: 0.88em; color: var(--t7bb-muted); white-space: nowrap; width: 11rem; }
.t7bb-pregame-side h3 { margin-bottom: 0.75rem; }
.t7bb-pregame-side h4 { margin: 1.25rem 0 0.5rem; }
.t7bb-pregame-side h4 small { font-weight: 400; font-size: 0.8em; margin-left: 0.4rem; }
.t7bb-induce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.5rem; }
.t7bb-induce { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.45rem 0.6rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); cursor: pointer; }
.t7bb-induce span { display: flex; flex-direction: column; min-width: 0; }
.t7bb-induce strong { font-weight: 600; font-size: 0.92em; }
.t7bb-induce small { font-size: 0.78em; color: var(--t7bb-muted); }
.t7bb .t7bb-induce input { flex: none; }
.t7bb-merc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
.t7bb-pregame-total { margin: 1rem 0 0; }
.t7bb-pregame-total .t7bb-field-error { display: inline; margin-left: 0.5rem; }
@media (max-width: 640px) {
	.t7bb-merc-row { grid-template-columns: 1fr; }
	.t7bb-report-fields { width: 100%; }
}

/* ---------- 0.8.1: buttons keep their own colours after a click ----------
   The theme (Hello Elementor) and Elementor's global button style colour every focused <button>
   (the magenta background). These rules are stronger, so a clicked button looks like it did before. */
body .t7bb .t7bb-step:is(:focus, :active):not(:hover):not(:focus-visible) { background: var(--t7bb-soft); color: inherit; border: 0; box-shadow: none; }
body .t7bb .t7bb-mini:is(:focus, :active):not(:hover):not(:focus-visible) { background: transparent; color: inherit; border-color: var(--t7bb-line); box-shadow: none; }
body .t7bb .t7bb-handle:is(:focus, :active):not(:hover):not(:focus-visible) { background: transparent; color: inherit; border: 0; box-shadow: none; }
body .t7bb .t7bb-tab:is(:focus, :active):not(:hover):not(:focus-visible) { background: transparent; color: var(--t7bb-muted); border-color: transparent; box-shadow: none; }
body .t7bb .t7bb-tab[aria-selected="true"]:is(:focus, :active):not(:hover):not(:focus-visible) { color: var(--theme-heading, inherit); border-bottom-color: var(--t7bb-accent); }

/* ---------- 0.8.1: profile picture ---------- */
.t7bb-avatar-edit { display: flex; align-items: center; gap: 1rem; }
.t7bb-avatar-edit img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.t7bb-profile-head img { object-fit: cover; }

/* ---------- 0.8.1: league page: next matches and tabs ---------- */
.t7bb-upcoming { margin: 1.25rem 0 1.5rem; }
.t7bb-upcoming h2 { margin: 0 0 0.6rem; font-size: 1.2em; }
.t7bb-fixtures { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 0.6rem; }
.t7bb-fixtures li.t7bb-fx { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.7rem 0.9rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: var(--t7bb-surface); min-width: 0; }
.t7bb-fx-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.5rem; font-size: 0.85em; color: var(--t7bb-muted); padding-bottom: 0.4rem; border-bottom: 1px solid var(--t7bb-line); }
.t7bb-fx-team { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.t7bb-fx-team .t7bb-team-with-coach { display: flex; flex: 1; min-width: 0; }
.t7bb-fixtures .t7bb-team-link { white-space: normal; align-items: flex-start; overflow-wrap: break-word; min-width: 0; }
.t7bb-fixtures .t7bb-team-link .t7bb-mark { margin-top: 0.1em; }
.t7bb-fixtures .t7bb-coach { white-space: normal; overflow-wrap: anywhere; }
.t7bb-fx-side { flex: none; font-size: 0.75rem; color: var(--t7bb-muted); padding-top: 0.15em; }
.t7bb .t7bb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.t7bb-tabs .t7bb-tab {
	margin: 0 0 -1px; padding: 0.55rem 1rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent;
	color: var(--t7bb-muted); font: inherit; font-weight: 600; cursor: pointer; box-shadow: none; min-height: 0; text-transform: none; letter-spacing: normal;
}
body .t7bb .t7bb-tabs .t7bb-tab:hover { background: transparent; color: var(--theme-heading, inherit); }
body .t7bb .t7bb-tabs .t7bb-tab[aria-selected="true"] { color: var(--theme-heading, inherit); border-bottom-color: var(--t7bb-accent); background: transparent; }
.t7bb-tabset-js .t7bb-tabpanel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.t7bb-tabset:not(.t7bb-tabset-js) .t7bb-tabs { display: none; }
.t7bb-tabpanel[hidden] { display: none; }

/* ---------- 0.8.1: petty cash and Treasury ---------- */
.t7bb-purse { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.t7bb-purse > div { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.65rem 0.8rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: var(--t7bb-soft); }
.t7bb-purse span, .t7bb-purse label { font-size: 0.8em; font-weight: 600; color: var(--t7bb-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.t7bb-purse strong { font-size: 1.3em; color: var(--theme-heading, inherit); }
.t7bb-purse small { font-size: 0.8em; color: var(--t7bb-muted); }
.t7bb .t7bb-purse .t7bb-purse-input { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 1em; text-transform: none; letter-spacing: 0; color: inherit; }
.t7bb .t7bb-purse input.t7bb-tiny { width: 4.5rem !important; }

.t7bb .t7bb-bb-optin { margin-top: 0.75rem; }

/* Light mode fields: the footer grey. The unused #tk7-id-vekt only adds weight, so this beats an older copy of this file that forced white. */
html[data-tk7-theme="light"] body .t7bb.t7bb:is(.t7bb, #tk7-id-vekt) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="color"]):not([type="file"]):not([type="hidden"]), select, textarea) { background-color: #f7f8fa !important; }

/* ---------- Join a league ---------- */
.t7bb-join-list li { justify-content: space-between; }
.t7bb-join-team { display: inline-flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.t7bb-join-team small { padding-left: 1.9rem; }
.t7bb-arena-list li { justify-content: space-between; }
.t7bb-arena { display: inline-flex; flex-direction: column; min-width: 0; }
.t7bb-m-arena { display: block; font-size: 0.8em; }
.t7bb-m-rnd { display: none; }
/* Coach under the team name in the league's team list is only needed on phones (there's a Coach column) */
.t7bb-league-teams .t7bb-coach { display: none; }
.t7bb-avatar-edit > div { flex: 1; min-width: 0; }
.t7bb input[type="file"] { max-width: 100%; min-width: 0; }

/* ---------- Phones: tables fit the screen ---------- */
@media (max-width: 640px) {
	.t7bb .t7bb-table th, .t7bb .t7bb-table td { padding: 0.4rem 0.35rem; }

	/* Less important columns are left out; the coach is shown under the team name instead */
	.t7bb-standings :is(th, td):is(:nth-child(5), :nth-child(6), :nth-child(7)),
	.t7bb-league-teams :is(th, td):is(:nth-child(2), :nth-child(3)),
	.t7bb-my-teams :is(th, td):is(:nth-child(2), :nth-child(5), :nth-child(6)),
	.t7bb-commish-leagues :is(th, td):is(:nth-child(2), :nth-child(4), :nth-child(5)),
	.t7bb-commish-pending :is(th, td):is(:nth-child(3), :nth-child(4)),
	.t7bb-commish-teams :is(th, td):is(:nth-child(2), :nth-child(3)) { display: none; }
	.t7bb-league-teams .t7bb-coach { display: block; }
	.t7bb .t7bb-table .t7bb-team-link { white-space: normal; }

	/* Matches: one card per match, everything visible without scrolling sideways */
	.t7bb .t7bb-matches, .t7bb .t7bb-matches tbody { display: block; width: 100%; }
	.t7bb .t7bb-matches thead { display: none; }
	.t7bb .t7bb-matches tr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "when res status" "league league league" "home score away" "act act act"; align-items: center; gap: 0.35rem 0.6rem; margin: 0 0 0.6rem; padding: 0.65rem 0.75rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius, 8px); background: var(--t7bb-surface); }
	.t7bb .t7bb-matches tbody tr:hover > td { background: none; }
	.t7bb .t7bb-matches td { display: block; padding: 0; border: 0; min-width: 0; width: auto !important; }
	.t7bb .t7bb-matches .t7bb-m-round { display: none; }
	.t7bb .t7bb-matches .t7bb-m-when { grid-area: when; font-size: 0.85em; color: var(--t7bb-muted); }
	.t7bb .t7bb-matches .t7bb-m-rnd { display: inline; font-weight: 600; color: var(--theme-heading, inherit); }
	.t7bb .t7bb-matches .t7bb-m-res { grid-area: res; }
	.t7bb .t7bb-matches .t7bb-m-status { grid-area: status; justify-self: end; }
	.t7bb .t7bb-matches .t7bb-m-league { grid-area: league; font-size: 0.85em; }
	.t7bb .t7bb-matches td.t7bb-m-team:nth-of-type(1), .t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team { min-width: 0; }
	.t7bb .t7bb-matches .t7bb-m-score { grid-area: score; font-size: 1.15em; }
	.t7bb .t7bb-matches .t7bb-m-team { grid-area: home; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team { grid-area: away; justify-self: end; text-align: right !important; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-with-coach { align-items: flex-end; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-link { flex-direction: row-reverse; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-link + .t7bb-coach { padding-left: 0; padding-right: 1.9rem; }
	.t7bb .t7bb-matches .t7bb-row-actions { grid-area: act; padding-top: 0.25rem; }
	.t7bb .t7bb-matches .t7bb-row-actions:empty { display: none; }
	.t7bb .t7bb-matches .t7bb-row-btns { flex-wrap: wrap; }

	/* Match report: one card per player, the numbers in a row under the name */
	.t7bb .t7bb-report-table, .t7bb .t7bb-report-table tbody { display: block; width: 100%; }
	.t7bb .t7bb-report-table thead { display: none; }
	.t7bb .t7bb-report-table tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem 0.4rem; padding: 0.6rem 0; border-bottom: 1px solid var(--t7bb-line); }
	.t7bb .t7bb-report-table td { display: block; padding: 0; border: 0; }
	.t7bb .t7bb-report-table .t7bb-report-num { display: none; }
	.t7bb .t7bb-report-table .t7bb-report-name { grid-column: 1 / -1; white-space: normal; font-weight: 600; }
	.t7bb .t7bb-report-table .t7bb-report-name[data-num]:not([data-num=""])::before { content: "#" attr(data-num) " "; color: var(--t7bb-muted); font-weight: 400; }
	.t7bb .t7bb-report-table td[data-label] { display: flex; flex-direction: column; align-items: stretch; gap: 0.15rem; text-align: center; }
	.t7bb .t7bb-report-table td[data-label]::before { content: attr(data-label); font-size: 0.72em; font-weight: 600; color: var(--t7bb-muted); }
	.t7bb .t7bb-report-table input.t7bb-tiny { width: 100% !important; }
	.t7bb .t7bb-report-table .t7bb-report-inj, .t7bb .t7bb-report-table .t7bb-report-mng { grid-column: 1 / -1; text-align: left; }
	.t7bb .t7bb-report-table .t7bb-report-inj select { width: 100% !important; max-width: none; }

	/* Pre-game summary: label column narrower */
	.t7bb .t7bb-pregame-sum th[scope="row"] { width: auto; white-space: normal; }
}

/* ---------- Avatar crop dialog ---------- */
.t7bb-crop { width: min(360px, calc(100vw - 32px)); max-width: none; padding: 1.25rem; border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius, 8px); background: var(--color-surface, #fff); color: var(--color-text, inherit); box-sizing: border-box; }
.t7bb-crop::backdrop { background: rgba(0, 0, 0, 0.6); }
.t7bb-crop h3 { margin: 0 0 0.25rem; }
.t7bb-crop p { margin: 0 0 0.75rem; }
.t7bb-crop-box { width: 100%; aspect-ratio: 1; background: var(--t7bb-soft); border-radius: 4px; overflow: hidden; }
.t7bb-crop-box canvas { display: block; touch-action: none; cursor: grab; }
.t7bb-crop-box canvas:active { cursor: grabbing; }
.t7bb-crop-zoom { display: flex; align-items: center; gap: 0.75rem; margin: 0.75rem 0; }
.t7bb-crop-zoom input { flex: 1; min-width: 0; accent-color: var(--t7bb-accent); }
.t7bb-crop .t7bb-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin: 0; }
.t7bb .t7bb-crop-redo, .t7bb .t7bb-crop-redo:hover, .t7bb .t7bb-crop-redo:focus { display: block; margin: 0.35rem 0; padding: 0; min-height: 0; height: auto; border: 0; background: none; color: var(--color-heading, inherit); font: inherit; font-size: 0.9em; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none; }
.t7bb .t7bb-crop-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 0.5rem; }

/* ---------- Breathing room (0.12.0) ----------
   Looser spacing everywhere except the roster and the match report form,
   which stay compact because they carry many columns. */
:where(.t7bb) :where(h2, h3) { margin: 2.25rem 0 0.85rem; }
.t7bb-nav { margin-bottom: 1.75rem; padding-bottom: 0.65rem; }
.t7bb-tabs { margin: 0.25rem 0 1.75rem; }
.t7bb-sub { gap: 0.4rem 1rem; margin: 0.35rem 0 0.75rem; }
.t7bb-actions { gap: 0.65rem; margin: 1.25rem 0; }
.t7bb-toolbar { margin: 0.85rem 0 1.5rem; }
.t7bb-card { padding: 1.25rem 1.4rem; margin: 1.25rem 0; }
.t7bb-card[open] summary { margin-bottom: 1rem; }
.t7bb-danger-zone { margin-top: 2.75rem; padding-top: 1.25rem; }
.t7bb-notice { padding: 0.8rem 1rem; margin-bottom: 1.25rem; }
.t7bb-table-wrap { margin: 0.6rem 0 1.75rem; }
.t7bb .t7bb-table { line-height: 1.45; }
.t7bb .t7bb-table:not(.t7bb-roster):not(.t7bb-roster-edit):not(.t7bb-report-table):not(.t7bb-matches) :is(th, td) { padding: 0.7rem 0.75rem; }
@media (min-width: 641px) { .t7bb .t7bb-table.t7bb-matches :is(th, td) { padding-top: 0.7rem; padding-bottom: 0.7rem; } }
.t7bb .t7bb-table.t7bb-roster:not(.t7bb-roster-edit) :is(th, td) { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.t7bb-grid { gap: 0 1.25rem; }
.t7bb-field { margin-bottom: 1.15rem; }
.t7bb-field > label { margin-bottom: 0.4rem; }
.t7bb-help { margin-top: 0.4rem; }
.t7bb-fieldset { padding: 1rem 1.25rem 0.25rem; margin-bottom: 1.25rem; }
.t7bb-checklist { gap: 0.6rem 1.25rem; }
.t7bb-list li { padding: 0.75rem 0; gap: 0.6rem 1rem; }
.t7bb-facts { gap: 0.9rem var(--grid-gap, 1.5rem); margin: 1rem 0 1.25rem; }
.t7bb-facts div { padding-top: 0.55rem; }
.t7bb-statbar { gap: 0.35rem 1.75rem; margin-top: 0.6rem; }
.t7bb-staff { gap: 0.75rem; margin: 1rem 0 0.75rem; }
.t7bb-staff-row { padding: 0.75rem 0.9rem; }
.t7bb .t7bb-league-grid { gap: 1rem; }
.t7bb .t7bb-league-card-link { padding: 1.25rem; gap: 1.1rem; }
.t7bb .t7bb-league-body { gap: 0.35rem; }
.t7bb-log li { padding: 0.55rem 0; }
.t7bb-events li, .t7bb-leader li { padding: 0.45rem 0; }
.t7bb-two-col h4 { margin: 1.4rem 0 0.4rem; }
.t7bb-profile-head { gap: 1.25rem; margin-bottom: 1.5rem; }
.t7bb-head, .t7bb-player-head { margin-bottom: 1.1rem; }
@media (max-width: 767px) {
	:where(.t7bb) :where(h2, h3) { margin: 1.85rem 0 0.7rem; }
	.t7bb-card { padding: 1rem 1.05rem; }
	.t7bb .t7bb-table:not(.t7bb-roster):not(.t7bb-roster-edit):not(.t7bb-report-table):not(.t7bb-matches) :is(th, td) { padding: 0.6rem 0.55rem; }
	.t7bb .t7bb-league-card-link { padding: 1rem; gap: 0.85rem; }
}

/* ---------- 0.13: match report and pre-match on mobile ---------- */
.t7bb .t7bb-report-fields { display: grid; grid-template-columns: repeat(5, auto); align-items: start; gap: 0.6rem 0.9rem; }
.t7bb .t7bb-report-fields .t7bb-help { font-size: 0.75em; max-width: 13rem; }
.t7bb .t7bb-report-fields .t7bb-ff input, .t7bb .t7bb-report-fields .t7bb-win input { width: 6rem; }
.t7bb .t7bb-stall { align-self: center; margin-top: 1.1rem; font-size: 0.9em; white-space: nowrap; }
.t7bb .t7bb-tap-cell { position: relative; }
.t7bb .t7bb-tap {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
	min-width: 2.75rem; min-height: 2.75rem; height: auto; padding: 0.2rem 0.45rem; margin: 0;
	border: 1px solid var(--t7bb-line); border-radius: var(--t7bb-radius); background: var(--t7bb-surface); color: inherit;
	font: inherit; line-height: 1.1; cursor: pointer; box-shadow: none; text-transform: none; touch-action: manipulation; user-select: none;
}
.t7bb .t7bb-tap-k { display: none; font-size: 0.7em; font-weight: 600; color: var(--t7bb-muted); letter-spacing: 0.03em; }
.t7bb .t7bb-tap-n { font-weight: 700; font-size: 1.05em; font-variant-numeric: tabular-nums; }
.t7bb .t7bb-tap-on .t7bb-tap { border-color: var(--t7bb-accent); background: color-mix(in srgb, var(--t7bb-accent) 14%, var(--t7bb-surface)); }
.t7bb .t7bb-tap:hover, .t7bb .t7bb-tap:focus-visible { border-color: var(--t7bb-accent); background: color-mix(in srgb, var(--t7bb-accent) 10%, var(--t7bb-surface)); color: inherit; }
.t7bb .t7bb-tap-minus {
	position: absolute; top: -0.35rem; right: -0.15rem; width: 1.5rem; height: 1.5rem; min-height: 0; padding: 0; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--t7bb-line); border-radius: 50%; background: var(--color-black, var(--t7bb-surface)); color: inherit;
	font: inherit; font-size: 0.95rem; line-height: 1; cursor: pointer; box-shadow: none;
}
.t7bb .t7bb-tap-minus[hidden] { display: none; }
.t7bb .t7bb-tap-minus:hover, .t7bb .t7bb-tap-minus:focus-visible { background: var(--t7bb-accent); border-color: var(--t7bb-accent); color: var(--color-on-accent, #111); }
.t7bb .t7bb-report-table .t7bb-tap-cell { padding: 0.35rem 0.3rem; }

/* Inducements: chosen ones as a compact list, the rest in a dropdown. */
.t7bb .t7bb-induce-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.4rem 0.75rem; }
.t7bb .t7bb-induce-compact .t7bb-induce { padding: 0.3rem 0.3rem 0.3rem 0.7rem; }
.t7bb .t7bb-induce-compact .t7bb-induce[hidden] { display: none; }
.t7bb .t7bb-induce-compact .t7bb-step { width: 2.6rem; height: 2.6rem; }
.t7bb select.t7bb-induce-add { display: block; width: 100%; max-width: 24rem; margin: 0.6rem 0 0.25rem; }
.t7bb select.t7bb-induce-add[hidden] { display: none; }
.t7bb .t7bb-pregame h4 { margin: 1.5rem 0 0.6rem; }
.t7bb .t7bb-merc-row[hidden], .t7bb .t7bb-pregame .t7bb-field[hidden], .t7bb .t7bb-merc-row input[hidden] { display: none; }
.t7bb .t7bb-pregame-sum th[scope="row"] { width: auto; }

@media (max-width: 640px) {
	.t7bb .t7bb-report-fields { grid-template-columns: 1fr 1fr; width: 100%; }
	.t7bb .t7bb-report-fields .t7bb-ff input, .t7bb .t7bb-report-fields .t7bb-win input, .t7bb .t7bb-report-fields select { width: 100%; max-width: none; min-height: 2.75rem; }
	.t7bb .t7bb-stall { grid-column: 1 / -1; margin-top: 0; }
	.t7bb .t7bb-report-table tr { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem 0.4rem; padding: 0.75rem 0; }
	.t7bb .t7bb-report-table td[data-label].t7bb-tap-cell::before { content: none; }
	.t7bb .t7bb-report-table .t7bb-tap { width: 100%; flex-direction: column; gap: 0.1rem; min-height: 3.25rem; }
	.t7bb .t7bb-tap-k { display: block; }
	.t7bb .t7bb-report-table .t7bb-report-inj select { min-height: 2.75rem; }
	.t7bb .t7bb-pregame input, .t7bb .t7bb-pregame select { min-height: 2.75rem; }
	.t7bb .t7bb-pregame-sum { font-size: 0.88em; }
}

/* Profile picture in the profile header doubles as the "change picture" button. */
.t7bb-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.t7bb .t7bb-avatar-quick { margin: 0; }
.t7bb .t7bb-avatar-quick-field { position: relative; margin: 0; }
.t7bb .t7bb-avatar-btn { position: relative; display: block; width: 88px; height: 88px; margin: 0; cursor: pointer; border-radius: 50%; }
.t7bb .t7bb-avatar-btn img, .t7bb .t7bb-avatar-quick .t7bb-crop-preview { display: block; width: 88px; height: 88px; margin: 0; border-radius: 50%; object-fit: cover; }
.t7bb .t7bb-avatar-ico { position: absolute; top: -2px; right: -2px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--t7bb-accent); color: var(--color-on-accent, #111); border: 2px solid var(--color-black, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .15s ease; }
.t7bb .t7bb-avatar-btn:hover .t7bb-avatar-ico, .t7bb .t7bb-avatar-quick:focus-within .t7bb-avatar-ico { transform: scale(1.08); }
.t7bb .t7bb-avatar-quick:focus-within .t7bb-avatar-btn { outline: 2px solid var(--t7bb-accent); outline-offset: 3px; }
.t7bb .t7bb-avatar-quick .t7bb-crop-redo { display: none !important; }
.t7bb .t7bb-avatar-quick.t7bb-saving .t7bb-avatar-btn { opacity: .6; pointer-events: none; }
.t7bb .t7bb-mini.t7bb-mini-link { width: auto; height: auto; margin: 0.35rem 0 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--t7bb-muted); font-size: 0.85em; text-decoration: underline; text-underline-offset: 0.15em; }
.t7bb .t7bb-mini.t7bb-mini-link:hover, .t7bb .t7bb-mini.t7bb-mini-link:focus-visible { background: none; color: var(--theme-heading, inherit); }

/* Nav: "Blood Bowl" on its own line, the links on one line below. Count bubble on Commish-panel. */
.t7bb .t7bb-nav { flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.t7bb .t7bb-nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; }
.t7bb .t7bb-nav-links a { white-space: nowrap; }
.t7bb .tk7-varsel { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--t7bb-accent); color: var(--color-on-accent, #111); font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 0.1em; }

/* ---------- Team colours in more places (0.13) ---------- */
.t7bb .t7bb-roster thead th { border-bottom: 2px solid var(--t7bb-team); }
.t7bb .t7bb-player-head { border-left: 6px solid var(--t7bb-team); padding-left: 0.9rem; }
.t7bb .t7bb-report-team { border-left: 4px solid var(--t7bb-team); padding-left: 0.9rem; }
.t7bb .t7bb-pregame-side { border-left: 4px solid var(--t7bb-team); }
.t7bb .t7bb-summary-team { border-top: 3px solid var(--t7bb-team); padding-top: 0.25rem; }
.t7bb .t7bb-score-live { border-left: 5px solid var(--t7bb-home, var(--t7bb-line)); border-right: 5px solid var(--t7bb-away, var(--t7bb-line)); }
.t7bb .t7bb-fixtures li.t7bb-fx { position: relative; overflow: hidden; }
.t7bb .t7bb-fixtures li.t7bb-fx::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--t7bb-home, transparent) 0 50%, var(--t7bb-away, transparent) 50% 100%); }
@media (max-width: 640px) {
	.t7bb .t7bb-matches tr { position: relative; overflow: hidden; }
	.t7bb .t7bb-matches tr::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--t7bb-home, transparent) 0 50%, var(--t7bb-away, transparent) 50% 100%); }
}

/* ---------- Long team and coach names never break a match card ---------- */
.t7bb .t7bb-matches .t7bb-team-with-coach { max-width: 100%; min-width: 0; }
.t7bb .t7bb-matches .t7bb-team-link { white-space: normal; align-items: flex-start; overflow-wrap: anywhere; min-width: 0; }
.t7bb .t7bb-matches .t7bb-team-link .t7bb-mark { margin-top: 0.1em; }
.t7bb .t7bb-matches .t7bb-coach, .t7bb .t7bb-fixtures .t7bb-coach, .t7bb .t7bb-score-live .t7bb-coach { white-space: normal; overflow-wrap: anywhere; }
.t7bb .t7bb-score-live > span { min-width: 0; overflow-wrap: anywhere; }
.t7bb .t7bb-score-live .t7bb-team-link { white-space: normal; }
@media (min-width: 641px) {
	.t7bb .t7bb-matches td.t7bb-m-team { max-width: 16rem; }
}
.t7bb :is(h2, h3, h4, .t7bb-score-live, .t7bb-pregame-sum, .t7bb-scoreline) .t7bb-team-link { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.t7bb :is(h2, h3, h4, .t7bb-pregame-sum) .t7bb-coach { white-space: normal; overflow-wrap: anywhere; }
.t7bb .t7bb-pregame-sum { table-layout: fixed; }
.t7bb .t7bb-pregame-sum th[scope="row"] { width: 34%; white-space: normal; }
@media (max-width: 640px) {
	.t7bb .t7bb-table .t7bb-team-link, .t7bb .t7bb-table .t7bb-coach { overflow-wrap: break-word; white-space: normal; }
}
.t7bb .t7bb-report-fields input[type="checkbox"] { width: 1.15rem !important; min-width: 0; height: 1.15rem; min-height: 0 !important; padding: 0; flex: none; }
.t7bb .t7bb-induce > .t7bb-stepper { display: inline-flex; flex-direction: row; align-items: stretch; }
.t7bb .t7bb-induce > .t7bb-stepper > .t7bb-staff-count { display: inline-flex; align-items: center; justify-content: center; }

/* Match cards on phones: home and away on their own lines, so long names get the full width. */
@media (max-width: 640px) {
	.t7bb .t7bb-matches tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when status" "res res" "league league" "home score" "away score" "act act"; }
	.t7bb .t7bb-matches .t7bb-m-res { justify-self: start; }
	.t7bb .t7bb-matches .t7bb-m-res:empty { display: none; }
	.t7bb .t7bb-matches .t7bb-m-score { align-self: center; padding-left: 0.75rem; border-left: 1px solid var(--t7bb-line); }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team { grid-area: away; justify-self: start; text-align: left !important; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-with-coach { align-items: flex-start; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-link { flex-direction: row; }
	.t7bb .t7bb-matches .t7bb-m-score + .t7bb-m-team .t7bb-team-link + .t7bb-coach { padding-left: 1.9rem; padding-right: 0; }
	.t7bb .t7bb-matches .t7bb-team-link, .t7bb .t7bb-matches .t7bb-coach { overflow-wrap: break-word; word-break: normal; }
}
.t7bb .screen-reader-text, .tk7-konto .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 0.14: text on one line shares a baseline ---------- */
/* Rows that mix links, muted text, badges and team marks line up on the text, not on the boxes. */
.t7bb .t7bb-sub { align-items: baseline; }
.t7bb .t7bb-team-link { align-items: baseline; }
.t7bb .t7bb-team-link > .t7bb-mark { align-self: center; }
.t7bb .t7bb-badge { vertical-align: baseline; }
.t7bb .t7bb-nav-links > a { display: inline-flex; align-items: baseline; }
.t7bb .t7bb-nav-links .tk7-varsel { align-self: center; }
.t7bb .t7bb-list > li { align-items: baseline; }
.t7bb .t7bb-league-top { align-items: baseline; }
.t7bb .t7bb-league-top .t7bb-badge { margin-top: 0; }

/* Links to a coach's profile look like the text around them until hovered. */
.t7bb a.t7bb-coach-link { color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.15em; }
.t7bb a.t7bb-coach-link:hover { text-decoration-color: currentColor; color: var(--theme-heading, inherit); }

/* ---------- 0.14: stories, bios and coach profiles ---------- */
.t7bb-avatar-xs { width: 28px; height: 28px; font-size: 0.7rem; border-radius: 50%; object-fit: cover; flex: none; }
.t7bb .t7bb-prose { max-width: 68ch; line-height: 1.65; }
.t7bb .t7bb-prose > :first-child { margin-top: 0; }
.t7bb .t7bb-prose p { margin: 0 0 0.9em; }
.t7bb .t7bb-prose :is(h3, h4) { margin: 1.4em 0 0.4em; }
.t7bb .t7bb-prose :is(ul, ol) { margin: 0 0 0.9em 1.3em; padding: 0; }
.t7bb .t7bb-prose blockquote { margin: 1em 0; padding: 0.2em 0 0.2em 1rem; border-left: 3px solid var(--t7bb-team, var(--color-accent, #FA4616)); color: var(--color-muted, inherit); font-style: italic; }
.t7bb .t7bb-prose a { text-decoration: underline; }
.t7bb .t7bb-bio { margin: 0.5rem 0 1.5rem; }

.t7bb .t7bb-stories { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.t7bb .t7bb-story-card { margin: 0; padding: 0; display: flex; flex-direction: column; min-width: 0; background: var(--color-surface, rgba(255,255,255,0.03)); border: 1px solid var(--color-border, rgba(255,255,255,0.12)); border-top: 4px solid var(--t7bb-team, var(--color-border, #555)); border-radius: var(--t7bb-radius, 10px); overflow: hidden; }
.t7bb .t7bb-story-pic-link { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-secondary, #111); }
.t7bb .t7bb-story-pic { width: 100%; height: 100%; object-fit: cover; display: block; }
.t7bb .t7bb-story-body { padding: 0.85rem 1rem 1rem; min-width: 0; }
.t7bb .t7bb-story-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0 0 0.35rem; font-size: 0.85rem; color: var(--color-muted, inherit); }
.t7bb .t7bb-story-meta .t7bb-team-link { white-space: normal; overflow-wrap: anywhere; font-size: inherit; }
.t7bb .t7bb-story-meta .t7bb-mark { width: 1rem; height: 1rem; }
.t7bb .t7bb-story-title { margin: 0 0 0.35rem; font-size: 1.1rem; line-height: 1.3; overflow-wrap: break-word; }
.t7bb .t7bb-story-title a { color: var(--theme-heading, inherit); text-decoration: none; }
.t7bb .t7bb-story-title a:hover { text-decoration: underline; }
.t7bb .t7bb-story-excerpt { margin: 0; font-size: 0.92rem; color: var(--color-muted, inherit); overflow-wrap: break-word; }
.t7bb .t7bb-story-head { border-left: 6px solid var(--t7bb-team, var(--color-border, #555)); padding-left: 0.9rem; margin: 0.25rem 0 1rem; }
.t7bb .t7bb-story-head .t7bb-sub { margin: 0; }
.t7bb .t7bb-story-cover { margin: 0 0 1.25rem; }
.t7bb .t7bb-story-cover img { width: 100%; max-height: 28rem; object-fit: cover; border-radius: var(--t7bb-radius, 10px); display: block; }
.t7bb .t7bb-story-text { margin-bottom: 1.5rem; font-size: 1.05rem; }
.t7bb .t7bb-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

.t7bb .t7bb-chips { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.t7bb .t7bb-chips li { margin: 0; padding: 0; border: 0; }
.t7bb .t7bb-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem; border: 1px solid var(--color-border, #444); border-radius: 999px; text-decoration: none; color: inherit; }
.t7bb .t7bb-chip:hover { border-color: var(--color-border-hover, #777); }

/* Story form */
.t7bb .t7bb-story-players { border: 0; padding: 0; margin: 0; min-width: 0; }
.t7bb .t7bb-pick:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.4rem; }
.t7bb .t7bb-pick-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border: 1px solid var(--color-border, #444); border-radius: var(--t7bb-radius, 10px); cursor: pointer; min-height: 44px; min-width: 0; }
.t7bb .t7bb-pick-item span { overflow-wrap: anywhere; min-width: 0; }
.t7bb .t7bb-pick-item:has(input:checked) { border-color: var(--color-accent, #FA4616); background: color-mix(in srgb, var(--color-accent, #FA4616) 10%, transparent); }
.t7bb .t7bb-pick-item input { width: 1.1rem; height: 1.1rem; flex: none; margin: 0; accent-color: var(--color-accent, #FA4616); }
.t7bb .t7bb-story-pic-preview img { max-width: 16rem; height: auto; border-radius: var(--t7bb-radius, 10px); display: block; margin-bottom: 0.5rem; }

/* Rich text editor */
.t7bb .t7bb-rich { border: 1px solid var(--color-border, #444); border-radius: var(--t7bb-radius, 10px); background: var(--color-input, transparent); overflow: hidden; }
.t7bb .t7bb-rich:focus-within { border-color: var(--color-accent, #FA4616); }
.t7bb .t7bb-rich.t7bb-rich-empty { border-color: var(--t7bb-bad, #c0352b); }
.t7bb .t7bb-rich-bar { display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0.3rem; border-bottom: 1px solid var(--color-border, #444); background: var(--color-surface, transparent); }
.t7bb .t7bb-rich-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 0.5rem; border-radius: 6px; cursor: pointer; color: var(--theme-text, inherit); font: 600 0.95rem/1 inherit; }
.t7bb .t7bb-rich-btn:hover { background: var(--color-surface-hover, rgba(127,127,127,0.15)); }
.t7bb .t7bb-rich-btn:focus-visible { outline: 2px solid var(--color-accent, #FA4616); outline-offset: -2px; }
.t7bb .t7bb-rich-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--color-accent, #FA4616) 18%, transparent); color: var(--theme-heading, inherit); }
.t7bb .t7bb-rich-area { padding: 0.75rem 0.9rem; line-height: 1.6; outline: none; overflow-wrap: break-word; color: var(--theme-text, inherit); }
.t7bb .t7bb-rich-area > :first-child { margin-top: 0; }
.t7bb .t7bb-rich-area p { margin: 0 0 0.8em; }
.t7bb .t7bb-rich-area :is(ul, ol) { margin: 0 0 0.8em 1.3em; padding: 0; }
.t7bb .t7bb-rich-area blockquote { margin: 0.6em 0; padding-left: 0.9rem; border-left: 3px solid var(--color-border-hover, #777); font-style: italic; }
.t7bb .t7bb-rich-area h3 { margin: 0.8em 0 0.3em; font-size: 1.15rem; }

/* Coach profile and list */
.t7bb .t7bb-coach-head { display: flex; align-items: center; gap: 1.25rem; margin: 0.25rem 0 1rem; }
.t7bb .t7bb-coach-head img { border-radius: 50%; object-fit: cover; flex: none; }
.t7bb .t7bb-coach-head .t7bb-title { margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.t7bb .t7bb-coach-head .t7bb-facts { margin: 0; }
.t7bb .t7bb-coach-bio { max-width: 68ch; }
.t7bb .t7bb-team-cards { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0.75rem; }
.t7bb .t7bb-team-card { margin: 0; display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; min-width: 0; background: var(--color-surface, transparent); border: 1px solid var(--color-border, #444); border-left: 5px solid var(--t7bb-team, var(--color-border, #555)); border-radius: var(--t7bb-radius, 10px); }
.t7bb .t7bb-team-card > div { min-width: 0; }
.t7bb .t7bb-team-card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.t7bb .t7bb-team-card h3 a { color: var(--theme-heading, inherit); text-decoration: none; }
.t7bb .t7bb-team-card h3 a:hover { text-decoration: underline; }
.t7bb .t7bb-team-card .t7bb-sub { margin: 0; gap: 0.2rem 0.75rem; }
.t7bb .t7bb-coach-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 0.75rem; }
.t7bb .t7bb-coach-grid li { margin: 0; padding: 0; border: 0; }
.t7bb .t7bb-coach-card { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem; border: 1px solid var(--color-border, #444); border-radius: var(--t7bb-radius, 10px); text-decoration: none; color: inherit; background: var(--color-surface, transparent); min-width: 0; }
.t7bb .t7bb-coach-card:hover { border-color: var(--color-border-hover, #777); }
.t7bb .t7bb-coach-card img { border-radius: 50%; flex: none; object-fit: cover; }
.t7bb .t7bb-coach-card span { display: flex; flex-direction: column; min-width: 0; }
.t7bb .t7bb-coach-card small { overflow-wrap: anywhere; }
@media (max-width: 600px) {
	.t7bb .t7bb-coach-head { gap: 0.9rem; align-items: flex-start; }
	.t7bb .t7bb-coach-head img { width: 72px; height: 72px; }
	.t7bb .t7bb-story-text { font-size: 1rem; }
}

.t7bb .t7bb-story-heading { margin: 0 0 0.35rem; line-height: 1.15; overflow-wrap: break-word; }
.t7bb span.form-label { display: block; }
.t7bb .t7bb-player-head > div { min-width: 0; flex: 1; }
.t7bb .t7bb-statline { grid-template-columns: repeat(5, minmax(0, 3.4rem)); max-width: 100%; }
/* The links stay on one line: tighter on small phones, and they scroll sideways rather than wrap. */
.t7bb .t7bb-nav-links { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.t7bb .t7bb-nav-links::-webkit-scrollbar { display: none; }
@media (max-width: 480px) {
	.t7bb .t7bb-nav-links { gap: 0.25rem 0.95rem; font-size: 0.95rem; }
}
.t7bb .t7bb-coach-facts { margin: 0 0 1rem; }

/* ---------- 0.15: icons ---------- */
.t7bb .t7bb-ico { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }
.t7bb :is(.btn, button, a.t7bb-btn) > .t7bb-ico:first-child { margin-right: 0.45em; }
.t7bb .t7bb-ico-sm { width: 0.95em; height: 0.95em; margin-right: 0.3em; opacity: 0.75; }
.t7bb .t7bb-role { display: inline-block; margin-left: 0.35em; padding: 0 0.4em; font-size: 0.75em; line-height: 1.5; border-radius: 4px; background: var(--color-surface-hover, rgba(127,127,127,0.15)); color: var(--color-muted, inherit); white-space: nowrap; vertical-align: 0.1em; }
.t7bb-badge-draft { color: var(--color-muted, #888); }

/* ---------- 0.15: match cards, balanced around the score ---------- */
.t7bb .t7bb-mcards { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.t7bb .t7bb-mcard { margin: 0; padding: 0.8rem 1rem 0.9rem; background: var(--color-surface, transparent); border: 1px solid var(--color-border, #444); border-radius: var(--t7bb-radius, 10px); min-width: 0; position: relative; overflow: hidden; }
.t7bb .t7bb-mcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 50%; height: 3px; background: var(--t7bb-home, transparent); }
.t7bb .t7bb-mcard::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 50%; height: 3px; background: var(--t7bb-away, transparent); }
.t7bb .t7bb-mc-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1rem; padding-bottom: 0.6rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--color-border, #444); font-size: 0.875rem; color: var(--color-muted, inherit); }
.t7bb .t7bb-mc-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.1rem; min-width: 0; }
.t7bb .t7bb-mc-when > span { white-space: nowrap; }
.t7bb .t7bb-mc-round { font-weight: 600; color: var(--theme-heading, inherit); }
.t7bb .t7bb-mc-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; margin-left: auto; }
.t7bb .t7bb-mc-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.t7bb .t7bb-mc-team { min-width: 0; }
.t7bb .t7bb-mc-team .t7bb-team-with-coach { display: flex; flex-direction: column; gap: 0.1rem; }
.t7bb .t7bb-mc-team .t7bb-team-link { white-space: normal; overflow-wrap: break-word; min-width: 0; font-size: 1.05rem; align-items: center; }
.t7bb .t7bb-mc-team .t7bb-team-link > .t7bb-mark { width: 1.8rem; height: 1.8rem; }
.t7bb .t7bb-mc-team .t7bb-coach { white-space: normal; overflow-wrap: anywhere; padding: 0; }
.t7bb .t7bb-mc-a { text-align: right; }
.t7bb .t7bb-mc-a .t7bb-team-link { flex-direction: row-reverse; justify-content: flex-start; }
.t7bb .t7bb-mc-a .t7bb-team-with-coach { align-items: flex-end; }
.t7bb .t7bb-mc-a .t7bb-team-link + .t7bb-coach { padding-right: 2.3rem; }
.t7bb .t7bb-mc-b .t7bb-team-link + .t7bb-coach { padding-left: 2.3rem; }
.t7bb .t7bb-mc-score { text-align: center; min-width: 4.5rem; }
.t7bb .t7bb-mc-score strong { font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.t7bb .t7bb-mc-score strong span[aria-hidden] { margin: 0 0.2em; color: var(--color-muted, inherit); font-weight: 400; }
.t7bb .t7bb-mc-vs { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted, inherit); padding: 0.25rem 0.6rem; border: 1px solid var(--color-border, #444); border-radius: 999px; }
.t7bb .t7bb-mc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border, #444); }
@media (max-width: 600px) {
	.t7bb .t7bb-mcard { padding: 0.75rem 0.8rem 0.85rem; }
	.t7bb .t7bb-mc-main { gap: 0.5rem; }
	.t7bb .t7bb-mc-team .t7bb-team-link { flex-direction: column; align-items: center; gap: 0.3rem; font-size: 0.95rem; text-align: center; }
	.t7bb .t7bb-mc-main { align-items: start; }
	.t7bb .t7bb-mc-score { align-self: center; }
	.t7bb .t7bb-mc-a .t7bb-team-link { flex-direction: column; }
	.t7bb .t7bb-mc-team, .t7bb .t7bb-mc-a { text-align: center; }
	.t7bb .t7bb-mc-team .t7bb-team-with-coach, .t7bb .t7bb-mc-a .t7bb-team-with-coach { align-items: center; }
	.t7bb .t7bb-mc-a .t7bb-team-link + .t7bb-coach, .t7bb .t7bb-mc-b .t7bb-team-link + .t7bb-coach { padding: 0; text-align: center; }
	.t7bb .t7bb-mc-score { min-width: 3.2rem; }
	.t7bb .t7bb-mc-score strong { font-size: 1.35rem; }
	.t7bb .t7bb-mc-tags { margin-left: 0; }
}

/* 0.15: sending a team for approval */
.t7bb .t7bb-submit-box { border-left: 4px solid var(--t7bb-accent); }
.t7bb .t7bb-submit-box h3 { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.6rem; font-size: 1.1rem; }
.t7bb .t7bb-submit-box.t7bb-submit-sent { border-left-color: var(--color-border, #444); }
.t7bb .t7bb-submit-box form { margin-top: 0.6rem; }
.t7bb .t7bb-checklist { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.4rem; }
.t7bb .t7bb-checklist li { display: flex; align-items: flex-start; gap: 0.5rem; line-height: 1.4; }
.t7bb .t7bb-checklist li > .t7bb-ico { flex: none; margin-top: 0.15em; }
.t7bb .t7bb-checklist .t7bb-ok > .t7bb-ico { color: var(--t7bb-ok); }
.t7bb .t7bb-checklist .t7bb-todo { color: var(--color-muted, inherit); }
.t7bb .t7bb-checklist small { display: block; }

/* 0.15: Prayers to Nuffle, star search, no money */
.t7bb .t7bb-prayers { border: 1px solid var(--color-border, #444); border-radius: 10px; padding: 0.6rem 0.8rem 0.8rem; margin: 0.9rem 0 0; min-width: 0; }
.t7bb .t7bb-prayers legend { padding: 0 0.35rem; font-weight: 600; }
.t7bb .t7bb-prayers legend small { display: block; font-weight: 400; }
.t7bb .t7bb-prayer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.35rem 1rem; }
.t7bb .t7bb-prayer-list label.t7bb-check { align-items: center; }
.t7bb .t7bb-prayer-list label.t7bb-check input { flex: none; margin: 0; }
.t7bb .t7bb-prayer-list label.t7bb-check b { display: inline-block; min-width: 1.4em; color: var(--color-muted, inherit); font-variant-numeric: tabular-nums; font-weight: 500; }
.t7bb .t7bb-prayer-list input:disabled + span { opacity: 0.5; }
.t7bb .t7bb-star-search { position: relative; margin: 0 0 0.6rem; max-width: 26rem; }
.t7bb .t7bb-star-search .t7bb-ico { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--color-muted, inherit); pointer-events: none; }
.t7bb .t7bb-star-search input[type="search"] { width: 100%; padding-left: 2.2rem !important; }
.t7bb .t7bb-nocash { display: flex; gap: 0.5rem; align-items: flex-start; }
.t7bb .t7bb-nocash .t7bb-ico { flex: none; margin-top: 0.2em; }

/* 0.16: arenas */
.t7bb .t7bb-arena-item { flex-wrap: wrap; }
.t7bb .t7bb-arena-edit { flex-basis: 100%; padding-top: 0.6rem; }
.t7bb .t7bb-arena-new { margin-top: -0.25rem; }

/* 0.16: match cards with teams and result on top, when and where underneath */
.t7bb .t7bb-mc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding-top: 0.6rem; margin-top: 0.7rem; border-top: 1px solid var(--color-border, #444); font-size: 0.875rem; color: var(--color-muted, inherit); }
.t7bb .t7bb-mc-foot .t7bb-mc-tags { align-items: center; }
/* Confirmed matches: one slim row with the result, details in a quiet line underneath. */
.t7bb .t7bb-mcard-done { padding: 0.6rem 0.9rem 0.55rem; }
.t7bb .t7bb-mcard-done::before, .t7bb .t7bb-mcard-done::after { height: 2px; }
.t7bb .t7bb-mcard-done .t7bb-mc-main { gap: 0.75rem; align-items: center; }
.t7bb .t7bb-mcard-done .t7bb-mc-team .t7bb-team-link { font-size: 0.98rem; font-weight: 600; }
.t7bb .t7bb-mcard-done .t7bb-mc-team .t7bb-team-link > .t7bb-mark { width: 1.35rem; height: 1.35rem; }
.t7bb .t7bb-mcard-done .t7bb-mc-score strong { font-size: 1.3rem; }
.t7bb .t7bb-mcard-done .t7bb-mc-foot { margin-top: 0.45rem; padding-top: 0.4rem; font-size: 0.8rem; border-top-style: dashed; }
.t7bb .t7bb-mcard-done .t7bb-mc-foot :is(.btn, a.t7bb-btn, button.t7bb-btn) { height: auto !important; min-height: 0; padding: 0.2rem 0.55rem !important; font-size: 0.8rem; }
@media (max-width: 600px) {
	.t7bb .t7bb-mcard-done .t7bb-mc-team .t7bb-team-link { flex-direction: row; gap: 0.4rem; font-size: 0.9rem; text-align: left; }
	.t7bb .t7bb-mcard-done .t7bb-mc-a .t7bb-team-link { flex-direction: row-reverse; text-align: right; }
	.t7bb .t7bb-mcard-done .t7bb-mc-team { text-align: left; }
	.t7bb .t7bb-mcard-done .t7bb-mc-a { text-align: right; }
	.t7bb .t7bb-mcard-done .t7bb-mc-main { align-items: center; }
	.t7bb .t7bb-mc-foot { justify-content: center; text-align: center; }
	.t7bb .t7bb-mc-foot .t7bb-mc-when { justify-content: center; }
}

/* 0.16: leader lists with player pictures */
.t7bb .t7bb-leader li { display: flex; align-items: center; gap: 0.6rem; }
.t7bb .t7bb-leader li > .t7bb-avatar { flex: none; width: 34px; height: 34px; font-size: 0.75rem; }
.t7bb .t7bb-leader li > span { flex: 1 1 auto; min-width: 0; }
.t7bb .t7bb-leader li > strong { float: none; margin-left: auto; font-variant-numeric: tabular-nums; }

/* 0.16: player picture on the manage page works like the profile picture */
.t7bb .t7bb-player-pic { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex: none; }
.t7bb .t7bb-player-pic .t7bb-avatar-btn, .t7bb .t7bb-player-pic .t7bb-avatar-btn > :is(img, .t7bb-avatar) { width: 96px; height: 96px; }
.t7bb .t7bb-player-pic .t7bb-avatar-btn > .t7bb-avatar-ph { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.8rem; }
.t7bb .t7bb-player-pic form.t7bb-inline-form button { font-size: 0.8rem; }
@media (max-width: 600px) {
	.t7bb .t7bb-player-pic .t7bb-avatar-btn, .t7bb .t7bb-player-pic .t7bb-avatar-btn > :is(img, .t7bb-avatar) { width: 72px; height: 72px; }
}
.t7bb ol.t7bb-leader { list-style: none; padding-left: 0; counter-reset: t7bb-ldr; }
.t7bb ol.t7bb-leader > li::before { counter-increment: t7bb-ldr; content: counter(t7bb-ldr) "."; flex: none; min-width: 1.3em; color: var(--color-muted, inherit); font-variant-numeric: tabular-nums; }

/* 0.17: quick taps on + and − must all count. Without this, iPhone treats two quick taps as a
   double-tap zoom, swallows one and can move the page so the next tap lands on the row below. */
.t7bb .t7bb-step, .t7bb .t7bb-staff-row, .t7bb .t7bb-stepper { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
@media (pointer: coarse) {
	.t7bb .t7bb-step { width: 2.5rem; height: 2.5rem; }
}

/* 0.17: image fields with a × to remove the current picture */
.t7bb .t7bb-imgpick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.t7bb .t7bb-imgpick-current { position: relative; display: inline-block; flex: none; line-height: 0; }
.t7bb .t7bb-imgpick-current > img, .t7bb .t7bb-imgpick-current > .t7bb-logo, .t7bb .t7bb-imgpick-new { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--t7bb-line); }
.t7bb .t7bb-imgpick-current > img.t7bb-story-pic-preview { width: 160px; height: 100px; }
.t7bb .t7bb-imgpick-new { width: auto; max-width: 160px; height: 72px; object-fit: contain; }
.t7bb button.t7bb-imgpick-x { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--color-black, #fff); background: var(--color-heading, #222); color: var(--color-black, #fff); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); touch-action: manipulation; }
.t7bb button.t7bb-imgpick-x .t7bb-ico { width: 14px; height: 14px; margin: 0 !important; }
.t7bb button.t7bb-imgpick-x:hover, .t7bb button.t7bb-imgpick-x:focus-visible { background: var(--tk7-status-bad, #c0352b); color: #fff; }
.t7bb .t7bb-imgpick-gone { margin: 0; flex-basis: 100%; }
.t7bb button.t7bb-linkish { background: none; border: 0; padding: 0; min-height: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.t7bb .t7bb-imgpick input[type="file"] { flex: 1 1 14rem; min-width: 0; }

/* 0.17: one page colour on Blood Bowl pages. Elementor sections and the page's own background
   (set in Elementor or the kit) could be pure white while the header uses the site's page colour. */
html[data-tk7-theme] body:is(.t7bb-page, :has(.t7bb)) { background-color: var(--color-black) !important; background-image: none !important; }
html[data-tk7-theme] body:is(.t7bb-page, :has(.t7bb)) :is(#content, .site-main, .elementor-location-single, .elementor-location-archive) { background-color: var(--color-black) !important; }
html[data-tk7-theme] body:is(.t7bb-page, :has(.t7bb)) :is(main, article, .page-content, .entry-content, .elementor, .elementor-section, .elementor-container, .elementor-column, .elementor-widget-wrap, .e-con, .e-con-inner, .elementor-widget, .elementor-widget-container):has(.t7bb) { background-color: transparent !important; background-image: none !important; }

/* 0.17: match cards don't stretch across the whole page */
.t7bb .t7bb-mcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); }
.t7bb .t7bb-avatar-quick-field .t7bb-avatar-help { display: block; max-width: 22rem; margin-top: 0.4rem; }

/* 0.18: compact match report. The sticky score is one slim line. */
.t7bb .t7bb-score-live { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.6rem; padding: 0.35rem 0.75rem; margin: 0.4rem 0 0.25rem; font-size: 0.95em; }
.t7bb .t7bb-score-live > span:first-child { justify-self: end; text-align: right; }
.t7bb .t7bb-score-live > span:first-child .t7bb-team-link { flex-direction: row-reverse; }
.t7bb .t7bb-score-live .t7bb-team-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.t7bb .t7bb-score-live > span { min-width: 0; overflow: hidden; }
.t7bb .t7bb-score-live strong { font-size: 1.35em; line-height: 1.1; }
.t7bb .t7bb-score-live .t7bb-mark { width: 1.1rem; height: 1.1rem; }
.t7bb .t7bb-report-links { margin: 0.25rem 0 0.5rem; }
.t7bb .t7bb-prow-btn { all: unset; display: inline; cursor: default; }
.t7bb .t7bb-prow-sum { display: none; }
@media (max-width: 640px) {
	.t7bb .t7bb-score-live { padding: 0.3rem 0.55rem; gap: 0.45rem; font-size: 0.88em; }
	.t7bb .t7bb-score-live strong { font-size: 1.25em; }
	.t7bb .t7bb-report-team { margin-top: 0.75rem; padding-left: 0.65rem; }
	.t7bb .t7bb-report-head h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
	.t7bb .t7bb-report-fields { gap: 0.4rem 0.6rem; }
	.t7bb .t7bb-report-fields .t7bb-ff .t7bb-help { display: none; }
	.t7bb .t7bb-report-fields .t7bb-field > label { margin-bottom: 0.1rem; }
	.t7bb .t7bb-report-fields .t7bb-ff input, .t7bb .t7bb-report-fields .t7bb-win input, .t7bb .t7bb-report-fields select { min-height: 2.5rem; }
	/* One line per player until tapped. */
	.t7bb .t7bb-report-table.t7bb-collapsible tr { padding: 0; gap: 0.4rem; }
	.t7bb .t7bb-report-table.t7bb-collapsible tr:not(.t7bb-open) > td:not(.t7bb-report-name) { display: none; }
	.t7bb .t7bb-report-table.t7bb-collapsible tr.t7bb-open { padding-bottom: 0.7rem; }
	.t7bb .t7bb-report-table.t7bb-collapsible .t7bb-report-name { font-weight: 600; }
	.t7bb .t7bb-report-table.t7bb-collapsible .t7bb-report-name:has(.t7bb-prow-btn)::before { content: none !important; }
	.t7bb .t7bb-report-table .t7bb-prow-btn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.4rem; width: 100%; box-sizing: border-box; min-height: 2.75rem; padding: 0.55rem 1.6rem 0.55rem 0; position: relative; cursor: pointer; touch-action: manipulation; }
	.t7bb .t7bb-report-table .t7bb-prow-btn[data-num]:not([data-num=""])::before { content: "#" attr(data-num); color: var(--t7bb-muted); font-weight: 400; }
	.t7bb .t7bb-report-table .t7bb-prow-btn::after { content: ""; position: absolute; right: 0.35rem; top: 1.05rem; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--t7bb-muted); border-bottom: 2px solid var(--t7bb-muted); transform: rotate(45deg); transition: transform 0.15s; }
	.t7bb .t7bb-report-table tr.t7bb-open .t7bb-prow-btn::after { transform: rotate(-135deg); top: 1.3rem; }
	.t7bb .t7bb-report-table .t7bb-prow-btn:focus-visible { outline: 2px solid var(--t7bb-accent); outline-offset: 2px; }
	.t7bb .t7bb-report-table .t7bb-prow-sum { display: block; flex-basis: 100%; font-size: 0.85em; font-weight: 600; color: var(--t7bb-accent); }
	.t7bb .t7bb-report-table .t7bb-prow-sum:empty { display: none; }
	.t7bb .t7bb-report-table.t7bb-collapsible tr.t7bb-dim { padding: 0.55rem 0; }
	.t7bb .t7bb-report-table.t7bb-collapsible tr.t7bb-dim > td.t7bb-report-mng { display: block; font-size: 0.85em; }
}

/* 0.18: compact pre-match page */
.t7bb details.t7bb-more > summary { cursor: pointer; list-style: none; }
.t7bb details.t7bb-more > summary::-webkit-details-marker { display: none; }
.t7bb details.t7bb-more > summary::after { content: " Les mer"; margin-left: 0.35em; font-size: 0.85em; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: var(--t7bb-muted); white-space: nowrap; }
.t7bb details.t7bb-more[open] > summary::after { content: " Skjul"; }
.t7bb details.t7bb-more > p { margin: 0.4rem 0 0; }
.t7bb details.t7bb-jm { margin: 0 0 0.75rem; padding: 0.5rem 0.75rem; border-left: 3px solid var(--t7bb-line); background: var(--t7bb-soft); border-radius: 0 var(--t7bb-radius) var(--t7bb-radius) 0; font-size: 0.92em; }
.t7bb .t7bb-toolbar-tight { margin: 0.5rem 0 0.75rem; flex-wrap: wrap; }
.t7bb .t7bb-pregame-side h3 { margin-bottom: 0.5rem; }
.t7bb .t7bb-pregame-side h4 { margin: 1rem 0 0.4rem; }
.t7bb .t7bb-purse { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); margin-bottom: 0.75rem; gap: 0.5rem; }
.t7bb .t7bb-purse > div { padding: 0.5rem 0.65rem; }
@media (max-width: 640px) {
	.t7bb .t7bb-toolbar-tight .btn { min-height: 2.5rem; }
	.t7bb .t7bb-pregame-sum th, .t7bb .t7bb-pregame-sum td { padding: 0.35rem 0.4rem !important; }
	.t7bb .t7bb-pregame-side { padding: 0.75rem 0.75rem 0.85rem; }
	.t7bb .t7bb-purse strong { font-size: 1.15em; }
	.t7bb .t7bb-purse small { font-size: 0.75em; line-height: 1.35; }
	.t7bb .t7bb-prayer-list { grid-template-columns: 1fr 1fr; gap: 0.15rem 0.6rem; font-size: 0.85em; }
	.t7bb .t7bb-prayer-list label.t7bb-check { padding: 0.2rem 0; }
	.t7bb .t7bb-pregame input, .t7bb .t7bb-pregame select { min-height: 2.5rem; }
}

/* 0.18: the whole match card opens the match page; team links and buttons stay on top */
.t7bb .t7bb-mc-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.t7bb .t7bb-mc-open:focus-visible { outline: 2px solid var(--t7bb-accent); outline-offset: -2px; }
.t7bb .t7bb-mcard:has(.t7bb-mc-open) { cursor: pointer; transition: border-color 0.15s; }
.t7bb .t7bb-mcard:has(.t7bb-mc-open):hover { border-color: var(--color-border-hover, var(--t7bb-accent)); }
.t7bb .t7bb-mcard :is(.t7bb-team-link, .t7bb-coach a, .t7bb-mc-foot a, .t7bb-mc-foot button, .t7bb-mc-foot form, .t7bb-mc-actions) { position: relative; z-index: 2; }
.t7bb .t7bb-match-title { margin: 0.25rem 0 0.75rem; }
@media (max-width: 640px) {
	/* Fan Factor, winnings and fans on one row; MVP and "stallet" on the next. */
	.t7bb .t7bb-report-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
	.t7bb .t7bb-report-fields > :nth-child(4) { order: 3; }
	.t7bb .t7bb-report-fields > :nth-child(5) { order: 4; grid-column: span 2; }
	.t7bb .t7bb-report-fields > .t7bb-stall { order: 5; grid-column: auto; align-self: center; margin: 1.1rem 0 0; font-size: 0.9em; }
	.t7bb .t7bb-report-fields [data-win-how] { display: none; }
	.t7bb .t7bb-report-fields .t7bb-field > label { font-size: 0.72em; line-height: 1.25; }
}
.t7bb .t7bb-prayers-full .t7bb-prayer-list label.t7bb-check:has(input:disabled) { display: none; }
.t7bb .t7bb-prayers-full .t7bb-prayer-list { grid-template-columns: 1fr; }
.t7bb .t7bb-prayers-full legend small::after { content: " · fjern krysset for å bytte"; }
@media (max-width: 640px) {
	.t7bb .t7bb-toolbar-tight { flex-direction: row; align-items: center; gap: 0.5rem; }
	.t7bb .t7bb-toolbar-tight > * { flex: 0 1 auto; width: auto; margin: 0; }
}
@media (max-width: 640px) {
	.t7bb .t7bb-toolbar-tight .btn { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
}
