/* one column: the needle and the note on top, the headstock with its six strings below */
.tuner {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  -webkit-tap-highlight-color: transparent;
}
.tuner .tool-head {
  padding-bottom: 0;
}
.auto {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  font: 500 13px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(28, 26, 20, 0.2);
  transition: transform 0.2s;
}
.auto[aria-pressed="true"] .switch {
  background: var(--accent);
}
.auto[aria-pressed="true"] .switch::after {
  transform: translateX(22px);
}
.sub {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.sub b {
  color: var(--ink);
  font-weight: 500;
}

/* ---- meter ---- */
.meter {
  position: relative;
  height: 170px;
}
.ticks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.flat,
.sharp {
  position: absolute;
  top: 4px;
  font: 600 30px / 1 var(--display);
  color: var(--muted);
}
.flat {
  left: 6px;
}
.sharp {
  right: 6px;
}
.center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--rule);
}
.needle {
  position: absolute;
  top: 46px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-left: -38px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 800 30px / 1 var(--display);
  transition:
    transform 0.12s linear,
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}
.needle.ok {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--paper);
}
.needle.off {
  border-color: var(--accent);
  color: var(--accent);
}
.readout {
  min-height: 1.4em;
  text-align: center;
  font: 500 13.5px var(--mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.status {
  align-self: center;
  max-width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface);
  text-align: center;
  font-size: 16px;
}
.status.ok {
  background: var(--ok);
  color: var(--paper);
  font-weight: 600;
}
.mic {
  align-self: center;
  padding: 12px 24px;
}

/* ---- headstock ---- */
.head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.str {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--code-bg);
  font: 600 25px / 1 var(--display);
  padding-bottom: 10px;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.1s;
}
.str small {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  font: 500 9.5px var(--mono);
  color: var(--muted);
}
.str:active {
  transform: scale(0.95);
}
.str.sel {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.str.sel small {
  color: var(--paper);
  opacity: 0.7;
}
.str.done {
  box-shadow: inset 0 0 0 3px var(--ok);
}
.str.done::after {
  content: "✓";
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--paper);
  font-size: 11px;
}
#headstock {
  display: block;
  width: 100%;
  height: 250px;
}
.hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
