.tn {
  --lit: #e6f3cf;
  --glow: #b9f08a;
  --hot: #ff5a3c;
  width: 540px;
  height: 540px;
  box-sizing: border-box;
  padding: 20px;
  background:
    repeating-linear-gradient(91deg, #0000 0 7px, #00000022 7px 8px, #0000 8px 19px, #ffffff0a 19px 20px),
    repeating-linear-gradient(89deg, #0000 0 31px, #0000001c 31px 34px),
    linear-gradient(180deg, #6b3f22, #4d2b17 55%, #5c3520);
  font-family: "Archivo Variable", sans-serif;
  user-select: none;
}

.tn * { box-sizing: border-box; }

.tn-face {
  position: relative;
  width: 500px;
  height: 500px;
  padding: 24px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, #ffffff12 0 1px, #0000 1px 2px, #00000008 2px 3px),
    linear-gradient(180deg, #ddd2b8, #c4b698 60%, #b5a685);
  box-shadow: inset 0 1px 0 #fff8, inset 0 -1px 0 #0005, 0 0 0 1px #1a0d05, 0 2px 6px #000a;
}

.tn-slider { position: relative; display: block; }

/* the dial glass */
.tn-glass {
  position: relative;
  width: 452px;
  height: 304px;
  border-radius: 3px;
  background:
    linear-gradient(115deg, #ffffff0d 0 38%, #0000 38.2%),
    radial-gradient(120% 90% at 50% 105%, #26331c 0, #10160e 55%, #080a08 100%);
  box-shadow: inset 0 0 0 1px #000, inset 0 3px 8px #000, 0 1px 0 #fff9, 0 -1px 0 #0006;
  color: var(--lit);
  text-shadow: 0 0 6px color-mix(in srgb, var(--glow) 55%, transparent);
  overflow: hidden;
}

.tn-read {
  position: absolute;
  left: 26px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tn-unit,
.tn-stereo {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tn-unit { opacity: 0.72; }

.tn-num {
  font-size: 64px;
  line-height: 56px;
  font-weight: 300;
  font-stretch: 88%;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tn-stereo {
  position: absolute;
  right: 26px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6f7a63;
  text-shadow: none;
  transition: color 90ms linear;
}

.tn-stereo i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a1a12;
  box-shadow: inset 0 1px 1px #000;
  transition: background-color 90ms linear, box-shadow 90ms linear;
}

.tn-stereo[data-on] { color: var(--lit); }
.tn-stereo[data-on] i { background: var(--hot); box-shadow: 0 0 8px var(--hot), 0 0 2px #fff inset; }

/* scales share the slot's span: 400px, 20px per MHz */
.tn-scale {
  position: absolute;
  left: 26px;
  width: 400px;
}

.tn-scale span {
  position: absolute;
  width: 1px;
  margin-left: -0.5px;
  background: var(--lit);
  box-shadow: 0 0 4px color-mix(in srgb, var(--glow) 60%, transparent);
}

.tn-scale b {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  font-size: 18px;
  line-height: 18px;
  font-weight: 500;
  font-stretch: 84%;
  font-variant-numeric: tabular-nums;
}

.tn-fm { top: 184px; height: 16px; border-bottom: 1px solid var(--lit); }
.tn-fm span { bottom: 0; }
.tn-fm span[data-size="s"] { height: 6px; opacity: 0.7; }
.tn-fm span[data-size="m"] { height: 10px; }
.tn-fm span[data-size="l"] { height: 16px; width: 2px; margin-left: -1px; }
.tn-fm b { bottom: 24px; }

.tn-am { top: 216px; height: 12px; border-top: 1px solid #e6f3cf66; opacity: 0.62; }
.tn-am span { top: 0; }
.tn-am span[data-size="s"] { height: 5px; }
.tn-am span[data-size="l"] { height: 12px; }
.tn-am b { top: 20px; font-size: 15px; line-height: 15px; }

/* the slot and the grip */
.tn-control {
  display: flex;
  align-items: center;
  width: 452px;
  height: 80px;
  margin-top: 16px;
  padding: 0 26px;
}

.tn-slot {
  position: relative;
  width: 400px;
  height: 8px;
  border-radius: 4px;
  background: #0b0806;
  box-shadow: inset 0 2px 3px #000, 0 1px 0 #fff9, 0 0 0 6px #0000000d;
}

.tn-grip {
  top: 50%;
  translate: -50% -50%;
  width: 48px;
  height: 72px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, #0000 22px, var(--hot) 22px 26px, #0000 26px) top / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, #ffffff66 0 1px, #0000 1px 3px, #0000002e 3px 4px),
    linear-gradient(180deg, #f4efe4 0%, #cfc7b6 30%, #8d8676 52%, #c2baa8 78%, #e9e3d6 100%);
  box-shadow: 0 5px 8px #0009, 0 0 0 1px #2b2318, inset 0 1px 0 #fff, inset 0 -2px 2px #0004;
  transition: box-shadow 120ms ease;
}

.tn-grip:has(:focus-visible),
.tn-grip[data-dragging] {
  box-shadow: 0 2px 4px #000b, 0 0 0 1px #2b2318, inset 0 1px 0 #fff, inset 0 -2px 2px #0004;
}

/* the needle rides behind the glass, above the grip */
.tn-needle {
  position: absolute;
  left: 50%;
  bottom: 92px;
  width: 2px;
  height: 176px;
  margin-left: -1px;
  background: var(--hot);
  box-shadow: 0 0 8px var(--hot), 0 0 2px #ffd0c4;
  pointer-events: none;
}

.tn-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  color: #3b2f1c;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #fff7;
}
