:root {
	--bg: #0a0a0a;
	--fg: #ffffff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
	margin: 0;
	height: 100%;
	background: #000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior: none;
}

.screen {
	position: fixed;
	inset: 0;
	height: 100%;
}

/* ---------- Station list ---------- */

.list {
	display: flex;
	flex-direction: column;
	z-index: 1;
}

.band {
	flex: 1 1 0;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 clamp(20px, 6vw, 64px);
	background: var(--band-bg);
	color: var(--band-fg);
	border: 0;
	width: 100%;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	transition: transform .18s ease, filter .18s ease;
	transform-origin: center;
	opacity: 0;
	animation: bandIn .45s ease forwards;
	animation-delay: var(--delay, 0ms);
}

@keyframes bandIn {
	from { opacity: 0; transform: translateY(26px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Desktop hover = ascetic effect; mobile press */
@media (hover: hover) {
	.band:hover { filter: brightness(1.06); transform: scale(1.012); }
}
.band:active { transform: scale(.985); filter: brightness(.97); }

.band__name {
	font-size: clamp(34px, 10vw, 84px);
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
	flex: 0 0 auto;
}

.band__genre {
	font-size: clamp(10px, 1.3vw, 13px);
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.55;
	text-align: right;
	max-width: 45%;
	padding-left: 12px;
	flex: 0 1 auto;
	transition: opacity .25s ease, filter .25s ease, color .25s ease;
}

/* Every station keeps its colour: the live one is marked, not the rest muted. */
.band { position: relative; }

/* Tuner bar on the leading edge of the live station. */
.band::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 7px;
	background: currentColor;
	opacity: 0;
	pointer-events: none;
	z-index: 1;
}

.list.has-live .band.is-live::before { opacity: 1; }

/* The live band also claims a bit more height — hierarchy without dimming. */
.list.has-live .band.is-live {
	flex-grow: 1.3;
	z-index: 2;
}

/* ---------- Player ---------- */

.player {
	--slide-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
	--slide-ms: 320ms;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--fg);
	padding:
		max(12px, env(safe-area-inset-top))
		max(20px, env(safe-area-inset-right))
		max(16px, env(safe-area-inset-bottom))
		max(20px, env(safe-area-inset-left));
	z-index: 20;
	transform: translate3d(100%, 0, 0);
	transition: transform var(--slide-ms) var(--slide-ease);
	pointer-events: none;
	visibility: hidden;
	will-change: transform;
}

.player.is-visible {
	visibility: visible;
}

.player.is-open {
	transform: translate3d(0, 0, 0);
	pointer-events: auto;
}

.player.is-instant {
	transition: none !important;
}

.player.is-open:not(.is-leaving) .player__header,
.player.is-open:not(.is-leaving) .player__center,
.player.is-open:not(.is-leaving) .player__footer {
	animation: playerMorphIn .32s var(--slide-ease) both;
}

.player.is-open:not(.is-leaving) .player__center { animation-delay: 40ms; }
.player.is-open:not(.is-leaving) .player__footer { animation-delay: 70ms; }

.player.is-leaving .player__header,
.player.is-leaving .player__center,
.player.is-leaving .player__footer {
	animation: playerMorphOut .28s var(--slide-ease) both;
}

.player.is-leaving .player__center { animation-delay: 20ms; }
.player.is-leaving .player__footer { animation-delay: 40ms; }

@keyframes playerMorphIn {
	from { opacity: 0; transform: translateX(22px); filter: blur(1.5px); }
	to   { opacity: 1; transform: none; filter: none; }
}

@keyframes playerMorphOut {
	from { opacity: 1; transform: none; filter: none; }
	to   { opacity: 0; transform: translateX(18px); filter: blur(1.5px); }
}

.player__header {
	--back-size: 30px;
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding-top: 4px;
	min-height: var(--back-size);
}

.backbtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	height: var(--back-size);
	line-height: 0;
}
.backbtn:active { opacity: .75; }
.backbtn:active .iconbtn { transform: scale(.92); }

