/* FH Zápis o utkání – editor / frontend chrome (not print) */

.fh-ms,
.fh-match-sheet-app {
	--fh-blue: #1e5aa8;
	--fh-blue-dark: #15407a;
	--fh-gray: #f3f4f6;
	--fh-border: #d1d5db;
	--fh-text: #111827;
	--fh-danger: #b91c1c;
	--fh-warn: #92400e;
	--fh-warn-bg: #fef3c7;
	box-sizing: border-box;
	color: var(--fh-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	margin-block: 0;
	margin-inline: auto;
	max-width: min(1600px, 100%);
	overflow-x: clip;
	padding: 0;
	position: relative;
	width: 100%;
}

/*
 * .alignwide lets block themes (is-layout-constrained) use the wide measure
 * instead of the narrow content column. Do not use 100vw / negative margins.
 */
.is-layout-constrained > .fh-match-sheet-app.alignwide {
	max-width: min(1600px, 100%);
}

.fh-ms-inner {
	box-sizing: border-box;
	margin: 0;
	max-width: none;
	min-width: 0;
	padding: 12px 12px 32px;
	width: 100%;
}

/*
 * Phones + tablets: full-bleed past theme column / has-global-padding.
 * Beats `.is-layout-constrained > :where(... ) { margin: auto }` and
 * our own `margin-inline: auto`. No transform (keeps sticky toolbar).
 */
@media (max-width: 1024px) {
	body .fh-match-sheet-app.fh-ms:not(.fh-ms--stage),
	body .is-layout-constrained > .fh-match-sheet-app.alignwide:not(.fh-ms--stage) {
		box-sizing: border-box;
		left: 50%;
		margin-left: -50vw !important;
		margin-right: 0 !important;
		max-width: 100vw;
		padding-left: max(12px, env(safe-area-inset-left, 0px));
		padding-right: max(12px, env(safe-area-inset-right, 0px));
		position: relative;
		width: 100vw;
	}

	.fh-ms:not(.fh-ms--stage) .fh-ms-inner {
		padding-left: 0;
		padding-right: 0;
	}
}

/*
 * Full-viewport stage. One app instance; the toggle only changes this shell.
 * Beats the 1600px / alignwide cap and the theme content column.
 */
html.fh-ms-stage-open,
body.fh-ms-stage-open {
	overflow: hidden;
}

.fh-ms.fh-ms--stage,
.is-layout-constrained > .fh-match-sheet-app.alignwide.fh-ms--stage {
	background: #fff;
	height: auto;
	inset: 0;
	margin: 0 !important;
	max-width: none;
	overflow: auto;
	overscroll-behavior: contain;
	padding:
		env(safe-area-inset-top, 0px)
		env(safe-area-inset-right, 0px)
		env(safe-area-inset-bottom, 0px)
		env(safe-area-inset-left, 0px);
	position: fixed;
	width: auto;
	z-index: 100000;
}

@media print {
	html.fh-ms-stage-open,
	body.fh-ms-stage-open {
		overflow: visible !important;
	}

	.fh-ms.fh-ms--stage,
	.is-layout-constrained > .fh-match-sheet-app.alignwide.fh-ms--stage {
		height: auto !important;
		inset: auto !important;
		margin: 0 !important;
		max-width: none !important;
		overflow: visible !important;
		padding: 0 !important;
		position: static !important;
		width: 100% !important;
		z-index: auto !important;
	}
}

/* Shared equal-width button rows (toolbar, picker, preview, start). */
.fh-ms-btn-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-btn-row > .fh-ms-btn,
.fh-ms-btn-row > .fh-ms-zoom__btn {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
}

.fh-ms-btn-row > .fh-ms-zoom__value {
	flex: 0 0 auto;
}

.fh-ms *,
.fh-ms *::before,
.fh-ms *::after {
	box-sizing: border-box;
}

.fh-ms-chrome {
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 30;
}

.fh-ms-toolbar__stage {
	display: flex;
	justify-content: flex-end;
	width: 100%;
}

.fh-ms-switch {
	align-items: center;
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 999px;
	color: var(--fh-text);
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	line-height: 1.2;
	padding: 4px 12px 4px 4px;
}

.fh-ms-switch__track {
	background: #e5e7eb;
	border-radius: 999px;
	display: block;
	flex: 0 0 auto;
	height: 22px;
	position: relative;
	width: 40px;
}

.fh-ms-switch__knob {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.25);
	height: 18px;
	left: 2px;
	position: absolute;
	top: 2px;
	transition: transform 0.15s ease;
	width: 18px;
}

.fh-ms-switch[aria-pressed="true"] .fh-ms-switch__track {
	background: var(--fh-blue);
}

.fh-ms-switch[aria-pressed="true"] .fh-ms-switch__knob {
	transform: translateX(18px);
}

.fh-ms-toolbar {
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
	padding: 10px;
	position: relative;
	top: auto;
	z-index: 1;
}

