/* Стили экранов */

/* ---------- Цвета ролей ---------- */

[data-role="drums"] { --role: var(--role-drums); }
[data-role="rhythm"] { --role: var(--role-rhythm); }
[data-role="lead"] { --role: var(--role-lead); }
[data-role="bass"] { --role: var(--role-bass); }
[data-role="keys"] { --role: var(--role-keys); }
[data-role="vocal"] { --role: var(--role-vocal); }
[data-role="backing"] { --role: var(--role-backing); }

.role-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--role, var(--accent));
	color: #0b0d12;
	font-weight: 800;
	font-size: 1.3rem;
}

.role-icon-big {
	width: 96px;
	height: 96px;
	font-size: 2.2rem;
}

/* ---------- Выбор роли ---------- */

.role-select {
	gap: 20px;
}

.rs-app {
	color: var(--fg-3);
	font-size: var(--fs-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rs-title {
	margin-top: 4px;
	font-size: 2rem;
	font-weight: 800;
}

.role-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--gap);
	flex: 1;
	align-content: start;
}

.role-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	min-height: 120px;
	padding: 16px;
	border: 2px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-2);
	color: var(--fg);
	touch-action: manipulation;
}

.role-card:active {
	transform: scale(0.98);
}

.role-card.is-saved {
	border-color: var(--role);
}

.role-card[data-role="drums"] {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	min-height: 96px;
}

.role-name {
	font-size: 1.15rem;
	font-weight: 800;
}

.rs-foot {
	display: flex;
	justify-content: center;
	gap: 24px;
}

@media (orientation: landscape) and (min-width: 700px) {
	.role-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.role-card[data-role="drums"] {
		grid-column: auto;
		flex-direction: column;
		align-items: flex-start;
		justify-content: space-between;
		min-height: 120px;
	}
}

/* ---------- Цвета типов частей ---------- */

[data-type="intro"] { --sec: var(--sec-intro); }
[data-type="verse"] { --sec: var(--sec-verse); }
[data-type="prechorus"] { --sec: var(--sec-prechorus); }
[data-type="chorus"] { --sec: var(--sec-chorus); }
[data-type="bridge"] { --sec: var(--sec-bridge); }
[data-type="solo"] { --sec: var(--sec-solo); }
[data-type="interlude"] { --sec: var(--sec-interlude); }
[data-type="outro"] { --sec: var(--sec-outro); }
[data-type="other"] { --sec: var(--sec-other); }

/* ---------- Карта песни ---------- */

.song-map {
	position: relative;
	display: flex;
	gap: 2px;
	height: 14px;
}

.map-seg {
	flex-basis: 0;
	min-width: 3px;
	border-radius: 3px;
	background: var(--sec);
}

.map-marker {
	position: absolute;
	top: -3px;
	bottom: -3px;
	width: 3px;
	margin-left: -1px;
	border-radius: 2px;
	background: var(--fg);
	box-shadow: 0 0 0 1px var(--bg);
}

/* ---------- Новая песня / проверка ---------- */

.edit {
	gap: 20px;
	max-width: 760px;
	margin: 0 auto;
}

.edit-title {
	font-size: var(--fs-large);
	font-weight: 800;
}

.edit-step {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.edit-step h2 {
	font-size: var(--fs-base);
	font-weight: 800;
	color: var(--fg-2);
}

.edit-step-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.edit-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.field {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-small);
	background: var(--bg-2);
	color: var(--fg);
	font: inherit;
	font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
}

.field:focus {
	outline: 2px solid var(--accent);
	outline-offset: -1px;
}

.field-extra,
.field-prompt {
	resize: vertical;
}

.field-source {
	min-height: 40vh;
	resize: vertical;
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1.45;
	white-space: pre;
	overflow-x: auto;
}

@supports (-webkit-touch-callout: none) {
	.field-source {
		font-size: 16px;
	}
}

.btn-wide {
	width: 100%;
}

.link-btn {
	border: 0;
	background: none;
	cursor: pointer;
}