.iconbtn {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	padding: 0;
	margin: 0;
	width: var(--back-size);
	height: var(--back-size);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 var(--back-size);
	line-height: 0;
	transition: transform .15s ease, opacity .15s ease;
}
.iconbtn svg {
	width: var(--back-size);
	height: var(--back-size);
	display: block;
	flex-shrink: 0;
}

.player__wordmark {
	font-weight: 900;
	letter-spacing: 0.06em;
	font-size: var(--back-size);
	line-height: 1;
	height: var(--back-size);
	display: inline-flex;
	align-items: center;
	/* optical center vs chevron stroke */
	transform: translateY(0.5px);
}

.player__center {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	text-align: center;
	width: 100%;
}

/* Mobile-first: title + rule share one centered box (rule = text width) */
.player__titleblock {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: fit-content;
	max-width: min(88vw, 34ch);
	margin: 0 auto;
}

.player__track {
	font-size: clamp(20px, 5.2vw, 28px);
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
	padding: 0 0 16px;
	max-width: min(88vw, 34ch);
	text-align: center;
	transition: opacity .3s ease;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.player__rule {
	width: 100%;
	height: 1.5px;
	background: currentColor;
	opacity: .9;
	margin: 0 0 40px;
	flex: 0 0 auto;
}

/*
 * HARD LIMIT — WEB ONLY (min-width 768px).
 * Short titles stay one line (fit-content); long ones wrap at max line width.
 * Rule still matches the title block width.
 */
@media (min-width: 768px) {
	.player__titleblock {
		max-width: min(92vw, 1100px);
	}

	.player__track {
		white-space: normal;
		max-width: min(92vw, 1100px);
		font-size: clamp(22px, 2.2vw, 30px);
		padding-bottom: 22px;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.player__rule {
		margin-bottom: 52px;
	}
}

.playbtn {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	border: 2px solid currentColor;
	background: none;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}
.playbtn:active { transform: scale(.9); }
.playbtn.playing #playIcon { animation: pulse 1.1s ease-in-out infinite; }

@keyframes pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.08); }
}

.player__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 0 0 auto;
	min-height: 44px;
	padding-bottom: max(4px, env(safe-area-inset-bottom));
	width: 100%;
	text-align: center;
}

.player__listeners {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	opacity: .75;
	/* reserve one line always — avoid genre jump on start/stop */
	min-height: 1.2em;
	line-height: 1.2;
	height: 1.2em;
	overflow: hidden;
	font-variant-numeric: tabular-nums;
}

.player__genre {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.2em;
	opacity: .85;
	text-align: center;
	max-width: 90%;
	line-height: 1.5;
}

/* ---------- Apps download ---------- */

/* Thin strip under DNB — all web + mobile web */
.appsbar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 26px;
	height: auto;
	padding:
		8px 12px
		max(8px, env(safe-area-inset-bottom));
	margin: 0;
	border: 0;
	/* distinct from DNB red — soft charcoal + lime light */
	background: #121212;
	color: #C6F000;
	font: inherit;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0;
	animation: bandIn .45s ease forwards;
	animation-delay: 300ms;
	text-shadow:
		0 0 10px rgba(198, 240, 0, 0.35),
		0 0 22px rgba(198, 240, 0, 0.12);
	transition: filter .18s ease, color .18s ease, text-shadow .18s ease;
}
.appsbar:hover {
	filter: brightness(1.12);
	color: #D4FF33;
	text-shadow:
		0 0 14px rgba(198, 240, 0, 0.55),
		0 0 28px rgba(198, 240, 0, 0.2);
}
.appsbar:active { filter: brightness(0.95); }

.apps-modal[hidden] { display: none !important; }

.apps-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 20px;
}

.apps-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.62);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: appsFade .22s ease;
}

.apps-modal__panel {
	position: relative;
	width: min(360px, 100%);
	background: #0A0A0A;
	color: #F3ECD9;
	padding: 28px 24px 24px;
	border: 1px solid rgba(243, 236, 217, 0.14);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	animation: appsIn .28s ease;
}

.apps-modal__x {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.55;
	padding: 4px 8px;
}
.apps-modal__x:hover { opacity: 1; }