.fh-ms-toolbar__more {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-toolbar__primary {
	align-items: stretch;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-toolbar__primary .fh-ms-toolbar__nav {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}

.fh-ms-toolbar__primary .fh-ms-toolbar__print {
	flex: 1 1 0;
	font-size: 13px;
	min-width: 0;
	padding: 8px 10px;
	text-align: center;
}

.fh-ms-toolbar__more-toggle {
	display: none;
}

.fh-ms-toolbar__close-picker {
	display: none;
}

@media (min-width: 768px) {
	.fh-ms-toolbar__primary:has(> [data-toolbar-nav][hidden]) {
		display: none;
	}
}

.fh-ms-toolbar__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-toolbar__row .fh-ms-btn,
.fh-ms-toolbar__row .fh-ms-guest-logout {
	flex: 1 1 0;
	min-width: 0;
}

.fh-ms-toolbar__row .fh-ms-btn {
	font-size: 13px;
	padding: 8px 10px;
	text-align: center;
}

.fh-ms-toolbar__row .fh-ms-guest-logout .fh-ms-btn {
	width: 100%;
}

.fh-ms-print-day-wrap {
	align-items: stretch;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.fh-ms-toolbar__row .fh-ms-print-day-wrap .fh-ms-btn {
	align-items: center;
	display: inline-flex;
	flex: 1 1 auto;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	line-height: 1.2;
	width: 100%;
}

.fh-ms-print-day-label {
	display: block;
}

.fh-ms-print-day-sub {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	border-radius: 4px;
	color: #047857;
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.01em;
	padding: 2px 5px;
}

.fh-ms-btn.is-officials-ready {
	box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.45);
}

.fh-ms-btn {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	color: var(--fh-text);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 8px 14px;
}

.fh-ms-btn:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.fh-ms-btn--primary {
	background: var(--fh-blue);
	border-color: var(--fh-blue);
	color: #fff;
}

.fh-ms-btn--accent {
	background: #0f766e;
	border-color: #0f766e;
	color: #fff;
}

.fh-ms-btn--ghost {
	background: transparent;
	font-weight: 500;
}

.fh-ms-guest-bar {
	align-items: center;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	display: flex;
	justify-content: flex-end;
	margin: 0 0 12px;
	padding: 8px 10px;
}

.fh-ms-guest-bar .fh-ms-guest-logout {
	display: block;
	margin: 0;
}

.fh-ms-btn--nav {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1d4ed8;
}

.fh-ms-btn--back {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #b91c1c;
}

.fh-ms-btn--danger {
	background: #fef2f2;
	border-color: #fca5a5;
	color: var(--fh-danger);
}

.fh-ms-btn--lg {
	font-size: 16px;
	padding: 12px 20px;
}

/*
 * Theme shield: production themes style button:hover/focus dark blue and leave
 * :focus after click. Force plugin colors (incl. text) on hover/focus/active.
 */
.fh-ms .fh-ms-btn:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn:is(:hover, :focus, :focus-visible, :active),
.fh-ms .fh-ms-zoom__btn:is(:hover, :focus, :focus-visible, :active),
.fh-ms .fh-ms-switch:is(:hover, :focus, :focus-visible, :active) {
	background: var(--fh-gray) !important;
	border-color: var(--fh-border) !important;
	box-shadow: none !important;
	color: var(--fh-text) !important;
	outline: none;
	text-decoration: none !important;
}

.fh-ms .fh-ms-switch:is(:hover, :focus, :focus-visible, :active) .fh-ms-switch__label {
	color: var(--fh-text) !important;
}

.fh-ms .fh-ms-switch:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--fh-blue) !important;
}

.fh-ms .fh-ms-btn--primary:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn--primary:is(:hover, :focus, :focus-visible, :active) {
	background: var(--fh-blue-dark) !important;
	border-color: var(--fh-blue-dark) !important;
	color: #fff !important;
}

.fh-ms .fh-ms-btn--accent:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn--accent:is(:hover, :focus, :focus-visible, :active) {
	background: #115e59 !important;
	border-color: #115e59 !important;
	color: #fff !important;
}

.fh-ms .fh-ms-btn--nav:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn--nav:is(:hover, :focus, :focus-visible, :active) {
	background: #dbeafe !important;
	border-color: #93c5fd !important;
	color: #1d4ed8 !important;
}

.fh-ms .fh-ms-btn--back:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn--back:is(:hover, :focus, :focus-visible, :active) {
	background: #fee2e2 !important;
	border-color: #fca5a5 !important;
	color: #b91c1c !important;
}

.fh-ms .fh-ms-btn--danger:is(:hover, :focus, :focus-visible, :active):not(:disabled),
.fh-ms a.fh-ms-btn--danger:is(:hover, :focus, :focus-visible, :active) {
	background: #fee2e2 !important;
	border-color: #f87171 !important;
	color: #991b1b !important;
}

.fh-ms .fh-ms-btn--ghost:is(:hover, :focus, :focus-visible, :active):not(:disabled) {
	background: var(--fh-gray) !important;
	border-color: transparent !important;
	color: var(--fh-text) !important;
}

.fh-ms .fh-ms-picker__range-btn.is-active:is(:hover, :focus, :focus-visible, :active):not(:disabled) {
	background: var(--fh-blue-dark) !important;
	border-color: var(--fh-blue-dark) !important;
	color: #fff !important;
}

.fh-ms .fh-ms-official-control__toggle:is(:hover, :focus, :focus-visible, :active) {
	background: transparent !important;
	box-shadow: none !important;
	color: var(--fh-text) !important;
}

.fh-ms-alerts {
	display: grid;
	gap: 8px;
	margin-bottom: 12px;
}

.fh-ms-alert {
	border-radius: 6px;
	font-size: 14px;
	padding: 10px 12px;
}

.fh-ms-alert--error {
	background: #fee2e2;
	border: 1px solid #fecaca;
	color: var(--fh-danger);
}

.fh-ms-alert--warn {
	background: var(--fh-warn-bg);
	border: 1px solid #fcd34d;
	color: var(--fh-warn);
}

