.input-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.input-method {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}

.input-method.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 2px 8px rgba(20, 25, 30, .08);
}

.capture-panel {
  display: none;
  min-height: 240px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
  padding: 12px;
}

.capture-panel.active {
  display: block;
}

.capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.capture-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.4;
}

.capture-status {
  min-width: 76px;
  border-radius: 999px;
  background: var(--soft);
  padding: 6px 9px;
  color: var(--muted);
  text-align: center;
  font-size: .7rem;
  font-weight: 900;
}

.capture-status.recording {
  background: rgba(214, 83, 61, .13);
  color: var(--red);
}

.capture-meter {
  position: relative;
  height: 10px;
  margin: 9px 0 11px;
  border-radius: 99px;
  background: #e1e4e7;
  overflow: hidden;
}

.capture-meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
  transition: width 60ms linear;
}

.capture-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.capture-readout div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.capture-readout span {
  display: block;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 850;
}

.capture-readout strong {
  display: block;
  margin-top: 2px;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

.record-btn.recording {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.piano-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
}

.piano {
  position: relative;
  display: flex;
  width: 672px;
  height: 170px;
  padding-top: 0;
  user-select: none;
  touch-action: none;
}

.piano-key {
  position: relative;
  flex: 0 0 48px;
  height: 170px;
  border: 1px solid #b8bcc0;
  border-radius: 0 0 5px 5px;
  background: #fff;
  color: #4e5358;
  padding: 0 0 9px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: .65rem;
  font-weight: 850;
}

.piano-key.black {
  z-index: 2;
  flex-basis: 34px;
  width: 34px;
  height: 105px;
  margin-left: -17px;
  margin-right: -17px;
  border-color: #111;
  background: #202326;
  color: #fff;
}

.piano-key.pressed {
  background: var(--yellow);
  color: var(--ink);
}

.voice-orb {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  margin: 12px auto;
  border: 8px solid #e3e6e8;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
}

.voice-orb.listening {
  border-color: rgba(8, 127, 123, .35);
  color: var(--teal);
  box-shadow: 0 0 0 9px rgba(8, 127, 123, .08);
}

.grid-mode-wrap.hidden {
  display: none;
}

@media (max-width: 520px) {
  .input-method {
    min-height: 48px;
    font-size: .72rem;
  }

  .capture-panel {
    padding: 10px;
  }

  .capture-readout {
    grid-template-columns: 1fr 1fr;
  }

  .capture-readout div:last-child {
    grid-column: 1 / -1;
  }

  .piano {
    height: 154px;
  }

  .piano-key {
    height: 154px;
  }

  .piano-key.black {
    height: 96px;
  }
}