.apps-modal__eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.22em;
	color: #C6F000;
}

.apps-modal__title {
	margin: 0;
	font-size: 28px;
	font-weight: 900;
	letter-spacing: 0.02em;
}

.apps-modal__sub {
	margin: 8px 0 22px;
	font-size: 13px;
	opacity: 0.65;
}

.apps-modal__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.apps-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 16px;
	text-decoration: none;
	color: inherit;
	border: 1px solid rgba(243, 236, 217, 0.14);
	border-radius: 10px;
	background: rgba(243, 236, 217, 0.025);
	transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.apps-row:hover {
	background: rgba(198, 240, 0, 0.09);
	border-color: rgba(198, 240, 0, 0.5);
	transform: translateY(-1px);
}
.apps-row--soon {
	opacity: 0.4;
	cursor: default;
}
.apps-row--soon:hover {
	background: rgba(243, 236, 217, 0.025);
	border-color: rgba(243, 236, 217, 0.14);
	transform: none;
}

.apps-row__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.apps-row__name {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
}
.apps-row__meta {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.13em;
	opacity: 0.5;
	text-transform: uppercase;
	white-space: nowrap;
	line-height: 1;
}
.apps-row__arrow {
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1;
	opacity: 0.35;
	transition: transform .16s ease, opacity .16s ease, color .16s ease;
}
.apps-row:hover .apps-row__arrow {
	opacity: 1;
	color: #C6F000;
	transform: translateY(2px);
}

/*
 * HARD LIMIT — MOBILE WEB ONLY (max-width 767px).
 * Get App: only Android (APK) + iOS (soon). No Windows/macOS.
 * Version stays visible for the mobile (APK) build.
 */
@media (max-width: 767.98px) {
	.apps-row--desktop-only { display: none !important; }
}


@keyframes appsFade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes appsIn {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}

/* ---------- Settings entry (list corner) ---------- */

.cornerbtn {
	position: absolute;
	top: max(10px, env(safe-area-inset-top));
	right: max(12px, env(safe-area-inset-right));
	z-index: 6;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #f3ecd9;
	cursor: pointer;
	opacity: 0;
	animation: bandIn .45s ease forwards;
	animation-delay: 340ms;
	transition: background .14s ease, transform .14s ease;
}
.cornerbtn:hover { background: rgba(0, 0, 0, 0.55); }
.cornerbtn:active { transform: scale(.92); }

/* ---------- Player tools (volume + repaint) ---------- */

.player__tools {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 6px;
}

.player__tool {
	opacity: 0.65;
	transition: opacity .15s ease, transform .15s ease;
}
.player__tool:hover { opacity: 1; }
.player__tool:active { transform: scale(.9); }
.player__tool svg { width: auto; height: auto; }
.player__tool.is-spinning svg { animation: repaintSpin .5s ease; }
.player__tool.is-on {
	opacity: 1;
	outline: 2px solid #60a5fa;
	outline-offset: 2px;
}


@keyframes repaintSpin {
	from { transform: rotate(0); }
	to   { transform: rotate(360deg); }
}

.vol-mute { display: none; }
.is-muted .vol-waves { display: none; }
.is-muted .vol-mute { display: block; }

/* ---------- Volume popover ---------- */

.volpop {
	position: fixed;
	z-index: 8000;
	width: 96px;
	height: 184px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 14px 0 16px;
	background: #0a0a0a;
	color: #f3ecd9;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: translateY(-6px) scale(0.98);
	transition: opacity .14s ease, transform .16s cubic-bezier(0.2, 0.9, 0.2, 1);
	user-select: none;
	-webkit-user-select: none;
}
.volpop.is-open { opacity: 1; transform: none; }

