/* /signal/ — HUD wave background (hud-wave.js) with a settings panel and music (signal.js). Studio fonts. */
.sg-stage { --sg-acc: hsl(95 65% 62%); position: relative; height: calc(100svh - 74px); min-height: 560px; background: #050605; color: #e3eae3; overflow: hidden; isolation: isolate; }
/* the stage works like an app: no accidental text selection (the HUD redraws constantly and clicking a
   button doesn't clear a selection), except in the artist name box */
.sg-stage { -webkit-user-select: none; user-select: none; }
.sg-stage input { -webkit-user-select: text; user-select: text; }
.sg-bg { position: absolute; inset: 0; --hw-font: var(--f-mono); }
.sg-bg .hw-cur, .sg-bg .hw-left { display: none; }   /* the words sit where CURRENT / PREVIOUS would be */

.sg-words { position: absolute; left: max(var(--pad), 3.5%); bottom: 7svh; z-index: 2; max-width: 27rem; text-shadow: 0 0 18px #000, 0 0 6px #000; }
.sg-words h1 { margin: 0 0 .7rem; font: 700 clamp(1.8rem, 3.2vw, 2.7rem)/1.05 var(--f-display); color: #fff; max-width: 15ch; }
.sg-words p { margin: 0 0 1.1rem; font: 400 1rem/1.55 var(--f-body); color: rgba(227, 234, 227, .75); max-width: 36ch; }
.sg-play { display: inline-flex; align-items: center; gap: 10px; font: 600 .95rem var(--f-body); color: #0b0f0b; background: var(--sg-acc); border: 0; border-radius: 999px; padding: 11px 20px 11px 16px; cursor: pointer; box-shadow: 0 0 24px color-mix(in srgb, var(--sg-acc) 55%, transparent); }
.sg-play span { font-size: .8rem; width: 1.1em; text-align: center; }
.sg-play[aria-pressed="true"] { background: #fff; }
.sg-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.sg-open { position: absolute; top: 16px; right: 16px; z-index: 3; font: 500 .85rem var(--f-body); color: #fff; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 16px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sg-stage.is-open .sg-open { visibility: hidden; }

.sg-panel { position: absolute; top: 16px; right: 16px; bottom: 16px; width: 290px; z-index: 3; display: flex; flex-direction: column;
  background: rgba(9, 12, 10, .8); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--f-body); transition: transform .35s ease, opacity .35s ease; }
.sg-stage:not(.is-open) .sg-panel { transform: translateX(calc(100% + 24px)); opacity: 0; visibility: hidden; transition: transform .35s ease, opacity .35s ease, visibility 0s .35s; }
.sg-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sg-panel h2 { margin: 0; font: 600 1rem var(--f-display); color: #fff; }
.sg-panel h3 { margin: 16px 0 8px; font: 500 .74rem var(--f-mono); color: rgba(227, 234, 227, .55); letter-spacing: 0; }
.sg-panel__body { overflow-y: auto; padding: 0 16px 16px; flex: 1; scrollbar-width: thin; }
.sg-x { font-size: .9rem; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; padding: 3px 9px; cursor: pointer; }

.sg-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sg-presets button { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; cursor: pointer; background: var(--c); box-shadow: 0 0 10px var(--c); }
.sg-presets button[aria-pressed="true"] { border-color: #fff; }

.sg-row { margin-top: 10px; }
.sg-row label { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; margin-bottom: 3px; color: #e3eae3; }
.sg-row output { font-family: var(--f-mono); color: var(--sg-acc); }
.sg-panel input[type=range] { width: 100%; margin: 0; height: 18px; accent-color: var(--sg-acc); }
.sg-panel input[type=range].sg-hue { appearance: none; -webkit-appearance: none; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, hsl(0 80% 55%), hsl(60 80% 55%), hsl(120 80% 55%), hsl(180 80% 55%), hsl(240 80% 55%), hsl(300 80% 55%), hsl(360 80% 55%)); }
.sg-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #000; }
.sg-hue::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #000; }

.sg-music { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sg-music [aria-pressed="true"] { background: var(--sg-acc); color: #0b0f0b; border-color: transparent; }
.sg-file { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; }
.sg-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sg-file:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.sg-tracks { display: grid; gap: 4px; margin-top: 8px; }
.sg-tracks button { font: 500 .76rem/1.3 var(--f-body); text-align: left; color: #e3eae3; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 7px; padding: 7px 9px; cursor: pointer; }
.sg-tracks button:hover { background: rgba(255, 255, 255, .1); }
.sg-tracks button[aria-pressed="true"] { border-color: var(--sg-acc); color: #fff; }
.sg-now { margin: 8px 0 0; font: 500 .74rem var(--f-mono); color: var(--sg-acc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sg-toggle { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .8rem; cursor: pointer; }
.sg-toggle input { accent-color: var(--sg-acc); }
.sg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.sg-btn { font: 500 .76rem/1.25 var(--f-body); color: #e3eae3; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .13); border-radius: 7px; padding: 8px 6px; cursor: pointer; }
.sg-btn:hover { background: rgba(255, 255, 255, .12); }
.sg-panel button:focus-visible, .sg-panel input:focus-visible, .sg-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sg-note { margin: 14px 0 0; font-size: .74rem; line-height: 1.45; color: rgba(227, 234, 227, .55); }
.sg-toast { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4; background: #111; border: 1px solid rgba(255, 255, 255, .15); padding: 8px 14px; border-radius: 6px; font-size: .8rem; opacity: 0; transition: opacity .3s; pointer-events: none; }
.sg-toast.on { opacity: 1; }

.sg-after__in { max-width: 760px; }
.sg-after h2 { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3rem); }
.sg-after p { color: var(--ink-2); font-size: 1.1rem; }

/* the 3D looks draw on this canvas, between the grimy screen and the HUD text */
.sg-vis { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* look switcher above the headline */
.sg-modes { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 1.1rem; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: none; }
.sg-modes button { font: 500 .86rem var(--f-body); color: rgba(227, 234, 227, .78); background: none; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.sg-modes button:hover { color: #fff; }
.sg-modes button[aria-pressed="true"] { background: var(--sg-acc); color: #0b0f0b; }
.sg-modes button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* artist name: huge in the middle, punches and splits on the kick (--k from signal.js) */
.sg-name { --k: 0; position: absolute; left: 50%; top: 42%; z-index: 1; pointer-events: none; white-space: nowrap; max-width: 92%;
  font: 800 clamp(2.6rem, 9vw, 8.5rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0; color: #fff; mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(calc(1 + var(--k) * .12)) skewX(calc(var(--k) * -6deg));
  text-shadow: calc(var(--k) * -9px) 0 0 hsl(330 100% 60% / .8), calc(var(--k) * 9px) 0 0 hsl(180 100% 55% / .8), 0 0 calc(18px + var(--k) * 40px) var(--sg-acc);
  opacity: calc(.82 + var(--k) * .18); }
.sg-name[hidden] { display: none; }
.sg-stage.is-open .sg-name { left: 42%; }

.sg-text { width: 100%; font: 500 .85rem var(--f-body); color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; padding: 9px 10px; }
.sg-text::placeholder { color: rgba(227, 234, 227, .45); }
.sg-text:focus-visible { outline: 2px solid var(--sg-acc); outline-offset: 1px; }

@media (max-width: 1000px) {
  .sg-stage { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .sg-bg { position: relative; inset: auto; height: 58svh; flex: none; }
  .sg-words { position: relative; left: auto; bottom: auto; order: 2; padding: 22px var(--pad) 8px; max-width: none; }
  .sg-open { display: none; }
  .sg-panel, .sg-stage:not(.is-open) .sg-panel { position: relative; inset: auto; order: 3; width: auto; margin: 12px var(--pad) 28px; transform: none; opacity: 1; visibility: visible; }
  .sg-x { display: none; }
  .sg-stage.is-open .sg-name { left: 50%; }
  .sg-toast { position: fixed; }
}
@media (max-width: 600px) {
  .sg-bg .hw-sys { display: none; }
}
.sg-after p.sg-credit { font-size: .9rem; color: var(--ink-3, var(--ink-2)); }
