:root {
  --fondo: #000000;
  --pillola: #121214;
  --pillola-basso: #0a0a0b;
  --bordo: rgba(255, 255, 255, 0.09);
  --testo: #f3f1ee;
  --tenue: #85827d;
  --disco: #f3efe8;
  --freccia: #0c0c0d;
  --accento: #f2b46a;
  --metallo-chiaro: #fff3e2;
  --metallo-scuro: #c97a36;
  --onda-spenta: rgba(255, 255, 255, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: var(--fondo); }

body {
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  color: var(--testo);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.btn {
  position: relative;
  display: block;
  height: 60px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 30px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--accento); }

.btn__body {
  position: relative;
  display: block;
  width: 100%;
  height: 60px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pillola), var(--pillola-basso));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 12px 28px -14px rgba(0, 0, 0, 1);
  will-change: transform;
}

/* the 1px edge that catches light where the pointer is */
.btn__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background:
    radial-gradient(120px 60px at var(--mx, 30%) 0%, rgba(255, 255, 255, 0.34), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* warm light under the waveform, growing with the download */
.btn__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 120% at var(--gx, 20%) 100%, rgba(242, 180, 106, 0.22), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.icon {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 40px;
  height: 40px;
}
.icon__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #ffffff, var(--disco) 55%, #d9d2c7);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 2px 6px -2px rgba(0, 0, 0, 0.7);
}
.icon__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.icon__line {
  fill: none;
  stroke: var(--freccia);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ring__track, .ring__fill { fill: none; stroke-width: 1.5; }
.ring__track { stroke: rgba(255, 255, 255, 0.1); opacity: 0; }
.ring__fill { stroke: var(--accento); stroke-linecap: round; opacity: 0; transform: rotate(-90deg); transform-origin: 20px 20px; }

.txt {
  position: absolute;
  left: 62px;
  top: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.txt--rest { right: 24px; justify-content: space-between; }
.txt__main {
  font-size: 15px;
  font-weight: 560;
  font-variation-settings: "wdth" 100;
  letter-spacing: 0.005em;
}
.txt__meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--tenue);
  font-variant-numeric: tabular-nums;
}

.wave {
  position: absolute;
  left: 62px;
  top: 12px;
  height: 36px;
  display: block;
  pointer-events: none;
}

.pct {
  position: absolute;
  right: 20px;
  top: 0;
  height: 60px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--testo);
  opacity: 0;
  pointer-events: none;
}
.pct__s { color: var(--tenue); margin-left: 1px; font-weight: 500; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #0b0b0d;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  opacity: 0;
}

.icon__disc--fatto {
  background: radial-gradient(120% 120% at 30% 18%, var(--metallo-chiaro), var(--accento) 52%, var(--metallo-scuro));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 0 18px -4px rgba(242, 180, 106, 0.55);
  opacity: 0;
}

/* one pass of light across the pill when the episode is saved */
.btn__sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 46%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 238, 214, 0.16) 50%, transparent 80%);
  opacity: 0;
  pointer-events: none;
}