.volpop__value {
	font-size: 30px;
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.volpop__label {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.18em;
	opacity: 0.5;
}

.volpop__track {
	position: relative;
	flex: 1 1 auto;
	width: 32px;
	cursor: ns-resize;
	outline: none;
	touch-action: none;
}

.volpop__track::before {
	content: "";
	position: absolute;
	left: 11px;
	width: 10px;
	top: 0;
	bottom: 0;
	background: rgba(243, 236, 217, 0.2);
}

.volpop__fill {
	position: absolute;
	left: 11px;
	width: 10px;
	bottom: 0;
	height: 100%;
	background: currentColor;
}

.volpop__fill::after {
	content: "";
	position: absolute;
	left: -7px;
	right: -7px;
	top: -3px;
	height: 6px;
	background: currentColor;
}


/* ---------- Mini bar (list screen, while a station is live) ---------- */

.minibar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 2px;
	height: 56px;
	padding:
		0 max(6px, env(safe-area-inset-right))
		env(safe-area-inset-bottom)
		max(6px, env(safe-area-inset-left));
	background: var(--mini-bg, #0a0a0a);
	color: var(--mini-fg, #f3ecd9);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
	transform: translateY(100%);
	transition: transform .26s cubic-bezier(0.2, 0.9, 0.2, 1),
		background .25s ease, color .25s ease;
}
.minibar.is-open { transform: none; }

.minibar__nav,
.minibar__action {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity .12s ease, transform .12s ease;
}
.minibar__nav:hover,
.minibar__action:hover { opacity: 1; }
.minibar__nav:active,
.minibar__action:active { transform: scale(.9); }

.minibar__body {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	display: flex;
	align-items: center;
	padding: 0 8px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
}

.minibar__name {
	display: block;
	max-width: 100%;
	font-size: 17px;
	font-weight: 900;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Long track titles scroll instead of being cut in half. */
.minibar__name.is-marquee {
	text-overflow: clip;
	-webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
	mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
}
.minibar__name.is-marquee > span {
	display: inline-block;
	padding-right: 48px;
	animation: miniMarquee var(--marquee-ms, 9s) linear infinite;
}

@keyframes miniMarquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* The bar covers the bottom band, so give the list room to breathe — the home
   indicator makes it taller than its nominal height on iOS. */
.list.has-mini { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

/* ---------- Settings screen ---------- */

.settings {
	--slide-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
	display: flex;
	flex-direction: column;
	background: #0a0a0a;
	color: #f3ecd9;
	padding-top: max(10px, env(safe-area-inset-top));
	z-index: 40;
	transform: translate3d(100%, 0, 0);
	transition: transform 300ms var(--slide-ease);
	pointer-events: none;
	visibility: hidden;
	will-change: transform;
}
.settings.is-visible { visibility: visible; }
.settings.is-open { transform: none; pointer-events: auto; }

.settings__header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px max(16px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
}

.settings__wordmark {
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.2em;
	opacity: 0.55;
}

.settings__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.set-group {
	margin: 20px 0 0;
	padding: 0 18px 6px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.38;
}

.set-row {
	width: 100%;
	min-height: 46px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 18px;
	background: transparent;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background .12s ease;
}
.set-row:hover { background: rgba(255, 255, 255, 0.04); }
.set-row--static { cursor: default; }
.set-row--static:hover { background: transparent; }
.set-row--action .set-row__label { color: #C6F000; }

.set-row__label {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
}

.set-row__key {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	opacity: 0.5;
	padding: 3px 7px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	white-space: nowrap;
}

.set-switch {
	flex: 0 0 auto;
	position: relative;
	width: 38px;
	height: 20px;
	border: 1.5px solid rgba(255, 255, 255, 0.28);
	transition: background .15s ease, border-color .15s ease;
}
.set-switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	background: rgba(255, 255, 255, 0.6);
	transition: transform .15s ease, background .15s ease;
}
.set-row[aria-checked="true"] .set-switch {
	background: #C6F000;
	border-color: #C6F000;
}
.set-row[aria-checked="true"] .set-switch::after {
	transform: translateX(18px);
	background: #111;
}

.set-seg {
	flex: 0 0 auto;
	display: flex;
	border: 1px solid rgba(255, 255, 255, 0.22);
}
.set-seg__btn {
	min-width: 46px;
	padding: 5px 8px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	opacity: 0.5;
	cursor: pointer;
	transition: background .12s ease, color .12s ease, opacity .12s ease;
}
.set-seg__btn + .set-seg__btn { border-left: 1px solid rgba(255, 255, 255, 0.22); }
.set-seg__btn:hover { opacity: 0.85; }
.set-seg__btn[aria-checked="true"] {
	background: #C6F000;
	color: #111;
	opacity: 1;
}

/* Palette preview: one bar per station, so repainting needs no trip back. */
.set-palette {
	display: flex;
	gap: 5px;
	height: 104px;
	padding: 12px 18px 0;
}

.set-palette__bar {
	flex: 1 1 0;
	min-width: 0;
	border: 0;
	padding: 0 0 9px;
	background: var(--bar-bg, #1a1a1a);
	color: var(--bar-fg, #f3ecd9);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	cursor: pointer;
	transition: transform .14s ease;
}
.set-palette__bar:hover { transform: translateY(-3px); }
.set-palette__bar:active { transform: scale(0.96); }

.set-palette__name {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.16em;
	white-space: nowrap;
	overflow: hidden;
}

.set-palette.is-fresh .set-palette__bar {
	animation: paletteBarIn .4s cubic-bezier(0.2, 0.9, 0.2, 1) both;
	animation-delay: calc(var(--i) * 45ms);
}

@keyframes paletteBarIn {
	from { transform: scaleY(0.12); opacity: 0.15; }
	to   { transform: none; opacity: 1; }
}

.set-hint {
	margin: 10px 0 0;
	padding: 0 18px;
	font-size: 11px;
	line-height: 1.4;
	opacity: 0.38;
}

@media (min-width: 768px) {
	.settings__body { max-width: 560px; width: 100%; margin: 0 auto; }
	.settings__header { max-width: 560px; width: 100%; margin: 0 auto; }
}

/* ---------- Video mode ---------- */

.visual {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: #000;
	opacity: 0;
	transition: opacity .24s ease;
}
.visual.is-open { opacity: 1; }

.visual__canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* HUD hides itself like a video player once the pointer settles. */
.visual__hud {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding:
		max(14px, env(safe-area-inset-top))
		max(16px, env(safe-area-inset-right))
		max(16px, env(safe-area-inset-bottom))
		max(16px, env(safe-area-inset-left));
	pointer-events: none;
	opacity: 1;
	transition: opacity .3s ease;
}
.visual.is-idle .visual__hud { opacity: 0; }

.visual__meta {
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	gap: 3px;
	max-width: min(70vw, 640px);
	padding: 7px 10px;
	color: #f3ecd9;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(243, 236, 217, 0.18);
}

.visual__name {
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.22em;
}

.visual__track {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	opacity: 0.8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.visual__tools {
	align-self: flex-end;
	display: flex;
	align-items: center;
	gap: 6px;
	pointer-events: auto;
}

.visual__badge {
	margin-right: 4px;
	padding: 5px 9px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.18em;
	color: #f3ecd9;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(243, 236, 217, 0.22);
	cursor: pointer;
	font-family: inherit;
}
.visual__badge:hover { background: rgba(0, 0, 0, 0.75); }
.visual__badge--silent { border-color: rgba(230, 0, 126, 0.6); }

.visual__btn {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(243, 236, 217, 0.22);
	background: rgba(0, 0, 0, 0.5);
	color: #f3ecd9;
	cursor: pointer;
	transition: background .12s ease, transform .12s ease;
}
.visual__btn:hover { background: rgba(0, 0, 0, 0.75); }
.visual__btn:active { transform: scale(.92); }
.visual__btn.is-on {
	border-color: rgba(96, 165, 250, 0.85);
	box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.45);
}

.visual__time {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 8px 0 10px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(243, 236, 217, 0.22);
	color: #f3ecd9;
}
.visual__range {
	width: 88px;
	height: 4px;
	margin: 0;
	accent-color: #f3ecd9;
	cursor: pointer;
}
.visual__time-label {
	min-width: 2.4em;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	opacity: 0.85;
}


@media (prefers-reduced-motion: reduce) {
	.visual { transition: none; }
}
