/* =========================================================================
 * embed.css — accordatore INCORPORATO nella pagina /tune.
 * Tutto è confinato sotto .tuner-embed (niente position:fixed a tutto schermo
 * come nello style.css originale, pensato per l'iframe). Palette CantiOnline.
 * ========================================================================= */

.tuner-embed {
  position: relative;
  border: 1px solid #efe7d6;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 2px 8px rgba(58, 46, 40, 0.12);
  padding: 18px 16px 16px;
  margin: 16px 0;
  overflow: hidden;
}

.tuner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tuner-embed .a4 {
  font-family: "Spectral", Georgia, serif;
  color: #6b6157;
  font-size: 0.95rem;
  user-select: none;
}
.tuner-embed .a4 span {
  color: #b23a2e;
  font-weight: 600;
}

.tuner-embed .tuner-start {
  margin: 2px 0;
}

.tuner-embed .tuner-stage[hidden] {
  display: none;
}

/* ---- quadrante (ago) ---- */
.tuner-embed .meter {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 120px;
  margin: 10px auto 4px;
  overflow: hidden;
}
.tuner-embed .meter-pointer {
  width: 2px;
  height: 100%;
  background: #b23a2e;
  transform: rotate(0deg);
  transform-origin: bottom;
  transition: transform 0.35s ease-out;
  position: absolute;
  right: 50%;
  bottom: 0;
}
.tuner-embed .meter-dot {
  width: 10px;
  height: 10px;
  background: #2a2622;
  border-radius: 50%;
  position: absolute;
  bottom: -5px;
  right: 50%;
  margin-right: -4px;
}
.tuner-embed .meter-scale {
  width: 1px;
  height: 100%;
  transform-origin: bottom;
  box-sizing: border-box;
  border-top: 10px solid rgba(42, 38, 34, 0.45);
  position: absolute;
  right: 50%;
  bottom: 0;
}
.tuner-embed .meter-scale-strong {
  width: 2px;
  border-top-width: 18px;
  border-top-color: #2a2622;
}

/* ---- note ---- */
.tuner-embed .notes {
  position: relative;
  width: 100%;
  text-align: center;
  margin: 6px auto 0;
}
.tuner-embed .notes-list {
  overflow: auto;
  overflow: -moz-scrollbars-none;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-mask-image: -webkit-linear-gradient(
    left,
    rgba(255, 255, 255, 0),
    #fff 25%,
    #fff 75%,
    rgba(255, 255, 255, 0)
  );
  mask-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    #fff 25%,
    #fff 75%,
    rgba(255, 255, 255, 0)
  );
}
.tuner-embed .notes-list::-webkit-scrollbar {
  display: none;
}
.tuner-embed .note {
  font-family: "Fraunces", Georgia, serif;
  font-size: 64px;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-right: 30px;
  padding-left: 10px;
  color: #2a2622;
  -webkit-tap-highlight-color: transparent;
}
.tuner-embed .note.active {
  color: #b23a2e;
}
.tuner-embed .note span {
  position: absolute;
  right: 0.25em;
  font-size: 40%;
  font-weight: 400;
}
.tuner-embed .note-sharp {
  top: 0.3em;
}
.tuner-embed .note-octave {
  bottom: 0.3em;
}
.tuner-embed .frequency {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 26px;
  color: #6b6157;
}
.tuner-embed .frequency span {
  font-size: 50%;
  margin-left: 0.25em;
}

/* ---- istogramma frequenze ---- */
.tuner-embed .frequency-bars {
  position: relative;
  display: block;
  width: 100%;
  height: 70px;
  margin-top: 10px;
}

.tuner-embed .tuner-status {
  margin-top: 8px;
  font-family: "Spectral", Georgia, serif;
  font-size: 0.9rem;
  color: #6b6157;
  text-align: center;
  min-height: 1.2em;
}

@media (max-width: 640px) {
  .tuner-embed .note {
    font-size: 52px;
  }
}