.fh-ms-alert--info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
}

.fh-ms-summary {
	background: var(--fh-gray);
	border: 1px solid var(--fh-border);
	border-radius: 8px;
	margin-bottom: 10px;
	padding: 8px 12px;
	text-align: center;
}

.fh-ms-summary__title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin: 0 0 2px;
	text-transform: uppercase;
}

.fh-ms-summary__meta {
	color: #4b5563;
	font-size: 13px;
	margin: 0 0 2px;
}

.fh-ms-summary__teams {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.fh-ms-loading {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 16px;
	position: fixed;
	z-index: 1100;
}

.fh-ms-loading__backdrop {
	background: rgba(17, 24, 39, 0.45);
	inset: 0;
	position: absolute;
}

.fh-ms-loading__panel {
	align-items: center;
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 360px;
	padding: 28px 24px;
	position: relative;
	text-align: center;
	width: min(360px, 100%);
	z-index: 1;
}

.fh-ms-loading__panel [data-loading-text] {
	color: #374151;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.fh-ms-spinner {
	animation: fh-ms-spin 0.8s linear infinite;
	border: 3px solid #e5e7eb;
	border-radius: 50%;
	border-top-color: var(--fh-blue);
	display: inline-block;
	flex-shrink: 0;
	height: 28px;
	width: 28px;
}

@keyframes fh-ms-spin {
	to {
		transform: rotate(360deg);
	}
}

.fh-ms-start {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
	padding: 4px 0 0;
	width: 100%;
}

.fh-ms-picker {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 10px;
	margin-bottom: 16px;
	padding: 16px;
}

.fh-ms-picker__head {
	margin-bottom: 12px;
}

.fh-ms-picker__title {
	font-size: 18px;
	margin: 0;
	min-width: 0;
}

.fh-ms-picker__back--top {
	display: none;
	margin: 0 0 12px;
	width: 100%;
}

@media (min-width: 768px) {
	.fh-ms-picker__back--top {
		display: block;
	}
}

.fh-ms-picker__foot {
	margin-top: 12px;
	width: 100%;
}

.fh-ms-day__actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	margin-left: auto;
}

.fh-ms-day__officials-ready {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	border-radius: 6px;
	color: #047857;
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	padding: 6px 8px;
	white-space: nowrap;
}

.fh-ms-picker__range {
	margin: 0 0 12px;
}

.fh-ms-picker__range-btn.is-active {
	background: var(--fh-blue);
	border-color: var(--fh-blue);
	color: #fff;
}

.fh-ms-picker__days {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin: 0 0 12px;
}

.fh-ms-picker__days-field {
	display: grid;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
}

.fh-ms-picker__days-field input {
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	max-width: 7rem;
	padding: 6px 8px;
	width: 100%;
}

.fh-ms-picker__actions {
	margin: 0 0 12px;
}

.fh-ms-day {
	border: 1px solid var(--fh-border);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}

.fh-ms-day__head {
	align-items: center;
	background: var(--fh-gray);
	display: flex;
	flex-wrap: wrap;
	font-weight: 700;
	gap: 8px;
	justify-content: space-between;
	padding: 10px 12px;
}

.fh-ms-day__select {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	margin: 0;
}

.fh-ms-day__select input {
	cursor: pointer;
	height: 16px;
	margin: 0;
	width: 16px;
}

.fh-ms-day__title {
	flex: 1 1 auto;
	min-width: 0;
}

.fh-ms-day__print {
	flex: 0 0 auto;
	font-weight: 600;
}

.fh-ms-day__body {
	display: grid;
	gap: 0;
}

.fh-ms-event {
	align-items: center;
	border-top: 1px solid var(--fh-border);
	cursor: pointer;
	display: grid;
	gap: 8px 10px;
	grid-template-areas: "when teams venue open";
	grid-template-columns: 72px minmax(0, 1fr) auto auto;
	padding: 10px 12px;
}

.fh-ms-event:hover {
	background: #eff6ff;
}

.fh-ms-event__when {
	align-items: center;
	align-self: center;
	display: flex;
	flex-direction: column;
	gap: 3px;
	grid-area: when;
	justify-content: center;
	justify-self: stretch;
	min-width: 0;
}

.fh-ms-event__time {
	background: #eef2ff;
	border-radius: 6px;
	color: #1e3a8a;
	font-size: 15px;
	font-weight: 700;
	justify-self: stretch;
	letter-spacing: 0.02em;
	line-height: 1.2;
	padding: 6px 4px;
	text-align: center;
	width: 100%;
}

.fh-ms-event__round {
	color: #6b7280;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.15;
	text-align: center;
	white-space: nowrap;
}

.fh-ms-event__teams {
	align-self: center;
	font-size: 14px;
	grid-area: teams;
	line-height: 1.35;
	min-width: 0;
}

