/* ---------- mostradores alternativos: analógico e estroboscópico ---------- */
.alt-display {
	display: none;
	position: relative;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
}

html[data-display="analog"] #analog,
html[data-display="strobe"] #strobe { display: flex; }

html:not([data-display="digital"]) .lock-ring,
html:not([data-display="digital"]) .mini-bars, html[data-bars="0"] .mini-bars { display: none; }

html:not([data-display="digital"]) .lock-card { padding-top: clamp(16px, 3.4dvh, 32px); }

.alt-display .mascot {
	left: 4px;
	top: -4px;
	transform: none;
	width: clamp(34px, 5.6dvh, 46px);
	height: clamp(34px, 5.6dvh, 46px);
	font-size: clamp(18px, 3dvh, 26px);
}

.alt-display.ok .mascot { animation: hop2 .9s ease-in-out infinite; }

@keyframes hop2 {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
	.alt-display.ok .mascot { animation: none; }
}

.alt-note {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin-top: clamp(2px, .8dvh, 8px);
	line-height: 1;
}

.alt-note .n {
	font-family: var(--note-font);
	font-size: min(30vw, 11dvh, 118px);
	font-weight: 900;
	letter-spacing: var(--note-ls);
	color: var(--ink);
}

.alt-note .o {
	font-family: var(--note-font);
	font-size: min(9vw, 3.8dvh, 40px);
	font-weight: 900;
	margin: 0 0 clamp(4px, 1.2dvh, 12px) 6px;
	color: var(--ink2);
}

/* analógico */
#analogSvg {
	display: block;
	width: min(100%, 38dvh, 360px);
	height: auto;
	overflow: visible;
}

.a-face { fill: rgb(var(--panel-rgb) / .55); stroke: var(--panel-border); stroke-width: 1.2; }
.a-tick { stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; opacity: .75; }
.a-tick.major { stroke: var(--ink2); stroke-width: 2.4; opacity: .95; }
.a-tick.z-ok { stroke: var(--green); opacity: 1; }
.a-tick.z-warn { stroke: var(--yellow); opacity: .95; }
.a-sym { fill: var(--muted); font-size: 22px; font-family: Arial, sans-serif; }
.a-num { fill: var(--muted); font-size: 11px; font-family: Arial, sans-serif; text-anchor: middle; }
.a-needle { stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; transition: stroke 160ms ease; }
.a-needle.tail { stroke-width: 6; }
.a-pivot { fill: var(--ink); }
.a-pivot-in { fill: var(--base); }
#aNeedle { transition: opacity 300ms ease; }
.alt-display.idle #aNeedle { opacity: .35; }
.alt-display.ok .a-needle { stroke: var(--green); }
.alt-display.warn .a-needle { stroke: var(--yellow); }
.alt-display.bad .a-needle { stroke: var(--red); }

/* estroboscópico */
#strobeCanvas {
	display: block;
	width: min(100%, 340px);
	height: clamp(66px, 16dvh, 124px);
	border-radius: 16px;
	border: 1px solid var(--panel-border);
	background: rgb(var(--base-rgb) / .45);
}

/* ---------- efeitos de fundo ---------- */
#fxCanvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; }

html[data-fx="aurora"] #fxCanvas,
html[data-fx="stars"] #fxCanvas,
html[data-fx="rain"] #fxCanvas,
html[data-fx="bubbles"] #fxCanvas,
html[data-fx="waves"] #fxCanvas,
html[data-fx="embers"] #fxCanvas,
html[data-fx="fireflies"] #fxCanvas,
html[data-fx="notes"] #fxCanvas,
html[data-fx="code"] #fxCanvas,
html[data-fx="pulse"] #fxCanvas { display: block; }

html:not([data-fx="fluid"]) .fluid span { display: none; }
html[data-fx="solid"] .fluid { background: var(--base); }
html[data-fx="gradient"] .fluid {
	background: linear-gradient(165deg, rgb(var(--c1) / .55) 0%, var(--base) 50%, rgb(var(--c2) / .5) 100%), var(--base);
}

html[data-reactive="1"][data-fx="fluid"] .fluid span { opacity: calc(.7 + var(--level, 0) * .6); }

/* ---------- foto ou vídeo do aparelho como fundo ---------- */
.media-bg { display: none; position: absolute; inset: 0; overflow: hidden; background: linear-gradient(rgb(var(--edge-t-rgb, var(--base-rgb, 0 0 0))), rgb(var(--edge-b-rgb, var(--base-rgb, 0 0 0)))); }   /* enquanto a foto carrega, aparece a cor do afinador (e não preto) */
.media-bg.on { display: block; }
.media-bg img,
.media-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-bg::after { content: ""; position: absolute; inset: 0; background: rgb(var(--base-rgb) / var(--dim, .45)); }

html[data-media="1"] .fluid span { display: none; }
html[data-media="1"] .fluid::after {
	background: linear-gradient(180deg,
		rgb(var(--edge-t-rgb, var(--base-rgb))) 0%,
		rgb(var(--edge-t-rgb, var(--base-rgb)) / 0) 7%,
		rgb(var(--edge-b-rgb, var(--base-rgb)) / 0) 93%,
		rgb(var(--edge-b-rgb, var(--base-rgb))) 100%);
}

/* o mascote fica acima das faixas do estroboscópico */
#strobe { padding-top: clamp(34px, 6.4dvh, 52px); }

/* nos mostradores novos o texto de orientação ocupa menos altura (o ponteiro/as faixas já mostram o rumo) */
html:not([data-display="digital"]) .guidance { min-height: clamp(50px, 8dvh, 72px); margin-top: 2px; }
html:not([data-display="digital"]) .freq { margin-top: clamp(4px, 1dvh, 10px); }