.edit-msg {
	min-height: 1.35em;
	color: var(--good);
	font-size: var(--fs-small);
}

.edit-summary {
	font-weight: 800;
	font-size: var(--fs-large);
	color: var(--fg-2);
}

.edit-summary.is-good { color: var(--good); }
.edit-summary.is-warn { color: var(--ok); }
.edit-summary.is-bad { color: var(--bad); }

.issues {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.issue {
	display: flex;
	gap: 10px;
	align-items: baseline;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-left: 4px solid var(--bad);
	border-radius: var(--radius-small);
	background: var(--bg-2);
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
}

.issue[data-level="warn"],
.issue[data-level="check"] {
	border-left-color: var(--ok);
}

.issue[data-level="check"] .issue-text {
	color: var(--ok);
}

.issue-line {
	flex: none;
	color: var(--fg-3);
	font-size: var(--fs-small);
	font-variant-numeric: tabular-nums;
}

.preview {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pv-title {
	font-size: 1.5rem;
	font-weight: 800;
}

.pv-artist {
	color: var(--fg-2);
	font-weight: 700;
}

.pv-facts {
	margin-top: 6px;
	color: var(--fg-3);
	font-size: var(--fs-small);
}

.pv-note {
	margin-top: 6px;
	color: var(--fg-2);
	font-style: italic;
}

.pv-sections {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pv-section {
	display: inline-flex;
	gap: 8px;
	padding: 6px 10px;
	border-left: 4px solid var(--sec);
	border-radius: var(--radius-small);
	background: var(--bg-2);
	font-weight: 700;
}

.pv-sec-bars {
	color: var(--fg-3);
	font-variant-numeric: tabular-nums;
}

.pv-chords {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.chip {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--bg-3);
	font-weight: 800;
}

.edit-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.edit-actions[hidden] {
	display: none;
}

.rhythm-txt {
	min-height: 1.4em;
	font-weight: 800;
	font-size: var(--fs-large);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- Библиотека ---------- */

.lib {
	gap: 14px;
	max-width: 760px;
	margin: 0 auto;
}

.lib-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lib-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right: 10px;
	border: 2px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-2);
}

.lib-row.is-selected {
	border-color: var(--good);
}

.lib-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: 12px 14px;
	border: 0;
	background: none;
	color: var(--fg);
	text-align: left;
	font: inherit;
	cursor: pointer;
	touch-action: manipulation;
}

.lib-title {
	font-size: 1.1rem;
	font-weight: 800;
}

.lib-artist {
	color: var(--fg-2);
	font-weight: 700;
}

.lib-meta {
	color: var(--fg-3);
	font-size: var(--fs-small);
}

/* ---------- Пульт ведущего ---------- */

.ctl {
	gap: 14px;
	max-width: 760px;
	margin: 0 auto;
}

/* Во время игры — ровно экран: структура прокручивается внутри, STOP на месте */
.ctl[data-mode="play"] {
	height: 100vh;
	height: 100dvh;
}

.topbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ctl-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
}