.fh-ms-event__team {
	display: block;
	font-weight: 700;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fh-ms-event__venue {
	align-self: center;
	background: #f3f4f6;
	border-radius: 6px;
	color: #4b5563;
	font-size: 12px;
	font-weight: 600;
	grid-area: venue;
	justify-self: start;
	letter-spacing: 0.01em;
	line-height: 1.2;
	max-width: none;
	overflow: visible;
	padding: 6px 8px;
	text-align: center;
	text-overflow: unset;
	white-space: normal;
}

.fh-ms-event__open {
	grid-area: open;
	white-space: normal;
}

@media (max-width: 767px) {
	/*
	 * Primary strip: nav + print + Zobrazit možnosti. Mobile uses a
	 * 2-column grid; nav uses display:contents so each button is a
	 * real grid cell with its own space.
	 */
	.fh-ms-toolbar {
		gap: 0;
		padding: 8px;
	}

	.fh-ms-toolbar__primary {
		align-items: stretch;
		display: grid;
		gap: 6px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		width: 100%;
	}

	.fh-ms-toolbar__primary .fh-ms-toolbar__nav {
		display: contents;
	}

	.fh-ms-toolbar__primary .fh-ms-toolbar__nav .fh-ms-btn {
		box-sizing: border-box;
		font-size: 13px;
		min-height: 44px;
		min-width: 0;
		padding: 10px 8px;
		text-align: center;
		white-space: normal;
		width: 100%;
	}

	.fh-ms-toolbar__primary .fh-ms-toolbar__print {
		box-sizing: border-box;
		font-size: 13px;
		max-width: none;
		min-height: 44px;
		min-width: 0;
		padding: 10px 8px;
		text-align: center;
		white-space: normal;
		width: 100%;
	}

	.fh-ms-toolbar__primary .fh-ms-toolbar__print:disabled {
		display: none;
	}

	.fh-ms-toolbar__more-toggle {
		align-items: center;
		box-sizing: border-box;
		display: inline-flex;
		font-size: 13px;
		grid-column: 1 / -1;
		justify-content: center;
		min-height: 44px;
		min-width: 0;
		padding: 10px 12px;
		white-space: normal;
		width: 100%;
	}

	.fh-ms-toolbar__close-picker {
		align-items: center;
		box-sizing: border-box;
		display: inline-flex;
		font-size: 13px;
		grid-column: 1 / -1;
		justify-content: center;
		min-height: 44px;
		min-width: 0;
		padding: 10px 12px;
		white-space: normal;
		width: 100%;
	}

	.fh-ms-toolbar__more {
		background: #fff;
		border: 1px solid var(--fh-border);
		border-radius: 8px;
		box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
		display: none;
		gap: 8px;
		left: 0;
		margin-top: 6px;
		max-height: min(70vh, 420px);
		overflow: auto;
		padding: 8px;
		position: absolute;
		right: 0;
		top: 100%;
		width: 100%;
		z-index: 30;
	}

	.fh-ms-toolbar--more-open .fh-ms-toolbar__more {
		display: flex;
	}

	.fh-ms-toolbar__more .fh-ms-toolbar__row {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.fh-ms-toolbar__more .fh-ms-toolbar__row .fh-ms-btn,
	.fh-ms-toolbar__more .fh-ms-toolbar__row .fh-ms-guest-logout {
		flex: 0 0 auto;
		width: 100%;
	}

	.fh-ms-toolbar__more .fh-ms-toolbar__row .fh-ms-btn {
		padding: 10px 12px;
		text-align: center;
		white-space: normal;
	}

	.fh-ms-toolbar__row .fh-ms-guest-logout {
		display: block;
		width: 100%;
	}

	.fh-ms-btn-row:not(.fh-ms-picker__range):not(.fh-ms-zoom) {
		flex-wrap: wrap;
	}

	.fh-ms-btn-row:not(.fh-ms-picker__range):not(.fh-ms-zoom) > .fh-ms-btn {
		flex: 1 1 9.5rem;
		min-width: 0;
		padding: 8px 10px;
		white-space: normal;
	}

	.fh-ms-local-sheet {
		align-items: stretch;
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.fh-ms-local-sheet__actions {
		flex: 1 1 auto;
		flex-direction: column;
		flex-wrap: nowrap;
		width: 100%;
	}

	.fh-ms-local-sheet__actions .fh-ms-btn {
		width: 100%;
	}

	.fh-ms-local-group__title {
		align-items: stretch;
		flex-direction: column;
	}

	.fh-ms-local-group__actions {
		flex-direction: column;
		flex-wrap: nowrap;
		width: 100%;
	}

	.fh-ms-local-group__actions .fh-ms-btn {
		white-space: normal;
		width: 100%;
	}

	.fh-ms-event {
		grid-template-areas:
			"when teams"
			"open open";
		grid-template-columns: 64px minmax(0, 1fr);
	}

	.fh-ms-event__open {
		width: 100%;
	}

	.fh-ms-event__venue {
		display: none;
	}
}

/*
 * Workspace: stacked by default; JS adds --split when .fh-ms-inner is at least
 * editorMin + gap + previewMin wide (LAYOUT in match-sheet.js).
 */
.fh-ms-workspace {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	width: 100%;
}

.fh-ms-workspace__body {
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr);
	min-width: 0;
	width: 100%;
}

.fh-ms-workspace--split .fh-ms-workspace__body {
	align-items: start;
	grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

/* Keep preview (+ zoom) visible while scrolling — offset clears sticky toolbar. */
.fh-ms-workspace[data-workspace]:not([hidden]) .fh-ms-preview {
	align-self: start;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - var(--fh-ms-sticky-offset, 72px) - 16px);
	overflow: hidden;
	position: sticky;
	top: var(--fh-ms-sticky-offset, 72px);
}

/* Manual zoom larger than window: grow with page scroll (no nested Y scroll). */
.fh-ms-workspace[data-workspace]:not([hidden]) .fh-ms-preview.is-preview-tall {
	max-height: none;
	overflow: visible;
}

.fh-ms-workspace[data-workspace]:not([hidden]) .fh-ms-preview__head {
	flex: 0 0 auto;
}

.fh-ms-workspace[data-workspace]:not([hidden]) .fh-ms-paper-viewport {
	flex: 1 1 auto;
	max-height: none;
	min-height: 0;
	overflow-x: auto;
	overflow-y: visible;
}

.fh-ms-workspace[data-workspace]:not([hidden]) .fh-ms-editor-toggle--foot {
	flex: 0 0 auto;
}

/* overflow-x:clip on .fh-ms breaks position:sticky vs the viewport. */
.fh-ms:has([data-workspace]:not([hidden])),
.fh-ms:has(.fh-ms-rosters__workspace),
.fh-ms:has(.fh-ms-crosstable:not([hidden])) {
	overflow-x: visible;
}

/* Rookie (.site { overflow:hidden }) breaks sticky previews vs the viewport. */
body:has(.fh-ms) .site,
body:has(.fh-match-sheet-app) .site {
	overflow: visible !important;
}

.fh-ms-workspace--editor-hidden .fh-ms-workspace__body {
	grid-template-columns: minmax(0, 1fr);
}

.fh-ms-workspace > *,
.fh-ms-workspace__body > * {
	min-width: 0;
}

.fh-ms-workspace > .fh-ms-editor-toggle {
	margin: 0;
}

.fh-ms-editor {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 10px;
	padding: 14px;
}

.fh-ms-editor__title {
	font-size: 16px;
	margin: 0 0 12px;
}

.fh-ms-editor__details--meta {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}

.fh-ms-editor > .fh-ms-editor__details:first-child {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}

.fh-ms-editor__details.is-dragging {
	opacity: 0.55;
}

.fh-ms-editor__details.is-drag-over {
	border-top-color: var(--fh-accent, #2563eb);
	box-shadow: inset 0 2px 0 var(--fh-accent, #2563eb);
}

.fh-ms-local-group {
	background: #fff;
	border: 1px solid var(--fh-border, #ccd0d4);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
	width: 100%;
}

.fh-ms-local-group__title {
	align-items: center;
	background: #f3f4f6;
	border-bottom: 1px solid var(--fh-border, #ccd0d4);
	display: flex;
	flex-wrap: wrap;
	font-weight: 700;
	gap: 8px 12px;
	justify-content: space-between;
	padding: 10px 14px;
}

.fh-ms-local-group__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.fh-ms-local-group__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 6px;
}

.fh-ms-local-group__actions .fh-ms-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.fh-ms-modal__day-filter {
	display: grid;
	gap: 4px;
	margin-bottom: 4px;
}

.fh-ms-modal__day-filter select,
.fh-ms-modal__field select {
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	font: inherit;
	padding: 8px 10px;
	width: 100%;
}

.fh-ms-modal__checklist {
	border: 1px solid var(--fh-border);
	border-radius: 8px;
	display: grid;
	gap: 0;
	max-height: 260px;
	overflow: auto;
}

.fh-ms-modal__checklist--officials {
	max-height: min(280px, 40vh);
}

.fh-ms-modal__check {
	align-items: flex-start;
	border-top: 1px solid var(--fh-border);
	cursor: pointer;
	display: flex;
	gap: 8px;
	padding: 8px 10px;
}

.fh-ms-modal__check:first-child {
	border-top: none;
}

.fh-ms-modal__check input {
	margin-top: 3px;
}

.fh-ms-modal__check-label {
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.35;
}

.fh-ms-modal__officials-bulk {
	display: grid;
	gap: 10px;
}

.fh-ms-modal__officials-bulk .fh-ms-btn {
	justify-self: start;
}

.fh-ms-modal__officials-bulk .fh-ms-modal__official-row-fields {
	margin: 0;
}

.fh-ms-modal__official-row {
	border-top: 1px solid var(--fh-border);
	display: grid;
	gap: 8px;
	padding: 10px;
}

.fh-ms-modal__official-row:first-child {
	border-top: none;
}

.fh-ms-modal__official-row-head {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 8px;
}

.fh-ms-modal__official-row-head input {
	flex-shrink: 0;
	margin: 0;
}

.fh-ms-modal__official-row-head .fh-ms-modal__official-match {
	flex: 1 1 auto;
}

.fh-ms-modal__official-row-fields {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fh-ms-modal__official-row-fields input {
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	font-size: 13px;
	min-width: 0;
	padding: 6px 8px;
	width: 100%;
}

.fh-ms-modal__official-row-fields input:focus {
	border-color: var(--fh-blue);
	outline: 2px solid rgba(30, 90, 168, 0.2);
	outline-offset: 1px;
}

.fh-ms-editor__grid {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr;
}

.fh-ms-field {
	display: grid;
	gap: 4px;
	font-size: 13px;
}

.fh-ms-field span,
.fh-ms-field__label {
	color: #374151;
	font-weight: 600;
}

.fh-ms-field__label {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.fh-ms-official-control {
	position: relative;
	width: 100%;
}

.fh-ms-official-control__field {
	align-items: stretch;
	display: flex;
	min-width: 0;
	position: relative;
	width: 100%;
}

.fh-ms-field .fh-ms-official-control__input,
.fh-ms-modal__field .fh-ms-official-control__input,
.fh-ms-modal__official-row-fields .fh-ms-official-control__input,
.fh-ms-official-control__input {
	appearance: none;
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	box-sizing: border-box;
	color: var(--fh-text);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.3;
	min-width: 0;
	padding: 7px 30px 7px 9px;
	width: 100%;
}

.fh-ms-official-control__input::placeholder {
	color: #9ca3af;
}

.fh-ms-official-control__input:focus {
	border-color: var(--fh-blue);
	outline: 2px solid rgba(30, 90, 168, 0.2);
	outline-offset: 1px;
}

.fh-ms-official-control.is-custom .fh-ms-official-control__input {
	background: #eff6ff;
	border-color: #93c5fd;
}

.fh-ms-official-control__input[readonly] {
	cursor: pointer;
}

.fh-ms-official-control__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: #6b7280;
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	height: 100%;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 0;
	top: 0;
	width: 28px;
}

.fh-ms-official-control__menu {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
	display: grid;
	gap: 2px;
	left: 0;
	max-height: 220px;
	overflow: auto;
	padding: 4px;
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 40;
}

.fh-ms-official-control__menu.is-fixed {
	position: fixed;
	right: auto;
	z-index: 1100;
}

.fh-ms-official-control__menu[hidden] {
	display: none;
}

.fh-ms-official-control__group {
	color: #6b7280;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 6px 8px 2px;
	text-transform: uppercase;
}

.fh-ms-official-control__option {
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--fh-text);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	line-height: 1.3;
	padding: 7px 9px;
	text-align: left;
	width: 100%;
}

.fh-ms-official-control__option:hover,
.fh-ms-official-control__option.is-selected {
	background: #eff6ff;
	color: var(--fh-blue-dark);
}

.fh-ms-official-control__option--muted {
	color: #9ca3af;
}

.fh-ms-official-control__option--other {
	border-top: 1px solid var(--fh-border);
	color: var(--fh-blue-dark);
	font-weight: 600;
	margin-top: 2px;
	padding-top: 8px;
}

.fh-ms-modal__official-row-fields .fh-ms-official-control__input,
.fh-ms-modal__field .fh-ms-official-control__input {
	padding: 6px 28px 6px 8px;
}

.fh-ms-modal__official-row-fields .fh-ms-official-control__input {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fh-ms-modal__official-row-fields {
	align-items: start;
}

.fh-ms-modal__official-match {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: 56px minmax(0, 1fr);
	min-width: 0;
}

.fh-ms-modal__official-match-time {
	align-self: center;
	background: #eef2ff;
	border-radius: 6px;
	color: #1e3a8a;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	padding: 6px 4px;
	text-align: center;
}

.fh-ms-modal__official-match-teams {
	display: grid;
	gap: 1px;
	line-height: 1.35;
	min-width: 0;
}

.fh-ms-modal__official-match-team {
	display: block;
	font-size: 1.2rem;
	font-weight: 700;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fh-ms-modal__official-match--no-time {
	grid-template-columns: minmax(0, 1fr);
}

.fh-ms-field--official {
	border: 1px dashed transparent;
	border-radius: 8px;
	padding: 2px;
}

.fh-ms-field--official.is-drag-over {
	background: #eff6ff;
	border-color: #93c5fd;
}

.fh-ms-field--official.is-dragging {
	opacity: 0.55;
}

.fh-ms-dnd-handle {
	color: #9ca3af;
	cursor: grab;
	font-size: 14px;
	letter-spacing: -2px;
	line-height: 1;
	user-select: none;
}

.fh-ms-dnd-handle:active {
	cursor: grabbing;
}

.fh-ms-field input[type="text"],
.fh-ms-field input[type="date"],
.fh-ms-field select {
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	font: inherit;
	padding: 7px 9px;
	width: 100%;
}

.fh-ms-field--check {
	align-items: center;
	display: flex;
	gap: 8px;
	grid-template-columns: none;
}

.fh-ms-field--check input {
	margin: 0;
}

.fh-ms-editor__details {
	border-top: 1px solid var(--fh-border);
	margin-top: 14px;
	padding-top: 10px;
}

.fh-ms-editor__details summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	font-weight: 700;
	gap: 6px;
	list-style: none;
	margin-bottom: 8px;
	user-select: none;
}

.fh-ms-editor__details summary::-webkit-details-marker {
	display: none;
}

.fh-ms-editor__details summary::marker {
	content: '';
	display: none;
}

.fh-ms-editor__details summary::after {
	border-bottom: 2px solid #6b7280;
	border-right: 2px solid #6b7280;
	content: '';
	flex: 0 0 auto;
	height: 0.45em;
	margin-left: auto;
	transform: rotate(45deg);
	transition: transform 0.15s ease;
	width: 0.45em;
}

.fh-ms-editor__details[open] > summary::after {
	transform: rotate(-135deg);
}

.fh-ms-dnd-handle--section {
	flex: 0 0 auto;
	padding: 2px 4px 2px 0;
}

.fh-ms-editor__staff {
	display: grid;
	gap: 12px;
}

.fh-ms-editor__staff fieldset {
	border: 1px solid var(--fh-border);
	border-radius: 8px;
	margin: 0;
	padding: 10px;
}

.fh-ms-editor__hint {
	color: #6b7280;
	font-size: 12px;
	margin: 0 0 8px;
}

.fh-ms-editor__rosters {
	display: grid;
	gap: 12px;
}

.fh-ms-roster-row {
	align-items: center;
	border: 1px dashed transparent;
	border-radius: 6px;
	display: grid;
	gap: 4px;
	grid-template-columns: 18px 1fr 110px 28px;
	margin-bottom: 4px;
}

/* handle | # | name | birth | remove */
.fh-ms-roster-row--nums {
	grid-template-columns: 18px 44px 1fr 110px 28px;
}

.fh-ms-roster-row.is-drag-over {
	background: #eff6ff;
	border-color: #93c5fd;
}

.fh-ms-roster-row.is-dragging {
	opacity: 0.55;
}

.fh-ms-roster-row__remove {
	justify-self: center;
	line-height: 1;
	min-width: 28px;
	padding: 2px 0;
}

.fh-ms-field [data-fill-roster-wrap] {
	margin-top: 4px;
}

.fh-ms-roster-row input {
	border: 1px solid var(--fh-border);
	border-radius: 4px;
	font-size: 12px;
	padding: 4px 6px;
	width: 100%;
}

.fh-ms-roster-row__num {
	text-align: center;
}

/* A4 preview: SVG master scaled with transform; overflow stays inside the viewport */
.fh-ms-preview {
	min-width: 0;
	padding: 0;
	width: 100%;
}

.fh-ms-btn--small {
	font-size: 13px;
	padding: 5px 10px;
}

.fh-ms-preview__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-preview__label {
	color: #4b5563;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}

.fh-ms-editor-toggle {
	margin: 0 0 10px;
}

.fh-ms-editor-toggle--foot {
	margin: 10px 0 0;
}

.fh-ms-zoom {
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 8px;
	max-width: 100%;
}

.fh-ms-zoom__btn {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 4px;
	color: var(--fh-text);
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	height: 28px;
	line-height: 1;
	padding: 0;
	width: 28px;
}

.fh-ms-zoom__value {
	color: #4b5563;
	font-size: 12px;
	font-weight: 600;
	min-width: 40px;
	text-align: center;
}

.fh-ms-paper-viewport {
	background: #e5e7eb;
	border-radius: 8px;
	box-sizing: border-box;
	max-width: 100%;
	overflow: auto;
	position: relative;
	width: 100%;
}

/* Holds the scaled size so layout and scrollbars follow the zoom. */
.fh-ms-paper-sizer {
	margin: 0 auto;
	overflow: hidden;
	position: relative;
}

.fh-ms-paper {
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
	height: 297mm;
	left: 0;
	position: absolute;
	top: 0;
	transform: scale(var(--fh-preview-scale, 1));
	transform-origin: 0 0;
	width: 210mm;
}

.fh-ms--error,
.fh-ms--login {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 10px;
	padding: 24px;
	text-align: center;
}

.fh-ms-gate__title {
	font-size: 1.35rem;
	margin: 0 0 8px;
}

.fh-ms-gate__or {
	color: var(--fh-muted, #666);
	margin: 16px 0 8px;
}

.fh-ms-gate__error {
	color: #b32d2e;
	font-weight: 600;
}

.fh-ms-gate__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 auto;
	max-width: 320px;
	text-align: left;
}

.fh-ms-guest-logout {
	display: inline;
	margin: 0;
}

.fh-ms-guest-logout .fh-ms-btn--danger {
	width: auto;
}

.fh-ms-logo-field__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.fh-ms-logo-field__preview {
	margin-top: 8px;
}

.fh-ms-logo-field__preview img {
	background: #f6f7f7;
	border: 1px solid var(--fh-border, #ccd0d4);
	display: block;
	height: auto;
	max-height: 48px;
	max-width: 120px;
	object-fit: contain;
	width: auto;
}

.fh-ms-field--check {
	align-items: center;
	display: flex;
	flex-direction: row;
	gap: 8px;
}

.fh-ms-field--check input[type="checkbox"] {
	flex: 0 0 auto;
	margin: 0;
}

.fh-ms-team-logos {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr 1fr;
}

.fh-ms-team-logo-side__label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

@media (max-width: 720px) {
	.fh-ms-team-logos {
		grid-template-columns: 1fr;
	}
}

.fh-ms-local-sheets {
	margin-top: 0;
	min-width: 0;
	text-align: left;
	width: 100%;
}

.fh-ms-local-sheets__title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 12px;
}

.fh-ms-local-sheets__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.fh-ms-local-sheet {
	align-items: center;
	background: #fff;
	border: 1px solid var(--fh-border, #ccd0d4);
	border-radius: 8px;
	box-sizing: border-box;
	display: flex;
	flex-wrap: nowrap;
	gap: 12px 16px;
	justify-content: space-between;
	min-width: 0;
	padding: 12px 14px;
	width: 100%;
}

.fh-ms-local-group .fh-ms-local-sheet {
	border-left: none;
	border-radius: 0;
	border-right: none;
	border-top: 1px solid var(--fh-border, #ccd0d4);
	margin: 0;
	width: 100%;
}

.fh-ms-local-group .fh-ms-local-sheet:last-child {
	border-bottom: none;
}

.fh-ms-local-sheet__meta {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.fh-ms-local-sheet__title {
	font-weight: 600;
	margin-bottom: 4px;
	overflow-wrap: anywhere;
}

.fh-ms-local-sheet__teams {
	display: grid;
	gap: 2px;
	margin-bottom: 2px;
	min-width: 0;
}

.fh-ms-local-sheet__team {
	font-size: 0.95rem;
	line-height: 1.35;
	min-width: 0;
	overflow-wrap: anywhere;
}

.fh-ms-local-sheet__sub {
	color: var(--fh-muted, #666);
	font-size: 0.85rem;
	margin-top: 4px;
}

.fh-ms-local-sheet__actions {
	display: flex;
	flex: 0 0 auto;
	flex-shrink: 0;
	flex-wrap: nowrap;
	gap: 6px;
}

.fh-ms-local-sheet__actions .fh-ms-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1100px) {
	.fh-ms-toolbar__row .fh-ms-btn,
	.fh-ms-toolbar__row .fh-ms-guest-logout {
		flex: 1 1 9.5rem;
	}
}

/* Shared SVG inline edit overlay (match-sheet + crosstable). */
.fh-ms-svg-edit-overlay,
.fh-svg-inline-edit-overlay {
	box-sizing: border-box;
	left: 0;
	line-height: 0;
	position: absolute;
	top: 0;
	z-index: 5;
}

.fh-ms-svg-edit-input,
.fh-svg-inline-edit-input {
	background: #dbeafe;
	border: none;
	border-radius: 0;
	box-shadow: inset 0 0 0 1px #3b82f6;
	box-sizing: border-box;
	caret-color: #1e3a8a;
	display: block;
	font-family: Arial, Helvetica, sans-serif;
	height: 100%;
	line-height: 1;
	margin: 0;
	outline: none;
	padding: 0;
	width: 100%;
}

textarea.fh-ms-svg-edit-input,
textarea.fh-svg-inline-edit-input {
	line-height: 1.2;
	overflow: auto;
	resize: none;
	white-space: pre-wrap;
	word-break: break-word;
}

.fh-ms-preview [data-fh-edit] {
	cursor: text;
}

.fh-ms-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	overflow: auto;
	padding: max(12px, env(safe-area-inset-top, 0px))
		max(12px, env(safe-area-inset-right, 0px))
		max(12px, env(safe-area-inset-bottom, 0px))
		max(12px, env(safe-area-inset-left, 0px));
	position: fixed;
	z-index: 1000;
}

.fh-ms-modal__backdrop {
	background: rgba(17, 24, 39, 0.45);
	inset: 0;
	position: absolute;
}

.fh-ms-modal__panel {
	background: #fff;
	border: 1px solid var(--fh-border);
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 24px);
	max-height: min(92dvh, calc(100svh - 24px));
	max-width: 420px;
	overflow: hidden;
	padding: 18px 18px 14px;
	position: relative;
	width: min(420px, 100%);
	z-index: 1;
}

.fh-ms-modal__panel--wide {
	max-width: 640px;
	width: min(640px, 100%);
}

.fh-ms-modal__title {
	flex-shrink: 0;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 10px;
}

.fh-ms-modal__message {
	color: #6b7280;
	flex-shrink: 0;
	font-size: 13px;
	line-height: 1.45;
	margin: 0 0 14px;
}

.fh-ms-modal__form {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.fh-ms-modal__fields {
	display: grid;
	flex: 1 1 auto;
	gap: 12px;
	margin-bottom: 0;
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.fh-ms-modal__fields:empty {
	display: none;
	margin: 0;
}

.fh-ms-modal__field {
	display: grid;
	gap: 4px;
}

.fh-ms-modal__field span {
	font-size: 13px;
	font-weight: 600;
}

.fh-ms-modal__field input {
	border: 1px solid var(--fh-border);
	border-radius: 6px;
	font-size: 14px;
	padding: 8px 10px;
	width: 100%;
}

.fh-ms-modal__field input:focus {
	border-color: var(--fh-blue);
	outline: 2px solid rgba(30, 90, 168, 0.2);
	outline-offset: 1px;
}

.fh-ms-modal__actions {
	background: #fff;
	border-top: 1px solid var(--fh-border);
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 12px;
	padding-top: 12px;
}

.fh-ms-modal__actions .fh-ms-btn {
	font-size: 13px;
	min-width: 96px;
}

@media (max-width: 640px) {
	.fh-ms-modal__panel,
	.fh-ms-modal__panel--wide {
		max-width: 100%;
		padding: 14px 12px 12px;
		width: 100%;
	}

	.fh-ms-modal__title {
		font-size: 16px;
		margin-bottom: 8px;
	}

	.fh-ms-modal__message {
		font-size: 12px;
		margin-bottom: 10px;
	}

	.fh-ms-modal__official-row-fields {
		gap: 4px;
	}

	.fh-ms-modal__official-row-fields .fh-ms-official-control__input,
	.fh-ms-modal__field .fh-ms-official-control__input {
		font-size: 12px;
		padding: 6px 24px 6px 6px;
	}

	.fh-ms-modal__official-row-fields .fh-ms-official-control__toggle {
		font-size: 10px;
		width: 24px;
	}

	.fh-ms-modal__actions {
		gap: 6px;
	}

	.fh-ms-modal__actions .fh-ms-btn {
		flex: 1 1 auto;
		min-width: 0;
	}

	.fh-ms-modal__checklist--officials {
		max-height: min(240px, 36vh);
	}
}

[hidden] {
	display: none !important;
}

.fh-ms--rosters-open .fh-ms-toolbar {
	display: none !important;
}

@media print {
	.fh-ms-toolbar__stage,
	.fh-ms-toolbar,
	.fh-ms-editor,
	.fh-ms-editor-toggle,
	.fh-ms-picker,
	.fh-ms-start,
	.fh-ms-alerts,
	.fh-ms-summary,
	.fh-ms-loading,
	.fh-ms-preview__label,
	.fh-ms-preview__head,
	.fh-ms-zoom,
	.fh-ms-btn,
	.fh-ms-modal,
	.fh-ms-crosstable__toolbar,
	.fh-ms-crosstable__warn {
		display: none !important;
	}

	.fh-ms-paper {
		box-shadow: none;
	}
}