.ctl-center {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ctl-loading {
	color: var(--fg-2);
	font-size: var(--fs-large);
	font-weight: 700;
}

.ctl-msg {
	min-height: 1.35em;
	color: var(--bad);
	font-weight: 700;
	text-align: center;
}

.ctl-song {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ctl-song-text {
	flex: 1;
	min-width: 0;
}

.ctl-title {
	font-size: 1.5rem;
	font-weight: 900;
	line-height: 1.15;
}

.ctl-artist {
	color: var(--fg-2);
	font-weight: 700;
}

.ctl-note {
	color: var(--fg-2);
	font-style: italic;
}

.ctl-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ctl-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ctl-label {
	min-width: 72px;
	color: var(--fg-3);
	font-size: var(--fs-small);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.stepper {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.stepper-value {
	min-width: 130px;
	text-align: center;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.chip-btn {
	border: 2px solid transparent;
	border-left: 4px solid var(--sec, var(--line));
	border-radius: var(--radius-small);
	color: var(--fg);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	touch-action: manipulation;
}

.chip-btn.is-on {
	border-color: var(--accent);
	border-left-color: var(--sec, var(--accent));
	background: var(--bg-2);
}

.ctl-now {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ctl-now-text {
	min-width: 0;
}

.ctl-part {
	font-size: min(12vw, 3rem);
	font-weight: 900;
	line-height: 1.05;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.ctl-part[data-phase="countin"] {
	color: var(--count-2);
	font-variant-numeric: tabular-nums;
}

.ctl-bar {
	min-height: 1.35em;
	color: var(--fg-2);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.btn-stop {
	min-height: 110px;
	font-size: 2.25rem;
}

/* ---------- Моргание доли ---------- */

.beat {
	display: flex;
	align-items: center;
	gap: 8px;
}

.beat-dot {
	width: 16px;
	height: 16px;
	border: 2px solid var(--fg-3);
	border-radius: 50%;
}

.beat-dot[data-strong="1"] {
	width: 22px;
	height: 22px;
}

.beat-big .beat-dot {
	width: 26px;
	height: 26px;
}

.beat-big .beat-dot[data-strong="1"] {
	width: 36px;
	height: 36px;
}

.beat-dot[data-state="on"] {
	border-color: var(--fg-2);
	background: var(--fg-2);
}

.beat-dot[data-state="flash"] {
	border-color: var(--fg);
	background: var(--fg);
	box-shadow: 0 0 16px var(--fg);
}

.beat-dot[data-strong="1"][data-state="flash"] {
	border-color: var(--ok);
	background: var(--ok);
	box-shadow: 0 0 22px var(--ok);
}

/* ---------- Структура песни ---------- */

.structure {
	position: relative;
	flex: 1;
	min-height: 160px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sv-item {
	position: relative;
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-left: 5px solid var(--sec);
	border-radius: var(--radius-small);
	background: var(--bg-2);
	font-weight: 800;
	font-size: 1.1rem;
}

.sv-bars {
	color: var(--fg-3);
	font-variant-numeric: tabular-nums;
}

.sv-item[data-state="past"] {
	opacity: 0.4;
}

.sv-item[data-state="current"] {
	background: var(--bg-3);
	outline: 2px solid var(--sec);
}

.sv-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	overflow: hidden;
	border-radius: 0 0 var(--radius-small) 0;
}

.sv-fill {
	width: 0;
	height: 100%;
	background: var(--sec);
}

/* ---------- Экран музыканта ---------- */

.player {
	--ts: 1;
	gap: 10px;
}

.pl-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
}

/* Во время игры — ровно экран, без прокрутки */
.player[data-mode="play"] {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	padding-top: calc(10px + var(--safe-top));
	padding-bottom: calc(8px + var(--safe-bottom));
}

/* Громкость части — цвет тонкой рамки экрана */
.player::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 60;
	border: 5px solid var(--dyn, transparent);
	pointer-events: none;
}

.player[data-dyn="soft"] { --dyn: var(--dyn-soft); }
.player[data-dyn="medium"] { --dyn: var(--dyn-medium); }
.player[data-dyn="loud"] { --dyn: var(--dyn-loud); }

.pl-center {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
}

.pl-role {
	font-size: 2rem;
	font-weight: 800;
}

.pl-state {
	font-size: var(--fs-large);
	font-weight: 700;
	color: var(--fg-2);
}

.btn-gear {
	width: 44px;
	padding: 0;
	font-size: 1.3rem;
}

.status-compact {
	gap: 8px;
}

.status-compact .st-txt {
	display: none;
}

/* Песня выбрана, стоп */
.pl-card {
	gap: 10px;
}

.pl-title {
	font-size: 2rem;
	font-weight: 900;
	line-height: 1.15;
}

.pl-artist {
	color: var(--fg-2);
	font-size: var(--fs-large);
	font-weight: 700;
}

.pl-meta {
	color: var(--fg-2);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pl-note {
	max-width: 32em;
	color: var(--fg-2);
	font-style: italic;
}

.pl-chords-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.pl-chords {
	justify-content: center;
	font-size: 1.15rem;
}

/* Игра: часть + доля */
.pl-now {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pl-part {
	min-width: 0;
	padding-left: 10px;
	border-left: 6px solid var(--sec, transparent);
	font-size: min(7vw, 2rem);
	font-weight: 900;
	line-height: 1.1;
	text-transform: uppercase;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Основная область роли */
.pl-main {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 0;
	text-align: center;
}

.pl-main[data-rest="1"] > :first-child {
	opacity: 0.2;
}

.pl-soon {
	font-size: var(--fs-large);
	font-weight: 700;
}

.pl-end {
	color: var(--fg-2);
	font-size: min(22vw, 30vh);
	font-weight: 900;
	line-height: 1;
}

.rest {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.rest-txt {
	color: var(--fg-2);
	font-size: min(22vw, 30vh);
	font-weight: 900;
	line-height: 1;
}

.rest-when {
	color: var(--fg-2);
	font-size: 1.5rem;
	font-weight: 800;
}

.rest-when:empty {
	display: none;
}

.pl-hint {
	color: var(--ok);
	font-weight: 700;
	text-align: center;
}

.pl-hint:empty {
	display: none;
}

/* Next: SOLO in 2 bars */
.next-up {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: var(--fs-large);
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
}

.nu-label {
	color: var(--fg-3);
}

.nu-name {
	color: var(--sec, var(--fg));
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nu-when {
	color: var(--fg-2);
}

/* Нижняя строка: мелкий текст, ⚙, связь */
.pl-foot {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lyric-line {
	flex: 1;
	min-width: 0;
	color: var(--fg-2);
	font-size: calc(var(--fs-base) * var(--ts));
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lyric-line[data-state="next"] {
	color: var(--fg-3);
}

/* ---------- Отсчёт ---------- */

.countdown {
	position: absolute;
	inset: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	background: var(--bg);
	text-align: center;
}

.cd-num {
	font-size: min(45vw, 45vh);
	font-weight: 900;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	transition: transform 0.12s ease-out;
}

.cd-num[data-level="ready"] {
	color: var(--fg-2);
	font-size: min(12vw, 3.5rem);
}

.cd-num[data-level="1"] { color: var(--count-1); }
.cd-num[data-level="2"] { color: var(--count-2); }
.cd-num[data-level="3"] { color: var(--count-3); }

.cd-num[data-flash="1"] {
	transform: scale(1.08);
}

.cd-label {
	color: var(--fg-2);
	font-size: min(8vw, 2.25rem);
	font-weight: 800;
	text-transform: uppercase;
}

/* 4 · 3 · 2 · 1 перед вступлением */
.entry-count {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.25em;
	font-size: calc(min(14vw, 12vh) * var(--ts));
	font-weight: 900;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.ec-digit {
	color: var(--fg-3);
	opacity: 0.55;
	transition: transform 0.1s ease-out;
}

.ec-digit[data-state="past"] {
	opacity: 0.2;
}

.ec-digit[data-state="now"] {
	opacity: 1;
	transform: scale(1.35);
}

.ec-digit[data-level="1"] { color: var(--count-1); }
.ec-digit[data-level="2"] { color: var(--count-2); }
.ec-digit[data-level="3"] { color: var(--count-3); }

.ec-dot {
	color: var(--fg-3);
	opacity: 0.4;
}

/* ---------- Текст для вокала ---------- */

/* Текущая строка по центру, предыдущая — сразу над ней, следующая — сразу под ней */
.lyrics {
	--ly: calc(min(8vw, 7vh) * var(--ts));
	flex: 1;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
	row-gap: calc(var(--ly) * 0.45);
	width: 100%;
	min-height: 0;
	text-align: center;
}

.ly-top,
.ly-bottom {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	min-height: 0;
	overflow: hidden;
}

.ly-bottom {
	justify-content: flex-start;
}

.ly-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.ly-line {
	width: 100%;
	font-weight: 800;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.ly-cur {
	font-size: var(--ly);
}

.ly-cur[data-state="upcoming"] {
	color: var(--fg-3);
}

.ly-prev {
	color: var(--fg-3);
	font-size: calc(var(--ly) * 0.55);
	opacity: 0.6;
}

.ly-next {
	color: var(--fg-2);
	font-size: calc(var(--ly) * 0.62);
}

/* Бэк: основной текст мелко серым над строками бэка */
.ly-context {
	color: var(--fg-3);
	font-size: calc(var(--ly) * 0.55);
}

.lyrics[data-state="rest"] .ly-context {
	color: var(--fg-2);
	font-size: calc(var(--ly) * 0.8);
}

.ly-progress {
	width: min(80%, 640px);
	height: 5px;
	overflow: hidden;
	border-radius: 3px;
	background: var(--bg-3);
}

.ly-fill {
	height: 100%;
	background: var(--role, var(--accent));
	transform: scaleX(0);
	transform-origin: left center;
}

.ly-status {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.ly-status-txt {
	color: var(--fg-2);
	font-size: calc(var(--ly) * 0.75);
	font-weight: 900;
	text-transform: uppercase;
}

.ly-status-when {
	color: var(--fg-2);
	font-size: calc(var(--fs-large) * var(--ts));
	font-weight: 800;
}

.ly-status-txt:empty,
.ly-status-when:empty {
	display: none;
}

.ly-badge {
	display: inline-block;
	margin-right: 0.4em;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	background: var(--role-backing);
	color: #0b0d12;
	font-size: 0.38em;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Аккорды над словами */
.ly-segs {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: center;
	vertical-align: bottom;
}

.ly-seg {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.ly-seg[data-gap="1"] {
	margin-right: 0.28em;
}

.ly-chord {
	padding-right: 0.35em;
	color: var(--ok);
	font-size: 0.6em;
	font-weight: 900;
	line-height: 1.15;
	white-space: nowrap;
}

/* ---------- Лист настроек ---------- */

.sheet-overlay {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
}

.sheet {
	width: 100%;
	max-width: 560px;
	max-height: 90dvh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px calc(18px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(18px + var(--safe-left));
	border: 1px solid var(--line);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--bg-2);
}

.sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.sheet-title {
	font-size: var(--fs-large);
	font-weight: 800;
}

.set-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 48px;
}

.set-label {
	font-weight: 700;
}

.set-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.set-toggle {
	min-width: 72px;
}

.set-value {
	min-width: 64px;
}

.sheet-foot {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 6px;
}

.sheet-foot .btn {
	margin-left: auto;
}

/* ---------- Отладочный стробоскоп ---------- */

.dbg {
	gap: var(--gap);
	transition: none;
	user-select: none;
}

.dbg[data-flash="strong"] {
	background: var(--flash-strong);
	color: #000;
}

.dbg[data-flash="weak"] {
	background: var(--flash-weak);
}

.dbg-center {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.dbg-beat {
	font-size: min(45vw, 45vh);
	font-weight: 900;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.dbg[data-phase="countin"] .dbg-beat {
	color: var(--count-2);
}

.dbg[data-phase="countin"][data-flash="strong"] .dbg-beat {
	color: var(--count-3);
}

.dbg-label {
	min-height: 1.5em;
	font-size: var(--fs-large);
	font-weight: 700;
	color: var(--fg-2);
}

.dbg[data-flash="strong"] .dbg-label,
.dbg[data-flash="strong"] .dbg-info,
.dbg[data-flash="strong"] .status,
.dbg[data-flash="strong"] .link-small {
	color: #000;
}

.dbg-info {
	min-height: 1.35em;
	text-align: center;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--fg-3);
}

.dbg-msg {
	min-height: 1.35em;
	text-align: center;
	color: var(--bad);
	font-weight: 700;
}

.dbg-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: var(--gap);
}

.dbg-buttons .btn {
	padding: 0 8px;
	white-space: nowrap;
}
